From d6b8feac815094678a746820121a99a9b000e9f3 Mon Sep 17 00:00:00 2001 From: David Meister Date: Sat, 6 Jun 2026 09:53:29 +0000 Subject: [PATCH 1/5] =?UTF-8?q?wip(flow#474):=20de-submodule=20groundwork?= =?UTF-8?q?=20=E2=80=94=20soldeer=20deps=20+=20remappings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First step of the flow V2->V4 + soldeer + reusables migration tracked in #474. Replaces lib/ submodules with soldeer [dependencies] (OZ 4.9.6, forge-std, rain-factory/interpreter-interface/math-fixedpoint/solmem) + remappings-only mapping of the existing import roots. The eval-path V4 rewrite (Flow.sol/LibFlow/ IFlowV6) + tests follow per #474; CI on the draft PR is the build-verify loop. Refs #474 --- foundry.toml | 25 +++++++++++++++++++++++-- remappings.txt | 7 +++++++ soldeer.lock | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 remappings.txt create mode 100644 soldeer.lock diff --git a/foundry.toml b/foundry.toml index 14996b0c..245a12da 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,7 +1,7 @@ [profile.default] src = 'src' out = 'out' -libs = ['lib'] +libs = ['dependencies'] # See more config options https://github.com/foundry-rs/foundry/tree/master/config @@ -18,7 +18,28 @@ optimizer_runs = 1000000 bytecode_hash = "none" cbor_metadata = false +remappings = [ + "forge-std/=dependencies/forge-std-1.16.1/src/", + "rain.factory/=dependencies/rain-factory-0.1.1/", + "rain.interpreter.interface/=dependencies/rain-interpreter-interface-0.1.0/src/", + "rain.solmem/=dependencies/rain-solmem-0.1.3/src/", + "openzeppelin-contracts-upgradeable/contracts/=dependencies/@openzeppelin-contracts-upgradeable-4.9.6/", + "openzeppelin-contracts/contracts/=dependencies/@openzeppelin-contracts-4.9.6/", + "openzeppelin/=dependencies/@openzeppelin-contracts-upgradeable-4.9.6/", +] [fuzz] runs = 2048 -seed = "0xdeadbeef" \ No newline at end of file +seed = "0xdeadbeef" + +[dependencies] +forge-std = "1.16.1" +"@openzeppelin-contracts" = "4.9.6" +"@openzeppelin-contracts-upgradeable" = "4.9.6" +rain-factory = "0.1.1" +rain-interpreter-interface = "0.1.0" +rain-math-fixedpoint = "0.2.0" +rain-solmem = "0.1.3" + +[soldeer] +recursive_deps = false diff --git a/remappings.txt b/remappings.txt new file mode 100644 index 00000000..0ce5121c --- /dev/null +++ b/remappings.txt @@ -0,0 +1,7 @@ +@openzeppelin-contracts-4.9.6/=dependencies/@openzeppelin-contracts-4.9.6/ +@openzeppelin-contracts-upgradeable-4.9.6/=dependencies/@openzeppelin-contracts-upgradeable-4.9.6/ +forge-std-1.16.1/=dependencies/forge-std-1.16.1/ +rain-factory-0.1.1/=dependencies/rain-factory-0.1.1/ +rain-interpreter-interface-0.1.0/=dependencies/rain-interpreter-interface-0.1.0/ +rain-math-fixedpoint-0.2.0/=dependencies/rain-math-fixedpoint-0.2.0/ +rain-solmem-0.1.3/=dependencies/rain-solmem-0.1.3/ diff --git a/soldeer.lock b/soldeer.lock new file mode 100644 index 00000000..5abce8c3 --- /dev/null +++ b/soldeer.lock @@ -0,0 +1,48 @@ +[[dependencies]] +name = "@openzeppelin-contracts" +version = "4.9.6" +url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/4_9_6_14-03-2024_06:11:55_contracts.zip" +checksum = "57f2cae4b45b91b0847e58c36ea70aee0fb3212cc09b47279627f0764f87e5ee" +integrity = "861134d6a3739362ce5ef6541538e23ca1df10ec47151f105057bea0bb710330" + +[[dependencies]] +name = "@openzeppelin-contracts-upgradeable" +version = "4.9.6" +url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts-upgradeable/4_9_6_14-03-2024_06:12:03_contracts-upgradeable.zip" +checksum = "dddc8efa3da3dcd0dbda63efdc34d6006ece3ae5a8f46b0cf914870df45b9c71" +integrity = "e67f536c763f35149aac483acfa21637c6b6b6c3f8a71860f8e717cf110138cd" + +[[dependencies]] +name = "forge-std" +version = "1.16.1" +url = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_16_1_08-05-2026_08:51:16_forge-std-1.16.zip" +checksum = "839b61832925c7152c7b6dffbfa4998d9e606211179bd8f604733124e8a7cb57" +integrity = "60e55d10150354ca4a1e2985c5456c834b92b82ef85ab0e1d92a7786cddbd219" + +[[dependencies]] +name = "rain-factory" +version = "0.1.1" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-factory/0_1_1_20-05-2026_13:02:17_rain.zip" +checksum = "6b02e2b87983e196bc88cb8fb802a2720b252783429567864cd13336167c369d" +integrity = "be6a3343d0ea247d8b495b584cd21c3bf64f0a1396ca21aaa8ce31715df29842" + +[[dependencies]] +name = "rain-interpreter-interface" +version = "0.1.0" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-interpreter-interface/0_1_0_12-05-2026_18:43:02_rain.interpreter.zip" +checksum = "887c4d5f1a87713c49f015b3fcdb295defbb495b126d15f9850c0ce72ef79639" +integrity = "c1b89f8a7ad02507ceb051b6c0f2750f6abe1ba99ffdfe1c9ac93905db90e75d" + +[[dependencies]] +name = "rain-math-fixedpoint" +version = "0.2.0" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-math-fixedpoint/0_2_0_09-05-2026_21:16:31_rain.math.zip" +checksum = "dd24665a7c3bc82878fdbcfe5ea8efe8471ec9c8546615dc94debc38529117d9" +integrity = "81a144050f76b662c91f1611ec18f41dce0994208617123cde80aad2fc9b441c" + +[[dependencies]] +name = "rain-solmem" +version = "0.1.3" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-solmem/0_1_3_09-05-2026_19:49:33_rain.zip" +checksum = "1d405bb81f7c9e56d1717de0d60da918d2fc2fa4db083efd2abe9906378d019f" +integrity = "e879d2743f9d884f647b9dd489889a83f2cea5f76eb69409a113e1baa69d3643" From fb302c2f6ccbd6f88da2b2beab613a643f7477a4 Mon Sep 17 00:00:00 2001 From: David Meister Date: Sat, 6 Jun 2026 10:13:22 +0000 Subject: [PATCH 2/5] wip(flow#474): migrate Flow.sol/LibFlow to V4 interpreter (eval4) Flow.sol: EvaluableV2->EvaluableV4, eval2->eval4(EvalV4), drop deployer + LibEncodedDispatch + io integrity check (eval-time validation per RaindexV6), StackItem stack via assembly cast. New IFlowV6. LibFlow: store V2->V3, kvs bytes32[]. Deprecated V2 interface imports across other flow interfaces rewritten to their relocated deprecated/v1|v2 soldeer paths. Build advancing past imports; remaining = transitive soldeer deps (rain-lib-hash + OZ 4.9.6/5.6.1 split where rain deps pull OZ5) + then test rewrite. Refs #474 --- .gitmodules | 18 - .../@openzeppelin-contracts-4.9.6/README.md | 90 + .../access/AccessControl.sol | 248 + .../access/AccessControlCrossChain.sol | 45 + .../access/AccessControlDefaultAdminRules.sol | 383 + .../access/AccessControlEnumerable.sol | 64 + .../access/IAccessControl.sol | 88 + .../IAccessControlDefaultAdminRules.sol | 172 + .../access/IAccessControlEnumerable.sol | 31 + .../access/Ownable.sol | 83 + .../access/Ownable2Step.sol | 57 + .../build/contracts/AccessControl.json | 215 + .../contracts/AccessControlCrossChain.json | 228 + .../AccessControlDefaultAdminRules.json | 400 + .../contracts/AccessControlEnumerable.json | 258 + .../build/contracts/Address.json | 10 + .../build/contracts/Arrays.json | 10 + .../build/contracts/Base64.json | 10 + .../build/contracts/BeaconProxy.json | 80 + .../build/contracts/BitMaps.json | 10 + .../build/contracts/Checkpoints.json | 10 + .../build/contracts/Clones.json | 10 + .../build/contracts/ConditionalEscrow.json | 165 + .../build/contracts/Context.json | 10 + .../build/contracts/Counters.json | 10 + .../build/contracts/Create2.json | 10 + .../build/contracts/CrossChainEnabled.json | 10 + .../build/contracts/CrossChainEnabledAMB.json | 22 + .../CrossChainEnabledArbitrumL1.json | 10 + .../CrossChainEnabledArbitrumL2.json | 10 + .../contracts/CrossChainEnabledOptimism.json | 10 + .../CrossChainEnabledPolygonChild.json | 39 + .../build/contracts/DoubleEndedQueue.json | 21 + .../build/contracts/ECDSA.json | 10 + .../build/contracts/EIP712.json | 76 + .../build/contracts/ERC1155.json | 334 + .../build/contracts/ERC1155Burnable.json | 369 + .../build/contracts/ERC1155Holder.json | 108 + .../build/contracts/ERC1155Pausable.json | 362 + .../contracts/ERC1155PresetMinterPauser.json | 743 + .../build/contracts/ERC1155Receiver.json | 108 + .../build/contracts/ERC1155Supply.json | 361 + .../build/contracts/ERC1155URIStorage.json | 323 + .../build/contracts/ERC165.json | 30 + .../build/contracts/ERC165Checker.json | 10 + .../build/contracts/ERC165Storage.json | 30 + .../build/contracts/ERC1820Implementer.json | 35 + .../build/contracts/ERC1967Proxy.json | 80 + .../build/contracts/ERC1967Upgrade.json | 56 + .../build/contracts/ERC20.json | 297 + .../build/contracts/ERC20Burnable.json | 312 + .../build/contracts/ERC20Capped.json | 294 + .../build/contracts/ERC20FlashMint.json | 358 + .../build/contracts/ERC20Pausable.json | 320 + .../build/contracts/ERC20Permit.json | 421 + .../contracts/ERC20PresetFixedSupply.json | 338 + .../contracts/ERC20PresetMinterPauser.json | 672 + .../build/contracts/ERC20Snapshot.json | 337 + .../build/contracts/ERC20Votes.json | 684 + .../build/contracts/ERC20VotesComp.json | 727 + .../build/contracts/ERC20Wrapper.json | 342 + .../build/contracts/ERC2771Context.json | 30 + .../build/contracts/ERC2981.json | 59 + .../build/contracts/ERC4626.json | 671 + .../build/contracts/ERC721.json | 357 + .../build/contracts/ERC721Burnable.json | 354 + .../build/contracts/ERC721Consecutive.json | 372 + .../build/contracts/ERC721Enumerable.json | 397 + .../build/contracts/ERC721Holder.json | 45 + .../build/contracts/ERC721Pausable.json | 380 + .../ERC721PresetMinterPauserAutoId.json | 751 + .../build/contracts/ERC721Royalty.json | 370 + .../build/contracts/ERC721URIStorage.json | 373 + .../build/contracts/ERC721Votes.json | 646 + .../build/contracts/ERC721Wrapper.json | 436 + .../build/contracts/ERC777.json | 587 + .../contracts/ERC777PresetFixedSupply.json | 597 + .../build/contracts/EnumerableMap.json | 10 + .../build/contracts/EnumerableSet.json | 10 + .../build/contracts/Escrow.json | 146 + .../build/contracts/Governor.json | 1019 ++ .../contracts/GovernorCompatibilityBravo.json | 1334 ++ .../contracts/GovernorCountingSimple.json | 1048 ++ .../contracts/GovernorPreventLateQuorum.json | 1083 ++ .../contracts/GovernorProposalThreshold.json | 1019 ++ .../build/contracts/GovernorSettings.json | 1115 ++ .../contracts/GovernorTimelockCompound.json | 1143 ++ .../contracts/GovernorTimelockControl.json | 1136 ++ .../build/contracts/GovernorVotes.json | 1032 ++ .../build/contracts/GovernorVotesComp.json | 1032 ++ .../GovernorVotesQuorumFraction.json | 1109 ++ .../build/contracts/IAMB.json | 336 + .../build/contracts/IAccessControl.json | 183 + .../IAccessControlDefaultAdminRules.json | 355 + .../contracts/IAccessControlEnumerable.json | 226 + .../build/contracts/IArbSys.json | 364 + .../build/contracts/IBeacon.json | 24 + .../build/contracts/IBridge.json | 538 + .../build/contracts/ICompoundTimelock.json | 424 + .../contracts/ICrossDomainMessenger.json | 110 + .../contracts/IDelayedMessageProvider.json | 43 + .../build/contracts/IERC1155.json | 304 + .../build/contracts/IERC1155MetadataURI.json | 323 + .../build/contracts/IERC1155Receiver.json | 108 + .../build/contracts/IERC1271.json | 35 + .../build/contracts/IERC1363.json | 382 + .../build/contracts/IERC1363Receiver.json | 45 + .../build/contracts/IERC1363Spender.json | 40 + .../build/contracts/IERC165.json | 30 + .../build/contracts/IERC1820Implementer.json | 35 + .../build/contracts/IERC1820Registry.json | 224 + .../build/contracts/IERC1822Proxiable.json | 24 + .../build/contracts/IERC1967.json | 56 + .../build/contracts/IERC20.json | 194 + .../build/contracts/IERC20Metadata.json | 233 + .../build/contracts/IERC20Permit.json | 86 + .../build/contracts/IERC2309.json | 42 + .../build/contracts/IERC2612.json | 86 + .../build/contracts/IERC2981.json | 59 + .../contracts/IERC3156FlashBorrower.json | 50 + .../build/contracts/IERC3156FlashLender.json | 88 + .../build/contracts/IERC4626.json | 623 + .../build/contracts/IERC4906.json | 328 + .../build/contracts/IERC5267.json | 60 + .../build/contracts/IERC5313.json | 24 + .../build/contracts/IERC5805.json | 219 + .../build/contracts/IERC6372.json | 37 + .../build/contracts/IERC721.json | 296 + .../build/contracts/IERC721Enumerable.json | 352 + .../build/contracts/IERC721Metadata.json | 341 + .../build/contracts/IERC721Receiver.json | 45 + .../build/contracts/IERC777.json | 402 + .../build/contracts/IERC777Recipient.json | 49 + .../build/contracts/IERC777Sender.json | 49 + .../build/contracts/IFxMessageProcessor.json | 34 + .../build/contracts/IGovernor.json | 771 + .../IGovernorCompatibilityBravo.json | 1001 ++ .../build/contracts/IGovernorTimelock.json | 856 + .../build/contracts/IInbox.json | 453 + .../build/contracts/IOutbox.json | 419 + .../ITransparentUpgradeableProxy.json | 126 + .../build/contracts/IVotes.json | 193 + .../build/contracts/Initializable.json | 24 + .../build/contracts/LibAMB.json | 10 + .../build/contracts/LibArbitrumL1.json | 10 + .../build/contracts/LibArbitrumL2.json | 24 + .../build/contracts/LibOptimism.json | 10 + .../build/contracts/Math.json | 10 + .../build/contracts/MerkleProof.json | 10 + .../build/contracts/MinimalForwarder.json | 217 + .../build/contracts/Multicall.json | 30 + .../build/contracts/Ownable.json | 63 + .../build/contracts/Ownable2Step.json | 102 + .../build/contracts/Pausable.json | 50 + .../build/contracts/PaymentSplitter.json | 313 + .../build/contracts/Proxy.json | 19 + .../build/contracts/ProxyAdmin.json | 160 + .../build/contracts/PullPayment.json | 43 + .../build/contracts/ReentrancyGuard.json | 10 + .../build/contracts/RefundEscrow.json | 235 + .../build/contracts/SafeCast.json | 10 + .../build/contracts/SafeERC20.json | 10 + .../build/contracts/SafeMath.json | 10 + .../build/contracts/ShortStrings.json | 27 + .../build/contracts/SignatureChecker.json | 10 + .../build/contracts/SignedMath.json | 10 + .../build/contracts/SignedSafeMath.json | 10 + .../build/contracts/StorageSlot.json | 10 + .../build/contracts/Strings.json | 10 + .../build/contracts/TimelockController.json | 900 ++ .../build/contracts/Timers.json | 10 + .../build/contracts/TokenTimelock.json | 78 + .../TransparentUpgradeableProxy.json | 85 + .../build/contracts/UUPSUpgradeable.json | 100 + .../build/contracts/UpgradeableBeacon.json | 113 + .../build/contracts/VestingWallet.json | 234 + .../build/contracts/Votes.json | 316 + .../crosschain/CrossChainEnabled.sol | 54 + .../crosschain/amb/CrossChainEnabledAMB.sol | 49 + .../crosschain/amb/LibAMB.sol | 35 + .../arbitrum/CrossChainEnabledArbitrumL1.sol | 44 + .../arbitrum/CrossChainEnabledArbitrumL2.sol | 40 + .../crosschain/arbitrum/LibArbitrumL1.sol | 42 + .../crosschain/arbitrum/LibArbitrumL2.sol | 45 + .../crosschain/errors.sol | 7 + .../optimism/CrossChainEnabledOptimism.sol | 41 + .../crosschain/optimism/LibOptimism.sol | 36 + .../polygon/CrossChainEnabledPolygonChild.sol | 72 + .../finance/PaymentSplitter.sol | 214 + .../finance/VestingWallet.sol | 145 + .../governance/Governor.sol | 723 + .../governance/IGovernor.sol | 313 + .../governance/TimelockController.sol | 422 + .../GovernorCompatibilityBravo.sol | 333 + .../IGovernorCompatibilityBravo.sol | 118 + .../extensions/GovernorCountingSimple.sol | 100 + .../extensions/GovernorPreventLateQuorum.sol | 105 + .../extensions/GovernorProposalThreshold.sol | 23 + .../extensions/GovernorSettings.sol | 110 + .../extensions/GovernorTimelockCompound.sol | 190 + .../extensions/GovernorTimelockControl.sol | 166 + .../governance/extensions/GovernorVotes.sol | 55 + .../extensions/GovernorVotesComp.sol | 55 + .../GovernorVotesQuorumFraction.sol | 121 + .../extensions/IGovernorTimelock.sol | 26 + .../governance/utils/IVotes.sol | 56 + .../governance/utils/Votes.sol | 244 + .../interfaces/IERC1155.sol | 6 + .../interfaces/IERC1155MetadataURI.sol | 6 + .../interfaces/IERC1155Receiver.sol | 6 + .../interfaces/IERC1271.sol | 19 + .../interfaces/IERC1363.sol | 80 + .../interfaces/IERC1363Receiver.sol | 35 + .../interfaces/IERC1363Spender.sol | 29 + .../interfaces/IERC165.sol | 6 + .../interfaces/IERC1820Implementer.sol | 6 + .../interfaces/IERC1820Registry.sol | 6 + .../interfaces/IERC1967.sol | 26 + .../interfaces/IERC20.sol | 6 + .../interfaces/IERC20Metadata.sol | 6 + .../interfaces/IERC2309.sol | 21 + .../interfaces/IERC2612.sol | 8 + .../interfaces/IERC2981.sol | 25 + .../interfaces/IERC3156.sol | 7 + .../interfaces/IERC3156FlashBorrower.sol | 29 + .../interfaces/IERC3156FlashLender.sol | 43 + .../interfaces/IERC4626.sol | 232 + .../interfaces/IERC4906.sol | 20 + .../interfaces/IERC5267.sol | 28 + .../interfaces/IERC5313.sol | 18 + .../interfaces/IERC5805.sol | 9 + .../interfaces/IERC6372.sol | 17 + .../interfaces/IERC721.sol | 6 + .../interfaces/IERC721Enumerable.sol | 6 + .../interfaces/IERC721Metadata.sol | 6 + .../interfaces/IERC721Receiver.sol | 6 + .../interfaces/IERC777.sol | 6 + .../interfaces/IERC777Recipient.sol | 6 + .../interfaces/IERC777Sender.sol | 6 + .../interfaces/draft-IERC1822.sol | 20 + .../interfaces/draft-IERC2612.sol | 8 + .../metatx/ERC2771Context.sol | 54 + .../metatx/MinimalForwarder.sol | 72 + .../package.json | 32 + .../proxy/Clones.sol | 88 + .../proxy/ERC1967/ERC1967Proxy.sol | 32 + .../proxy/ERC1967/ERC1967Upgrade.sol | 157 + .../proxy/Proxy.sol | 86 + .../proxy/beacon/BeaconProxy.sol | 61 + .../proxy/beacon/IBeacon.sol | 16 + .../proxy/beacon/UpgradeableBeacon.sol | 65 + .../proxy/transparent/ProxyAdmin.sol | 81 + .../TransparentUpgradeableProxy.sol | 191 + .../proxy/utils/Initializable.sol | 166 + .../proxy/utils/UUPSUpgradeable.sol | 99 + .../security/Pausable.sol | 105 + .../security/PullPayment.sol | 74 + .../security/ReentrancyGuard.sol | 77 + .../token/ERC1155/ERC1155.sol | 497 + .../token/ERC1155/IERC1155.sol | 119 + .../token/ERC1155/IERC1155Receiver.sol | 58 + .../ERC1155/extensions/ERC1155Burnable.sol | 32 + .../ERC1155/extensions/ERC1155Pausable.sol | 44 + .../ERC1155/extensions/ERC1155Supply.sol | 64 + .../ERC1155/extensions/ERC1155URIStorage.sol | 63 + .../extensions/IERC1155MetadataURI.sol | 22 + .../presets/ERC1155PresetMinterPauser.sol | 114 + .../token/ERC1155/utils/ERC1155Holder.sol | 36 + .../token/ERC1155/utils/ERC1155Receiver.sol | 19 + .../token/ERC20/ERC20.sol | 365 + .../token/ERC20/IERC20.sol | 78 + .../token/ERC20/extensions/ERC20Burnable.sol | 39 + .../token/ERC20/extensions/ERC20Capped.sol | 37 + .../token/ERC20/extensions/ERC20FlashMint.sol | 109 + .../token/ERC20/extensions/ERC20Pausable.sol | 35 + .../token/ERC20/extensions/ERC20Permit.sol | 95 + .../token/ERC20/extensions/ERC20Snapshot.sol | 191 + .../token/ERC20/extensions/ERC20Votes.sol | 290 + .../token/ERC20/extensions/ERC20VotesComp.sol | 46 + .../token/ERC20/extensions/ERC20Wrapper.sol | 73 + .../token/ERC20/extensions/ERC4626.sol | 256 + .../token/ERC20/extensions/IERC20Metadata.sol | 28 + .../token/ERC20/extensions/IERC20Permit.sol | 90 + .../ERC20/extensions/draft-ERC20Permit.sol | 8 + .../ERC20/extensions/draft-IERC20Permit.sol | 8 + .../ERC20/presets/ERC20PresetFixedSupply.sol | 30 + .../ERC20/presets/ERC20PresetMinterPauser.sol | 94 + .../token/ERC20/utils/SafeERC20.sol | 143 + .../token/ERC20/utils/TokenTimelock.sol | 72 + .../token/ERC721/ERC721.sol | 466 + .../token/ERC721/IERC721.sol | 132 + .../token/ERC721/IERC721Receiver.sol | 27 + .../ERC721/extensions/ERC721Burnable.sol | 26 + .../ERC721/extensions/ERC721Consecutive.sol | 148 + .../ERC721/extensions/ERC721Enumerable.sol | 159 + .../ERC721/extensions/ERC721Pausable.sol | 40 + .../token/ERC721/extensions/ERC721Royalty.sol | 38 + .../ERC721/extensions/ERC721URIStorage.sol | 74 + .../token/ERC721/extensions/ERC721Votes.sol | 43 + .../token/ERC721/extensions/ERC721Wrapper.sol | 97 + .../ERC721/extensions/IERC721Enumerable.sol | 29 + .../ERC721/extensions/IERC721Metadata.sol | 27 + .../ERC721/extensions/draft-ERC721Votes.sol | 9 + .../ERC721PresetMinterPauserAutoId.sol | 132 + .../token/ERC721/utils/ERC721Holder.sol | 23 + .../token/ERC777/ERC777.sol | 514 + .../token/ERC777/IERC777.sol | 200 + .../token/ERC777/IERC777Recipient.sol | 35 + .../token/ERC777/IERC777Sender.sol | 35 + .../presets/ERC777PresetFixedSupply.sol | 30 + .../token/common/ERC2981.sol | 107 + .../utils/Address.sol | 244 + .../utils/Arrays.sol | 105 + .../utils/Base64.sol | 101 + .../utils/Checkpoints.sol | 560 + .../utils/Context.sol | 28 + .../utils/Counters.sol | 43 + .../utils/Create2.sol | 75 + .../utils/Multicall.sol | 39 + .../utils/ShortStrings.sol | 122 + .../utils/StorageSlot.sol | 138 + .../utils/Strings.sol | 85 + .../utils/Timers.sol | 75 + .../utils/cryptography/ECDSA.sol | 217 + .../utils/cryptography/EIP712.sol | 142 + .../utils/cryptography/MerkleProof.sol | 227 + .../utils/cryptography/SignatureChecker.sol | 50 + .../utils/cryptography/draft-EIP712.sol | 8 + .../utils/escrow/ConditionalEscrow.sol | 25 + .../utils/escrow/Escrow.sol | 67 + .../utils/escrow/RefundEscrow.sol | 100 + .../utils/introspection/ERC165.sol | 29 + .../utils/introspection/ERC165Checker.sol | 126 + .../utils/introspection/ERC165Storage.sol | 42 + .../introspection/ERC1820Implementer.sol | 43 + .../utils/introspection/IERC165.sol | 25 + .../introspection/IERC1820Implementer.sol | 20 + .../utils/introspection/IERC1820Registry.sol | 112 + .../utils/math/Math.sol | 339 + .../utils/math/SafeCast.sol | 1136 ++ .../utils/math/SafeMath.sol | 215 + .../utils/math/SignedMath.sol | 43 + .../utils/math/SignedSafeMath.sol | 68 + .../utils/structs/BitMaps.sol | 51 + .../utils/structs/DoubleEndedQueue.sol | 170 + .../utils/structs/EnumerableMap.sol | 598 + .../utils/structs/EnumerableSet.sol | 378 + .../vendor/amb/IAMB.sol | 41 + .../vendor/arbitrum/IArbSys.sol | 134 + .../vendor/arbitrum/IBridge.sol | 102 + .../arbitrum/IDelayedMessageProvider.sol | 16 + .../vendor/arbitrum/IInbox.sol | 152 + .../vendor/arbitrum/IOutbox.sol | 117 + .../vendor/compound/ICompoundTimelock.sol | 86 + .../vendor/optimism/ICrossDomainMessenger.sol | 34 + .../vendor/polygon/IFxMessageProcessor.sol | 7 + .../README.md | 94 + .../AccessControlCrossChainUpgradeable.sol | 58 + ...essControlDefaultAdminRulesUpgradeable.sol | 395 + .../AccessControlEnumerableUpgradeable.sol | 77 + .../access/AccessControlUpgradeable.sol | 261 + ...essControlDefaultAdminRulesUpgradeable.sol | 172 + .../IAccessControlEnumerableUpgradeable.sol | 31 + .../access/IAccessControlUpgradeable.sol | 88 + .../access/Ownable2StepUpgradeable.sol | 71 + .../access/OwnableUpgradeable.sol | 95 + .../access/README.adoc | 27 + .../AccessControlCrossChainUpgradeable.json | 241 + ...ssControlDefaultAdminRulesUpgradeable.json | 413 + .../AccessControlEnumerableUpgradeable.json | 271 + .../contracts/AccessControlUpgradeable.json | 228 + .../build/contracts/AddressUpgradeable.json | 10 + .../build/contracts/ArraysUpgradeable.json | 10 + .../build/contracts/Base64Upgradeable.json | 10 + .../build/contracts/BitMapsUpgradeable.json | 10 + .../contracts/CheckpointsUpgradeable.json | 10 + .../build/contracts/ClonesUpgradeable.json | 10 + .../ConditionalEscrowUpgradeable.json | 185 + .../build/contracts/ContextUpgradeable.json | 24 + .../build/contracts/CountersUpgradeable.json | 10 + .../build/contracts/Create2Upgradeable.json | 10 + .../CrossChainEnabledAMBUpgradeable.json | 35 + ...rossChainEnabledArbitrumL1Upgradeable.json | 24 + ...rossChainEnabledArbitrumL2Upgradeable.json | 24 + .../CrossChainEnabledOptimismUpgradeable.json | 24 + ...ssChainEnabledPolygonChildUpgradeable.json | 52 + .../CrossChainEnabledUpgradeable.json | 24 + .../DoubleEndedQueueUpgradeable.json | 21 + .../build/contracts/ECDSAUpgradeable.json | 10 + .../build/contracts/EIP712Upgradeable.json | 73 + .../contracts/ERC1155BurnableUpgradeable.json | 382 + .../contracts/ERC1155HolderUpgradeable.json | 121 + .../contracts/ERC1155PausableUpgradeable.json | 375 + .../ERC1155PresetMinterPauserUpgradeable.json | 758 + .../contracts/ERC1155ReceiverUpgradeable.json | 121 + .../contracts/ERC1155SupplyUpgradeable.json | 374 + .../ERC1155URIStorageUpgradeable.json | 336 + .../build/contracts/ERC1155Upgradeable.json | 336 + .../contracts/ERC165CheckerUpgradeable.json | 10 + .../contracts/ERC165StorageUpgradeable.json | 43 + .../build/contracts/ERC165Upgradeable.json | 43 + .../ERC1820ImplementerUpgradeable.json | 48 + .../contracts/ERC1967UpgradeUpgradeable.json | 69 + .../contracts/ERC20BurnableUpgradeable.json | 325 + .../contracts/ERC20CappedUpgradeable.json | 307 + .../contracts/ERC20FlashMintUpgradeable.json | 371 + .../contracts/ERC20PausableUpgradeable.json | 333 + .../contracts/ERC20PermitUpgradeable.json | 418 + .../ERC20PresetFixedSupplyUpgradeable.json | 353 + .../ERC20PresetMinterPauserUpgradeable.json | 687 + .../contracts/ERC20SnapshotUpgradeable.json | 350 + .../build/contracts/ERC20Upgradeable.json | 294 + .../contracts/ERC20VotesCompUpgradeable.json | 724 + .../contracts/ERC20VotesUpgradeable.json | 681 + .../contracts/ERC20WrapperUpgradeable.json | 355 + .../contracts/ERC2771ContextUpgradeable.json | 43 + .../build/contracts/ERC2981Upgradeable.json | 72 + .../build/contracts/ERC4626Upgradeable.json | 684 + .../contracts/ERC721BurnableUpgradeable.json | 367 + .../ERC721ConsecutiveUpgradeable.json | 385 + .../ERC721EnumerableUpgradeable.json | 410 + .../contracts/ERC721HolderUpgradeable.json | 58 + .../contracts/ERC721PausableUpgradeable.json | 393 + ...21PresetMinterPauserAutoIdUpgradeable.json | 766 + .../contracts/ERC721RoyaltyUpgradeable.json | 383 + .../ERC721URIStorageUpgradeable.json | 386 + .../build/contracts/ERC721Upgradeable.json | 354 + .../contracts/ERC721VotesUpgradeable.json | 643 + .../contracts/ERC721WrapperUpgradeable.json | 449 + .../ERC777PresetFixedSupplyUpgradeable.json | 612 + .../build/contracts/ERC777Upgradeable.json | 579 + .../contracts/EnumerableMapUpgradeable.json | 10 + .../contracts/EnumerableSetUpgradeable.json | 10 + .../build/contracts/EscrowUpgradeable.json | 166 + ...GovernorCompatibilityBravoUpgradeable.json | 1331 ++ .../GovernorCountingSimpleUpgradeable.json | 1045 ++ .../GovernorPreventLateQuorumUpgradeable.json | 1080 ++ .../GovernorProposalThresholdUpgradeable.json | 1016 ++ .../GovernorSettingsUpgradeable.json | 1112 ++ .../GovernorTimelockCompoundUpgradeable.json | 1140 ++ .../GovernorTimelockControlUpgradeable.json | 1133 ++ .../build/contracts/GovernorUpgradeable.json | 1016 ++ .../GovernorVotesCompUpgradeable.json | 1029 ++ ...overnorVotesQuorumFractionUpgradeable.json | 1106 ++ .../contracts/GovernorVotesUpgradeable.json | 1029 ++ .../build/contracts/IAMBUpgradeable.json | 336 + ...ssControlDefaultAdminRulesUpgradeable.json | 355 + .../IAccessControlEnumerableUpgradeable.json | 226 + .../contracts/IAccessControlUpgradeable.json | 183 + .../build/contracts/IArbSysUpgradeable.json | 364 + .../build/contracts/IBeaconUpgradeable.json | 24 + .../build/contracts/IBridgeUpgradeable.json | 538 + .../ICompoundTimelockUpgradeable.json | 424 + .../ICrossDomainMessengerUpgradeable.json | 110 + .../IDelayedMessageProviderUpgradeable.json | 43 + .../IERC1155MetadataURIUpgradeable.json | 323 + .../IERC1155ReceiverUpgradeable.json | 108 + .../build/contracts/IERC1155Upgradeable.json | 304 + .../build/contracts/IERC1271Upgradeable.json | 35 + .../IERC1363ReceiverUpgradeable.json | 45 + .../contracts/IERC1363SpenderUpgradeable.json | 40 + .../build/contracts/IERC1363Upgradeable.json | 382 + .../build/contracts/IERC165Upgradeable.json | 30 + .../IERC1820ImplementerUpgradeable.json | 35 + .../IERC1820RegistryUpgradeable.json | 224 + .../IERC1822ProxiableUpgradeable.json | 24 + .../build/contracts/IERC1967Upgradeable.json | 56 + .../contracts/IERC20MetadataUpgradeable.json | 233 + .../contracts/IERC20PermitUpgradeable.json | 86 + .../build/contracts/IERC20Upgradeable.json | 194 + .../build/contracts/IERC2309Upgradeable.json | 42 + .../build/contracts/IERC2612Upgradeable.json | 86 + .../build/contracts/IERC2981Upgradeable.json | 59 + .../IERC3156FlashBorrowerUpgradeable.json | 50 + .../IERC3156FlashLenderUpgradeable.json | 88 + .../build/contracts/IERC4626Upgradeable.json | 623 + .../build/contracts/IERC4906Upgradeable.json | 328 + .../build/contracts/IERC5267Upgradeable.json | 60 + .../build/contracts/IERC5313Upgradeable.json | 24 + .../build/contracts/IERC5805Upgradeable.json | 219 + .../build/contracts/IERC6372Upgradeable.json | 37 + .../IERC721EnumerableUpgradeable.json | 352 + .../contracts/IERC721MetadataUpgradeable.json | 341 + .../contracts/IERC721ReceiverUpgradeable.json | 45 + .../build/contracts/IERC721Upgradeable.json | 296 + .../IERC777RecipientUpgradeable.json | 49 + .../contracts/IERC777SenderUpgradeable.json | 49 + .../build/contracts/IERC777Upgradeable.json | 402 + .../IFxMessageProcessorUpgradeable.json | 34 + ...GovernorCompatibilityBravoUpgradeable.json | 1014 ++ .../IGovernorTimelockUpgradeable.json | 869 + .../build/contracts/IGovernorUpgradeable.json | 784 + .../build/contracts/IInboxUpgradeable.json | 453 + .../build/contracts/IOutboxUpgradeable.json | 419 + .../build/contracts/IVotesUpgradeable.json | 193 + .../build/contracts/Initializable.json | 24 + .../build/contracts/LibAMBUpgradeable.json | 10 + .../contracts/LibArbitrumL1Upgradeable.json | 10 + .../contracts/LibArbitrumL2Upgradeable.json | 24 + .../contracts/LibOptimismUpgradeable.json | 10 + .../build/contracts/MathUpgradeable.json | 10 + .../contracts/MerkleProofUpgradeable.json | 10 + .../MinimalForwarderUpgradeable.json | 209 + .../build/contracts/MulticallUpgradeable.json | 43 + .../contracts/Ownable2StepUpgradeable.json | 115 + .../build/contracts/OwnableUpgradeable.json | 76 + .../build/contracts/PausableUpgradeable.json | 63 + .../contracts/PaymentSplitterUpgradeable.json | 310 + .../contracts/PullPaymentUpgradeable.json | 56 + .../contracts/ReentrancyGuardUpgradeable.json | 24 + .../contracts/RefundEscrowUpgradeable.json | 244 + .../build/contracts/SafeCastUpgradeable.json | 10 + .../build/contracts/SafeERC20Upgradeable.json | 10 + .../build/contracts/SafeMathUpgradeable.json | 10 + .../contracts/ShortStringsUpgradeable.json | 27 + .../SignatureCheckerUpgradeable.json | 10 + .../contracts/SignedMathUpgradeable.json | 10 + .../contracts/SignedSafeMathUpgradeable.json | 10 + .../contracts/StorageSlotUpgradeable.json | 10 + .../build/contracts/StringsUpgradeable.json | 10 + .../TimelockControllerUpgradeable.json | 887 ++ ...kControllerWith46MigrationUpgradeable.json | 894 ++ .../build/contracts/TimersUpgradeable.json | 10 + .../contracts/TokenTimelockUpgradeable.json | 70 + .../build/contracts/UUPSUpgradeable.json | 113 + .../contracts/VestingWalletUpgradeable.json | 226 + .../build/contracts/VotesUpgradeable.json | 313 + .../CrossChainEnabledUpgradeable.sol | 67 + .../crosschain/README.adoc | 34 + .../amb/CrossChainEnabledAMBUpgradeable.sol | 57 + .../crosschain/amb/LibAMBUpgradeable.sol | 35 + ...CrossChainEnabledArbitrumL1Upgradeable.sol | 52 + ...CrossChainEnabledArbitrumL2Upgradeable.sol | 53 + .../arbitrum/LibArbitrumL1Upgradeable.sol | 42 + .../arbitrum/LibArbitrumL2Upgradeable.sol | 45 + .../crosschain/errorsUpgradeable.sol | 7 + .../CrossChainEnabledOptimismUpgradeable.sol | 49 + .../optimism/LibOptimismUpgradeable.sol | 36 + ...ossChainEnabledPolygonChildUpgradeable.sol | 80 + .../finance/PaymentSplitterUpgradeable.sol | 226 + .../finance/README.adoc | 20 + .../finance/VestingWalletUpgradeable.sol | 159 + .../governance/GovernorUpgradeable.sol | 736 + .../governance/IGovernorUpgradeable.sol | 326 + .../governance/README.adoc | 176 + .../TimelockControllerUpgradeable.sol | 434 + ...ckControllerWith46MigrationUpgradeable.sol | 56 + .../GovernorCompatibilityBravoUpgradeable.sol | 346 + ...IGovernorCompatibilityBravoUpgradeable.sol | 131 + .../GovernorCountingSimpleUpgradeable.sol | 113 + .../GovernorPreventLateQuorumUpgradeable.sol | 117 + .../GovernorProposalThresholdUpgradeable.sol | 36 + .../GovernorSettingsUpgradeable.sol | 122 + .../GovernorTimelockCompoundUpgradeable.sol | 202 + .../GovernorTimelockControlUpgradeable.sol | 178 + .../GovernorVotesCompUpgradeable.sol | 69 + ...GovernorVotesQuorumFractionUpgradeable.sol | 133 + .../extensions/GovernorVotesUpgradeable.sol | 69 + .../IGovernorTimelockUpgradeable.sol | 39 + .../governance/utils/IVotesUpgradeable.sol | 56 + .../governance/utils/VotesUpgradeable.sol | 257 + .../IERC1155MetadataURIUpgradeable.sol | 6 + .../IERC1155ReceiverUpgradeable.sol | 6 + .../interfaces/IERC1155Upgradeable.sol | 6 + .../interfaces/IERC1271Upgradeable.sol | 19 + .../IERC1363ReceiverUpgradeable.sol | 35 + .../interfaces/IERC1363SpenderUpgradeable.sol | 29 + .../interfaces/IERC1363Upgradeable.sol | 80 + .../interfaces/IERC165Upgradeable.sol | 6 + .../IERC1820ImplementerUpgradeable.sol | 6 + .../IERC1820RegistryUpgradeable.sol | 6 + .../interfaces/IERC1967Upgradeable.sol | 26 + .../interfaces/IERC20MetadataUpgradeable.sol | 6 + .../interfaces/IERC20Upgradeable.sol | 6 + .../interfaces/IERC2309Upgradeable.sol | 21 + .../interfaces/IERC2612Upgradeable.sol | 8 + .../interfaces/IERC2981Upgradeable.sol | 25 + .../IERC3156FlashBorrowerUpgradeable.sol | 29 + .../IERC3156FlashLenderUpgradeable.sol | 43 + .../interfaces/IERC3156Upgradeable.sol | 7 + .../interfaces/IERC4626Upgradeable.sol | 232 + .../interfaces/IERC4906Upgradeable.sol | 20 + .../interfaces/IERC5267Upgradeable.sol | 28 + .../interfaces/IERC5313Upgradeable.sol | 18 + .../interfaces/IERC5805Upgradeable.sol | 9 + .../interfaces/IERC6372Upgradeable.sol | 17 + .../IERC721EnumerableUpgradeable.sol | 6 + .../interfaces/IERC721MetadataUpgradeable.sol | 6 + .../interfaces/IERC721ReceiverUpgradeable.sol | 6 + .../interfaces/IERC721Upgradeable.sol | 6 + .../IERC777RecipientUpgradeable.sol | 6 + .../interfaces/IERC777SenderUpgradeable.sol | 6 + .../interfaces/IERC777Upgradeable.sol | 6 + .../interfaces/README.adoc | 73 + .../interfaces/draft-IERC1822Upgradeable.sol | 20 + .../interfaces/draft-IERC2612Upgradeable.sol | 8 + .../metatx/ERC2771ContextUpgradeable.sol | 62 + .../metatx/MinimalForwarderUpgradeable.sol | 84 + .../metatx/README.adoc | 12 + .../package.json | 32 + .../proxy/ClonesUpgradeable.sol | 88 + .../ERC1967/ERC1967UpgradeUpgradeable.sol | 170 + .../proxy/README.adoc | 87 + .../proxy/beacon/IBeaconUpgradeable.sol | 16 + .../proxy/utils/Initializable.sol | 166 + .../proxy/utils/UUPSUpgradeable.sol | 112 + .../security/PausableUpgradeable.sol | 117 + .../security/PullPaymentUpgradeable.sol | 89 + .../security/README.adoc | 20 + .../security/ReentrancyGuardUpgradeable.sol | 89 + .../token/ERC1155/ERC1155Upgradeable.sol | 509 + .../ERC1155/IERC1155ReceiverUpgradeable.sol | 58 + .../token/ERC1155/IERC1155Upgradeable.sol | 119 + .../token/ERC1155/README.adoc | 49 + .../extensions/ERC1155BurnableUpgradeable.sol | 45 + .../extensions/ERC1155PausableUpgradeable.sol | 58 + .../extensions/ERC1155SupplyUpgradeable.sol | 77 + .../ERC1155URIStorageUpgradeable.sol | 78 + .../IERC1155MetadataURIUpgradeable.sol | 22 + .../ERC1155PresetMinterPauserUpgradeable.sol | 131 + .../token/ERC1155/presets/README.md | 1 + .../utils/ERC1155HolderUpgradeable.sol | 49 + .../utils/ERC1155ReceiverUpgradeable.sol | 32 + .../token/ERC20/ERC20Upgradeable.sol | 377 + .../token/ERC20/IERC20Upgradeable.sol | 78 + .../token/ERC20/README.adoc | 80 + .../extensions/ERC20BurnableUpgradeable.sol | 52 + .../extensions/ERC20CappedUpgradeable.sol | 51 + .../extensions/ERC20FlashMintUpgradeable.sol | 122 + .../extensions/ERC20PausableUpgradeable.sol | 49 + .../extensions/ERC20PermitUpgradeable.sol | 109 + .../extensions/ERC20SnapshotUpgradeable.sol | 204 + .../extensions/ERC20VotesCompUpgradeable.sol | 59 + .../extensions/ERC20VotesUpgradeable.sol | 303 + .../extensions/ERC20WrapperUpgradeable.sol | 87 + .../ERC20/extensions/ERC4626Upgradeable.sol | 268 + .../extensions/IERC20MetadataUpgradeable.sol | 28 + .../extensions/IERC20PermitUpgradeable.sol | 90 + .../draft-ERC20PermitUpgradeable.sol | 8 + .../draft-IERC20PermitUpgradeable.sol | 8 + .../ERC20PresetFixedSupplyUpgradeable.sol | 46 + .../ERC20PresetMinterPauserUpgradeable.sol | 111 + .../token/ERC20/presets/README.md | 1 + .../ERC20/utils/SafeERC20Upgradeable.sol | 143 + .../ERC20/utils/TokenTimelockUpgradeable.sol | 86 + .../token/ERC721/ERC721Upgradeable.sol | 478 + .../ERC721/IERC721ReceiverUpgradeable.sol | 27 + .../token/ERC721/IERC721Upgradeable.sol | 132 + .../token/ERC721/README.adoc | 73 + .../extensions/ERC721BurnableUpgradeable.sol | 39 + .../ERC721ConsecutiveUpgradeable.sol | 161 + .../ERC721EnumerableUpgradeable.sol | 172 + .../extensions/ERC721PausableUpgradeable.sol | 54 + .../extensions/ERC721RoyaltyUpgradeable.sol | 51 + .../ERC721URIStorageUpgradeable.sol | 87 + .../extensions/ERC721VotesUpgradeable.sol | 56 + .../extensions/ERC721WrapperUpgradeable.sol | 109 + .../IERC721EnumerableUpgradeable.sol | 29 + .../extensions/IERC721MetadataUpgradeable.sol | 27 + .../draft-ERC721VotesUpgradeable.sol | 9 + ...721PresetMinterPauserAutoIdUpgradeable.sol | 149 + .../token/ERC721/presets/README.md | 1 + .../ERC721/utils/ERC721HolderUpgradeable.sol | 36 + .../token/ERC777/ERC777Upgradeable.sol | 526 + .../ERC777/IERC777RecipientUpgradeable.sol | 35 + .../token/ERC777/IERC777SenderUpgradeable.sol | 35 + .../token/ERC777/IERC777Upgradeable.sol | 200 + .../token/ERC777/README.adoc | 32 + .../ERC777PresetFixedSupplyUpgradeable.sol | 58 + .../token/common/ERC2981Upgradeable.sol | 120 + .../token/common/README.adoc | 10 + .../utils/AddressUpgradeable.sol | 244 + .../utils/ArraysUpgradeable.sol | 105 + .../utils/Base64Upgradeable.sol | 101 + .../utils/CheckpointsUpgradeable.sol | 560 + .../utils/ContextUpgradeable.sol | 41 + .../utils/CountersUpgradeable.sol | 43 + .../utils/Create2Upgradeable.sol | 75 + .../utils/MulticallUpgradeable.sol | 52 + .../utils/README.adoc | 113 + .../utils/ShortStringsUpgradeable.sol | 122 + .../utils/StorageSlotUpgradeable.sol | 138 + .../utils/StringsUpgradeable.sol | 85 + .../utils/TimersUpgradeable.sol | 75 + .../utils/cryptography/ECDSAUpgradeable.sol | 217 + .../utils/cryptography/EIP712Upgradeable.sol | 205 + .../cryptography/MerkleProofUpgradeable.sol | 227 + .../SignatureCheckerUpgradeable.sol | 50 + .../cryptography/draft-EIP712Upgradeable.sol | 8 + .../escrow/ConditionalEscrowUpgradeable.sol | 39 + .../utils/escrow/EscrowUpgradeable.sol | 84 + .../utils/escrow/RefundEscrowUpgradeable.sol | 113 + .../ERC165CheckerUpgradeable.sol | 126 + .../ERC165StorageUpgradeable.sol | 55 + .../utils/introspection/ERC165Upgradeable.sol | 42 + .../ERC1820ImplementerUpgradeable.sol | 56 + .../introspection/IERC165Upgradeable.sol | 25 + .../IERC1820ImplementerUpgradeable.sol | 20 + .../IERC1820RegistryUpgradeable.sol | 112 + .../utils/math/MathUpgradeable.sol | 339 + .../utils/math/SafeCastUpgradeable.sol | 1136 ++ .../utils/math/SafeMathUpgradeable.sol | 215 + .../utils/math/SignedMathUpgradeable.sol | 43 + .../utils/math/SignedSafeMathUpgradeable.sol | 68 + .../utils/structs/BitMapsUpgradeable.sol | 51 + .../structs/DoubleEndedQueueUpgradeable.sol | 170 + .../structs/EnumerableMapUpgradeable.sol | 598 + .../structs/EnumerableSetUpgradeable.sol | 378 + .../vendor/amb/IAMBUpgradeable.sol | 41 + .../vendor/arbitrum/IArbSysUpgradeable.sol | 134 + .../vendor/arbitrum/IBridgeUpgradeable.sol | 102 + .../IDelayedMessageProviderUpgradeable.sol | 16 + .../vendor/arbitrum/IInboxUpgradeable.sol | 152 + .../vendor/arbitrum/IOutboxUpgradeable.sol | 117 + .../compound/ICompoundTimelockUpgradeable.sol | 86 + .../vendor/compound/LICENSE | 11 + .../ICrossDomainMessengerUpgradeable.sol | 34 + .../vendor/optimism/LICENSE | 22 + .../IFxMessageProcessorUpgradeable.sol | 7 + .../forge-std-1.16.1/.github/CODEOWNERS | 1 + .../forge-std-1.16.1/.github/dependabot.yml | 8 + .../forge-std-1.16.1/.github/workflows/ci.yml | 163 + .../.github/workflows/sync.yml | 36 + dependencies/forge-std-1.16.1/.gitignore | 4 + dependencies/forge-std-1.16.1/CONTRIBUTING.md | 193 + dependencies/forge-std-1.16.1/LICENSE-APACHE | 203 + dependencies/forge-std-1.16.1/LICENSE-MIT | 25 + dependencies/forge-std-1.16.1/README.md | 314 + .../forge-std-1.16.1/RELEASE_CHECKLIST.md | 12 + dependencies/forge-std-1.16.1/scripts/vm.py | 636 + dependencies/forge-std-1.16.1/src/Base.sol | 48 + dependencies/forge-std-1.16.1/src/Config.sol | 60 + .../forge-std-1.16.1/src/LibVariable.sol | 477 + dependencies/forge-std-1.16.1/src/Script.sol | 28 + .../forge-std-1.16.1/src/StdAssertions.sol | 1300 ++ .../forge-std-1.16.1/src/StdChains.sol | 310 + .../forge-std-1.16.1/src/StdCheats.sol | 877 + .../forge-std-1.16.1/src/StdConfig.sol | 632 + .../forge-std-1.16.1/src/StdConstants.sol | 30 + .../forge-std-1.16.1/src/StdError.sol | 33 + .../forge-std-1.16.1/src/StdInvariant.sol | 161 + dependencies/forge-std-1.16.1/src/StdJson.sol | 275 + dependencies/forge-std-1.16.1/src/StdMath.sol | 67 + .../forge-std-1.16.1/src/StdStorage.sol | 476 + .../forge-std-1.16.1/src/StdStyle.sol | 333 + dependencies/forge-std-1.16.1/src/StdToml.sol | 275 + .../forge-std-1.16.1/src/StdUtils.sol | 200 + dependencies/forge-std-1.16.1/src/Test.sol | 32 + dependencies/forge-std-1.16.1/src/Vm.sol | 2535 +++ dependencies/forge-std-1.16.1/src/console.sol | 1599 ++ .../forge-std-1.16.1/src/console2.sol | 4 + .../src/interfaces/IERC1155.sol | 105 + .../src/interfaces/IERC165.sol | 12 + .../src/interfaces/IERC20.sol | 43 + .../src/interfaces/IERC4626.sol | 190 + .../src/interfaces/IERC6909.sol | 72 + .../src/interfaces/IERC721.sol | 164 + .../src/interfaces/IERC7540.sol | 145 + .../src/interfaces/IERC7575.sol | 241 + .../src/interfaces/IMulticall3.sol | 68 + .../forge-std-1.16.1/src/safeconsole.sol | 13248 ++++++++++++++++ .../forge-std-1.16.1/test/CommonBase.t.sol | 44 + .../forge-std-1.16.1/test/Config.t.sol | 381 + .../forge-std-1.16.1/test/LibVariable.t.sol | 452 + .../forge-std-1.16.1/test/StdAssertions.t.sol | 141 + .../forge-std-1.16.1/test/StdChains.t.sol | 227 + .../forge-std-1.16.1/test/StdCheats.t.sol | 695 + .../forge-std-1.16.1/test/StdConstants.t.sol | 38 + .../forge-std-1.16.1/test/StdError.t.sol | 119 + .../forge-std-1.16.1/test/StdJson.t.sol | 49 + .../forge-std-1.16.1/test/StdMath.t.sol | 202 + .../forge-std-1.16.1/test/StdStorage.t.sol | 532 + .../forge-std-1.16.1/test/StdStyle.t.sol | 110 + .../forge-std-1.16.1/test/StdToml.t.sol | 49 + .../forge-std-1.16.1/test/StdUtils.t.sol | 342 + dependencies/forge-std-1.16.1/test/Vm.t.sol | 18 + .../test/compilation/CompilationScript.sol | 8 + .../compilation/CompilationScriptBase.sol | 8 + .../test/compilation/CompilationTest.sol | 8 + .../test/compilation/CompilationTestBase.sol | 8 + .../test/fixtures/broadcast.log.json | 187 + .../test/fixtures/config.toml | 81 + .../forge-std-1.16.1/test/fixtures/test.json | 8 + .../forge-std-1.16.1/test/fixtures/test.toml | 6 + dependencies/rain-factory-0.1.1/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + dependencies/rain-factory-0.1.1/README.md | 64 + .../rain-factory-0.1.1/script/Deploy.sol | 40 + .../src/concrete/CloneFactory.sol | 43 + .../src/interface/ICloneableFactoryV2.sol | 32 + .../src/interface/ICloneableV2.sol | 49 + .../deprecated/ICloneableFactoryV1.sol | 28 + .../src/interface/deprecated/ICloneableV1.sol | 27 + .../src/interface/deprecated/IFactory.sol | 36 + .../src/lib/LibCloneFactoryDeploy.sol | 22 + .../test/src/concrete/CloneFactory.t.sol | 113 + .../test/src/lib/LibCloneFactoryDeploy.t.sol | 27 + .../src/lib/LibCloneFactoryDeployProd.t.sol | 50 + .../rain-interpreter-interface-0.1.0/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + .../README.md | 50 + .../src/error/ErrBytecode.sol | 36 + .../src/error/ErrExtern.sol | 13 + .../src/error/ErrIntegrity.sol | 15 + .../src/interface/IInterpreterCallerV4.sol | 50 + .../src/interface/IInterpreterExternV4.sol | 48 + .../src/interface/IInterpreterStoreV3.sol | 66 + .../src/interface/IInterpreterV4.sol | 128 + .../src/interface/IParserPragmaV1.sol | 20 + .../src/interface/IParserV2.sol | 17 + .../src/interface/ISubParserV4.sol | 72 + .../v1/IDebugExpressionDeployerV1.sol | 20 + .../v1/IDebugExpressionDeployerV2.sol | 22 + .../deprecated/v1/IDebugInterpreterV1.sol | 20 + .../deprecated/v1/IDebugInterpreterV2.sol | 38 + .../deprecated/v1/IExpressionDeployerV1.sol | 111 + .../deprecated/v1/IExpressionDeployerV2.sol | 109 + .../deprecated/v1/IExpressionDeployerV3.sol | 141 + .../deprecated/v1/IExpressionDeployerV4.sol | 135 + .../deprecated/v1/IInterpreterCallerV1.sol | 107 + .../deprecated/v1/IInterpreterCallerV2.sol | 93 + .../deprecated/v1/IInterpreterExternV1.sol | 23 + .../deprecated/v1/IInterpreterExternV2.sol | 29 + .../deprecated/v1/IInterpreterStoreV1.sol | 68 + .../deprecated/v1/IInterpreterV1.sol | 151 + .../deprecated/v1/IInterpreterV2.sol | 160 + .../src/interface/deprecated/v1/IParserV1.sol | 30 + .../interface/deprecated/v1/IParserV1View.sol | 21 + .../interface/deprecated/v1/ISubParserV1.sol | 94 + .../interface/deprecated/v1/ISubParserV2.sol | 139 + .../deprecated/v2/IInterpreterCallerV3.sol | 50 + .../deprecated/v2/IInterpreterExternV3.sol | 44 + .../deprecated/v2/IInterpreterStoreV2.sol | 66 + .../deprecated/v2/IInterpreterV3.sol | 54 + .../interface/deprecated/v2/ISubParserV3.sol | 95 + .../src/lib/bytecode/LibBytecode.sol | 324 + .../src/lib/caller/LibContext.sol | 224 + .../src/lib/caller/LibEvaluable.sol | 41 + .../src/lib/codegen/LibGenParseMeta.sol | 305 + .../src/lib/ns/LibNamespace.sol | 35 + .../src/lib/parse/LibParseMeta.sol | 187 + .../test/abstract/BytecodeTest.sol | 123 + .../test/lib/bloom/LibBloom.sol | 64 + .../test/lib/bloom/LibBloom.t.sol | 46 + .../test/lib/meta/LibAuthoringMeta.sol | 19 + .../LibBytecode.bytecodeToSources.t.sol | 96 + .../LibBytecode.checkNoOOBPointers.t.sol | 388 + .../bytecode/LibBytecode.sourceCount.t.sol | 26 + .../LibBytecode.sourceInputsOutputs.t.sol | 72 + .../bytecode/LibBytecode.sourceOpsCount.t.sol | 54 + .../bytecode/LibBytecode.sourcePointer.t.sol | 59 + .../LibBytecode.sourceRelativeOffset.t.sol | 80 + .../LibBytecode.sourceStackAllocation.t.sol | 64 + .../test/src/lib/bytecode/LibBytecodeSlow.sol | 63 + .../test/src/lib/caller/LibContext.hash.t.sol | 70 + .../test/src/lib/caller/LibContext.t.sol | 188 + .../test/src/lib/caller/LibContextSlow.sol | 68 + .../test/src/lib/caller/LibEvaluable.t.sol | 95 + .../test/src/lib/caller/LibEvaluableSlow.sol | 31 + .../codegen/LibGenParseMeta.buildMeta.t.sol | 254 + .../LibGenParseMeta.findExpander.t.sol | 89 + .../src/lib/codegen/LibGenParseMetaSlow.sol | 36 + .../test/src/lib/ns/LibNamespace.t.sol | 39 + .../test/src/lib/ns/LibNamespaceSlow.sol | 19 + .../lib/parse/LibParseMeta.lookupWord.t.sol | 267 + .../parse/LibParseMeta.wordBitmapped.t.sol | 37 + .../rain-math-fixedpoint-0.2.0/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + .../rain-math-fixedpoint-0.2.0/README.md | 118 + .../rain-math-fixedpoint-0.2.0/REUSE.toml | 23 + .../src/error/ErrParse.sol | 12 + .../src/error/ErrScale.sol | 13 + .../src/lib/FixedPointDecimalConstants.sol | 30 + ...ixedPointDecimalArithmeticOpenZeppelin.sol | 33 + .../src/lib/LibFixedPointDecimalScale.sol | 263 + .../src/lib/LibFixedPointDecimalStrings.sol | 18 + .../src/lib/LibWillOverflow.sol | 119 + .../lib/format/LibFixedPointDecimalFormat.sol | 60 + .../lib/parse/LibFixedPointDecimalParse.sol | 92 + dependencies/rain-solmem-0.1.3/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + dependencies/rain-solmem-0.1.3/README.md | 80 + dependencies/rain-solmem-0.1.3/REUSE.toml | 23 + .../rain-solmem-0.1.3/src/error/ErrBytes.sol | 8 + .../src/error/ErrStackPointer.sol | 10 + .../src/error/ErrUint256Array.sol | 8 + .../rain-solmem-0.1.3/src/lib/LibBytes.sol | 73 + .../src/lib/LibBytes32Array.sol | 382 + .../src/lib/LibBytes32Matrix.sol | 147 + .../rain-solmem-0.1.3/src/lib/LibMemCpy.sol | 43 + .../rain-solmem-0.1.3/src/lib/LibPointer.sol | 155 + .../src/lib/LibStackPointer.sol | 167 + .../src/lib/LibStackSentinel.sol | 164 + .../src/lib/LibUint256Array.sol | 382 + .../src/lib/LibUint256Matrix.sol | 147 + lib/forge-std | 1 - lib/openzeppelin-contracts-upgradeable | 1 - lib/rain.factory | 1 - lib/rain.interpreter.interface | 1 - lib/rain.math.fixedpoint | 1 - lib/rain.solmem | 1 - src/concrete/Flow.sol | 129 +- src/interface/IFlowV5.sol | 2 +- src/interface/IFlowV6.sol | 37 + .../deprecated/v1/IFlowERC1155V1.sol | 2 +- src/interface/deprecated/v1/IFlowERC20V1.sol | 2 +- src/interface/deprecated/v1/IFlowERC721V1.sol | 2 +- src/interface/deprecated/v1/IFlowV1.sol | 2 +- .../deprecated/v2/IFlowERC1155V2.sol | 2 +- src/interface/deprecated/v2/IFlowERC20V2.sol | 2 +- src/interface/deprecated/v2/IFlowERC721V2.sol | 2 +- src/interface/deprecated/v2/IFlowV2.sol | 4 +- .../deprecated/v3/IFlowERC1155V3.sol | 2 +- src/interface/deprecated/v3/IFlowERC20V3.sol | 6 +- src/interface/deprecated/v3/IFlowERC721V3.sol | 2 +- src/interface/deprecated/v3/IFlowV3.sol | 6 +- .../deprecated/v4/IFlowERC1155V4.sol | 4 +- src/interface/deprecated/v4/IFlowERC20V4.sol | 4 +- src/interface/deprecated/v4/IFlowERC721V4.sol | 4 +- src/interface/deprecated/v4/IFlowV4.sol | 4 +- .../deprecated/v5/IFlowERC1155V5.sol | 4 +- src/interface/deprecated/v5/IFlowERC20V5.sol | 4 +- src/interface/deprecated/v5/IFlowERC721V5.sol | 4 +- src/lib/LibFlow.sol | 10 +- 924 files changed, 168102 insertions(+), 132 deletions(-) delete mode 100644 .gitmodules create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/README.md create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/AccessControl.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlDefaultAdminRules.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControl.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlDefaultAdminRules.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlEnumerable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/Ownable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/Ownable2Step.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControl.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlDefaultAdminRules.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlEnumerable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Context.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EIP712.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Burnable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Pausable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Supply.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155URIStorage.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Burnable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20FlashMint.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Pausable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Permit.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Votes.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Wrapper.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2771Context.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC4626.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Burnable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Consecutive.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Enumerable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Pausable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Royalty.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721URIStorage.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Votes.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Wrapper.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorPreventLateQuorum.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorSettings.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockCompound.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockControl.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControl.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlDefaultAdminRules.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlEnumerable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBeacon.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICompoundTimelock.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155MetadataURI.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155Receiver.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1271.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Receiver.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Spender.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC165.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Implementer.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Registry.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1822Proxiable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1967.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Metadata.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Permit.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2309.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2612.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2981.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashBorrower.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashLender.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4626.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4906.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5267.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5313.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5805.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC6372.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Enumerable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Metadata.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Receiver.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Recipient.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Sender.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IVotes.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Multicall.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable2Step.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Pausable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Proxy.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ShortStrings.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Votes.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/finance/VestingWallet.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/TimelockController.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorCountingSimple.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorPreventLateQuorum.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorSettings.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockCompound.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockControl.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotes.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesQuorumFraction.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/utils/IVotes.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/utils/Votes.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1967.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2309.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2981.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashBorrower.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashLender.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4626.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4906.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5267.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5313.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC6372.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC1822.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/package.json create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/Proxy.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/IBeacon.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/UpgradeableBeacon.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/security/Pausable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/security/ReentrancyGuard.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Burnable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Pausable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155URIStorage.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/IERC1155MetadataURI.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Holder.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/IERC20.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20FlashMint.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Pausable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Metadata.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Permit.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Enumerable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Pausable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Wrapper.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Enumerable.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Metadata.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/utils/ERC721Holder.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Recipient.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Sender.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/common/ERC2981.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Context.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Create2.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Multicall.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/ShortStrings.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/StorageSlot.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/EIP712.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Checker.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC165.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Implementer.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Registry.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeCast.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/structs/BitMaps.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/compound/ICompoundTimelock.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol create mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/README.md create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlDefaultAdminRulesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlEnumerableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ContextUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EIP712Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155BurnableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PausableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155URIStorageUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20BurnableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PausableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20WrapperUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2771ContextUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC4626Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721BurnableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721EnumerableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PausableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721URIStorageUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721VotesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721WrapperUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorPreventLateQuorumUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorSettingsUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockCompoundUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockControlUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Initializable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MulticallUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Ownable2StepUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/OwnableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PausableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/UUPSUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VotesUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/VotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/Initializable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PausableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ContextUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/MulticallUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/EIP712Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol create mode 100644 dependencies/forge-std-1.16.1/.github/CODEOWNERS create mode 100644 dependencies/forge-std-1.16.1/.github/dependabot.yml create mode 100644 dependencies/forge-std-1.16.1/.github/workflows/ci.yml create mode 100644 dependencies/forge-std-1.16.1/.github/workflows/sync.yml create mode 100644 dependencies/forge-std-1.16.1/.gitignore create mode 100644 dependencies/forge-std-1.16.1/CONTRIBUTING.md create mode 100644 dependencies/forge-std-1.16.1/LICENSE-APACHE create mode 100644 dependencies/forge-std-1.16.1/LICENSE-MIT create mode 100644 dependencies/forge-std-1.16.1/README.md create mode 100644 dependencies/forge-std-1.16.1/RELEASE_CHECKLIST.md create mode 100644 dependencies/forge-std-1.16.1/scripts/vm.py create mode 100644 dependencies/forge-std-1.16.1/src/Base.sol create mode 100644 dependencies/forge-std-1.16.1/src/Config.sol create mode 100644 dependencies/forge-std-1.16.1/src/LibVariable.sol create mode 100644 dependencies/forge-std-1.16.1/src/Script.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdAssertions.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdChains.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdCheats.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdConfig.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdConstants.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdError.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdInvariant.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdJson.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdMath.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdStorage.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdStyle.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdToml.sol create mode 100644 dependencies/forge-std-1.16.1/src/StdUtils.sol create mode 100644 dependencies/forge-std-1.16.1/src/Test.sol create mode 100644 dependencies/forge-std-1.16.1/src/Vm.sol create mode 100644 dependencies/forge-std-1.16.1/src/console.sol create mode 100644 dependencies/forge-std-1.16.1/src/console2.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC1155.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC165.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC20.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC4626.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC6909.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC721.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC7540.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IERC7575.sol create mode 100644 dependencies/forge-std-1.16.1/src/interfaces/IMulticall3.sol create mode 100644 dependencies/forge-std-1.16.1/src/safeconsole.sol create mode 100644 dependencies/forge-std-1.16.1/test/CommonBase.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/Config.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/LibVariable.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdAssertions.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdChains.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdCheats.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdConstants.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdError.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdJson.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdMath.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdStorage.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdStyle.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdToml.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/StdUtils.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/Vm.t.sol create mode 100644 dependencies/forge-std-1.16.1/test/compilation/CompilationScript.sol create mode 100644 dependencies/forge-std-1.16.1/test/compilation/CompilationScriptBase.sol create mode 100644 dependencies/forge-std-1.16.1/test/compilation/CompilationTest.sol create mode 100644 dependencies/forge-std-1.16.1/test/compilation/CompilationTestBase.sol create mode 100644 dependencies/forge-std-1.16.1/test/fixtures/broadcast.log.json create mode 100644 dependencies/forge-std-1.16.1/test/fixtures/config.toml create mode 100644 dependencies/forge-std-1.16.1/test/fixtures/test.json create mode 100644 dependencies/forge-std-1.16.1/test/fixtures/test.toml create mode 100644 dependencies/rain-factory-0.1.1/LICENSE create mode 100644 dependencies/rain-factory-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-factory-0.1.1/README.md create mode 100644 dependencies/rain-factory-0.1.1/script/Deploy.sol create mode 100644 dependencies/rain-factory-0.1.1/src/concrete/CloneFactory.sol create mode 100644 dependencies/rain-factory-0.1.1/src/interface/ICloneableFactoryV2.sol create mode 100644 dependencies/rain-factory-0.1.1/src/interface/ICloneableV2.sol create mode 100644 dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableFactoryV1.sol create mode 100644 dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableV1.sol create mode 100644 dependencies/rain-factory-0.1.1/src/interface/deprecated/IFactory.sol create mode 100644 dependencies/rain-factory-0.1.1/src/lib/LibCloneFactoryDeploy.sol create mode 100644 dependencies/rain-factory-0.1.1/test/src/concrete/CloneFactory.t.sol create mode 100644 dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeploy.t.sol create mode 100644 dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeployProd.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/LICENSE create mode 100644 dependencies/rain-interpreter-interface-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-interpreter-interface-0.1.0/README.md create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/error/ErrBytecode.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/error/ErrExtern.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/error/ErrIntegrity.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterCallerV4.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterExternV4.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterStoreV3.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterV4.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserPragmaV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/ISubParserV4.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV3.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV4.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterStoreV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1View.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV1.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterCallerV3.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterExternV3.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterStoreV2.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterV3.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/ISubParserV3.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/lib/bytecode/LibBytecode.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibContext.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibEvaluable.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/lib/codegen/LibGenParseMeta.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/lib/ns/LibNamespace.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/src/lib/parse/LibParseMeta.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/abstract/BytecodeTest.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/lib/meta/LibAuthoringMeta.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.bytecodeToSources.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.checkNoOOBPointers.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceCount.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceInputsOutputs.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceOpsCount.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourcePointer.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceRelativeOffset.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceStackAllocation.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecodeSlow.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.hash.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContextSlow.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluable.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluableSlow.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.buildMeta.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.findExpander.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMetaSlow.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespace.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespaceSlow.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.lookupWord.t.sol create mode 100644 dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.wordBitmapped.t.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/LICENSE create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/README.md create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/REUSE.toml create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrParse.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrScale.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/lib/FixedPointDecimalConstants.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalArithmeticOpenZeppelin.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalScale.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalStrings.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibWillOverflow.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/lib/format/LibFixedPointDecimalFormat.sol create mode 100644 dependencies/rain-math-fixedpoint-0.2.0/src/lib/parse/LibFixedPointDecimalParse.sol create mode 100644 dependencies/rain-solmem-0.1.3/LICENSE create mode 100644 dependencies/rain-solmem-0.1.3/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-solmem-0.1.3/README.md create mode 100644 dependencies/rain-solmem-0.1.3/REUSE.toml create mode 100644 dependencies/rain-solmem-0.1.3/src/error/ErrBytes.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/error/ErrStackPointer.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/error/ErrUint256Array.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibBytes.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Array.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Matrix.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibMemCpy.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibPointer.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibStackPointer.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibStackSentinel.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibUint256Array.sol create mode 100644 dependencies/rain-solmem-0.1.3/src/lib/LibUint256Matrix.sol delete mode 160000 lib/forge-std delete mode 160000 lib/openzeppelin-contracts-upgradeable delete mode 160000 lib/rain.factory delete mode 160000 lib/rain.interpreter.interface delete mode 160000 lib/rain.math.fixedpoint delete mode 160000 lib/rain.solmem create mode 100644 src/interface/IFlowV6.sol diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 07cb22d5..00000000 --- a/.gitmodules +++ /dev/null @@ -1,18 +0,0 @@ -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "lib/rain.math.fixedpoint"] - path = lib/rain.math.fixedpoint - url = https://github.com/rainprotocol/rain.math.fixedpoint -[submodule "lib/rain.factory"] - path = lib/rain.factory - url = https://github.com/rainprotocol/rain.factory -[submodule "lib/openzeppelin-contracts-upgradeable"] - path = lib/openzeppelin-contracts-upgradeable - url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable -[submodule "lib/rain.solmem"] - path = lib/rain.solmem - url = https://github.com/rainprotocol/rain.solmem -[submodule "lib/rain.interpreter.interface"] - path = lib/rain.interpreter.interface - url = https://github.com/rainlanguage/rain.interpreter.interface diff --git a/dependencies/@openzeppelin-contracts-4.9.6/README.md b/dependencies/@openzeppelin-contracts-4.9.6/README.md new file mode 100644 index 00000000..9fc95518 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/README.md @@ -0,0 +1,90 @@ +# OpenZeppelin + +[![NPM Package](https://img.shields.io/npm/v/@openzeppelin/contracts.svg)](https://www.npmjs.org/package/@openzeppelin/contracts) +[![Coverage Status](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts/graph/badge.svg)](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts) +[![GitPOAPs](https://public-api.gitpoap.io/v1/repo/OpenZeppelin/openzeppelin-contracts/badge)](https://www.gitpoap.io/gh/OpenZeppelin/openzeppelin-contracts) +[![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-yellow)](https://docs.openzeppelin.com/contracts) +[![Forum](https://img.shields.io/badge/forum-%F0%9F%92%AC-yellow)](https://docs.openzeppelin.com/contracts) + +**A library for secure smart contract development.** Build on a solid foundation of community-vetted code. + + * Implementations of standards like [ERC20](https://docs.openzeppelin.com/contracts/erc20) and [ERC721](https://docs.openzeppelin.com/contracts/erc721). + * Flexible [role-based permissioning](https://docs.openzeppelin.com/contracts/access-control) scheme. + * Reusable [Solidity components](https://docs.openzeppelin.com/contracts/utilities) to build custom contracts and complex decentralized systems. + +:mage: **Not sure how to get started?** Check out [Contracts Wizard](https://wizard.openzeppelin.com/) — an interactive smart contract generator. + +:building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a secure platform for automating and monitoring your operations. + +## Overview + +### Installation + +``` +$ npm install @openzeppelin/contracts +``` + +OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version. + +An alternative to npm is to use the GitHub repository (`openzeppelin/openzeppelin-contracts`) to retrieve the contracts. When doing this, make sure to specify the tag for a release such as `v4.5.0`, instead of using the `master` branch. + +### Usage + +Once installed, you can use the contracts in the library by importing them: + +```solidity +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; + +contract MyCollectible is ERC721 { + constructor() ERC721("MyCollectible", "MCO") { + } +} +``` + +_If you're new to smart contract development, head to [Developing Smart Contracts](https://docs.openzeppelin.com/learn/developing-smart-contracts) to learn about creating a new project and compiling your contracts._ + +To keep your system secure, you should **always** use the installed code as-is, and neither copy-paste it from online sources nor modify it yourself. The library is designed so that only the contracts and functions you use are deployed, so you don't need to worry about it needlessly increasing gas costs. + +## Learn More + +The guides in the [documentation site](https://docs.openzeppelin.com/contracts) will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides: + +* [Access Control](https://docs.openzeppelin.com/contracts/access-control): decide who can perform each of the actions on your system. +* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives, and distribute them via [Crowdsales](https://docs.openzeppelin.com/contracts/crowdsales). +* [Utilities](https://docs.openzeppelin.com/contracts/utilities): generic useful tools including non-overflowing math, signature verification, and trustless paying systems. + +The [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the [community forum](https://forum.openzeppelin.com). + +Finally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/guides), which cover several common use cases and good practices. The following articles provide great background reading, though please note that some of the referenced tools have changed, as the tooling in the ecosystem continues to rapidly evolve. + +* [The Hitchhiker’s Guide to Smart Contracts in Ethereum](https://blog.openzeppelin.com/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) will help you get an overview of the various tools available for smart contract development, and help you set up your environment. +* [A Gentle Introduction to Ethereum Programming, Part 1](https://blog.openzeppelin.com/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094) provides very useful information on an introductory level, including many basic concepts from the Ethereum platform. +* For a more in-depth dive, you may read the guide [Designing the Architecture for Your Ethereum Application](https://blog.openzeppelin.com/designing-the-architecture-for-your-ethereum-application-9cec086f8317), which discusses how to better structure your application and its relationship to the real world. + +## Security + +This project is maintained by [OpenZeppelin](https://openzeppelin.com) with the goal of providing a secure and reliable library of smart contract components for the ecosystem. We address security through risk management in various areas such as engineering and open source best practices, scoping and API design, multi-layered review processes, and incident response preparedness. + +The security policy is detailed in [`SECURITY.md`](./SECURITY.md), and specifies how you can report security vulnerabilities, which versions will receive security patches, and how to stay informed about them. We run a [bug bounty program on Immunefi](https://immunefi.com/bounty/openzeppelin) to reward the responsible disclosure of vulnerabilities. + +The engineering guidelines we follow to promote project quality can be found in [`GUIDELINES.md`](./GUIDELINES.md). + +Past audits can be found in [`audits/`](./audits). + +Smart contracts are a nascent technology and carry a high level of technical risk and uncertainty. Although OpenZeppelin is well known for its security audits, using OpenZeppelin Contracts is not a substitute for a security audit. + +OpenZeppelin Contracts is made available under the MIT License, which disclaims all warranties in relation to the project and which limits the liability of those that contribute and maintain the project, including OpenZeppelin. As set out further in the Terms, you acknowledge that you are solely responsible for any use of OpenZeppelin Contracts and you assume all risks associated with any such use. + +## Contribute + +OpenZeppelin Contracts exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the [contribution guide](CONTRIBUTING.md)! + +## License + +OpenZeppelin Contracts is released under the [MIT License](LICENSE). + +## Legal + +Your use of this Project is governed by the terms found at www.openzeppelin.com/tos (the "Terms"). diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControl.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControl.sol new file mode 100644 index 00000000..0ec6be39 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControl.sol @@ -0,0 +1,248 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControl.sol"; +import "../utils/Context.sol"; +import "../utils/Strings.sol"; +import "../utils/introspection/ERC165.sol"; + +/** + * @dev Contract module that allows children to implement role-based access + * control mechanisms. This is a lightweight version that doesn't allow enumerating role + * members except through off-chain means by accessing the contract event logs. Some + * applications may benefit from on-chain enumerability, for those cases see + * {AccessControlEnumerable}. + * + * Roles are referred to by their `bytes32` identifier. These should be exposed + * in the external API and be unique. The best way to achieve this is by + * using `public constant` hash digests: + * + * ```solidity + * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); + * ``` + * + * Roles can be used to represent a set of permissions. To restrict access to a + * function call, use {hasRole}: + * + * ```solidity + * function foo() public { + * require(hasRole(MY_ROLE, msg.sender)); + * ... + * } + * ``` + * + * Roles can be granted and revoked dynamically via the {grantRole} and + * {revokeRole} functions. Each role has an associated admin role, and only + * accounts that have a role's admin role can call {grantRole} and {revokeRole}. + * + * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means + * that only accounts with this role will be able to grant or revoke other + * roles. More complex role relationships can be created by using + * {_setRoleAdmin}. + * + * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to + * grant and revoke this role. Extra precautions should be taken to secure + * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} + * to enforce additional security measures for this role. + */ +abstract contract AccessControl is Context, IAccessControl, ERC165 { + struct RoleData { + mapping(address => bool) members; + bytes32 adminRole; + } + + mapping(bytes32 => RoleData) private _roles; + + bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; + + /** + * @dev Modifier that checks that an account has a specific role. Reverts + * with a standardized message including the required role. + * + * The format of the revert reason is given by the following regular expression: + * + * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + * + * _Available since v4.1._ + */ + modifier onlyRole(bytes32 role) { + _checkRole(role); + _; + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) public view virtual override returns (bool) { + return _roles[role].members[account]; + } + + /** + * @dev Revert with a standard message if `_msgSender()` is missing `role`. + * Overriding this function changes the behavior of the {onlyRole} modifier. + * + * Format of the revert message is described in {_checkRole}. + * + * _Available since v4.6._ + */ + function _checkRole(bytes32 role) internal view virtual { + _checkRole(role, _msgSender()); + } + + /** + * @dev Revert with a standard message if `account` is missing `role`. + * + * The format of the revert reason is given by the following regular expression: + * + * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + */ + function _checkRole(bytes32 role, address account) internal view virtual { + if (!hasRole(role, account)) { + revert( + string( + abi.encodePacked( + "AccessControl: account ", + Strings.toHexString(account), + " is missing role ", + Strings.toHexString(uint256(role), 32) + ) + ) + ); + } + } + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { + return _roles[role].adminRole; + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + * + * May emit a {RoleGranted} event. + */ + function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + _grantRole(role, account); + } + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + * + * May emit a {RoleRevoked} event. + */ + function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + _revokeRole(role, account); + } + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been revoked `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + * + * May emit a {RoleRevoked} event. + */ + function renounceRole(bytes32 role, address account) public virtual override { + require(account == _msgSender(), "AccessControl: can only renounce roles for self"); + + _revokeRole(role, account); + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. Note that unlike {grantRole}, this function doesn't perform any + * checks on the calling account. + * + * May emit a {RoleGranted} event. + * + * [WARNING] + * ==== + * This function should only be called from the constructor when setting + * up the initial roles for the system. + * + * Using this function in any other way is effectively circumventing the admin + * system imposed by {AccessControl}. + * ==== + * + * NOTE: This function is deprecated in favor of {_grantRole}. + */ + function _setupRole(bytes32 role, address account) internal virtual { + _grantRole(role, account); + } + + /** + * @dev Sets `adminRole` as ``role``'s admin role. + * + * Emits a {RoleAdminChanged} event. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { + bytes32 previousAdminRole = getRoleAdmin(role); + _roles[role].adminRole = adminRole; + emit RoleAdminChanged(role, previousAdminRole, adminRole); + } + + /** + * @dev Grants `role` to `account`. + * + * Internal function without access restriction. + * + * May emit a {RoleGranted} event. + */ + function _grantRole(bytes32 role, address account) internal virtual { + if (!hasRole(role, account)) { + _roles[role].members[account] = true; + emit RoleGranted(role, account, _msgSender()); + } + } + + /** + * @dev Revokes `role` from `account`. + * + * Internal function without access restriction. + * + * May emit a {RoleRevoked} event. + */ + function _revokeRole(bytes32 role, address account) internal virtual { + if (hasRole(role, account)) { + _roles[role].members[account] = false; + emit RoleRevoked(role, account, _msgSender()); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol new file mode 100644 index 00000000..95be5091 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControlCrossChain.sol) + +pragma solidity ^0.8.4; + +import "./AccessControl.sol"; +import "../crosschain/CrossChainEnabled.sol"; + +/** + * @dev An extension to {AccessControl} with support for cross-chain access management. + * For each role, is extension implements an equivalent "aliased" role that is used for + * restricting calls originating from other chains. + * + * For example, if a function `myFunction` is protected by `onlyRole(SOME_ROLE)`, and + * if an address `x` has role `SOME_ROLE`, it would be able to call `myFunction` directly. + * A wallet or contract at the same address on another chain would however not be able + * to call this function. In order to do so, it would require to have the role + * `_crossChainRoleAlias(SOME_ROLE)`. + * + * This aliasing is required to protect against multiple contracts living at the same + * address on different chains but controlled by conflicting entities. + * + * _Available since v4.6._ + */ +abstract contract AccessControlCrossChain is AccessControl, CrossChainEnabled { + bytes32 public constant CROSSCHAIN_ALIAS = keccak256("CROSSCHAIN_ALIAS"); + + /** + * @dev See {AccessControl-_checkRole}. + */ + function _checkRole(bytes32 role) internal view virtual override { + if (_isCrossChain()) { + _checkRole(_crossChainRoleAlias(role), _crossChainSender()); + } else { + super._checkRole(role); + } + } + + /** + * @dev Returns the aliased role corresponding to `role`. + */ + function _crossChainRoleAlias(bytes32 role) internal pure virtual returns (bytes32) { + return role ^ CROSSCHAIN_ALIAS; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlDefaultAdminRules.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlDefaultAdminRules.sol new file mode 100644 index 00000000..9de32002 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlDefaultAdminRules.sol @@ -0,0 +1,383 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControlDefaultAdminRules.sol) + +pragma solidity ^0.8.0; + +import "./AccessControl.sol"; +import "./IAccessControlDefaultAdminRules.sol"; +import "../utils/math/SafeCast.sol"; +import "../interfaces/IERC5313.sol"; + +/** + * @dev Extension of {AccessControl} that allows specifying special rules to manage + * the `DEFAULT_ADMIN_ROLE` holder, which is a sensitive role with special permissions + * over other roles that may potentially have privileged rights in the system. + * + * If a specific role doesn't have an admin role assigned, the holder of the + * `DEFAULT_ADMIN_ROLE` will have the ability to grant it and revoke it. + * + * This contract implements the following risk mitigations on top of {AccessControl}: + * + * * Only one account holds the `DEFAULT_ADMIN_ROLE` since deployment until it's potentially renounced. + * * Enforces a 2-step process to transfer the `DEFAULT_ADMIN_ROLE` to another account. + * * Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted. + * * The delay can be changed by scheduling, see {changeDefaultAdminDelay}. + * * It is not possible to use another role to manage the `DEFAULT_ADMIN_ROLE`. + * + * Example usage: + * + * ```solidity + * contract MyToken is AccessControlDefaultAdminRules { + * constructor() AccessControlDefaultAdminRules( + * 3 days, + * msg.sender // Explicit initial `DEFAULT_ADMIN_ROLE` holder + * ) {} + * } + * ``` + * + * _Available since v4.9._ + */ +abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRules, IERC5313, AccessControl { + // pending admin pair read/written together frequently + address private _pendingDefaultAdmin; + uint48 private _pendingDefaultAdminSchedule; // 0 == unset + + uint48 private _currentDelay; + address private _currentDefaultAdmin; + + // pending delay pair read/written together frequently + uint48 private _pendingDelay; + uint48 private _pendingDelaySchedule; // 0 == unset + + /** + * @dev Sets the initial values for {defaultAdminDelay} and {defaultAdmin} address. + */ + constructor(uint48 initialDelay, address initialDefaultAdmin) { + require(initialDefaultAdmin != address(0), "AccessControl: 0 default admin"); + _currentDelay = initialDelay; + _grantRole(DEFAULT_ADMIN_ROLE, initialDefaultAdmin); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlDefaultAdminRules).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC5313-owner}. + */ + function owner() public view virtual returns (address) { + return defaultAdmin(); + } + + /// + /// Override AccessControl role management + /// + + /** + * @dev See {AccessControl-grantRole}. Reverts for `DEFAULT_ADMIN_ROLE`. + */ + function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { + require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly grant default admin role"); + super.grantRole(role, account); + } + + /** + * @dev See {AccessControl-revokeRole}. Reverts for `DEFAULT_ADMIN_ROLE`. + */ + function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { + require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly revoke default admin role"); + super.revokeRole(role, account); + } + + /** + * @dev See {AccessControl-renounceRole}. + * + * For the `DEFAULT_ADMIN_ROLE`, it only allows renouncing in two steps by first calling + * {beginDefaultAdminTransfer} to the `address(0)`, so it's required that the {pendingDefaultAdmin} schedule + * has also passed when calling this function. + * + * After its execution, it will not be possible to call `onlyRole(DEFAULT_ADMIN_ROLE)` functions. + * + * NOTE: Renouncing `DEFAULT_ADMIN_ROLE` will leave the contract without a {defaultAdmin}, + * thereby disabling any functionality that is only available for it, and the possibility of reassigning a + * non-administrated role. + */ + function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { + if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { + (address newDefaultAdmin, uint48 schedule) = pendingDefaultAdmin(); + require( + newDefaultAdmin == address(0) && _isScheduleSet(schedule) && _hasSchedulePassed(schedule), + "AccessControl: only can renounce in two delayed steps" + ); + delete _pendingDefaultAdminSchedule; + } + super.renounceRole(role, account); + } + + /** + * @dev See {AccessControl-_grantRole}. + * + * For `DEFAULT_ADMIN_ROLE`, it only allows granting if there isn't already a {defaultAdmin} or if the + * role has been previously renounced. + * + * NOTE: Exposing this function through another mechanism may make the `DEFAULT_ADMIN_ROLE` + * assignable again. Make sure to guarantee this is the expected behavior in your implementation. + */ + function _grantRole(bytes32 role, address account) internal virtual override { + if (role == DEFAULT_ADMIN_ROLE) { + require(defaultAdmin() == address(0), "AccessControl: default admin already granted"); + _currentDefaultAdmin = account; + } + super._grantRole(role, account); + } + + /** + * @dev See {AccessControl-_revokeRole}. + */ + function _revokeRole(bytes32 role, address account) internal virtual override { + if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { + delete _currentDefaultAdmin; + } + super._revokeRole(role, account); + } + + /** + * @dev See {AccessControl-_setRoleAdmin}. Reverts for `DEFAULT_ADMIN_ROLE`. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual override { + require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't violate default admin rules"); + super._setRoleAdmin(role, adminRole); + } + + /// + /// AccessControlDefaultAdminRules accessors + /// + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function defaultAdmin() public view virtual returns (address) { + return _currentDefaultAdmin; + } + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function pendingDefaultAdmin() public view virtual returns (address newAdmin, uint48 schedule) { + return (_pendingDefaultAdmin, _pendingDefaultAdminSchedule); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function defaultAdminDelay() public view virtual returns (uint48) { + uint48 schedule = _pendingDelaySchedule; + return (_isScheduleSet(schedule) && _hasSchedulePassed(schedule)) ? _pendingDelay : _currentDelay; + } + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function pendingDefaultAdminDelay() public view virtual returns (uint48 newDelay, uint48 schedule) { + schedule = _pendingDelaySchedule; + return (_isScheduleSet(schedule) && !_hasSchedulePassed(schedule)) ? (_pendingDelay, schedule) : (0, 0); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function defaultAdminDelayIncreaseWait() public view virtual returns (uint48) { + return 5 days; + } + + /// + /// AccessControlDefaultAdminRules public and internal setters for defaultAdmin/pendingDefaultAdmin + /// + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function beginDefaultAdminTransfer(address newAdmin) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _beginDefaultAdminTransfer(newAdmin); + } + + /** + * @dev See {beginDefaultAdminTransfer}. + * + * Internal function without access restriction. + */ + function _beginDefaultAdminTransfer(address newAdmin) internal virtual { + uint48 newSchedule = SafeCast.toUint48(block.timestamp) + defaultAdminDelay(); + _setPendingDefaultAdmin(newAdmin, newSchedule); + emit DefaultAdminTransferScheduled(newAdmin, newSchedule); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function cancelDefaultAdminTransfer() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _cancelDefaultAdminTransfer(); + } + + /** + * @dev See {cancelDefaultAdminTransfer}. + * + * Internal function without access restriction. + */ + function _cancelDefaultAdminTransfer() internal virtual { + _setPendingDefaultAdmin(address(0), 0); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function acceptDefaultAdminTransfer() public virtual { + (address newDefaultAdmin, ) = pendingDefaultAdmin(); + require(_msgSender() == newDefaultAdmin, "AccessControl: pending admin must accept"); + _acceptDefaultAdminTransfer(); + } + + /** + * @dev See {acceptDefaultAdminTransfer}. + * + * Internal function without access restriction. + */ + function _acceptDefaultAdminTransfer() internal virtual { + (address newAdmin, uint48 schedule) = pendingDefaultAdmin(); + require(_isScheduleSet(schedule) && _hasSchedulePassed(schedule), "AccessControl: transfer delay not passed"); + _revokeRole(DEFAULT_ADMIN_ROLE, defaultAdmin()); + _grantRole(DEFAULT_ADMIN_ROLE, newAdmin); + delete _pendingDefaultAdmin; + delete _pendingDefaultAdminSchedule; + } + + /// + /// AccessControlDefaultAdminRules public and internal setters for defaultAdminDelay/pendingDefaultAdminDelay + /// + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function changeDefaultAdminDelay(uint48 newDelay) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _changeDefaultAdminDelay(newDelay); + } + + /** + * @dev See {changeDefaultAdminDelay}. + * + * Internal function without access restriction. + */ + function _changeDefaultAdminDelay(uint48 newDelay) internal virtual { + uint48 newSchedule = SafeCast.toUint48(block.timestamp) + _delayChangeWait(newDelay); + _setPendingDelay(newDelay, newSchedule); + emit DefaultAdminDelayChangeScheduled(newDelay, newSchedule); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRules + */ + function rollbackDefaultAdminDelay() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _rollbackDefaultAdminDelay(); + } + + /** + * @dev See {rollbackDefaultAdminDelay}. + * + * Internal function without access restriction. + */ + function _rollbackDefaultAdminDelay() internal virtual { + _setPendingDelay(0, 0); + } + + /** + * @dev Returns the amount of seconds to wait after the `newDelay` will + * become the new {defaultAdminDelay}. + * + * The value returned guarantees that if the delay is reduced, it will go into effect + * after a wait that honors the previously set delay. + * + * See {defaultAdminDelayIncreaseWait}. + */ + function _delayChangeWait(uint48 newDelay) internal view virtual returns (uint48) { + uint48 currentDelay = defaultAdminDelay(); + + // When increasing the delay, we schedule the delay change to occur after a period of "new delay" has passed, up + // to a maximum given by defaultAdminDelayIncreaseWait, by default 5 days. For example, if increasing from 1 day + // to 3 days, the new delay will come into effect after 3 days. If increasing from 1 day to 10 days, the new + // delay will come into effect after 5 days. The 5 day wait period is intended to be able to fix an error like + // using milliseconds instead of seconds. + // + // When decreasing the delay, we wait the difference between "current delay" and "new delay". This guarantees + // that an admin transfer cannot be made faster than "current delay" at the time the delay change is scheduled. + // For example, if decreasing from 10 days to 3 days, the new delay will come into effect after 7 days. + return + newDelay > currentDelay + ? uint48(Math.min(newDelay, defaultAdminDelayIncreaseWait())) // no need to safecast, both inputs are uint48 + : currentDelay - newDelay; + } + + /// + /// Private setters + /// + + /** + * @dev Setter of the tuple for pending admin and its schedule. + * + * May emit a DefaultAdminTransferCanceled event. + */ + function _setPendingDefaultAdmin(address newAdmin, uint48 newSchedule) private { + (, uint48 oldSchedule) = pendingDefaultAdmin(); + + _pendingDefaultAdmin = newAdmin; + _pendingDefaultAdminSchedule = newSchedule; + + // An `oldSchedule` from `pendingDefaultAdmin()` is only set if it hasn't been accepted. + if (_isScheduleSet(oldSchedule)) { + // Emit for implicit cancellations when another default admin was scheduled. + emit DefaultAdminTransferCanceled(); + } + } + + /** + * @dev Setter of the tuple for pending delay and its schedule. + * + * May emit a DefaultAdminDelayChangeCanceled event. + */ + function _setPendingDelay(uint48 newDelay, uint48 newSchedule) private { + uint48 oldSchedule = _pendingDelaySchedule; + + if (_isScheduleSet(oldSchedule)) { + if (_hasSchedulePassed(oldSchedule)) { + // Materialize a virtual delay + _currentDelay = _pendingDelay; + } else { + // Emit for implicit cancellations when another delay was scheduled. + emit DefaultAdminDelayChangeCanceled(); + } + } + + _pendingDelay = newDelay; + _pendingDelaySchedule = newSchedule; + } + + /// + /// Private helpers + /// + + /** + * @dev Defines if an `schedule` is considered set. For consistency purposes. + */ + function _isScheduleSet(uint48 schedule) private pure returns (bool) { + return schedule != 0; + } + + /** + * @dev Defines if an `schedule` is considered passed. For consistency purposes. + */ + function _hasSchedulePassed(uint48 schedule) private view returns (bool) { + return schedule < block.timestamp; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol new file mode 100644 index 00000000..354e1bed --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControlEnumerable.sol"; +import "./AccessControl.sol"; +import "../utils/structs/EnumerableSet.sol"; + +/** + * @dev Extension of {AccessControl} that allows enumerating the members of each role. + */ +abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { + using EnumerableSet for EnumerableSet.AddressSet; + + mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { + return _roleMembers[role].at(index); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { + return _roleMembers[role].length(); + } + + /** + * @dev Overload {_grantRole} to track enumerable memberships + */ + function _grantRole(bytes32 role, address account) internal virtual override { + super._grantRole(role, account); + _roleMembers[role].add(account); + } + + /** + * @dev Overload {_revokeRole} to track enumerable memberships + */ + function _revokeRole(bytes32 role, address account) internal virtual override { + super._revokeRole(role, account); + _roleMembers[role].remove(account); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControl.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControl.sol new file mode 100644 index 00000000..f773ecc6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControl.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) + +pragma solidity ^0.8.0; + +/** + * @dev External interface of AccessControl declared to support ERC165 detection. + */ +interface IAccessControl { + /** + * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` + * + * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite + * {RoleAdminChanged} not being emitted signaling this. + * + * _Available since v3.1._ + */ + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + + /** + * @dev Emitted when `account` is granted `role`. + * + * `sender` is the account that originated the contract call, an admin role + * bearer except when using {AccessControl-_setupRole}. + */ + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Emitted when `account` is revoked `role`. + * + * `sender` is the account that originated the contract call: + * - if using `revokeRole`, it is the admin role bearer + * - if using `renounceRole`, it is the role bearer (i.e. `account`) + */ + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) external view returns (bool); + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {AccessControl-_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) external view returns (bytes32); + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function grantRole(bytes32 role, address account) external; + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function revokeRole(bytes32 role, address account) external; + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been granted `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + */ + function renounceRole(bytes32 role, address account) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlDefaultAdminRules.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlDefaultAdminRules.sol new file mode 100644 index 00000000..434324e5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlDefaultAdminRules.sol @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/IAccessControlDefaultAdminRules.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControl.sol"; + +/** + * @dev External interface of AccessControlDefaultAdminRules declared to support ERC165 detection. + * + * _Available since v4.9._ + */ +interface IAccessControlDefaultAdminRules is IAccessControl { + /** + * @dev Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next + * address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule` + * passes. + */ + event DefaultAdminTransferScheduled(address indexed newAdmin, uint48 acceptSchedule); + + /** + * @dev Emitted when a {pendingDefaultAdmin} is reset if it was never accepted, regardless of its schedule. + */ + event DefaultAdminTransferCanceled(); + + /** + * @dev Emitted when a {defaultAdminDelay} change is started, setting `newDelay` as the next + * delay to be applied between default admin transfer after `effectSchedule` has passed. + */ + event DefaultAdminDelayChangeScheduled(uint48 newDelay, uint48 effectSchedule); + + /** + * @dev Emitted when a {pendingDefaultAdminDelay} is reset if its schedule didn't pass. + */ + event DefaultAdminDelayChangeCanceled(); + + /** + * @dev Returns the address of the current `DEFAULT_ADMIN_ROLE` holder. + */ + function defaultAdmin() external view returns (address); + + /** + * @dev Returns a tuple of a `newAdmin` and an accept schedule. + * + * After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role + * by calling {acceptDefaultAdminTransfer}, completing the role transfer. + * + * A zero value only in `acceptSchedule` indicates no pending admin transfer. + * + * NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced. + */ + function pendingDefaultAdmin() external view returns (address newAdmin, uint48 acceptSchedule); + + /** + * @dev Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started. + * + * This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set + * the acceptance schedule. + * + * NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this + * function returns the new delay. See {changeDefaultAdminDelay}. + */ + function defaultAdminDelay() external view returns (uint48); + + /** + * @dev Returns a tuple of `newDelay` and an effect schedule. + * + * After the `schedule` passes, the `newDelay` will get into effect immediately for every + * new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}. + * + * A zero value only in `effectSchedule` indicates no pending delay change. + * + * NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay} + * will be zero after the effect schedule. + */ + function pendingDefaultAdminDelay() external view returns (uint48 newDelay, uint48 effectSchedule); + + /** + * @dev Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance + * after the current timestamp plus a {defaultAdminDelay}. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * Emits a DefaultAdminRoleChangeStarted event. + */ + function beginDefaultAdminTransfer(address newAdmin) external; + + /** + * @dev Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. + * + * A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * May emit a DefaultAdminTransferCanceled event. + */ + function cancelDefaultAdminTransfer() external; + + /** + * @dev Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. + * + * After calling the function: + * + * - `DEFAULT_ADMIN_ROLE` should be granted to the caller. + * - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder. + * - {pendingDefaultAdmin} should be reset to zero values. + * + * Requirements: + * + * - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`. + * - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed. + */ + function acceptDefaultAdminTransfer() external; + + /** + * @dev Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting + * into effect after the current timestamp plus a {defaultAdminDelay}. + * + * This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this + * method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay} + * set before calling. + * + * The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then + * calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin} + * complete transfer (including acceptance). + * + * The schedule is designed for two scenarios: + * + * - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by + * {defaultAdminDelayIncreaseWait}. + * - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`. + * + * A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event. + */ + function changeDefaultAdminDelay(uint48 newDelay) external; + + /** + * @dev Cancels a scheduled {defaultAdminDelay} change. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * May emit a DefaultAdminDelayChangeCanceled event. + */ + function rollbackDefaultAdminDelay() external; + + /** + * @dev Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay}) + * to take effect. Default to 5 days. + * + * When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with + * the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds) + * that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can + * be overrode for a custom {defaultAdminDelay} increase scheduling. + * + * IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise, + * there's a risk of setting a high new delay that goes into effect almost immediately without the + * possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds). + */ + function defaultAdminDelayIncreaseWait() external view returns (uint48); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlEnumerable.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlEnumerable.sol new file mode 100644 index 00000000..61aaf57a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlEnumerable.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControl.sol"; + +/** + * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. + */ +interface IAccessControlEnumerable is IAccessControl { + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) external view returns (address); + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) external view returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable.sol new file mode 100644 index 00000000..c181ea1a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) + +pragma solidity ^0.8.0; + +import "../utils/Context.sol"; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor() { + _transferOwnership(_msgSender()); + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + _checkOwner(); + _; + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if the sender is not the owner. + */ + function _checkOwner() internal view virtual { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby disabling any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + _transferOwnership(address(0)); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual { + address oldOwner = _owner; + _owner = newOwner; + emit OwnershipTransferred(oldOwner, newOwner); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable2Step.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable2Step.sol new file mode 100644 index 00000000..e6f69988 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable2Step.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) + +pragma solidity ^0.8.0; + +import "./Ownable.sol"; + +/** + * @dev Contract module which provides access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership} and {acceptOwnership}. + * + * This module is used through inheritance. It will make available all functions + * from parent (Ownable). + */ +abstract contract Ownable2Step is Ownable { + address private _pendingOwner; + + event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Returns the address of the pending owner. + */ + function pendingOwner() public view virtual returns (address) { + return _pendingOwner; + } + + /** + * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual override onlyOwner { + _pendingOwner = newOwner; + emit OwnershipTransferStarted(owner(), newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual override { + delete _pendingOwner; + super._transferOwnership(newOwner); + } + + /** + * @dev The new owner accepts the ownership transfer. + */ + function acceptOwnership() public virtual { + address sender = _msgSender(); + require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); + _transferOwnership(sender); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControl.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControl.json new file mode 100644 index 00000000..61422fed --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControl.json @@ -0,0 +1,215 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControl", + "sourceName": "contracts/access/AccessControl.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json new file mode 100644 index 00000000..42081954 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json @@ -0,0 +1,228 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControlCrossChain", + "sourceName": "contracts/access/AccessControlCrossChain.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "CROSSCHAIN_ALIAS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlDefaultAdminRules.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlDefaultAdminRules.json new file mode 100644 index 00000000..cc736758 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlDefaultAdminRules.json @@ -0,0 +1,400 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControlDefaultAdminRules", + "sourceName": "contracts/access/AccessControlDefaultAdminRules.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminDelayChangeCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "effectSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminDelayChangeScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminTransferCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "acceptSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminTransferScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "beginDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + } + ], + "name": "changeDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelayIncreaseWait", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollbackDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlEnumerable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlEnumerable.json new file mode 100644 index 00000000..896b3c47 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlEnumerable.json @@ -0,0 +1,258 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControlEnumerable", + "sourceName": "contracts/access/AccessControlEnumerable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json new file mode 100644 index 00000000..a7453c45 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Address", + "sourceName": "contracts/utils/Address.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e314a746944a88937ddf36f70d12597ff2704256740dc7ecc710cd852fcdb75664736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e314a746944a88937ddf36f70d12597ff2704256740dc7ecc710cd852fcdb75664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json new file mode 100644 index 00000000..dfc78a14 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Arrays", + "sourceName": "contracts/utils/Arrays.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f639f3917a7155d9dac2ac79c05c349410ec2f1d4c410d25367ff627cf1d3fcf64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f639f3917a7155d9dac2ac79c05c349410ec2f1d4c410d25367ff627cf1d3fcf64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json new file mode 100644 index 00000000..1cf1705f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Base64", + "sourceName": "contracts/utils/Base64.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d7506eece366c56484c97cb077692615d357c16e59ca917c60a4a727a883f39e64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d7506eece366c56484c97cb077692615d357c16e59ca917c60a4a727a883f39e64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json new file mode 100644 index 00000000..1c05fd02 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json @@ -0,0 +1,80 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BeaconProxy", + "sourceName": "contracts/proxy/beacon/BeaconProxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "beacon", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405260405161091438038061091483398101604081905261002291610463565b61002e82826000610035565b505061058d565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610523565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610523565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108ed602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053e565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c95782516000036103c2576001600160a01b0385163b6103c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d3565b6103d383836103db565b949350505050565b8151156103eb5781518083602001fd5b8060405162461bcd60e51b8152600401610169919061055a565b80516001600160a01b038116811461041c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561045257818101518382015260200161043a565b838111156100f95750506000910152565b6000806040838503121561047657600080fd5b61047f83610405565b60208401519092506001600160401b038082111561049c57600080fd5b818501915085601f8301126104b057600080fd5b8151818111156104c2576104c2610421565b604051601f8201601f19908116603f011681019083821181831017156104ea576104ea610421565b8160405282815288602084870101111561050357600080fd5b610514836020830160208801610437565b80955050505050509250929050565b60006020828403121561053557600080fd5b6102c882610405565b60008251610550818460208701610437565b9190910192915050565b6020815260008251806020840152610579816040850160208701610437565b601f01601f19169190910160400192915050565b6103518061059c6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f560279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061024c565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a5565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b60608315610210578251600003610209576001600160a01b0385163b6102095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b508161021a565b61021a8383610222565b949350505050565b8151156102325781518083602001fd5b8060405162461bcd60e51b815260040161020091906102c1565b60006020828403121561025e57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b83811015610290578181015183820152602001610278565b8381111561029f576000848401525b50505050565b600082516102b7818460208701610275565b9190910192915050565b60208152600082518060208401526102e0816040850160208701610275565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e1837ee2a5e3e46daae239d8e33725bdb2ac92b33d5244f5ae7544f9e9658be064736f6c634300080d0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f560279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061024c565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a5565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b60608315610210578251600003610209576001600160a01b0385163b6102095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b508161021a565b61021a8383610222565b949350505050565b8151156102325781518083602001fd5b8060405162461bcd60e51b815260040161020091906102c1565b60006020828403121561025e57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b83811015610290578181015183820152602001610278565b8381111561029f576000848401525b50505050565b600082516102b7818460208701610275565b9190910192915050565b60208152600082518060208401526102e0816040850160208701610275565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e1837ee2a5e3e46daae239d8e33725bdb2ac92b33d5244f5ae7544f9e9658be064736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json new file mode 100644 index 00000000..ab189332 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BitMaps", + "sourceName": "contracts/utils/structs/BitMaps.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208b2adfe7bc81a58a2a40a020a408f71785946afd343d6940099885382a9553b564736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208b2adfe7bc81a58a2a40a020a408f71785946afd343d6940099885382a9553b564736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json new file mode 100644 index 00000000..05930f42 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Checkpoints", + "sourceName": "contracts/utils/Checkpoints.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220617bccba49cb0196ad9890fb1d0c0c2a021397699f8832f9ff7f6826148d784964736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220617bccba49cb0196ad9890fb1d0c0c2a021397699f8832f9ff7f6826148d784964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json new file mode 100644 index 00000000..ea1fd247 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Clones", + "sourceName": "contracts/proxy/Clones.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bfa180daadd7577892dd23a92f94613264d53e31a9dea0fac999d868b9e5972464736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bfa180daadd7577892dd23a92f94613264d53e31a9dea0fac999d868b9e5972464736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json new file mode 100644 index 00000000..2cad814e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json @@ -0,0 +1,165 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ConditionalEscrow", + "sourceName": "contracts/utils/escrow/ConditionalEscrow.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "depositsOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "withdrawalAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Context.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Context.json new file mode 100644 index 00000000..184c2e19 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Context.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Context", + "sourceName": "contracts/utils/Context.sol", + "abi": [], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json new file mode 100644 index 00000000..1a85ce86 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Counters", + "sourceName": "contracts/utils/Counters.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a0f2d371d3902f9f97698ff62207f2be404c635a455462f7975038bd4ff06c2864736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a0f2d371d3902f9f97698ff62207f2be404c635a455462f7975038bd4ff06c2864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json new file mode 100644 index 00000000..52cfa2bc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Create2", + "sourceName": "contracts/utils/Create2.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d29aa4630276ec2d362f51009f42de367181a9e9a4f354f2123aad436a259b2c64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d29aa4630276ec2d362f51009f42de367181a9e9a4f354f2123aad436a259b2c64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json new file mode 100644 index 00000000..94e98be0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabled", + "sourceName": "contracts/crosschain/CrossChainEnabled.sol", + "abi": [], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json new file mode 100644 index 00000000..7fe3848b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json @@ -0,0 +1,22 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledAMB", + "sourceName": "contracts/crosschain/amb/CrossChainEnabledAMB.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "bridge", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "0x60a0604052348015600f57600080fd5b5060405160bc38038060bc833981016040819052602a91603a565b6001600160a01b03166080526068565b600060208284031215604b57600080fd5b81516001600160a01b0381168114606157600080fd5b9392505050565b608051603f607d60003960005050603f6000f3fe6080604052600080fdfea2646970667358221220d3427256f2cc3966b4327f0cdded16f31ea2ff6a19d775d665ac0029b652013b64736f6c634300080d0033", + "deployedBytecode": "0x6080604052600080fdfea2646970667358221220d3427256f2cc3966b4327f0cdded16f31ea2ff6a19d775d665ac0029b652013b64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json new file mode 100644 index 00000000..7230266a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledArbitrumL1", + "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol", + "abi": [], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json new file mode 100644 index 00000000..4a367a58 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledArbitrumL2", + "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol", + "abi": [], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json new file mode 100644 index 00000000..533ab64e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledOptimism", + "sourceName": "contracts/crosschain/optimism/CrossChainEnabledOptimism.sol", + "abi": [], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json new file mode 100644 index 00000000..3cca555f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json @@ -0,0 +1,39 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledPolygonChild", + "sourceName": "contracts/crosschain/polygon/CrossChainEnabledPolygonChild.sol", + "abi": [ + { + "inputs": [], + "name": "NotCrossChainCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rootMessageSender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "processMessageFromRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json new file mode 100644 index 00000000..1d0a264a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json @@ -0,0 +1,21 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "DoubleEndedQueue", + "sourceName": "contracts/utils/structs/DoubleEndedQueue.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfBounds", + "type": "error" + } + ], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220810d96be5927e34adabd6068f9ce6b4ad1f4b37b56f64e58e90015980790a52a64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220810d96be5927e34adabd6068f9ce6b4ad1f4b37b56f64e58e90015980790a52a64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json new file mode 100644 index 00000000..ce3aded8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ECDSA", + "sourceName": "contracts/utils/cryptography/ECDSA.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122000bc104fa1e28b55e0005c74a91dd6b3f202b227c6abc94b269ade7db7eb296d64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122000bc104fa1e28b55e0005c74a91dd6b3f202b227c6abc94b269ade7db7eb296d64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EIP712.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EIP712.json new file mode 100644 index 00000000..df0d3d6e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EIP712.json @@ -0,0 +1,76 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EIP712", + "sourceName": "contracts/utils/cryptography/EIP712.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json new file mode 100644 index 00000000..8486b360 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json @@ -0,0 +1,334 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155", + "sourceName": "contracts/token/ERC1155/ERC1155.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "uri_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620015cb380380620015cb83398101604081905262000034916200011b565b6200003f8162000046565b5062000233565b80516200005b9060029060208401906200005f565b5050565b8280546200006d90620001f7565b90600052602060002090601f016020900481019282620000915760008555620000dc565b82601f10620000ac57805160ff1916838001178555620000dc565b82800160010185558215620000dc579182015b82811115620000dc578251825591602001919060010190620000bf565b50620000ea929150620000ee565b5090565b5b80821115620000ea5760008155600101620000ef565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156200012f57600080fd5b82516001600160401b03808211156200014757600080fd5b818501915085601f8301126200015c57600080fd5b81518181111562000171576200017162000105565b604051601f8201601f19908116603f011681019083821181831017156200019c576200019c62000105565b816040528281528886848701011115620001b557600080fd5b600093505b82841015620001d95784840186015181850187015292850192620001ba565b82841115620001eb5760008684830101525b98975050505050505050565b600181811c908216806200020c57607f821691505b6020821081036200022d57634e487b7160e01b600052602260045260246000fd5b50919050565b61138880620002436000396000f3fe608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b3f565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b82565b610222565b60405190151581526020016100a9565b6100e86100e3366004610ba6565b610274565b6040516100a99190610c0c565b610108610103366004610d6b565b610308565b005b61011d610118366004610e15565b610354565b6040516100a99190610f1b565b610108610138366004610f2e565b61047e565b6100c561014b366004610f6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b610108610187366004610f9d565b61048d565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025357506001600160e01b031982166303a24d0760e21b145b8061026e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461028390611002565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90611002565b80156102fc5780601f106102d1576101008083540402835291602001916102fc565b820191906000526020600020905b8154815290600101906020018083116102df57829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103245750610324853361014b565b6103405760405162461bcd60e51b81526004016101f39061103c565b61034d85858585856104d2565b5050505050565b606081518351146103b95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d5576103d5610c1f565b6040519080825280602002602001820160405280156103fe578160200160208202803683370190505b50905060005b8451811015610476576104498582815181106104225761042261108a565b602002602001015185838151811061043c5761043c61108a565b602002602001015161018c565b82828151811061045b5761045b61108a565b602090810291909101015261046f816110b6565b9050610404565b509392505050565b6104893383836106af565b5050565b6001600160a01b0385163314806104a957506104a9853361014b565b6104c55760405162461bcd60e51b81526004016101f39061103c565b61034d858585858561078f565b81518351146105345760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055a5760405162461bcd60e51b81526004016101f3906110cf565b3360005b845181101561064157600085828151811061057b5761057b61108a565b6020026020010151905060008583815181106105995761059961108a565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156105e95760405162461bcd60e51b81526004016101f390611114565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062690849061115e565b925050819055505050508061063a906110b6565b905061055e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610691929190611176565b60405180910390a46106a78187878787876108b9565b505050505050565b816001600160a01b0316836001600160a01b0316036107225760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107b55760405162461bcd60e51b81526004016101f3906110cf565b3360006107c185610a1d565b905060006107ce85610a1d565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156108115760405162461bcd60e51b81526004016101f390611114565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061084e90849061115e565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108ae848a8a8a8a8a610a68565b505050505050505050565b6001600160a01b0384163b156106a75760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906108fd90899089908890889088906004016111a4565b6020604051808303816000875af1925050508015610938575060408051601f3d908101601f1916820190925261093591810190611202565b60015b6109e45761094461121f565b806308c379a00361097d575061095861123b565b80610963575061097f565b8060405162461bcd60e51b81526004016101f39190610c0c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a5757610a5761108a565b602090810291909101015292915050565b6001600160a01b0384163b156106a75760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610aac908990899088908890889060040161130d565b6020604051808303816000875af1925050508015610ae7575060408051601f3d908101601f19168201909252610ae491810190611202565b60015b610af35761094461121f565b6001600160e01b0319811663f23a6e6160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b80356001600160a01b0381168114610b3a57600080fd5b919050565b60008060408385031215610b5257600080fd5b610b5b83610b23565b946020939093013593505050565b6001600160e01b031981168114610b7f57600080fd5b50565b600060208284031215610b9457600080fd5b8135610b9f81610b69565b9392505050565b600060208284031215610bb857600080fd5b5035919050565b6000815180845260005b81811015610be557602081850181015186830182015201610bc9565b81811115610bf7576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610b9f6020830184610bbf565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c5b57610c5b610c1f565b6040525050565b600067ffffffffffffffff821115610c7c57610c7c610c1f565b5060051b60200190565b600082601f830112610c9757600080fd5b81356020610ca482610c62565b604051610cb18282610c35565b83815260059390931b8501820192828101915086841115610cd157600080fd5b8286015b84811015610cec5780358352918301918301610cd5565b509695505050505050565b600082601f830112610d0857600080fd5b813567ffffffffffffffff811115610d2257610d22610c1f565b604051610d39601f8301601f191660200182610c35565b818152846020838601011115610d4e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8357600080fd5b610d8c86610b23565b9450610d9a60208701610b23565b9350604086013567ffffffffffffffff80821115610db757600080fd5b610dc389838a01610c86565b94506060880135915080821115610dd957600080fd5b610de589838a01610c86565b93506080880135915080821115610dfb57600080fd5b50610e0888828901610cf7565b9150509295509295909350565b60008060408385031215610e2857600080fd5b823567ffffffffffffffff80821115610e4057600080fd5b818501915085601f830112610e5457600080fd5b81356020610e6182610c62565b604051610e6e8282610c35565b83815260059390931b8501820192828101915089841115610e8e57600080fd5b948201945b83861015610eb357610ea486610b23565b82529482019490820190610e93565b96505086013592505080821115610ec957600080fd5b50610ed685828601610c86565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1057815187529582019590820190600101610ef4565b509495945050505050565b602081526000610b9f6020830184610ee0565b60008060408385031215610f4157600080fd5b610f4a83610b23565b915060208301358015158114610f5f57600080fd5b809150509250929050565b60008060408385031215610f7d57600080fd5b610f8683610b23565b9150610f9460208401610b23565b90509250929050565b600080600080600060a08688031215610fb557600080fd5b610fbe86610b23565b9450610fcc60208701610b23565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ff657600080fd5b610e0888828901610cf7565b600181811c9082168061101657607f821691505b60208210810361103657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110c8576110c86110a0565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611171576111716110a0565b500190565b6040815260006111896040830185610ee0565b828103602084015261119b8185610ee0565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d090830186610ee0565b82810360608401526111e28186610ee0565b905082810360808401526111f68185610bbf565b98975050505050505050565b60006020828403121561121457600080fd5b8151610b9f81610b69565b600060033d11156112385760046000803e5060005160e01c5b90565b600060443d10156112495790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561127957505050505090565b82850191508151818111156112915750505050505090565b843d87010160208285010111156112ab5750505050505090565b6112ba60208286010187610c35565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061134790830184610bbf565b97965050505050505056fea26469706673582212202f31a5ed9841bb19ea3048d1ee82155c8ba6a9a7cec7bee194b0e339d260147f64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b3f565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b82565b610222565b60405190151581526020016100a9565b6100e86100e3366004610ba6565b610274565b6040516100a99190610c0c565b610108610103366004610d6b565b610308565b005b61011d610118366004610e15565b610354565b6040516100a99190610f1b565b610108610138366004610f2e565b61047e565b6100c561014b366004610f6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b610108610187366004610f9d565b61048d565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025357506001600160e01b031982166303a24d0760e21b145b8061026e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461028390611002565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90611002565b80156102fc5780601f106102d1576101008083540402835291602001916102fc565b820191906000526020600020905b8154815290600101906020018083116102df57829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103245750610324853361014b565b6103405760405162461bcd60e51b81526004016101f39061103c565b61034d85858585856104d2565b5050505050565b606081518351146103b95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d5576103d5610c1f565b6040519080825280602002602001820160405280156103fe578160200160208202803683370190505b50905060005b8451811015610476576104498582815181106104225761042261108a565b602002602001015185838151811061043c5761043c61108a565b602002602001015161018c565b82828151811061045b5761045b61108a565b602090810291909101015261046f816110b6565b9050610404565b509392505050565b6104893383836106af565b5050565b6001600160a01b0385163314806104a957506104a9853361014b565b6104c55760405162461bcd60e51b81526004016101f39061103c565b61034d858585858561078f565b81518351146105345760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055a5760405162461bcd60e51b81526004016101f3906110cf565b3360005b845181101561064157600085828151811061057b5761057b61108a565b6020026020010151905060008583815181106105995761059961108a565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156105e95760405162461bcd60e51b81526004016101f390611114565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062690849061115e565b925050819055505050508061063a906110b6565b905061055e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610691929190611176565b60405180910390a46106a78187878787876108b9565b505050505050565b816001600160a01b0316836001600160a01b0316036107225760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107b55760405162461bcd60e51b81526004016101f3906110cf565b3360006107c185610a1d565b905060006107ce85610a1d565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156108115760405162461bcd60e51b81526004016101f390611114565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061084e90849061115e565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108ae848a8a8a8a8a610a68565b505050505050505050565b6001600160a01b0384163b156106a75760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906108fd90899089908890889088906004016111a4565b6020604051808303816000875af1925050508015610938575060408051601f3d908101601f1916820190925261093591810190611202565b60015b6109e45761094461121f565b806308c379a00361097d575061095861123b565b80610963575061097f565b8060405162461bcd60e51b81526004016101f39190610c0c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a5757610a5761108a565b602090810291909101015292915050565b6001600160a01b0384163b156106a75760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610aac908990899088908890889060040161130d565b6020604051808303816000875af1925050508015610ae7575060408051601f3d908101601f19168201909252610ae491810190611202565b60015b610af35761094461121f565b6001600160e01b0319811663f23a6e6160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b80356001600160a01b0381168114610b3a57600080fd5b919050565b60008060408385031215610b5257600080fd5b610b5b83610b23565b946020939093013593505050565b6001600160e01b031981168114610b7f57600080fd5b50565b600060208284031215610b9457600080fd5b8135610b9f81610b69565b9392505050565b600060208284031215610bb857600080fd5b5035919050565b6000815180845260005b81811015610be557602081850181015186830182015201610bc9565b81811115610bf7576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610b9f6020830184610bbf565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c5b57610c5b610c1f565b6040525050565b600067ffffffffffffffff821115610c7c57610c7c610c1f565b5060051b60200190565b600082601f830112610c9757600080fd5b81356020610ca482610c62565b604051610cb18282610c35565b83815260059390931b8501820192828101915086841115610cd157600080fd5b8286015b84811015610cec5780358352918301918301610cd5565b509695505050505050565b600082601f830112610d0857600080fd5b813567ffffffffffffffff811115610d2257610d22610c1f565b604051610d39601f8301601f191660200182610c35565b818152846020838601011115610d4e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8357600080fd5b610d8c86610b23565b9450610d9a60208701610b23565b9350604086013567ffffffffffffffff80821115610db757600080fd5b610dc389838a01610c86565b94506060880135915080821115610dd957600080fd5b610de589838a01610c86565b93506080880135915080821115610dfb57600080fd5b50610e0888828901610cf7565b9150509295509295909350565b60008060408385031215610e2857600080fd5b823567ffffffffffffffff80821115610e4057600080fd5b818501915085601f830112610e5457600080fd5b81356020610e6182610c62565b604051610e6e8282610c35565b83815260059390931b8501820192828101915089841115610e8e57600080fd5b948201945b83861015610eb357610ea486610b23565b82529482019490820190610e93565b96505086013592505080821115610ec957600080fd5b50610ed685828601610c86565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1057815187529582019590820190600101610ef4565b509495945050505050565b602081526000610b9f6020830184610ee0565b60008060408385031215610f4157600080fd5b610f4a83610b23565b915060208301358015158114610f5f57600080fd5b809150509250929050565b60008060408385031215610f7d57600080fd5b610f8683610b23565b9150610f9460208401610b23565b90509250929050565b600080600080600060a08688031215610fb557600080fd5b610fbe86610b23565b9450610fcc60208701610b23565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ff657600080fd5b610e0888828901610cf7565b600181811c9082168061101657607f821691505b60208210810361103657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110c8576110c86110a0565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611171576111716110a0565b500190565b6040815260006111896040830185610ee0565b828103602084015261119b8185610ee0565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d090830186610ee0565b82810360608401526111e28186610ee0565b905082810360808401526111f68185610bbf565b98975050505050505050565b60006020828403121561121457600080fd5b8151610b9f81610b69565b600060033d11156112385760046000803e5060005160e01c5b90565b600060443d10156112495790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561127957505050505090565b82850191508151818111156112915750505050505090565b843d87010160208285010111156112ab5750505050505090565b6112ba60208286010187610c35565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061134790830184610bbf565b97965050505050505056fea26469706673582212202f31a5ed9841bb19ea3048d1ee82155c8ba6a9a7cec7bee194b0e339d260147f64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Burnable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Burnable.json new file mode 100644 index 00000000..74455635 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Burnable.json @@ -0,0 +1,369 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155Burnable", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155Burnable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "burnBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json new file mode 100644 index 00000000..f4780bf9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json @@ -0,0 +1,108 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155Holder", + "sourceName": "contracts/token/ERC1155/utils/ERC1155Holder.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506103c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212209e59a98cec3bcfd01c6cf17362bae2a8fe30630fad8342f10ae79d6ad274689d64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212209e59a98cec3bcfd01c6cf17362bae2a8fe30630fad8342f10ae79d6ad274689d64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Pausable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Pausable.json new file mode 100644 index 00000000..6bc8b62d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Pausable.json @@ -0,0 +1,362 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155Pausable", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155Pausable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json new file mode 100644 index 00000000..7c9cb800 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json @@ -0,0 +1,743 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155PresetMinterPauser", + "sourceName": "contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "burnBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mintBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002d6138038062002d618339810160408190526200003491620002e7565b806200004081620000b7565b506005805460ff1916905562000058600033620000d0565b620000847f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000d0565b620000b07f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000d0565b50620003ff565b8051620000cc9060049060208401906200022b565b5050565b620000cc8282620000ed82826200011960201b62000a871760201c565b60008281526001602090815260409091206200011491839062000b0b620001b9821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000cc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001753390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001d0836001600160a01b038416620001d9565b90505b92915050565b60008181526001830160205260408120546200022257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001d3565b506000620001d3565b8280546200023990620003c3565b90600052602060002090601f0160209004810192826200025d5760008555620002a8565b82601f106200027857805160ff1916838001178555620002a8565b82800160010185558215620002a8579182015b82811115620002a85782518255916020019190600101906200028b565b50620002b6929150620002ba565b5090565b5b80821115620002b65760008155600101620002bb565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215620002fb57600080fd5b82516001600160401b03808211156200031357600080fd5b818501915085601f8301126200032857600080fd5b8151818111156200033d576200033d620002d1565b604051601f8201601f19908116603f01168101908382118183101715620003685762000368620002d1565b8160405282815288868487010111156200038157600080fd5b600093505b82841015620003a5578484018601518185018701529285019262000386565b82841115620003b75760008684830101525b98975050505050505050565b600181811c90821680620003d857607f821691505b602082108103620003f957634e487b7160e01b600052602260045260246000fd5b50919050565b612952806200040f6000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c8063731133e9116100de578063ca15c87311610097578063e63ab1e911610071578063e63ab1e914610358578063e985e9c51461037f578063f242432a146103bb578063f5298aca146103ce57600080fd5b8063ca15c8731461030b578063d53913931461031e578063d547741f1461034557600080fd5b8063731133e9146102975780638456cb59146102aa5780639010d07c146102b257806391d14854146102dd578063a217fddf146102f0578063a22cb465146102f857600080fd5b80632f2ff15d116101305780632f2ff15d1461022b57806336568abe1461023e5780633f4ba83a146102515780634e1273f4146102595780635c975abb146102795780636b20c4541461028457600080fd5b8062fdd58e1461017757806301ffc9a71461019d5780630e89341c146101c05780631f7fdffa146101e0578063248a9ca3146101f55780632eb2c2d614610218575b600080fd5b61018a610185366004611ce9565b6103e1565b6040519081526020015b60405180910390f35b6101b06101ab366004611d29565b61047c565b6040519015158152602001610194565b6101d36101ce366004611d46565b610487565b6040516101949190611db7565b6101f36101ee366004611f16565b61051b565b005b61018a610203366004611d46565b60009081526020819052604090206001015490565b6101f3610226366004611faf565b610573565b6101f3610239366004612059565b6105bf565b6101f361024c366004612059565b6105e9565b6101f3610667565b61026c610267366004612085565b61070d565b604051610194919061218b565b60055460ff166101b0565b6101f361029236600461219e565b610837565b6101f36102a5366004612212565b61087a565b6101f36108cc565b6102c56102c0366004612267565b610970565b6040516001600160a01b039091168152602001610194565b6101b06102eb366004612059565b61098f565b61018a600081565b6101f3610306366004612289565b6109b8565b61018a610319366004611d46565b6109c3565b61018a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101f3610353366004612059565b6109da565b61018a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101b061038d3660046122c5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101f36103c93660046122ef565b6109ff565b6101f36103dc366004612354565b610a44565b60006001600160a01b0383166104515760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b600061047682610b20565b60606004805461049690612387565b80601f01602080910402602001604051908101604052809291908181526020018280546104c290612387565b801561050f5780601f106104e45761010080835404028352916020019161050f565b820191906000526020600020905b8154815290600101906020018083116104f257829003601f168201915b50505050509050919050565b6105457f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6105615760405162461bcd60e51b8152600401610448906123c1565b61056d84848484610b60565b50505050565b6001600160a01b03851633148061058f575061058f853361038d565b6105ab5760405162461bcd60e51b81526004016104489061241e565b6105b88585858585610cbb565b5050505050565b6000828152602081905260409020600101546105da81610e68565b6105e48383610e75565b505050565b6001600160a01b03811633146106595760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610448565b6106638282610e97565b5050565b6106917f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6107035760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610448565b61070b610eb9565b565b606081518351146107725760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610448565b6000835167ffffffffffffffff81111561078e5761078e611dca565b6040519080825280602002602001820160405280156107b7578160200160208202803683370190505b50905060005b845181101561082f576108028582815181106107db576107db61246c565b60200260200101518583815181106107f5576107f561246c565b60200260200101516103e1565b8282815181106108145761081461246c565b602090810291909101015261082881612498565b90506107bd565b509392505050565b6001600160a01b0383163314806108535750610853833361038d565b61086f5760405162461bcd60e51b81526004016104489061241e565b6105e4838383610f0b565b6108a47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6108c05760405162461bcd60e51b8152600401610448906123c1565b61056d848484846110aa565b6108f67f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6109685760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610448565b61070b611195565b600082815260016020526040812061098890836111d2565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6106633383836111de565b6000818152600160205260408120610476906112be565b6000828152602081905260409020600101546109f581610e68565b6105e48383610e97565b6001600160a01b038516331480610a1b5750610a1b853361038d565b610a375760405162461bcd60e51b81526004016104489061241e565b6105b885858585856112c8565b6001600160a01b038316331480610a605750610a60833361038d565b610a7c5760405162461bcd60e51b81526004016104489061241e565b6105e4838383611404565b610a91828261098f565b610663576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610ac73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610988836001600160a01b038416611520565b60006001600160e01b03198216636cdb3d1360e11b1480610b5157506001600160e01b031982166303a24d0760e21b145b8061047657506104768261156f565b6001600160a01b038416610b865760405162461bcd60e51b8152600401610448906124b1565b8151835114610ba75760405162461bcd60e51b8152600401610448906124f2565b33610bb781600087878787611594565b60005b8451811015610c5357838181518110610bd557610bd561246c565b602002602001015160026000878481518110610bf357610bf361246c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c3b919061253a565b90915550819050610c4b81612498565b915050610bba565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ca4929190612552565b60405180910390a46105b8816000878787876115a2565b8151835114610cdc5760405162461bcd60e51b8152600401610448906124f2565b6001600160a01b038416610d025760405162461bcd60e51b815260040161044890612580565b33610d11818787878787611594565b60005b8451811015610dfa576000858281518110610d3157610d3161246c565b602002602001015190506000858381518110610d4f57610d4f61246c565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610da05760405162461bcd60e51b8152600401610448906125c5565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610ddf90849061253a565b9250508190555050505080610df390612498565b9050610d14565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e4a929190612552565b60405180910390a4610e608187878787876115a2565b505050505050565b610e7281336116fd565b50565b610e7f8282610a87565b60008281526001602052604090206105e49082610b0b565b610ea18282611756565b60008281526001602052604090206105e490826117bb565b610ec16117d0565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f315760405162461bcd60e51b81526004016104489061260f565b8051825114610f525760405162461bcd60e51b8152600401610448906124f2565b6000339050610f7581856000868660405180602001604052806000815250611594565b60005b835181101561103d576000848281518110610f9557610f9561246c565b602002602001015190506000848381518110610fb357610fb361246c565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156110045760405162461bcd60e51b815260040161044890612652565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061103581612498565b915050610f78565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161108e929190612552565b60405180910390a460408051602081019091526000905261056d565b6001600160a01b0384166110d05760405162461bcd60e51b8152600401610448906124b1565b3360006110dc85611819565b905060006110e985611819565b90506110fa83600089858589611594565b60008681526002602090815260408083206001600160a01b038b1684529091528120805487929061112c90849061253a565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461118c83600089898989611864565b50505050505050565b61119d61191f565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610eee3390565b60006109888383611965565b816001600160a01b0316836001600160a01b0316036112515760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610448565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610476825490565b6001600160a01b0384166112ee5760405162461bcd60e51b815260040161044890612580565b3360006112fa85611819565b9050600061130785611819565b9050611317838989858589611594565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561135a5760405162461bcd60e51b8152600401610448906125c5565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061139990849061253a565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46113f9848a8a8a8a8a611864565b505050505050505050565b6001600160a01b03831661142a5760405162461bcd60e51b81526004016104489061260f565b33600061143684611819565b9050600061144384611819565b905061146383876000858560405180602001604052806000815250611594565b60008581526002602090815260408083206001600160a01b038a168452909152902054848110156114a65760405162461bcd60e51b815260040161044890612652565b60008681526002602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a460408051602081019091526000905261118c565b600081815260018301602052604081205461156757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610476565b506000610476565b60006001600160e01b03198216635a05180f60e01b148061047657506104768261198f565b610e608686868686866119c4565b6001600160a01b0384163b15610e605760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115e69089908990889088908890600401612696565b6020604051808303816000875af1925050508015611621575060408051601f3d908101601f1916820190925261161e918101906126f4565b60015b6116cd5761162d612711565b806308c379a003611666575061164161272d565b8061164c5750611668565b8060405162461bcd60e51b81526004016104489190611db7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610448565b6001600160e01b0319811663bc197c8160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b611707828261098f565b6106635761171481611a2c565b61171f836020611a3e565b6040516020016117309291906127ff565b60408051601f198184030181529082905262461bcd60e51b825261044891600401611db7565b611760828261098f565b15610663576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610988836001600160a01b038416611bda565b60055460ff1661070b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610448565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106118535761185361246c565b602090810291909101015292915050565b6001600160a01b0384163b15610e605760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906118a89089908990889088908890600401612874565b6020604051808303816000875af19250505080156118e3575060408051601f3d908101601f191682019092526118e0918101906126f4565b60015b6118ef5761162d612711565b6001600160e01b0319811663f23a6e6160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b60055460ff161561070b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610448565b600082600001828154811061197c5761197c61246c565b9060005260206000200154905092915050565b60006001600160e01b03198216637965db0b60e01b148061047657506301ffc9a760e01b6001600160e01b0319831614610476565b60055460ff1615610e605760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610448565b60606104766001600160a01b03831660145b60606000611a4d8360026128b9565b611a5890600261253a565b67ffffffffffffffff811115611a7057611a70611dca565b6040519080825280601f01601f191660200182016040528015611a9a576020820181803683370190505b509050600360fc1b81600081518110611ab557611ab561246c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611ae457611ae461246c565b60200101906001600160f81b031916908160001a9053506000611b088460026128b9565b611b1390600161253a565b90505b6001811115611b8b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b4757611b4761246c565b1a60f81b828281518110611b5d57611b5d61246c565b60200101906001600160f81b031916908160001a90535060049490941c93611b84816128d8565b9050611b16565b5083156109885760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610448565b60008181526001830160205260408120548015611cc3576000611bfe6001836128ef565b8554909150600090611c12906001906128ef565b9050818114611c77576000866000018281548110611c3257611c3261246c565b9060005260206000200154905080876000018481548110611c5557611c5561246c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c8857611c88612906565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610476565b6000915050610476565b80356001600160a01b0381168114611ce457600080fd5b919050565b60008060408385031215611cfc57600080fd5b611d0583611ccd565b946020939093013593505050565b6001600160e01b031981168114610e7257600080fd5b600060208284031215611d3b57600080fd5b813561098881611d13565b600060208284031215611d5857600080fd5b5035919050565b60005b83811015611d7a578181015183820152602001611d62565b8381111561056d5750506000910152565b60008151808452611da3816020860160208601611d5f565b601f01601f19169290920160200192915050565b6020815260006109886020830184611d8b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611e0657611e06611dca565b6040525050565b600067ffffffffffffffff821115611e2757611e27611dca565b5060051b60200190565b600082601f830112611e4257600080fd5b81356020611e4f82611e0d565b604051611e5c8282611de0565b83815260059390931b8501820192828101915086841115611e7c57600080fd5b8286015b84811015611e975780358352918301918301611e80565b509695505050505050565b600082601f830112611eb357600080fd5b813567ffffffffffffffff811115611ecd57611ecd611dca565b604051611ee4601f8301601f191660200182611de0565b818152846020838601011115611ef957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611f2c57600080fd5b611f3585611ccd565b9350602085013567ffffffffffffffff80821115611f5257600080fd5b611f5e88838901611e31565b94506040870135915080821115611f7457600080fd5b611f8088838901611e31565b93506060870135915080821115611f9657600080fd5b50611fa387828801611ea2565b91505092959194509250565b600080600080600060a08688031215611fc757600080fd5b611fd086611ccd565b9450611fde60208701611ccd565b9350604086013567ffffffffffffffff80821115611ffb57600080fd5b61200789838a01611e31565b9450606088013591508082111561201d57600080fd5b61202989838a01611e31565b9350608088013591508082111561203f57600080fd5b5061204c88828901611ea2565b9150509295509295909350565b6000806040838503121561206c57600080fd5b8235915061207c60208401611ccd565b90509250929050565b6000806040838503121561209857600080fd5b823567ffffffffffffffff808211156120b057600080fd5b818501915085601f8301126120c457600080fd5b813560206120d182611e0d565b6040516120de8282611de0565b83815260059390931b85018201928281019150898411156120fe57600080fd5b948201945b838610156121235761211486611ccd565b82529482019490820190612103565b9650508601359250508082111561213957600080fd5b5061214685828601611e31565b9150509250929050565b600081518084526020808501945080840160005b8381101561218057815187529582019590820190600101612164565b509495945050505050565b6020815260006109886020830184612150565b6000806000606084860312156121b357600080fd5b6121bc84611ccd565b9250602084013567ffffffffffffffff808211156121d957600080fd5b6121e587838801611e31565b935060408601359150808211156121fb57600080fd5b5061220886828701611e31565b9150509250925092565b6000806000806080858703121561222857600080fd5b61223185611ccd565b93506020850135925060408501359150606085013567ffffffffffffffff81111561225b57600080fd5b611fa387828801611ea2565b6000806040838503121561227a57600080fd5b50508035926020909101359150565b6000806040838503121561229c57600080fd5b6122a583611ccd565b9150602083013580151581146122ba57600080fd5b809150509250929050565b600080604083850312156122d857600080fd5b6122e183611ccd565b915061207c60208401611ccd565b600080600080600060a0868803121561230757600080fd5b61231086611ccd565b945061231e60208701611ccd565b93506040860135925060608601359150608086013567ffffffffffffffff81111561234857600080fd5b61204c88828901611ea2565b60008060006060848603121561236957600080fd5b61237284611ccd565b95602085013595506040909401359392505050565b600181811c9082168061239b57607f821691505b6020821081036123bb57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124aa576124aa612482565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000821982111561254d5761254d612482565b500190565b6040815260006125656040830185612150565b82810360208401526125778185612150565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906126c290830186612150565b82810360608401526126d48186612150565b905082810360808401526126e88185611d8b565b98975050505050505050565b60006020828403121561270657600080fd5b815161098881611d13565b600060033d111561272a5760046000803e5060005160e01c5b90565b600060443d101561273b5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561276b57505050505090565b82850191508151818111156127835750505050505090565b843d870101602082850101111561279d5750505050505090565b6127ac60208286010187611de0565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612837816017850160208801611d5f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612868816028840160208801611d5f565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906128ae90830184611d8b565b979650505050505050565b60008160001904831182151516156128d3576128d3612482565b500290565b6000816128e7576128e7612482565b506000190190565b60008282101561290157612901612482565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201e4cf5e83555322760dcba378b8422e055cfb74fd9f205bcf5d1b2b3554faaf664736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101725760003560e01c8063731133e9116100de578063ca15c87311610097578063e63ab1e911610071578063e63ab1e914610358578063e985e9c51461037f578063f242432a146103bb578063f5298aca146103ce57600080fd5b8063ca15c8731461030b578063d53913931461031e578063d547741f1461034557600080fd5b8063731133e9146102975780638456cb59146102aa5780639010d07c146102b257806391d14854146102dd578063a217fddf146102f0578063a22cb465146102f857600080fd5b80632f2ff15d116101305780632f2ff15d1461022b57806336568abe1461023e5780633f4ba83a146102515780634e1273f4146102595780635c975abb146102795780636b20c4541461028457600080fd5b8062fdd58e1461017757806301ffc9a71461019d5780630e89341c146101c05780631f7fdffa146101e0578063248a9ca3146101f55780632eb2c2d614610218575b600080fd5b61018a610185366004611ce9565b6103e1565b6040519081526020015b60405180910390f35b6101b06101ab366004611d29565b61047c565b6040519015158152602001610194565b6101d36101ce366004611d46565b610487565b6040516101949190611db7565b6101f36101ee366004611f16565b61051b565b005b61018a610203366004611d46565b60009081526020819052604090206001015490565b6101f3610226366004611faf565b610573565b6101f3610239366004612059565b6105bf565b6101f361024c366004612059565b6105e9565b6101f3610667565b61026c610267366004612085565b61070d565b604051610194919061218b565b60055460ff166101b0565b6101f361029236600461219e565b610837565b6101f36102a5366004612212565b61087a565b6101f36108cc565b6102c56102c0366004612267565b610970565b6040516001600160a01b039091168152602001610194565b6101b06102eb366004612059565b61098f565b61018a600081565b6101f3610306366004612289565b6109b8565b61018a610319366004611d46565b6109c3565b61018a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101f3610353366004612059565b6109da565b61018a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101b061038d3660046122c5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101f36103c93660046122ef565b6109ff565b6101f36103dc366004612354565b610a44565b60006001600160a01b0383166104515760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b600061047682610b20565b60606004805461049690612387565b80601f01602080910402602001604051908101604052809291908181526020018280546104c290612387565b801561050f5780601f106104e45761010080835404028352916020019161050f565b820191906000526020600020905b8154815290600101906020018083116104f257829003601f168201915b50505050509050919050565b6105457f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6105615760405162461bcd60e51b8152600401610448906123c1565b61056d84848484610b60565b50505050565b6001600160a01b03851633148061058f575061058f853361038d565b6105ab5760405162461bcd60e51b81526004016104489061241e565b6105b88585858585610cbb565b5050505050565b6000828152602081905260409020600101546105da81610e68565b6105e48383610e75565b505050565b6001600160a01b03811633146106595760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610448565b6106638282610e97565b5050565b6106917f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6107035760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610448565b61070b610eb9565b565b606081518351146107725760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610448565b6000835167ffffffffffffffff81111561078e5761078e611dca565b6040519080825280602002602001820160405280156107b7578160200160208202803683370190505b50905060005b845181101561082f576108028582815181106107db576107db61246c565b60200260200101518583815181106107f5576107f561246c565b60200260200101516103e1565b8282815181106108145761081461246c565b602090810291909101015261082881612498565b90506107bd565b509392505050565b6001600160a01b0383163314806108535750610853833361038d565b61086f5760405162461bcd60e51b81526004016104489061241e565b6105e4838383610f0b565b6108a47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6108c05760405162461bcd60e51b8152600401610448906123c1565b61056d848484846110aa565b6108f67f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6109685760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610448565b61070b611195565b600082815260016020526040812061098890836111d2565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6106633383836111de565b6000818152600160205260408120610476906112be565b6000828152602081905260409020600101546109f581610e68565b6105e48383610e97565b6001600160a01b038516331480610a1b5750610a1b853361038d565b610a375760405162461bcd60e51b81526004016104489061241e565b6105b885858585856112c8565b6001600160a01b038316331480610a605750610a60833361038d565b610a7c5760405162461bcd60e51b81526004016104489061241e565b6105e4838383611404565b610a91828261098f565b610663576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610ac73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610988836001600160a01b038416611520565b60006001600160e01b03198216636cdb3d1360e11b1480610b5157506001600160e01b031982166303a24d0760e21b145b8061047657506104768261156f565b6001600160a01b038416610b865760405162461bcd60e51b8152600401610448906124b1565b8151835114610ba75760405162461bcd60e51b8152600401610448906124f2565b33610bb781600087878787611594565b60005b8451811015610c5357838181518110610bd557610bd561246c565b602002602001015160026000878481518110610bf357610bf361246c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c3b919061253a565b90915550819050610c4b81612498565b915050610bba565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ca4929190612552565b60405180910390a46105b8816000878787876115a2565b8151835114610cdc5760405162461bcd60e51b8152600401610448906124f2565b6001600160a01b038416610d025760405162461bcd60e51b815260040161044890612580565b33610d11818787878787611594565b60005b8451811015610dfa576000858281518110610d3157610d3161246c565b602002602001015190506000858381518110610d4f57610d4f61246c565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610da05760405162461bcd60e51b8152600401610448906125c5565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610ddf90849061253a565b9250508190555050505080610df390612498565b9050610d14565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e4a929190612552565b60405180910390a4610e608187878787876115a2565b505050505050565b610e7281336116fd565b50565b610e7f8282610a87565b60008281526001602052604090206105e49082610b0b565b610ea18282611756565b60008281526001602052604090206105e490826117bb565b610ec16117d0565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f315760405162461bcd60e51b81526004016104489061260f565b8051825114610f525760405162461bcd60e51b8152600401610448906124f2565b6000339050610f7581856000868660405180602001604052806000815250611594565b60005b835181101561103d576000848281518110610f9557610f9561246c565b602002602001015190506000848381518110610fb357610fb361246c565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156110045760405162461bcd60e51b815260040161044890612652565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061103581612498565b915050610f78565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161108e929190612552565b60405180910390a460408051602081019091526000905261056d565b6001600160a01b0384166110d05760405162461bcd60e51b8152600401610448906124b1565b3360006110dc85611819565b905060006110e985611819565b90506110fa83600089858589611594565b60008681526002602090815260408083206001600160a01b038b1684529091528120805487929061112c90849061253a565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461118c83600089898989611864565b50505050505050565b61119d61191f565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610eee3390565b60006109888383611965565b816001600160a01b0316836001600160a01b0316036112515760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610448565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610476825490565b6001600160a01b0384166112ee5760405162461bcd60e51b815260040161044890612580565b3360006112fa85611819565b9050600061130785611819565b9050611317838989858589611594565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561135a5760405162461bcd60e51b8152600401610448906125c5565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061139990849061253a565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46113f9848a8a8a8a8a611864565b505050505050505050565b6001600160a01b03831661142a5760405162461bcd60e51b81526004016104489061260f565b33600061143684611819565b9050600061144384611819565b905061146383876000858560405180602001604052806000815250611594565b60008581526002602090815260408083206001600160a01b038a168452909152902054848110156114a65760405162461bcd60e51b815260040161044890612652565b60008681526002602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a460408051602081019091526000905261118c565b600081815260018301602052604081205461156757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610476565b506000610476565b60006001600160e01b03198216635a05180f60e01b148061047657506104768261198f565b610e608686868686866119c4565b6001600160a01b0384163b15610e605760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115e69089908990889088908890600401612696565b6020604051808303816000875af1925050508015611621575060408051601f3d908101601f1916820190925261161e918101906126f4565b60015b6116cd5761162d612711565b806308c379a003611666575061164161272d565b8061164c5750611668565b8060405162461bcd60e51b81526004016104489190611db7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610448565b6001600160e01b0319811663bc197c8160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b611707828261098f565b6106635761171481611a2c565b61171f836020611a3e565b6040516020016117309291906127ff565b60408051601f198184030181529082905262461bcd60e51b825261044891600401611db7565b611760828261098f565b15610663576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610988836001600160a01b038416611bda565b60055460ff1661070b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610448565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106118535761185361246c565b602090810291909101015292915050565b6001600160a01b0384163b15610e605760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906118a89089908990889088908890600401612874565b6020604051808303816000875af19250505080156118e3575060408051601f3d908101601f191682019092526118e0918101906126f4565b60015b6118ef5761162d612711565b6001600160e01b0319811663f23a6e6160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b60055460ff161561070b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610448565b600082600001828154811061197c5761197c61246c565b9060005260206000200154905092915050565b60006001600160e01b03198216637965db0b60e01b148061047657506301ffc9a760e01b6001600160e01b0319831614610476565b60055460ff1615610e605760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610448565b60606104766001600160a01b03831660145b60606000611a4d8360026128b9565b611a5890600261253a565b67ffffffffffffffff811115611a7057611a70611dca565b6040519080825280601f01601f191660200182016040528015611a9a576020820181803683370190505b509050600360fc1b81600081518110611ab557611ab561246c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611ae457611ae461246c565b60200101906001600160f81b031916908160001a9053506000611b088460026128b9565b611b1390600161253a565b90505b6001811115611b8b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b4757611b4761246c565b1a60f81b828281518110611b5d57611b5d61246c565b60200101906001600160f81b031916908160001a90535060049490941c93611b84816128d8565b9050611b16565b5083156109885760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610448565b60008181526001830160205260408120548015611cc3576000611bfe6001836128ef565b8554909150600090611c12906001906128ef565b9050818114611c77576000866000018281548110611c3257611c3261246c565b9060005260206000200154905080876000018481548110611c5557611c5561246c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c8857611c88612906565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610476565b6000915050610476565b80356001600160a01b0381168114611ce457600080fd5b919050565b60008060408385031215611cfc57600080fd5b611d0583611ccd565b946020939093013593505050565b6001600160e01b031981168114610e7257600080fd5b600060208284031215611d3b57600080fd5b813561098881611d13565b600060208284031215611d5857600080fd5b5035919050565b60005b83811015611d7a578181015183820152602001611d62565b8381111561056d5750506000910152565b60008151808452611da3816020860160208601611d5f565b601f01601f19169290920160200192915050565b6020815260006109886020830184611d8b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611e0657611e06611dca565b6040525050565b600067ffffffffffffffff821115611e2757611e27611dca565b5060051b60200190565b600082601f830112611e4257600080fd5b81356020611e4f82611e0d565b604051611e5c8282611de0565b83815260059390931b8501820192828101915086841115611e7c57600080fd5b8286015b84811015611e975780358352918301918301611e80565b509695505050505050565b600082601f830112611eb357600080fd5b813567ffffffffffffffff811115611ecd57611ecd611dca565b604051611ee4601f8301601f191660200182611de0565b818152846020838601011115611ef957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611f2c57600080fd5b611f3585611ccd565b9350602085013567ffffffffffffffff80821115611f5257600080fd5b611f5e88838901611e31565b94506040870135915080821115611f7457600080fd5b611f8088838901611e31565b93506060870135915080821115611f9657600080fd5b50611fa387828801611ea2565b91505092959194509250565b600080600080600060a08688031215611fc757600080fd5b611fd086611ccd565b9450611fde60208701611ccd565b9350604086013567ffffffffffffffff80821115611ffb57600080fd5b61200789838a01611e31565b9450606088013591508082111561201d57600080fd5b61202989838a01611e31565b9350608088013591508082111561203f57600080fd5b5061204c88828901611ea2565b9150509295509295909350565b6000806040838503121561206c57600080fd5b8235915061207c60208401611ccd565b90509250929050565b6000806040838503121561209857600080fd5b823567ffffffffffffffff808211156120b057600080fd5b818501915085601f8301126120c457600080fd5b813560206120d182611e0d565b6040516120de8282611de0565b83815260059390931b85018201928281019150898411156120fe57600080fd5b948201945b838610156121235761211486611ccd565b82529482019490820190612103565b9650508601359250508082111561213957600080fd5b5061214685828601611e31565b9150509250929050565b600081518084526020808501945080840160005b8381101561218057815187529582019590820190600101612164565b509495945050505050565b6020815260006109886020830184612150565b6000806000606084860312156121b357600080fd5b6121bc84611ccd565b9250602084013567ffffffffffffffff808211156121d957600080fd5b6121e587838801611e31565b935060408601359150808211156121fb57600080fd5b5061220886828701611e31565b9150509250925092565b6000806000806080858703121561222857600080fd5b61223185611ccd565b93506020850135925060408501359150606085013567ffffffffffffffff81111561225b57600080fd5b611fa387828801611ea2565b6000806040838503121561227a57600080fd5b50508035926020909101359150565b6000806040838503121561229c57600080fd5b6122a583611ccd565b9150602083013580151581146122ba57600080fd5b809150509250929050565b600080604083850312156122d857600080fd5b6122e183611ccd565b915061207c60208401611ccd565b600080600080600060a0868803121561230757600080fd5b61231086611ccd565b945061231e60208701611ccd565b93506040860135925060608601359150608086013567ffffffffffffffff81111561234857600080fd5b61204c88828901611ea2565b60008060006060848603121561236957600080fd5b61237284611ccd565b95602085013595506040909401359392505050565b600181811c9082168061239b57607f821691505b6020821081036123bb57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124aa576124aa612482565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000821982111561254d5761254d612482565b500190565b6040815260006125656040830185612150565b82810360208401526125778185612150565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906126c290830186612150565b82810360608401526126d48186612150565b905082810360808401526126e88185611d8b565b98975050505050505050565b60006020828403121561270657600080fd5b815161098881611d13565b600060033d111561272a5760046000803e5060005160e01c5b90565b600060443d101561273b5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561276b57505050505090565b82850191508151818111156127835750505050505090565b843d870101602082850101111561279d5750505050505090565b6127ac60208286010187611de0565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612837816017850160208801611d5f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612868816028840160208801611d5f565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906128ae90830184611d8b565b979650505050505050565b60008160001904831182151516156128d3576128d3612482565b500290565b6000816128e7576128e7612482565b506000190190565b60008282101561290157612901612482565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201e4cf5e83555322760dcba378b8422e055cfb74fd9f205bcf5d1b2b3554faaf664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json new file mode 100644 index 00000000..06e7d48c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json @@ -0,0 +1,108 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155Receiver", + "sourceName": "contracts/token/ERC1155/utils/ERC1155Receiver.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Supply.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Supply.json new file mode 100644 index 00000000..fae95c68 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Supply.json @@ -0,0 +1,361 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155Supply", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155Supply.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "exists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155URIStorage.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155URIStorage.json new file mode 100644 index 00000000..84634ef3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155URIStorage.json @@ -0,0 +1,323 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155URIStorage", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155URIStorage.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165.json new file mode 100644 index 00000000..e1bfd6b4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC165", + "sourceName": "contracts/utils/introspection/ERC165.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json new file mode 100644 index 00000000..33c93ba4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC165Checker", + "sourceName": "contracts/utils/introspection/ERC165Checker.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e6cd488a95ebc63e0022dd975fdc218ce3b7c04e8100e41d5952999f20cb29e164736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e6cd488a95ebc63e0022dd975fdc218ce3b7c04e8100e41d5952999f20cb29e164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json new file mode 100644 index 00000000..73e465ab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC165Storage", + "sourceName": "contracts/utils/introspection/ERC165Storage.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json new file mode 100644 index 00000000..261797e5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1820Implementer", + "sourceName": "contracts/utils/introspection/ERC1820Implementer.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "canImplementInterfaceForAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610114806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a4565b604e565b60405190815260200160405180910390f35b6000828152602081815260408083206001600160a01b038516845290915281205460ff16607b576000609d565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b657600080fd5b8235915060208301356001600160a01b038116811460d357600080fd5b80915050925092905056fea2646970667358221220a5979d2eef8916fee729d245f887d0acab4fec8979c537f4d26331a22797461964736f6c634300080d0033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a4565b604e565b60405190815260200160405180910390f35b6000828152602081815260408083206001600160a01b038516845290915281205460ff16607b576000609d565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b657600080fd5b8235915060208301356001600160a01b038116811460d357600080fd5b80915050925092905056fea2646970667358221220a5979d2eef8916fee729d245f887d0acab4fec8979c537f4d26331a22797461964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json new file mode 100644 index 00000000..8d9f451b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json @@ -0,0 +1,80 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1967Proxy", + "sourceName": "contracts/proxy/ERC1967/ERC1967Proxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405260405161073b38038061073b83398101604081905261002291610321565b61002e82826000610035565b505061043e565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d08383604051806060016040528060278152602001610714602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ef565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b8152600401610148919061040b565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b838111156100645750506000910152565b6000806040838503121561033457600080fd5b82516001600160a01b038116811461034b57600080fd5b60208401519092506001600160401b038082111561036857600080fd5b818501915085601f83011261037c57600080fd5b81518181111561038e5761038e6102df565b604051601f8201601f19908116603f011681019083821181831017156103b6576103b66102df565b816040528281528860208487010111156103cf57600080fd5b6103e08360208301602088016102f5565b80955050505050509250929050565b600082516104018184602087016102f5565b9190910192915050565b602081526000825180602084015261042a8160408501602087016102f5565b601f01601f19169190910160400192915050565b6102c78061044d6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161026b602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061021b565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f9190610237565b60005b838110156102065781810151838201526020016101ee565b83811115610215576000848401525b50505050565b6000825161022d8184602087016101eb565b9190910192915050565b60208152600082518060208401526102568160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122076c43ef7e83f3f5d4e9f67a47bb741a482d559078b0eb91b700166478c77577664736f6c634300080d0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161026b602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061021b565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f9190610237565b60005b838110156102065781810151838201526020016101ee565b83811115610215576000848401525b50505050565b6000825161022d8184602087016101eb565b9190910192915050565b60208152600082518060208401526102568160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122076c43ef7e83f3f5d4e9f67a47bb741a482d559078b0eb91b700166478c77577664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json new file mode 100644 index 00000000..b827aab3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json @@ -0,0 +1,56 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1967Upgrade", + "sourceName": "contracts/proxy/ERC1967/ERC1967Upgrade.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json new file mode 100644 index 00000000..e1f5a7ac --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json @@ -0,0 +1,297 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20", + "sourceName": "contracts/token/ERC20/ERC20.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000aed38038062000aed8339810160408190526200003491620001db565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b50505062000281565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b6020821081036200027b57634e487b7160e01b600052602260045260246000fd5b50919050565b61085c80620002916000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610800565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b6020821081036107fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082157634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212208ea3918651cefe661c47475f544a91c156156839b9d304a33b7b43e599a312a064736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610800565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b6020821081036107fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082157634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212208ea3918651cefe661c47475f544a91c156156839b9d304a33b7b43e599a312a064736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Burnable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Burnable.json new file mode 100644 index 00000000..4ad34d11 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Burnable.json @@ -0,0 +1,312 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Burnable", + "sourceName": "contracts/token/ERC20/extensions/ERC20Burnable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json new file mode 100644 index 00000000..50963fb0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json @@ -0,0 +1,294 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Capped", + "sourceName": "contracts/token/ERC20/extensions/ERC20Capped.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20FlashMint.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20FlashMint.json new file mode 100644 index 00000000..8f36780f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20FlashMint.json @@ -0,0 +1,358 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20FlashMint", + "sourceName": "contracts/token/ERC20/extensions/ERC20FlashMint.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "flashFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC3156FlashBorrower", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flashLoan", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "maxFlashLoan", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Pausable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Pausable.json new file mode 100644 index 00000000..ea866855 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Pausable.json @@ -0,0 +1,320 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Pausable", + "sourceName": "contracts/token/ERC20/extensions/ERC20Pausable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Permit.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Permit.json new file mode 100644 index 00000000..ba51d2a8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Permit.json @@ -0,0 +1,421 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Permit", + "sourceName": "contracts/token/ERC20/extensions/ERC20Permit.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json new file mode 100644 index 00000000..7d889bcb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json @@ -0,0 +1,338 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20PresetFixedSupply", + "sourceName": "contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000dd738038062000dd78339810160408190526200003491620002bb565b8351849084906200004d90600390602085019062000148565b5080516200006390600490602084019062000148565b5050506200007881836200008260201b60201c565b50505050620003b3565b6001600160a01b038216620000dd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000f1919062000350565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b828054620001569062000377565b90600052602060002090601f0160209004810192826200017a5760008555620001c5565b82601f106200019557805160ff1916838001178555620001c5565b82800160010185558215620001c5579182015b82811115620001c5578251825591602001919060010190620001a8565b50620001d3929150620001d7565b5090565b5b80821115620001d35760008155600101620001d8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200021657600080fd5b81516001600160401b0380821115620002335762000233620001ee565b604051601f8301601f19908116603f011681019082821181831017156200025e576200025e620001ee565b816040528381526020925086838588010111156200027b57600080fd5b600091505b838210156200029f578582018301518183018401529082019062000280565b83821115620002b15760008385830101525b9695505050505050565b60008060008060808587031215620002d257600080fd5b84516001600160401b0380821115620002ea57600080fd5b620002f88883890162000204565b955060208701519150808211156200030f57600080fd5b506200031e8782880162000204565b60408701516060880151919550935090506001600160a01b03811681146200034557600080fd5b939692955090935050565b600082198211156200037257634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200038c57607f821691505b602082108103620003ad57634e487b7160e01b600052602260045260246000fd5b50919050565b610a1480620003c36000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806342966c681161008c57806395d89b411161006657806395d89b41146101ad578063a457c2d7146101b5578063a9059cbb146101c8578063dd62ed3e146101db57600080fd5b806342966c681461015c57806370a082311461017157806379cc67901461019a57600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd14610127578063313ce5671461013a5780633950935114610149575b600080fd5b6100dc6101ee565b6040516100e99190610839565b60405180910390f35b6101056101003660046108aa565b610280565b60405190151581526020016100e9565b6002545b6040519081526020016100e9565b6101056101353660046108d4565b610298565b604051601281526020016100e9565b6101056101573660046108aa565b6102bc565b61016f61016a366004610910565b6102de565b005b61011961017f366004610929565b6001600160a01b031660009081526020819052604090205490565b61016f6101a83660046108aa565b6102eb565b6100dc610304565b6101056101c33660046108aa565b610313565b6101056101d63660046108aa565b610393565b6101196101e936600461094b565b6103a1565b6060600380546101fd9061097e565b80601f01602080910402602001604051908101604052809291908181526020018280546102299061097e565b80156102765780601f1061024b57610100808354040283529160200191610276565b820191906000526020600020905b81548152906001019060200180831161025957829003601f168201915b5050505050905090565b60003361028e8185856103cc565b5060019392505050565b6000336102a68582856104f1565b6102b185858561056b565b506001949350505050565b60003361028e8185856102cf83836103a1565b6102d991906109b8565b6103cc565b6102e8338261070f565b50565b6102f68233836104f1565b610300828261070f565b5050565b6060600480546101fd9061097e565b6000338161032182866103a1565b9050838110156103865760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102b182868684036103cc565b60003361028e81858561056b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661042e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161037d565b6001600160a01b03821661048f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161037d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006104fd84846103a1565b9050600019811461056557818110156105585760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161037d565b61056584848484036103cc565b50505050565b6001600160a01b0383166105cf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161037d565b6001600160a01b0382166106315760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161037d565b6001600160a01b038316600090815260208190526040902054818110156106a95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161037d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610565565b6001600160a01b03821661076f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161037d565b6001600160a01b038216600090815260208190526040902054818110156107e35760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161037d565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016104e4565b600060208083528351808285015260005b818110156108665785810183015185820160400152820161084a565b81811115610878576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146108a557600080fd5b919050565b600080604083850312156108bd57600080fd5b6108c68361088e565b946020939093013593505050565b6000806000606084860312156108e957600080fd5b6108f28461088e565b92506109006020850161088e565b9150604084013590509250925092565b60006020828403121561092257600080fd5b5035919050565b60006020828403121561093b57600080fd5b6109448261088e565b9392505050565b6000806040838503121561095e57600080fd5b6109678361088e565b91506109756020840161088e565b90509250929050565b600181811c9082168061099257607f821691505b6020821081036109b257634e487b7160e01b600052602260045260246000fd5b50919050565b600082198211156109d957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220efa1bda0e839940aa63cf7f615e0adac1c5d575a4340ac463f90db7de2dbf48f64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806342966c681161008c57806395d89b411161006657806395d89b41146101ad578063a457c2d7146101b5578063a9059cbb146101c8578063dd62ed3e146101db57600080fd5b806342966c681461015c57806370a082311461017157806379cc67901461019a57600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd14610127578063313ce5671461013a5780633950935114610149575b600080fd5b6100dc6101ee565b6040516100e99190610839565b60405180910390f35b6101056101003660046108aa565b610280565b60405190151581526020016100e9565b6002545b6040519081526020016100e9565b6101056101353660046108d4565b610298565b604051601281526020016100e9565b6101056101573660046108aa565b6102bc565b61016f61016a366004610910565b6102de565b005b61011961017f366004610929565b6001600160a01b031660009081526020819052604090205490565b61016f6101a83660046108aa565b6102eb565b6100dc610304565b6101056101c33660046108aa565b610313565b6101056101d63660046108aa565b610393565b6101196101e936600461094b565b6103a1565b6060600380546101fd9061097e565b80601f01602080910402602001604051908101604052809291908181526020018280546102299061097e565b80156102765780601f1061024b57610100808354040283529160200191610276565b820191906000526020600020905b81548152906001019060200180831161025957829003601f168201915b5050505050905090565b60003361028e8185856103cc565b5060019392505050565b6000336102a68582856104f1565b6102b185858561056b565b506001949350505050565b60003361028e8185856102cf83836103a1565b6102d991906109b8565b6103cc565b6102e8338261070f565b50565b6102f68233836104f1565b610300828261070f565b5050565b6060600480546101fd9061097e565b6000338161032182866103a1565b9050838110156103865760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102b182868684036103cc565b60003361028e81858561056b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661042e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161037d565b6001600160a01b03821661048f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161037d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006104fd84846103a1565b9050600019811461056557818110156105585760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161037d565b61056584848484036103cc565b50505050565b6001600160a01b0383166105cf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161037d565b6001600160a01b0382166106315760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161037d565b6001600160a01b038316600090815260208190526040902054818110156106a95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161037d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610565565b6001600160a01b03821661076f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161037d565b6001600160a01b038216600090815260208190526040902054818110156107e35760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161037d565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016104e4565b600060208083528351808285015260005b818110156108665785810183015185820160400152820161084a565b81811115610878576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146108a557600080fd5b919050565b600080604083850312156108bd57600080fd5b6108c68361088e565b946020939093013593505050565b6000806000606084860312156108e957600080fd5b6108f28461088e565b92506109006020850161088e565b9150604084013590509250925092565b60006020828403121561092257600080fd5b5035919050565b60006020828403121561093b57600080fd5b6109448261088e565b9392505050565b6000806040838503121561095e57600080fd5b6109678361088e565b91506109756020840161088e565b90509250929050565b600181811c9082168061099257607f821691505b6020821081036109b257634e487b7160e01b600052602260045260246000fd5b50919050565b600082198211156109d957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220efa1bda0e839940aa63cf7f615e0adac1c5d575a4340ac463f90db7de2dbf48f64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json new file mode 100644 index 00000000..de11d250 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json @@ -0,0 +1,672 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20PresetMinterPauser", + "sourceName": "contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001d1038038062001d108339810160408190526200003491620003b5565b8151829082906200004d90600590602085019062000242565b5080516200006390600690602084019062000242565b50506007805460ff19169055506200007d600033620000dd565b620000a97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000dd565b620000d57f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000dd565b50506200045b565b620000e98282620000ed565b5050565b6200010482826200013060201b6200093d1760201c565b60008281526001602090815260409091206200012b918390620009c1620001d0821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000e9576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200018c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001e7836001600160a01b038416620001f0565b90505b92915050565b60008181526001830160205260408120546200023957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001ea565b506000620001ea565b82805462000250906200041f565b90600052602060002090601f016020900481019282620002745760008555620002bf565b82601f106200028f57805160ff1916838001178555620002bf565b82800160010185558215620002bf579182015b82811115620002bf578251825591602001919060010190620002a2565b50620002cd929150620002d1565b5090565b5b80821115620002cd5760008155600101620002d2565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200031057600080fd5b81516001600160401b03808211156200032d576200032d620002e8565b604051601f8301601f19908116603f01168101908282118183101715620003585762000358620002e8565b816040528381526020925086838588010111156200037557600080fd5b600091505b838210156200039957858201830151818301840152908201906200037a565b83821115620003ab5760008385830101525b9695505050505050565b60008060408385031215620003c957600080fd5b82516001600160401b0380821115620003e157600080fd5b620003ef86838701620002fe565b935060208501519150808211156200040657600080fd5b506200041585828601620002fe565b9150509250929050565b600181811c908216806200043457607f821691505b6020821081036200045557634e487b7160e01b600052602260045260246000fd5b50919050565b6118a5806200046b6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063a457c2d711610097578063d539139311610071578063d5391393146103af578063d547741f146103d6578063dd62ed3e146103e9578063e63ab1e9146103fc57600080fd5b8063a457c2d714610376578063a9059cbb14610389578063ca15c8731461039c57600080fd5b80639010d07c116100d35780639010d07c1461032857806391d148541461035357806395d89b4114610366578063a217fddf1461036e57600080fd5b806370a08231146102e457806379cc67901461030d5780638456cb591461032057600080fd5b8063313ce567116101665780633f4ba83a116101405780633f4ba83a146102ab57806340c10f19146102b357806342966c68146102c65780635c975abb146102d957600080fd5b8063313ce5671461027657806336568abe14610285578063395093511461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d736600461154c565b610423565b60405190151581526020015b60405180910390f35b6101f961044e565b6040516101e891906115a2565b6101dc6102143660046115f1565b6104e0565b6004545b6040519081526020016101e8565b6101dc61023936600461161b565b6104f8565b61021d61024c366004611657565b60009081526020819052604090206001015490565b61027461026f366004611670565b61051c565b005b604051601281526020016101e8565b610274610293366004611670565b610546565b6101dc6102a63660046115f1565b6105c9565b6102746105eb565b6102746102c13660046115f1565b610691565b6102746102d4366004611657565b610730565b60075460ff166101dc565b61021d6102f236600461169c565b6001600160a01b031660009081526002602052604090205490565b61027461031b3660046115f1565b61073d565b610274610752565b61033b6103363660046116b7565b6107f6565b6040516001600160a01b0390911681526020016101e8565b6101dc610361366004611670565b610815565b6101f961083e565b61021d600081565b6101dc6103843660046115f1565b61084d565b6101dc6103973660046115f1565b6108c8565b61021d6103aa366004611657565b6108d6565b61021d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102746103e4366004611670565b6108ed565b61021d6103f73660046116d9565b610912565b61021d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60006001600160e01b03198216635a05180f60e01b14806104485750610448826109d6565b92915050565b60606005805461045d90611703565b80601f016020809104026020016040519081016040528092919081815260200182805461048990611703565b80156104d65780601f106104ab576101008083540402835291602001916104d6565b820191906000526020600020905b8154815290600101906020018083116104b957829003601f168201915b5050505050905090565b6000336104ee818585610a0b565b5060019392505050565b600033610506858285610b2f565b610511858585610ba9565b506001949350505050565b60008281526020819052604090206001015461053781610d5f565b6105418383610d69565b505050565b6001600160a01b03811633146105bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105c58282610d8b565b5050565b6000336104ee8185856105dc8383610912565b6105e69190611753565b610a0b565b6106157f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6106875760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105b2565b61068f610dad565b565b6106bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610815565b6107265760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105b2565b6105c58282610dff565b61073a3382610ecc565b50565b610748823383610b2f565b6105c58282610ecc565b61077c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6107ee5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105b2565b61068f61100c565b600082815260016020526040812061080e9083611049565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461045d90611703565b6000338161085b8286610912565b9050838110156108bb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105b2565b6105118286868403610a0b565b6000336104ee818585610ba9565b600081815260016020526040812061044890611055565b60008281526020819052604090206001015461090881610d5f565b6105418383610d8b565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6109478282610815565b6105c5576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561097d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061080e836001600160a01b03841661105f565b60006001600160e01b03198216637965db0b60e01b148061044857506301ffc9a760e01b6001600160e01b0319831614610448565b6001600160a01b038316610a6d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b2565b6001600160a01b038216610ace5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b2565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610b3b8484610912565b90506000198114610ba35781811015610b965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105b2565b610ba38484848403610a0b565b50505050565b6001600160a01b038316610c0d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b2565b6001600160a01b038216610c6f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b2565b610c7a8383836110ae565b6001600160a01b03831660009081526002602052604090205481811015610cf25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105b2565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d529086815260200190565b60405180910390a3610ba3565b61073a81336110b9565b610d73828261093d565b600082815260016020526040902061054190826109c1565b610d958282611112565b60008281526001602052604090206105419082611177565b610db561118c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e555760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105b2565b610e61600083836110ae565b8060046000828254610e739190611753565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f2c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105b2565b610f38826000836110ae565b6001600160a01b03821660009081526002602052604090205481811015610fac5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105b2565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6110146111d5565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610de23390565b600061080e838361121b565b6000610448825490565b60008181526001830160205260408120546110a657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610448565b506000610448565b610541838383611245565b6110c38282610815565b6105c5576110d0816112ab565b6110db8360206112bd565b6040516020016110ec92919061176b565b60408051601f198184030181529082905262461bcd60e51b82526105b2916004016115a2565b61111c8282610815565b156105c5576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061080e836001600160a01b038416611459565b60075460ff1661068f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105b2565b60075460ff161561068f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105b2565b6000826000018281548110611232576112326117e0565b9060005260206000200154905092915050565b60075460ff16156105415760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105b2565b60606104486001600160a01b03831660145b606060006112cc8360026117f6565b6112d7906002611753565b67ffffffffffffffff8111156112ef576112ef611815565b6040519080825280601f01601f191660200182016040528015611319576020820181803683370190505b509050600360fc1b81600081518110611334576113346117e0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611363576113636117e0565b60200101906001600160f81b031916908160001a90535060006113878460026117f6565b611392906001611753565b90505b600181111561140a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113c6576113c66117e0565b1a60f81b8282815181106113dc576113dc6117e0565b60200101906001600160f81b031916908160001a90535060049490941c936114038161182b565b9050611395565b50831561080e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b6000818152600183016020526040812054801561154257600061147d600183611842565b855490915060009061149190600190611842565b90508181146114f65760008660000182815481106114b1576114b16117e0565b90600052602060002001549050808760000184815481106114d4576114d46117e0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061150757611507611859565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610448565b6000915050610448565b60006020828403121561155e57600080fd5b81356001600160e01b03198116811461080e57600080fd5b60005b83811015611591578181015183820152602001611579565b83811115610ba35750506000910152565b60208152600082518060208401526115c1816040850160208701611576565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115ec57600080fd5b919050565b6000806040838503121561160457600080fd5b61160d836115d5565b946020939093013593505050565b60008060006060848603121561163057600080fd5b611639846115d5565b9250611647602085016115d5565b9150604084013590509250925092565b60006020828403121561166957600080fd5b5035919050565b6000806040838503121561168357600080fd5b82359150611693602084016115d5565b90509250929050565b6000602082840312156116ae57600080fd5b61080e826115d5565b600080604083850312156116ca57600080fd5b50508035926020909101359150565b600080604083850312156116ec57600080fd5b6116f5836115d5565b9150611693602084016115d5565b600181811c9082168061171757607f821691505b60208210810361173757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117665761176661173d565b500190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117a3816017850160208801611576565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117d4816028840160208801611576565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b60008160001904831182151516156118105761181061173d565b500290565b634e487b7160e01b600052604160045260246000fd5b60008161183a5761183a61173d565b506000190190565b6000828210156118545761185461173d565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206fe5c7cf3a386933ec322d482e544de06b06ae04a5ab2d7be7a5ee80e55a9f6764736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063a457c2d711610097578063d539139311610071578063d5391393146103af578063d547741f146103d6578063dd62ed3e146103e9578063e63ab1e9146103fc57600080fd5b8063a457c2d714610376578063a9059cbb14610389578063ca15c8731461039c57600080fd5b80639010d07c116100d35780639010d07c1461032857806391d148541461035357806395d89b4114610366578063a217fddf1461036e57600080fd5b806370a08231146102e457806379cc67901461030d5780638456cb591461032057600080fd5b8063313ce567116101665780633f4ba83a116101405780633f4ba83a146102ab57806340c10f19146102b357806342966c68146102c65780635c975abb146102d957600080fd5b8063313ce5671461027657806336568abe14610285578063395093511461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d736600461154c565b610423565b60405190151581526020015b60405180910390f35b6101f961044e565b6040516101e891906115a2565b6101dc6102143660046115f1565b6104e0565b6004545b6040519081526020016101e8565b6101dc61023936600461161b565b6104f8565b61021d61024c366004611657565b60009081526020819052604090206001015490565b61027461026f366004611670565b61051c565b005b604051601281526020016101e8565b610274610293366004611670565b610546565b6101dc6102a63660046115f1565b6105c9565b6102746105eb565b6102746102c13660046115f1565b610691565b6102746102d4366004611657565b610730565b60075460ff166101dc565b61021d6102f236600461169c565b6001600160a01b031660009081526002602052604090205490565b61027461031b3660046115f1565b61073d565b610274610752565b61033b6103363660046116b7565b6107f6565b6040516001600160a01b0390911681526020016101e8565b6101dc610361366004611670565b610815565b6101f961083e565b61021d600081565b6101dc6103843660046115f1565b61084d565b6101dc6103973660046115f1565b6108c8565b61021d6103aa366004611657565b6108d6565b61021d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102746103e4366004611670565b6108ed565b61021d6103f73660046116d9565b610912565b61021d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60006001600160e01b03198216635a05180f60e01b14806104485750610448826109d6565b92915050565b60606005805461045d90611703565b80601f016020809104026020016040519081016040528092919081815260200182805461048990611703565b80156104d65780601f106104ab576101008083540402835291602001916104d6565b820191906000526020600020905b8154815290600101906020018083116104b957829003601f168201915b5050505050905090565b6000336104ee818585610a0b565b5060019392505050565b600033610506858285610b2f565b610511858585610ba9565b506001949350505050565b60008281526020819052604090206001015461053781610d5f565b6105418383610d69565b505050565b6001600160a01b03811633146105bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105c58282610d8b565b5050565b6000336104ee8185856105dc8383610912565b6105e69190611753565b610a0b565b6106157f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6106875760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105b2565b61068f610dad565b565b6106bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610815565b6107265760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105b2565b6105c58282610dff565b61073a3382610ecc565b50565b610748823383610b2f565b6105c58282610ecc565b61077c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6107ee5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105b2565b61068f61100c565b600082815260016020526040812061080e9083611049565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461045d90611703565b6000338161085b8286610912565b9050838110156108bb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105b2565b6105118286868403610a0b565b6000336104ee818585610ba9565b600081815260016020526040812061044890611055565b60008281526020819052604090206001015461090881610d5f565b6105418383610d8b565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6109478282610815565b6105c5576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561097d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061080e836001600160a01b03841661105f565b60006001600160e01b03198216637965db0b60e01b148061044857506301ffc9a760e01b6001600160e01b0319831614610448565b6001600160a01b038316610a6d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b2565b6001600160a01b038216610ace5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b2565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610b3b8484610912565b90506000198114610ba35781811015610b965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105b2565b610ba38484848403610a0b565b50505050565b6001600160a01b038316610c0d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b2565b6001600160a01b038216610c6f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b2565b610c7a8383836110ae565b6001600160a01b03831660009081526002602052604090205481811015610cf25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105b2565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d529086815260200190565b60405180910390a3610ba3565b61073a81336110b9565b610d73828261093d565b600082815260016020526040902061054190826109c1565b610d958282611112565b60008281526001602052604090206105419082611177565b610db561118c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e555760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105b2565b610e61600083836110ae565b8060046000828254610e739190611753565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f2c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105b2565b610f38826000836110ae565b6001600160a01b03821660009081526002602052604090205481811015610fac5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105b2565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6110146111d5565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610de23390565b600061080e838361121b565b6000610448825490565b60008181526001830160205260408120546110a657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610448565b506000610448565b610541838383611245565b6110c38282610815565b6105c5576110d0816112ab565b6110db8360206112bd565b6040516020016110ec92919061176b565b60408051601f198184030181529082905262461bcd60e51b82526105b2916004016115a2565b61111c8282610815565b156105c5576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061080e836001600160a01b038416611459565b60075460ff1661068f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105b2565b60075460ff161561068f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105b2565b6000826000018281548110611232576112326117e0565b9060005260206000200154905092915050565b60075460ff16156105415760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105b2565b60606104486001600160a01b03831660145b606060006112cc8360026117f6565b6112d7906002611753565b67ffffffffffffffff8111156112ef576112ef611815565b6040519080825280601f01601f191660200182016040528015611319576020820181803683370190505b509050600360fc1b81600081518110611334576113346117e0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611363576113636117e0565b60200101906001600160f81b031916908160001a90535060006113878460026117f6565b611392906001611753565b90505b600181111561140a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113c6576113c66117e0565b1a60f81b8282815181106113dc576113dc6117e0565b60200101906001600160f81b031916908160001a90535060049490941c936114038161182b565b9050611395565b50831561080e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b6000818152600183016020526040812054801561154257600061147d600183611842565b855490915060009061149190600190611842565b90508181146114f65760008660000182815481106114b1576114b16117e0565b90600052602060002001549050808760000184815481106114d4576114d46117e0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061150757611507611859565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610448565b6000915050610448565b60006020828403121561155e57600080fd5b81356001600160e01b03198116811461080e57600080fd5b60005b83811015611591578181015183820152602001611579565b83811115610ba35750506000910152565b60208152600082518060208401526115c1816040850160208701611576565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115ec57600080fd5b919050565b6000806040838503121561160457600080fd5b61160d836115d5565b946020939093013593505050565b60008060006060848603121561163057600080fd5b611639846115d5565b9250611647602085016115d5565b9150604084013590509250925092565b60006020828403121561166957600080fd5b5035919050565b6000806040838503121561168357600080fd5b82359150611693602084016115d5565b90509250929050565b6000602082840312156116ae57600080fd5b61080e826115d5565b600080604083850312156116ca57600080fd5b50508035926020909101359150565b600080604083850312156116ec57600080fd5b6116f5836115d5565b9150611693602084016115d5565b600181811c9082168061171757607f821691505b60208210810361173757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117665761176661173d565b500190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117a3816017850160208801611576565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117d4816028840160208801611576565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b60008160001904831182151516156118105761181061173d565b500290565b634e487b7160e01b600052604160045260246000fd5b60008161183a5761183a61173d565b506000190190565b6000828210156118545761185461173d565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206fe5c7cf3a386933ec322d482e544de06b06ae04a5ab2d7be7a5ee80e55a9f6764736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json new file mode 100644 index 00000000..9452d974 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json @@ -0,0 +1,337 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Snapshot", + "sourceName": "contracts/token/ERC20/extensions/ERC20Snapshot.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Votes.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Votes.json new file mode 100644 index 00000000..615b6c49 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Votes.json @@ -0,0 +1,684 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Votes", + "sourceName": "contracts/token/ERC20/extensions/ERC20Votes.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20Votes.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json new file mode 100644 index 00000000..e45cebab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json @@ -0,0 +1,727 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20VotesComp", + "sourceName": "contracts/token/ERC20/extensions/ERC20VotesComp.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20Votes.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Wrapper.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Wrapper.json new file mode 100644 index 00000000..7a29c69d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Wrapper.json @@ -0,0 +1,342 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Wrapper", + "sourceName": "contracts/token/ERC20/extensions/ERC20Wrapper.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2771Context.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2771Context.json new file mode 100644 index 00000000..4adaab0b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2771Context.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2771Context", + "sourceName": "contracts/metatx/ERC2771Context.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json new file mode 100644 index 00000000..764cab4d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json @@ -0,0 +1,59 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2981", + "sourceName": "contracts/token/common/ERC2981.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC4626.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC4626.json new file mode 100644 index 00000000..964af1c6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC4626.json @@ -0,0 +1,671 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC4626", + "sourceName": "contracts/token/ERC20/extensions/ERC4626.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "convertToAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "convertToShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json new file mode 100644 index 00000000..789fdef4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json @@ -0,0 +1,357 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721", + "sourceName": "contracts/token/ERC721/ERC721.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b506040516200138c3803806200138c8339810160408190526200003491620001db565b81516200004990600090602085019062000068565b5080516200005f90600190602084019062000068565b50505062000281565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b6020821081036200027b57634e487b7160e01b600052602260045260246000fd5b50919050565b6110fb80620002916000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152600460205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152600260205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526003602052604090205490565b60606001805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152600260205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea26469706673582212203444012838d8a4d94e0f3add6d8bb2fb39f1578fcb587501af32ec2cd13620e164736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152600460205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152600260205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526003602052604090205490565b60606001805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152600260205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea26469706673582212203444012838d8a4d94e0f3add6d8bb2fb39f1578fcb587501af32ec2cd13620e164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Burnable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Burnable.json new file mode 100644 index 00000000..e115eb4f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Burnable.json @@ -0,0 +1,354 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Burnable", + "sourceName": "contracts/token/ERC721/extensions/ERC721Burnable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Consecutive.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Consecutive.json new file mode 100644 index 00000000..f5789cc9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Consecutive.json @@ -0,0 +1,372 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Consecutive", + "sourceName": "contracts/token/ERC721/extensions/ERC721Consecutive.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "toTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAddress", + "type": "address" + } + ], + "name": "ConsecutiveTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Enumerable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Enumerable.json new file mode 100644 index 00000000..364360e4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Enumerable.json @@ -0,0 +1,397 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Enumerable", + "sourceName": "contracts/token/ERC721/extensions/ERC721Enumerable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json new file mode 100644 index 00000000..1e642ea8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json @@ -0,0 +1,45 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Holder", + "sourceName": "contracts/token/ERC721/utils/ERC721Holder.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506101af806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea2646970667358221220937e7e7aca3ed2e03266b2dc995300bf04e0f158dc015502d750404e0329305d64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea2646970667358221220937e7e7aca3ed2e03266b2dc995300bf04e0f158dc015502d750404e0329305d64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Pausable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Pausable.json new file mode 100644 index 00000000..566f11ca --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Pausable.json @@ -0,0 +1,380 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Pausable", + "sourceName": "contracts/token/ERC721/extensions/ERC721Pausable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json new file mode 100644 index 00000000..68b79912 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json @@ -0,0 +1,751 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721PresetMinterPauserAutoId", + "sourceName": "contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "baseTokenURI", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002a0738038062002a078339810160408190526200003491620003cc565b8251839083906200004d90600290602085019062000259565b5080516200006390600390602084019062000259565b5050600c805460ff191690555080516200008590600e90602084019062000259565b5062000093600033620000f4565b620000bf7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000f4565b620000eb7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000f4565b50505062000499565b62000100828262000104565b5050565b6200011b82826200014760201b62000cec1760201c565b60008281526001602090815260409091206200014291839062000d70620001e7821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000100576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001a33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001fe836001600160a01b03841662000207565b90505b92915050565b6000818152600183016020526040812054620002505750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000201565b50600062000201565b82805462000267906200045d565b90600052602060002090601f0160209004810192826200028b5760008555620002d6565b82601f10620002a657805160ff1916838001178555620002d6565b82800160010185558215620002d6579182015b82811115620002d6578251825591602001919060010190620002b9565b50620002e4929150620002e8565b5090565b5b80821115620002e45760008155600101620002e9565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200032757600080fd5b81516001600160401b0380821115620003445762000344620002ff565b604051601f8301601f19908116603f011681019082821181831017156200036f576200036f620002ff565b816040528381526020925086838588010111156200038c57600080fd5b600091505b83821015620003b0578582018301518183018401529082019062000391565b83821115620003c25760008385830101525b9695505050505050565b600080600060608486031215620003e257600080fd5b83516001600160401b0380821115620003fa57600080fd5b620004088783880162000315565b945060208601519150808211156200041f57600080fd5b6200042d8783880162000315565b935060408601519150808211156200044457600080fd5b50620004538682870162000315565b9150509250925092565b600181811c908216806200047257607f821691505b6020821081036200049357634e487b7160e01b600052602260045260246000fd5b50919050565b61255e80620004a96000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80636352211e1161010f578063a22cb465116100a2578063d539139311610071578063d5391393146103f7578063d547741f1461041e578063e63ab1e914610431578063e985e9c51461045857600080fd5b8063a22cb465146103ab578063b88d4fde146103be578063c87b56dd146103d1578063ca15c873146103e457600080fd5b80639010d07c116100de5780639010d07c1461037557806391d148541461038857806395d89b411461039b578063a217fddf146103a357600080fd5b80636352211e146103345780636a6278421461034757806370a082311461035a5780638456cb591461036d57600080fd5b80632f2ff15d1161018757806342842e0e1161015657806342842e0e146102f057806342966c68146103035780634f6ccce7146103165780635c975abb1461032957600080fd5b80632f2ff15d146102af5780632f745c59146102c257806336568abe146102d55780633f4ba83a146102e857600080fd5b8063095ea7b3116101c3578063095ea7b31461025257806318160ddd1461026757806323b872dd14610279578063248a9ca31461028c57600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f8366004611f81565b610494565b60405190151581526020015b60405180910390f35b61021a6104a5565b6040516102099190611ff6565b61023a610235366004612009565b610537565b6040516001600160a01b039091168152602001610209565b61026561026036600461203e565b61055e565b005b600a545b604051908152602001610209565b610265610287366004612068565b610678565b61026b61029a366004612009565b60009081526020819052604090206001015490565b6102656102bd3660046120a4565b6106aa565b61026b6102d036600461203e565b6106cf565b6102656102e33660046120a4565b610765565b6102656107e3565b6102656102fe366004612068565b61088b565b610265610311366004612009565b6108a6565b61026b610324366004612009565b6108d7565b600c5460ff166101fd565b61023a610342366004612009565b61096a565b6102656103553660046120d0565b6109ca565b61026b6103683660046120d0565b610a86565b610265610b0c565b61023a6103833660046120eb565b610bb0565b6101fd6103963660046120a4565b610bcf565b61021a610bf8565b61026b600081565b6102656103b936600461210d565b610c07565b6102656103cc36600461215f565b610c12565b61021a6103df366004612009565b610c4a565b61026b6103f2366004612009565b610cb0565b61026b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61026561042c3660046120a4565b610cc7565b61026b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101fd61046636600461223b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600061049f82610d85565b92915050565b6060600280546104b490612265565b80601f01602080910402602001604051908101604052809291908181526020018280546104e090612265565b801561052d5780601f106105025761010080835404028352916020019161052d565b820191906000526020600020905b81548152906001019060200180831161051057829003601f168201915b5050505050905090565b600061054282610daa565b506000908152600660205260409020546001600160a01b031690565b60006105698261096a565b9050806001600160a01b0316836001600160a01b0316036105db5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806105f757506105f78133610466565b6106695760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105d2565b6106738383610e09565b505050565b610683335b82610e77565b61069f5760405162461bcd60e51b81526004016105d29061229f565b610673838383610ef6565b6000828152602081905260409020600101546106c581611067565b6106738383611071565b60006106da83610a86565b821061073c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105d2565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6001600160a01b03811633146107d55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105d2565b6107df8282611093565b5050565b61080d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610881576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105d2565b6108896110b5565b565b61067383838360405180602001604052806000815250610c12565b6108af3361067d565b6108cb5760405162461bcd60e51b81526004016105d29061229f565b6108d481611107565b50565b60006108e2600a5490565b82106109455760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105d2565b600a8281548110610958576109586122ec565b90600052602060002001549050919050565b6000818152600460205260408120546001600160a01b03168061049f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b6109f47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bcf565b610a665760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105d2565b610a7881610a73600d5490565b6111aa565b6108d4600d80546001019055565b60006001600160a01b038216610af05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105d2565b506001600160a01b031660009081526005602052604090205490565b610b367f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610ba85760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105d2565b610889611343565b6000828152600160205260408120610bc89083611380565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546104b490612265565b6107df33838361138c565b610c1c3383610e77565b610c385760405162461bcd60e51b81526004016105d29061229f565b610c448484848461145a565b50505050565b6060610c5582610daa565b6000610c5f61148d565b90506000815111610c7f5760405180602001604052806000815250610bc8565b80610c898461149c565b604051602001610c9a929190612302565b6040516020818303038152906040529392505050565b600081815260016020526040812061049f9061152f565b600082815260208190526040902060010154610ce281611067565b6106738383611093565b610cf68282610bcf565b6107df576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610d2c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bc8836001600160a01b038416611539565b60006001600160e01b0319821663780e9d6360e01b148061049f575061049f82611588565b6000818152600460205260409020546001600160a01b03166108d45760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b600081815260066020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e3e8261096a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610e838361096a565b9050806001600160a01b0316846001600160a01b03161480610eca57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b80610eee5750836001600160a01b0316610ee384610537565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f098261096a565b6001600160a01b031614610f2f5760405162461bcd60e51b81526004016105d290612331565b6001600160a01b038216610f915760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105d2565b610f9e83838360016115c8565b826001600160a01b0316610fb18261096a565b6001600160a01b031614610fd75760405162461bcd60e51b81526004016105d290612331565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108d481336115d4565b61107b8282610cec565b60008281526001602052604090206106739082610d70565b61109d828261162d565b60008281526001602052604090206106739082611692565b6110bd6116a7565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006111128261096a565b90506111228160008460016115c8565b61112b8261096a565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105d2565b6000818152600460205260409020546001600160a01b0316156112655760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6112736000838360016115c8565b6000818152600460205260409020546001600160a01b0316156112d85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61134b6116f0565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110ea3390565b6000610bc88383611736565b816001600160a01b0316836001600160a01b0316036113ed5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105d2565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611465848484610ef6565b61147184848484611760565b610c445760405162461bcd60e51b81526004016105d290612376565b6060600e80546104b490612265565b606060006114a983611861565b600101905060008167ffffffffffffffff8111156114c9576114c9612149565b6040519080825280601f01601f1916602001820160405280156114f3576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846114fd57509392505050565b600061049f825490565b60008181526001830160205260408120546115805750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561049f565b50600061049f565b60006001600160e01b031982166380ac58cd60e01b14806115b957506001600160e01b03198216635b5e139f60e01b145b8061049f575061049f82611939565b610c448484848461195e565b6115de8282610bcf565b6107df576115eb816119d1565b6115f68360206119e3565b6040516020016116079291906123c8565b60408051601f198184030181529082905262461bcd60e51b82526105d291600401611ff6565b6116378282610bcf565b156107df576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bc8836001600160a01b038416611b7f565b600c5460ff166108895760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105d2565b600c5460ff16156108895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105d2565b600082600001828154811061174d5761174d6122ec565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561185657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906117a490339089908890889060040161243d565b6020604051808303816000875af19250505080156117df575060408051601f3d908101601f191682019092526117dc9181019061247a565b60015b61183c573d80801561180d576040519150601f19603f3d011682016040523d82523d6000602084013e611812565b606091505b5080516000036118345760405162461bcd60e51b81526004016105d290612376565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610eee565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106118a05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106118cc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106118ea57662386f26fc10000830492506010015b6305f5e1008310611902576305f5e100830492506008015b612710831061191657612710830492506004015b60648310611928576064830492506002015b600a831061049f5760010192915050565b60006001600160e01b03198216635a05180f60e01b148061049f575061049f82611c72565b61196a84848484611ca7565b600c5460ff1615610c445760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105d2565b606061049f6001600160a01b03831660145b606060006119f28360026124ad565b6119fd9060026124cc565b67ffffffffffffffff811115611a1557611a15612149565b6040519080825280601f01601f191660200182016040528015611a3f576020820181803683370190505b509050600360fc1b81600081518110611a5a57611a5a6122ec565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a8957611a896122ec565b60200101906001600160f81b031916908160001a9053506000611aad8460026124ad565b611ab89060016124cc565b90505b6001811115611b30576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611aec57611aec6122ec565b1a60f81b828281518110611b0257611b026122ec565b60200101906001600160f81b031916908160001a90535060049490941c93611b29816124e4565b9050611abb565b508315610bc85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105d2565b60008181526001830160205260408120548015611c68576000611ba36001836124fb565b8554909150600090611bb7906001906124fb565b9050818114611c1c576000866000018281548110611bd757611bd76122ec565b9060005260206000200154905080876000018481548110611bfa57611bfa6122ec565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c2d57611c2d612512565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061049f565b600091505061049f565b60006001600160e01b03198216637965db0b60e01b148061049f57506301ffc9a760e01b6001600160e01b031983161461049f565b6001811115611d165760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105d2565b816001600160a01b038516611d7257611d6d81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b611d95565b836001600160a01b0316856001600160a01b031614611d9557611d958582611ddb565b6001600160a01b038416611db157611dac81611e78565b611dd4565b846001600160a01b0316846001600160a01b031614611dd457611dd48482611f27565b5050505050565b60006001611de884610a86565b611df291906124fb565b600083815260096020526040902054909150808214611e45576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090611e8a906001906124fb565b6000838152600b6020526040812054600a8054939450909284908110611eb257611eb26122ec565b9060005260206000200154905080600a8381548110611ed357611ed36122ec565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480611f0b57611f0b612512565b6001900381819060005260206000200160009055905550505050565b6000611f3283610a86565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160e01b0319811681146108d457600080fd5b600060208284031215611f9357600080fd5b8135610bc881611f6b565b60005b83811015611fb9578181015183820152602001611fa1565b83811115610c445750506000910152565b60008151808452611fe2816020860160208601611f9e565b601f01601f19169290920160200192915050565b602081526000610bc86020830184611fca565b60006020828403121561201b57600080fd5b5035919050565b80356001600160a01b038116811461203957600080fd5b919050565b6000806040838503121561205157600080fd5b61205a83612022565b946020939093013593505050565b60008060006060848603121561207d57600080fd5b61208684612022565b925061209460208501612022565b9150604084013590509250925092565b600080604083850312156120b757600080fd5b823591506120c760208401612022565b90509250929050565b6000602082840312156120e257600080fd5b610bc882612022565b600080604083850312156120fe57600080fd5b50508035926020909101359150565b6000806040838503121561212057600080fd5b61212983612022565b91506020830135801515811461213e57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561217557600080fd5b61217e85612022565b935061218c60208601612022565b925060408501359150606085013567ffffffffffffffff808211156121b057600080fd5b818701915087601f8301126121c457600080fd5b8135818111156121d6576121d6612149565b604051601f8201601f19908116603f011681019083821181831017156121fe576121fe612149565b816040528281528a602084870101111561221757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561224e57600080fd5b61225783612022565b91506120c760208401612022565b600181811c9082168061227957607f821691505b60208210810361229957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008351612314818460208801611f9e565b835190830190612328818360208801611f9e565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612400816017850160208801611f9e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612431816028840160208801611f9e565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061247090830184611fca565b9695505050505050565b60006020828403121561248c57600080fd5b8151610bc881611f6b565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124c7576124c7612497565b500290565b600082198211156124df576124df612497565b500190565b6000816124f3576124f3612497565b506000190190565b60008282101561250d5761250d612497565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212202ec9496ef969b38824d5643b32bdd6096a581310145908055518bd2dd589553e64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80636352211e1161010f578063a22cb465116100a2578063d539139311610071578063d5391393146103f7578063d547741f1461041e578063e63ab1e914610431578063e985e9c51461045857600080fd5b8063a22cb465146103ab578063b88d4fde146103be578063c87b56dd146103d1578063ca15c873146103e457600080fd5b80639010d07c116100de5780639010d07c1461037557806391d148541461038857806395d89b411461039b578063a217fddf146103a357600080fd5b80636352211e146103345780636a6278421461034757806370a082311461035a5780638456cb591461036d57600080fd5b80632f2ff15d1161018757806342842e0e1161015657806342842e0e146102f057806342966c68146103035780634f6ccce7146103165780635c975abb1461032957600080fd5b80632f2ff15d146102af5780632f745c59146102c257806336568abe146102d55780633f4ba83a146102e857600080fd5b8063095ea7b3116101c3578063095ea7b31461025257806318160ddd1461026757806323b872dd14610279578063248a9ca31461028c57600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f8366004611f81565b610494565b60405190151581526020015b60405180910390f35b61021a6104a5565b6040516102099190611ff6565b61023a610235366004612009565b610537565b6040516001600160a01b039091168152602001610209565b61026561026036600461203e565b61055e565b005b600a545b604051908152602001610209565b610265610287366004612068565b610678565b61026b61029a366004612009565b60009081526020819052604090206001015490565b6102656102bd3660046120a4565b6106aa565b61026b6102d036600461203e565b6106cf565b6102656102e33660046120a4565b610765565b6102656107e3565b6102656102fe366004612068565b61088b565b610265610311366004612009565b6108a6565b61026b610324366004612009565b6108d7565b600c5460ff166101fd565b61023a610342366004612009565b61096a565b6102656103553660046120d0565b6109ca565b61026b6103683660046120d0565b610a86565b610265610b0c565b61023a6103833660046120eb565b610bb0565b6101fd6103963660046120a4565b610bcf565b61021a610bf8565b61026b600081565b6102656103b936600461210d565b610c07565b6102656103cc36600461215f565b610c12565b61021a6103df366004612009565b610c4a565b61026b6103f2366004612009565b610cb0565b61026b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61026561042c3660046120a4565b610cc7565b61026b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101fd61046636600461223b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600061049f82610d85565b92915050565b6060600280546104b490612265565b80601f01602080910402602001604051908101604052809291908181526020018280546104e090612265565b801561052d5780601f106105025761010080835404028352916020019161052d565b820191906000526020600020905b81548152906001019060200180831161051057829003601f168201915b5050505050905090565b600061054282610daa565b506000908152600660205260409020546001600160a01b031690565b60006105698261096a565b9050806001600160a01b0316836001600160a01b0316036105db5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806105f757506105f78133610466565b6106695760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105d2565b6106738383610e09565b505050565b610683335b82610e77565b61069f5760405162461bcd60e51b81526004016105d29061229f565b610673838383610ef6565b6000828152602081905260409020600101546106c581611067565b6106738383611071565b60006106da83610a86565b821061073c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105d2565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6001600160a01b03811633146107d55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105d2565b6107df8282611093565b5050565b61080d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610881576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105d2565b6108896110b5565b565b61067383838360405180602001604052806000815250610c12565b6108af3361067d565b6108cb5760405162461bcd60e51b81526004016105d29061229f565b6108d481611107565b50565b60006108e2600a5490565b82106109455760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105d2565b600a8281548110610958576109586122ec565b90600052602060002001549050919050565b6000818152600460205260408120546001600160a01b03168061049f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b6109f47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bcf565b610a665760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105d2565b610a7881610a73600d5490565b6111aa565b6108d4600d80546001019055565b60006001600160a01b038216610af05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105d2565b506001600160a01b031660009081526005602052604090205490565b610b367f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610ba85760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105d2565b610889611343565b6000828152600160205260408120610bc89083611380565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546104b490612265565b6107df33838361138c565b610c1c3383610e77565b610c385760405162461bcd60e51b81526004016105d29061229f565b610c448484848461145a565b50505050565b6060610c5582610daa565b6000610c5f61148d565b90506000815111610c7f5760405180602001604052806000815250610bc8565b80610c898461149c565b604051602001610c9a929190612302565b6040516020818303038152906040529392505050565b600081815260016020526040812061049f9061152f565b600082815260208190526040902060010154610ce281611067565b6106738383611093565b610cf68282610bcf565b6107df576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610d2c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bc8836001600160a01b038416611539565b60006001600160e01b0319821663780e9d6360e01b148061049f575061049f82611588565b6000818152600460205260409020546001600160a01b03166108d45760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b600081815260066020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e3e8261096a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610e838361096a565b9050806001600160a01b0316846001600160a01b03161480610eca57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b80610eee5750836001600160a01b0316610ee384610537565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f098261096a565b6001600160a01b031614610f2f5760405162461bcd60e51b81526004016105d290612331565b6001600160a01b038216610f915760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105d2565b610f9e83838360016115c8565b826001600160a01b0316610fb18261096a565b6001600160a01b031614610fd75760405162461bcd60e51b81526004016105d290612331565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108d481336115d4565b61107b8282610cec565b60008281526001602052604090206106739082610d70565b61109d828261162d565b60008281526001602052604090206106739082611692565b6110bd6116a7565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006111128261096a565b90506111228160008460016115c8565b61112b8261096a565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105d2565b6000818152600460205260409020546001600160a01b0316156112655760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6112736000838360016115c8565b6000818152600460205260409020546001600160a01b0316156112d85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61134b6116f0565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110ea3390565b6000610bc88383611736565b816001600160a01b0316836001600160a01b0316036113ed5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105d2565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611465848484610ef6565b61147184848484611760565b610c445760405162461bcd60e51b81526004016105d290612376565b6060600e80546104b490612265565b606060006114a983611861565b600101905060008167ffffffffffffffff8111156114c9576114c9612149565b6040519080825280601f01601f1916602001820160405280156114f3576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846114fd57509392505050565b600061049f825490565b60008181526001830160205260408120546115805750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561049f565b50600061049f565b60006001600160e01b031982166380ac58cd60e01b14806115b957506001600160e01b03198216635b5e139f60e01b145b8061049f575061049f82611939565b610c448484848461195e565b6115de8282610bcf565b6107df576115eb816119d1565b6115f68360206119e3565b6040516020016116079291906123c8565b60408051601f198184030181529082905262461bcd60e51b82526105d291600401611ff6565b6116378282610bcf565b156107df576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bc8836001600160a01b038416611b7f565b600c5460ff166108895760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105d2565b600c5460ff16156108895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105d2565b600082600001828154811061174d5761174d6122ec565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561185657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906117a490339089908890889060040161243d565b6020604051808303816000875af19250505080156117df575060408051601f3d908101601f191682019092526117dc9181019061247a565b60015b61183c573d80801561180d576040519150601f19603f3d011682016040523d82523d6000602084013e611812565b606091505b5080516000036118345760405162461bcd60e51b81526004016105d290612376565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610eee565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106118a05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106118cc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106118ea57662386f26fc10000830492506010015b6305f5e1008310611902576305f5e100830492506008015b612710831061191657612710830492506004015b60648310611928576064830492506002015b600a831061049f5760010192915050565b60006001600160e01b03198216635a05180f60e01b148061049f575061049f82611c72565b61196a84848484611ca7565b600c5460ff1615610c445760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105d2565b606061049f6001600160a01b03831660145b606060006119f28360026124ad565b6119fd9060026124cc565b67ffffffffffffffff811115611a1557611a15612149565b6040519080825280601f01601f191660200182016040528015611a3f576020820181803683370190505b509050600360fc1b81600081518110611a5a57611a5a6122ec565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a8957611a896122ec565b60200101906001600160f81b031916908160001a9053506000611aad8460026124ad565b611ab89060016124cc565b90505b6001811115611b30576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611aec57611aec6122ec565b1a60f81b828281518110611b0257611b026122ec565b60200101906001600160f81b031916908160001a90535060049490941c93611b29816124e4565b9050611abb565b508315610bc85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105d2565b60008181526001830160205260408120548015611c68576000611ba36001836124fb565b8554909150600090611bb7906001906124fb565b9050818114611c1c576000866000018281548110611bd757611bd76122ec565b9060005260206000200154905080876000018481548110611bfa57611bfa6122ec565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c2d57611c2d612512565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061049f565b600091505061049f565b60006001600160e01b03198216637965db0b60e01b148061049f57506301ffc9a760e01b6001600160e01b031983161461049f565b6001811115611d165760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105d2565b816001600160a01b038516611d7257611d6d81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b611d95565b836001600160a01b0316856001600160a01b031614611d9557611d958582611ddb565b6001600160a01b038416611db157611dac81611e78565b611dd4565b846001600160a01b0316846001600160a01b031614611dd457611dd48482611f27565b5050505050565b60006001611de884610a86565b611df291906124fb565b600083815260096020526040902054909150808214611e45576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090611e8a906001906124fb565b6000838152600b6020526040812054600a8054939450909284908110611eb257611eb26122ec565b9060005260206000200154905080600a8381548110611ed357611ed36122ec565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480611f0b57611f0b612512565b6001900381819060005260206000200160009055905550505050565b6000611f3283610a86565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160e01b0319811681146108d457600080fd5b600060208284031215611f9357600080fd5b8135610bc881611f6b565b60005b83811015611fb9578181015183820152602001611fa1565b83811115610c445750506000910152565b60008151808452611fe2816020860160208601611f9e565b601f01601f19169290920160200192915050565b602081526000610bc86020830184611fca565b60006020828403121561201b57600080fd5b5035919050565b80356001600160a01b038116811461203957600080fd5b919050565b6000806040838503121561205157600080fd5b61205a83612022565b946020939093013593505050565b60008060006060848603121561207d57600080fd5b61208684612022565b925061209460208501612022565b9150604084013590509250925092565b600080604083850312156120b757600080fd5b823591506120c760208401612022565b90509250929050565b6000602082840312156120e257600080fd5b610bc882612022565b600080604083850312156120fe57600080fd5b50508035926020909101359150565b6000806040838503121561212057600080fd5b61212983612022565b91506020830135801515811461213e57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561217557600080fd5b61217e85612022565b935061218c60208601612022565b925060408501359150606085013567ffffffffffffffff808211156121b057600080fd5b818701915087601f8301126121c457600080fd5b8135818111156121d6576121d6612149565b604051601f8201601f19908116603f011681019083821181831017156121fe576121fe612149565b816040528281528a602084870101111561221757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561224e57600080fd5b61225783612022565b91506120c760208401612022565b600181811c9082168061227957607f821691505b60208210810361229957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008351612314818460208801611f9e565b835190830190612328818360208801611f9e565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612400816017850160208801611f9e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612431816028840160208801611f9e565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061247090830184611fca565b9695505050505050565b60006020828403121561248c57600080fd5b8151610bc881611f6b565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124c7576124c7612497565b500290565b600082198211156124df576124df612497565b500190565b6000816124f3576124f3612497565b506000190190565b60008282101561250d5761250d612497565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212202ec9496ef969b38824d5643b32bdd6096a581310145908055518bd2dd589553e64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Royalty.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Royalty.json new file mode 100644 index 00000000..a257c0d8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Royalty.json @@ -0,0 +1,370 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Royalty", + "sourceName": "contracts/token/ERC721/extensions/ERC721Royalty.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721URIStorage.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721URIStorage.json new file mode 100644 index 00000000..03bbb5d6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721URIStorage.json @@ -0,0 +1,373 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721URIStorage", + "sourceName": "contracts/token/ERC721/extensions/ERC721URIStorage.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + } + ], + "name": "BatchMetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "MetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Votes.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Votes.json new file mode 100644 index 00000000..6080809c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Votes.json @@ -0,0 +1,646 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Votes", + "sourceName": "contracts/token/ERC721/extensions/ERC721Votes.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Wrapper.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Wrapper.json new file mode 100644 index 00000000..bbff5fc2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Wrapper.json @@ -0,0 +1,436 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Wrapper", + "sourceName": "contracts/token/ERC721/extensions/ERC721Wrapper.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "depositFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "contract IERC721", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "withdrawTo", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json new file mode 100644 index 00000000..f6ef7019 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json @@ -0,0 +1,587 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC777", + "sourceName": "contracts/token/ERC777/ERC777.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "address[]", + "name": "defaultOperators_", + "type": "address[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "AuthorizedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Burned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "RevokedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Sent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "authorizeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "defaultOperators", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "granularity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "isOperatorFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "revokeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001bab38038062001bab8339810160408190526200003491620003f1565b82516200004990600290602086019062000215565b5081516200005f90600390602085019062000215565b50805162000075906004906020840190620002a4565b5060005b8151811015620000e5576001600560008484815181106200009e576200009e62000508565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620000dc816200051e565b91505062000079565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b1580156200016057600080fd5b505af115801562000175573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b158015620001f357600080fd5b505af115801562000208573d6000803e3d6000fd5b5050505050505062000582565b828054620002239062000546565b90600052602060002090601f01602090048101928262000247576000855562000292565b82601f106200026257805160ff191683800117855562000292565b8280016001018555821562000292579182015b828111156200029257825182559160200191906001019062000275565b50620002a0929150620002fc565b5090565b82805482825590600052602060002090810192821562000292579160200282015b828111156200029257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620002c5565b5b80821115620002a05760008155600101620002fd565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000354576200035462000313565b604052919050565b600082601f8301126200036e57600080fd5b81516001600160401b038111156200038a576200038a62000313565b6020620003a0601f8301601f1916820162000329565b8281528582848701011115620003b557600080fd5b60005b83811015620003d5578581018301518282018401528201620003b8565b83811115620003e75760008385840101525b5095945050505050565b6000806000606084860312156200040757600080fd5b83516001600160401b03808211156200041f57600080fd5b6200042d878388016200035c565b94506020915081860151818111156200044557600080fd5b62000453888289016200035c565b9450506040860151818111156200046957600080fd5b8601601f810188136200047b57600080fd5b80518281111562000490576200049062000313565b8060051b9250620004a384840162000329565b818152928201840192848101908a851115620004be57600080fd5b928501925b84841015620004f857835192506001600160a01b0383168314620004e75760008081fd5b8282529285019290850190620004c3565b8096505050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b6000600182016200053f57634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806200055b57607f821691505b6020821081036200057c57634e487b7160e01b600052602260045260246000fd5b50919050565b61161980620005926000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526020819052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea264697066735822122098f5763d08059f98d276d9f24c7df2a4be3021e5f489ba6feb5581633ad3920264736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526020819052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea264697066735822122098f5763d08059f98d276d9f24c7df2a4be3021e5f489ba6feb5581633ad3920264736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json new file mode 100644 index 00000000..ea691e74 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json @@ -0,0 +1,597 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC777PresetFixedSupply", + "sourceName": "contracts/token/ERC777/presets/ERC777PresetFixedSupply.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "defaultOperators", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "AuthorizedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Burned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "RevokedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Sent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "authorizeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "defaultOperators", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "granularity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "isOperatorFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "revokeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b506040516200209d3803806200209d8339810160408190526200003491620007b9565b84848482600290805190602001906200004f929190620005b2565b50815162000065906003906020850190620005b2565b5080516200007b90600490602084019062000641565b5060005b8151811015620000eb57600160056000848481518110620000a457620000a4620008dc565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620000e28162000908565b9150506200007f565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b1580156200016657600080fd5b505af11580156200017b573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b158015620001f957600080fd5b505af11580156200020e573d6000803e3d6000fd5b5050505050505062000247818360405180602001604052806000815250604051806020016040528060008152506200025260201b60201c565b505050505062000a65565b6200026284848484600162000268565b50505050565b6001600160a01b038516620002c45760405162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f206164647265737360448201526064015b60405180910390fd5b60003390508460016000828254620002dd919062000924565b90915550506001600160a01b038616600090815260208190526040812080548792906200030c90849062000924565b909155506200032490508160008888888888620003be565b856001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d8787876040516200036d939291906200096d565b60405180910390a36040518581526001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa15801562000440573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004669190620009a6565b90506001600160a01b03811615620004e8576040516223de2960e01b81526001600160a01b038216906223de2990620004ae908b908b908b908b908b908b90600401620009cb565b600060405180830381600087803b158015620004c957600080fd5b505af1158015620004de573d6000803e3d6000fd5b5050505062000599565b811562000599576200050e866001600160a01b0316620005a360201b620007d91760201c565b15620005995760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a401620002bb565b5050505050505050565b6001600160a01b03163b151590565b828054620005c09062000a29565b90600052602060002090601f016020900481019282620005e457600085556200062f565b82601f10620005ff57805160ff19168380011785556200062f565b828001600101855582156200062f579182015b828111156200062f57825182559160200191906001019062000612565b506200063d92915062000699565b5090565b8280548282559060005260206000209081019282156200062f579160200282015b828111156200062f57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000662565b5b808211156200063d57600081556001016200069a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620006f157620006f1620006b0565b604052919050565b60005b8381101562000716578181015183820152602001620006fc565b83811115620002625750506000910152565b600082601f8301126200073a57600080fd5b81516001600160401b03811115620007565762000756620006b0565b6200076b601f8201601f1916602001620006c6565b8181528460208386010111156200078157600080fd5b62000794826020830160208701620006f9565b949350505050565b80516001600160a01b0381168114620007b457600080fd5b919050565b600080600080600060a08688031215620007d257600080fd5b85516001600160401b0380821115620007ea57600080fd5b620007f889838a0162000728565b96506020915081880151818111156200081057600080fd5b6200081e8a828b0162000728565b9650506040880151818111156200083457600080fd5b8801601f81018a136200084657600080fd5b8051828111156200085b576200085b620006b0565b8060051b92506200086e848401620006c6565b818152928201840192848101908c8511156200088957600080fd5b928501925b84841015620008b257620008a2846200079c565b825292850192908501906200088e565b80985050505050505060608601519150620008d0608087016200079c565b90509295509295909350565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200091d576200091d620008f2565b5060010190565b600082198211156200093a576200093a620008f2565b500190565b6000815180845262000959816020860160208601620006f9565b601f01601f19169290920160200192915050565b8381526060602082015260006200098860608301856200093f565b82810360408401526200099c81856200093f565b9695505050505050565b600060208284031215620009b957600080fd5b620009c4826200079c565b9392505050565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c06080820181905260009062000a08908301856200093f565b82810360a084015262000a1c81856200093f565b9998505050505050505050565b600181811c9082168062000a3e57607f821691505b60208210810362000a5f57634e487b7160e01b600052602260045260246000fd5b50919050565b6116288062000a756000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061109d565b60405180910390f35b610141610312565b6040516101309190611137565b61016161015c366004611162565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461118e565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611272565b6103f9565b005b6101756101cf366004611305565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f8366004611305565b61043e565b61014161055b565b6101bf610213366004611322565b61056a565b610161610226366004611162565b61058d565b61016161023936600461137b565b6105c5565b61017561024c36600461137b565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf610285366004611305565b610667565b6101bf6102983660046113b4565b610782565b6101bf6102ab366004611434565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061147b565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061147b565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107e8565b5060019392505050565b6000336103c185828561090f565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061099b565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114b5565b60405180910390fd5b6104378585858585600161099b565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061147b565b6105883384848460405180602001604052806000815250600161099b565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061099b565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114b5565b6107b484848484610a97565b50505050565b6107d533838360405180602001604052806000815250610a97565b5050565b6001600160a01b03163b151590565b6001600160a01b03831661084c5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b0382166108ae5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561098e5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107e8565b6001600160a01b038616610a005760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a625760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a71818888888888610c4b565b610a7f818888888888610d72565b610a8e81888888888888610ed8565b50505050505050565b6001600160a01b038416610af85760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610b0881866000878787610c4b565b6001600160a01b03851660009081526020819052604090205484811015610b7d5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610bac908490611517565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610bfa9392919061152e565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf09190611563565b90506001600160a01b03811615610a8e57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d37908a908a908a908a908a908a90600401611580565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610deb5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e229084906115da565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e7a9392919061152e565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610ec791815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d9190611563565b90506001600160a01b03811615610ff9576040516223de2960e01b81526001600160a01b038216906223de2990610fc2908b908b908b908b908b908b90600401611580565b600060405180830381600087803b158015610fdc57600080fd5b505af1158015610ff0573d6000803e3d6000fd5b50505050611093565b8115611093576001600160a01b0386163b156110935760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110de5783516001600160a01b0316835292840192918401916001016110b9565b50909695505050505050565b6000815180845260005b81811015611110576020818501810151868301820152016110f4565b81811115611122576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110ea565b6001600160a01b038116811461115f57600080fd5b50565b6000806040838503121561117557600080fd5b82356111808161114a565b946020939093013593505050565b6000806000606084860312156111a357600080fd5b83356111ae8161114a565b925060208401356111be8161114a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111f657600080fd5b813567ffffffffffffffff80821115611211576112116111cf565b604051601f8301601f19908116603f01168101908282118183101715611239576112396111cf565b8160405283815286602085880101111561125257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561128a57600080fd5b85356112958161114a565b945060208601356112a58161114a565b935060408601359250606086013567ffffffffffffffff808211156112c957600080fd5b6112d589838a016111e5565b935060808801359150808211156112eb57600080fd5b506112f8888289016111e5565b9150509295509295909350565b60006020828403121561131757600080fd5b81356106608161114a565b60008060006060848603121561133757600080fd5b83356113428161114a565b925060208401359150604084013567ffffffffffffffff81111561136557600080fd5b611371868287016111e5565b9150509250925092565b6000806040838503121561138e57600080fd5b82356113998161114a565b915060208301356113a98161114a565b809150509250929050565b600080600080608085870312156113ca57600080fd5b84356113d58161114a565b935060208501359250604085013567ffffffffffffffff808211156113f957600080fd5b611405888389016111e5565b9350606087013591508082111561141b57600080fd5b50611428878288016111e5565b91505092959194509250565b6000806040838503121561144757600080fd5b82359150602083013567ffffffffffffffff81111561146557600080fd5b611471858286016111e5565b9150509250929050565b600181811c9082168061148f57607f821691505b6020821081036114af57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561152957611529611501565b500390565b83815260606020820152600061154760608301856110ea565b828103604084015261155981856110ea565b9695505050505050565b60006020828403121561157557600080fd5b81516106608161114a565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115bb908301856110ea565b82810360a08401526115cd81856110ea565b9998505050505050505050565b600082198211156115ed576115ed611501565b50019056fea264697066735822122001b9508dd34edac4606f8d9c5c4918af5839a07f18449e7c7b61fdf6ed783a5464736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061109d565b60405180910390f35b610141610312565b6040516101309190611137565b61016161015c366004611162565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461118e565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611272565b6103f9565b005b6101756101cf366004611305565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f8366004611305565b61043e565b61014161055b565b6101bf610213366004611322565b61056a565b610161610226366004611162565b61058d565b61016161023936600461137b565b6105c5565b61017561024c36600461137b565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf610285366004611305565b610667565b6101bf6102983660046113b4565b610782565b6101bf6102ab366004611434565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061147b565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061147b565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107e8565b5060019392505050565b6000336103c185828561090f565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061099b565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114b5565b60405180910390fd5b6104378585858585600161099b565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061147b565b6105883384848460405180602001604052806000815250600161099b565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061099b565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114b5565b6107b484848484610a97565b50505050565b6107d533838360405180602001604052806000815250610a97565b5050565b6001600160a01b03163b151590565b6001600160a01b03831661084c5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b0382166108ae5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561098e5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107e8565b6001600160a01b038616610a005760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a625760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a71818888888888610c4b565b610a7f818888888888610d72565b610a8e81888888888888610ed8565b50505050505050565b6001600160a01b038416610af85760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610b0881866000878787610c4b565b6001600160a01b03851660009081526020819052604090205484811015610b7d5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610bac908490611517565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610bfa9392919061152e565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf09190611563565b90506001600160a01b03811615610a8e57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d37908a908a908a908a908a908a90600401611580565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610deb5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e229084906115da565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e7a9392919061152e565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610ec791815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d9190611563565b90506001600160a01b03811615610ff9576040516223de2960e01b81526001600160a01b038216906223de2990610fc2908b908b908b908b908b908b90600401611580565b600060405180830381600087803b158015610fdc57600080fd5b505af1158015610ff0573d6000803e3d6000fd5b50505050611093565b8115611093576001600160a01b0386163b156110935760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110de5783516001600160a01b0316835292840192918401916001016110b9565b50909695505050505050565b6000815180845260005b81811015611110576020818501810151868301820152016110f4565b81811115611122576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110ea565b6001600160a01b038116811461115f57600080fd5b50565b6000806040838503121561117557600080fd5b82356111808161114a565b946020939093013593505050565b6000806000606084860312156111a357600080fd5b83356111ae8161114a565b925060208401356111be8161114a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111f657600080fd5b813567ffffffffffffffff80821115611211576112116111cf565b604051601f8301601f19908116603f01168101908282118183101715611239576112396111cf565b8160405283815286602085880101111561125257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561128a57600080fd5b85356112958161114a565b945060208601356112a58161114a565b935060408601359250606086013567ffffffffffffffff808211156112c957600080fd5b6112d589838a016111e5565b935060808801359150808211156112eb57600080fd5b506112f8888289016111e5565b9150509295509295909350565b60006020828403121561131757600080fd5b81356106608161114a565b60008060006060848603121561133757600080fd5b83356113428161114a565b925060208401359150604084013567ffffffffffffffff81111561136557600080fd5b611371868287016111e5565b9150509250925092565b6000806040838503121561138e57600080fd5b82356113998161114a565b915060208301356113a98161114a565b809150509250929050565b600080600080608085870312156113ca57600080fd5b84356113d58161114a565b935060208501359250604085013567ffffffffffffffff808211156113f957600080fd5b611405888389016111e5565b9350606087013591508082111561141b57600080fd5b50611428878288016111e5565b91505092959194509250565b6000806040838503121561144757600080fd5b82359150602083013567ffffffffffffffff81111561146557600080fd5b611471858286016111e5565b9150509250929050565b600181811c9082168061148f57607f821691505b6020821081036114af57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561152957611529611501565b500390565b83815260606020820152600061154760608301856110ea565b828103604084015261155981856110ea565b9695505050505050565b60006020828403121561157557600080fd5b81516106608161114a565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115bb908301856110ea565b82810360a08401526115cd81856110ea565b9998505050505050505050565b600082198211156115ed576115ed611501565b50019056fea264697066735822122001b9508dd34edac4606f8d9c5c4918af5839a07f18449e7c7b61fdf6ed783a5464736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json new file mode 100644 index 00000000..fa7fb02b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EnumerableMap", + "sourceName": "contracts/utils/structs/EnumerableMap.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1247dbc9cc619113e0c5945f8c62202b8c4eb957dce30baa3239658a5019e5864736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1247dbc9cc619113e0c5945f8c62202b8c4eb957dce30baa3239658a5019e5864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json new file mode 100644 index 00000000..8271ee39 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EnumerableSet", + "sourceName": "contracts/utils/structs/EnumerableSet.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122074e69cd2a0d98d262dffa88e25191ecf000f74539d774ab9f6d72ba9c393e1b964736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122074e69cd2a0d98d262dffa88e25191ecf000f74539d774ab9f6d72ba9c393e1b964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json new file mode 100644 index 00000000..5cfd0f06 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json @@ -0,0 +1,146 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Escrow", + "sourceName": "contracts/utils/escrow/Escrow.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "depositsOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61050d8061007e6000396000f3fe6080604052600436106100555760003560e01c806351cff8d91461005a578063715018a61461007c5780638da5cb5b14610091578063e3a9db1a146100be578063f2fde38b14610102578063f340fa0114610122575b600080fd5b34801561006657600080fd5b5061007a61007536600461048d565b610135565b005b34801561008857600080fd5b5061007a6101ac565b34801561009d57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100ca57600080fd5b506100f46100d936600461048d565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100b5565b34801561010e57600080fd5b5061007a61011d36600461048d565b6101c0565b61007a61013036600461048d565b61023e565b61013d6102b0565b6001600160a01b0381166000818152600160205260408120805491905590610165908261030a565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101a091815260200190565b60405180910390a25050565b6101b46102b0565b6101be6000610428565b565b6101c86102b0565b6001600160a01b0381166102325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61023b81610428565b50565b6102466102b0565b6001600160a01b0381166000908152600160205260408120805434928392916102709084906104b1565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101a0565b6000546001600160a01b031633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610229565b8047101561035a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610229565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103a7576040519150601f19603f3d011682016040523d82523d6000602084013e6103ac565b606091505b50509050806104235760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610229565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461023b57600080fd5b60006020828403121561049f57600080fd5b81356104aa81610478565b9392505050565b600082198211156104d257634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212202ff20c631ff364ad1effeb2af7fad46d1c273068d3fa7030c8388bbade6ca76b64736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100555760003560e01c806351cff8d91461005a578063715018a61461007c5780638da5cb5b14610091578063e3a9db1a146100be578063f2fde38b14610102578063f340fa0114610122575b600080fd5b34801561006657600080fd5b5061007a61007536600461048d565b610135565b005b34801561008857600080fd5b5061007a6101ac565b34801561009d57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100ca57600080fd5b506100f46100d936600461048d565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100b5565b34801561010e57600080fd5b5061007a61011d36600461048d565b6101c0565b61007a61013036600461048d565b61023e565b61013d6102b0565b6001600160a01b0381166000818152600160205260408120805491905590610165908261030a565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101a091815260200190565b60405180910390a25050565b6101b46102b0565b6101be6000610428565b565b6101c86102b0565b6001600160a01b0381166102325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61023b81610428565b50565b6102466102b0565b6001600160a01b0381166000908152600160205260408120805434928392916102709084906104b1565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101a0565b6000546001600160a01b031633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610229565b8047101561035a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610229565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103a7576040519150601f19603f3d011682016040523d82523d6000602084013e6103ac565b606091505b50509050806104235760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610229565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461023b57600080fd5b60006020828403121561049f57600080fd5b81356104aa81610478565b9392505050565b600082198211156104d257634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212202ff20c631ff364ad1effeb2af7fad46d1c273068d3fa7030c8388bbade6ca76b64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json new file mode 100644 index 00000000..3344d96b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json @@ -0,0 +1,1019 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Governor", + "sourceName": "contracts/governance/Governor.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json new file mode 100644 index 00000000..feb7ad91 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json @@ -0,0 +1,1334 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCompatibilityBravo", + "sourceName": "contracts/governance/compatibility/GovernorCompatibilityBravo.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "getActions", + "outputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "getReceipt", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "hasVoted", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "internalType": "struct IGovernorCompatibilityBravo.Receipt", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "startBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json new file mode 100644 index 00000000..02087f27 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json @@ -0,0 +1,1048 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingSimple", + "sourceName": "contracts/governance/extensions/GovernorCountingSimple.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorPreventLateQuorum.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorPreventLateQuorum.json new file mode 100644 index 00000000..dbbc893e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorPreventLateQuorum.json @@ -0,0 +1,1083 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorPreventLateQuorum", + "sourceName": "contracts/governance/extensions/GovernorPreventLateQuorum.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "oldVoteExtension", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newVoteExtension", + "type": "uint64" + } + ], + "name": "LateQuorumVoteExtensionSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "extendedDeadline", + "type": "uint64" + } + ], + "name": "ProposalExtended", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "lateQuorumVoteExtension", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newVoteExtension", + "type": "uint64" + } + ], + "name": "setLateQuorumVoteExtension", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json new file mode 100644 index 00000000..39c4908f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json @@ -0,0 +1,1019 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorProposalThreshold", + "sourceName": "contracts/governance/extensions/GovernorProposalThreshold.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorSettings.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorSettings.json new file mode 100644 index 00000000..aa6e2a95 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorSettings.json @@ -0,0 +1,1115 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorSettings", + "sourceName": "contracts/governance/extensions/GovernorSettings.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldProposalThreshold", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newProposalThreshold", + "type": "uint256" + } + ], + "name": "ProposalThresholdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldVotingDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newVotingDelay", + "type": "uint256" + } + ], + "name": "VotingDelaySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldVotingPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newVotingPeriod", + "type": "uint256" + } + ], + "name": "VotingPeriodSet", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newProposalThreshold", + "type": "uint256" + } + ], + "name": "setProposalThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newVotingDelay", + "type": "uint256" + } + ], + "name": "setVotingDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newVotingPeriod", + "type": "uint256" + } + ], + "name": "setVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockCompound.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockCompound.json new file mode 100644 index 00000000..653aa0e7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockCompound.json @@ -0,0 +1,1143 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorTimelockCompound", + "sourceName": "contracts/governance/extensions/GovernorTimelockCompound.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldTimelock", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTimelock", + "type": "address" + } + ], + "name": "TimelockChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "__acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ICompoundTimelock", + "name": "newTimelock", + "type": "address" + } + ], + "name": "updateTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockControl.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockControl.json new file mode 100644 index 00000000..b1689789 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockControl.json @@ -0,0 +1,1136 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorTimelockControl", + "sourceName": "contracts/governance/extensions/GovernorTimelockControl.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldTimelock", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTimelock", + "type": "address" + } + ], + "name": "TimelockChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TimelockController", + "name": "newTimelock", + "type": "address" + } + ], + "name": "updateTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json new file mode 100644 index 00000000..d2ceec6c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json @@ -0,0 +1,1032 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotes", + "sourceName": "contracts/governance/extensions/GovernorVotes.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json new file mode 100644 index 00000000..fad189d7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json @@ -0,0 +1,1032 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesComp", + "sourceName": "contracts/governance/extensions/GovernorVotesComp.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract ERC20VotesComp", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json new file mode 100644 index 00000000..d184ed13 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json @@ -0,0 +1,1109 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesQuorumFraction", + "sourceName": "contracts/governance/extensions/GovernorVotesQuorumFraction.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumDenominator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json new file mode 100644 index 00000000..26d11c59 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json @@ -0,0 +1,336 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAMB", + "sourceName": "contracts/vendor/amb/IAMB.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "AffirmationCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "encodedData", + "type": "bytes" + } + ], + "name": "UserRequestForAffirmation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "encodedData", + "type": "bytes" + } + ], + "name": "UserRequestForSignature", + "type": "event" + }, + { + "inputs": [], + "name": "destinationChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "failedMessageDataHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "failedMessageReceiver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "failedMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxGasPerTx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "messageCallStatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageSourceChainId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_contract", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gas", + "type": "uint256" + } + ], + "name": "requireToConfirmMessage", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_contract", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gas", + "type": "uint256" + } + ], + "name": "requireToPassMessage", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sourceChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "transactionHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControl.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControl.json new file mode 100644 index 00000000..dc7348ca --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControl.json @@ -0,0 +1,183 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessControl", + "sourceName": "contracts/access/IAccessControl.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlDefaultAdminRules.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlDefaultAdminRules.json new file mode 100644 index 00000000..14d57745 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlDefaultAdminRules.json @@ -0,0 +1,355 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessControlDefaultAdminRules", + "sourceName": "contracts/access/IAccessControlDefaultAdminRules.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminDelayChangeCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "effectSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminDelayChangeScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminTransferCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "acceptSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminTransferScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "acceptDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "beginDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + } + ], + "name": "changeDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelayIncreaseWait", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "internalType": "uint48", + "name": "acceptSchedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "effectSchedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollbackDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlEnumerable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlEnumerable.json new file mode 100644 index 00000000..3a81d13d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlEnumerable.json @@ -0,0 +1,226 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessControlEnumerable", + "sourceName": "contracts/access/IAccessControlEnumerable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json new file mode 100644 index 00000000..b5c84069 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json @@ -0,0 +1,364 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IArbSys", + "sourceName": "contracts/vendor/arbitrum/IArbSys.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "uniqueId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchNumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "indexInBatch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "callvalue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "L2ToL1Transaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "hash", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "position", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "callvalue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "L2ToL1Tx", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "reserved", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "position", + "type": "uint256" + } + ], + "name": "SendMerkleUpdate", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "arbBlockNum", + "type": "uint256" + } + ], + "name": "arbBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbChainID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbOSVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStorageGasAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isTopLevelCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "unused", + "type": "address" + } + ], + "name": "mapL1SenderContractAddressToL2Alias", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "myCallersAddressWithoutAliasing", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sendMerkleTreeState", + "outputs": [ + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "partials", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendTxToL1", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "wasMyCallersAddressAliased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "withdrawEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBeacon.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBeacon.json new file mode 100644 index 00000000..6b88dda0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBeacon.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IBeacon", + "sourceName": "contracts/proxy/beacon/IBeacon.sol", + "abi": [ + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json new file mode 100644 index 00000000..33e5e9c9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json @@ -0,0 +1,538 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IBridge", + "sourceName": "contracts/vendor/arbitrum/IBridge.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "outbox", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "BridgeCallTriggered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "InboxToggle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageIndex", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "beforeInboxAcc", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "kind", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "messageDataHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "baseFeeL1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "MessageDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "outbox", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "OutboxToggle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newSequencerInbox", + "type": "address" + } + ], + "name": "SequencerInboxUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "activeOutbox", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allowedDelayedInboxList", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "inbox", + "type": "address" + } + ], + "name": "allowedDelayedInboxes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allowedOutboxList", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "outbox", + "type": "address" + } + ], + "name": "allowedOutboxes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "delayedInboxAccs", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delayedMessageCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "messageDataHash", + "type": "bytes32" + } + ], + "name": "enqueueDelayedMessage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "afterDelayedMessagesRead", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "prevMessageCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMessageCount", + "type": "uint256" + } + ], + "name": "enqueueSequencerMessage", + "outputs": [ + { + "internalType": "uint256", + "name": "seqMessageIndex", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "beforeAcc", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "delayedAcc", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "acc", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeCall", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "rollup_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollup", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerInbox", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "sequencerInboxAccs", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerMessageCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerReportedSubMessageCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setDelayedInbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setOutbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sequencerInbox", + "type": "address" + } + ], + "name": "setSequencerInbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "batchPoster", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "submitBatchSpendingReport", + "outputs": [ + { + "internalType": "uint256", + "name": "msgNum", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICompoundTimelock.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICompoundTimelock.json new file mode 100644 index 00000000..d6ba37fd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICompoundTimelock.json @@ -0,0 +1,424 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ICompoundTimelock", + "sourceName": "contracts/vendor/compound/ICompoundTimelock.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "CancelTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ExecuteTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "NewDelay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "QueueTransaction", + "type": "event" + }, + { + "inputs": [], + "name": "GRACE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAXIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "queueTransaction", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "queuedTransactions", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "setDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json new file mode 100644 index 00000000..cfbbb327 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json @@ -0,0 +1,110 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ICrossDomainMessenger", + "sourceName": "contracts/vendor/optimism/ICrossDomainMessenger.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "FailedRelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "messageNonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + } + ], + "name": "SentMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "_gasLimit", + "type": "uint32" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xDomainMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json new file mode 100644 index 00000000..d5b2829f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IDelayedMessageProvider", + "sourceName": "contracts/vendor/arbitrum/IDelayedMessageProvider.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "InboxMessageDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + } + ], + "name": "InboxMessageDeliveredFromOrigin", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155.json new file mode 100644 index 00000000..465dfffa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155.json @@ -0,0 +1,304 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1155", + "sourceName": "contracts/token/ERC1155/IERC1155.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155MetadataURI.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155MetadataURI.json new file mode 100644 index 00000000..130bd7a0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155MetadataURI.json @@ -0,0 +1,323 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1155MetadataURI", + "sourceName": "contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155Receiver.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155Receiver.json new file mode 100644 index 00000000..e8ab4d51 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155Receiver.json @@ -0,0 +1,108 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1155Receiver", + "sourceName": "contracts/token/ERC1155/IERC1155Receiver.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1271.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1271.json new file mode 100644 index 00000000..abfe1cc1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1271.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1271", + "sourceName": "contracts/interfaces/IERC1271.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363.json new file mode 100644 index 00000000..caf5ad82 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363.json @@ -0,0 +1,382 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1363", + "sourceName": "contracts/interfaces/IERC1363.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Receiver.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Receiver.json new file mode 100644 index 00000000..6ba8b114 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Receiver.json @@ -0,0 +1,45 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1363Receiver", + "sourceName": "contracts/interfaces/IERC1363Receiver.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onTransferReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Spender.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Spender.json new file mode 100644 index 00000000..7be114c2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Spender.json @@ -0,0 +1,40 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1363Spender", + "sourceName": "contracts/interfaces/IERC1363Spender.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onApprovalReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC165.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC165.json new file mode 100644 index 00000000..7152c3eb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC165.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC165", + "sourceName": "contracts/utils/introspection/IERC165.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Implementer.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Implementer.json new file mode 100644 index 00000000..8eb5f6f2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Implementer.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1820Implementer", + "sourceName": "contracts/utils/introspection/IERC1820Implementer.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "canImplementInterfaceForAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Registry.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Registry.json new file mode 100644 index 00000000..0adaf5cc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Registry.json @@ -0,0 +1,224 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1820Registry", + "sourceName": "contracts/utils/introspection/IERC1820Registry.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "implementer", + "type": "address" + } + ], + "name": "InterfaceImplementerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newManager", + "type": "address" + } + ], + "name": "ManagerChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_interfaceHash", + "type": "bytes32" + } + ], + "name": "getInterfaceImplementer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "implementsERC165Interface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "implementsERC165InterfaceNoCache", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "interfaceName", + "type": "string" + } + ], + "name": "interfaceHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "implementer", + "type": "address" + } + ], + "name": "setInterfaceImplementer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "newManager", + "type": "address" + } + ], + "name": "setManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "updateERC165Cache", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1822Proxiable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1822Proxiable.json new file mode 100644 index 00000000..7e57cfa0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1822Proxiable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1822Proxiable", + "sourceName": "contracts/interfaces/draft-IERC1822.sol", + "abi": [ + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1967.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1967.json new file mode 100644 index 00000000..6bb0542c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1967.json @@ -0,0 +1,56 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1967", + "sourceName": "contracts/interfaces/IERC1967.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20.json new file mode 100644 index 00000000..1eaa0141 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20.json @@ -0,0 +1,194 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC20", + "sourceName": "contracts/token/ERC20/IERC20.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Metadata.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Metadata.json new file mode 100644 index 00000000..4700d188 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Metadata.json @@ -0,0 +1,233 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC20Metadata", + "sourceName": "contracts/token/ERC20/extensions/IERC20Metadata.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Permit.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Permit.json new file mode 100644 index 00000000..5a1893e3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Permit.json @@ -0,0 +1,86 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC20Permit", + "sourceName": "contracts/token/ERC20/extensions/IERC20Permit.sol", + "abi": [ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2309.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2309.json new file mode 100644 index 00000000..46bdb349 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2309.json @@ -0,0 +1,42 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC2309", + "sourceName": "contracts/interfaces/IERC2309.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "toTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAddress", + "type": "address" + } + ], + "name": "ConsecutiveTransfer", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2612.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2612.json new file mode 100644 index 00000000..334751d7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2612.json @@ -0,0 +1,86 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC2612", + "sourceName": "contracts/interfaces/IERC2612.sol", + "abi": [ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2981.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2981.json new file mode 100644 index 00000000..d4dc531f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2981.json @@ -0,0 +1,59 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC2981", + "sourceName": "contracts/interfaces/IERC2981.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "royaltyAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashBorrower.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashBorrower.json new file mode 100644 index 00000000..170493ff --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashBorrower.json @@ -0,0 +1,50 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC3156FlashBorrower", + "sourceName": "contracts/interfaces/IERC3156FlashBorrower.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onFlashLoan", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashLender.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashLender.json new file mode 100644 index 00000000..d4c75d3f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashLender.json @@ -0,0 +1,88 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC3156FlashLender", + "sourceName": "contracts/interfaces/IERC3156FlashLender.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "flashFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC3156FlashBorrower", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flashLoan", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "maxFlashLoan", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4626.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4626.json new file mode 100644 index 00000000..454effc7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4626.json @@ -0,0 +1,623 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC4626", + "sourceName": "contracts/interfaces/IERC4626.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "assetTokenAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "convertToAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "convertToShares", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "maxDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "maxAssets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "maxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "maxShares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "maxShares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "maxAssets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewMint", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "totalManagedAssets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4906.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4906.json new file mode 100644 index 00000000..5af9eb42 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4906.json @@ -0,0 +1,328 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC4906", + "sourceName": "contracts/interfaces/IERC4906.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + } + ], + "name": "BatchMetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "MetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5267.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5267.json new file mode 100644 index 00000000..102168a4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5267.json @@ -0,0 +1,60 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC5267", + "sourceName": "contracts/interfaces/IERC5267.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5313.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5313.json new file mode 100644 index 00000000..098b345c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5313.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC5313", + "sourceName": "contracts/interfaces/IERC5313.sol", + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5805.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5805.json new file mode 100644 index 00000000..5ac1da20 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5805.json @@ -0,0 +1,219 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC5805", + "sourceName": "contracts/interfaces/IERC5805.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC6372.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC6372.json new file mode 100644 index 00000000..c82d7198 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC6372.json @@ -0,0 +1,37 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC6372", + "sourceName": "contracts/interfaces/IERC6372.sol", + "abi": [ + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721.json new file mode 100644 index 00000000..e3a12316 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721.json @@ -0,0 +1,296 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721", + "sourceName": "contracts/token/ERC721/IERC721.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Enumerable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Enumerable.json new file mode 100644 index 00000000..a9c1b6d8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Enumerable.json @@ -0,0 +1,352 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721Enumerable", + "sourceName": "contracts/token/ERC721/extensions/IERC721Enumerable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Metadata.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Metadata.json new file mode 100644 index 00000000..baab9220 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Metadata.json @@ -0,0 +1,341 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721Metadata", + "sourceName": "contracts/token/ERC721/extensions/IERC721Metadata.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Receiver.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Receiver.json new file mode 100644 index 00000000..d2e10c5d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Receiver.json @@ -0,0 +1,45 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721Receiver", + "sourceName": "contracts/token/ERC721/IERC721Receiver.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777.json new file mode 100644 index 00000000..76bdbdf4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777.json @@ -0,0 +1,402 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC777", + "sourceName": "contracts/token/ERC777/IERC777.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "AuthorizedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Burned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "RevokedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Sent", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "authorizeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultOperators", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "granularity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "isOperatorFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "revokeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Recipient.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Recipient.json new file mode 100644 index 00000000..5741c586 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Recipient.json @@ -0,0 +1,49 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC777Recipient", + "sourceName": "contracts/token/ERC777/IERC777Recipient.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "userData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "tokensReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Sender.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Sender.json new file mode 100644 index 00000000..0419a025 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Sender.json @@ -0,0 +1,49 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC777Sender", + "sourceName": "contracts/token/ERC777/IERC777Sender.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "userData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "tokensToSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json new file mode 100644 index 00000000..6cbd1bde --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json @@ -0,0 +1,34 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IFxMessageProcessor", + "sourceName": "contracts/vendor/polygon/IFxMessageProcessor.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "stateId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rootMessageSender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "processMessageFromRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json new file mode 100644 index 00000000..adc25f04 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json @@ -0,0 +1,771 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IGovernor", + "sourceName": "contracts/governance/IGovernor.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json new file mode 100644 index 00000000..1770361b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json @@ -0,0 +1,1001 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IGovernorCompatibilityBravo", + "sourceName": "contracts/governance/compatibility/IGovernorCompatibilityBravo.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "getActions", + "outputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "getReceipt", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "hasVoted", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "internalType": "struct IGovernorCompatibilityBravo.Receipt", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "startBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json new file mode 100644 index 00000000..ea5bd9cd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json @@ -0,0 +1,856 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IGovernorTimelock", + "sourceName": "contracts/governance/extensions/IGovernorTimelock.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json new file mode 100644 index 00000000..246210e4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json @@ -0,0 +1,453 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IInbox", + "sourceName": "contracts/vendor/arbitrum/IInbox.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "InboxMessageDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + } + ], + "name": "InboxMessageDeliveredFromOrigin", + "type": "event" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "dataLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseFee", + "type": "uint256" + } + ], + "name": "calculateRetryableSubmissionFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2CallValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "callValueRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "createRetryableTicket", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "depositEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_sequencerInbox", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBridge", + "name": "_bridge", + "type": "address" + } + ], + "name": "postUpgradeInit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendContractTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendL1FundedContractTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendL1FundedUnsignedTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "messageData", + "type": "bytes" + } + ], + "name": "sendL2Message", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "messageData", + "type": "bytes" + } + ], + "name": "sendL2MessageFromOrigin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendUnsignedTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerInbox", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2CallValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "callValueRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "unsafeCreateRetryableTicket", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json new file mode 100644 index 00000000..29366c8a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json @@ -0,0 +1,419 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IOutbox", + "sourceName": "contracts/vendor/arbitrum/IOutbox.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "zero", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "transactionIndex", + "type": "uint256" + } + ], + "name": "OutBoxTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "outputRoot", + "type": "bytes32" + } + ], + "name": "SendRootUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "OUTBOX_VERSION", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l1Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l2Timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "calculateItemHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "path", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "item", + "type": "bytes32" + } + ], + "name": "calculateMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l1Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l2Timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l1Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l2Timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeTransactionSimulation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "isSpent", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1Block", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1EthBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1OutputId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1Sender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1Timestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rollup", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "roots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "spent", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sendRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "l2BlockHash", + "type": "bytes32" + } + ], + "name": "updateSendRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json new file mode 100644 index 00000000..1a02b6c5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json @@ -0,0 +1,126 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ITransparentUpgradeableProxy", + "sourceName": "contracts/proxy/transparent/TransparentUpgradeableProxy.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IVotes.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IVotes.json new file mode 100644 index 00000000..89161d90 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IVotes.json @@ -0,0 +1,193 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IVotes", + "sourceName": "contracts/governance/utils/IVotes.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json new file mode 100644 index 00000000..96741fd2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Initializable", + "sourceName": "contracts/proxy/utils/Initializable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json new file mode 100644 index 00000000..71280e7c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibAMB", + "sourceName": "contracts/crosschain/amb/LibAMB.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c37d84352192a9d1c9d136f3ababaab90d8fbc0bfc54bdfad597a76cd115a33564736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c37d84352192a9d1c9d136f3ababaab90d8fbc0bfc54bdfad597a76cd115a33564736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json new file mode 100644 index 00000000..3520670c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibArbitrumL1", + "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL1.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206190f169f8594207515dc7a2913dcad2c0c1a0fd794325ed434d995106bacff464736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206190f169f8594207515dc7a2913dcad2c0c1a0fd794325ed434d995106bacff464736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json new file mode 100644 index 00000000..357c6962 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibArbitrumL2", + "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL2.sol", + "abi": [ + { + "inputs": [], + "name": "ARBSYS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6091610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea2646970667358221220a997e9a9bed247ae5a204c5becb72b696557d3f8c1958c819328313f56d94d9f64736f6c634300080d0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea2646970667358221220a997e9a9bed247ae5a204c5becb72b696557d3f8c1958c819328313f56d94d9f64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json new file mode 100644 index 00000000..ae17552b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibOptimism", + "sourceName": "contracts/crosschain/optimism/LibOptimism.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bb2210e34ad6350132412385b3a70def83a4bfceae8b49adbe13cf4035bb9e1864736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bb2210e34ad6350132412385b3a70def83a4bfceae8b49adbe13cf4035bb9e1864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json new file mode 100644 index 00000000..ce20d6ca --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Math", + "sourceName": "contracts/utils/math/Math.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3421fb69c380795c0236420a50209dc26fa39d309540fbc9f7eaed7c161e7a764736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3421fb69c380795c0236420a50209dc26fa39d309540fbc9f7eaed7c161e7a764736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json new file mode 100644 index 00000000..2594b82a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MerkleProof", + "sourceName": "contracts/utils/cryptography/MerkleProof.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203a94e470524bbd013c9bcfe4535aa142bdd779f30162512fd7f3d146ae17d01e64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203a94e470524bbd013c9bcfe4535aa142bdd779f30162512fd7f3d146ae17d01e64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json new file mode 100644 index 00000000..84a150a4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json @@ -0,0 +1,217 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MinimalForwarder", + "sourceName": "contracts/metatx/MinimalForwarder.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct MinimalForwarder.ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct MinimalForwarder.ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6101606040523480156200001257600080fd5b506040518060400160405280601081526020016f26b4b734b6b0b62337b93bb0b93232b960811b81525060405180604001604052806005815260200164302e302e3160d81b815250620000756000836200012f60201b620004a71790919060201c565b61012052620000928160016200012f602090811b620004a717901c565b61014052815160208084019190912060e052815190820120610100524660a0526200012060e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526200032e565b60006020835110156200014f57620001478362000183565b90506200017d565b826200016683620001cf60201b620004e01760201c565b8151620001779260200190620001d2565b5060ff90505b92915050565b600080829050601f81511115620001ba578260405163305a27a960e01b8152600401620001b1919062000278565b60405180910390fd5b8051620001c782620002d0565b179392505050565b90565b828054620001e090620002f8565b90600052602060002090601f0160209004810192826200020457600085556200024f565b82601f106200021f57805160ff19168380011785556200024f565b828001600101855582156200024f579182015b828111156200024f57825182559160200191906001019062000232565b506200025d92915062000261565b5090565b5b808211156200025d576000815560010162000262565b600060208083528351808285015260005b81811015620002a75785810183015185820160400152820162000289565b81811115620002ba576000604083870101525b50601f01601f1916929092016040019392505050565b80516020808301519190811015620002f2576000198160200360031b1b821691505b50919050565b600181811c908216806200030d57607f821691505b602082108103620002f257634e487b7160e01b600052602260045260246000fd5b60805160a05160c05160e051610100516101205161014051610e1e6200038960003960006102d8015260006102ae0152600061072f01526000610707015260006106620152600061068c015260006106b60152610e1e6000f3fe60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610a9c565b6001600160a01b031660009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610acc565b610106565b604051610084929190610bc7565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610bea565b3480156100e257600080fd5b506100f66100f1366004610acc565b610328565b6040519015158152602001610084565b60006060610115858585610328565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610c80565b600260006101a16020890189610a9c565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610a9c565b6001600160a01b0316606088013560408901356101fb60a08b018b610ca6565b61020860208d018d610a9c565b60405160200161021a93929190610ced565b60408051601f198184030181529082905261023491610d13565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610d2f565b5a1161029457fe5b90969095509350505050565b6000606080828080836102d37f0000000000000000000000000000000000000000000000000000000000000000836104e3565b6102fe7f000000000000000000000000000000000000000000000000000000000000000060016104e3565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061043b84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061043592507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e489150610398905060208a018a610a9c565b6103a860408b0160208c01610a9c565b60408b013560608c013560808d01356103c460a08f018f610ca6565b6040516103d2929190610d51565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e08101919091526101000160405160208183030381529060405280519060200120610587565b906105b4565b90506080850135600260006104536020890189610a9c565b6001600160a01b03166001600160a01b031681526020019081526020016000205414801561049e57506104896020860186610a9c565b6001600160a01b0316816001600160a01b0316145b95945050505050565b60006020835110156104c3576104bc836105d8565b90506104da565b828281516104d49260200190610a03565b5060ff90505b92915050565b90565b606060ff83146104f6576104bc83610616565b81805461050290610d61565b80601f016020809104026020016040519081016040528092919081815260200182805461052e90610d61565b801561057b5780601f106105505761010080835404028352916020019161057b565b820191906000526020600020905b81548152906001019060200180831161055e57829003601f168201915b505050505090506104da565b60006104da610594610655565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060006105c38585610785565b915091506105d0816107ca565b509392505050565b600080829050601f81511115610603578260405163305a27a960e01b81526004016101789190610d9b565b805161060e82610dae565b179392505050565b6060600061062383610917565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156106ae57507f000000000000000000000000000000000000000000000000000000000000000046145b156106d857507f000000000000000000000000000000000000000000000000000000000000000090565b610780604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b60008082516041036107bb5760208301516040840151606085015160001a6107af8782858561093f565b945094505050506107c3565b506000905060025b9250929050565b60008160048111156107de576107de610dd2565b036107e65750565b60018160048111156107fa576107fa610dd2565b036108475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561085b5761085b610dd2565b036108a85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156108bc576108bc610dd2565b036109145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b600060ff8216601f8111156104da57604051632cd44ac360e21b815260040160405180910390fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561097657506000905060036109fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156109ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166109f3576000600192509250506109fa565b9150600090505b94509492505050565b828054610a0f90610d61565b90600052602060002090601f016020900481019282610a315760008555610a77565b82601f10610a4a57805160ff1916838001178555610a77565b82800160010185558215610a77579182015b82811115610a77578251825591602001919060010190610a5c565b50610a83929150610a87565b5090565b5b80821115610a835760008155600101610a88565b600060208284031215610aae57600080fd5b81356001600160a01b0381168114610ac557600080fd5b9392505050565b600080600060408486031215610ae157600080fd5b833567ffffffffffffffff80821115610af957600080fd5b9085019060c08288031215610b0d57600080fd5b90935060208501359080821115610b2357600080fd5b818601915086601f830112610b3757600080fd5b813581811115610b4657600080fd5b876020828501011115610b5857600080fd5b6020830194508093505050509250925092565b60005b83811015610b86578181015183820152602001610b6e565b83811115610b95576000848401525b50505050565b60008151808452610bb3816020860160208601610b6b565b601f01601f19169290920160200192915050565b8215158152604060208201526000610be26040830184610b9b565b949350505050565b60ff60f81b881681526000602060e081840152610c0a60e084018a610b9b565b8381036040850152610c1c818a610b9b565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610c6e57835183529284019291840191600101610c52565b50909c9b505050505050505050505050565b60008219821115610ca157634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610cbd57600080fd5b83018035915067ffffffffffffffff821115610cd857600080fd5b6020019150368190038213156107c357600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610d25818460208701610b6b565b9190910192915050565b600082610d4c57634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610d7557607f821691505b602082108103610d9557634e487b7160e01b600052602260045260246000fd5b50919050565b602081526000610ac56020830184610b9b565b80516020808301519190811015610d955760001960209190910360031b1b16919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206fe5ed5ceb0154292fd4bec46d808cd37f1bb24363f695e1a84a3f4f9c71b78164736f6c634300080d0033", + "deployedBytecode": "0x60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610a9c565b6001600160a01b031660009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610acc565b610106565b604051610084929190610bc7565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610bea565b3480156100e257600080fd5b506100f66100f1366004610acc565b610328565b6040519015158152602001610084565b60006060610115858585610328565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610c80565b600260006101a16020890189610a9c565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610a9c565b6001600160a01b0316606088013560408901356101fb60a08b018b610ca6565b61020860208d018d610a9c565b60405160200161021a93929190610ced565b60408051601f198184030181529082905261023491610d13565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610d2f565b5a1161029457fe5b90969095509350505050565b6000606080828080836102d37f0000000000000000000000000000000000000000000000000000000000000000836104e3565b6102fe7f000000000000000000000000000000000000000000000000000000000000000060016104e3565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061043b84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061043592507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e489150610398905060208a018a610a9c565b6103a860408b0160208c01610a9c565b60408b013560608c013560808d01356103c460a08f018f610ca6565b6040516103d2929190610d51565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e08101919091526101000160405160208183030381529060405280519060200120610587565b906105b4565b90506080850135600260006104536020890189610a9c565b6001600160a01b03166001600160a01b031681526020019081526020016000205414801561049e57506104896020860186610a9c565b6001600160a01b0316816001600160a01b0316145b95945050505050565b60006020835110156104c3576104bc836105d8565b90506104da565b828281516104d49260200190610a03565b5060ff90505b92915050565b90565b606060ff83146104f6576104bc83610616565b81805461050290610d61565b80601f016020809104026020016040519081016040528092919081815260200182805461052e90610d61565b801561057b5780601f106105505761010080835404028352916020019161057b565b820191906000526020600020905b81548152906001019060200180831161055e57829003601f168201915b505050505090506104da565b60006104da610594610655565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060006105c38585610785565b915091506105d0816107ca565b509392505050565b600080829050601f81511115610603578260405163305a27a960e01b81526004016101789190610d9b565b805161060e82610dae565b179392505050565b6060600061062383610917565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156106ae57507f000000000000000000000000000000000000000000000000000000000000000046145b156106d857507f000000000000000000000000000000000000000000000000000000000000000090565b610780604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b60008082516041036107bb5760208301516040840151606085015160001a6107af8782858561093f565b945094505050506107c3565b506000905060025b9250929050565b60008160048111156107de576107de610dd2565b036107e65750565b60018160048111156107fa576107fa610dd2565b036108475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561085b5761085b610dd2565b036108a85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156108bc576108bc610dd2565b036109145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b600060ff8216601f8111156104da57604051632cd44ac360e21b815260040160405180910390fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561097657506000905060036109fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156109ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166109f3576000600192509250506109fa565b9150600090505b94509492505050565b828054610a0f90610d61565b90600052602060002090601f016020900481019282610a315760008555610a77565b82601f10610a4a57805160ff1916838001178555610a77565b82800160010185558215610a77579182015b82811115610a77578251825591602001919060010190610a5c565b50610a83929150610a87565b5090565b5b80821115610a835760008155600101610a88565b600060208284031215610aae57600080fd5b81356001600160a01b0381168114610ac557600080fd5b9392505050565b600080600060408486031215610ae157600080fd5b833567ffffffffffffffff80821115610af957600080fd5b9085019060c08288031215610b0d57600080fd5b90935060208501359080821115610b2357600080fd5b818601915086601f830112610b3757600080fd5b813581811115610b4657600080fd5b876020828501011115610b5857600080fd5b6020830194508093505050509250925092565b60005b83811015610b86578181015183820152602001610b6e565b83811115610b95576000848401525b50505050565b60008151808452610bb3816020860160208601610b6b565b601f01601f19169290920160200192915050565b8215158152604060208201526000610be26040830184610b9b565b949350505050565b60ff60f81b881681526000602060e081840152610c0a60e084018a610b9b565b8381036040850152610c1c818a610b9b565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610c6e57835183529284019291840191600101610c52565b50909c9b505050505050505050505050565b60008219821115610ca157634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610cbd57600080fd5b83018035915067ffffffffffffffff821115610cd857600080fd5b6020019150368190038213156107c357600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610d25818460208701610b6b565b9190910192915050565b600082610d4c57634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610d7557607f821691505b602082108103610d9557634e487b7160e01b600052602260045260246000fd5b50919050565b602081526000610ac56020830184610b9b565b80516020808301519190811015610d955760001960209190910360031b1b16919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206fe5ed5ceb0154292fd4bec46d808cd37f1bb24363f695e1a84a3f4f9c71b78164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Multicall.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Multicall.json new file mode 100644 index 00000000..f0f3ba9b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Multicall.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Multicall", + "sourceName": "contracts/utils/Multicall.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable.json new file mode 100644 index 00000000..58c474d6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable.json @@ -0,0 +1,63 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Ownable", + "sourceName": "contracts/access/Ownable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable2Step.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable2Step.json new file mode 100644 index 00000000..9aef3478 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable2Step.json @@ -0,0 +1,102 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Ownable2Step", + "sourceName": "contracts/access/Ownable2Step.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Pausable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Pausable.json new file mode 100644 index 00000000..a9dfd35e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Pausable.json @@ -0,0 +1,50 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Pausable", + "sourceName": "contracts/security/Pausable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json new file mode 100644 index 00000000..2dc38f34 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json @@ -0,0 +1,313 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PaymentSplitter", + "sourceName": "contracts/finance/PaymentSplitter.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "payees", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "shares_", + "type": "uint256[]" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20PaymentReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "PayeeAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "PaymentReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "PaymentReleased", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "payee", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "shares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "totalReleased", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReleased", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052604051620011d3380380620011d383398101604081905262000026916200042e565b8051825114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b60005b82518110156200015757620001428382815181106200011157620001116200050c565b60200260200101518383815181106200012e576200012e6200050c565b60200260200101516200016060201b60201c565b806200014e8162000538565b915050620000ee565b5050506200056f565b6001600160a01b038216620001cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b600081116200021f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260026020526040902054156200029b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200030390829062000554565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200038d576200038d6200034c565b604052919050565b60006001600160401b03821115620003b157620003b16200034c565b5060051b60200190565b600082601f830112620003cd57600080fd5b81516020620003e6620003e08362000395565b62000362565b82815260059290921b840181019181810190868411156200040657600080fd5b8286015b848110156200042357805183529183019183016200040a565b509695505050505050565b600080604083850312156200044257600080fd5b82516001600160401b03808211156200045a57600080fd5b818501915085601f8301126200046f57600080fd5b8151602062000482620003e08362000395565b82815260059290921b84018101918181019089841115620004a257600080fd5b948201945b83861015620004d95785516001600160a01b0381168114620004c95760008081fd5b82529482019490820190620004a7565b91880151919650909350505080821115620004f357600080fd5b506200050285828601620003bb565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200054d576200054d62000522565b5060010190565b600082198211156200056a576200056a62000522565b500190565b610c54806200057f6000396000f3fe6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109c8565b6102c9565b005b34801561011c57600080fd5b506000545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e5565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e5565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a1e565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109c8565b6001600160a01b031660009081526003602052604090205490565b34801561021457600080fd5b506101216102233660046109c8565b6104fa565b34801561023457600080fd5b506101216102433660046109e5565b610542565b34801561025457600080fd5b506101216102633660046109c8565b6001600160a01b031660009081526002602052604090205490565b34801561028a57600080fd5b506101216102993660046109c8565b6001600160a01b031660009081526005602052604090205490565b3480156102c057600080fd5b50600154610121565b6001600160a01b0381166000908152600260205260409020546103075760405162461bcd60e51b81526004016102fe90610a37565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a7d565b80600160008282546103469190610ade565b90915550506001600160a01b0382166000908152600360205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152600260205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a37565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a7d565b6001600160a01b03831660009081526005602052604081208054839290610444908490610ade565b90915550506001600160a01b03808416600090815260066020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000600482815481106104df576104df610af6565b6000918252602090912001546001600160a01b031692915050565b60008061050660015490565b6105109047610ade565b905061053b8382610536866001600160a01b031660009081526003602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0c565b6105cf9190610ade565b6001600160a01b03808616600090815260066020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107b8565b600080546001600160a01b0385168252600260205260408220548391906107a49086610b25565b6107ae9190610b44565b6106059190610b66565b600061080d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661088d9092919063ffffffff16565b905080516000148061082e57508080602001905181019061082e9190610b7d565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b49190610bcf565b60006040518083038185875af1925050503d80600081146108f1576040519150601f19603f3d011682016040523d82523d6000602084013e6108f6565b606091505b509150915061090787838387610912565b979650505050505050565b6060831561098157825160000361097a576001600160a01b0385163b61097a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109965781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610beb565b6001600160a01b03811681146109c557600080fd5b50565b6000602082840312156109da57600080fd5b813561053b816109b0565b600080604083850312156109f857600080fd5b8235610a03816109b0565b91506020830135610a13816109b0565b809150509250929050565b600060208284031215610a3057600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af157610af1610ac8565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b1e57600080fd5b5051919050565b6000816000190483118215151615610b3f57610b3f610ac8565b500290565b600082610b6157634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7857610b78610ac8565b500390565b600060208284031215610b8f57600080fd5b8151801515811461053b57600080fd5b60005b83811015610bba578181015183820152602001610ba2565b83811115610bc9576000848401525b50505050565b60008251610be1818460208701610b9f565b9190910192915050565b6020815260008251806020840152610c0a816040850160208701610b9f565b601f01601f1916919091016040019291505056fea2646970667358221220d987fb49ce7826e2aaff592a3a8ca3b459a6f78dc41ef1b2cb4bcf65fa6a1ea164736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109c8565b6102c9565b005b34801561011c57600080fd5b506000545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e5565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e5565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a1e565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109c8565b6001600160a01b031660009081526003602052604090205490565b34801561021457600080fd5b506101216102233660046109c8565b6104fa565b34801561023457600080fd5b506101216102433660046109e5565b610542565b34801561025457600080fd5b506101216102633660046109c8565b6001600160a01b031660009081526002602052604090205490565b34801561028a57600080fd5b506101216102993660046109c8565b6001600160a01b031660009081526005602052604090205490565b3480156102c057600080fd5b50600154610121565b6001600160a01b0381166000908152600260205260409020546103075760405162461bcd60e51b81526004016102fe90610a37565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a7d565b80600160008282546103469190610ade565b90915550506001600160a01b0382166000908152600360205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152600260205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a37565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a7d565b6001600160a01b03831660009081526005602052604081208054839290610444908490610ade565b90915550506001600160a01b03808416600090815260066020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000600482815481106104df576104df610af6565b6000918252602090912001546001600160a01b031692915050565b60008061050660015490565b6105109047610ade565b905061053b8382610536866001600160a01b031660009081526003602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0c565b6105cf9190610ade565b6001600160a01b03808616600090815260066020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107b8565b600080546001600160a01b0385168252600260205260408220548391906107a49086610b25565b6107ae9190610b44565b6106059190610b66565b600061080d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661088d9092919063ffffffff16565b905080516000148061082e57508080602001905181019061082e9190610b7d565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b49190610bcf565b60006040518083038185875af1925050503d80600081146108f1576040519150601f19603f3d011682016040523d82523d6000602084013e6108f6565b606091505b509150915061090787838387610912565b979650505050505050565b6060831561098157825160000361097a576001600160a01b0385163b61097a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109965781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610beb565b6001600160a01b03811681146109c557600080fd5b50565b6000602082840312156109da57600080fd5b813561053b816109b0565b600080604083850312156109f857600080fd5b8235610a03816109b0565b91506020830135610a13816109b0565b809150509250929050565b600060208284031215610a3057600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af157610af1610ac8565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b1e57600080fd5b5051919050565b6000816000190483118215151615610b3f57610b3f610ac8565b500290565b600082610b6157634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7857610b78610ac8565b500390565b600060208284031215610b8f57600080fd5b8151801515811461053b57600080fd5b60005b83811015610bba578181015183820152602001610ba2565b83811115610bc9576000848401525b50505050565b60008251610be1818460208701610b9f565b9190910192915050565b6020815260008251806020840152610c0a816040850160208701610b9f565b601f01601f1916919091016040019291505056fea2646970667358221220d987fb49ce7826e2aaff592a3a8ca3b459a6f78dc41ef1b2cb4bcf65fa6a1ea164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Proxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Proxy.json new file mode 100644 index 00000000..a2b195d4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Proxy.json @@ -0,0 +1,19 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Proxy", + "sourceName": "contracts/proxy/Proxy.sol", + "abi": [ + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json new file mode 100644 index 00000000..d595e944 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json @@ -0,0 +1,160 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyAdmin", + "sourceName": "contracts/proxy/transparent/ProxyAdmin.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61069a8061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105e2565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c990869086906004016105ff565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff8082111561055957600080fd5b818601915086601f83011261056d57600080fd5b81358181111561057f5761057f6104f6565b604051601f8201601f19908116603f011681019083821181831017156105a7576105a76104f6565b816040528281528960208487010111156105c057600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156105f457600080fd5b81516104b681610484565b60018060a01b038316815260006020604081840152835180604085015260005b8181101561063b5785810183015185820160600152820161061f565b8181111561064d576000606083870101525b50601f01601f19169290920160600194935050505056fea264697066735822122076254e1b299bc3634bc290e818ae9ec1432090068736205a6eea82c6f8707b3064736f6c634300080d0033", + "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105e2565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c990869086906004016105ff565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff8082111561055957600080fd5b818601915086601f83011261056d57600080fd5b81358181111561057f5761057f6104f6565b604051601f8201601f19908116603f011681019083821181831017156105a7576105a76104f6565b816040528281528960208487010111156105c057600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156105f457600080fd5b81516104b681610484565b60018060a01b038316815260006020604081840152835180604085015260005b8181101561063b5785810183015185820160600152820161061f565b8181111561064d576000606083870101525b50601f01601f19169290920160600194935050505056fea264697066735822122076254e1b299bc3634bc290e818ae9ec1432090068736205a6eea82c6f8707b3064736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json new file mode 100644 index 00000000..319480a6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PullPayment", + "sourceName": "contracts/security/PullPayment.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "dest", + "type": "address" + } + ], + "name": "payments", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdrawPayments", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json new file mode 100644 index 00000000..0b5c9378 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ReentrancyGuard", + "sourceName": "contracts/security/ReentrancyGuard.sol", + "abi": [], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json new file mode 100644 index 00000000..93d97d67 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json @@ -0,0 +1,235 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RefundEscrow", + "sourceName": "contracts/utils/escrow/RefundEscrow.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "beneficiary_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "RefundsClosed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "RefundsEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "beneficiaryWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "close", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "refundee", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "depositsOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "enableRefunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "state", + "outputs": [ + { + "internalType": "enum RefundEscrow.State", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "withdrawalAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60a060405234801561001057600080fd5b50604051610b22380380610b2283398101604081905261002f91610113565b610038336100c3565b6001600160a01b0381166100a85760405162461bcd60e51b815260206004820152602d60248201527f526566756e64457363726f773a2062656e65666963696172792069732074686560448201526c207a65726f206164647265737360981b606482015260840160405180910390fd5b6001600160a01b03166080526002805460ff19169055610143565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561012557600080fd5b81516001600160a01b038116811461013c57600080fd5b9392505050565b6080516109be6101646000396000818160bb015261051b01526109be6000f3fe6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b146101895780639af6549a146101a7578063c19d93fb146101bc578063e3a9db1a146101dc578063f2fde38b14610220578063f340fa011461024057600080fd5b806338af3eed146100ac57806343d726d6146100f857806351cff8d91461010f578063685ca1941461012f578063715018a61461015f5780638c52dc4114610174575b600080fd5b3480156100b857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010457600080fd5b5061010d610253565b005b34801561011b57600080fd5b5061010d61012a366004610900565b61030f565b34801561013b57600080fd5b5061014f61014a366004610900565b61038c565b60405190151581526020016100ef565b34801561016b57600080fd5b5061010d6103ae565b34801561018057600080fd5b5061010d6103c2565b34801561019557600080fd5b506000546001600160a01b03166100db565b3480156101b357600080fd5b5061010d610483565b3480156101c857600080fd5b5060025460ff166040516100ef919061093a565b3480156101e857600080fd5b506102126101f7366004610900565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100ef565b34801561022c57600080fd5b5061010d61023b366004610900565b610541565b61010d61024e366004610900565b6105b7565b61025b61063a565b600060025460ff16600281111561027457610274610924565b146102d85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b6002805460ff1916811790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b6103188161038c565b6103805760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102cf565b61038981610694565b50565b6000600160025460ff1660028111156103a7576103a7610924565b1492915050565b6103b661063a565b6103c0600061070b565b565b6103ca61063a565b600060025460ff1660028111156103e3576103e3610924565b1461044b5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102cf565b6002805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b6002805460ff16600281111561049b5761049b610924565b1461050e5760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102cf565b6103c06001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000164761075b565b61054961063a565b6001600160a01b0381166105ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cf565b6103898161070b565b600060025460ff1660028111156105d0576105d0610924565b146106315760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102cf565b61038981610879565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102cf565b61069c61063a565b6001600160a01b03811660008181526001602052604081208054919055906106c4908261075b565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516106ff91815260200190565b60405180910390a25050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b804710156107ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146107f8576040519150601f19603f3d011682016040523d82523d6000602084013e6107fd565b606091505b50509050806108745760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102cf565b505050565b61088161063a565b6001600160a01b0381166000908152600160205260408120805434928392916108ab908490610962565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016106ff565b6001600160a01b038116811461038957600080fd5b60006020828403121561091257600080fd5b813561091d816108eb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016003831061095c57634e487b7160e01b600052602160045260246000fd5b91905290565b6000821982111561098357634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212209451dd3e19c5e6257ae2e4369be3f5f0df39f043cc4afbd5e6052adc8e0d341964736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b146101895780639af6549a146101a7578063c19d93fb146101bc578063e3a9db1a146101dc578063f2fde38b14610220578063f340fa011461024057600080fd5b806338af3eed146100ac57806343d726d6146100f857806351cff8d91461010f578063685ca1941461012f578063715018a61461015f5780638c52dc4114610174575b600080fd5b3480156100b857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010457600080fd5b5061010d610253565b005b34801561011b57600080fd5b5061010d61012a366004610900565b61030f565b34801561013b57600080fd5b5061014f61014a366004610900565b61038c565b60405190151581526020016100ef565b34801561016b57600080fd5b5061010d6103ae565b34801561018057600080fd5b5061010d6103c2565b34801561019557600080fd5b506000546001600160a01b03166100db565b3480156101b357600080fd5b5061010d610483565b3480156101c857600080fd5b5060025460ff166040516100ef919061093a565b3480156101e857600080fd5b506102126101f7366004610900565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100ef565b34801561022c57600080fd5b5061010d61023b366004610900565b610541565b61010d61024e366004610900565b6105b7565b61025b61063a565b600060025460ff16600281111561027457610274610924565b146102d85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b6002805460ff1916811790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b6103188161038c565b6103805760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102cf565b61038981610694565b50565b6000600160025460ff1660028111156103a7576103a7610924565b1492915050565b6103b661063a565b6103c0600061070b565b565b6103ca61063a565b600060025460ff1660028111156103e3576103e3610924565b1461044b5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102cf565b6002805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b6002805460ff16600281111561049b5761049b610924565b1461050e5760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102cf565b6103c06001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000164761075b565b61054961063a565b6001600160a01b0381166105ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cf565b6103898161070b565b600060025460ff1660028111156105d0576105d0610924565b146106315760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102cf565b61038981610879565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102cf565b61069c61063a565b6001600160a01b03811660008181526001602052604081208054919055906106c4908261075b565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516106ff91815260200190565b60405180910390a25050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b804710156107ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146107f8576040519150601f19603f3d011682016040523d82523d6000602084013e6107fd565b606091505b50509050806108745760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102cf565b505050565b61088161063a565b6001600160a01b0381166000908152600160205260408120805434928392916108ab908490610962565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016106ff565b6001600160a01b038116811461038957600080fd5b60006020828403121561091257600080fd5b813561091d816108eb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016003831061095c57634e487b7160e01b600052602160045260246000fd5b91905290565b6000821982111561098357634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212209451dd3e19c5e6257ae2e4369be3f5f0df39f043cc4afbd5e6052adc8e0d341964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json new file mode 100644 index 00000000..647864e9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeCast", + "sourceName": "contracts/utils/math/SafeCast.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209b70f13b9037ee79c19308444b56b249ba516d35f57eaf86c037b39c5bf00f0464736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209b70f13b9037ee79c19308444b56b249ba516d35f57eaf86c037b39c5bf00f0464736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json new file mode 100644 index 00000000..b9050921 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeERC20", + "sourceName": "contracts/token/ERC20/utils/SafeERC20.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b80db6a35dc835f568009f7be47739d5e03aa028c58404766b6e2a2584321aa064736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b80db6a35dc835f568009f7be47739d5e03aa028c58404766b6e2a2584321aa064736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json new file mode 100644 index 00000000..3aff1478 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeMath", + "sourceName": "contracts/utils/math/SafeMath.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206bad85ec3f129e4a2d14c0ffec29b8707e9fa0d94b1f1866adbff6471def4ddb64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206bad85ec3f129e4a2d14c0ffec29b8707e9fa0d94b1f1866adbff6471def4ddb64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ShortStrings.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ShortStrings.json new file mode 100644 index 00000000..196d0a23 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ShortStrings.json @@ -0,0 +1,27 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ShortStrings", + "sourceName": "contracts/utils/ShortStrings.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + } + ], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d0db41542d31ccd96c0c2e6e7f432a62af284bce7400577ffbcc43205fb5825264736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d0db41542d31ccd96c0c2e6e7f432a62af284bce7400577ffbcc43205fb5825264736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json new file mode 100644 index 00000000..75649089 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignatureChecker", + "sourceName": "contracts/utils/cryptography/SignatureChecker.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220767b2d621e5661e0a91e7ef50e37dfb79311d08bd7d95516bfedb69ebb980e9a64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220767b2d621e5661e0a91e7ef50e37dfb79311d08bd7d95516bfedb69ebb980e9a64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json new file mode 100644 index 00000000..343f4c7c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignedMath", + "sourceName": "contracts/utils/math/SignedMath.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205cc84bcb96ea603ae82ad7a10d9c3b8fd7d26a5cb5168847aaac64c60399549964736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205cc84bcb96ea603ae82ad7a10d9c3b8fd7d26a5cb5168847aaac64c60399549964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json new file mode 100644 index 00000000..d13783eb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignedSafeMath", + "sourceName": "contracts/utils/math/SignedSafeMath.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220eb083871ab45137463fe50ab403fd89f48c46327b5ac689f37963752e92d060064736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220eb083871ab45137463fe50ab403fd89f48c46327b5ac689f37963752e92d060064736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json new file mode 100644 index 00000000..e80087cb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "StorageSlot", + "sourceName": "contracts/utils/StorageSlot.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207aec9d374217a385544909e233e47dc530ff22774efe9a7b3f32d59634b911de64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207aec9d374217a385544909e233e47dc530ff22774efe9a7b3f32d59634b911de64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json new file mode 100644 index 00000000..7cba042b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Strings", + "sourceName": "contracts/utils/Strings.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099dc6e723e28541c81b9dfe9b80160aa492ed578a0a0233f4ab4731b030d604164736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099dc6e723e28541c81b9dfe9b80160aa492ed578a0a0233f4ab4731b030d604164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json new file mode 100644 index 00000000..8484276a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json @@ -0,0 +1,900 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TimelockController", + "sourceName": "contracts/governance/TimelockController.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "minDelay", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "proposers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "executors", + "type": "address[]" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "CallExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "CallSalt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "CallScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "Cancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDuration", + "type": "uint256" + } + ], + "name": "MinDelayChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "CANCELLER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PROPOSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TIMELOCK_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "executeBatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getMinDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperationBatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationDone", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationPending", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationReady", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "schedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "scheduleBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b50604051620023a4380380620023a4833981016040819052620000349162000408565b6200004f60008051602062002324833981519152806200022d565b6200007960008051602062002344833981519152600080516020620023248339815191526200022d565b620000a360008051602062002364833981519152600080516020620023248339815191526200022d565b620000cd60008051602062002384833981519152600080516020620023248339815191526200022d565b620000e8600080516020620023248339815191523062000278565b6001600160a01b03811615620001135762000113600080516020620023248339815191528262000278565b60005b835181101562000199576200015d600080516020620023448339815191528583815181106200014957620001496200048f565b60200260200101516200027860201b60201c565b62000186600080516020620023848339815191528583815181106200014957620001496200048f565b6200019181620004a5565b905062000116565b5060005b8251811015620001e357620001d0600080516020620023648339815191528483815181106200014957620001496200048f565b620001db81620004a5565b90506200019d565b5060028490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050620004cd565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000284828262000288565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000284576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200035657600080fd5b919050565b600082601f8301126200036d57600080fd5b815160206001600160401b03808311156200038c576200038c62000328565b8260051b604051601f19603f83011681018181108482111715620003b457620003b462000328565b604052938452858101830193838101925087851115620003d357600080fd5b83870191505b84821015620003fd57620003ed826200033e565b83529183019190830190620003d9565b979650505050505050565b600080600080608085870312156200041f57600080fd5b845160208601519094506001600160401b03808211156200043f57600080fd5b6200044d888389016200035b565b945060408701519150808211156200046457600080fd5b5062000473878288016200035b565b92505062000484606086016200033e565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b600060018201620004c657634e487b7160e01b600052601160045260246000fd5b5060010190565b611e4780620004dd6000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610582578063e38335e5146105a2578063f23a6e61146105b5578063f27a0c92146105e157600080fd5b8063bc197c8114610509578063c4d252f514610535578063d45c44351461055557600080fd5b806391d14854116100c657806391d1485414610480578063a217fddf146104a0578063b08e51c0146104b5578063b1c5f427146104e957600080fd5b80638065657f1461040c5780638f2a0bb01461042c5780638f61f4f51461044c57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038c57806336568abe146103ac578063584b153e146103cc57806364d62353146103ec57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036c57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611442565b6105f6565b005b3480156101f557600080fd5b506102096102043660046114b6565b6106cc565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e0565b6106f7565b3480156102b357600080fd5b506102096102c236600461154b565b6107ac565b3480156102d357600080fd5b506102f26102e2366004611619565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b5061025261032636600461154b565b60009081526020819052604090206001015490565b34801561034757600080fd5b5061020961035636600461154b565b6000908152600160208190526040909120541490565b34801561037857600080fd5b506101e7610387366004611680565b6107d2565b34801561039857600080fd5b506102096103a736600461154b565b6107fc565b3480156103b857600080fd5b506101e76103c7366004611680565b610815565b3480156103d857600080fd5b506102096103e736600461154b565b610898565b3480156103f857600080fd5b506101e761040736600461154b565b6108ae565b34801561041857600080fd5b506102526104273660046114e0565b610952565b34801561043857600080fd5b506101e76104473660046116f0565b610991565b34801561045857600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048c57600080fd5b5061020961049b366004611680565b610b24565b3480156104ac57600080fd5b50610252600081565b3480156104c157600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f557600080fd5b506102526105043660046117a1565b610b4d565b34801561051557600080fd5b506102f26105243660046118c8565b63bc197c8160e01b95945050505050565b34801561054157600080fd5b506101e761055036600461154b565b610b92565b34801561056157600080fd5b5061025261057036600461154b565b60009081526001602052604090205490565b34801561058e57600080fd5b506101e761059d366004611680565b610c67565b6101e76105b03660046117a1565b610c8c565b3480156105c157600080fd5b506102f26105d0366004611971565b63f23a6e6160e01b95945050505050565b3480156105ed57600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161062081610e16565b6000610630898989898989610952565b905061063c8184610e23565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610678969594939291906119fe565b60405180910390a383156106c157807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b891815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f157506106f182610f12565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610723816000610b24565b610731576107318133610f47565b6000610741888888888888610952565b905061074d8185610fa0565b6107598888888861103c565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107919493929190611a3b565b60405180910390a36107a28161110f565b5050505050505050565b6000818152600160205260408120546001811180156107cb5750428111155b9392505050565b6000828152602081905260409020600101546107ed81610e16565b6107f78383611148565b505050565b60008181526001602052604081205481905b1192915050565b6001600160a01b038116331461088a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089482826111cc565b5050565b600081815260016020819052604082205461080e565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610881565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b600086868686868660405160200161096f969594939291906119fe565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e16565b8887146109da5760405162461bcd60e51b815260040161088190611a6d565b8885146109f95760405162461bcd60e51b815260040161088190611a6d565b6000610a0b8b8b8b8b8b8b8b8b610b4d565b9050610a178184610e23565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab0565b9050602002016020810190610a6c9190611ac6565b8d8d86818110610a7e57610a7e611ab0565b905060200201358c8c87818110610a9757610a97611ab0565b9050602002810190610aa99190611ae1565b8c8b604051610abd969594939291906119fe565b60405180910390a3610ace81611b3d565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b6e989796959493929190611be6565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbc81610e16565b610bc582610898565b610c2b5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610881565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c8281610e16565b6107f783836111cc565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cb8816000610b24565b610cc657610cc68133610f47565b878614610ce55760405162461bcd60e51b815260040161088190611a6d565b878414610d045760405162461bcd60e51b815260040161088190611a6d565b6000610d168a8a8a8a8a8a8a8a610b4d565b9050610d228185610fa0565b60005b89811015610e005760008b8b83818110610d4157610d41611ab0565b9050602002016020810190610d569190611ac6565b905060008a8a84818110610d6c57610d6c611ab0565b9050602002013590503660008a8a86818110610d8a57610d8a611ab0565b9050602002810190610d9c9190611ae1565b91509150610dac8484848461103c565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de39493929190611a3b565b60405180910390a35050505080610df990611b3d565b9050610d25565b50610e0a8161110f565b50505050505050505050565b610e208133610f47565b50565b610e2c826107fc565b15610e915760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610881565b600254811015610ef25760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610881565b610efc8142611c91565b6000928352600160205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f157506301ffc9a760e01b6001600160e01b03198316146106f1565b610f518282610b24565b61089457610f5e81611231565b610f69836020611243565b604051602001610f7a929190611cd9565b60408051601f198184030181529082905262461bcd60e51b825261088191600401611d4e565b610fa9826107ac565b610fc55760405162461bcd60e51b815260040161088190611d81565b801580610fe15750600081815260016020819052604090912054145b6108945760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610881565b6000846001600160a01b0316848484604051611059929190611dcb565b60006040518083038185875af1925050503d8060008114611096576040519150601f19603f3d011682016040523d82523d6000602084013e61109b565b606091505b50509050806111085760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610881565b5050505050565b611118816107ac565b6111345760405162461bcd60e51b815260040161088190611d81565b600090815260016020819052604090912055565b6111528282610b24565b610894576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d68282610b24565b15610894576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f16001600160a01b03831660145b60606000611252836002611ddb565b61125d906002611c91565b6001600160401b0381111561127457611274611564565b6040519080825280601f01601f19166020018201604052801561129e576020820181803683370190505b509050600360fc1b816000815181106112b9576112b9611ab0565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112e8576112e8611ab0565b60200101906001600160f81b031916908160001a905350600061130c846002611ddb565b611317906001611c91565b90505b600181111561138f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061134b5761134b611ab0565b1a60f81b82828151811061136157611361611ab0565b60200101906001600160f81b031916908160001a90535060049490941c9361138881611dfa565b905061131a565b5083156107cb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610881565b80356001600160a01b03811681146113f557600080fd5b919050565b60008083601f84011261140c57600080fd5b5081356001600160401b0381111561142357600080fd5b60208301915083602082850101111561143b57600080fd5b9250929050565b600080600080600080600060c0888a03121561145d57600080fd5b611466886113de565b96506020880135955060408801356001600160401b0381111561148857600080fd5b6114948a828b016113fa565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114c857600080fd5b81356001600160e01b0319811681146107cb57600080fd5b60008060008060008060a087890312156114f957600080fd5b611502876113de565b95506020870135945060408701356001600160401b0381111561152457600080fd5b61153089828a016113fa565b979a9699509760608101359660809091013595509350505050565b60006020828403121561155d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a2576115a2611564565b604052919050565b600082601f8301126115bb57600080fd5b81356001600160401b038111156115d4576115d4611564565b6115e7601f8201601f191660200161157a565b8181528460208386010111156115fc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561162f57600080fd5b611638856113de565b9350611646602086016113de565b92506040850135915060608501356001600160401b0381111561166857600080fd5b611674878288016115aa565b91505092959194509250565b6000806040838503121561169357600080fd5b823591506116a3602084016113de565b90509250929050565b60008083601f8401126116be57600080fd5b5081356001600160401b038111156116d557600080fd5b6020830191508360208260051b850101111561143b57600080fd5b600080600080600080600080600060c08a8c03121561170e57600080fd5b89356001600160401b038082111561172557600080fd5b6117318d838e016116ac565b909b50995060208c013591508082111561174a57600080fd5b6117568d838e016116ac565b909950975060408c013591508082111561176f57600080fd5b5061177c8c828d016116ac565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117bd57600080fd5b88356001600160401b03808211156117d457600080fd5b6117e08c838d016116ac565b909a50985060208b01359150808211156117f957600080fd5b6118058c838d016116ac565b909850965060408b013591508082111561181e57600080fd5b5061182b8b828c016116ac565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185a57600080fd5b813560206001600160401b0382111561187557611875611564565b8160051b61188482820161157a565b928352848101820192828101908785111561189e57600080fd5b83870192505b848310156118bd578235825291830191908301906118a4565b979650505050505050565b600080600080600060a086880312156118e057600080fd5b6118e9866113de565b94506118f7602087016113de565b935060408601356001600160401b038082111561191357600080fd5b61191f89838a01611849565b9450606088013591508082111561193557600080fd5b61194189838a01611849565b9350608088013591508082111561195757600080fd5b50611964888289016115aa565b9150509295509295909350565b600080600080600060a0868803121561198957600080fd5b611992866113de565b94506119a0602087016113de565b9350604086013592506060860135915060808601356001600160401b038111156119c957600080fd5b611964888289016115aa565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2660a0830186886119d5565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a636060830184866119d5565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611ad857600080fd5b6107cb826113de565b6000808335601e19843603018112611af857600080fd5b8301803591506001600160401b03821115611b1257600080fd5b60200191503681900382131561143b57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b4f57611b4f611b27565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bd95782840389528135601e19883603018112611b9157600080fd5b870180356001600160401b03811115611ba957600080fd5b803603891315611bb857600080fd5b611bc586828985016119d5565b9a87019a9550505090840190600101611b70565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c27576001600160a01b03611c12846113de565b16825260209283019290910190600101611bf9565b5083810360208501528881526001600160fb1b03891115611c4757600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7881888a611b56565b6060850196909652505050608001529695505050505050565b60008219821115611ca457611ca4611b27565b500190565b60005b83811015611cc4578181015183820152602001611cac565b83811115611cd3576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d11816017850160208801611ca9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d42816028840160208801611ca9565b01602801949350505050565b6020815260008251806020840152611d6d816040850160208701611ca9565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611df557611df5611b27565b500290565b600081611e0957611e09611b27565b50600019019056fea2646970667358221220b32209da5a30ad0f79b8537a384ac093ebcf479734f8be816134df27c23ccc6664736f6c634300080d00335f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", + "deployedBytecode": "0x6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610582578063e38335e5146105a2578063f23a6e61146105b5578063f27a0c92146105e157600080fd5b8063bc197c8114610509578063c4d252f514610535578063d45c44351461055557600080fd5b806391d14854116100c657806391d1485414610480578063a217fddf146104a0578063b08e51c0146104b5578063b1c5f427146104e957600080fd5b80638065657f1461040c5780638f2a0bb01461042c5780638f61f4f51461044c57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038c57806336568abe146103ac578063584b153e146103cc57806364d62353146103ec57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036c57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611442565b6105f6565b005b3480156101f557600080fd5b506102096102043660046114b6565b6106cc565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e0565b6106f7565b3480156102b357600080fd5b506102096102c236600461154b565b6107ac565b3480156102d357600080fd5b506102f26102e2366004611619565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b5061025261032636600461154b565b60009081526020819052604090206001015490565b34801561034757600080fd5b5061020961035636600461154b565b6000908152600160208190526040909120541490565b34801561037857600080fd5b506101e7610387366004611680565b6107d2565b34801561039857600080fd5b506102096103a736600461154b565b6107fc565b3480156103b857600080fd5b506101e76103c7366004611680565b610815565b3480156103d857600080fd5b506102096103e736600461154b565b610898565b3480156103f857600080fd5b506101e761040736600461154b565b6108ae565b34801561041857600080fd5b506102526104273660046114e0565b610952565b34801561043857600080fd5b506101e76104473660046116f0565b610991565b34801561045857600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048c57600080fd5b5061020961049b366004611680565b610b24565b3480156104ac57600080fd5b50610252600081565b3480156104c157600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f557600080fd5b506102526105043660046117a1565b610b4d565b34801561051557600080fd5b506102f26105243660046118c8565b63bc197c8160e01b95945050505050565b34801561054157600080fd5b506101e761055036600461154b565b610b92565b34801561056157600080fd5b5061025261057036600461154b565b60009081526001602052604090205490565b34801561058e57600080fd5b506101e761059d366004611680565b610c67565b6101e76105b03660046117a1565b610c8c565b3480156105c157600080fd5b506102f26105d0366004611971565b63f23a6e6160e01b95945050505050565b3480156105ed57600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161062081610e16565b6000610630898989898989610952565b905061063c8184610e23565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610678969594939291906119fe565b60405180910390a383156106c157807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b891815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f157506106f182610f12565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610723816000610b24565b610731576107318133610f47565b6000610741888888888888610952565b905061074d8185610fa0565b6107598888888861103c565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107919493929190611a3b565b60405180910390a36107a28161110f565b5050505050505050565b6000818152600160205260408120546001811180156107cb5750428111155b9392505050565b6000828152602081905260409020600101546107ed81610e16565b6107f78383611148565b505050565b60008181526001602052604081205481905b1192915050565b6001600160a01b038116331461088a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089482826111cc565b5050565b600081815260016020819052604082205461080e565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610881565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b600086868686868660405160200161096f969594939291906119fe565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e16565b8887146109da5760405162461bcd60e51b815260040161088190611a6d565b8885146109f95760405162461bcd60e51b815260040161088190611a6d565b6000610a0b8b8b8b8b8b8b8b8b610b4d565b9050610a178184610e23565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab0565b9050602002016020810190610a6c9190611ac6565b8d8d86818110610a7e57610a7e611ab0565b905060200201358c8c87818110610a9757610a97611ab0565b9050602002810190610aa99190611ae1565b8c8b604051610abd969594939291906119fe565b60405180910390a3610ace81611b3d565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b6e989796959493929190611be6565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbc81610e16565b610bc582610898565b610c2b5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610881565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c8281610e16565b6107f783836111cc565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cb8816000610b24565b610cc657610cc68133610f47565b878614610ce55760405162461bcd60e51b815260040161088190611a6d565b878414610d045760405162461bcd60e51b815260040161088190611a6d565b6000610d168a8a8a8a8a8a8a8a610b4d565b9050610d228185610fa0565b60005b89811015610e005760008b8b83818110610d4157610d41611ab0565b9050602002016020810190610d569190611ac6565b905060008a8a84818110610d6c57610d6c611ab0565b9050602002013590503660008a8a86818110610d8a57610d8a611ab0565b9050602002810190610d9c9190611ae1565b91509150610dac8484848461103c565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de39493929190611a3b565b60405180910390a35050505080610df990611b3d565b9050610d25565b50610e0a8161110f565b50505050505050505050565b610e208133610f47565b50565b610e2c826107fc565b15610e915760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610881565b600254811015610ef25760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610881565b610efc8142611c91565b6000928352600160205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f157506301ffc9a760e01b6001600160e01b03198316146106f1565b610f518282610b24565b61089457610f5e81611231565b610f69836020611243565b604051602001610f7a929190611cd9565b60408051601f198184030181529082905262461bcd60e51b825261088191600401611d4e565b610fa9826107ac565b610fc55760405162461bcd60e51b815260040161088190611d81565b801580610fe15750600081815260016020819052604090912054145b6108945760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610881565b6000846001600160a01b0316848484604051611059929190611dcb565b60006040518083038185875af1925050503d8060008114611096576040519150601f19603f3d011682016040523d82523d6000602084013e61109b565b606091505b50509050806111085760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610881565b5050505050565b611118816107ac565b6111345760405162461bcd60e51b815260040161088190611d81565b600090815260016020819052604090912055565b6111528282610b24565b610894576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d68282610b24565b15610894576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f16001600160a01b03831660145b60606000611252836002611ddb565b61125d906002611c91565b6001600160401b0381111561127457611274611564565b6040519080825280601f01601f19166020018201604052801561129e576020820181803683370190505b509050600360fc1b816000815181106112b9576112b9611ab0565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112e8576112e8611ab0565b60200101906001600160f81b031916908160001a905350600061130c846002611ddb565b611317906001611c91565b90505b600181111561138f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061134b5761134b611ab0565b1a60f81b82828151811061136157611361611ab0565b60200101906001600160f81b031916908160001a90535060049490941c9361138881611dfa565b905061131a565b5083156107cb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610881565b80356001600160a01b03811681146113f557600080fd5b919050565b60008083601f84011261140c57600080fd5b5081356001600160401b0381111561142357600080fd5b60208301915083602082850101111561143b57600080fd5b9250929050565b600080600080600080600060c0888a03121561145d57600080fd5b611466886113de565b96506020880135955060408801356001600160401b0381111561148857600080fd5b6114948a828b016113fa565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114c857600080fd5b81356001600160e01b0319811681146107cb57600080fd5b60008060008060008060a087890312156114f957600080fd5b611502876113de565b95506020870135945060408701356001600160401b0381111561152457600080fd5b61153089828a016113fa565b979a9699509760608101359660809091013595509350505050565b60006020828403121561155d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a2576115a2611564565b604052919050565b600082601f8301126115bb57600080fd5b81356001600160401b038111156115d4576115d4611564565b6115e7601f8201601f191660200161157a565b8181528460208386010111156115fc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561162f57600080fd5b611638856113de565b9350611646602086016113de565b92506040850135915060608501356001600160401b0381111561166857600080fd5b611674878288016115aa565b91505092959194509250565b6000806040838503121561169357600080fd5b823591506116a3602084016113de565b90509250929050565b60008083601f8401126116be57600080fd5b5081356001600160401b038111156116d557600080fd5b6020830191508360208260051b850101111561143b57600080fd5b600080600080600080600080600060c08a8c03121561170e57600080fd5b89356001600160401b038082111561172557600080fd5b6117318d838e016116ac565b909b50995060208c013591508082111561174a57600080fd5b6117568d838e016116ac565b909950975060408c013591508082111561176f57600080fd5b5061177c8c828d016116ac565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117bd57600080fd5b88356001600160401b03808211156117d457600080fd5b6117e08c838d016116ac565b909a50985060208b01359150808211156117f957600080fd5b6118058c838d016116ac565b909850965060408b013591508082111561181e57600080fd5b5061182b8b828c016116ac565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185a57600080fd5b813560206001600160401b0382111561187557611875611564565b8160051b61188482820161157a565b928352848101820192828101908785111561189e57600080fd5b83870192505b848310156118bd578235825291830191908301906118a4565b979650505050505050565b600080600080600060a086880312156118e057600080fd5b6118e9866113de565b94506118f7602087016113de565b935060408601356001600160401b038082111561191357600080fd5b61191f89838a01611849565b9450606088013591508082111561193557600080fd5b61194189838a01611849565b9350608088013591508082111561195757600080fd5b50611964888289016115aa565b9150509295509295909350565b600080600080600060a0868803121561198957600080fd5b611992866113de565b94506119a0602087016113de565b9350604086013592506060860135915060808601356001600160401b038111156119c957600080fd5b611964888289016115aa565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2660a0830186886119d5565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a636060830184866119d5565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611ad857600080fd5b6107cb826113de565b6000808335601e19843603018112611af857600080fd5b8301803591506001600160401b03821115611b1257600080fd5b60200191503681900382131561143b57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b4f57611b4f611b27565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bd95782840389528135601e19883603018112611b9157600080fd5b870180356001600160401b03811115611ba957600080fd5b803603891315611bb857600080fd5b611bc586828985016119d5565b9a87019a9550505090840190600101611b70565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c27576001600160a01b03611c12846113de565b16825260209283019290910190600101611bf9565b5083810360208501528881526001600160fb1b03891115611c4757600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7881888a611b56565b6060850196909652505050608001529695505050505050565b60008219821115611ca457611ca4611b27565b500190565b60005b83811015611cc4578181015183820152602001611cac565b83811115611cd3576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d11816017850160208801611ca9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d42816028840160208801611ca9565b01602801949350505050565b6020815260008251806020840152611d6d816040850160208701611ca9565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611df557611df5611b27565b500290565b600081611e0957611e09611b27565b50600019019056fea2646970667358221220b32209da5a30ad0f79b8537a384ac093ebcf479734f8be816134df27c23ccc6664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json new file mode 100644 index 00000000..d233aebb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Timers", + "sourceName": "contracts/utils/Timers.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203361d5163d1831e2ebf32fbfc15e410a638426196f221a6a1b2affd3ea7d006a64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203361d5163d1831e2ebf32fbfc15e410a638426196f221a6a1b2affd3ea7d006a64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json new file mode 100644 index 00000000..53f74a22 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json @@ -0,0 +1,78 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TokenTimelock", + "sourceName": "contracts/token/ERC20/utils/TokenTimelock.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token_", + "type": "address" + }, + { + "internalType": "address", + "name": "beneficiary_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "releaseTime_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "releaseTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60e060405234801561001057600080fd5b506040516107cd3803806107cd83398101604081905261002f916100d0565b42811161009d5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206260448201527165666f72652063757272656e742074696d6560701b606482015260840160405180910390fd5b6001600160a01b03928316608052911660a05260c052610113565b6001600160a01b03811681146100cd57600080fd5b50565b6000806000606084860312156100e557600080fd5b83516100f0816100b8565b6020850151909350610101816100b8565b80925050604084015190509250925092565b60805160a05160c05161067361015a60003960008181609f015260f00152600081816053015261029801526000818160ca01528181610182015261027601526106736000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f14610090578063b91d40011461009a578063fc0c546a146100c8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b6100986100ee565b005b6040517f00000000000000000000000000000000000000000000000000000000000000008152602001610087565b7f0000000000000000000000000000000000000000000000000000000000000000610073565b7f000000000000000000000000000000000000000000000000000000000000000042101561017e5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b919061057c565b9050600081116102695760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610175565b6102bd6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836102c0565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610312908490610317565b505050565b600061036c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103ec9092919063ffffffff16565b905080516000148061038d57508080602001905181019061038d9190610595565b6103125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610175565b60606103fb8484600085610403565b949350505050565b6060824710156104645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610175565b600080866001600160a01b0316858760405161048091906105ee565b60006040518083038185875af1925050503d80600081146104bd576040519150601f19603f3d011682016040523d82523d6000602084013e6104c2565b606091505b50915091506104d3878383876104de565b979650505050505050565b6060831561054d578251600003610546576001600160a01b0385163b6105465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610175565b50816103fb565b6103fb83838151156105625781518083602001fd5b8060405162461bcd60e51b8152600401610175919061060a565b60006020828403121561058e57600080fd5b5051919050565b6000602082840312156105a757600080fd5b815180151581146105b757600080fd5b9392505050565b60005b838110156105d95781810151838201526020016105c1565b838111156105e8576000848401525b50505050565b600082516106008184602087016105be565b9190910192915050565b60208152600082518060208401526106298160408501602087016105be565b601f01601f1916919091016040019291505056fea2646970667358221220389f41f60ded85b1a04a92c03ecacd1f136c38a5677c1da351e8cecb46b6e2b664736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f14610090578063b91d40011461009a578063fc0c546a146100c8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b6100986100ee565b005b6040517f00000000000000000000000000000000000000000000000000000000000000008152602001610087565b7f0000000000000000000000000000000000000000000000000000000000000000610073565b7f000000000000000000000000000000000000000000000000000000000000000042101561017e5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b919061057c565b9050600081116102695760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610175565b6102bd6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836102c0565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610312908490610317565b505050565b600061036c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103ec9092919063ffffffff16565b905080516000148061038d57508080602001905181019061038d9190610595565b6103125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610175565b60606103fb8484600085610403565b949350505050565b6060824710156104645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610175565b600080866001600160a01b0316858760405161048091906105ee565b60006040518083038185875af1925050503d80600081146104bd576040519150601f19603f3d011682016040523d82523d6000602084013e6104c2565b606091505b50915091506104d3878383876104de565b979650505050505050565b6060831561054d578251600003610546576001600160a01b0385163b6105465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610175565b50816103fb565b6103fb83838151156105625781518083602001fd5b8060405162461bcd60e51b8152600401610175919061060a565b60006020828403121561058e57600080fd5b5051919050565b6000602082840312156105a757600080fd5b815180151581146105b757600080fd5b9392505050565b60005b838110156105d95781810151838201526020016105c1565b838111156105e8576000848401525b50505050565b600082516106008184602087016105be565b9190910192915050565b60208152600082518060208401526106298160408501602087016105be565b601f01601f1916919091016040019291505056fea2646970667358221220389f41f60ded85b1a04a92c03ecacd1f136c38a5677c1da351e8cecb46b6e2b664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json new file mode 100644 index 00000000..9c5ceac4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json @@ -0,0 +1,85 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TransparentUpgradeableProxy", + "sourceName": "contracts/proxy/transparent/TransparentUpgradeableProxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405260405162000ed038038062000ed08339810160408190526200002691620004a0565b828162000036828260006200004d565b50620000449050826200008a565b505050620005d3565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b620001691760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f08162000244565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000ea960279139620002f8565b9392505050565b60006200018060008051602062000e8983398151915260001b6200037760201b620001951760201c565b546001600160a01b0316919050565b6001600160a01b038116620001fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022360008051602062000e8983398151915260001b6200037760201b620001951760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200025a816200037a60201b620001981760201c565b620002be5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f1565b80620002237f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200037760201b620001951760201c565b6060600080856001600160a01b03168560405162000317919062000580565b600060405180830381855af49150503d806000811462000354576040519150601f19603f3d011682016040523d82523d6000602084013e62000359565b606091505b5090925090506200036d8683838762000389565b9695505050505050565b90565b6001600160a01b03163b151590565b60608315620003fd578251600003620003f5576001600160a01b0385163b620003f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001f1565b508162000409565b62000409838362000411565b949350505050565b815115620004225781518083602001fd5b8060405162461bcd60e51b8152600401620001f191906200059e565b80516001600160a01b03811681146200045657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200048e57818101518382015260200162000474565b83811115620000835750506000910152565b600080600060608486031215620004b657600080fd5b620004c1846200043e565b9250620004d1602085016200043e565b60408501519092506001600160401b0380821115620004ef57600080fd5b818601915086601f8301126200050457600080fd5b8151818111156200051957620005196200045b565b604051601f8201601f19908116603f011681019083821181831017156200054457620005446200045b565b816040528281528960208487010111156200055e57600080fd5b6200057183602083016020880162000471565b80955050505050509250925092565b600082516200059481846020870162000471565b9190910192915050565b6020815260008251806020840152620005bf81604085016020870162000471565b601f01601f19169190910160400192915050565b6108a680620005e36000396000f3fe60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220eed753f2d706b2830a4f22c0a254d6bf8195eda4b6811061eb1a5a96d822738c64736f6c634300080d0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220eed753f2d706b2830a4f22c0a254d6bf8195eda4b6811061eb1a5a96d822738c64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json new file mode 100644 index 00000000..4e877cb3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json @@ -0,0 +1,100 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "UUPSUpgradeable", + "sourceName": "contracts/proxy/utils/UUPSUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json new file mode 100644 index 00000000..f2b66c17 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json @@ -0,0 +1,113 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "UpgradeableBeacon", + "sourceName": "contracts/proxy/beacon/UpgradeableBeacon.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516104e43803806104e483398101604081905261002f91610151565b61003833610047565b61004181610097565b50610181565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6100aa8161014260201b6101a01760201c565b6101205760405162461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e747261637400000000000000000000000000606482015260840160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03163b151590565b60006020828403121561016357600080fd5b81516001600160a01b038116811461017a57600080fd5b9392505050565b610354806101906000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610071578063715018a61461009a5780638da5cb5b146100a2578063f2fde38b146100b3575b600080fd5b61006f61006a3660046102ee565b6100c6565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006f61010e565b6000546001600160a01b031661007e565b61006f6100c13660046102ee565b610122565b6100ce6101af565b6100d781610209565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6101166101af565b610120600061029e565b565b61012a6101af565b6001600160a01b0381166101945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61019d8161029e565b50565b6001600160a01b03163b151590565b6000546001600160a01b031633146101205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018b565b6001600160a01b0381163b61027c5760405162461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6044820152721b881a5cc81b9bdd08184818dbdb9d1c9858dd606a1b606482015260840161018b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561030057600080fd5b81356001600160a01b038116811461031757600080fd5b939250505056fea26469706673582212200d7e9852e7cdb45eb82087b8a3654e2621338b938fb632e14ddb0781d543abbd64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610071578063715018a61461009a5780638da5cb5b146100a2578063f2fde38b146100b3575b600080fd5b61006f61006a3660046102ee565b6100c6565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006f61010e565b6000546001600160a01b031661007e565b61006f6100c13660046102ee565b610122565b6100ce6101af565b6100d781610209565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6101166101af565b610120600061029e565b565b61012a6101af565b6001600160a01b0381166101945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61019d8161029e565b50565b6001600160a01b03163b151590565b6000546001600160a01b031633146101205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018b565b6001600160a01b0381163b61027c5760405162461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6044820152721b881a5cc81b9bdd08184818dbdb9d1c9858dd606a1b606482015260840161018b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561030057600080fd5b81356001600160a01b038116811461031757600080fd5b939250505056fea26469706673582212200d7e9852e7cdb45eb82087b8a3654e2621338b938fb632e14ddb0781d543abbd64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json new file mode 100644 index 00000000..39eb3a7d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json @@ -0,0 +1,234 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VestingWallet", + "sourceName": "contracts/finance/VestingWallet.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiaryAddress", + "type": "address" + }, + { + "internalType": "uint64", + "name": "startTimestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "durationSeconds", + "type": "uint64" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20Released", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EtherReleased", + "type": "event" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60e0604052604051610cdb380380610cdb833981016040819052610022916100d0565b6001600160a01b03831661008f5760405162461bcd60e51b815260206004820152602a60248201527f56657374696e6757616c6c65743a2062656e6566696369617279206973207a65604482015269726f206164647265737360b01b606482015260840160405180910390fd5b6001600160a01b039092166080526001600160401b0390811660a0521660c052610121565b80516001600160401b03811681146100cb57600080fd5b919050565b6000806000606084860312156100e557600080fd5b83516001600160a01b03811681146100fc57600080fd5b925061010a602085016100b4565b9150610118604085016100b4565b90509250925092565b60805160a05160c051610b7061016b6000396000818160ee015281816104ce01526105230152600061046a015260008181610158015281816102f1015261040a0152610b706000f3fe6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f146101a257806396132521146101b75780639852595c146101cc578063a3f8eace14610202578063be9a655514610222578063fbccedae1461023757600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df578063191655871461011c57806338af3eed1461013e578063810ec23b1461018257600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c736600461097a565b61024c565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166100cc565b34801561012857600080fd5b5061013c6101373660046109ac565b610270565b005b34801561014a57600080fd5b506040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526020016100d6565b34801561018e57600080fd5b506100cc61019d3660046109c7565b61031a565b3480156101ae57600080fd5b5061013c6103b0565b3480156101c357600080fd5b506000546100cc565b3480156101d857600080fd5b506100cc6101e73660046109ac565b6001600160a01b031660009081526001602052604090205490565b34801561020e57600080fd5b506100cc61021d3660046109ac565b610432565b34801561022e57600080fd5b506100cc61045f565b34801561024357600080fd5b506100cc61048d565b600061026a61025a60005490565b6102649047610a10565b836104a9565b92915050565b600061027b82610432565b6001600160a01b0383166000908152600160205260408120805492935083929091906102a8908490610a10565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a2610316827f000000000000000000000000000000000000000000000000000000000000000083610583565b5050565b6001600160a01b0382166000908152600160205260408120546103a9906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610a28565b6102649190610a10565b9392505050565b60006103ba61048d565b9050806000808282546103cd9190610a10565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a161042f7f0000000000000000000000000000000000000000000000000000000000000000826105da565b50565b6001600160a01b038116600090815260016020526040812054610455834261031a565b61026a9190610a41565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690565b6000805461049a4261024c565b6104a49190610a41565b905090565b60006104b361045f565b8267ffffffffffffffff1610156104cc5750600061026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166104ff61045f565b6105099190610a10565b8267ffffffffffffffff16111561052157508161026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1661055461045f565b6105689067ffffffffffffffff8516610a41565b6105729085610a58565b61057c9190610a77565b905061026a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526105d59084906106f8565b505050565b8047101561062f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461067c576040519150601f19603f3d011682016040523d82523d6000602084013e610681565b606091505b50509050806105d55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610626565b600061074d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107cd9092919063ffffffff16565b905080516000148061076e57508080602001905181019061076e9190610a99565b6105d55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610626565b60606107dc84846000856107e4565b949350505050565b6060824710156108455760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610626565b600080866001600160a01b031685876040516108619190610aeb565b60006040518083038185875af1925050503d806000811461089e576040519150601f19603f3d011682016040523d82523d6000602084013e6108a3565b606091505b50915091506108b4878383876108bf565b979650505050505050565b6060831561092e578251600003610927576001600160a01b0385163b6109275760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610626565b50816107dc565b6107dc83838151156109435781518083602001fd5b8060405162461bcd60e51b81526004016106269190610b07565b803567ffffffffffffffff8116811461097557600080fd5b919050565b60006020828403121561098c57600080fd5b6103a98261095d565b80356001600160a01b038116811461097557600080fd5b6000602082840312156109be57600080fd5b6103a982610995565b600080604083850312156109da57600080fd5b6109e383610995565b91506109f16020840161095d565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a2357610a236109fa565b500190565b600060208284031215610a3a57600080fd5b5051919050565b600082821015610a5357610a536109fa565b500390565b6000816000190483118215151615610a7257610a726109fa565b500290565b600082610a9457634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610aab57600080fd5b815180151581146103a957600080fd5b60005b83811015610ad6578181015183820152602001610abe565b83811115610ae5576000848401525b50505050565b60008251610afd818460208701610abb565b9190910192915050565b6020815260008251806020840152610b26816040850160208701610abb565b601f01601f1916919091016040019291505056fea264697066735822122057bb7906b57102ec2fdea4d75ef610cf997a5bd74275d1e80d6f18f6cf5a778064736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f146101a257806396132521146101b75780639852595c146101cc578063a3f8eace14610202578063be9a655514610222578063fbccedae1461023757600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df578063191655871461011c57806338af3eed1461013e578063810ec23b1461018257600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c736600461097a565b61024c565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166100cc565b34801561012857600080fd5b5061013c6101373660046109ac565b610270565b005b34801561014a57600080fd5b506040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526020016100d6565b34801561018e57600080fd5b506100cc61019d3660046109c7565b61031a565b3480156101ae57600080fd5b5061013c6103b0565b3480156101c357600080fd5b506000546100cc565b3480156101d857600080fd5b506100cc6101e73660046109ac565b6001600160a01b031660009081526001602052604090205490565b34801561020e57600080fd5b506100cc61021d3660046109ac565b610432565b34801561022e57600080fd5b506100cc61045f565b34801561024357600080fd5b506100cc61048d565b600061026a61025a60005490565b6102649047610a10565b836104a9565b92915050565b600061027b82610432565b6001600160a01b0383166000908152600160205260408120805492935083929091906102a8908490610a10565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a2610316827f000000000000000000000000000000000000000000000000000000000000000083610583565b5050565b6001600160a01b0382166000908152600160205260408120546103a9906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610a28565b6102649190610a10565b9392505050565b60006103ba61048d565b9050806000808282546103cd9190610a10565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a161042f7f0000000000000000000000000000000000000000000000000000000000000000826105da565b50565b6001600160a01b038116600090815260016020526040812054610455834261031a565b61026a9190610a41565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690565b6000805461049a4261024c565b6104a49190610a41565b905090565b60006104b361045f565b8267ffffffffffffffff1610156104cc5750600061026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166104ff61045f565b6105099190610a10565b8267ffffffffffffffff16111561052157508161026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1661055461045f565b6105689067ffffffffffffffff8516610a41565b6105729085610a58565b61057c9190610a77565b905061026a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526105d59084906106f8565b505050565b8047101561062f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461067c576040519150601f19603f3d011682016040523d82523d6000602084013e610681565b606091505b50509050806105d55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610626565b600061074d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107cd9092919063ffffffff16565b905080516000148061076e57508080602001905181019061076e9190610a99565b6105d55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610626565b60606107dc84846000856107e4565b949350505050565b6060824710156108455760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610626565b600080866001600160a01b031685876040516108619190610aeb565b60006040518083038185875af1925050503d806000811461089e576040519150601f19603f3d011682016040523d82523d6000602084013e6108a3565b606091505b50915091506108b4878383876108bf565b979650505050505050565b6060831561092e578251600003610927576001600160a01b0385163b6109275760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610626565b50816107dc565b6107dc83838151156109435781518083602001fd5b8060405162461bcd60e51b81526004016106269190610b07565b803567ffffffffffffffff8116811461097557600080fd5b919050565b60006020828403121561098c57600080fd5b6103a98261095d565b80356001600160a01b038116811461097557600080fd5b6000602082840312156109be57600080fd5b6103a982610995565b600080604083850312156109da57600080fd5b6109e383610995565b91506109f16020840161095d565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a2357610a236109fa565b500190565b600060208284031215610a3a57600080fd5b5051919050565b600082821015610a5357610a536109fa565b500390565b6000816000190483118215151615610a7257610a726109fa565b500290565b600082610a9457634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610aab57600080fd5b815180151581146103a957600080fd5b60005b83811015610ad6578181015183820152602001610abe565b83811115610ae5576000848401525b50505050565b60008251610afd818460208701610abb565b9190910192915050565b6020815260008251806020840152610b26816040850160208701610abb565b601f01601f1916919091016040019291505056fea264697066735822122057bb7906b57102ec2fdea4d75ef610cf997a5bd74275d1e80d6f18f6cf5a778064736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Votes.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Votes.json new file mode 100644 index 00000000..490ced83 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Votes.json @@ -0,0 +1,316 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Votes", + "sourceName": "contracts/governance/utils/Votes.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol new file mode 100644 index 00000000..4c9b9e5c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/CrossChainEnabled.sol) + +pragma solidity ^0.8.4; + +import "./errors.sol"; + +/** + * @dev Provides information for building cross-chain aware contracts. This + * abstract contract provides accessors and modifiers to control the execution + * flow when receiving cross-chain messages. + * + * Actual implementations of cross-chain aware contracts, which are based on + * this abstraction, will have to inherit from a bridge-specific + * specialization. Such specializations are provided under + * `crosschain//CrossChainEnabled.sol`. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabled { + /** + * @dev Throws if the current function call is not the result of a + * cross-chain execution. + */ + modifier onlyCrossChain() { + if (!_isCrossChain()) revert NotCrossChainCall(); + _; + } + + /** + * @dev Throws if the current function call is not the result of a + * cross-chain execution initiated by `account`. + */ + modifier onlyCrossChainSender(address expected) { + address actual = _crossChainSender(); + if (expected != actual) revert InvalidCrossChainSender(actual, expected); + _; + } + + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message. + */ + function _isCrossChain() internal view virtual returns (bool); + + /** + * @dev Returns the address of the sender of the cross-chain message that + * triggered the current function call. + * + * IMPORTANT: Should revert with `NotCrossChainCall` if the current function + * call is not the result of a cross-chain message. + */ + function _crossChainSender() internal view virtual returns (address); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol new file mode 100644 index 00000000..e69355d6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/CrossChainEnabledAMB.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabled.sol"; +import "./LibAMB.sol"; + +/** + * @dev https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] + * specialization or the {CrossChainEnabled} abstraction. + * + * As of february 2020, AMB bridges are available between the following chains: + * + * - https://docs.tokenbridge.net/eth-xdai-amb-bridge/about-the-eth-xdai-amb[ETH ⇌ xDai] + * - https://docs.tokenbridge.net/eth-qdai-bridge/about-the-eth-qdai-amb[ETH ⇌ qDai] + * - https://docs.tokenbridge.net/eth-etc-amb-bridge/about-the-eth-etc-amb[ETH ⇌ ETC] + * - https://docs.tokenbridge.net/eth-bsc-amb/about-the-eth-bsc-amb[ETH ⇌ BSC] + * - https://docs.tokenbridge.net/eth-poa-amb-bridge/about-the-eth-poa-amb[ETH ⇌ POA] + * - https://docs.tokenbridge.net/bsc-xdai-amb/about-the-bsc-xdai-amb[BSC ⇌ xDai] + * - https://docs.tokenbridge.net/poa-xdai-amb/about-the-poa-xdai-amb[POA ⇌ xDai] + * - https://docs.tokenbridge.net/rinkeby-xdai-amb-bridge/about-the-rinkeby-xdai-amb[Rinkeby ⇌ xDai] + * - https://docs.tokenbridge.net/kovan-sokol-amb-bridge/about-the-kovan-sokol-amb[Kovan ⇌ Sokol] + * + * _Available since v4.6._ + */ +contract CrossChainEnabledAMB is CrossChainEnabled { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _bridge; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address bridge) { + _bridge = bridge; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibAMB.isCrossChain(_bridge); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibAMB.crossChainSender(_bridge); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol new file mode 100644 index 00000000..aef9c43e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/LibAMB.sol) + +pragma solidity ^0.8.4; + +import {IAMB as AMB_Bridge} from "../../vendor/amb/IAMB.sol"; +import "../errors.sol"; + +/** + * @dev Primitives for cross-chain aware contracts using the + * https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] + * family of bridges. + */ +library LibAMB { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by `bridge`. + */ + function isCrossChain(address bridge) internal view returns (bool) { + return msg.sender == bridge; + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through `bridge`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address bridge) internal view returns (address) { + if (!isCrossChain(bridge)) revert NotCrossChainCall(); + return AMB_Bridge(bridge).messageSender(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol new file mode 100644 index 00000000..5068da39 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabled.sol"; +import "./LibArbitrumL1.sol"; + +/** + * @dev https://arbitrum.io/[Arbitrum] specialization or the + * {CrossChainEnabled} abstraction the L1 side (mainnet). + * + * This version should only be deployed on L1 to process cross-chain messages + * originating from L2. For the other side, use {CrossChainEnabledArbitrumL2}. + * + * The bridge contract is provided and maintained by the arbitrum team. You can + * find the address of this contract on the rinkeby testnet in + * https://developer.offchainlabs.com/docs/useful_addresses[Arbitrum's developer documentation]. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabledArbitrumL1 is CrossChainEnabled { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _bridge; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address bridge) { + _bridge = bridge; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibArbitrumL1.isCrossChain(_bridge); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibArbitrumL1.crossChainSender(_bridge); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol new file mode 100644 index 00000000..e85993db --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabled.sol"; +import "./LibArbitrumL2.sol"; + +/** + * @dev https://arbitrum.io/[Arbitrum] specialization or the + * {CrossChainEnabled} abstraction the L2 side (arbitrum). + * + * This version should only be deployed on L2 to process cross-chain messages + * originating from L1. For the other side, use {CrossChainEnabledArbitrumL1}. + * + * Arbitrum L2 includes the `ArbSys` contract at a fixed address. Therefore, + * this specialization of {CrossChainEnabled} does not include a constructor. + * + * _Available since v4.6._ + * + * WARNING: There is currently a bug in Arbitrum that causes this contract to + * fail to detect cross-chain calls when deployed behind a proxy. This will be + * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for + * August 31st 2022. + */ +abstract contract CrossChainEnabledArbitrumL2 is CrossChainEnabled { + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibArbitrumL2.isCrossChain(LibArbitrumL2.ARBSYS); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibArbitrumL2.crossChainSender(LibArbitrumL2.ARBSYS); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol new file mode 100644 index 00000000..be7236b2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL1.sol) + +pragma solidity ^0.8.4; + +import {IBridge as ArbitrumL1_Bridge} from "../../vendor/arbitrum/IBridge.sol"; +import {IOutbox as ArbitrumL1_Outbox} from "../../vendor/arbitrum/IOutbox.sol"; +import "../errors.sol"; + +/** + * @dev Primitives for cross-chain aware contracts for + * https://arbitrum.io/[Arbitrum]. + * + * This version should only be used on L1 to process cross-chain messages + * originating from L2. For the other side, use {LibArbitrumL2}. + */ +library LibArbitrumL1 { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by the `bridge`. + */ + function isCrossChain(address bridge) internal view returns (bool) { + return msg.sender == bridge; + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through the `bridge`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address bridge) internal view returns (address) { + if (!isCrossChain(bridge)) revert NotCrossChainCall(); + + address sender = ArbitrumL1_Outbox(ArbitrumL1_Bridge(bridge).activeOutbox()).l2ToL1Sender(); + require(sender != address(0), "LibArbitrumL1: system messages without sender"); + + return sender; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol new file mode 100644 index 00000000..715a3878 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL2.sol) + +pragma solidity ^0.8.4; + +import {IArbSys as ArbitrumL2_Bridge} from "../../vendor/arbitrum/IArbSys.sol"; +import "../errors.sol"; + +/** + * @dev Primitives for cross-chain aware contracts for + * https://arbitrum.io/[Arbitrum]. + * + * This version should only be used on L2 to process cross-chain messages + * originating from L1. For the other side, use {LibArbitrumL1}. + * + * WARNING: There is currently a bug in Arbitrum that causes this contract to + * fail to detect cross-chain calls when deployed behind a proxy. This will be + * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for + * August 31st 2022. + */ +library LibArbitrumL2 { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by `arbsys`. + */ + address public constant ARBSYS = 0x0000000000000000000000000000000000000064; + + function isCrossChain(address arbsys) internal view returns (bool) { + return ArbitrumL2_Bridge(arbsys).wasMyCallersAddressAliased(); + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through `arbsys`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address arbsys) internal view returns (address) { + if (!isCrossChain(arbsys)) revert NotCrossChainCall(); + + return ArbitrumL2_Bridge(arbsys).myCallersAddressWithoutAliasing(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol new file mode 100644 index 00000000..004460e9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/errors.sol) + +pragma solidity ^0.8.4; + +error NotCrossChainCall(); +error InvalidCrossChainSender(address actual, address expected); diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol new file mode 100644 index 00000000..1005864a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/CrossChainEnabledOptimism.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabled.sol"; +import "./LibOptimism.sol"; + +/** + * @dev https://www.optimism.io/[Optimism] specialization or the + * {CrossChainEnabled} abstraction. + * + * The messenger (`CrossDomainMessenger`) contract is provided and maintained by + * the optimism team. You can find the address of this contract on mainnet and + * kovan in the https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/deployments[deployments section of Optimism monorepo]. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabledOptimism is CrossChainEnabled { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _messenger; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address messenger) { + _messenger = messenger; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibOptimism.isCrossChain(_messenger); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibOptimism.crossChainSender(_messenger); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol new file mode 100644 index 00000000..d963ade2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/LibOptimism.sol) + +pragma solidity ^0.8.4; + +import {ICrossDomainMessenger as Optimism_Bridge} from "../../vendor/optimism/ICrossDomainMessenger.sol"; +import "../errors.sol"; + +/** + * @dev Primitives for cross-chain aware contracts for https://www.optimism.io/[Optimism]. + * See the https://community.optimism.io/docs/developers/bridge/messaging/#accessing-msg-sender[documentation] + * for the functionality used here. + */ +library LibOptimism { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by `messenger`. + */ + function isCrossChain(address messenger) internal view returns (bool) { + return msg.sender == messenger; + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through `messenger`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address messenger) internal view returns (address) { + if (!isCrossChain(messenger)) revert NotCrossChainCall(); + + return Optimism_Bridge(messenger).xDomainMessageSender(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol new file mode 100644 index 00000000..1a201fd3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabled.sol"; +import "../../security/ReentrancyGuard.sol"; +import "../../utils/Address.sol"; +import "../../vendor/polygon/IFxMessageProcessor.sol"; + +address constant DEFAULT_SENDER = 0x000000000000000000000000000000000000dEaD; + +/** + * @dev https://polygon.technology/[Polygon] specialization or the + * {CrossChainEnabled} abstraction the child side (polygon/mumbai). + * + * This version should only be deployed on child chain to process cross-chain + * messages originating from the parent chain. + * + * The fxChild contract is provided and maintained by the polygon team. You can + * find the address of this contract polygon and mumbai in + * https://docs.polygon.technology/docs/develop/l1-l2-communication/fx-portal/#contract-addresses[Polygon's Fx-Portal documentation]. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabledPolygonChild is IFxMessageProcessor, CrossChainEnabled, ReentrancyGuard { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _fxChild; + address private _sender = DEFAULT_SENDER; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address fxChild) { + _fxChild = fxChild; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return msg.sender == _fxChild; + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return _sender; + } + + /** + * @dev External entry point to receive and relay messages originating + * from the fxChild. + * + * Non-reentrancy is crucial to avoid a cross-chain call being able + * to impersonate anyone by just looping through this with user-defined + * arguments. + * + * Note: if _fxChild calls any other function that does a delegate-call, + * then security could be compromised. + */ + function processMessageFromRoot( + uint256 /* stateId */, + address rootMessageSender, + bytes calldata data + ) external override nonReentrant { + if (!_isCrossChain()) revert NotCrossChainCall(); + + _sender = rootMessageSender; + Address.functionDelegateCall(address(this), data, "cross-chain execution failed"); + _sender = DEFAULT_SENDER; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol b/dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol new file mode 100644 index 00000000..daa9090e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/utils/SafeERC20.sol"; +import "../utils/Address.sol"; +import "../utils/Context.sol"; + +/** + * @title PaymentSplitter + * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware + * that the Ether will be split in this way, since it is handled transparently by the contract. + * + * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each + * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim + * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the + * time of contract deployment and can't be updated thereafter. + * + * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the + * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} + * function. + * + * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and + * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you + * to run tests before sending real value to this contract. + */ +contract PaymentSplitter is Context { + event PayeeAdded(address account, uint256 shares); + event PaymentReleased(address to, uint256 amount); + event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); + event PaymentReceived(address from, uint256 amount); + + uint256 private _totalShares; + uint256 private _totalReleased; + + mapping(address => uint256) private _shares; + mapping(address => uint256) private _released; + address[] private _payees; + + mapping(IERC20 => uint256) private _erc20TotalReleased; + mapping(IERC20 => mapping(address => uint256)) private _erc20Released; + + /** + * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at + * the matching position in the `shares` array. + * + * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no + * duplicates in `payees`. + */ + constructor(address[] memory payees, uint256[] memory shares_) payable { + require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); + require(payees.length > 0, "PaymentSplitter: no payees"); + + for (uint256 i = 0; i < payees.length; i++) { + _addPayee(payees[i], shares_[i]); + } + } + + /** + * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully + * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the + * reliability of the events, and not the actual splitting of Ether. + * + * To learn more about this see the Solidity documentation for + * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback + * functions]. + */ + receive() external payable virtual { + emit PaymentReceived(_msgSender(), msg.value); + } + + /** + * @dev Getter for the total shares held by payees. + */ + function totalShares() public view returns (uint256) { + return _totalShares; + } + + /** + * @dev Getter for the total amount of Ether already released. + */ + function totalReleased() public view returns (uint256) { + return _totalReleased; + } + + /** + * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 + * contract. + */ + function totalReleased(IERC20 token) public view returns (uint256) { + return _erc20TotalReleased[token]; + } + + /** + * @dev Getter for the amount of shares held by an account. + */ + function shares(address account) public view returns (uint256) { + return _shares[account]; + } + + /** + * @dev Getter for the amount of Ether already released to a payee. + */ + function released(address account) public view returns (uint256) { + return _released[account]; + } + + /** + * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an + * IERC20 contract. + */ + function released(IERC20 token, address account) public view returns (uint256) { + return _erc20Released[token][account]; + } + + /** + * @dev Getter for the address of the payee number `index`. + */ + function payee(uint256 index) public view returns (address) { + return _payees[index]; + } + + /** + * @dev Getter for the amount of payee's releasable Ether. + */ + function releasable(address account) public view returns (uint256) { + uint256 totalReceived = address(this).balance + totalReleased(); + return _pendingPayment(account, totalReceived, released(account)); + } + + /** + * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an + * IERC20 contract. + */ + function releasable(IERC20 token, address account) public view returns (uint256) { + uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); + return _pendingPayment(account, totalReceived, released(token, account)); + } + + /** + * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the + * total shares and their previous withdrawals. + */ + function release(address payable account) public virtual { + require(_shares[account] > 0, "PaymentSplitter: account has no shares"); + + uint256 payment = releasable(account); + + require(payment != 0, "PaymentSplitter: account is not due payment"); + + // _totalReleased is the sum of all values in _released. + // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. + _totalReleased += payment; + unchecked { + _released[account] += payment; + } + + Address.sendValue(account, payment); + emit PaymentReleased(account, payment); + } + + /** + * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their + * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 + * contract. + */ + function release(IERC20 token, address account) public virtual { + require(_shares[account] > 0, "PaymentSplitter: account has no shares"); + + uint256 payment = releasable(token, account); + + require(payment != 0, "PaymentSplitter: account is not due payment"); + + // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. + // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" + // cannot overflow. + _erc20TotalReleased[token] += payment; + unchecked { + _erc20Released[token][account] += payment; + } + + SafeERC20.safeTransfer(token, account, payment); + emit ERC20PaymentReleased(token, account, payment); + } + + /** + * @dev internal logic for computing the pending payment of an `account` given the token historical balances and + * already released amounts. + */ + function _pendingPayment( + address account, + uint256 totalReceived, + uint256 alreadyReleased + ) private view returns (uint256) { + return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; + } + + /** + * @dev Add a new payee to the contract. + * @param account The address of the payee to add. + * @param shares_ The number of shares owned by the payee. + */ + function _addPayee(address account, uint256 shares_) private { + require(account != address(0), "PaymentSplitter: account is the zero address"); + require(shares_ > 0, "PaymentSplitter: shares are 0"); + require(_shares[account] == 0, "PaymentSplitter: account already has shares"); + + _payees.push(account); + _shares[account] = shares_; + _totalShares = _totalShares + shares_; + emit PayeeAdded(account, shares_); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/finance/VestingWallet.sol b/dependencies/@openzeppelin-contracts-4.9.6/finance/VestingWallet.sol new file mode 100644 index 00000000..45cf9ce5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/finance/VestingWallet.sol @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (finance/VestingWallet.sol) +pragma solidity ^0.8.0; + +import "../token/ERC20/utils/SafeERC20.sol"; +import "../utils/Address.sol"; +import "../utils/Context.sol"; + +/** + * @title VestingWallet + * @dev This contract handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens + * can be given to this contract, which will release the token to the beneficiary following a given vesting schedule. + * The vesting schedule is customizable through the {vestedAmount} function. + * + * Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning. + * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly) + * be immediately releasable. + */ +contract VestingWallet is Context { + event EtherReleased(uint256 amount); + event ERC20Released(address indexed token, uint256 amount); + + uint256 private _released; + mapping(address => uint256) private _erc20Released; + address private immutable _beneficiary; + uint64 private immutable _start; + uint64 private immutable _duration; + + /** + * @dev Set the beneficiary, start timestamp and vesting duration of the vesting wallet. + */ + constructor(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) payable { + require(beneficiaryAddress != address(0), "VestingWallet: beneficiary is zero address"); + _beneficiary = beneficiaryAddress; + _start = startTimestamp; + _duration = durationSeconds; + } + + /** + * @dev The contract should be able to receive Eth. + */ + receive() external payable virtual {} + + /** + * @dev Getter for the beneficiary address. + */ + function beneficiary() public view virtual returns (address) { + return _beneficiary; + } + + /** + * @dev Getter for the start timestamp. + */ + function start() public view virtual returns (uint256) { + return _start; + } + + /** + * @dev Getter for the vesting duration. + */ + function duration() public view virtual returns (uint256) { + return _duration; + } + + /** + * @dev Amount of eth already released + */ + function released() public view virtual returns (uint256) { + return _released; + } + + /** + * @dev Amount of token already released + */ + function released(address token) public view virtual returns (uint256) { + return _erc20Released[token]; + } + + /** + * @dev Getter for the amount of releasable eth. + */ + function releasable() public view virtual returns (uint256) { + return vestedAmount(uint64(block.timestamp)) - released(); + } + + /** + * @dev Getter for the amount of releasable `token` tokens. `token` should be the address of an + * IERC20 contract. + */ + function releasable(address token) public view virtual returns (uint256) { + return vestedAmount(token, uint64(block.timestamp)) - released(token); + } + + /** + * @dev Release the native token (ether) that have already vested. + * + * Emits a {EtherReleased} event. + */ + function release() public virtual { + uint256 amount = releasable(); + _released += amount; + emit EtherReleased(amount); + Address.sendValue(payable(beneficiary()), amount); + } + + /** + * @dev Release the tokens that have already vested. + * + * Emits a {ERC20Released} event. + */ + function release(address token) public virtual { + uint256 amount = releasable(token); + _erc20Released[token] += amount; + emit ERC20Released(token, amount); + SafeERC20.safeTransfer(IERC20(token), beneficiary(), amount); + } + + /** + * @dev Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve. + */ + function vestedAmount(uint64 timestamp) public view virtual returns (uint256) { + return _vestingSchedule(address(this).balance + released(), timestamp); + } + + /** + * @dev Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve. + */ + function vestedAmount(address token, uint64 timestamp) public view virtual returns (uint256) { + return _vestingSchedule(IERC20(token).balanceOf(address(this)) + released(token), timestamp); + } + + /** + * @dev Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for + * an asset given its total historical allocation. + */ + function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) { + if (timestamp < start()) { + return 0; + } else if (timestamp > start() + duration()) { + return totalAllocation; + } else { + return (totalAllocation * (timestamp - start())) / duration(); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol new file mode 100644 index 00000000..e6fe2228 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol @@ -0,0 +1,723 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.1) (governance/Governor.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/IERC721Receiver.sol"; +import "../token/ERC1155/IERC1155Receiver.sol"; +import "../utils/cryptography/ECDSA.sol"; +import "../utils/cryptography/EIP712.sol"; +import "../utils/introspection/ERC165.sol"; +import "../utils/math/SafeCast.sol"; +import "../utils/structs/DoubleEndedQueue.sol"; +import "../utils/Address.sol"; +import "../utils/Context.sol"; +import "./IGovernor.sol"; + +/** + * @dev Core of the governance system, designed to be extended though various modules. + * + * This contract is abstract and requires several functions to be implemented in various modules: + * + * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} + * - A voting module must implement {_getVotes} + * - Additionally, {votingPeriod} must also be implemented + * + * _Available since v4.3._ + */ +abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receiver, IERC1155Receiver { + using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; + + bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); + bytes32 public constant EXTENDED_BALLOT_TYPEHASH = + keccak256("ExtendedBallot(uint256 proposalId,uint8 support,string reason,bytes params)"); + + // solhint-disable var-name-mixedcase + struct ProposalCore { + // --- start retyped from Timers.BlockNumber at offset 0x00 --- + uint64 voteStart; + address proposer; + bytes4 __gap_unused0; + // --- start retyped from Timers.BlockNumber at offset 0x20 --- + uint64 voteEnd; + bytes24 __gap_unused1; + // --- Remaining fields starting at offset 0x40 --------------- + bool executed; + bool canceled; + } + // solhint-enable var-name-mixedcase + + string private _name; + + /// @custom:oz-retyped-from mapping(uint256 => Governor.ProposalCore) + mapping(uint256 => ProposalCore) private _proposals; + + // This queue keeps track of the governor operating on itself. Calls to functions protected by the + // {onlyGovernance} modifier needs to be whitelisted in this queue. Whitelisting is set in {_beforeExecute}, + // consumed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the + // execution of {onlyGovernance} protected calls can only be achieved through successful proposals. + DoubleEndedQueue.Bytes32Deque private _governanceCall; + + /** + * @dev Restricts a function so it can only be executed through governance proposals. For example, governance + * parameter setters in {GovernorSettings} are protected using this modifier. + * + * The governance executing address may be different from the Governor's own address, for example it could be a + * timelock. This can be customized by modules by overriding {_executor}. The executor is only able to invoke these + * functions during the execution of the governor's {execute} function, and not under any other circumstances. Thus, + * for example, additional timelock proposers are not able to change governance parameters without going through the + * governance protocol (since v4.6). + */ + modifier onlyGovernance() { + require(_msgSender() == _executor(), "Governor: onlyGovernance"); + if (_executor() != address(this)) { + bytes32 msgDataHash = keccak256(_msgData()); + // loop until popping the expected operation - throw if deque is empty (operation not authorized) + while (_governanceCall.popFront() != msgDataHash) {} + } + _; + } + + /** + * @dev Sets the value for {name} and {version} + */ + constructor(string memory name_) EIP712(name_, version()) { + _name = name_; + } + + /** + * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) + */ + receive() external payable virtual { + require(_executor() == address(this), "Governor: must send to executor"); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { + bytes4 governorCancelId = this.cancel.selector ^ this.proposalProposer.selector; + + bytes4 governorParamsId = this.castVoteWithReasonAndParams.selector ^ + this.castVoteWithReasonAndParamsBySig.selector ^ + this.getVotesWithParams.selector; + + // The original interface id in v4.3. + bytes4 governor43Id = type(IGovernor).interfaceId ^ + type(IERC6372).interfaceId ^ + governorCancelId ^ + governorParamsId; + + // An updated interface id in v4.6, with params added. + bytes4 governor46Id = type(IGovernor).interfaceId ^ type(IERC6372).interfaceId ^ governorCancelId; + + // For the updated interface id in v4.9, we use governorCancelId directly. + + return + interfaceId == governor43Id || + interfaceId == governor46Id || + interfaceId == governorCancelId || + interfaceId == type(IERC1155Receiver).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IGovernor-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IGovernor-version}. + */ + function version() public view virtual override returns (string memory) { + return "1"; + } + + /** + * @dev See {IGovernor-hashProposal}. + * + * The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array + * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id + * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in + * advance, before the proposal is submitted. + * + * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the + * same proposal (with same operation and same description) will have the same id if submitted on multiple governors + * across multiple networks. This also means that in order to execute the same operation twice (on the same + * governor) the proposer will have to change the description in order to avoid proposal id conflicts. + */ + function hashProposal( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public pure virtual override returns (uint256) { + return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); + } + + /** + * @dev See {IGovernor-state}. + */ + function state(uint256 proposalId) public view virtual override returns (ProposalState) { + ProposalCore storage proposal = _proposals[proposalId]; + + if (proposal.executed) { + return ProposalState.Executed; + } + + if (proposal.canceled) { + return ProposalState.Canceled; + } + + uint256 snapshot = proposalSnapshot(proposalId); + + if (snapshot == 0) { + revert("Governor: unknown proposal id"); + } + + uint256 currentTimepoint = clock(); + + if (snapshot >= currentTimepoint) { + return ProposalState.Pending; + } + + uint256 deadline = proposalDeadline(proposalId); + + if (deadline >= currentTimepoint) { + return ProposalState.Active; + } + + if (_quorumReached(proposalId) && _voteSucceeded(proposalId)) { + return ProposalState.Succeeded; + } else { + return ProposalState.Defeated; + } + } + + /** + * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. + */ + function proposalThreshold() public view virtual returns (uint256) { + return 0; + } + + /** + * @dev See {IGovernor-proposalSnapshot}. + */ + function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { + return _proposals[proposalId].voteStart; + } + + /** + * @dev See {IGovernor-proposalDeadline}. + */ + function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { + return _proposals[proposalId].voteEnd; + } + + /** + * @dev Returns the account that created a given proposal. + */ + function proposalProposer(uint256 proposalId) public view virtual override returns (address) { + return _proposals[proposalId].proposer; + } + + /** + * @dev Amount of votes already cast passes the threshold limit. + */ + function _quorumReached(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Is the proposal successful or not. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Get the voting weight of `account` at a specific `timepoint`, for a vote as described by `params`. + */ + function _getVotes(address account, uint256 timepoint, bytes memory params) internal view virtual returns (uint256); + + /** + * @dev Register a vote for `proposalId` by `account` with a given `support`, voting `weight` and voting `params`. + * + * Note: Support is generic and can represent various things depending on the voting system used. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 weight, + bytes memory params + ) internal virtual; + + /** + * @dev Default additional encoded parameters used by castVote methods that don't include them + * + * Note: Should be overridden by specific implementations to use an appropriate value, the + * meaning of the additional params, in the context of that implementation + */ + function _defaultParams() internal view virtual returns (bytes memory) { + return ""; + } + + /** + * @dev See {IGovernor-propose}. This function has opt-in frontrunning protection, described in {_isValidDescriptionForProposer}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + address proposer = _msgSender(); + require(_isValidDescriptionForProposer(proposer, description), "Governor: proposer restricted"); + + uint256 currentTimepoint = clock(); + require( + getVotes(proposer, currentTimepoint - 1) >= proposalThreshold(), + "Governor: proposer votes below proposal threshold" + ); + + uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); + + require(targets.length == values.length, "Governor: invalid proposal length"); + require(targets.length == calldatas.length, "Governor: invalid proposal length"); + require(targets.length > 0, "Governor: empty proposal"); + require(_proposals[proposalId].voteStart == 0, "Governor: proposal already exists"); + + uint256 snapshot = currentTimepoint + votingDelay(); + uint256 deadline = snapshot + votingPeriod(); + + _proposals[proposalId] = ProposalCore({ + proposer: proposer, + voteStart: SafeCast.toUint64(snapshot), + voteEnd: SafeCast.toUint64(deadline), + executed: false, + canceled: false, + __gap_unused0: 0, + __gap_unused1: 0 + }); + + emit ProposalCreated( + proposalId, + proposer, + targets, + values, + new string[](targets.length), + calldatas, + snapshot, + deadline, + description + ); + + return proposalId; + } + + /** + * @dev See {IGovernor-execute}. + */ + function execute( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public payable virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + ProposalState currentState = state(proposalId); + require( + currentState == ProposalState.Succeeded || currentState == ProposalState.Queued, + "Governor: proposal not successful" + ); + _proposals[proposalId].executed = true; + + emit ProposalExecuted(proposalId); + + _beforeExecute(proposalId, targets, values, calldatas, descriptionHash); + _execute(proposalId, targets, values, calldatas, descriptionHash); + _afterExecute(proposalId, targets, values, calldatas, descriptionHash); + + return proposalId; + } + + /** + * @dev See {IGovernor-cancel}. + */ + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + require(state(proposalId) == ProposalState.Pending, "Governor: too late to cancel"); + require(_msgSender() == _proposals[proposalId].proposer, "Governor: only proposer can cancel"); + return _cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Internal execution mechanism. Can be overridden to implement different execution mechanism + */ + function _execute( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual { + string memory errorMessage = "Governor: call reverted without message"; + for (uint256 i = 0; i < targets.length; ++i) { + (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); + Address.verifyCallResult(success, returndata, errorMessage); + } + } + + /** + * @dev Hook before execution is triggered. + */ + function _beforeExecute( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory /* values */, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual { + if (_executor() != address(this)) { + for (uint256 i = 0; i < targets.length; ++i) { + if (targets[i] == address(this)) { + _governanceCall.pushBack(keccak256(calldatas[i])); + } + } + } + } + + /** + * @dev Hook after execution is triggered. + */ + function _afterExecute( + uint256 /* proposalId */, + address[] memory /* targets */, + uint256[] memory /* values */, + bytes[] memory /* calldatas */, + bytes32 /*descriptionHash*/ + ) internal virtual { + if (_executor() != address(this)) { + if (!_governanceCall.empty()) { + _governanceCall.clear(); + } + } + } + + /** + * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as + * canceled to allow distinguishing it from executed proposals. + * + * Emits a {IGovernor-ProposalCanceled} event. + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + ProposalState currentState = state(proposalId); + + require( + currentState != ProposalState.Canceled && + currentState != ProposalState.Expired && + currentState != ProposalState.Executed, + "Governor: proposal not active" + ); + _proposals[proposalId].canceled = true; + + emit ProposalCanceled(proposalId); + + return proposalId; + } + + /** + * @dev See {IGovernor-getVotes}. + */ + function getVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { + return _getVotes(account, timepoint, _defaultParams()); + } + + /** + * @dev See {IGovernor-getVotesWithParams}. + */ + function getVotesWithParams( + address account, + uint256 timepoint, + bytes memory params + ) public view virtual override returns (uint256) { + return _getVotes(account, timepoint, params); + } + + /** + * @dev See {IGovernor-castVote}. + */ + function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, ""); + } + + /** + * @dev See {IGovernor-castVoteWithReason}. + */ + function castVoteWithReason( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual override returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason); + } + + /** + * @dev See {IGovernor-castVoteWithReasonAndParams}. + */ + function castVoteWithReasonAndParams( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params + ) public virtual override returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason, params); + } + + /** + * @dev See {IGovernor-castVoteBySig}. + */ + function castVoteBySig( + uint256 proposalId, + uint8 support, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override returns (uint256) { + address voter = ECDSA.recover( + _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))), + v, + r, + s + ); + return _castVote(proposalId, voter, support, ""); + } + + /** + * @dev See {IGovernor-castVoteWithReasonAndParamsBySig}. + */ + function castVoteWithReasonAndParamsBySig( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override returns (uint256) { + address voter = ECDSA.recover( + _hashTypedDataV4( + keccak256( + abi.encode( + EXTENDED_BALLOT_TYPEHASH, + proposalId, + support, + keccak256(bytes(reason)), + keccak256(params) + ) + ) + ), + v, + r, + s + ); + + return _castVote(proposalId, voter, support, reason, params); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. Uses the _defaultParams(). + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason + ) internal virtual returns (uint256) { + return _castVote(proposalId, account, support, reason, _defaultParams()); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason, + bytes memory params + ) internal virtual returns (uint256) { + ProposalCore storage proposal = _proposals[proposalId]; + require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active"); + + uint256 weight = _getVotes(account, proposal.voteStart, params); + _countVote(proposalId, account, support, weight, params); + + if (params.length == 0) { + emit VoteCast(account, proposalId, support, weight, reason); + } else { + emit VoteCastWithParams(account, proposalId, support, weight, reason, params); + } + + return weight; + } + + /** + * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor + * is some contract other than the governor itself, like when using a timelock, this function can be invoked + * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. + * Note that if the executor is simply the governor itself, use of `relay` is redundant. + */ + function relay(address target, uint256 value, bytes calldata data) external payable virtual onlyGovernance { + (bool success, bytes memory returndata) = target.call{value: value}(data); + Address.verifyCallResult(success, returndata, "Governor: relay reverted without message"); + } + + /** + * @dev Address through which the governor executes action. Will be overloaded by module that execute actions + * through another contract such as a timelock. + */ + function _executor() internal view virtual returns (address) { + return address(this); + } + + /** + * @dev See {IERC721Receiver-onERC721Received}. + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + return this.onERC721Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155Received}. + */ + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + */ + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155BatchReceived.selector; + } + + /** + * @dev Check if the proposer is authorized to submit a proposal with the given description. + * + * If the proposal description ends with `#proposer=0x???`, where `0x???` is an address written as a hex string + * (case insensitive), then the submission of this proposal will only be authorized to said address. + * + * This is used for frontrunning protection. By adding this pattern at the end of their proposal, one can ensure + * that no other address can submit the same proposal. An attacker would have to either remove or change that part, + * which would result in a different proposal id. + * + * If the description does not match this pattern, it is unrestricted and anyone can submit it. This includes: + * - If the `0x???` part is not a valid hex string. + * - If the `0x???` part is a valid hex string, but does not contain exactly 40 hex digits. + * - If it ends with the expected suffix followed by newlines or other whitespace. + * - If it ends with some other similar suffix, e.g. `#other=abc`. + * - If it does not end with any such suffix. + */ + function _isValidDescriptionForProposer( + address proposer, + string memory description + ) internal view virtual returns (bool) { + uint256 len = bytes(description).length; + + // Length is too short to contain a valid proposer suffix + if (len < 52) { + return true; + } + + // Extract what would be the `#proposer=0x` marker beginning the suffix + bytes12 marker; + assembly { + // - Start of the string contents in memory = description + 32 + // - First character of the marker = len - 52 + // - Length of "#proposer=0x0000000000000000000000000000000000000000" = 52 + // - We read the memory word starting at the first character of the marker: + // - (description + 32) + (len - 52) = description + (len - 20) + // - Note: Solidity will ignore anything past the first 12 bytes + marker := mload(add(description, sub(len, 20))) + } + + // If the marker is not found, there is no proposer suffix to check + if (marker != bytes12("#proposer=0x")) { + return true; + } + + // Parse the 40 characters following the marker as uint160 + uint160 recovered = 0; + for (uint256 i = len - 40; i < len; ++i) { + (bool isHex, uint8 value) = _tryHexToUint(bytes(description)[i]); + // If any of the characters is not a hex digit, ignore the suffix entirely + if (!isHex) { + return true; + } + recovered = (recovered << 4) | value; + } + + return recovered == uint160(proposer); + } + + /** + * @dev Try to parse a character from a string as a hex value. Returns `(true, value)` if the char is in + * `[0-9a-fA-F]` and `(false, 0)` otherwise. Value is guaranteed to be in the range `0 <= value < 16` + */ + function _tryHexToUint(bytes1 char) private pure returns (bool, uint8) { + uint8 c = uint8(char); + unchecked { + // Case 0-9 + if (47 < c && c < 58) { + return (true, c - 48); + } + // Case A-F + else if (64 < c && c < 71) { + return (true, c - 55); + } + // Case a-f + else if (96 < c && c < 103) { + return (true, c - 87); + } + // Else: not a hex char + else { + return (false, 0); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol new file mode 100644 index 00000000..492d95b9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol @@ -0,0 +1,313 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/IGovernor.sol) + +pragma solidity ^0.8.0; + +import "../interfaces/IERC165.sol"; +import "../interfaces/IERC6372.sol"; + +/** + * @dev Interface of the {Governor} core. + * + * _Available since v4.3._ + */ +abstract contract IGovernor is IERC165, IERC6372 { + enum ProposalState { + Pending, + Active, + Canceled, + Defeated, + Succeeded, + Queued, + Expired, + Executed + } + + /** + * @dev Emitted when a proposal is created. + */ + event ProposalCreated( + uint256 proposalId, + address proposer, + address[] targets, + uint256[] values, + string[] signatures, + bytes[] calldatas, + uint256 voteStart, + uint256 voteEnd, + string description + ); + + /** + * @dev Emitted when a proposal is canceled. + */ + event ProposalCanceled(uint256 proposalId); + + /** + * @dev Emitted when a proposal is executed. + */ + event ProposalExecuted(uint256 proposalId); + + /** + * @dev Emitted when a vote is cast without params. + * + * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. + */ + event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); + + /** + * @dev Emitted when a vote is cast with params. + * + * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. + * `params` are additional encoded parameters. Their interpepretation also depends on the voting module used. + */ + event VoteCastWithParams( + address indexed voter, + uint256 proposalId, + uint8 support, + uint256 weight, + string reason, + bytes params + ); + + /** + * @notice module:core + * @dev Name of the governor instance (used in building the ERC712 domain separator). + */ + function name() public view virtual returns (string memory); + + /** + * @notice module:core + * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1" + */ + function version() public view virtual returns (string memory); + + /** + * @notice module:core + * @dev See {IERC6372} + */ + function clock() public view virtual override returns (uint48); + + /** + * @notice module:core + * @dev See EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory); + + /** + * @notice module:voting + * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to + * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of + * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`. + * + * There are 2 standard keys: `support` and `quorum`. + * + * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`. + * - `quorum=bravo` means that only For votes are counted towards quorum. + * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum. + * + * If a counting module makes use of encoded `params`, it should include this under a `params` key with a unique + * name that describes the behavior. For example: + * + * - `params=fractional` might refer to a scheme where votes are divided fractionally between for/against/abstain. + * - `params=erc721` might refer to a scheme where specific NFTs are delegated to vote. + * + * NOTE: The string can be decoded by the standard + * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`] + * JavaScript class. + */ + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public view virtual returns (string memory); + + /** + * @notice module:core + * @dev Hashing function used to (re)build the proposal id from the proposal details.. + */ + function hashProposal( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public pure virtual returns (uint256); + + /** + * @notice module:core + * @dev Current state of a proposal, following Compound's convention + */ + function state(uint256 proposalId) public view virtual returns (ProposalState); + + /** + * @notice module:core + * @dev Timepoint used to retrieve user's votes and quorum. If using block number (as per Compound's Comp), the + * snapshot is performed at the end of this block. Hence, voting for this proposal starts at the beginning of the + * following block. + */ + function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256); + + /** + * @notice module:core + * @dev Timepoint at which votes close. If using block number, votes close at the end of this block, so it is + * possible to cast a vote during this block. + */ + function proposalDeadline(uint256 proposalId) public view virtual returns (uint256); + + /** + * @notice module:core + * @dev The account that created a proposal. + */ + function proposalProposer(uint256 proposalId) public view virtual returns (address); + + /** + * @notice module:user-config + * @dev Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends + * on the clock (see EIP-6372) this contract uses. + * + * This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a + * proposal starts. + */ + function votingDelay() public view virtual returns (uint256); + + /** + * @notice module:user-config + * @dev Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock + * (see EIP-6372) this contract uses. + * + * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting + * duration compared to the voting delay. + */ + function votingPeriod() public view virtual returns (uint256); + + /** + * @notice module:user-config + * @dev Minimum number of cast voted required for a proposal to be successful. + * + * NOTE: The `timepoint` parameter corresponds to the snapshot used for counting vote. This allows to scale the + * quorum depending on values such as the totalSupply of a token at this timepoint (see {ERC20Votes}). + */ + function quorum(uint256 timepoint) public view virtual returns (uint256); + + /** + * @notice module:reputation + * @dev Voting power of an `account` at a specific `timepoint`. + * + * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or + * multiple), {ERC20Votes} tokens. + */ + function getVotes(address account, uint256 timepoint) public view virtual returns (uint256); + + /** + * @notice module:reputation + * @dev Voting power of an `account` at a specific `timepoint` given additional encoded parameters. + */ + function getVotesWithParams( + address account, + uint256 timepoint, + bytes memory params + ) public view virtual returns (uint256); + + /** + * @notice module:voting + * @dev Returns whether `account` has cast a vote on `proposalId`. + */ + function hasVoted(uint256 proposalId, address account) public view virtual returns (bool); + + /** + * @dev Create a new proposal. Vote start after a delay specified by {IGovernor-votingDelay} and lasts for a + * duration specified by {IGovernor-votingPeriod}. + * + * Emits a {ProposalCreated} event. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual returns (uint256 proposalId); + + /** + * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the + * deadline to be reached. + * + * Emits a {ProposalExecuted} event. + * + * Note: some module can modify the requirements for execution, for example by adding an additional timelock. + */ + function execute( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public payable virtual returns (uint256 proposalId); + + /** + * @dev Cancel a proposal. A proposal is cancellable by the proposer, but only while it is Pending state, i.e. + * before the vote starts. + * + * Emits a {ProposalCanceled} event. + */ + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256 proposalId); + + /** + * @dev Cast a vote + * + * Emits a {VoteCast} event. + */ + function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote with a reason + * + * Emits a {VoteCast} event. + */ + function castVoteWithReason( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote with a reason and additional encoded parameters + * + * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. + */ + function castVoteWithReasonAndParams( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params + ) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote using the user's cryptographic signature. + * + * Emits a {VoteCast} event. + */ + function castVoteBySig( + uint256 proposalId, + uint8 support, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote with a reason and additional encoded parameters using the user's cryptographic signature. + * + * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. + */ + function castVoteWithReasonAndParamsBySig( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual returns (uint256 balance); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/TimelockController.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/TimelockController.sol new file mode 100644 index 00000000..f70a7d11 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/TimelockController.sol @@ -0,0 +1,422 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/TimelockController.sol) + +pragma solidity ^0.8.0; + +import "../access/AccessControl.sol"; +import "../token/ERC721/IERC721Receiver.sol"; +import "../token/ERC1155/IERC1155Receiver.sol"; + +/** + * @dev Contract module which acts as a timelocked controller. When set as the + * owner of an `Ownable` smart contract, it enforces a timelock on all + * `onlyOwner` maintenance operations. This gives time for users of the + * controlled contract to exit before a potentially dangerous maintenance + * operation is applied. + * + * By default, this contract is self administered, meaning administration tasks + * have to go through the timelock process. The proposer (resp executor) role + * is in charge of proposing (resp executing) operations. A common use case is + * to position this {TimelockController} as the owner of a smart contract, with + * a multisig or a DAO as the sole proposer. + * + * _Available since v3.3._ + */ +contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver { + bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); + bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); + bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); + bytes32 public constant CANCELLER_ROLE = keccak256("CANCELLER_ROLE"); + uint256 internal constant _DONE_TIMESTAMP = uint256(1); + + mapping(bytes32 => uint256) private _timestamps; + uint256 private _minDelay; + + /** + * @dev Emitted when a call is scheduled as part of operation `id`. + */ + event CallScheduled( + bytes32 indexed id, + uint256 indexed index, + address target, + uint256 value, + bytes data, + bytes32 predecessor, + uint256 delay + ); + + /** + * @dev Emitted when a call is performed as part of operation `id`. + */ + event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data); + + /** + * @dev Emitted when new proposal is scheduled with non-zero salt. + */ + event CallSalt(bytes32 indexed id, bytes32 salt); + + /** + * @dev Emitted when operation `id` is cancelled. + */ + event Cancelled(bytes32 indexed id); + + /** + * @dev Emitted when the minimum delay for future operations is modified. + */ + event MinDelayChange(uint256 oldDuration, uint256 newDuration); + + /** + * @dev Initializes the contract with the following parameters: + * + * - `minDelay`: initial minimum delay for operations + * - `proposers`: accounts to be granted proposer and canceller roles + * - `executors`: accounts to be granted executor role + * - `admin`: optional account to be granted admin role; disable with zero address + * + * IMPORTANT: The optional admin can aid with initial configuration of roles after deployment + * without being subject to delay, but this role should be subsequently renounced in favor of + * administration through timelocked proposals. Previous versions of this contract would assign + * this admin to the deployer automatically and should be renounced as well. + */ + constructor(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) { + _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE); + _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE); + _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE); + _setRoleAdmin(CANCELLER_ROLE, TIMELOCK_ADMIN_ROLE); + + // self administration + _setupRole(TIMELOCK_ADMIN_ROLE, address(this)); + + // optional admin + if (admin != address(0)) { + _setupRole(TIMELOCK_ADMIN_ROLE, admin); + } + + // register proposers and cancellers + for (uint256 i = 0; i < proposers.length; ++i) { + _setupRole(PROPOSER_ROLE, proposers[i]); + _setupRole(CANCELLER_ROLE, proposers[i]); + } + + // register executors + for (uint256 i = 0; i < executors.length; ++i) { + _setupRole(EXECUTOR_ROLE, executors[i]); + } + + _minDelay = minDelay; + emit MinDelayChange(0, minDelay); + } + + /** + * @dev Modifier to make a function callable only by a certain role. In + * addition to checking the sender's role, `address(0)` 's role is also + * considered. Granting a role to `address(0)` is equivalent to enabling + * this role for everyone. + */ + modifier onlyRoleOrOpenRole(bytes32 role) { + if (!hasRole(role, address(0))) { + _checkRole(role, _msgSender()); + } + _; + } + + /** + * @dev Contract might receive/hold ETH as part of the maintenance process. + */ + receive() external payable {} + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, AccessControl) returns (bool) { + return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns whether an id correspond to a registered operation. This + * includes both Pending, Ready and Done operations. + */ + function isOperation(bytes32 id) public view virtual returns (bool) { + return getTimestamp(id) > 0; + } + + /** + * @dev Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready". + */ + function isOperationPending(bytes32 id) public view virtual returns (bool) { + return getTimestamp(id) > _DONE_TIMESTAMP; + } + + /** + * @dev Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending". + */ + function isOperationReady(bytes32 id) public view virtual returns (bool) { + uint256 timestamp = getTimestamp(id); + return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp; + } + + /** + * @dev Returns whether an operation is done or not. + */ + function isOperationDone(bytes32 id) public view virtual returns (bool) { + return getTimestamp(id) == _DONE_TIMESTAMP; + } + + /** + * @dev Returns the timestamp at which an operation becomes ready (0 for + * unset operations, 1 for done operations). + */ + function getTimestamp(bytes32 id) public view virtual returns (uint256) { + return _timestamps[id]; + } + + /** + * @dev Returns the minimum delay for an operation to become valid. + * + * This value can be changed by executing an operation that calls `updateDelay`. + */ + function getMinDelay() public view virtual returns (uint256) { + return _minDelay; + } + + /** + * @dev Returns the identifier of an operation containing a single + * transaction. + */ + function hashOperation( + address target, + uint256 value, + bytes calldata data, + bytes32 predecessor, + bytes32 salt + ) public pure virtual returns (bytes32) { + return keccak256(abi.encode(target, value, data, predecessor, salt)); + } + + /** + * @dev Returns the identifier of an operation containing a batch of + * transactions. + */ + function hashOperationBatch( + address[] calldata targets, + uint256[] calldata values, + bytes[] calldata payloads, + bytes32 predecessor, + bytes32 salt + ) public pure virtual returns (bytes32) { + return keccak256(abi.encode(targets, values, payloads, predecessor, salt)); + } + + /** + * @dev Schedule an operation containing a single transaction. + * + * Emits {CallSalt} if salt is nonzero, and {CallScheduled}. + * + * Requirements: + * + * - the caller must have the 'proposer' role. + */ + function schedule( + address target, + uint256 value, + bytes calldata data, + bytes32 predecessor, + bytes32 salt, + uint256 delay + ) public virtual onlyRole(PROPOSER_ROLE) { + bytes32 id = hashOperation(target, value, data, predecessor, salt); + _schedule(id, delay); + emit CallScheduled(id, 0, target, value, data, predecessor, delay); + if (salt != bytes32(0)) { + emit CallSalt(id, salt); + } + } + + /** + * @dev Schedule an operation containing a batch of transactions. + * + * Emits {CallSalt} if salt is nonzero, and one {CallScheduled} event per transaction in the batch. + * + * Requirements: + * + * - the caller must have the 'proposer' role. + */ + function scheduleBatch( + address[] calldata targets, + uint256[] calldata values, + bytes[] calldata payloads, + bytes32 predecessor, + bytes32 salt, + uint256 delay + ) public virtual onlyRole(PROPOSER_ROLE) { + require(targets.length == values.length, "TimelockController: length mismatch"); + require(targets.length == payloads.length, "TimelockController: length mismatch"); + + bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); + _schedule(id, delay); + for (uint256 i = 0; i < targets.length; ++i) { + emit CallScheduled(id, i, targets[i], values[i], payloads[i], predecessor, delay); + } + if (salt != bytes32(0)) { + emit CallSalt(id, salt); + } + } + + /** + * @dev Schedule an operation that is to become valid after a given delay. + */ + function _schedule(bytes32 id, uint256 delay) private { + require(!isOperation(id), "TimelockController: operation already scheduled"); + require(delay >= getMinDelay(), "TimelockController: insufficient delay"); + _timestamps[id] = block.timestamp + delay; + } + + /** + * @dev Cancel an operation. + * + * Requirements: + * + * - the caller must have the 'canceller' role. + */ + function cancel(bytes32 id) public virtual onlyRole(CANCELLER_ROLE) { + require(isOperationPending(id), "TimelockController: operation cannot be cancelled"); + delete _timestamps[id]; + + emit Cancelled(id); + } + + /** + * @dev Execute an (ready) operation containing a single transaction. + * + * Emits a {CallExecuted} event. + * + * Requirements: + * + * - the caller must have the 'executor' role. + */ + // This function can reenter, but it doesn't pose a risk because _afterCall checks that the proposal is pending, + // thus any modifications to the operation during reentrancy should be caught. + // slither-disable-next-line reentrancy-eth + function execute( + address target, + uint256 value, + bytes calldata payload, + bytes32 predecessor, + bytes32 salt + ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { + bytes32 id = hashOperation(target, value, payload, predecessor, salt); + + _beforeCall(id, predecessor); + _execute(target, value, payload); + emit CallExecuted(id, 0, target, value, payload); + _afterCall(id); + } + + /** + * @dev Execute an (ready) operation containing a batch of transactions. + * + * Emits one {CallExecuted} event per transaction in the batch. + * + * Requirements: + * + * - the caller must have the 'executor' role. + */ + // This function can reenter, but it doesn't pose a risk because _afterCall checks that the proposal is pending, + // thus any modifications to the operation during reentrancy should be caught. + // slither-disable-next-line reentrancy-eth + function executeBatch( + address[] calldata targets, + uint256[] calldata values, + bytes[] calldata payloads, + bytes32 predecessor, + bytes32 salt + ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { + require(targets.length == values.length, "TimelockController: length mismatch"); + require(targets.length == payloads.length, "TimelockController: length mismatch"); + + bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); + + _beforeCall(id, predecessor); + for (uint256 i = 0; i < targets.length; ++i) { + address target = targets[i]; + uint256 value = values[i]; + bytes calldata payload = payloads[i]; + _execute(target, value, payload); + emit CallExecuted(id, i, target, value, payload); + } + _afterCall(id); + } + + /** + * @dev Execute an operation's call. + */ + function _execute(address target, uint256 value, bytes calldata data) internal virtual { + (bool success, ) = target.call{value: value}(data); + require(success, "TimelockController: underlying transaction reverted"); + } + + /** + * @dev Checks before execution of an operation's calls. + */ + function _beforeCall(bytes32 id, bytes32 predecessor) private view { + require(isOperationReady(id), "TimelockController: operation is not ready"); + require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency"); + } + + /** + * @dev Checks after execution of an operation's calls. + */ + function _afterCall(bytes32 id) private { + require(isOperationReady(id), "TimelockController: operation is not ready"); + _timestamps[id] = _DONE_TIMESTAMP; + } + + /** + * @dev Changes the minimum timelock duration for future operations. + * + * Emits a {MinDelayChange} event. + * + * Requirements: + * + * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing + * an operation where the timelock is the target and the data is the ABI-encoded call to this function. + */ + function updateDelay(uint256 newDelay) external virtual { + require(msg.sender == address(this), "TimelockController: caller must be timelock"); + emit MinDelayChange(_minDelay, newDelay); + _minDelay = newDelay; + } + + /** + * @dev See {IERC721Receiver-onERC721Received}. + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + return this.onERC721Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155Received}. + */ + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + */ + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155BatchReceived.selector; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol new file mode 100644 index 00000000..ecc94fba --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol @@ -0,0 +1,333 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/GovernorCompatibilityBravo.sol) + +pragma solidity ^0.8.0; + +import "../../utils/math/SafeCast.sol"; +import "../extensions/IGovernorTimelock.sol"; +import "../Governor.sol"; +import "./IGovernorCompatibilityBravo.sol"; + +/** + * @dev Compatibility layer that implements GovernorBravo compatibility on top of {Governor}. + * + * This compatibility layer includes a voting system and requires a {IGovernorTimelock} compatible module to be added + * through inheritance. It does not include token bindings, nor does it include any variable upgrade patterns. + * + * NOTE: When using this module, you may need to enable the Solidity optimizer to avoid hitting the contract size limit. + * + * _Available since v4.3._ + */ +abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorCompatibilityBravo, Governor { + enum VoteType { + Against, + For, + Abstain + } + + struct ProposalDetails { + address proposer; + address[] targets; + uint256[] values; + string[] signatures; + bytes[] calldatas; + uint256 forVotes; + uint256 againstVotes; + uint256 abstainVotes; + mapping(address => Receipt) receipts; + bytes32 descriptionHash; + } + + mapping(uint256 => ProposalDetails) private _proposalDetails; + + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo&quorum=bravo"; + } + + // ============================================== Proposal lifecycle ============================================== + /** + * @dev See {IGovernor-propose}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override(IGovernor, Governor) returns (uint256) { + // Stores the proposal details (if not already present) and executes the propose logic from the core. + _storeProposal(_msgSender(), targets, values, new string[](calldatas.length), calldatas, description); + return super.propose(targets, values, calldatas, description); + } + + /** + * @dev See {IGovernorCompatibilityBravo-propose}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + require(signatures.length == calldatas.length, "GovernorBravo: invalid signatures length"); + // Stores the full proposal and fallback to the public (possibly overridden) propose. The fallback is done + // after the full proposal is stored, so the store operation included in the fallback will be skipped. Here we + // call `propose` and not `super.propose` to make sure if a child contract override `propose`, whatever code + // is added there is also executed when calling this alternative interface. + _storeProposal(_msgSender(), targets, values, signatures, calldatas, description); + return propose(targets, values, _encodeCalldata(signatures, calldatas), description); + } + + /** + * @dev See {IGovernorCompatibilityBravo-queue}. + */ + function queue(uint256 proposalId) public virtual override { + ( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) = _getProposalParameters(proposalId); + + queue(targets, values, calldatas, descriptionHash); + } + + /** + * @dev See {IGovernorCompatibilityBravo-execute}. + */ + function execute(uint256 proposalId) public payable virtual override { + ( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) = _getProposalParameters(proposalId); + + execute(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Cancel a proposal with GovernorBravo logic. + */ + function cancel(uint256 proposalId) public virtual override { + ( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) = _getProposalParameters(proposalId); + + cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Cancel a proposal with GovernorBravo logic. At any moment a proposal can be cancelled, either by the + * proposer, or by third parties if the proposer's voting power has dropped below the proposal threshold. + */ + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override(IGovernor, Governor) returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + address proposer = _proposalDetails[proposalId].proposer; + + require( + _msgSender() == proposer || getVotes(proposer, clock() - 1) < proposalThreshold(), + "GovernorBravo: proposer above threshold" + ); + + return _cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Encodes calldatas with optional function signature. + */ + function _encodeCalldata( + string[] memory signatures, + bytes[] memory calldatas + ) private pure returns (bytes[] memory) { + bytes[] memory fullcalldatas = new bytes[](calldatas.length); + for (uint256 i = 0; i < fullcalldatas.length; ++i) { + fullcalldatas[i] = bytes(signatures[i]).length == 0 + ? calldatas[i] + : abi.encodePacked(bytes4(keccak256(bytes(signatures[i]))), calldatas[i]); + } + + return fullcalldatas; + } + + /** + * @dev Retrieve proposal parameters by id, with fully encoded calldatas. + */ + function _getProposalParameters( + uint256 proposalId + ) + private + view + returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash) + { + ProposalDetails storage details = _proposalDetails[proposalId]; + return ( + details.targets, + details.values, + _encodeCalldata(details.signatures, details.calldatas), + details.descriptionHash + ); + } + + /** + * @dev Store proposal metadata (if not already present) for later lookup. + */ + function _storeProposal( + address proposer, + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) private { + bytes32 descriptionHash = keccak256(bytes(description)); + uint256 proposalId = hashProposal(targets, values, _encodeCalldata(signatures, calldatas), descriptionHash); + + ProposalDetails storage details = _proposalDetails[proposalId]; + if (details.descriptionHash == bytes32(0)) { + details.proposer = proposer; + details.targets = targets; + details.values = values; + details.signatures = signatures; + details.calldatas = calldatas; + details.descriptionHash = descriptionHash; + } + } + + // ==================================================== Views ===================================================== + /** + * @dev See {IGovernorCompatibilityBravo-proposals}. + */ + function proposals( + uint256 proposalId + ) + public + view + virtual + override + returns ( + uint256 id, + address proposer, + uint256 eta, + uint256 startBlock, + uint256 endBlock, + uint256 forVotes, + uint256 againstVotes, + uint256 abstainVotes, + bool canceled, + bool executed + ) + { + id = proposalId; + eta = proposalEta(proposalId); + startBlock = proposalSnapshot(proposalId); + endBlock = proposalDeadline(proposalId); + + ProposalDetails storage details = _proposalDetails[proposalId]; + proposer = details.proposer; + forVotes = details.forVotes; + againstVotes = details.againstVotes; + abstainVotes = details.abstainVotes; + + ProposalState currentState = state(proposalId); + canceled = currentState == ProposalState.Canceled; + executed = currentState == ProposalState.Executed; + } + + /** + * @dev See {IGovernorCompatibilityBravo-getActions}. + */ + function getActions( + uint256 proposalId + ) + public + view + virtual + override + returns ( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas + ) + { + ProposalDetails storage details = _proposalDetails[proposalId]; + return (details.targets, details.values, details.signatures, details.calldatas); + } + + /** + * @dev See {IGovernorCompatibilityBravo-getReceipt}. + */ + function getReceipt(uint256 proposalId, address voter) public view virtual override returns (Receipt memory) { + return _proposalDetails[proposalId].receipts[voter]; + } + + /** + * @dev See {IGovernorCompatibilityBravo-quorumVotes}. + */ + function quorumVotes() public view virtual override returns (uint256) { + return quorum(clock() - 1); + } + + // ==================================================== Voting ==================================================== + /** + * @dev See {IGovernor-hasVoted}. + */ + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + return _proposalDetails[proposalId].receipts[account].hasVoted; + } + + /** + * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum. + */ + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + ProposalDetails storage details = _proposalDetails[proposalId]; + return quorum(proposalSnapshot(proposalId)) <= details.forVotes; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + ProposalDetails storage details = _proposalDetails[proposalId]; + return details.forVotes > details.againstVotes; + } + + /** + * @dev See {Governor-_countVote}. In this module, the support follows Governor Bravo. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 weight, + bytes memory // params + ) internal virtual override { + ProposalDetails storage details = _proposalDetails[proposalId]; + Receipt storage receipt = details.receipts[account]; + + require(!receipt.hasVoted, "GovernorCompatibilityBravo: vote already cast"); + receipt.hasVoted = true; + receipt.support = support; + receipt.votes = SafeCast.toUint96(weight); + + if (support == uint8(VoteType.Against)) { + details.againstVotes += weight; + } else if (support == uint8(VoteType.For)) { + details.forVotes += weight; + } else if (support == uint8(VoteType.Abstain)) { + details.abstainVotes += weight; + } else { + revert("GovernorCompatibilityBravo: invalid vote type"); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol new file mode 100644 index 00000000..e64a66a6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/IGovernorCompatibilityBravo.sol) + +pragma solidity ^0.8.0; + +import "../IGovernor.sol"; + +/** + * @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility. + * + * _Available since v4.3._ + */ +abstract contract IGovernorCompatibilityBravo is IGovernor { + /** + * @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as + * {{proposal}} returns a very different structure. + */ + struct Proposal { + uint256 id; + address proposer; + uint256 eta; + address[] targets; + uint256[] values; + string[] signatures; + bytes[] calldatas; + uint256 startBlock; + uint256 endBlock; + uint256 forVotes; + uint256 againstVotes; + uint256 abstainVotes; + bool canceled; + bool executed; + mapping(address => Receipt) receipts; + } + + /** + * @dev Receipt structure from Compound Governor Bravo + */ + struct Receipt { + bool hasVoted; + uint8 support; + uint96 votes; + } + + /** + * @dev Part of the Governor Bravo's interface. + */ + function quorumVotes() public view virtual returns (uint256); + + /** + * @dev Part of the Governor Bravo's interface: _"The official record of all proposals ever proposed"_. + */ + function proposals( + uint256 + ) + public + view + virtual + returns ( + uint256 id, + address proposer, + uint256 eta, + uint256 startBlock, + uint256 endBlock, + uint256 forVotes, + uint256 againstVotes, + uint256 abstainVotes, + bool canceled, + bool executed + ); + + /** + * @dev Part of the Governor Bravo's interface: _"Function used to propose a new proposal"_. + */ + function propose( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) public virtual returns (uint256); + + /** + * @dev Part of the Governor Bravo's interface: _"Queues a proposal of state succeeded"_. + */ + function queue(uint256 proposalId) public virtual; + + /** + * @dev Part of the Governor Bravo's interface: _"Executes a queued proposal if eta has passed"_. + */ + function execute(uint256 proposalId) public payable virtual; + + /** + * @dev Cancels a proposal only if the sender is the proposer or the proposer delegates' voting power dropped below the proposal threshold. + */ + function cancel(uint256 proposalId) public virtual; + + /** + * @dev Part of the Governor Bravo's interface: _"Gets actions of a proposal"_. + */ + function getActions( + uint256 proposalId + ) + public + view + virtual + returns ( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas + ); + + /** + * @dev Part of the Governor Bravo's interface: _"Gets the receipt for a voter on a given proposal"_. + */ + function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorCountingSimple.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorCountingSimple.sol new file mode 100644 index 00000000..b9517445 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorCountingSimple.sol @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorCountingSimple.sol) + +pragma solidity ^0.8.0; + +import "../Governor.sol"; + +/** + * @dev Extension of {Governor} for simple, 3 options, vote counting. + * + * _Available since v4.3._ + */ +abstract contract GovernorCountingSimple is Governor { + /** + * @dev Supported vote types. Matches Governor Bravo ordering. + */ + enum VoteType { + Against, + For, + Abstain + } + + struct ProposalVote { + uint256 againstVotes; + uint256 forVotes; + uint256 abstainVotes; + mapping(address => bool) hasVoted; + } + + mapping(uint256 => ProposalVote) private _proposalVotes; + + /** + * @dev See {IGovernor-COUNTING_MODE}. + */ + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo&quorum=for,abstain"; + } + + /** + * @dev See {IGovernor-hasVoted}. + */ + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + return _proposalVotes[proposalId].hasVoted[account]; + } + + /** + * @dev Accessor to the internal vote counts. + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); + } + + /** + * @dev See {Governor-_quorumReached}. + */ + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + return proposalVote.forVotes > proposalVote.againstVotes; + } + + /** + * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo). + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 weight, + bytes memory // params + ) internal virtual override { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + require(!proposalVote.hasVoted[account], "GovernorVotingSimple: vote already cast"); + proposalVote.hasVoted[account] = true; + + if (support == uint8(VoteType.Against)) { + proposalVote.againstVotes += weight; + } else if (support == uint8(VoteType.For)) { + proposalVote.forVotes += weight; + } else if (support == uint8(VoteType.Abstain)) { + proposalVote.abstainVotes += weight; + } else { + revert("GovernorVotingSimple: invalid value for enum VoteType"); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorPreventLateQuorum.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorPreventLateQuorum.sol new file mode 100644 index 00000000..752a92cf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorPreventLateQuorum.sol @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorPreventLateQuorum.sol) + +pragma solidity ^0.8.0; + +import "../Governor.sol"; +import "../../utils/math/Math.sol"; + +/** + * @dev A module that ensures there is a minimum voting period after quorum is reached. This prevents a large voter from + * swaying a vote and triggering quorum at the last minute, by ensuring there is always time for other voters to react + * and try to oppose the decision. + * + * If a vote causes quorum to be reached, the proposal's voting period may be extended so that it does not end before at + * least a specified time has passed (the "vote extension" parameter). This parameter can be set through a governance + * proposal. + * + * _Available since v4.5._ + */ +abstract contract GovernorPreventLateQuorum is Governor { + uint64 private _voteExtension; + + /// @custom:oz-retyped-from mapping(uint256 => Timers.BlockNumber) + mapping(uint256 => uint64) private _extendedDeadlines; + + /// @dev Emitted when a proposal deadline is pushed back due to reaching quorum late in its voting period. + event ProposalExtended(uint256 indexed proposalId, uint64 extendedDeadline); + + /// @dev Emitted when the {lateQuorumVoteExtension} parameter is changed. + event LateQuorumVoteExtensionSet(uint64 oldVoteExtension, uint64 newVoteExtension); + + /** + * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the governor + * clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period ends. If + * necessary the voting period will be extended beyond the one set during proposal creation. + */ + constructor(uint64 initialVoteExtension) { + _setLateQuorumVoteExtension(initialVoteExtension); + } + + /** + * @dev Returns the proposal deadline, which may have been extended beyond that set at proposal creation, if the + * proposal reached quorum late in the voting period. See {Governor-proposalDeadline}. + */ + function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { + return Math.max(super.proposalDeadline(proposalId), _extendedDeadlines[proposalId]); + } + + /** + * @dev Casts a vote and detects if it caused quorum to be reached, potentially extending the voting period. See + * {Governor-_castVote}. + * + * May emit a {ProposalExtended} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason, + bytes memory params + ) internal virtual override returns (uint256) { + uint256 result = super._castVote(proposalId, account, support, reason, params); + + if (_extendedDeadlines[proposalId] == 0 && _quorumReached(proposalId)) { + uint64 extendedDeadline = clock() + lateQuorumVoteExtension(); + + if (extendedDeadline > proposalDeadline(proposalId)) { + emit ProposalExtended(proposalId, extendedDeadline); + } + + _extendedDeadlines[proposalId] = extendedDeadline; + } + + return result; + } + + /** + * @dev Returns the current value of the vote extension parameter: the number of blocks that are required to pass + * from the time a proposal reaches quorum until its voting period ends. + */ + function lateQuorumVoteExtension() public view virtual returns (uint64) { + return _voteExtension; + } + + /** + * @dev Changes the {lateQuorumVoteExtension}. This operation can only be performed by the governance executor, + * generally through a governance proposal. + * + * Emits a {LateQuorumVoteExtensionSet} event. + */ + function setLateQuorumVoteExtension(uint64 newVoteExtension) public virtual onlyGovernance { + _setLateQuorumVoteExtension(newVoteExtension); + } + + /** + * @dev Changes the {lateQuorumVoteExtension}. This is an internal function that can be exposed in a public function + * like {setLateQuorumVoteExtension} if another access control mechanism is needed. + * + * Emits a {LateQuorumVoteExtensionSet} event. + */ + function _setLateQuorumVoteExtension(uint64 newVoteExtension) internal virtual { + emit LateQuorumVoteExtensionSet(_voteExtension, newVoteExtension); + _voteExtension = newVoteExtension; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol new file mode 100644 index 00000000..3feebace --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorProposalThreshold.sol) + +pragma solidity ^0.8.0; + +import "../Governor.sol"; + +/** + * @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance. + * + * _Available since v4.3._ + * _Deprecated since v4.4._ + */ +abstract contract GovernorProposalThreshold is Governor { + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + return super.propose(targets, values, calldatas, description); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorSettings.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorSettings.sol new file mode 100644 index 00000000..ec6a9830 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorSettings.sol @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorSettings.sol) + +pragma solidity ^0.8.0; + +import "../Governor.sol"; + +/** + * @dev Extension of {Governor} for settings updatable through governance. + * + * _Available since v4.4._ + */ +abstract contract GovernorSettings is Governor { + uint256 private _votingDelay; + uint256 private _votingPeriod; + uint256 private _proposalThreshold; + + event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay); + event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod); + event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold); + + /** + * @dev Initialize the governance parameters. + */ + constructor(uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold) { + _setVotingDelay(initialVotingDelay); + _setVotingPeriod(initialVotingPeriod); + _setProposalThreshold(initialProposalThreshold); + } + + /** + * @dev See {IGovernor-votingDelay}. + */ + function votingDelay() public view virtual override returns (uint256) { + return _votingDelay; + } + + /** + * @dev See {IGovernor-votingPeriod}. + */ + function votingPeriod() public view virtual override returns (uint256) { + return _votingPeriod; + } + + /** + * @dev See {Governor-proposalThreshold}. + */ + function proposalThreshold() public view virtual override returns (uint256) { + return _proposalThreshold; + } + + /** + * @dev Update the voting delay. This operation can only be performed through a governance proposal. + * + * Emits a {VotingDelaySet} event. + */ + function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance { + _setVotingDelay(newVotingDelay); + } + + /** + * @dev Update the voting period. This operation can only be performed through a governance proposal. + * + * Emits a {VotingPeriodSet} event. + */ + function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance { + _setVotingPeriod(newVotingPeriod); + } + + /** + * @dev Update the proposal threshold. This operation can only be performed through a governance proposal. + * + * Emits a {ProposalThresholdSet} event. + */ + function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance { + _setProposalThreshold(newProposalThreshold); + } + + /** + * @dev Internal setter for the voting delay. + * + * Emits a {VotingDelaySet} event. + */ + function _setVotingDelay(uint256 newVotingDelay) internal virtual { + emit VotingDelaySet(_votingDelay, newVotingDelay); + _votingDelay = newVotingDelay; + } + + /** + * @dev Internal setter for the voting period. + * + * Emits a {VotingPeriodSet} event. + */ + function _setVotingPeriod(uint256 newVotingPeriod) internal virtual { + // voting period must be at least one block long + require(newVotingPeriod > 0, "GovernorSettings: voting period too low"); + emit VotingPeriodSet(_votingPeriod, newVotingPeriod); + _votingPeriod = newVotingPeriod; + } + + /** + * @dev Internal setter for the proposal threshold. + * + * Emits a {ProposalThresholdSet} event. + */ + function _setProposalThreshold(uint256 newProposalThreshold) internal virtual { + emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold); + _proposalThreshold = newProposalThreshold; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockCompound.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockCompound.sol new file mode 100644 index 00000000..a706da6a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockCompound.sol @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockCompound.sol) + +pragma solidity ^0.8.0; + +import "./IGovernorTimelock.sol"; +import "../Governor.sol"; +import "../../utils/math/SafeCast.sol"; +import "../../vendor/compound/ICompoundTimelock.sol"; + +/** + * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by + * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be + * the admin of the timelock for any operation to be performed. A public, unrestricted, + * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock. + * + * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, + * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be + * inaccessible. + * + * _Available since v4.3._ + */ +abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor { + ICompoundTimelock private _timelock; + + /// @custom:oz-retyped-from mapping(uint256 => GovernorTimelockCompound.ProposalTimelock) + mapping(uint256 => uint64) private _proposalTimelocks; + + /** + * @dev Emitted when the timelock controller used for proposal execution is modified. + */ + event TimelockChange(address oldTimelock, address newTimelock); + + /** + * @dev Set the timelock. + */ + constructor(ICompoundTimelock timelockAddress) { + _updateTimelock(timelockAddress); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) { + return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Overridden version of the {Governor-state} function with added support for the `Queued` and `Expired` state. + */ + function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) { + ProposalState currentState = super.state(proposalId); + + if (currentState != ProposalState.Succeeded) { + return currentState; + } + + uint256 eta = proposalEta(proposalId); + if (eta == 0) { + return currentState; + } else if (block.timestamp >= eta + _timelock.GRACE_PERIOD()) { + return ProposalState.Expired; + } else { + return ProposalState.Queued; + } + } + + /** + * @dev Public accessor to check the address of the timelock + */ + function timelock() public view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Public accessor to check the eta of a queued proposal + */ + function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { + return _proposalTimelocks[proposalId]; + } + + /** + * @dev Function to queue a proposal to the timelock. + */ + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); + + uint256 eta = block.timestamp + _timelock.delay(); + _proposalTimelocks[proposalId] = SafeCast.toUint64(eta); + + for (uint256 i = 0; i < targets.length; ++i) { + require( + !_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], eta))), + "GovernorTimelockCompound: identical proposal action already queued" + ); + _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], eta); + } + + emit ProposalQueued(proposalId, eta); + + return proposalId; + } + + /** + * @dev Overridden execute function that run the already queued proposal through the timelock. + */ + function _execute( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual override { + uint256 eta = proposalEta(proposalId); + require(eta > 0, "GovernorTimelockCompound: proposal not yet queued"); + Address.sendValue(payable(_timelock), msg.value); + for (uint256 i = 0; i < targets.length; ++i) { + _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta); + } + } + + /** + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * been queued. + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + uint256 eta = proposalEta(proposalId); + if (eta > 0) { + // update state first + delete _proposalTimelocks[proposalId]; + // do external call later + for (uint256 i = 0; i < targets.length; ++i) { + _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], eta); + } + } + + return proposalId; + } + + /** + * @dev Address through which the governor executes action. In this case, the timelock. + */ + function _executor() internal view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Accept admin right over the timelock. + */ + // solhint-disable-next-line private-vars-leading-underscore + function __acceptAdmin() public { + _timelock.acceptAdmin(); + } + + /** + * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates + * must be proposed, scheduled, and executed through governance proposals. + * + * For security reasons, the timelock must be handed over to another admin before setting up a new one. The two + * operations (hand over the timelock) and do the update can be batched in a single proposal. + * + * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the + * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of + * governance. + + * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. + */ + function updateTimelock(ICompoundTimelock newTimelock) external virtual onlyGovernance { + _updateTimelock(newTimelock); + } + + function _updateTimelock(ICompoundTimelock newTimelock) private { + emit TimelockChange(address(_timelock), address(newTimelock)); + _timelock = newTimelock; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockControl.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockControl.sol new file mode 100644 index 00000000..7cb60bab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockControl.sol @@ -0,0 +1,166 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockControl.sol) + +pragma solidity ^0.8.0; + +import "./IGovernorTimelock.sol"; +import "../Governor.sol"; +import "../TimelockController.sol"; + +/** + * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a + * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The + * {Governor} needs the proposer (and ideally the executor) roles for the {Governor} to work properly. + * + * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, + * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be + * inaccessible. + * + * WARNING: Setting up the TimelockController to have additional proposers besides the governor is very risky, as it + * grants them powers that they must be trusted or known not to use: 1) {onlyGovernance} functions like {relay} are + * available to them through the timelock, and 2) approved governance proposals can be blocked by them, effectively + * executing a Denial of Service attack. This risk will be mitigated in a future release. + * + * _Available since v4.3._ + */ +abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { + TimelockController private _timelock; + mapping(uint256 => bytes32) private _timelockIds; + + /** + * @dev Emitted when the timelock controller used for proposal execution is modified. + */ + event TimelockChange(address oldTimelock, address newTimelock); + + /** + * @dev Set the timelock. + */ + constructor(TimelockController timelockAddress) { + _updateTimelock(timelockAddress); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) { + return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Overridden version of the {Governor-state} function with added support for the `Queued` state. + */ + function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) { + ProposalState currentState = super.state(proposalId); + + if (currentState != ProposalState.Succeeded) { + return currentState; + } + + // core tracks execution, so we just have to check if successful proposal have been queued. + bytes32 queueid = _timelockIds[proposalId]; + if (queueid == bytes32(0)) { + return currentState; + } else if (_timelock.isOperationDone(queueid)) { + return ProposalState.Executed; + } else if (_timelock.isOperationPending(queueid)) { + return ProposalState.Queued; + } else { + return ProposalState.Canceled; + } + } + + /** + * @dev Public accessor to check the address of the timelock + */ + function timelock() public view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Public accessor to check the eta of a queued proposal + */ + function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { + uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]); + return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value + } + + /** + * @dev Function to queue a proposal to the timelock. + */ + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); + + uint256 delay = _timelock.getMinDelay(); + _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash); + _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay); + + emit ProposalQueued(proposalId, block.timestamp + delay); + + return proposalId; + } + + /** + * @dev Overridden execute function that run the already queued proposal through the timelock. + */ + function _execute( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override { + _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash); + } + + /** + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * been queued. + */ + // This function can reenter through the external call to the timelock, but we assume the timelock is trusted and + // well behaved (according to TimelockController) and this will not happen. + // slither-disable-next-line reentrancy-no-eth + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + if (_timelockIds[proposalId] != 0) { + _timelock.cancel(_timelockIds[proposalId]); + delete _timelockIds[proposalId]; + } + + return proposalId; + } + + /** + * @dev Address through which the governor executes action. In this case, the timelock. + */ + function _executor() internal view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates + * must be proposed, scheduled, and executed through governance proposals. + * + * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. + */ + function updateTimelock(TimelockController newTimelock) external virtual onlyGovernance { + _updateTimelock(newTimelock); + } + + function _updateTimelock(TimelockController newTimelock) private { + emit TimelockChange(address(_timelock), address(newTimelock)); + _timelock = newTimelock; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotes.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotes.sol new file mode 100644 index 00000000..c2e65cba --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotes.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotes.sol) + +pragma solidity ^0.8.0; + +import "../Governor.sol"; +import "../../interfaces/IERC5805.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. + * + * _Available since v4.3._ + */ +abstract contract GovernorVotes is Governor { + IERC5805 public immutable token; + + constructor(IVotes tokenAddress) { + token = IERC5805(address(tokenAddress)); + } + + /** + * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token + * does not implement EIP-6372. + */ + function clock() public view virtual override returns (uint48) { + try token.clock() returns (uint48 timepoint) { + return timepoint; + } catch { + return SafeCast.toUint48(block.number); + } + } + + /** + * @dev Machine-readable description of the clock as specified in EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + try token.CLOCK_MODE() returns (string memory clockmode) { + return clockmode; + } catch { + return "mode=blocknumber&from=default"; + } + } + + /** + * Read the voting weight from the token's built in snapshot mechanism (see {Governor-_getVotes}). + */ + function _getVotes( + address account, + uint256 timepoint, + bytes memory /*params*/ + ) internal view virtual override returns (uint256) { + return token.getPastVotes(account, timepoint); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol new file mode 100644 index 00000000..e7d7c2c7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesComp.sol) + +pragma solidity ^0.8.0; + +import "../Governor.sol"; +import "../../token/ERC20/extensions/ERC20VotesComp.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from a Comp token. + * + * _Available since v4.3._ + */ +abstract contract GovernorVotesComp is Governor { + ERC20VotesComp public immutable token; + + constructor(ERC20VotesComp token_) { + token = token_; + } + + /** + * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token + * does not implement EIP-6372. + */ + function clock() public view virtual override returns (uint48) { + try token.clock() returns (uint48 timepoint) { + return timepoint; + } catch { + return SafeCast.toUint48(block.number); + } + } + + /** + * @dev Machine-readable description of the clock as specified in EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + try token.CLOCK_MODE() returns (string memory clockmode) { + return clockmode; + } catch { + return "mode=blocknumber&from=default"; + } + } + + /** + * Read the voting weight from the token's built-in snapshot mechanism (see {Governor-_getVotes}). + */ + function _getVotes( + address account, + uint256 timepoint, + bytes memory /*params*/ + ) internal view virtual override returns (uint256) { + return token.getPriorVotes(account, timepoint); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesQuorumFraction.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesQuorumFraction.sol new file mode 100644 index 00000000..097a7967 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesQuorumFraction.sol @@ -0,0 +1,121 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesQuorumFraction.sol) + +pragma solidity ^0.8.0; + +import "./GovernorVotes.sol"; +import "../../utils/Checkpoints.sol"; +import "../../utils/math/SafeCast.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a + * fraction of the total supply. + * + * _Available since v4.3._ + */ +abstract contract GovernorVotesQuorumFraction is GovernorVotes { + using Checkpoints for Checkpoints.Trace224; + + uint256 private _quorumNumerator; // DEPRECATED in favor of _quorumNumeratorHistory + + /// @custom:oz-retyped-from Checkpoints.History + Checkpoints.Trace224 private _quorumNumeratorHistory; + + event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator); + + /** + * @dev Initialize quorum as a fraction of the token's total supply. + * + * The fraction is specified as `numerator / denominator`. By default the denominator is 100, so quorum is + * specified as a percent: a numerator of 10 corresponds to quorum being 10% of total supply. The denominator can be + * customized by overriding {quorumDenominator}. + */ + constructor(uint256 quorumNumeratorValue) { + _updateQuorumNumerator(quorumNumeratorValue); + } + + /** + * @dev Returns the current quorum numerator. See {quorumDenominator}. + */ + function quorumNumerator() public view virtual returns (uint256) { + return _quorumNumeratorHistory._checkpoints.length == 0 ? _quorumNumerator : _quorumNumeratorHistory.latest(); + } + + /** + * @dev Returns the quorum numerator at a specific timepoint. See {quorumDenominator}. + */ + function quorumNumerator(uint256 timepoint) public view virtual returns (uint256) { + // If history is empty, fallback to old storage + uint256 length = _quorumNumeratorHistory._checkpoints.length; + if (length == 0) { + return _quorumNumerator; + } + + // Optimistic search, check the latest checkpoint + Checkpoints.Checkpoint224 memory latest = _quorumNumeratorHistory._checkpoints[length - 1]; + if (latest._key <= timepoint) { + return latest._value; + } + + // Otherwise, do the binary search + return _quorumNumeratorHistory.upperLookupRecent(SafeCast.toUint32(timepoint)); + } + + /** + * @dev Returns the quorum denominator. Defaults to 100, but may be overridden. + */ + function quorumDenominator() public view virtual returns (uint256) { + return 100; + } + + /** + * @dev Returns the quorum for a timepoint, in terms of number of votes: `supply * numerator / denominator`. + */ + function quorum(uint256 timepoint) public view virtual override returns (uint256) { + return (token.getPastTotalSupply(timepoint) * quorumNumerator(timepoint)) / quorumDenominator(); + } + + /** + * @dev Changes the quorum numerator. + * + * Emits a {QuorumNumeratorUpdated} event. + * + * Requirements: + * + * - Must be called through a governance proposal. + * - New numerator must be smaller or equal to the denominator. + */ + function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance { + _updateQuorumNumerator(newQuorumNumerator); + } + + /** + * @dev Changes the quorum numerator. + * + * Emits a {QuorumNumeratorUpdated} event. + * + * Requirements: + * + * - New numerator must be smaller or equal to the denominator. + */ + function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual { + require( + newQuorumNumerator <= quorumDenominator(), + "GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator" + ); + + uint256 oldQuorumNumerator = quorumNumerator(); + + // Make sure we keep track of the original numerator in contracts upgraded from a version without checkpoints. + if (oldQuorumNumerator != 0 && _quorumNumeratorHistory._checkpoints.length == 0) { + _quorumNumeratorHistory._checkpoints.push( + Checkpoints.Checkpoint224({_key: 0, _value: SafeCast.toUint224(oldQuorumNumerator)}) + ); + } + + // Set new quorum for future proposals + _quorumNumeratorHistory.push(SafeCast.toUint32(clock()), SafeCast.toUint224(newQuorumNumerator)); + + emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol new file mode 100644 index 00000000..40402f61 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol) + +pragma solidity ^0.8.0; + +import "../IGovernor.sol"; + +/** + * @dev Extension of the {IGovernor} for timelock supporting modules. + * + * _Available since v4.3._ + */ +abstract contract IGovernorTimelock is IGovernor { + event ProposalQueued(uint256 proposalId, uint256 eta); + + function timelock() public view virtual returns (address); + + function proposalEta(uint256 proposalId) public view virtual returns (uint256); + + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256 proposalId); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/IVotes.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/IVotes.sol new file mode 100644 index 00000000..647f7965 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/IVotes.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol) +pragma solidity ^0.8.0; + +/** + * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. + * + * _Available since v4.5._ + */ +interface IVotes { + /** + * @dev Emitted when an account changes their delegate. + */ + event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); + + /** + * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. + */ + event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); + + /** + * @dev Returns the current amount of votes that `account` has. + */ + function getVotes(address account) external view returns (uint256); + + /** + * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + */ + function getPastVotes(address account, uint256 timepoint) external view returns (uint256); + + /** + * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. + * Votes that have not been delegated are still part of total supply, even though they would not participate in a + * vote. + */ + function getPastTotalSupply(uint256 timepoint) external view returns (uint256); + + /** + * @dev Returns the delegate that `account` has chosen. + */ + function delegates(address account) external view returns (address); + + /** + * @dev Delegates votes from the sender to `delegatee`. + */ + function delegate(address delegatee) external; + + /** + * @dev Delegates votes from signer to `delegatee`. + */ + function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/Votes.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/Votes.sol new file mode 100644 index 00000000..f0a53ba3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/Votes.sol @@ -0,0 +1,244 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/Votes.sol) +pragma solidity ^0.8.0; + +import "../../interfaces/IERC5805.sol"; +import "../../utils/Context.sol"; +import "../../utils/Counters.sol"; +import "../../utils/Checkpoints.sol"; +import "../../utils/cryptography/EIP712.sol"; + +/** + * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be + * transferred, and provides a system of vote delegation, where an account can delegate its voting units to a sort of + * "representative" that will pool delegated voting units from different accounts and can then use it to vote in + * decisions. In fact, voting units _must_ be delegated in order to count as actual votes, and an account has to + * delegate those votes to itself if it wishes to participate in decisions and does not have a trusted representative. + * + * This contract is often combined with a token contract such that voting units correspond to token units. For an + * example, see {ERC721Votes}. + * + * The full history of delegate votes is tracked on-chain so that governance protocols can consider votes as distributed + * at a particular block number to protect against flash loans and double voting. The opt-in delegate system makes the + * cost of this history tracking optional. + * + * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return + * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the + * previous example, it would be included in {ERC721-_beforeTokenTransfer}). + * + * _Available since v4.5._ + */ +abstract contract Votes is Context, EIP712, IERC5805 { + using Checkpoints for Checkpoints.Trace224; + using Counters for Counters.Counter; + + bytes32 private constant _DELEGATION_TYPEHASH = + keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); + + mapping(address => address) private _delegation; + + /// @custom:oz-retyped-from mapping(address => Checkpoints.History) + mapping(address => Checkpoints.Trace224) private _delegateCheckpoints; + + /// @custom:oz-retyped-from Checkpoints.History + Checkpoints.Trace224 private _totalCheckpoints; + + mapping(address => Counters.Counter) private _nonces; + + /** + * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based + * checkpoints (and voting), in which case {CLOCK_MODE} should be overridden as well to match. + */ + function clock() public view virtual override returns (uint48) { + return SafeCast.toUint48(block.number); + } + + /** + * @dev Machine-readable description of the clock as specified in EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + // Check that the clock was not modified + require(clock() == block.number, "Votes: broken clock mode"); + return "mode=blocknumber&from=default"; + } + + /** + * @dev Returns the current amount of votes that `account` has. + */ + function getVotes(address account) public view virtual override returns (uint256) { + return _delegateCheckpoints[account].latest(); + } + + /** + * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "Votes: future lookup"); + return _delegateCheckpoints[account].upperLookupRecent(SafeCast.toUint32(timepoint)); + } + + /** + * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. + * Votes that have not been delegated are still part of total supply, even though they would not participate in a + * vote. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "Votes: future lookup"); + return _totalCheckpoints.upperLookupRecent(SafeCast.toUint32(timepoint)); + } + + /** + * @dev Returns the current total supply of votes. + */ + function _getTotalSupply() internal view virtual returns (uint256) { + return _totalCheckpoints.latest(); + } + + /** + * @dev Returns the delegate that `account` has chosen. + */ + function delegates(address account) public view virtual override returns (address) { + return _delegation[account]; + } + + /** + * @dev Delegates votes from the sender to `delegatee`. + */ + function delegate(address delegatee) public virtual override { + address account = _msgSender(); + _delegate(account, delegatee); + } + + /** + * @dev Delegates votes from signer to `delegatee`. + */ + function delegateBySig( + address delegatee, + uint256 nonce, + uint256 expiry, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override { + require(block.timestamp <= expiry, "Votes: signature expired"); + address signer = ECDSA.recover( + _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), + v, + r, + s + ); + require(nonce == _useNonce(signer), "Votes: invalid nonce"); + _delegate(signer, delegatee); + } + + /** + * @dev Delegate all of `account`'s voting units to `delegatee`. + * + * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. + */ + function _delegate(address account, address delegatee) internal virtual { + address oldDelegate = delegates(account); + _delegation[account] = delegatee; + + emit DelegateChanged(account, oldDelegate, delegatee); + _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account)); + } + + /** + * @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to` + * should be zero. Total supply of voting units will be adjusted with mints and burns. + */ + function _transferVotingUnits(address from, address to, uint256 amount) internal virtual { + if (from == address(0)) { + _push(_totalCheckpoints, _add, SafeCast.toUint224(amount)); + } + if (to == address(0)) { + _push(_totalCheckpoints, _subtract, SafeCast.toUint224(amount)); + } + _moveDelegateVotes(delegates(from), delegates(to), amount); + } + + /** + * @dev Moves delegated votes from one delegate to another. + */ + function _moveDelegateVotes(address from, address to, uint256 amount) private { + if (from != to && amount > 0) { + if (from != address(0)) { + (uint256 oldValue, uint256 newValue) = _push( + _delegateCheckpoints[from], + _subtract, + SafeCast.toUint224(amount) + ); + emit DelegateVotesChanged(from, oldValue, newValue); + } + if (to != address(0)) { + (uint256 oldValue, uint256 newValue) = _push( + _delegateCheckpoints[to], + _add, + SafeCast.toUint224(amount) + ); + emit DelegateVotesChanged(to, oldValue, newValue); + } + } + } + + function _push( + Checkpoints.Trace224 storage store, + function(uint224, uint224) view returns (uint224) op, + uint224 delta + ) private returns (uint224, uint224) { + return store.push(SafeCast.toUint32(clock()), op(store.latest(), delta)); + } + + function _add(uint224 a, uint224 b) private pure returns (uint224) { + return a + b; + } + + function _subtract(uint224 a, uint224 b) private pure returns (uint224) { + return a - b; + } + + /** + * @dev Consumes a nonce. + * + * Returns the current value and increments nonce. + */ + function _useNonce(address owner) internal virtual returns (uint256 current) { + Counters.Counter storage nonce = _nonces[owner]; + current = nonce.current(); + nonce.increment(); + } + + /** + * @dev Returns an address nonce. + */ + function nonces(address owner) public view virtual returns (uint256) { + return _nonces[owner].current(); + } + + /** + * @dev Returns the contract's {EIP712} domain separator. + */ + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view returns (bytes32) { + return _domainSeparatorV4(); + } + + /** + * @dev Must return the voting units held by an account. + */ + function _getVotingUnits(address) internal view virtual returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol new file mode 100644 index 00000000..f8911321 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC1155/IERC1155.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol new file mode 100644 index 00000000..2aa885fe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC1155/extensions/IERC1155MetadataURI.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol new file mode 100644 index 00000000..a6d4ead1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC1155/IERC1155Receiver.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol new file mode 100644 index 00000000..5ec44c72 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC1271 standard signature validation method for + * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. + * + * _Available since v4.1._ + */ +interface IERC1271 { + /** + * @dev Should return whether the signature provided is valid for the provided data + * @param hash Hash of the data to be signed + * @param signature Signature byte array associated with _data + */ + function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol new file mode 100644 index 00000000..817f3daf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363.sol) + +pragma solidity ^0.8.0; + +import "./IERC20.sol"; +import "./IERC165.sol"; + +/** + * @dev Interface of an ERC1363 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-1363[EIP]. + * + * Defines a interface for ERC20 tokens that supports executing recipient + * code after `transfer` or `transferFrom`, or spender code after `approve`. + */ +interface IERC1363 is IERC165, IERC20 { + /* + * Note: the ERC-165 identifier for this interface is 0xb0202a11. + * 0xb0202a11 === + * bytes4(keccak256('transferAndCall(address,uint256)')) ^ + * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ + * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ + * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ + * bytes4(keccak256('approveAndCall(address,uint256)')) ^ + * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) + */ + + /** + * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @return true unless throwing + */ + function transferAndCall(address to, uint256 amount) external returns (bool); + + /** + * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @param data bytes Additional data with no specified format, sent in call to `to` + * @return true unless throwing + */ + function transferAndCall(address to, uint256 amount, bytes memory data) external returns (bool); + + /** + * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver + * @param from address The address which you want to send tokens from + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @return true unless throwing + */ + function transferFromAndCall(address from, address to, uint256 amount) external returns (bool); + + /** + * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver + * @param from address The address which you want to send tokens from + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @param data bytes Additional data with no specified format, sent in call to `to` + * @return true unless throwing + */ + function transferFromAndCall(address from, address to, uint256 amount, bytes memory data) external returns (bool); + + /** + * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender + * and then call `onApprovalReceived` on spender. + * @param spender address The address which will spend the funds + * @param amount uint256 The amount of tokens to be spent + */ + function approveAndCall(address spender, uint256 amount) external returns (bool); + + /** + * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender + * and then call `onApprovalReceived` on spender. + * @param spender address The address which will spend the funds + * @param amount uint256 The amount of tokens to be spent + * @param data bytes Additional data with no specified format, sent in call to `spender` + */ + function approveAndCall(address spender, uint256 amount, bytes memory data) external returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol new file mode 100644 index 00000000..382d7f11 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Receiver.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for any contract that wants to support {IERC1363-transferAndCall} + * or {IERC1363-transferFromAndCall} from {ERC1363} token contracts. + */ +interface IERC1363Receiver { + /* + * Note: the ERC-165 identifier for this interface is 0x88a7ca5c. + * 0x88a7ca5c === bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)")) + */ + + /** + * @notice Handle the receipt of ERC1363 tokens + * @dev Any ERC1363 smart contract calls this function on the recipient + * after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the + * transfer. Return of other than the magic value MUST result in the + * transaction being reverted. + * Note: the token contract address is always the message sender. + * @param operator address The address which called `transferAndCall` or `transferFromAndCall` function + * @param from address The address which are token transferred from + * @param amount uint256 The amount of tokens transferred + * @param data bytes Additional data with no specified format + * @return `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` unless throwing + */ + function onTransferReceived( + address operator, + address from, + uint256 amount, + bytes memory data + ) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol new file mode 100644 index 00000000..09a7bd27 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Spender.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for any contract that wants to support {IERC1363-approveAndCall} + * from {ERC1363} token contracts. + */ +interface IERC1363Spender { + /* + * Note: the ERC-165 identifier for this interface is 0x7b04a2d0. + * 0x7b04a2d0 === bytes4(keccak256("onApprovalReceived(address,uint256,bytes)")) + */ + + /** + * @notice Handle the approval of ERC1363 tokens + * @dev Any ERC1363 smart contract calls this function on the recipient + * after an `approve`. This function MAY throw to revert and reject the + * approval. Return of other than the magic value MUST result in the + * transaction being reverted. + * Note: the token contract address is always the message sender. + * @param owner address The address which called `approveAndCall` function + * @param amount uint256 The amount of tokens to be spent + * @param data bytes Additional data with no specified format + * @return `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`unless throwing + */ + function onApprovalReceived(address owner, uint256 amount, bytes memory data) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol new file mode 100644 index 00000000..b97c4daa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC165.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol new file mode 100644 index 00000000..a83a7a30 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC1820Implementer.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol new file mode 100644 index 00000000..1b1ba9fc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC1820Registry.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1967.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1967.sol new file mode 100644 index 00000000..6fb112a2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1967.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) + +pragma solidity ^0.8.0; + +/** + * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. + * + * _Available since v4.8.3._ + */ +interface IERC1967 { + /** + * @dev Emitted when the implementation is upgraded. + */ + event Upgraded(address indexed implementation); + + /** + * @dev Emitted when the admin account has changed. + */ + event AdminChanged(address previousAdmin, address newAdmin); + + /** + * @dev Emitted when the beacon is changed. + */ + event BeaconUpgraded(address indexed beacon); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol new file mode 100644 index 00000000..a819316d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/IERC20.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol new file mode 100644 index 00000000..aa5c6391 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/extensions/IERC20Metadata.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2309.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2309.sol new file mode 100644 index 00000000..b3fec44e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2309.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (interfaces/IERC2309.sol) + +pragma solidity ^0.8.0; + +/** + * @dev ERC-2309: ERC-721 Consecutive Transfer Extension. + * + * _Available since v4.8._ + */ +interface IERC2309 { + /** + * @dev Emitted when the tokens from `fromTokenId` to `toTokenId` are transferred from `fromAddress` to `toAddress`. + */ + event ConsecutiveTransfer( + uint256 indexed fromTokenId, + uint256 toTokenId, + address indexed fromAddress, + address indexed toAddress + ); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol new file mode 100644 index 00000000..cd5fca4c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2612.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/extensions/IERC20Permit.sol"; + +interface IERC2612 is IERC20Permit {} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2981.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2981.sol new file mode 100644 index 00000000..465b872e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2981.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC165.sol"; + +/** + * @dev Interface for the NFT Royalty Standard. + * + * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal + * support for royalty payments across all NFT marketplaces and ecosystem participants. + * + * _Available since v4.5._ + */ +interface IERC2981 is IERC165 { + /** + * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of + * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. + */ + function royaltyInfo( + uint256 tokenId, + uint256 salePrice + ) external view returns (address receiver, uint256 royaltyAmount); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol new file mode 100644 index 00000000..12381906 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol) + +pragma solidity ^0.8.0; + +import "./IERC3156FlashBorrower.sol"; +import "./IERC3156FlashLender.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashBorrower.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashBorrower.sol new file mode 100644 index 00000000..84bd7215 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashBorrower.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC3156FlashBorrower.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC3156 FlashBorrower, as defined in + * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. + * + * _Available since v4.1._ + */ +interface IERC3156FlashBorrower { + /** + * @dev Receive a flash loan. + * @param initiator The initiator of the loan. + * @param token The loan currency. + * @param amount The amount of tokens lent. + * @param fee The additional amount of tokens to repay. + * @param data Arbitrary data structure, intended to contain user-defined parameters. + * @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan" + */ + function onFlashLoan( + address initiator, + address token, + uint256 amount, + uint256 fee, + bytes calldata data + ) external returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashLender.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashLender.sol new file mode 100644 index 00000000..31012830 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashLender.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol) + +pragma solidity ^0.8.0; + +import "./IERC3156FlashBorrower.sol"; + +/** + * @dev Interface of the ERC3156 FlashLender, as defined in + * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. + * + * _Available since v4.1._ + */ +interface IERC3156FlashLender { + /** + * @dev The amount of currency available to be lended. + * @param token The loan currency. + * @return The amount of `token` that can be borrowed. + */ + function maxFlashLoan(address token) external view returns (uint256); + + /** + * @dev The fee to be charged for a given loan. + * @param token The loan currency. + * @param amount The amount of tokens lent. + * @return The amount of `token` to be charged for the loan, on top of the returned principal. + */ + function flashFee(address token, uint256 amount) external view returns (uint256); + + /** + * @dev Initiate a flash loan. + * @param receiver The receiver of the tokens in the loan, and the receiver of the callback. + * @param token The loan currency. + * @param amount The amount of tokens lent. + * @param data Arbitrary data structure, intended to contain user-defined parameters. + */ + function flashLoan( + IERC3156FlashBorrower receiver, + address token, + uint256 amount, + bytes calldata data + ) external returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4626.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4626.sol new file mode 100644 index 00000000..77dd96a0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4626.sol @@ -0,0 +1,232 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/IERC20.sol"; +import "../token/ERC20/extensions/IERC20Metadata.sol"; + +/** + * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in + * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. + * + * _Available since v4.7._ + */ +interface IERC4626 is IERC20, IERC20Metadata { + event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); + + event Withdraw( + address indexed sender, + address indexed receiver, + address indexed owner, + uint256 assets, + uint256 shares + ); + + /** + * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. + * + * - MUST be an ERC-20 token contract. + * - MUST NOT revert. + */ + function asset() external view returns (address assetTokenAddress); + + /** + * @dev Returns the total amount of the underlying asset that is “managed” by Vault. + * + * - SHOULD include any compounding that occurs from yield. + * - MUST be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT revert. + */ + function totalAssets() external view returns (uint256 totalManagedAssets); + + /** + * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal + * scenario where all the conditions are met. + * + * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + * - MUST NOT revert. + * + * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + * from. + */ + function convertToShares(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal + * scenario where all the conditions are met. + * + * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + * - MUST NOT revert. + * + * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + * from. + */ + function convertToAssets(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, + * through a deposit call. + * + * - MUST return a limited value if receiver is subject to some deposit limit. + * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. + * - MUST NOT revert. + */ + function maxDeposit(address receiver) external view returns (uint256 maxAssets); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given + * current on-chain conditions. + * + * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit + * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called + * in the same transaction. + * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the + * deposit would be accepted, regardless if the user has enough tokens approved, etc. + * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by depositing. + */ + function previewDeposit(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. + * + * - MUST emit the Deposit event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * deposit execution, and are accounted for during deposit. + * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not + * approving enough underlying tokens to the Vault contract, etc). + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + */ + function deposit(uint256 assets, address receiver) external returns (uint256 shares); + + /** + * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. + * - MUST return a limited value if receiver is subject to some mint limit. + * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. + * - MUST NOT revert. + */ + function maxMint(address receiver) external view returns (uint256 maxShares); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given + * current on-chain conditions. + * + * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call + * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the + * same transaction. + * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint + * would be accepted, regardless if the user has enough tokens approved, etc. + * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by minting. + */ + function previewMint(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. + * + * - MUST emit the Deposit event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint + * execution, and are accounted for during mint. + * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not + * approving enough underlying tokens to the Vault contract, etc). + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + */ + function mint(uint256 shares, address receiver) external returns (uint256 assets); + + /** + * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the + * Vault, through a withdraw call. + * + * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + * - MUST NOT revert. + */ + function maxWithdraw(address owner) external view returns (uint256 maxAssets); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, + * given current on-chain conditions. + * + * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw + * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if + * called + * in the same transaction. + * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though + * the withdrawal would be accepted, regardless if the user has enough shares, etc. + * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by depositing. + */ + function previewWithdraw(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. + * + * - MUST emit the Withdraw event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * withdraw execution, and are accounted for during withdraw. + * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner + * not having enough shares, etc). + * + * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + * Those methods should be performed separately. + */ + function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); + + /** + * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, + * through a redeem call. + * + * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. + * - MUST NOT revert. + */ + function maxRedeem(address owner) external view returns (uint256 maxShares); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, + * given current on-chain conditions. + * + * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call + * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the + * same transaction. + * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the + * redemption would be accepted, regardless if the user has enough shares, etc. + * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by redeeming. + */ + function previewRedeem(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. + * + * - MUST emit the Withdraw event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * redeem execution, and are accounted for during redeem. + * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner + * not having enough shares, etc). + * + * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + * Those methods should be performed separately. + */ + function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4906.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4906.sol new file mode 100644 index 00000000..f5a6e00f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4906.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4906.sol) + +pragma solidity ^0.8.0; + +import "./IERC165.sol"; +import "./IERC721.sol"; + +/// @title EIP-721 Metadata Update Extension +interface IERC4906 is IERC165, IERC721 { + /// @dev This event emits when the metadata of a token is changed. + /// So that the third-party platforms such as NFT market could + /// timely update the images and related attributes of the NFT. + event MetadataUpdate(uint256 _tokenId); + + /// @dev This event emits when the metadata of a range of tokens is changed. + /// So that the third-party platforms such as NFT market could + /// timely update the images and related attributes of the NFTs. + event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5267.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5267.sol new file mode 100644 index 00000000..4d3a6b92 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5267.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) + +pragma solidity ^0.8.0; + +interface IERC5267 { + /** + * @dev MAY be emitted to signal that the domain could have changed. + */ + event EIP712DomainChanged(); + + /** + * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 + * signature. + */ + function eip712Domain() + external + view + returns ( + bytes1 fields, + string memory name, + string memory version, + uint256 chainId, + address verifyingContract, + bytes32 salt, + uint256[] memory extensions + ); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5313.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5313.sol new file mode 100644 index 00000000..e26094c0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5313.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5313.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for the Light Contract Ownership Standard. + * + * A standardized minimal interface required to identify an account that controls a contract + * + * _Available since v4.9._ + */ +interface IERC5313 { + /** + * @dev Gets the address of the owner. + */ + function owner() external view returns (address); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol new file mode 100644 index 00000000..a012ccb1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol) + +pragma solidity ^0.8.0; + +import "../governance/utils/IVotes.sol"; +import "./IERC6372.sol"; + +interface IERC5805 is IERC6372, IVotes {} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC6372.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC6372.sol new file mode 100644 index 00000000..4c5fe039 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC6372.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol) + +pragma solidity ^0.8.0; + +interface IERC6372 { + /** + * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). + */ + function clock() external view returns (uint48); + + /** + * @dev Description of the clock + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() external view returns (string memory); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol new file mode 100644 index 00000000..822b311c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/IERC721.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol new file mode 100644 index 00000000..e39a5a01 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/extensions/IERC721Enumerable.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol new file mode 100644 index 00000000..afe2707c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/extensions/IERC721Metadata.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol new file mode 100644 index 00000000..c9c153a2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/IERC721Receiver.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol new file mode 100644 index 00000000..b97ba7b8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC777/IERC777.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol new file mode 100644 index 00000000..0ce2704a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC777/IERC777Recipient.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol new file mode 100644 index 00000000..f1f17a22 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC777/IERC777Sender.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC1822.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC1822.sol new file mode 100644 index 00000000..3b73d744 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC1822.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) + +pragma solidity ^0.8.0; + +/** + * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified + * proxy whose upgrades are fully controlled by the current implementation. + */ +interface IERC1822Proxiable { + /** + * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation + * address. + * + * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks + * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this + * function revert if invoked through a proxy. + */ + function proxiableUUID() external view returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol new file mode 100644 index 00000000..024b753e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/draft-IERC2612.sol) + +pragma solidity ^0.8.0; + +// EIP-2612 is Final as of 2022-11-01. This file is deprecated. + +import "./IERC2612.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol b/dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol new file mode 100644 index 00000000..913022cd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (metatx/ERC2771Context.sol) + +pragma solidity ^0.8.9; + +import "../utils/Context.sol"; + +/** + * @dev Context variant with ERC2771 support. + * + * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption. + * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender} + * recovery. + */ +abstract contract ERC2771Context is Context { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _trustedForwarder; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address trustedForwarder) { + _trustedForwarder = trustedForwarder; + } + + function isTrustedForwarder(address forwarder) public view virtual returns (bool) { + return forwarder == _trustedForwarder; + } + + function _msgSender() internal view virtual override returns (address) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { + return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); + } else { + return super._msgSender(); + } + } + + function _msgData() internal view virtual override returns (bytes calldata) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { + return msg.data[:calldataLength - contextSuffixLength]; + } else { + return super._msgData(); + } + } + + /** + * @dev ERC-2771 specifies the context as being a single address (20 bytes). + */ + function _contextSuffixLength() internal view virtual override returns (uint256) { + return 20; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol b/dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol new file mode 100644 index 00000000..de264626 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (metatx/MinimalForwarder.sol) + +pragma solidity ^0.8.0; + +import "../utils/cryptography/ECDSA.sol"; +import "../utils/cryptography/EIP712.sol"; + +/** + * @dev Simple minimal forwarder to be used together with an ERC2771 compatible contract. See {ERC2771Context}. + * + * MinimalForwarder is mainly meant for testing, as it is missing features to be a good production-ready forwarder. This + * contract does not intend to have all the properties that are needed for a sound forwarding system. A fully + * functioning forwarding system with good properties requires more complexity. We suggest you look at other projects + * such as the GSN which do have the goal of building a system like that. + */ +contract MinimalForwarder is EIP712 { + using ECDSA for bytes32; + + struct ForwardRequest { + address from; + address to; + uint256 value; + uint256 gas; + uint256 nonce; + bytes data; + } + + bytes32 private constant _TYPEHASH = + keccak256("ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data)"); + + mapping(address => uint256) private _nonces; + + constructor() EIP712("MinimalForwarder", "0.0.1") {} + + function getNonce(address from) public view returns (uint256) { + return _nonces[from]; + } + + function verify(ForwardRequest calldata req, bytes calldata signature) public view returns (bool) { + address signer = _hashTypedDataV4( + keccak256(abi.encode(_TYPEHASH, req.from, req.to, req.value, req.gas, req.nonce, keccak256(req.data))) + ).recover(signature); + return _nonces[req.from] == req.nonce && signer == req.from; + } + + function execute( + ForwardRequest calldata req, + bytes calldata signature + ) public payable returns (bool, bytes memory) { + require(verify(req, signature), "MinimalForwarder: signature does not match request"); + _nonces[req.from] = req.nonce + 1; + + (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}( + abi.encodePacked(req.data, req.from) + ); + + // Validate that the relayer has sent enough gas for the call. + // See https://ronan.eth.limo/blog/ethereum-gas-dangers/ + if (gasleft() <= req.gas / 63) { + // We explicitly trigger invalid opcode to consume all gas and bubble-up the effects, since + // neither revert or assert consume all gas since Solidity 0.8.0 + // https://docs.soliditylang.org/en/v0.8.0/control-structures.html#panic-via-assert-and-error-via-require + /// @solidity memory-safe-assembly + assembly { + invalid() + } + } + + return (success, returndata); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/package.json b/dependencies/@openzeppelin-contracts-4.9.6/package.json new file mode 100644 index 00000000..bd0c54ff --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/package.json @@ -0,0 +1,32 @@ +{ + "name": "@openzeppelin/contracts", + "description": "Secure Smart Contract library for Solidity", + "version": "4.9.6", + "files": [ + "**/*.sol", + "/build/contracts/*.json", + "!/mocks/**/*" + ], + "scripts": { + "prepare": "bash ../scripts/prepare-contracts-package.sh", + "prepare-docs": "cd ..; npm run prepare-docs" + }, + "repository": { + "type": "git", + "url": "https://github.com/OpenZeppelin/openzeppelin-contracts.git" + }, + "keywords": [ + "solidity", + "ethereum", + "smart", + "contracts", + "security", + "zeppelin" + ], + "author": "OpenZeppelin Community ", + "license": "MIT", + "bugs": { + "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/issues" + }, + "homepage": "https://openzeppelin.com/contracts/" +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol new file mode 100644 index 00000000..583e0223 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol) + +pragma solidity ^0.8.0; + +/** + * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for + * deploying minimal proxy contracts, also known as "clones". + * + * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies + * > a minimal bytecode implementation that delegates all calls to a known, fixed address. + * + * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` + * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the + * deterministic method. + * + * _Available since v3.4._ + */ +library Clones { + /** + * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. + * + * This function uses the create opcode, which should never revert. + */ + function clone(address implementation) internal returns (address instance) { + /// @solidity memory-safe-assembly + assembly { + // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes + // of the `implementation` address with the bytecode before the address. + mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) + // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. + mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) + instance := create(0, 0x09, 0x37) + } + require(instance != address(0), "ERC1167: create failed"); + } + + /** + * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. + * + * This function uses the create2 opcode and a `salt` to deterministically deploy + * the clone. Using the same `implementation` and `salt` multiple time will revert, since + * the clones cannot be deployed twice at the same address. + */ + function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { + /// @solidity memory-safe-assembly + assembly { + // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes + // of the `implementation` address with the bytecode before the address. + mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) + // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. + mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) + instance := create2(0, 0x09, 0x37, salt) + } + require(instance != address(0), "ERC1167: create2 failed"); + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. + */ + function predictDeterministicAddress( + address implementation, + bytes32 salt, + address deployer + ) internal pure returns (address predicted) { + /// @solidity memory-safe-assembly + assembly { + let ptr := mload(0x40) + mstore(add(ptr, 0x38), deployer) + mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) + mstore(add(ptr, 0x14), implementation) + mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) + mstore(add(ptr, 0x58), salt) + mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) + predicted := keccak256(add(ptr, 0x43), 0x55) + } + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. + */ + function predictDeterministicAddress( + address implementation, + bytes32 salt + ) internal view returns (address predicted) { + return predictDeterministicAddress(implementation, salt, address(this)); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol new file mode 100644 index 00000000..a04d701c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) + +pragma solidity ^0.8.0; + +import "../Proxy.sol"; +import "./ERC1967Upgrade.sol"; + +/** + * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an + * implementation address that can be changed. This address is stored in storage in the location specified by + * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the + * implementation behind the proxy. + */ +contract ERC1967Proxy is Proxy, ERC1967Upgrade { + /** + * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. + * + * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded + * function call, and allows initializing the storage of the proxy like a Solidity constructor. + */ + constructor(address _logic, bytes memory _data) payable { + _upgradeToAndCall(_logic, _data, false); + } + + /** + * @dev Returns the current implementation address. + */ + function _implementation() internal view virtual override returns (address impl) { + return ERC1967Upgrade._getImplementation(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol new file mode 100644 index 00000000..cc9e5695 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol @@ -0,0 +1,157 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) + +pragma solidity ^0.8.2; + +import "../beacon/IBeacon.sol"; +import "../../interfaces/IERC1967.sol"; +import "../../interfaces/draft-IERC1822.sol"; +import "../../utils/Address.sol"; +import "../../utils/StorageSlot.sol"; + +/** + * @dev This abstract contract provides getters and event emitting update functions for + * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. + * + * _Available since v4.1._ + */ +abstract contract ERC1967Upgrade is IERC1967 { + // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 + bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; + + /** + * @dev Storage slot with the address of the current implementation. + * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is + * validated in the constructor. + */ + bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + + /** + * @dev Returns the current implementation address. + */ + function _getImplementation() internal view returns (address) { + return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; + } + + /** + * @dev Stores a new address in the EIP1967 implementation slot. + */ + function _setImplementation(address newImplementation) private { + require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); + StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; + } + + /** + * @dev Perform implementation upgrade + * + * Emits an {Upgraded} event. + */ + function _upgradeTo(address newImplementation) internal { + _setImplementation(newImplementation); + emit Upgraded(newImplementation); + } + + /** + * @dev Perform implementation upgrade with additional setup call. + * + * Emits an {Upgraded} event. + */ + function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { + _upgradeTo(newImplementation); + if (data.length > 0 || forceCall) { + Address.functionDelegateCall(newImplementation, data); + } + } + + /** + * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. + * + * Emits an {Upgraded} event. + */ + function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { + // Upgrades from old implementations will perform a rollback test. This test requires the new + // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing + // this special case will break upgrade paths from old UUPS implementation to new ones. + if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { + _setImplementation(newImplementation); + } else { + try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { + require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); + } catch { + revert("ERC1967Upgrade: new implementation is not UUPS"); + } + _upgradeToAndCall(newImplementation, data, forceCall); + } + } + + /** + * @dev Storage slot with the admin of the contract. + * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is + * validated in the constructor. + */ + bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + + /** + * @dev Returns the current admin. + */ + function _getAdmin() internal view returns (address) { + return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; + } + + /** + * @dev Stores a new address in the EIP1967 admin slot. + */ + function _setAdmin(address newAdmin) private { + require(newAdmin != address(0), "ERC1967: new admin is the zero address"); + StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; + } + + /** + * @dev Changes the admin of the proxy. + * + * Emits an {AdminChanged} event. + */ + function _changeAdmin(address newAdmin) internal { + emit AdminChanged(_getAdmin(), newAdmin); + _setAdmin(newAdmin); + } + + /** + * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. + * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. + */ + bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; + + /** + * @dev Returns the current beacon. + */ + function _getBeacon() internal view returns (address) { + return StorageSlot.getAddressSlot(_BEACON_SLOT).value; + } + + /** + * @dev Stores a new beacon in the EIP1967 beacon slot. + */ + function _setBeacon(address newBeacon) private { + require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); + require( + Address.isContract(IBeacon(newBeacon).implementation()), + "ERC1967: beacon implementation is not a contract" + ); + StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; + } + + /** + * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does + * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). + * + * Emits a {BeaconUpgraded} event. + */ + function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { + _setBeacon(newBeacon); + emit BeaconUpgraded(newBeacon); + if (data.length > 0 || forceCall) { + Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/Proxy.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/Proxy.sol new file mode 100644 index 00000000..988cf72a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/Proxy.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) + +pragma solidity ^0.8.0; + +/** + * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM + * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to + * be specified by overriding the virtual {_implementation} function. + * + * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a + * different contract through the {_delegate} function. + * + * The success and return data of the delegated call will be returned back to the caller of the proxy. + */ +abstract contract Proxy { + /** + * @dev Delegates the current call to `implementation`. + * + * This function does not return to its internal call site, it will return directly to the external caller. + */ + function _delegate(address implementation) internal virtual { + assembly { + // Copy msg.data. We take full control of memory in this inline assembly + // block because it will not return to Solidity code. We overwrite the + // Solidity scratch pad at memory position 0. + calldatacopy(0, 0, calldatasize()) + + // Call the implementation. + // out and outsize are 0 because we don't know the size yet. + let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) + + // Copy the returned data. + returndatacopy(0, 0, returndatasize()) + + switch result + // delegatecall returns 0 on error. + case 0 { + revert(0, returndatasize()) + } + default { + return(0, returndatasize()) + } + } + } + + /** + * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function + * and {_fallback} should delegate. + */ + function _implementation() internal view virtual returns (address); + + /** + * @dev Delegates the current call to the address returned by `_implementation()`. + * + * This function does not return to its internal call site, it will return directly to the external caller. + */ + function _fallback() internal virtual { + _beforeFallback(); + _delegate(_implementation()); + } + + /** + * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other + * function in the contract matches the call data. + */ + fallback() external payable virtual { + _fallback(); + } + + /** + * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data + * is empty. + */ + receive() external payable virtual { + _fallback(); + } + + /** + * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` + * call, or as part of the Solidity `fallback` or `receive` functions. + * + * If overridden should call `super._beforeFallback()`. + */ + function _beforeFallback() internal virtual {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol new file mode 100644 index 00000000..d217b15e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol) + +pragma solidity ^0.8.0; + +import "./IBeacon.sol"; +import "../Proxy.sol"; +import "../ERC1967/ERC1967Upgrade.sol"; + +/** + * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. + * + * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't + * conflict with the storage layout of the implementation behind the proxy. + * + * _Available since v3.4._ + */ +contract BeaconProxy is Proxy, ERC1967Upgrade { + /** + * @dev Initializes the proxy with `beacon`. + * + * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This + * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity + * constructor. + * + * Requirements: + * + * - `beacon` must be a contract with the interface {IBeacon}. + */ + constructor(address beacon, bytes memory data) payable { + _upgradeBeaconToAndCall(beacon, data, false); + } + + /** + * @dev Returns the current beacon address. + */ + function _beacon() internal view virtual returns (address) { + return _getBeacon(); + } + + /** + * @dev Returns the current implementation address of the associated beacon. + */ + function _implementation() internal view virtual override returns (address) { + return IBeacon(_getBeacon()).implementation(); + } + + /** + * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}. + * + * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. + * + * Requirements: + * + * - `beacon` must be a contract. + * - The implementation returned by `beacon` must be a contract. + */ + function _setBeacon(address beacon, bytes memory data) internal virtual { + _upgradeBeaconToAndCall(beacon, data, false); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/IBeacon.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/IBeacon.sol new file mode 100644 index 00000000..fba3ee2a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/IBeacon.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) + +pragma solidity ^0.8.0; + +/** + * @dev This is the interface that {BeaconProxy} expects of its beacon. + */ +interface IBeacon { + /** + * @dev Must return an address that can be used as a delegate call target. + * + * {BeaconProxy} will check that this address is a contract. + */ + function implementation() external view returns (address); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/UpgradeableBeacon.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/UpgradeableBeacon.sol new file mode 100644 index 00000000..5d83ceb3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/UpgradeableBeacon.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol) + +pragma solidity ^0.8.0; + +import "./IBeacon.sol"; +import "../../access/Ownable.sol"; +import "../../utils/Address.sol"; + +/** + * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their + * implementation contract, which is where they will delegate all function calls. + * + * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon. + */ +contract UpgradeableBeacon is IBeacon, Ownable { + address private _implementation; + + /** + * @dev Emitted when the implementation returned by the beacon is changed. + */ + event Upgraded(address indexed implementation); + + /** + * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the + * beacon. + */ + constructor(address implementation_) { + _setImplementation(implementation_); + } + + /** + * @dev Returns the current implementation address. + */ + function implementation() public view virtual override returns (address) { + return _implementation; + } + + /** + * @dev Upgrades the beacon to a new implementation. + * + * Emits an {Upgraded} event. + * + * Requirements: + * + * - msg.sender must be the owner of the contract. + * - `newImplementation` must be a contract. + */ + function upgradeTo(address newImplementation) public virtual onlyOwner { + _setImplementation(newImplementation); + emit Upgraded(newImplementation); + } + + /** + * @dev Sets the implementation contract address for this beacon + * + * Requirements: + * + * - `newImplementation` must be a contract. + */ + function _setImplementation(address newImplementation) private { + require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract"); + _implementation = newImplementation; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol new file mode 100644 index 00000000..57153059 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol) + +pragma solidity ^0.8.0; + +import "./TransparentUpgradeableProxy.sol"; +import "../../access/Ownable.sol"; + +/** + * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an + * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. + */ +contract ProxyAdmin is Ownable { + /** + * @dev Returns the current implementation of `proxy`. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { + // We need to manually run the static call since the getter cannot be flagged as view + // bytes4(keccak256("implementation()")) == 0x5c60da1b + (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60da1b"); + require(success); + return abi.decode(returndata, (address)); + } + + /** + * @dev Returns the current admin of `proxy`. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { + // We need to manually run the static call since the getter cannot be flagged as view + // bytes4(keccak256("admin()")) == 0xf851a440 + (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); + require(success); + return abi.decode(returndata, (address)); + } + + /** + * @dev Changes the admin of `proxy` to `newAdmin`. + * + * Requirements: + * + * - This contract must be the current admin of `proxy`. + */ + function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner { + proxy.changeAdmin(newAdmin); + } + + /** + * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner { + proxy.upgradeTo(implementation); + } + + /** + * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See + * {TransparentUpgradeableProxy-upgradeToAndCall}. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function upgradeAndCall( + ITransparentUpgradeableProxy proxy, + address implementation, + bytes memory data + ) public payable virtual onlyOwner { + proxy.upgradeToAndCall{value: msg.value}(implementation, data); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol new file mode 100644 index 00000000..6f18b492 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol) + +pragma solidity ^0.8.0; + +import "../ERC1967/ERC1967Proxy.sol"; + +/** + * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy} + * does not implement this interface directly, and some of its functions are implemented by an internal dispatch + * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not + * include them in the ABI so this interface must be used to interact with it. + */ +interface ITransparentUpgradeableProxy is IERC1967 { + function admin() external view returns (address); + + function implementation() external view returns (address); + + function changeAdmin(address) external; + + function upgradeTo(address) external; + + function upgradeToAndCall(address, bytes memory) external payable; +} + +/** + * @dev This contract implements a proxy that is upgradeable by an admin. + * + * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector + * clashing], which can potentially be used in an attack, this contract uses the + * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two + * things that go hand in hand: + * + * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if + * that call matches one of the admin functions exposed by the proxy itself. + * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the + * implementation. If the admin tries to call a function on the implementation it will fail with an error that says + * "admin cannot fallback to proxy target". + * + * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing + * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due + * to sudden errors when trying to call a function from the proxy implementation. + * + * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, + * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy. + * + * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not + * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch + * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to + * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the + * implementation. + * + * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler + * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function + * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could + * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised. + */ +contract TransparentUpgradeableProxy is ERC1967Proxy { + /** + * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and + * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}. + */ + constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) { + _changeAdmin(admin_); + } + + /** + * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin. + * + * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the + * implementation provides a function with the same selector. + */ + modifier ifAdmin() { + if (msg.sender == _getAdmin()) { + _; + } else { + _fallback(); + } + } + + /** + * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior + */ + function _fallback() internal virtual override { + if (msg.sender == _getAdmin()) { + bytes memory ret; + bytes4 selector = msg.sig; + if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) { + ret = _dispatchUpgradeTo(); + } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) { + ret = _dispatchUpgradeToAndCall(); + } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) { + ret = _dispatchChangeAdmin(); + } else if (selector == ITransparentUpgradeableProxy.admin.selector) { + ret = _dispatchAdmin(); + } else if (selector == ITransparentUpgradeableProxy.implementation.selector) { + ret = _dispatchImplementation(); + } else { + revert("TransparentUpgradeableProxy: admin cannot fallback to proxy target"); + } + assembly { + return(add(ret, 0x20), mload(ret)) + } + } else { + super._fallback(); + } + } + + /** + * @dev Returns the current admin. + * + * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the + * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. + * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` + */ + function _dispatchAdmin() private returns (bytes memory) { + _requireZeroValue(); + + address admin = _getAdmin(); + return abi.encode(admin); + } + + /** + * @dev Returns the current implementation. + * + * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the + * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. + * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` + */ + function _dispatchImplementation() private returns (bytes memory) { + _requireZeroValue(); + + address implementation = _implementation(); + return abi.encode(implementation); + } + + /** + * @dev Changes the admin of the proxy. + * + * Emits an {AdminChanged} event. + */ + function _dispatchChangeAdmin() private returns (bytes memory) { + _requireZeroValue(); + + address newAdmin = abi.decode(msg.data[4:], (address)); + _changeAdmin(newAdmin); + + return ""; + } + + /** + * @dev Upgrade the implementation of the proxy. + */ + function _dispatchUpgradeTo() private returns (bytes memory) { + _requireZeroValue(); + + address newImplementation = abi.decode(msg.data[4:], (address)); + _upgradeToAndCall(newImplementation, bytes(""), false); + + return ""; + } + + /** + * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified + * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the + * proxied contract. + */ + function _dispatchUpgradeToAndCall() private returns (bytes memory) { + (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes)); + _upgradeToAndCall(newImplementation, data, true); + + return ""; + } + + /** + * @dev Returns the current admin. + * + * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead. + */ + function _admin() internal view virtual returns (address) { + return _getAdmin(); + } + + /** + * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to + * emulate some proxy functions being non-payable while still allowing value to pass through. + */ + function _requireZeroValue() private { + require(msg.value == 0); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol new file mode 100644 index 00000000..33ec2279 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol @@ -0,0 +1,166 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) + +pragma solidity ^0.8.2; + +import "../../utils/Address.sol"; + +/** + * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed + * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an + * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer + * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. + * + * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be + * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in + * case an upgrade adds a module that needs to be initialized. + * + * For example: + * + * [.hljs-theme-light.nopadding] + * ```solidity + * contract MyToken is ERC20Upgradeable { + * function initialize() initializer public { + * __ERC20_init("MyToken", "MTK"); + * } + * } + * + * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { + * function initializeV2() reinitializer(2) public { + * __ERC20Permit_init("MyToken"); + * } + * } + * ``` + * + * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as + * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. + * + * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure + * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. + * + * [CAUTION] + * ==== + * Avoid leaving a contract uninitialized. + * + * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation + * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke + * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: + * + * [.hljs-theme-light.nopadding] + * ``` + * /// @custom:oz-upgrades-unsafe-allow constructor + * constructor() { + * _disableInitializers(); + * } + * ``` + * ==== + */ +abstract contract Initializable { + /** + * @dev Indicates that the contract has been initialized. + * @custom:oz-retyped-from bool + */ + uint8 private _initialized; + + /** + * @dev Indicates that the contract is in the process of being initialized. + */ + bool private _initializing; + + /** + * @dev Triggered when the contract has been initialized or reinitialized. + */ + event Initialized(uint8 version); + + /** + * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, + * `onlyInitializing` functions can be used to initialize parent contracts. + * + * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a + * constructor. + * + * Emits an {Initialized} event. + */ + modifier initializer() { + bool isTopLevelCall = !_initializing; + require( + (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1), + "Initializable: contract is already initialized" + ); + _initialized = 1; + if (isTopLevelCall) { + _initializing = true; + } + _; + if (isTopLevelCall) { + _initializing = false; + emit Initialized(1); + } + } + + /** + * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the + * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be + * used to initialize parent contracts. + * + * A reinitializer may be used after the original initialization step. This is essential to configure modules that + * are added through upgrades and that require initialization. + * + * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` + * cannot be nested. If one is invoked in the context of another, execution will revert. + * + * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in + * a contract, executing them in the right order is up to the developer or operator. + * + * WARNING: setting the version to 255 will prevent any future reinitialization. + * + * Emits an {Initialized} event. + */ + modifier reinitializer(uint8 version) { + require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); + _initialized = version; + _initializing = true; + _; + _initializing = false; + emit Initialized(version); + } + + /** + * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the + * {initializer} and {reinitializer} modifiers, directly or indirectly. + */ + modifier onlyInitializing() { + require(_initializing, "Initializable: contract is not initializing"); + _; + } + + /** + * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. + * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized + * to any version. It is recommended to use this to lock implementation contracts that are designed to be called + * through proxies. + * + * Emits an {Initialized} event the first time it is successfully executed. + */ + function _disableInitializers() internal virtual { + require(!_initializing, "Initializable: contract is initializing"); + if (_initialized != type(uint8).max) { + _initialized = type(uint8).max; + emit Initialized(type(uint8).max); + } + } + + /** + * @dev Returns the highest version that has been initialized. See {reinitializer}. + */ + function _getInitializedVersion() internal view returns (uint8) { + return _initialized; + } + + /** + * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. + */ + function _isInitializing() internal view returns (bool) { + return _initializing; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol new file mode 100644 index 00000000..86684cfc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) + +pragma solidity ^0.8.0; + +import "../../interfaces/draft-IERC1822.sol"; +import "../ERC1967/ERC1967Upgrade.sol"; + +/** + * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an + * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. + * + * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is + * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing + * `UUPSUpgradeable` with a custom implementation of upgrades. + * + * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. + * + * _Available since v4.1._ + */ +abstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment + address private immutable __self = address(this); + + /** + * @dev Check that the execution is being performed through a delegatecall call and that the execution context is + * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case + * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a + * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to + * fail. + */ + modifier onlyProxy() { + require(address(this) != __self, "Function must be called through delegatecall"); + require(_getImplementation() == __self, "Function must be called through active proxy"); + _; + } + + /** + * @dev Check that the execution is not being performed through a delegate call. This allows a function to be + * callable on the implementing contract but not through proxies. + */ + modifier notDelegated() { + require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); + _; + } + + /** + * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the + * implementation. It is used to validate the implementation's compatibility when performing an upgrade. + * + * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks + * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this + * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. + */ + function proxiableUUID() external view virtual override notDelegated returns (bytes32) { + return _IMPLEMENTATION_SLOT; + } + + /** + * @dev Upgrade the implementation of the proxy to `newImplementation`. + * + * Calls {_authorizeUpgrade}. + * + * Emits an {Upgraded} event. + * + * @custom:oz-upgrades-unsafe-allow-reachable delegatecall + */ + function upgradeTo(address newImplementation) public virtual onlyProxy { + _authorizeUpgrade(newImplementation); + _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); + } + + /** + * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call + * encoded in `data`. + * + * Calls {_authorizeUpgrade}. + * + * Emits an {Upgraded} event. + * + * @custom:oz-upgrades-unsafe-allow-reachable delegatecall + */ + function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { + _authorizeUpgrade(newImplementation); + _upgradeToAndCallUUPS(newImplementation, data, true); + } + + /** + * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by + * {upgradeTo} and {upgradeToAndCall}. + * + * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. + * + * ```solidity + * function _authorizeUpgrade(address) internal override onlyOwner {} + * ``` + */ + function _authorizeUpgrade(address newImplementation) internal virtual; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/security/Pausable.sol b/dependencies/@openzeppelin-contracts-4.9.6/security/Pausable.sol new file mode 100644 index 00000000..bdd11843 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/security/Pausable.sol @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) + +pragma solidity ^0.8.0; + +import "../utils/Context.sol"; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +abstract contract Pausable is Context { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + constructor() { + _paused = false; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + _requireNotPaused(); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + _requirePaused(); + _; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view virtual returns (bool) { + return _paused; + } + + /** + * @dev Throws if the contract is paused. + */ + function _requireNotPaused() internal view virtual { + require(!paused(), "Pausable: paused"); + } + + /** + * @dev Throws if the contract is not paused. + */ + function _requirePaused() internal view virtual { + require(paused(), "Pausable: not paused"); + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol b/dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol new file mode 100644 index 00000000..65b4980f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (security/PullPayment.sol) + +pragma solidity ^0.8.0; + +import "../utils/escrow/Escrow.sol"; + +/** + * @dev Simple implementation of a + * https://consensys.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/#favor-pull-over-push-for-external-calls[pull-payment] + * strategy, where the paying contract doesn't interact directly with the + * receiver account, which must withdraw its payments itself. + * + * Pull-payments are often considered the best practice when it comes to sending + * Ether, security-wise. It prevents recipients from blocking execution, and + * eliminates reentrancy concerns. + * + * TIP: If you would like to learn more about reentrancy and alternative ways + * to protect against it, check out our blog post + * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + * + * To use, derive from the `PullPayment` contract, and use {_asyncTransfer} + * instead of Solidity's `transfer` function. Payees can query their due + * payments with {payments}, and retrieve them with {withdrawPayments}. + */ +abstract contract PullPayment { + Escrow private immutable _escrow; + + constructor() { + _escrow = new Escrow(); + } + + /** + * @dev Withdraw accumulated payments, forwarding all gas to the recipient. + * + * Note that _any_ account can call this function, not just the `payee`. + * This means that contracts unaware of the `PullPayment` protocol can still + * receive funds this way, by having a separate account call + * {withdrawPayments}. + * + * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. + * Make sure you trust the recipient, or are either following the + * checks-effects-interactions pattern or using {ReentrancyGuard}. + * + * @param payee Whose payments will be withdrawn. + * + * Causes the `escrow` to emit a {Withdrawn} event. + */ + function withdrawPayments(address payable payee) public virtual { + _escrow.withdraw(payee); + } + + /** + * @dev Returns the payments owed to an address. + * @param dest The creditor's address. + */ + function payments(address dest) public view returns (uint256) { + return _escrow.depositsOf(dest); + } + + /** + * @dev Called by the payer to store the sent amount as credit to be pulled. + * Funds sent in this way are stored in an intermediate {Escrow} contract, so + * there is no danger of them being spent before withdrawal. + * + * @param dest The destination address of the funds. + * @param amount The amount to transfer. + * + * Causes the `escrow` to emit a {Deposited} event. + */ + function _asyncTransfer(address dest, uint256 amount) internal virtual { + _escrow.deposit{value: amount}(dest); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/security/ReentrancyGuard.sol b/dependencies/@openzeppelin-contracts-4.9.6/security/ReentrancyGuard.sol new file mode 100644 index 00000000..dac508b6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/security/ReentrancyGuard.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Contract module that helps prevent reentrant calls to a function. + * + * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier + * available, which can be applied to functions to make sure there are no nested + * (reentrant) calls to them. + * + * Note that because there is a single `nonReentrant` guard, functions marked as + * `nonReentrant` may not call one another. This can be worked around by making + * those functions `private`, and then adding `external` `nonReentrant` entry + * points to them. + * + * TIP: If you would like to learn more about reentrancy and alternative ways + * to protect against it, check out our blog post + * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + */ +abstract contract ReentrancyGuard { + // Booleans are more expensive than uint256 or any type that takes up a full + // word because each write operation emits an extra SLOAD to first read the + // slot's contents, replace the bits taken up by the boolean, and then write + // back. This is the compiler's defense against contract upgrades and + // pointer aliasing, and it cannot be disabled. + + // The values being non-zero value makes deployment a bit more expensive, + // but in exchange the refund on every call to nonReentrant will be lower in + // amount. Since refunds are capped to a percentage of the total + // transaction's gas, it is best to keep them low in cases like this one, to + // increase the likelihood of the full refund coming into effect. + uint256 private constant _NOT_ENTERED = 1; + uint256 private constant _ENTERED = 2; + + uint256 private _status; + + constructor() { + _status = _NOT_ENTERED; + } + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + * Calling a `nonReentrant` function from another `nonReentrant` + * function is not supported. It is possible to prevent this from happening + * by making the `nonReentrant` function external, and making it call a + * `private` function that does the actual work. + */ + modifier nonReentrant() { + _nonReentrantBefore(); + _; + _nonReentrantAfter(); + } + + function _nonReentrantBefore() private { + // On the first call to nonReentrant, _status will be _NOT_ENTERED + require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); + + // Any calls to nonReentrant after this point will fail + _status = _ENTERED; + } + + function _nonReentrantAfter() private { + // By storing the original value once again, a refund is triggered (see + // https://eips.ethereum.org/EIPS/eip-2200) + _status = _NOT_ENTERED; + } + + /** + * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a + * `nonReentrant` function in the call stack. + */ + function _reentrancyGuardEntered() internal view returns (bool) { + return _status == _ENTERED; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol new file mode 100644 index 00000000..6260e4ce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol @@ -0,0 +1,497 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol) + +pragma solidity ^0.8.0; + +import "./IERC1155.sol"; +import "./IERC1155Receiver.sol"; +import "./extensions/IERC1155MetadataURI.sol"; +import "../../utils/Address.sol"; +import "../../utils/Context.sol"; +import "../../utils/introspection/ERC165.sol"; + +/** + * @dev Implementation of the basic standard multi-token. + * See https://eips.ethereum.org/EIPS/eip-1155 + * Originally based on code by Enjin: https://github.com/enjin/erc-1155 + * + * _Available since v3.1._ + */ +contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { + using Address for address; + + // Mapping from token ID to account balances + mapping(uint256 => mapping(address => uint256)) private _balances; + + // Mapping from account to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json + string private _uri; + + /** + * @dev See {_setURI}. + */ + constructor(string memory uri_) { + _setURI(uri_); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return + interfaceId == type(IERC1155).interfaceId || + interfaceId == type(IERC1155MetadataURI).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC1155MetadataURI-uri}. + * + * This implementation returns the same URI for *all* token types. It relies + * on the token type ID substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. + * + * Clients calling this function must replace the `\{id\}` substring with the + * actual token type ID. + */ + function uri(uint256) public view virtual override returns (string memory) { + return _uri; + } + + /** + * @dev See {IERC1155-balanceOf}. + * + * Requirements: + * + * - `account` cannot be the zero address. + */ + function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { + require(account != address(0), "ERC1155: address zero is not a valid owner"); + return _balances[id][account]; + } + + /** + * @dev See {IERC1155-balanceOfBatch}. + * + * Requirements: + * + * - `accounts` and `ids` must have the same length. + */ + function balanceOfBatch( + address[] memory accounts, + uint256[] memory ids + ) public view virtual override returns (uint256[] memory) { + require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); + + uint256[] memory batchBalances = new uint256[](accounts.length); + + for (uint256 i = 0; i < accounts.length; ++i) { + batchBalances[i] = balanceOf(accounts[i], ids[i]); + } + + return batchBalances; + } + + /** + * @dev See {IERC1155-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC1155-isApprovedForAll}. + */ + function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { + return _operatorApprovals[account][operator]; + } + + /** + * @dev See {IERC1155-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 id, + uint256 amount, + bytes memory data + ) public virtual override { + require( + from == _msgSender() || isApprovedForAll(from, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + _safeTransferFrom(from, to, id, amount, data); + } + + /** + * @dev See {IERC1155-safeBatchTransferFrom}. + */ + function safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) public virtual override { + require( + from == _msgSender() || isApprovedForAll(from, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + _safeBatchTransferFrom(from, to, ids, amounts, data); + } + + /** + * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `from` must have a balance of tokens of type `id` of at least `amount`. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _safeTransferFrom( + address from, + address to, + uint256 id, + uint256 amount, + bytes memory data + ) internal virtual { + require(to != address(0), "ERC1155: transfer to the zero address"); + + address operator = _msgSender(); + uint256[] memory ids = _asSingletonArray(id); + uint256[] memory amounts = _asSingletonArray(amount); + + _beforeTokenTransfer(operator, from, to, ids, amounts, data); + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + _balances[id][to] += amount; + + emit TransferSingle(operator, from, to, id, amount); + + _afterTokenTransfer(operator, from, to, ids, amounts, data); + + _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function _safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual { + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + require(to != address(0), "ERC1155: transfer to the zero address"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, from, to, ids, amounts, data); + + for (uint256 i = 0; i < ids.length; ++i) { + uint256 id = ids[i]; + uint256 amount = amounts[i]; + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + _balances[id][to] += amount; + } + + emit TransferBatch(operator, from, to, ids, amounts); + + _afterTokenTransfer(operator, from, to, ids, amounts, data); + + _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); + } + + /** + * @dev Sets a new URI for all token types, by relying on the token type ID + * substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. + * + * By this mechanism, any occurrence of the `\{id\}` substring in either the + * URI or any of the amounts in the JSON file at said URI will be replaced by + * clients with the token type ID. + * + * For example, the `https://token-cdn-domain/\{id\}.json` URI would be + * interpreted by clients as + * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` + * for token type ID 0x4cce0. + * + * See {uri}. + * + * Because these URIs cannot be meaningfully represented by the {URI} event, + * this function emits no events. + */ + function _setURI(string memory newuri) internal virtual { + _uri = newuri; + } + + /** + * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { + require(to != address(0), "ERC1155: mint to the zero address"); + + address operator = _msgSender(); + uint256[] memory ids = _asSingletonArray(id); + uint256[] memory amounts = _asSingletonArray(amount); + + _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); + + _balances[id][to] += amount; + emit TransferSingle(operator, address(0), to, id, amount); + + _afterTokenTransfer(operator, address(0), to, ids, amounts, data); + + _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `amounts` must have the same length. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function _mintBatch( + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual { + require(to != address(0), "ERC1155: mint to the zero address"); + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); + + for (uint256 i = 0; i < ids.length; i++) { + _balances[ids[i]][to] += amounts[i]; + } + + emit TransferBatch(operator, address(0), to, ids, amounts); + + _afterTokenTransfer(operator, address(0), to, ids, amounts, data); + + _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); + } + + /** + * @dev Destroys `amount` tokens of token type `id` from `from` + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `from` must have at least `amount` tokens of token type `id`. + */ + function _burn(address from, uint256 id, uint256 amount) internal virtual { + require(from != address(0), "ERC1155: burn from the zero address"); + + address operator = _msgSender(); + uint256[] memory ids = _asSingletonArray(id); + uint256[] memory amounts = _asSingletonArray(amount); + + _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + + emit TransferSingle(operator, from, address(0), id, amount); + + _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `amounts` must have the same length. + */ + function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { + require(from != address(0), "ERC1155: burn from the zero address"); + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); + + for (uint256 i = 0; i < ids.length; i++) { + uint256 id = ids[i]; + uint256 amount = amounts[i]; + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + } + + emit TransferBatch(operator, from, address(0), ids, amounts); + + _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Emits an {ApprovalForAll} event. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + require(owner != operator, "ERC1155: setting approval status for self"); + _operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning, as well as batched variants. + * + * The same hook is called on both single and batched variants. For single + * transfers, the length of the `ids` and `amounts` arrays will be 1. + * + * Calling conditions (for each `id` and `amount` pair): + * + * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * of token type `id` will be transferred to `to`. + * - When `from` is zero, `amount` tokens of token type `id` will be minted + * for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` + * will be burned. + * - `from` and `to` are never both zero. + * - `ids` and `amounts` have the same, non-zero length. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual {} + + /** + * @dev Hook that is called after any token transfer. This includes minting + * and burning, as well as batched variants. + * + * The same hook is called on both single and batched variants. For single + * transfers, the length of the `id` and `amount` arrays will be 1. + * + * Calling conditions (for each `id` and `amount` pair): + * + * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * of token type `id` will be transferred to `to`. + * - When `from` is zero, `amount` tokens of token type `id` will be minted + * for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` + * will be burned. + * - `from` and `to` are never both zero. + * - `ids` and `amounts` have the same, non-zero length. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _afterTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual {} + + function _doSafeTransferAcceptanceCheck( + address operator, + address from, + address to, + uint256 id, + uint256 amount, + bytes memory data + ) private { + if (to.isContract()) { + try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { + if (response != IERC1155Receiver.onERC1155Received.selector) { + revert("ERC1155: ERC1155Receiver rejected tokens"); + } + } catch Error(string memory reason) { + revert(reason); + } catch { + revert("ERC1155: transfer to non-ERC1155Receiver implementer"); + } + } + } + + function _doSafeBatchTransferAcceptanceCheck( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) private { + if (to.isContract()) { + try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( + bytes4 response + ) { + if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { + revert("ERC1155: ERC1155Receiver rejected tokens"); + } + } catch Error(string memory reason) { + revert(reason); + } catch { + revert("ERC1155: transfer to non-ERC1155Receiver implementer"); + } + } + } + + function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { + uint256[] memory array = new uint256[](1); + array[0] = element; + + return array; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155.sol new file mode 100644 index 00000000..3446e604 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) + +pragma solidity ^0.8.0; + +import "../../utils/introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC1155 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-1155[EIP]. + * + * _Available since v3.1._ + */ +interface IERC1155 is IERC165 { + /** + * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. + */ + event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); + + /** + * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all + * transfers. + */ + event TransferBatch( + address indexed operator, + address indexed from, + address indexed to, + uint256[] ids, + uint256[] values + ); + + /** + * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to + * `approved`. + */ + event ApprovalForAll(address indexed account, address indexed operator, bool approved); + + /** + * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. + * + * If an {URI} event was emitted for `id`, the standard + * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value + * returned by {IERC1155MetadataURI-uri}. + */ + event URI(string value, uint256 indexed id); + + /** + * @dev Returns the amount of tokens of token type `id` owned by `account`. + * + * Requirements: + * + * - `account` cannot be the zero address. + */ + function balanceOf(address account, uint256 id) external view returns (uint256); + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. + * + * Requirements: + * + * - `accounts` and `ids` must have the same length. + */ + function balanceOfBatch( + address[] calldata accounts, + uint256[] calldata ids + ) external view returns (uint256[] memory); + + /** + * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, + * + * Emits an {ApprovalForAll} event. + * + * Requirements: + * + * - `operator` cannot be the caller. + */ + function setApprovalForAll(address operator, bool approved) external; + + /** + * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. + * + * See {setApprovalForAll}. + */ + function isApprovedForAll(address account, address operator) external view returns (bool); + + /** + * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. + * - `from` must have a balance of tokens of type `id` of at least `amount`. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `amounts` must have the same length. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function safeBatchTransferFrom( + address from, + address to, + uint256[] calldata ids, + uint256[] calldata amounts, + bytes calldata data + ) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155Receiver.sol new file mode 100644 index 00000000..0dd271d0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155Receiver.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) + +pragma solidity ^0.8.0; + +import "../../utils/introspection/IERC165.sol"; + +/** + * @dev _Available since v3.1._ + */ +interface IERC1155Receiver is IERC165 { + /** + * @dev Handles the receipt of a single ERC1155 token type. This function is + * called at the end of a `safeTransferFrom` after the balance has been updated. + * + * NOTE: To accept the transfer, this must return + * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` + * (i.e. 0xf23a6e61, or its own function selector). + * + * @param operator The address which initiated the transfer (i.e. msg.sender) + * @param from The address which previously owned the token + * @param id The ID of the token being transferred + * @param value The amount of tokens being transferred + * @param data Additional data with no specified format + * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed + */ + function onERC1155Received( + address operator, + address from, + uint256 id, + uint256 value, + bytes calldata data + ) external returns (bytes4); + + /** + * @dev Handles the receipt of a multiple ERC1155 token types. This function + * is called at the end of a `safeBatchTransferFrom` after the balances have + * been updated. + * + * NOTE: To accept the transfer(s), this must return + * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` + * (i.e. 0xbc197c81, or its own function selector). + * + * @param operator The address which initiated the batch transfer (i.e. msg.sender) + * @param from The address which previously owned the token + * @param ids An array containing ids of each token being transferred (order and length must match values array) + * @param values An array containing amounts of each token being transferred (order and length must match ids array) + * @param data Additional data with no specified format + * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed + */ + function onERC1155BatchReceived( + address operator, + address from, + uint256[] calldata ids, + uint256[] calldata values, + bytes calldata data + ) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Burnable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Burnable.sol new file mode 100644 index 00000000..9ee37198 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Burnable.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155.sol"; + +/** + * @dev Extension of {ERC1155} that allows token holders to destroy both their + * own tokens and those that they have been approved to use. + * + * _Available since v3.1._ + */ +abstract contract ERC1155Burnable is ERC1155 { + function burn(address account, uint256 id, uint256 value) public virtual { + require( + account == _msgSender() || isApprovedForAll(account, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + + _burn(account, id, value); + } + + function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { + require( + account == _msgSender() || isApprovedForAll(account, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + + _burnBatch(account, ids, values); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Pausable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Pausable.sol new file mode 100644 index 00000000..07bb3901 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Pausable.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC1155/extensions/ERC1155Pausable.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155.sol"; +import "../../../security/Pausable.sol"; + +/** + * @dev ERC1155 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract unpausable. + * + * _Available since v3.1._ + */ +abstract contract ERC1155Pausable is ERC1155, Pausable { + /** + * @dev See {ERC1155-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual override { + super._beforeTokenTransfer(operator, from, to, ids, amounts, data); + + require(!paused(), "ERC1155Pausable: token transfer while paused"); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol new file mode 100644 index 00000000..ec24389a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155.sol"; + +/** + * @dev Extension of ERC1155 that adds tracking of total supply per id. + * + * Useful for scenarios where Fungible and Non-fungible tokens have to be + * clearly identified. Note: While a totalSupply of 1 might mean the + * corresponding is an NFT, there is no guarantees that no other token with the + * same id are not going to be minted. + */ +abstract contract ERC1155Supply is ERC1155 { + mapping(uint256 => uint256) private _totalSupply; + + /** + * @dev Total amount of tokens in with a given id. + */ + function totalSupply(uint256 id) public view virtual returns (uint256) { + return _totalSupply[id]; + } + + /** + * @dev Indicates whether any token exist with a given id, or not. + */ + function exists(uint256 id) public view virtual returns (bool) { + return ERC1155Supply.totalSupply(id) > 0; + } + + /** + * @dev See {ERC1155-_beforeTokenTransfer}. + */ + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual override { + super._beforeTokenTransfer(operator, from, to, ids, amounts, data); + + if (from == address(0)) { + for (uint256 i = 0; i < ids.length; ++i) { + _totalSupply[ids[i]] += amounts[i]; + } + } + + if (to == address(0)) { + for (uint256 i = 0; i < ids.length; ++i) { + uint256 id = ids[i]; + uint256 amount = amounts[i]; + uint256 supply = _totalSupply[id]; + require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); + unchecked { + _totalSupply[id] = supply - amount; + } + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155URIStorage.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155URIStorage.sol new file mode 100644 index 00000000..623504f3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155URIStorage.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) + +pragma solidity ^0.8.0; + +import "../../../utils/Strings.sol"; +import "../ERC1155.sol"; + +/** + * @dev ERC1155 token with storage based token URI management. + * Inspired by the ERC721URIStorage extension + * + * _Available since v4.6._ + */ +abstract contract ERC1155URIStorage is ERC1155 { + using Strings for uint256; + + // Optional base URI + string private _baseURI = ""; + + // Optional mapping for token URIs + mapping(uint256 => string) private _tokenURIs; + + /** + * @dev See {IERC1155MetadataURI-uri}. + * + * This implementation returns the concatenation of the `_baseURI` + * and the token-specific uri if the latter is set + * + * This enables the following behaviors: + * + * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation + * of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` + * is empty per default); + * + * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` + * which in most cases will contain `ERC1155._uri`; + * + * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a + * uri value set, then the result is empty. + */ + function uri(uint256 tokenId) public view virtual override returns (string memory) { + string memory tokenURI = _tokenURIs[tokenId]; + + // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). + return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); + } + + /** + * @dev Sets `tokenURI` as the tokenURI of `tokenId`. + */ + function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { + _tokenURIs[tokenId] = tokenURI; + emit URI(uri(tokenId), tokenId); + } + + /** + * @dev Sets `baseURI` as the `_baseURI` for all tokens + */ + function _setBaseURI(string memory baseURI) internal virtual { + _baseURI = baseURI; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/IERC1155MetadataURI.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/IERC1155MetadataURI.sol new file mode 100644 index 00000000..520a2971 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/IERC1155MetadataURI.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) + +pragma solidity ^0.8.0; + +import "../IERC1155.sol"; + +/** + * @dev Interface of the optional ERC1155MetadataExtension interface, as defined + * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. + * + * _Available since v3.1._ + */ +interface IERC1155MetadataURI is IERC1155 { + /** + * @dev Returns the URI for token type `id`. + * + * If the `\{id\}` substring is present in the URI, it must be replaced by + * clients with the actual token type ID. + */ + function uri(uint256 id) external view returns (string memory); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol new file mode 100644 index 00000000..2f68dcaf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155.sol"; +import "../extensions/ERC1155Burnable.sol"; +import "../extensions/ERC1155Pausable.sol"; +import "../../../access/AccessControlEnumerable.sol"; +import "../../../utils/Context.sol"; + +/** + * @dev {ERC1155} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that + * deploys the contract. + */ + constructor(string memory uri) ERC1155(uri) { + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + } + + /** + * @dev Creates `amount` new tokens for `to`, of token type `id`. + * + * See {ERC1155-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to, uint256 id, uint256 amount, bytes memory data) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); + + _mint(to, id, amount, data); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}. + */ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); + + _mintBatch(to, ids, amounts, data); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC1155Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC1155Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to unpause"); + _unpause(); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(AccessControlEnumerable, ERC1155) returns (bool) { + return super.supportsInterface(interfaceId); + } + + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual override(ERC1155, ERC1155Pausable) { + super._beforeTokenTransfer(operator, from, to, ids, amounts, data); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Holder.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Holder.sol new file mode 100644 index 00000000..7249de84 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Holder.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) + +pragma solidity ^0.8.0; + +import "./ERC1155Receiver.sol"; + +/** + * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. + * + * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be + * stuck. + * + * @dev _Available since v3.1._ + */ +contract ERC1155Holder is ERC1155Receiver { + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155Received.selector; + } + + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155BatchReceived.selector; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol new file mode 100644 index 00000000..2e6804a2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) + +pragma solidity ^0.8.0; + +import "../IERC1155Receiver.sol"; +import "../../../utils/introspection/ERC165.sol"; + +/** + * @dev _Available since v3.1._ + */ +abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol new file mode 100644 index 00000000..91b7f98f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol @@ -0,0 +1,365 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) + +pragma solidity ^0.8.0; + +import "./IERC20.sol"; +import "./extensions/IERC20Metadata.sol"; +import "../../utils/Context.sol"; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * For a generic mechanism see {ERC20PresetMinterPauser}. + * + * TIP: For a detailed writeup see our guide + * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * The default value of {decimals} is 18. To change this, you should override + * this function so it returns a different value. + * + * We have followed general OpenZeppelin Contracts guidelines: functions revert + * instead returning `false` on failure. This behavior is nonetheless + * conventional and does not conflict with the expectations of ERC20 + * applications. + * + * Additionally, an {Approval} event is emitted on calls to {transferFrom}. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} + * functions have been added to mitigate the well-known issues around setting + * allowances. See {IERC20-approve}. + */ +contract ERC20 is Context, IERC20, IERC20Metadata { + mapping(address => uint256) private _balances; + + mapping(address => mapping(address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + /** + * @dev Sets the values for {name} and {symbol}. + * + * All two of these values are immutable: they can only be set once during + * construction. + */ + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5.05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the default value returned by this function, unless + * it's overridden. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view virtual override returns (uint8) { + return 18; + } + + /** + * @dev See {IERC20-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view virtual override returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address to, uint256 amount) public virtual override returns (bool) { + address owner = _msgSender(); + _transfer(owner, to, amount); + return true; + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) public view virtual override returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on + * `transferFrom`. This is semantically equivalent to an infinite approval. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public virtual override returns (bool) { + address owner = _msgSender(); + _approve(owner, spender, amount); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {ERC20}. + * + * NOTE: Does not update the allowance if the current allowance + * is the maximum `uint256`. + * + * Requirements: + * + * - `from` and `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + * - the caller must have allowance for ``from``'s tokens of at least + * `amount`. + */ + function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { + address spender = _msgSender(); + _spendAllowance(from, spender, amount); + _transfer(from, to, amount); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { + address owner = _msgSender(); + _approve(owner, spender, allowance(owner, spender) + addedValue); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { + address owner = _msgSender(); + uint256 currentAllowance = allowance(owner, spender); + require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); + unchecked { + _approve(owner, spender, currentAllowance - subtractedValue); + } + + return true; + } + + /** + * @dev Moves `amount` of tokens from `from` to `to`. + * + * This internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + */ + function _transfer(address from, address to, uint256 amount) internal virtual { + require(from != address(0), "ERC20: transfer from the zero address"); + require(to != address(0), "ERC20: transfer to the zero address"); + + _beforeTokenTransfer(from, to, amount); + + uint256 fromBalance = _balances[from]; + require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); + unchecked { + _balances[from] = fromBalance - amount; + // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by + // decrementing then incrementing. + _balances[to] += amount; + } + + emit Transfer(from, to, amount); + + _afterTokenTransfer(from, to, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements: + * + * - `account` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: mint to the zero address"); + + _beforeTokenTransfer(address(0), account, amount); + + _totalSupply += amount; + unchecked { + // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. + _balances[account] += amount; + } + emit Transfer(address(0), account, amount); + + _afterTokenTransfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements: + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: burn from the zero address"); + + _beforeTokenTransfer(account, address(0), amount); + + uint256 accountBalance = _balances[account]; + require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); + unchecked { + _balances[account] = accountBalance - amount; + // Overflow not possible: amount <= accountBalance <= totalSupply. + _totalSupply -= amount; + } + + emit Transfer(account, address(0), amount); + + _afterTokenTransfer(account, address(0), amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. + * + * This internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 amount) internal virtual { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } + + /** + * @dev Updates `owner` s allowance for `spender` based on spent `amount`. + * + * Does not update the allowance amount in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Might emit an {Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { + uint256 currentAllowance = allowance(owner, spender); + if (currentAllowance != type(uint256).max) { + require(currentAllowance >= amount, "ERC20: insufficient allowance"); + unchecked { + _approve(owner, spender, currentAllowance - amount); + } + } + } + + /** + * @dev Hook that is called before any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * will be transferred to `to`. + * - when `from` is zero, `amount` tokens will be minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} + + /** + * @dev Hook that is called after any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * has been transferred to `to`. + * - when `from` is zero, `amount` tokens have been minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens have been burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/IERC20.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/IERC20.sol new file mode 100644 index 00000000..6d5b4e9f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/IERC20.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. + */ +interface IERC20 { + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to {approve}. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); + + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `to`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address to, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through {transferFrom}. This is + * zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `from` to `to` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 amount) external returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol new file mode 100644 index 00000000..1cd08ee8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) + +pragma solidity ^0.8.0; + +import "../ERC20.sol"; +import "../../../utils/Context.sol"; + +/** + * @dev Extension of {ERC20} that allows token holders to destroy both their own + * tokens and those that they have an allowance for, in a way that can be + * recognized off-chain (via event analysis). + */ +abstract contract ERC20Burnable is Context, ERC20 { + /** + * @dev Destroys `amount` tokens from the caller. + * + * See {ERC20-_burn}. + */ + function burn(uint256 amount) public virtual { + _burn(_msgSender(), amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, deducting from the caller's + * allowance. + * + * See {ERC20-_burn} and {ERC20-allowance}. + * + * Requirements: + * + * - the caller must have allowance for ``accounts``'s tokens of at least + * `amount`. + */ + function burnFrom(address account, uint256 amount) public virtual { + _spendAllowance(account, _msgSender(), amount); + _burn(account, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol new file mode 100644 index 00000000..16f830d1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) + +pragma solidity ^0.8.0; + +import "../ERC20.sol"; + +/** + * @dev Extension of {ERC20} that adds a cap to the supply of tokens. + */ +abstract contract ERC20Capped is ERC20 { + uint256 private immutable _cap; + + /** + * @dev Sets the value of the `cap`. This value is immutable, it can only be + * set once during construction. + */ + constructor(uint256 cap_) { + require(cap_ > 0, "ERC20Capped: cap is 0"); + _cap = cap_; + } + + /** + * @dev Returns the cap on the token's total supply. + */ + function cap() public view virtual returns (uint256) { + return _cap; + } + + /** + * @dev See {ERC20-_mint}. + */ + function _mint(address account, uint256 amount) internal virtual override { + require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded"); + super._mint(account, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20FlashMint.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20FlashMint.sol new file mode 100644 index 00000000..063fe99f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20FlashMint.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/ERC20FlashMint.sol) + +pragma solidity ^0.8.0; + +import "../../../interfaces/IERC3156FlashBorrower.sol"; +import "../../../interfaces/IERC3156FlashLender.sol"; +import "../ERC20.sol"; + +/** + * @dev Implementation of the ERC3156 Flash loans extension, as defined in + * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. + * + * Adds the {flashLoan} method, which provides flash loan support at the token + * level. By default there is no fee, but this can be changed by overriding {flashFee}. + * + * _Available since v4.1._ + */ +abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender { + bytes32 private constant _RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); + + /** + * @dev Returns the maximum amount of tokens available for loan. + * @param token The address of the token that is requested. + * @return The amount of token that can be loaned. + */ + function maxFlashLoan(address token) public view virtual override returns (uint256) { + return token == address(this) ? type(uint256).max - ERC20.totalSupply() : 0; + } + + /** + * @dev Returns the fee applied when doing flash loans. This function calls + * the {_flashFee} function which returns the fee applied when doing flash + * loans. + * @param token The token to be flash loaned. + * @param amount The amount of tokens to be loaned. + * @return The fees applied to the corresponding flash loan. + */ + function flashFee(address token, uint256 amount) public view virtual override returns (uint256) { + require(token == address(this), "ERC20FlashMint: wrong token"); + return _flashFee(token, amount); + } + + /** + * @dev Returns the fee applied when doing flash loans. By default this + * implementation has 0 fees. This function can be overloaded to make + * the flash loan mechanism deflationary. + * @param token The token to be flash loaned. + * @param amount The amount of tokens to be loaned. + * @return The fees applied to the corresponding flash loan. + */ + function _flashFee(address token, uint256 amount) internal view virtual returns (uint256) { + // silence warning about unused variable without the addition of bytecode. + token; + amount; + return 0; + } + + /** + * @dev Returns the receiver address of the flash fee. By default this + * implementation returns the address(0) which means the fee amount will be burnt. + * This function can be overloaded to change the fee receiver. + * @return The address for which the flash fee will be sent to. + */ + function _flashFeeReceiver() internal view virtual returns (address) { + return address(0); + } + + /** + * @dev Performs a flash loan. New tokens are minted and sent to the + * `receiver`, who is required to implement the {IERC3156FlashBorrower} + * interface. By the end of the flash loan, the receiver is expected to own + * amount + fee tokens and have them approved back to the token contract itself so + * they can be burned. + * @param receiver The receiver of the flash loan. Should implement the + * {IERC3156FlashBorrower-onFlashLoan} interface. + * @param token The token to be flash loaned. Only `address(this)` is + * supported. + * @param amount The amount of tokens to be loaned. + * @param data An arbitrary datafield that is passed to the receiver. + * @return `true` if the flash loan was successful. + */ + // This function can reenter, but it doesn't pose a risk because it always preserves the property that the amount + // minted at the beginning is always recovered and burned at the end, or else the entire function will revert. + // slither-disable-next-line reentrancy-no-eth + function flashLoan( + IERC3156FlashBorrower receiver, + address token, + uint256 amount, + bytes calldata data + ) public virtual override returns (bool) { + require(amount <= maxFlashLoan(token), "ERC20FlashMint: amount exceeds maxFlashLoan"); + uint256 fee = flashFee(token, amount); + _mint(address(receiver), amount); + require( + receiver.onFlashLoan(msg.sender, token, amount, fee, data) == _RETURN_VALUE, + "ERC20FlashMint: invalid return value" + ); + address flashFeeReceiver = _flashFeeReceiver(); + _spendAllowance(address(receiver), address(this), amount + fee); + if (fee == 0 || flashFeeReceiver == address(0)) { + _burn(address(receiver), amount + fee); + } else { + _burn(address(receiver), amount); + _transfer(address(receiver), flashFeeReceiver, fee); + } + return true; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Pausable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Pausable.sol new file mode 100644 index 00000000..3b2b6329 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Pausable.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol) + +pragma solidity ^0.8.0; + +import "../ERC20.sol"; +import "../../../security/Pausable.sol"; + +/** + * @dev ERC20 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract unpausable. + */ +abstract contract ERC20Pausable is ERC20, Pausable { + /** + * @dev See {ERC20-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { + super._beforeTokenTransfer(from, to, amount); + + require(!paused(), "ERC20Pausable: token transfer while paused"); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol new file mode 100644 index 00000000..4a83b96e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol) + +pragma solidity ^0.8.0; + +import "./IERC20Permit.sol"; +import "../ERC20.sol"; +import "../../../utils/cryptography/ECDSA.sol"; +import "../../../utils/cryptography/EIP712.sol"; +import "../../../utils/Counters.sol"; + +/** + * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * + * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't + * need to send a transaction, and thus is not required to hold Ether at all. + * + * _Available since v3.4._ + */ +abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { + using Counters for Counters.Counter; + + mapping(address => Counters.Counter) private _nonces; + + // solhint-disable-next-line var-name-mixedcase + bytes32 private constant _PERMIT_TYPEHASH = + keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); + /** + * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. + * However, to ensure consistency with the upgradeable transpiler, we will continue + * to reserve a slot. + * @custom:oz-renamed-from _PERMIT_TYPEHASH + */ + // solhint-disable-next-line var-name-mixedcase + bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; + + /** + * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. + * + * It's a good idea to use the same `name` that is defined as the ERC20 token name. + */ + constructor(string memory name) EIP712(name, "1") {} + + /** + * @inheritdoc IERC20Permit + */ + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override { + require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); + + bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); + + bytes32 hash = _hashTypedDataV4(structHash); + + address signer = ECDSA.recover(hash, v, r, s); + require(signer == owner, "ERC20Permit: invalid signature"); + + _approve(owner, spender, value); + } + + /** + * @inheritdoc IERC20Permit + */ + function nonces(address owner) public view virtual override returns (uint256) { + return _nonces[owner].current(); + } + + /** + * @inheritdoc IERC20Permit + */ + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view override returns (bytes32) { + return _domainSeparatorV4(); + } + + /** + * @dev "Consume a nonce": return the current value and increment. + * + * _Available since v4.1._ + */ + function _useNonce(address owner) internal virtual returns (uint256 current) { + Counters.Counter storage nonce = _nonces[owner]; + current = nonce.current(); + nonce.increment(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol new file mode 100644 index 00000000..504e7a92 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Snapshot.sol) + +pragma solidity ^0.8.0; + +import "../ERC20.sol"; +import "../../../utils/Arrays.sol"; +import "../../../utils/Counters.sol"; + +/** + * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and + * total supply at the time are recorded for later access. + * + * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. + * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different + * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be + * used to create an efficient ERC20 forking mechanism. + * + * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a + * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot + * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id + * and the account address. + * + * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it + * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this + * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract. + * + * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient + * alternative consider {ERC20Votes}. + * + * ==== Gas Costs + * + * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log + * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much + * smaller since identical balances in subsequent snapshots are stored as a single entry. + * + * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is + * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent + * transfers will have normal cost until the next snapshot, and so on. + */ + +abstract contract ERC20Snapshot is ERC20 { + // Inspired by Jordi Baylina's MiniMeToken to record historical balances: + // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol + + using Arrays for uint256[]; + using Counters for Counters.Counter; + + // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a + // Snapshot struct, but that would impede usage of functions that work on an array. + struct Snapshots { + uint256[] ids; + uint256[] values; + } + + mapping(address => Snapshots) private _accountBalanceSnapshots; + Snapshots private _totalSupplySnapshots; + + // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. + Counters.Counter private _currentSnapshotId; + + /** + * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. + */ + event Snapshot(uint256 id); + + /** + * @dev Creates a new snapshot and returns its snapshot id. + * + * Emits a {Snapshot} event that contains the same id. + * + * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a + * set of accounts, for example using {AccessControl}, or it may be open to the public. + * + * [WARNING] + * ==== + * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, + * you must consider that it can potentially be used by attackers in two ways. + * + * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow + * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target + * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs + * section above. + * + * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. + * ==== + */ + function _snapshot() internal virtual returns (uint256) { + _currentSnapshotId.increment(); + + uint256 currentId = _getCurrentSnapshotId(); + emit Snapshot(currentId); + return currentId; + } + + /** + * @dev Get the current snapshotId + */ + function _getCurrentSnapshotId() internal view virtual returns (uint256) { + return _currentSnapshotId.current(); + } + + /** + * @dev Retrieves the balance of `account` at the time `snapshotId` was created. + */ + function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) { + (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); + + return snapshotted ? value : balanceOf(account); + } + + /** + * @dev Retrieves the total supply at the time `snapshotId` was created. + */ + function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) { + (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); + + return snapshotted ? value : totalSupply(); + } + + // Update balance and/or total supply snapshots before the values are modified. This is implemented + // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { + super._beforeTokenTransfer(from, to, amount); + + if (from == address(0)) { + // mint + _updateAccountSnapshot(to); + _updateTotalSupplySnapshot(); + } else if (to == address(0)) { + // burn + _updateAccountSnapshot(from); + _updateTotalSupplySnapshot(); + } else { + // transfer + _updateAccountSnapshot(from); + _updateAccountSnapshot(to); + } + } + + function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { + require(snapshotId > 0, "ERC20Snapshot: id is 0"); + require(snapshotId <= _getCurrentSnapshotId(), "ERC20Snapshot: nonexistent id"); + + // When a valid snapshot is queried, there are three possibilities: + // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never + // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds + // to this id is the current one. + // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the + // requested id, and its value is the one to return. + // c) More snapshots were created after the requested one, and the queried value was later modified. There will be + // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is + // larger than the requested one. + // + // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if + // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does + // exactly this. + + uint256 index = snapshots.ids.findUpperBound(snapshotId); + + if (index == snapshots.ids.length) { + return (false, 0); + } else { + return (true, snapshots.values[index]); + } + } + + function _updateAccountSnapshot(address account) private { + _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); + } + + function _updateTotalSupplySnapshot() private { + _updateSnapshot(_totalSupplySnapshots, totalSupply()); + } + + function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { + uint256 currentId = _getCurrentSnapshotId(); + if (_lastSnapshotId(snapshots.ids) < currentId) { + snapshots.ids.push(currentId); + snapshots.values.push(currentValue); + } + } + + function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { + if (ids.length == 0) { + return 0; + } else { + return ids[ids.length - 1]; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol new file mode 100644 index 00000000..8b31fda6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol @@ -0,0 +1,290 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol) + +pragma solidity ^0.8.0; + +import "./ERC20Permit.sol"; +import "../../../interfaces/IERC5805.sol"; +import "../../../utils/math/Math.sol"; +import "../../../utils/math/SafeCast.sol"; +import "../../../utils/cryptography/ECDSA.sol"; + +/** + * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, + * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. + * + * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module. + * + * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either + * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting + * power can be queried through the public accessors {getVotes} and {getPastVotes}. + * + * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it + * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. + * + * _Available since v4.2._ + */ +abstract contract ERC20Votes is ERC20Permit, IERC5805 { + struct Checkpoint { + uint32 fromBlock; + uint224 votes; + } + + bytes32 private constant _DELEGATION_TYPEHASH = + keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); + + mapping(address => address) private _delegates; + mapping(address => Checkpoint[]) private _checkpoints; + Checkpoint[] private _totalSupplyCheckpoints; + + /** + * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). + */ + function clock() public view virtual override returns (uint48) { + return SafeCast.toUint48(block.number); + } + + /** + * @dev Description of the clock + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + // Check that the clock was not modified + require(clock() == block.number, "ERC20Votes: broken clock mode"); + return "mode=blocknumber&from=default"; + } + + /** + * @dev Get the `pos`-th checkpoint for `account`. + */ + function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) { + return _checkpoints[account][pos]; + } + + /** + * @dev Get number of checkpoints for `account`. + */ + function numCheckpoints(address account) public view virtual returns (uint32) { + return SafeCast.toUint32(_checkpoints[account].length); + } + + /** + * @dev Get the address `account` is currently delegating to. + */ + function delegates(address account) public view virtual override returns (address) { + return _delegates[account]; + } + + /** + * @dev Gets the current votes balance for `account` + */ + function getVotes(address account) public view virtual override returns (uint256) { + uint256 pos = _checkpoints[account].length; + unchecked { + return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes; + } + } + + /** + * @dev Retrieve the number of votes for `account` at the end of `timepoint`. + * + * Requirements: + * + * - `timepoint` must be in the past + */ + function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "ERC20Votes: future lookup"); + return _checkpointsLookup(_checkpoints[account], timepoint); + } + + /** + * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. + * It is NOT the sum of all the delegated votes! + * + * Requirements: + * + * - `timepoint` must be in the past + */ + function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "ERC20Votes: future lookup"); + return _checkpointsLookup(_totalSupplyCheckpoints, timepoint); + } + + /** + * @dev Lookup a value in a list of (sorted) checkpoints. + */ + function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 timepoint) private view returns (uint256) { + // We run a binary search to look for the last (most recent) checkpoint taken before (or at) `timepoint`. + // + // Initially we check if the block is recent to narrow the search range. + // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). + // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. + // - If the middle checkpoint is after `timepoint`, we look in [low, mid) + // - If the middle checkpoint is before or equal to `timepoint`, we look in [mid+1, high) + // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not + // out of bounds (in which case we're looking too far in the past and the result is 0). + // Note that if the latest checkpoint available is exactly for `timepoint`, we end up with an index that is + // past the end of the array, so we technically don't find a checkpoint after `timepoint`, but it works out + // the same. + uint256 length = ckpts.length; + + uint256 low = 0; + uint256 high = length; + + if (length > 5) { + uint256 mid = length - Math.sqrt(length); + if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { + high = mid; + } else { + low = mid + 1; + } + } + + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { + high = mid; + } else { + low = mid + 1; + } + } + + unchecked { + return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes; + } + } + + /** + * @dev Delegate votes from the sender to `delegatee`. + */ + function delegate(address delegatee) public virtual override { + _delegate(_msgSender(), delegatee); + } + + /** + * @dev Delegates votes from signer to `delegatee` + */ + function delegateBySig( + address delegatee, + uint256 nonce, + uint256 expiry, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override { + require(block.timestamp <= expiry, "ERC20Votes: signature expired"); + address signer = ECDSA.recover( + _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), + v, + r, + s + ); + require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce"); + _delegate(signer, delegatee); + } + + /** + * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). + */ + function _maxSupply() internal view virtual returns (uint224) { + return type(uint224).max; + } + + /** + * @dev Snapshots the totalSupply after it has been increased. + */ + function _mint(address account, uint256 amount) internal virtual override { + super._mint(account, amount); + require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes"); + + _writeCheckpoint(_totalSupplyCheckpoints, _add, amount); + } + + /** + * @dev Snapshots the totalSupply after it has been decreased. + */ + function _burn(address account, uint256 amount) internal virtual override { + super._burn(account, amount); + + _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount); + } + + /** + * @dev Move voting power when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override { + super._afterTokenTransfer(from, to, amount); + + _moveVotingPower(delegates(from), delegates(to), amount); + } + + /** + * @dev Change delegation for `delegator` to `delegatee`. + * + * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. + */ + function _delegate(address delegator, address delegatee) internal virtual { + address currentDelegate = delegates(delegator); + uint256 delegatorBalance = balanceOf(delegator); + _delegates[delegator] = delegatee; + + emit DelegateChanged(delegator, currentDelegate, delegatee); + + _moveVotingPower(currentDelegate, delegatee, delegatorBalance); + } + + function _moveVotingPower(address src, address dst, uint256 amount) private { + if (src != dst && amount > 0) { + if (src != address(0)) { + (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount); + emit DelegateVotesChanged(src, oldWeight, newWeight); + } + + if (dst != address(0)) { + (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount); + emit DelegateVotesChanged(dst, oldWeight, newWeight); + } + } + } + + function _writeCheckpoint( + Checkpoint[] storage ckpts, + function(uint256, uint256) view returns (uint256) op, + uint256 delta + ) private returns (uint256 oldWeight, uint256 newWeight) { + uint256 pos = ckpts.length; + + unchecked { + Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1); + + oldWeight = oldCkpt.votes; + newWeight = op(oldWeight, delta); + + if (pos > 0 && oldCkpt.fromBlock == clock()) { + _unsafeAccess(ckpts, pos - 1).votes = SafeCast.toUint224(newWeight); + } else { + ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(clock()), votes: SafeCast.toUint224(newWeight)})); + } + } + } + + function _add(uint256 a, uint256 b) private pure returns (uint256) { + return a + b; + } + + function _subtract(uint256 a, uint256 b) private pure returns (uint256) { + return a - b; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) { + assembly { + mstore(0, ckpts.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol new file mode 100644 index 00000000..0461310a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20VotesComp.sol) + +pragma solidity ^0.8.0; + +import "./ERC20Votes.sol"; + +/** + * @dev Extension of ERC20 to support Compound's voting and delegation. This version exactly matches Compound's + * interface, with the drawback of only supporting supply up to (2^96^ - 1). + * + * NOTE: You should use this contract if you need exact compatibility with COMP (for example in order to use your token + * with Governor Alpha or Bravo) and if you are sure the supply cap of 2^96^ is enough for you. Otherwise, use the + * {ERC20Votes} variant of this module. + * + * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either + * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting + * power can be queried through the public accessors {getCurrentVotes} and {getPriorVotes}. + * + * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it + * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. + * + * _Available since v4.2._ + */ +abstract contract ERC20VotesComp is ERC20Votes { + /** + * @dev Comp version of the {getVotes} accessor, with `uint96` return type. + */ + function getCurrentVotes(address account) external view virtual returns (uint96) { + return SafeCast.toUint96(getVotes(account)); + } + + /** + * @dev Comp version of the {getPastVotes} accessor, with `uint96` return type. + */ + function getPriorVotes(address account, uint256 blockNumber) external view virtual returns (uint96) { + return SafeCast.toUint96(getPastVotes(account, blockNumber)); + } + + /** + * @dev Maximum token supply. Reduced to `type(uint96).max` (2^96^ - 1) to fit COMP interface. + */ + function _maxSupply() internal view virtual override returns (uint224) { + return type(uint96).max; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol new file mode 100644 index 00000000..bc85a0b3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Wrapper.sol) + +pragma solidity ^0.8.0; + +import "../ERC20.sol"; +import "../utils/SafeERC20.sol"; + +/** + * @dev Extension of the ERC20 token contract to support token wrapping. + * + * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful + * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the + * wrapping of an existing "basic" ERC20 into a governance token. + * + * _Available since v4.2._ + */ +abstract contract ERC20Wrapper is ERC20 { + IERC20 private immutable _underlying; + + constructor(IERC20 underlyingToken) { + require(underlyingToken != this, "ERC20Wrapper: cannot self wrap"); + _underlying = underlyingToken; + } + + /** + * @dev See {ERC20-decimals}. + */ + function decimals() public view virtual override returns (uint8) { + try IERC20Metadata(address(_underlying)).decimals() returns (uint8 value) { + return value; + } catch { + return super.decimals(); + } + } + + /** + * @dev Returns the address of the underlying ERC-20 token that is being wrapped. + */ + function underlying() public view returns (IERC20) { + return _underlying; + } + + /** + * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens. + */ + function depositFor(address account, uint256 amount) public virtual returns (bool) { + address sender = _msgSender(); + require(sender != address(this), "ERC20Wrapper: wrapper can't deposit"); + SafeERC20.safeTransferFrom(_underlying, sender, address(this), amount); + _mint(account, amount); + return true; + } + + /** + * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens. + */ + function withdrawTo(address account, uint256 amount) public virtual returns (bool) { + _burn(_msgSender(), amount); + SafeERC20.safeTransfer(_underlying, account, amount); + return true; + } + + /** + * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal + * function that can be exposed with access control if desired. + */ + function _recover(address account) internal virtual returns (uint256) { + uint256 value = _underlying.balanceOf(address(this)) - totalSupply(); + _mint(account, value); + return value; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol new file mode 100644 index 00000000..4f6a2d64 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol @@ -0,0 +1,256 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC4626.sol) + +pragma solidity ^0.8.0; + +import "../ERC20.sol"; +import "../utils/SafeERC20.sol"; +import "../../../interfaces/IERC4626.sol"; +import "../../../utils/math/Math.sol"; + +/** + * @dev Implementation of the ERC4626 "Tokenized Vault Standard" as defined in + * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626]. + * + * This extension allows the minting and burning of "shares" (represented using the ERC20 inheritance) in exchange for + * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends + * the ERC20 standard. Any additional extensions included along it would affect the "shares" token represented by this + * contract and not the "assets" token which is an independent contract. + * + * [CAUTION] + * ==== + * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning + * with a "donation" to the vault that inflates the price of a share. This is variously known as a donation or inflation + * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial + * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may + * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by + * verifying the amount received is as expected, using a wrapper that performs these checks such as + * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. + * + * Since v4.9, this implementation uses virtual assets and shares to mitigate that risk. The `_decimalsOffset()` + * corresponds to an offset in the decimal representation between the underlying asset's decimals and the vault + * decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which itself + * determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default offset + * (0) makes it non-profitable, as a result of the value being captured by the virtual shares (out of the attacker's + * donation) matching the attacker's expected gains. With a larger offset, the attack becomes orders of magnitude more + * expensive than it is profitable. More details about the underlying math can be found + * xref:erc4626.adoc#inflation-attack[here]. + * + * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued + * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets + * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience + * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the + * `_convertToShares` and `_convertToAssets` functions. + * + * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide]. + * ==== + * + * _Available since v4.7._ + */ +abstract contract ERC4626 is ERC20, IERC4626 { + using Math for uint256; + + IERC20 private immutable _asset; + uint8 private immutable _underlyingDecimals; + + /** + * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777). + */ + constructor(IERC20 asset_) { + (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_); + _underlyingDecimals = success ? assetDecimals : 18; + _asset = asset_; + } + + /** + * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way. + */ + function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool, uint8) { + (bool success, bytes memory encodedDecimals) = address(asset_).staticcall( + abi.encodeWithSelector(IERC20Metadata.decimals.selector) + ); + if (success && encodedDecimals.length >= 32) { + uint256 returnedDecimals = abi.decode(encodedDecimals, (uint256)); + if (returnedDecimals <= type(uint8).max) { + return (true, uint8(returnedDecimals)); + } + } + return (false, 0); + } + + /** + * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This + * "original" value is cached during construction of the vault contract. If this read operation fails (e.g., the + * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals. + * + * See {IERC20Metadata-decimals}. + */ + function decimals() public view virtual override(IERC20Metadata, ERC20) returns (uint8) { + return _underlyingDecimals + _decimalsOffset(); + } + + /** @dev See {IERC4626-asset}. */ + function asset() public view virtual override returns (address) { + return address(_asset); + } + + /** @dev See {IERC4626-totalAssets}. */ + function totalAssets() public view virtual override returns (uint256) { + return _asset.balanceOf(address(this)); + } + + /** @dev See {IERC4626-convertToShares}. */ + function convertToShares(uint256 assets) public view virtual override returns (uint256) { + return _convertToShares(assets, Math.Rounding.Down); + } + + /** @dev See {IERC4626-convertToAssets}. */ + function convertToAssets(uint256 shares) public view virtual override returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Down); + } + + /** @dev See {IERC4626-maxDeposit}. */ + function maxDeposit(address) public view virtual override returns (uint256) { + return type(uint256).max; + } + + /** @dev See {IERC4626-maxMint}. */ + function maxMint(address) public view virtual override returns (uint256) { + return type(uint256).max; + } + + /** @dev See {IERC4626-maxWithdraw}. */ + function maxWithdraw(address owner) public view virtual override returns (uint256) { + return _convertToAssets(balanceOf(owner), Math.Rounding.Down); + } + + /** @dev See {IERC4626-maxRedeem}. */ + function maxRedeem(address owner) public view virtual override returns (uint256) { + return balanceOf(owner); + } + + /** @dev See {IERC4626-previewDeposit}. */ + function previewDeposit(uint256 assets) public view virtual override returns (uint256) { + return _convertToShares(assets, Math.Rounding.Down); + } + + /** @dev See {IERC4626-previewMint}. */ + function previewMint(uint256 shares) public view virtual override returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Up); + } + + /** @dev See {IERC4626-previewWithdraw}. */ + function previewWithdraw(uint256 assets) public view virtual override returns (uint256) { + return _convertToShares(assets, Math.Rounding.Up); + } + + /** @dev See {IERC4626-previewRedeem}. */ + function previewRedeem(uint256 shares) public view virtual override returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Down); + } + + /** @dev See {IERC4626-deposit}. */ + function deposit(uint256 assets, address receiver) public virtual override returns (uint256) { + require(assets <= maxDeposit(receiver), "ERC4626: deposit more than max"); + + uint256 shares = previewDeposit(assets); + _deposit(_msgSender(), receiver, assets, shares); + + return shares; + } + + /** @dev See {IERC4626-mint}. + * + * As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero. + * In this case, the shares will be minted without requiring any assets to be deposited. + */ + function mint(uint256 shares, address receiver) public virtual override returns (uint256) { + require(shares <= maxMint(receiver), "ERC4626: mint more than max"); + + uint256 assets = previewMint(shares); + _deposit(_msgSender(), receiver, assets, shares); + + return assets; + } + + /** @dev See {IERC4626-withdraw}. */ + function withdraw(uint256 assets, address receiver, address owner) public virtual override returns (uint256) { + require(assets <= maxWithdraw(owner), "ERC4626: withdraw more than max"); + + uint256 shares = previewWithdraw(assets); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return shares; + } + + /** @dev See {IERC4626-redeem}. */ + function redeem(uint256 shares, address receiver, address owner) public virtual override returns (uint256) { + require(shares <= maxRedeem(owner), "ERC4626: redeem more than max"); + + uint256 assets = previewRedeem(shares); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return assets; + } + + /** + * @dev Internal conversion function (from assets to shares) with support for rounding direction. + */ + function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) { + return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding); + } + + /** + * @dev Internal conversion function (from shares to assets) with support for rounding direction. + */ + function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) { + return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding); + } + + /** + * @dev Deposit/mint common workflow. + */ + function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual { + // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the + // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the + // assets are transferred and before the shares are minted, which is a valid state. + // slither-disable-next-line reentrancy-no-eth + SafeERC20.safeTransferFrom(_asset, caller, address(this), assets); + _mint(receiver, shares); + + emit Deposit(caller, receiver, assets, shares); + } + + /** + * @dev Withdraw/redeem common workflow. + */ + function _withdraw( + address caller, + address receiver, + address owner, + uint256 assets, + uint256 shares + ) internal virtual { + if (caller != owner) { + _spendAllowance(owner, caller, shares); + } + + // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the + // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the + // shares are burned and after the assets are transferred, which is a valid state. + _burn(owner, shares); + SafeERC20.safeTransfer(_asset, receiver, assets); + + emit Withdraw(caller, receiver, owner, assets, shares); + } + + function _decimalsOffset() internal view virtual returns (uint8) { + return 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Metadata.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Metadata.sol new file mode 100644 index 00000000..83ba6ac5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Metadata.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) + +pragma solidity ^0.8.0; + +import "../IERC20.sol"; + +/** + * @dev Interface for the optional metadata functions from the ERC20 standard. + * + * _Available since v4.1._ + */ +interface IERC20Metadata is IERC20 { + /** + * @dev Returns the name of the token. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the symbol of the token. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the decimals places of the token. + */ + function decimals() external view returns (uint8); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Permit.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Permit.sol new file mode 100644 index 00000000..ec2b5483 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Permit.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * + * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't + * need to send a transaction, and thus is not required to hold Ether at all. + * + * ==== Security Considerations + * + * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature + * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be + * considered as an intention to spend the allowance in any specific way. The second is that because permits have + * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should + * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be + * generally recommended is: + * + * ```solidity + * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { + * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} + * doThing(..., value); + * } + * + * function doThing(..., uint256 value) public { + * token.safeTransferFrom(msg.sender, address(this), value); + * ... + * } + * ``` + * + * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of + * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also + * {SafeERC20-safeTransferFrom}). + * + * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so + * contracts should have entry points that don't rely on permit. + */ +interface IERC20Permit { + /** + * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, + * given ``owner``'s signed approval. + * + * IMPORTANT: The same issues {IERC20-approve} has related to transaction + * ordering also apply here. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `deadline` must be a timestamp in the future. + * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` + * over the EIP712-formatted function arguments. + * - the signature must use ``owner``'s current nonce (see {nonces}). + * + * For more information on the signature format, see the + * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP + * section]. + * + * CAUTION: See Security Considerations above. + */ + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external; + + /** + * @dev Returns the current nonce for `owner`. This value must be + * included whenever a signature is generated for {permit}. + * + * Every successful call to {permit} increases ``owner``'s nonce by one. This + * prevents a signature from being used multiple times. + */ + function nonces(address owner) external view returns (uint256); + + /** + * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. + */ + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol new file mode 100644 index 00000000..55b38b26 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-ERC20Permit.sol) + +pragma solidity ^0.8.0; + +// EIP-2612 is Final as of 2022-11-01. This file is deprecated. + +import "./ERC20Permit.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol new file mode 100644 index 00000000..ff6ede3c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol) + +pragma solidity ^0.8.0; + +// EIP-2612 is Final as of 2022-11-01. This file is deprecated. + +import "./IERC20Permit.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol new file mode 100644 index 00000000..d293999c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/presets/ERC20PresetFixedSupply.sol) +pragma solidity ^0.8.0; + +import "../extensions/ERC20Burnable.sol"; + +/** + * @dev {ERC20} token, including: + * + * - Preminted initial supply + * - Ability for holders to burn (destroy) their tokens + * - No access control mechanism (for minting/pausing) and hence no governance + * + * This contract uses {ERC20Burnable} to include burn capabilities - head to + * its documentation for details. + * + * _Available since v3.4._ + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC20PresetFixedSupply is ERC20Burnable { + /** + * @dev Mints `initialSupply` amount of token and transfers them to `owner`. + * + * See {ERC20-constructor}. + */ + constructor(string memory name, string memory symbol, uint256 initialSupply, address owner) ERC20(name, symbol) { + _mint(owner, initialSupply); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol new file mode 100644 index 00000000..e711a894 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol) + +pragma solidity ^0.8.0; + +import "../ERC20.sol"; +import "../extensions/ERC20Burnable.sol"; +import "../extensions/ERC20Pausable.sol"; +import "../../../access/AccessControlEnumerable.sol"; +import "../../../utils/Context.sol"; + +/** + * @dev {ERC20} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * See {ERC20-constructor}. + */ + constructor(string memory name, string memory symbol) ERC20(name, symbol) { + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + } + + /** + * @dev Creates `amount` new tokens for `to`. + * + * See {ERC20-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to, uint256 amount) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint"); + _mint(to, amount); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC20Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC20Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 amount + ) internal virtual override(ERC20, ERC20Pausable) { + super._beforeTokenTransfer(from, to, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol new file mode 100644 index 00000000..d4bcd988 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) + +pragma solidity ^0.8.0; + +import "../IERC20.sol"; +import "../extensions/IERC20Permit.sol"; +import "../../../utils/Address.sol"; + +/** + * @title SafeERC20 + * @dev Wrappers around ERC20 operations that throw on failure (when the token + * contract returns false). Tokens that return no value (and instead revert or + * throw on failure) are also supported, non-reverting calls are assumed to be + * successful. + * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, + * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. + */ +library SafeERC20 { + using Address for address; + + /** + * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + */ + function safeTransfer(IERC20 token, address to, uint256 value) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); + } + + /** + * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the + * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. + */ + function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); + } + + /** + * @dev Deprecated. This function has issues similar to the ones found in + * {IERC20-approve}, and its usage is discouraged. + * + * Whenever possible, use {safeIncreaseAllowance} and + * {safeDecreaseAllowance} instead. + */ + function safeApprove(IERC20 token, address spender, uint256 value) internal { + // safeApprove should only be called when setting an initial allowance, + // or when resetting it to zero. To increase and decrease it, use + // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' + require( + (value == 0) || (token.allowance(address(this), spender) == 0), + "SafeERC20: approve from non-zero to non-zero allowance" + ); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); + } + + /** + * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + */ + function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { + uint256 oldAllowance = token.allowance(address(this), spender); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); + } + + /** + * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + */ + function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { + unchecked { + uint256 oldAllowance = token.allowance(address(this), spender); + require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); + } + } + + /** + * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval + * to be set to zero before setting it to a non-zero value, such as USDT. + */ + function forceApprove(IERC20 token, address spender, uint256 value) internal { + bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); + + if (!_callOptionalReturnBool(token, approvalCall)) { + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); + _callOptionalReturn(token, approvalCall); + } + } + + /** + * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. + * Revert on invalid signature. + */ + function safePermit( + IERC20Permit token, + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) internal { + uint256 nonceBefore = token.nonces(owner); + token.permit(owner, spender, value, deadline, v, r, s); + uint256 nonceAfter = token.nonces(owner); + require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); + } + + /** + * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement + * on the return value: the return value is optional (but if data is returned, it must not be false). + * @param token The token targeted by the call. + * @param data The call data (encoded using abi.encode or one of its variants). + */ + function _callOptionalReturn(IERC20 token, bytes memory data) private { + // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since + // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that + // the target address contains contract code and also asserts for success in the low-level call. + + bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); + require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); + } + + /** + * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement + * on the return value: the return value is optional (but if data is returned, it must not be false). + * @param token The token targeted by the call. + * @param data The call data (encoded using abi.encode or one of its variants). + * + * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. + */ + function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { + // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since + // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false + // and not revert is the subcall reverts. + + (bool success, bytes memory returndata) = address(token).call(data); + return + success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol new file mode 100644 index 00000000..cffdac5d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/TokenTimelock.sol) + +pragma solidity ^0.8.0; + +import "./SafeERC20.sol"; + +/** + * @dev A token holder contract that will allow a beneficiary to extract the + * tokens after a given release time. + * + * Useful for simple vesting schedules like "advisors get all of their tokens + * after 1 year". + */ +contract TokenTimelock { + using SafeERC20 for IERC20; + + // ERC20 basic token contract being held + IERC20 private immutable _token; + + // beneficiary of tokens after they are released + address private immutable _beneficiary; + + // timestamp when token release is enabled + uint256 private immutable _releaseTime; + + /** + * @dev Deploys a timelock instance that is able to hold the token specified, and will only release it to + * `beneficiary_` when {release} is invoked after `releaseTime_`. The release time is specified as a Unix timestamp + * (in seconds). + */ + constructor(IERC20 token_, address beneficiary_, uint256 releaseTime_) { + require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time"); + _token = token_; + _beneficiary = beneficiary_; + _releaseTime = releaseTime_; + } + + /** + * @dev Returns the token being held. + */ + function token() public view virtual returns (IERC20) { + return _token; + } + + /** + * @dev Returns the beneficiary that will receive the tokens. + */ + function beneficiary() public view virtual returns (address) { + return _beneficiary; + } + + /** + * @dev Returns the time when the tokens are released in seconds since Unix epoch (i.e. Unix timestamp). + */ + function releaseTime() public view virtual returns (uint256) { + return _releaseTime; + } + + /** + * @dev Transfers tokens held by the timelock to the beneficiary. Will only succeed if invoked after the release + * time. + */ + function release() public virtual { + require(block.timestamp >= releaseTime(), "TokenTimelock: current time is before release time"); + + uint256 amount = token().balanceOf(address(this)); + require(amount > 0, "TokenTimelock: no tokens to release"); + + token().safeTransfer(beneficiary(), amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol new file mode 100644 index 00000000..7942e6fe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol @@ -0,0 +1,466 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) + +pragma solidity ^0.8.0; + +import "./IERC721.sol"; +import "./IERC721Receiver.sol"; +import "./extensions/IERC721Metadata.sol"; +import "../../utils/Address.sol"; +import "../../utils/Context.sol"; +import "../../utils/Strings.sol"; +import "../../utils/introspection/ERC165.sol"; + +/** + * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including + * the Metadata extension, but not including the Enumerable extension, which is available separately as + * {ERC721Enumerable}. + */ +contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { + using Address for address; + using Strings for uint256; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Mapping from token ID to owner address + mapping(uint256 => address) private _owners; + + // Mapping owner address to token count + mapping(address => uint256) private _balances; + + // Mapping from token ID to approved address + mapping(uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return + interfaceId == type(IERC721).interfaceId || + interfaceId == type(IERC721Metadata).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + require(owner != address(0), "ERC721: address zero is not a valid owner"); + return _balances[owner]; + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + address owner = _ownerOf(tokenId); + require(owner != address(0), "ERC721: invalid token ID"); + return owner; + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + _requireMinted(tokenId); + + string memory baseURI = _baseURI(); + return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; + } + + /** + * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each + * token will be the concatenation of the `baseURI` and the `tokenId`. Empty + * by default, can be overridden in child contracts. + */ + function _baseURI() internal view virtual returns (string memory) { + return ""; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ERC721.ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require( + _msgSender() == owner || isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not token owner or approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + _requireMinted(tokenId); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom(address from, address to, uint256 tokenId) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); + _safeTransfer(from, to, tokenId, data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist + */ + function _ownerOf(uint256 tokenId) internal view virtual returns (address) { + return _owners[tokenId]; + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return _ownerOf(tokenId) != address(0); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { + address owner = ERC721.ownerOf(tokenId); + return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + * + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { + _mint(to, tokenId); + require( + _checkOnERC721Received(address(0), to, tokenId, data), + "ERC721: transfer to non ERC721Receiver implementer" + ); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId, 1); + + // Check that tokenId was not minted by `_beforeTokenTransfer` hook + require(!_exists(tokenId), "ERC721: token already minted"); + + unchecked { + // Will not overflow unless all 2**256 token ids are minted to the same owner. + // Given that tokens are minted one by one, it is impossible in practice that + // this ever happens. Might change if we allow batch minting. + // The ERC fails to describe this case. + _balances[to] += 1; + } + + _owners[tokenId] = to; + + emit Transfer(address(0), to, tokenId); + + _afterTokenTransfer(address(0), to, tokenId, 1); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * This is an internal function that does not check if the sender is authorized to operate on the token. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ERC721.ownerOf(tokenId); + + _beforeTokenTransfer(owner, address(0), tokenId, 1); + + // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook + owner = ERC721.ownerOf(tokenId); + + // Clear approvals + delete _tokenApprovals[tokenId]; + + unchecked { + // Cannot overflow, as that would require more tokens to be burned/transferred + // out than the owner initially received through minting and transferring in. + _balances[owner] -= 1; + } + delete _owners[tokenId]; + + emit Transfer(owner, address(0), tokenId); + + _afterTokenTransfer(owner, address(0), tokenId, 1); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal virtual { + require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId, 1); + + // Check that tokenId was not transferred by `_beforeTokenTransfer` hook + require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); + + // Clear approvals from the previous owner + delete _tokenApprovals[tokenId]; + + unchecked { + // `_balances[from]` cannot overflow for the same reason as described in `_burn`: + // `from`'s balance is the number of token held, which is at least one before the current + // transfer. + // `_balances[to]` could overflow in the conditions described in `_mint`. That would require + // all 2**256 token ids to be minted, which in practice is impossible. + _balances[from] -= 1; + _balances[to] += 1; + } + _owners[tokenId] = to; + + emit Transfer(from, to, tokenId); + + _afterTokenTransfer(from, to, tokenId, 1); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits an {Approval} event. + */ + function _approve(address to, uint256 tokenId) internal virtual { + _tokenApprovals[tokenId] = to; + emit Approval(ERC721.ownerOf(tokenId), to, tokenId); + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Emits an {ApprovalForAll} event. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + require(owner != operator, "ERC721: approve to caller"); + _operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Reverts if the `tokenId` has not been minted yet. + */ + function _requireMinted(uint256 tokenId) internal view virtual { + require(_exists(tokenId), "ERC721: invalid token ID"); + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received( + address from, + address to, + uint256 tokenId, + bytes memory data + ) private returns (bool) { + if (to.isContract()) { + try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { + return retval == IERC721Receiver.onERC721Received.selector; + } catch (bytes memory reason) { + if (reason.length == 0) { + revert("ERC721: transfer to non ERC721Receiver implementer"); + } else { + /// @solidity memory-safe-assembly + assembly { + revert(add(32, reason), mload(reason)) + } + } + } + } else { + return true; + } + } + + /** + * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is + * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. + * - When `from` is zero, the tokens will be minted for `to`. + * - When `to` is zero, ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * - `batchSize` is non-zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} + + /** + * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is + * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. + * - When `from` is zero, the tokens were minted for `to`. + * - When `to` is zero, ``from``'s tokens were burned. + * - `from` and `to` are never both zero. + * - `batchSize` is non-zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} + + /** + * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. + * + * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant + * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such + * that `ownerOf(tokenId)` is `a`. + */ + // solhint-disable-next-line func-name-mixedcase + function __unsafe_increaseBalance(address account, uint256 amount) internal { + _balances[account] += amount; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721.sol new file mode 100644 index 00000000..293f5668 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721.sol @@ -0,0 +1,132 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) + +pragma solidity ^0.8.0; + +import "../../utils/introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721 is IERC165 { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 + * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must + * understand this adds an external call which potentially creates a reentrancy vulnerability. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool approved) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721Receiver.sol new file mode 100644 index 00000000..de672099 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721Receiver.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) + +pragma solidity ^0.8.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721Receiver { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. + */ + function onERC721Received( + address operator, + address from, + uint256 tokenId, + bytes calldata data + ) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol new file mode 100644 index 00000000..0dc7dae2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../../utils/Context.sol"; + +/** + * @title ERC721 Burnable Token + * @dev ERC721 Token that can be burned (destroyed). + */ +abstract contract ERC721Burnable is Context, ERC721 { + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); + _burn(tokenId); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol new file mode 100644 index 00000000..4312d984 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Consecutive.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../../interfaces/IERC2309.sol"; +import "../../../utils/Checkpoints.sol"; +import "../../../utils/structs/BitMaps.sol"; + +/** + * @dev Implementation of the ERC2309 "Consecutive Transfer Extension" as defined in + * https://eips.ethereum.org/EIPS/eip-2309[EIP-2309]. + * + * This extension allows the minting of large batches of tokens, during contract construction only. For upgradeable + * contracts this implies that batch minting is only available during proxy deployment, and not in subsequent upgrades. + * These batches are limited to 5000 tokens at a time by default to accommodate off-chain indexers. + * + * Using this extension removes the ability to mint single tokens during contract construction. This ability is + * regained after construction. During construction, only batch minting is allowed. + * + * IMPORTANT: This extension bypasses the hooks {_beforeTokenTransfer} and {_afterTokenTransfer} for tokens minted in + * batch. When using this extension, you should consider the {_beforeConsecutiveTokenTransfer} and + * {_afterConsecutiveTokenTransfer} hooks in addition to {_beforeTokenTransfer} and {_afterTokenTransfer}. + * + * IMPORTANT: When overriding {_afterTokenTransfer}, be careful about call ordering. {ownerOf} may return invalid + * values during the {_afterTokenTransfer} execution if the super call is not called first. To be safe, execute the + * super call before your custom logic. + * + * _Available since v4.8._ + */ +abstract contract ERC721Consecutive is IERC2309, ERC721 { + using BitMaps for BitMaps.BitMap; + using Checkpoints for Checkpoints.Trace160; + + Checkpoints.Trace160 private _sequentialOwnership; + BitMaps.BitMap private _sequentialBurn; + + /** + * @dev Maximum size of a batch of consecutive tokens. This is designed to limit stress on off-chain indexing + * services that have to record one entry per token, and have protections against "unreasonably large" batches of + * tokens. + * + * NOTE: Overriding the default value of 5000 will not cause on-chain issues, but may result in the asset not being + * correctly supported by off-chain indexing services (including marketplaces). + */ + function _maxBatchSize() internal view virtual returns (uint96) { + return 5000; + } + + /** + * @dev See {ERC721-_ownerOf}. Override that checks the sequential ownership structure for tokens that have + * been minted as part of a batch, and not yet transferred. + */ + function _ownerOf(uint256 tokenId) internal view virtual override returns (address) { + address owner = super._ownerOf(tokenId); + + // If token is owned by the core, or beyond consecutive range, return base value + if (owner != address(0) || tokenId > type(uint96).max) { + return owner; + } + + // Otherwise, check the token was not burned, and fetch ownership from the anchors + // Note: no need for safe cast, we know that tokenId <= type(uint96).max + return _sequentialBurn.get(tokenId) ? address(0) : address(_sequentialOwnership.lowerLookup(uint96(tokenId))); + } + + /** + * @dev Mint a batch of tokens of length `batchSize` for `to`. Returns the token id of the first token minted in the + * batch; if `batchSize` is 0, returns the number of consecutive ids minted so far. + * + * Requirements: + * + * - `batchSize` must not be greater than {_maxBatchSize}. + * - The function is called in the constructor of the contract (directly or indirectly). + * + * CAUTION: Does not emit a `Transfer` event. This is ERC721 compliant as long as it is done inside of the + * constructor, which is enforced by this function. + * + * CAUTION: Does not invoke `onERC721Received` on the receiver. + * + * Emits a {IERC2309-ConsecutiveTransfer} event. + */ + function _mintConsecutive(address to, uint96 batchSize) internal virtual returns (uint96) { + uint96 first = _totalConsecutiveSupply(); + + // minting a batch of size 0 is a no-op + if (batchSize > 0) { + require(!Address.isContract(address(this)), "ERC721Consecutive: batch minting restricted to constructor"); + require(to != address(0), "ERC721Consecutive: mint to the zero address"); + require(batchSize <= _maxBatchSize(), "ERC721Consecutive: batch too large"); + + // hook before + _beforeTokenTransfer(address(0), to, first, batchSize); + + // push an ownership checkpoint & emit event + uint96 last = first + batchSize - 1; + _sequentialOwnership.push(last, uint160(to)); + + // The invariant required by this function is preserved because the new sequentialOwnership checkpoint + // is attributing ownership of `batchSize` new tokens to account `to`. + __unsafe_increaseBalance(to, batchSize); + + emit ConsecutiveTransfer(first, last, address(0), to); + + // hook after + _afterTokenTransfer(address(0), to, first, batchSize); + } + + return first; + } + + /** + * @dev See {ERC721-_mint}. Override version that restricts normal minting to after construction. + * + * Warning: Using {ERC721Consecutive} prevents using {_mint} during construction in favor of {_mintConsecutive}. + * After construction, {_mintConsecutive} is no longer available and {_mint} becomes available. + */ + function _mint(address to, uint256 tokenId) internal virtual override { + require(Address.isContract(address(this)), "ERC721Consecutive: can't mint during construction"); + super._mint(to, tokenId); + } + + /** + * @dev See {ERC721-_afterTokenTransfer}. Burning of tokens that have been sequentially minted must be explicit. + */ + function _afterTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + if ( + to == address(0) && // if we burn + firstTokenId < _totalConsecutiveSupply() && // and the tokenId was minted in a batch + !_sequentialBurn.get(firstTokenId) // and the token was never marked as burnt + ) { + require(batchSize == 1, "ERC721Consecutive: batch burn not supported"); + _sequentialBurn.set(firstTokenId); + } + super._afterTokenTransfer(from, to, firstTokenId, batchSize); + } + + function _totalConsecutiveSupply() private view returns (uint96) { + (bool exists, uint96 latestId, ) = _sequentialOwnership.latestCheckpoint(); + return exists ? latestId + 1 : 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Enumerable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Enumerable.sol new file mode 100644 index 00000000..aab81a9f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Enumerable.sol @@ -0,0 +1,159 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "./IERC721Enumerable.sol"; + +/** + * @dev This implements an optional extension of {ERC721} defined in the EIP that adds + * enumerability of all the token ids in the contract as well as all token ids owned by each + * account. + */ +abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { + // Mapping from owner to list of owned token IDs + mapping(address => mapping(uint256 => uint256)) private _ownedTokens; + + // Mapping from token ID to index of the owner tokens list + mapping(uint256 => uint256) private _ownedTokensIndex; + + // Array with all token ids, used for enumeration + uint256[] private _allTokens; + + // Mapping from token id to position in the allTokens array + mapping(uint256 => uint256) private _allTokensIndex; + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { + return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { + require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); + return _ownedTokens[owner][index]; + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + return _allTokens.length; + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view virtual override returns (uint256) { + require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); + return _allTokens[index]; + } + + /** + * @dev See {ERC721-_beforeTokenTransfer}. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + super._beforeTokenTransfer(from, to, firstTokenId, batchSize); + + if (batchSize > 1) { + // Will only trigger during construction. Batch transferring (minting) is not available afterwards. + revert("ERC721Enumerable: consecutive transfers not supported"); + } + + uint256 tokenId = firstTokenId; + + if (from == address(0)) { + _addTokenToAllTokensEnumeration(tokenId); + } else if (from != to) { + _removeTokenFromOwnerEnumeration(from, tokenId); + } + if (to == address(0)) { + _removeTokenFromAllTokensEnumeration(tokenId); + } else if (to != from) { + _addTokenToOwnerEnumeration(to, tokenId); + } + } + + /** + * @dev Private function to add a token to this extension's ownership-tracking data structures. + * @param to address representing the new owner of the given token ID + * @param tokenId uint256 ID of the token to be added to the tokens list of the given address + */ + function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { + uint256 length = ERC721.balanceOf(to); + _ownedTokens[to][length] = tokenId; + _ownedTokensIndex[tokenId] = length; + } + + /** + * @dev Private function to add a token to this extension's token tracking data structures. + * @param tokenId uint256 ID of the token to be added to the tokens list + */ + function _addTokenToAllTokensEnumeration(uint256 tokenId) private { + _allTokensIndex[tokenId] = _allTokens.length; + _allTokens.push(tokenId); + } + + /** + * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that + * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for + * gas optimizations e.g. when performing a transfer operation (avoiding double writes). + * This has O(1) time complexity, but alters the order of the _ownedTokens array. + * @param from address representing the previous owner of the given token ID + * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address + */ + function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { + // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; + uint256 tokenIndex = _ownedTokensIndex[tokenId]; + + // When the token to delete is the last token, the swap operation is unnecessary + if (tokenIndex != lastTokenIndex) { + uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; + + _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + } + + // This also deletes the contents at the last position of the array + delete _ownedTokensIndex[tokenId]; + delete _ownedTokens[from][lastTokenIndex]; + } + + /** + * @dev Private function to remove a token from this extension's token tracking data structures. + * This has O(1) time complexity, but alters the order of the _allTokens array. + * @param tokenId uint256 ID of the token to be removed from the tokens list + */ + function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { + // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = _allTokens.length - 1; + uint256 tokenIndex = _allTokensIndex[tokenId]; + + // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so + // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding + // an 'if' statement (like in _removeTokenFromOwnerEnumeration) + uint256 lastTokenId = _allTokens[lastTokenIndex]; + + _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + + // This also deletes the contents at the last position of the array + delete _allTokensIndex[tokenId]; + _allTokens.pop(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Pausable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Pausable.sol new file mode 100644 index 00000000..e8eb4b10 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Pausable.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/extensions/ERC721Pausable.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../../security/Pausable.sol"; + +/** + * @dev ERC721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract unpausable. + */ +abstract contract ERC721Pausable is ERC721, Pausable { + /** + * @dev See {ERC721-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + super._beforeTokenTransfer(from, to, firstTokenId, batchSize); + + require(!paused(), "ERC721Pausable: token transfer while paused"); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol new file mode 100644 index 00000000..298e3420 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../common/ERC2981.sol"; +import "../../../utils/introspection/ERC165.sol"; + +/** + * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment + * information. + * + * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for + * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. + * + * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to + * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. + * + * _Available since v4.5._ + */ +abstract contract ERC721Royalty is ERC2981, ERC721 { + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { + return super.supportsInterface(interfaceId); + } + + /** + * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. + */ + function _burn(uint256 tokenId) internal virtual override { + super._burn(tokenId); + _resetTokenRoyalty(tokenId); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol new file mode 100644 index 00000000..c9d79b6b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721URIStorage.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../../interfaces/IERC4906.sol"; + +/** + * @dev ERC721 token with storage based token URI management. + */ +abstract contract ERC721URIStorage is IERC4906, ERC721 { + using Strings for uint256; + + // Optional mapping for token URIs + mapping(uint256 => string) private _tokenURIs; + + /** + * @dev See {IERC165-supportsInterface} + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { + return interfaceId == bytes4(0x49064906) || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + _requireMinted(tokenId); + + string memory _tokenURI = _tokenURIs[tokenId]; + string memory base = _baseURI(); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return _tokenURI; + } + // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). + if (bytes(_tokenURI).length > 0) { + return string(abi.encodePacked(base, _tokenURI)); + } + + return super.tokenURI(tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Emits {MetadataUpdate}. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); + _tokenURIs[tokenId] = _tokenURI; + + emit MetadataUpdate(tokenId); + } + + /** + * @dev See {ERC721-_burn}. This override additionally checks to see if a + * token-specific URI was set for the token, and if so, it deletes the token URI from + * the storage mapping. + */ + function _burn(uint256 tokenId) internal virtual override { + super._burn(tokenId); + + if (bytes(_tokenURIs[tokenId]).length != 0) { + delete _tokenURIs[tokenId]; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol new file mode 100644 index 00000000..55b82c1c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Votes.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../../governance/utils/Votes.sol"; + +/** + * @dev Extension of ERC721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts + * as 1 vote unit. + * + * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost + * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of + * the votes in governance decisions, or they can delegate to themselves to be their own representative. + * + * _Available since v4.5._ + */ +abstract contract ERC721Votes is ERC721, Votes { + /** + * @dev See {ERC721-_afterTokenTransfer}. Adjusts votes when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _afterTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + _transferVotingUnits(from, to, batchSize); + super._afterTokenTransfer(from, to, firstTokenId, batchSize); + } + + /** + * @dev Returns the balance of `account`. + * + * WARNING: Overriding this function will likely result in incorrect vote tracking. + */ + function _getVotingUnits(address account) internal view virtual override returns (uint256) { + return balanceOf(account); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Wrapper.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Wrapper.sol new file mode 100644 index 00000000..c7ff06de --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Wrapper.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Wrapper.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; + +/** + * @dev Extension of the ERC721 token contract to support token wrapping. + * + * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is useful + * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow the + * wrapping of an existing "basic" ERC721 into a governance token. + * + * _Available since v4.9.0_ + */ +abstract contract ERC721Wrapper is ERC721, IERC721Receiver { + IERC721 private immutable _underlying; + + constructor(IERC721 underlyingToken) { + _underlying = underlyingToken; + } + + /** + * @dev Allow a user to deposit underlying tokens and mint the corresponding tokenIds. + */ + function depositFor(address account, uint256[] memory tokenIds) public virtual returns (bool) { + uint256 length = tokenIds.length; + for (uint256 i = 0; i < length; ++i) { + uint256 tokenId = tokenIds[i]; + + // This is an "unsafe" transfer that doesn't call any hook on the receiver. With underlying() being trusted + // (by design of this contract) and no other contracts expected to be called from there, we are safe. + // slither-disable-next-line reentrancy-no-eth + underlying().transferFrom(_msgSender(), address(this), tokenId); + _safeMint(account, tokenId); + } + + return true; + } + + /** + * @dev Allow a user to burn wrapped tokens and withdraw the corresponding tokenIds of the underlying tokens. + */ + function withdrawTo(address account, uint256[] memory tokenIds) public virtual returns (bool) { + uint256 length = tokenIds.length; + for (uint256 i = 0; i < length; ++i) { + uint256 tokenId = tokenIds[i]; + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Wrapper: caller is not token owner or approved"); + _burn(tokenId); + // Checks were already performed at this point, and there's no way to retake ownership or approval from + // the wrapped tokenId after this point, so it's safe to remove the reentrancy check for the next line. + // slither-disable-next-line reentrancy-no-eth + underlying().safeTransferFrom(address(this), account, tokenId); + } + + return true; + } + + /** + * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC721 transfers to + * this contract. + * + * In case there's data attached, it validates that the operator is this contract, so only trusted data + * is accepted from {depositFor}. + * + * WARNING: Doesn't work with unsafe transfers (eg. {IERC721-transferFrom}). Use {ERC721Wrapper-_recover} + * for recovering in that scenario. + */ + function onERC721Received( + address, + address from, + uint256 tokenId, + bytes memory + ) public virtual override returns (bytes4) { + require(address(underlying()) == _msgSender(), "ERC721Wrapper: caller is not underlying"); + _safeMint(from, tokenId); + return IERC721Receiver.onERC721Received.selector; + } + + /** + * @dev Mint a wrapped token to cover any underlyingToken that would have been transferred by mistake. Internal + * function that can be exposed with access control if desired. + */ + function _recover(address account, uint256 tokenId) internal virtual returns (uint256) { + require(underlying().ownerOf(tokenId) == address(this), "ERC721Wrapper: wrapper is not token owner"); + _safeMint(account, tokenId); + return tokenId; + } + + /** + * @dev Returns the underlying token. + */ + function underlying() public view virtual returns (IERC721) { + return _underlying; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Enumerable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Enumerable.sol new file mode 100644 index 00000000..dfea427b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Enumerable.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) + +pragma solidity ^0.8.0; + +import "../IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Enumerable is IERC721 { + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Metadata.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Metadata.sol new file mode 100644 index 00000000..dca77ba5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Metadata.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) + +pragma solidity ^0.8.0; + +import "../IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Metadata is IERC721 { + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol new file mode 100644 index 00000000..c6aa7c56 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/draft-ERC721Votes.sol) + +pragma solidity ^0.8.0; + +// ERC721Votes was marked as draft due to the EIP-712 dependency. +// EIP-712 is Final as of 2022-08-11. This file is deprecated. + +import "./ERC721Votes.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol new file mode 100644 index 00000000..da53b88b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol @@ -0,0 +1,132 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol) + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../extensions/ERC721Enumerable.sol"; +import "../extensions/ERC721Burnable.sol"; +import "../extensions/ERC721Pausable.sol"; +import "../../../access/AccessControlEnumerable.sol"; +import "../../../utils/Context.sol"; +import "../../../utils/Counters.sol"; + +/** + * @dev {ERC721} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * - token ID and URI autogeneration + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC721PresetMinterPauserAutoId is + Context, + AccessControlEnumerable, + ERC721Enumerable, + ERC721Burnable, + ERC721Pausable +{ + using Counters for Counters.Counter; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + Counters.Counter private _tokenIdTracker; + + string private _baseTokenURI; + + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * Token URIs will be autogenerated based on `baseURI` and their token IDs. + * See {ERC721-tokenURI}. + */ + constructor(string memory name, string memory symbol, string memory baseTokenURI) ERC721(name, symbol) { + _baseTokenURI = baseTokenURI; + + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + } + + function _baseURI() internal view virtual override returns (string memory) { + return _baseTokenURI; + } + + /** + * @dev Creates a new token for `to`. Its token ID will be automatically + * assigned (and available on the emitted {IERC721-Transfer} event), and the token + * URI autogenerated based on the base URI passed at construction. + * + * See {ERC721-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); + + // We cannot just use balanceOf to create the new tokenId because tokens + // can be burned (destroyed), so we need a separate counter. + _mint(to, _tokenIdTracker.current()); + _tokenIdTracker.increment(); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { + super._beforeTokenTransfer(from, to, firstTokenId, batchSize); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(AccessControlEnumerable, ERC721, ERC721Enumerable) returns (bool) { + return super.supportsInterface(interfaceId); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/utils/ERC721Holder.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/utils/ERC721Holder.sol new file mode 100644 index 00000000..f18ad8a1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/utils/ERC721Holder.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol) + +pragma solidity ^0.8.0; + +import "../IERC721Receiver.sol"; + +/** + * @dev Implementation of the {IERC721Receiver} interface. + * + * Accepts all token transfers. + * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. + */ +contract ERC721Holder is IERC721Receiver { + /** + * @dev See {IERC721Receiver-onERC721Received}. + * + * Always returns `IERC721Receiver.onERC721Received.selector`. + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + return this.onERC721Received.selector; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol new file mode 100644 index 00000000..c9a17d86 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol @@ -0,0 +1,514 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/ERC777.sol) + +pragma solidity ^0.8.0; + +import "./IERC777.sol"; +import "./IERC777Recipient.sol"; +import "./IERC777Sender.sol"; +import "../ERC20/IERC20.sol"; +import "../../utils/Address.sol"; +import "../../utils/Context.sol"; +import "../../utils/introspection/IERC1820Registry.sol"; + +/** + * @dev Implementation of the {IERC777} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * + * Support for ERC20 is included in this contract, as specified by the EIP: both + * the ERC777 and ERC20 interfaces can be safely used when interacting with it. + * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token + * movements. + * + * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there + * are no special restrictions in the amount of tokens that created, moved, or + * destroyed. This makes integration with ERC20 applications seamless. + * + * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. + */ +contract ERC777 is Context, IERC777, IERC20 { + using Address for address; + + IERC1820Registry internal constant _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); + + mapping(address => uint256) private _balances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender"); + bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient"); + + // This isn't ever read from - it's only used to respond to the defaultOperators query. + address[] private _defaultOperatorsArray; + + // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators). + mapping(address => bool) private _defaultOperators; + + // For each account, a mapping of its operators and revoked default operators. + mapping(address => mapping(address => bool)) private _operators; + mapping(address => mapping(address => bool)) private _revokedDefaultOperators; + + // ERC20-allowances + mapping(address => mapping(address => uint256)) private _allowances; + + /** + * @dev `defaultOperators` may be an empty array. + */ + constructor(string memory name_, string memory symbol_, address[] memory defaultOperators_) { + _name = name_; + _symbol = symbol_; + + _defaultOperatorsArray = defaultOperators_; + for (uint256 i = 0; i < defaultOperators_.length; i++) { + _defaultOperators[defaultOperators_[i]] = true; + } + + // register interfaces + _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC777Token"), address(this)); + _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC20Token"), address(this)); + } + + /** + * @dev See {IERC777-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC777-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {ERC20-decimals}. + * + * Always returns 18, as per the + * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility). + */ + function decimals() public pure virtual returns (uint8) { + return 18; + } + + /** + * @dev See {IERC777-granularity}. + * + * This implementation always returns `1`. + */ + function granularity() public view virtual override returns (uint256) { + return 1; + } + + /** + * @dev See {IERC777-totalSupply}. + */ + function totalSupply() public view virtual override(IERC20, IERC777) returns (uint256) { + return _totalSupply; + } + + /** + * @dev Returns the amount of tokens owned by an account (`tokenHolder`). + */ + function balanceOf(address tokenHolder) public view virtual override(IERC20, IERC777) returns (uint256) { + return _balances[tokenHolder]; + } + + /** + * @dev See {IERC777-send}. + * + * Also emits a {IERC20-Transfer} event for ERC20 compatibility. + */ + function send(address recipient, uint256 amount, bytes memory data) public virtual override { + _send(_msgSender(), recipient, amount, data, "", true); + } + + /** + * @dev See {IERC20-transfer}. + * + * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient} + * interface if it is a contract. + * + * Also emits a {Sent} event. + */ + function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + _send(_msgSender(), recipient, amount, "", "", false); + return true; + } + + /** + * @dev See {IERC777-burn}. + * + * Also emits a {IERC20-Transfer} event for ERC20 compatibility. + */ + function burn(uint256 amount, bytes memory data) public virtual override { + _burn(_msgSender(), amount, data, ""); + } + + /** + * @dev See {IERC777-isOperatorFor}. + */ + function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) { + return + operator == tokenHolder || + (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) || + _operators[tokenHolder][operator]; + } + + /** + * @dev See {IERC777-authorizeOperator}. + */ + function authorizeOperator(address operator) public virtual override { + require(_msgSender() != operator, "ERC777: authorizing self as operator"); + + if (_defaultOperators[operator]) { + delete _revokedDefaultOperators[_msgSender()][operator]; + } else { + _operators[_msgSender()][operator] = true; + } + + emit AuthorizedOperator(operator, _msgSender()); + } + + /** + * @dev See {IERC777-revokeOperator}. + */ + function revokeOperator(address operator) public virtual override { + require(operator != _msgSender(), "ERC777: revoking self as operator"); + + if (_defaultOperators[operator]) { + _revokedDefaultOperators[_msgSender()][operator] = true; + } else { + delete _operators[_msgSender()][operator]; + } + + emit RevokedOperator(operator, _msgSender()); + } + + /** + * @dev See {IERC777-defaultOperators}. + */ + function defaultOperators() public view virtual override returns (address[] memory) { + return _defaultOperatorsArray; + } + + /** + * @dev See {IERC777-operatorSend}. + * + * Emits {Sent} and {IERC20-Transfer} events. + */ + function operatorSend( + address sender, + address recipient, + uint256 amount, + bytes memory data, + bytes memory operatorData + ) public virtual override { + require(isOperatorFor(_msgSender(), sender), "ERC777: caller is not an operator for holder"); + _send(sender, recipient, amount, data, operatorData, true); + } + + /** + * @dev See {IERC777-operatorBurn}. + * + * Emits {Burned} and {IERC20-Transfer} events. + */ + function operatorBurn( + address account, + uint256 amount, + bytes memory data, + bytes memory operatorData + ) public virtual override { + require(isOperatorFor(_msgSender(), account), "ERC777: caller is not an operator for holder"); + _burn(account, amount, data, operatorData); + } + + /** + * @dev See {IERC20-allowance}. + * + * Note that operator and allowance concepts are orthogonal: operators may + * not have allowance, and accounts with allowance may not be operators + * themselves. + */ + function allowance(address holder, address spender) public view virtual override returns (uint256) { + return _allowances[holder][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on + * `transferFrom`. This is semantically equivalent to an infinite approval. + * + * Note that accounts cannot have allowance issued by their operators. + */ + function approve(address spender, uint256 value) public virtual override returns (bool) { + address holder = _msgSender(); + _approve(holder, spender, value); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * NOTE: Does not update the allowance if the current allowance + * is the maximum `uint256`. + * + * Note that operator and allowance concepts are orthogonal: operators cannot + * call `transferFrom` (unless they have allowance), and accounts with + * allowance cannot call `operatorSend` (unless they are operators). + * + * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events. + */ + function transferFrom(address holder, address recipient, uint256 amount) public virtual override returns (bool) { + address spender = _msgSender(); + _spendAllowance(holder, spender, amount); + _send(holder, recipient, amount, "", "", false); + return true; + } + + /** + * @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * If a send hook is registered for `account`, the corresponding function + * will be called with the caller address as the `operator` and with + * `userData` and `operatorData`. + * + * See {IERC777Sender} and {IERC777Recipient}. + * + * Emits {Minted} and {IERC20-Transfer} events. + * + * Requirements + * + * - `account` cannot be the zero address. + * - if `account` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function _mint(address account, uint256 amount, bytes memory userData, bytes memory operatorData) internal virtual { + _mint(account, amount, userData, operatorData, true); + } + + /** + * @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * If `requireReceptionAck` is set to true, and if a send hook is + * registered for `account`, the corresponding function will be called with + * `operator`, `data` and `operatorData`. + * + * See {IERC777Sender} and {IERC777Recipient}. + * + * Emits {Minted} and {IERC20-Transfer} events. + * + * Requirements + * + * - `account` cannot be the zero address. + * - if `account` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function _mint( + address account, + uint256 amount, + bytes memory userData, + bytes memory operatorData, + bool requireReceptionAck + ) internal virtual { + require(account != address(0), "ERC777: mint to the zero address"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, address(0), account, amount); + + // Update state variables + _totalSupply += amount; + _balances[account] += amount; + + _callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck); + + emit Minted(operator, account, amount, userData, operatorData); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Send tokens + * @param from address token holder address + * @param to address recipient address + * @param amount uint256 amount of tokens to transfer + * @param userData bytes extra information provided by the token holder (if any) + * @param operatorData bytes extra information provided by the operator (if any) + * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient + */ + function _send( + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData, + bool requireReceptionAck + ) internal virtual { + require(from != address(0), "ERC777: transfer from the zero address"); + require(to != address(0), "ERC777: transfer to the zero address"); + + address operator = _msgSender(); + + _callTokensToSend(operator, from, to, amount, userData, operatorData); + + _move(operator, from, to, amount, userData, operatorData); + + _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck); + } + + /** + * @dev Burn tokens + * @param from address token holder address + * @param amount uint256 amount of tokens to burn + * @param data bytes extra information provided by the token holder + * @param operatorData bytes extra information provided by the operator (if any) + */ + function _burn(address from, uint256 amount, bytes memory data, bytes memory operatorData) internal virtual { + require(from != address(0), "ERC777: burn from the zero address"); + + address operator = _msgSender(); + + _callTokensToSend(operator, from, address(0), amount, data, operatorData); + + _beforeTokenTransfer(operator, from, address(0), amount); + + // Update state variables + uint256 fromBalance = _balances[from]; + require(fromBalance >= amount, "ERC777: burn amount exceeds balance"); + unchecked { + _balances[from] = fromBalance - amount; + } + _totalSupply -= amount; + + emit Burned(operator, from, amount, data, operatorData); + emit Transfer(from, address(0), amount); + } + + function _move( + address operator, + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData + ) private { + _beforeTokenTransfer(operator, from, to, amount); + + uint256 fromBalance = _balances[from]; + require(fromBalance >= amount, "ERC777: transfer amount exceeds balance"); + unchecked { + _balances[from] = fromBalance - amount; + } + _balances[to] += amount; + + emit Sent(operator, from, to, amount, userData, operatorData); + emit Transfer(from, to, amount); + } + + /** + * @dev See {ERC20-_approve}. + * + * Note that accounts cannot have allowance issued by their operators. + */ + function _approve(address holder, address spender, uint256 value) internal virtual { + require(holder != address(0), "ERC777: approve from the zero address"); + require(spender != address(0), "ERC777: approve to the zero address"); + + _allowances[holder][spender] = value; + emit Approval(holder, spender, value); + } + + /** + * @dev Call from.tokensToSend() if the interface is registered + * @param operator address operator requesting the transfer + * @param from address token holder address + * @param to address recipient address + * @param amount uint256 amount of tokens to transfer + * @param userData bytes extra information provided by the token holder (if any) + * @param operatorData bytes extra information provided by the operator (if any) + */ + function _callTokensToSend( + address operator, + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData + ) private { + address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH); + if (implementer != address(0)) { + IERC777Sender(implementer).tokensToSend(operator, from, to, amount, userData, operatorData); + } + } + + /** + * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but + * tokensReceived() was not registered for the recipient + * @param operator address operator requesting the transfer + * @param from address token holder address + * @param to address recipient address + * @param amount uint256 amount of tokens to transfer + * @param userData bytes extra information provided by the token holder (if any) + * @param operatorData bytes extra information provided by the operator (if any) + * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient + */ + function _callTokensReceived( + address operator, + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData, + bool requireReceptionAck + ) private { + address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH); + if (implementer != address(0)) { + IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData); + } else if (requireReceptionAck) { + require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"); + } + } + + /** + * @dev Updates `owner` s allowance for `spender` based on spent `amount`. + * + * Does not update the allowance amount in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Might emit an {IERC20-Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { + uint256 currentAllowance = allowance(owner, spender); + if (currentAllowance != type(uint256).max) { + require(currentAllowance >= amount, "ERC777: insufficient allowance"); + unchecked { + _approve(owner, spender, currentAllowance - amount); + } + } + } + + /** + * @dev Hook that is called before any token transfer. This includes + * calls to {send}, {transfer}, {operatorSend}, {transferFrom}, minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * will be to transferred to `to`. + * - when `from` is zero, `amount` tokens will be minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address operator, address from, address to, uint256 amount) internal virtual {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777.sol new file mode 100644 index 00000000..2d4f6df8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777.sol @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/IERC777.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC777Token standard as defined in the EIP. + * + * This contract uses the + * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let + * token holders and recipients react to token movements by using setting implementers + * for the associated interfaces in said registry. See {IERC1820Registry} and + * {ERC1820Implementer}. + */ +interface IERC777 { + /** + * @dev Emitted when `amount` tokens are created by `operator` and assigned to `to`. + * + * Note that some additional user `data` and `operatorData` can be logged in the event. + */ + event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); + + /** + * @dev Emitted when `operator` destroys `amount` tokens from `account`. + * + * Note that some additional user `data` and `operatorData` can be logged in the event. + */ + event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); + + /** + * @dev Emitted when `operator` is made operator for `tokenHolder`. + */ + event AuthorizedOperator(address indexed operator, address indexed tokenHolder); + + /** + * @dev Emitted when `operator` is revoked its operator status for `tokenHolder`. + */ + event RevokedOperator(address indexed operator, address indexed tokenHolder); + + /** + * @dev Returns the name of the token. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the smallest part of the token that is not divisible. This + * means all token operations (creation, movement and destruction) must have + * amounts that are a multiple of this number. + * + * For most token contracts, this value will equal 1. + */ + function granularity() external view returns (uint256); + + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by an account (`owner`). + */ + function balanceOf(address owner) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * If send or receive hooks are registered for the caller and `recipient`, + * the corresponding functions will be called with `data` and empty + * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. + * + * Emits a {Sent} event. + * + * Requirements + * + * - the caller must have at least `amount` tokens. + * - `recipient` cannot be the zero address. + * - if `recipient` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function send(address recipient, uint256 amount, bytes calldata data) external; + + /** + * @dev Destroys `amount` tokens from the caller's account, reducing the + * total supply. + * + * If a send hook is registered for the caller, the corresponding function + * will be called with `data` and empty `operatorData`. See {IERC777Sender}. + * + * Emits a {Burned} event. + * + * Requirements + * + * - the caller must have at least `amount` tokens. + */ + function burn(uint256 amount, bytes calldata data) external; + + /** + * @dev Returns true if an account is an operator of `tokenHolder`. + * Operators can send and burn tokens on behalf of their owners. All + * accounts are their own operator. + * + * See {operatorSend} and {operatorBurn}. + */ + function isOperatorFor(address operator, address tokenHolder) external view returns (bool); + + /** + * @dev Make an account an operator of the caller. + * + * See {isOperatorFor}. + * + * Emits an {AuthorizedOperator} event. + * + * Requirements + * + * - `operator` cannot be calling address. + */ + function authorizeOperator(address operator) external; + + /** + * @dev Revoke an account's operator status for the caller. + * + * See {isOperatorFor} and {defaultOperators}. + * + * Emits a {RevokedOperator} event. + * + * Requirements + * + * - `operator` cannot be calling address. + */ + function revokeOperator(address operator) external; + + /** + * @dev Returns the list of default operators. These accounts are operators + * for all token holders, even if {authorizeOperator} was never called on + * them. + * + * This list is immutable, but individual holders may revoke these via + * {revokeOperator}, in which case {isOperatorFor} will return false. + */ + function defaultOperators() external view returns (address[] memory); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must + * be an operator of `sender`. + * + * If send or receive hooks are registered for `sender` and `recipient`, + * the corresponding functions will be called with `data` and + * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. + * + * Emits a {Sent} event. + * + * Requirements + * + * - `sender` cannot be the zero address. + * - `sender` must have at least `amount` tokens. + * - the caller must be an operator for `sender`. + * - `recipient` cannot be the zero address. + * - if `recipient` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function operatorSend( + address sender, + address recipient, + uint256 amount, + bytes calldata data, + bytes calldata operatorData + ) external; + + /** + * @dev Destroys `amount` tokens from `account`, reducing the total supply. + * The caller must be an operator of `account`. + * + * If a send hook is registered for `account`, the corresponding function + * will be called with `data` and `operatorData`. See {IERC777Sender}. + * + * Emits a {Burned} event. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + * - the caller must be an operator for `account`. + */ + function operatorBurn(address account, uint256 amount, bytes calldata data, bytes calldata operatorData) external; + + event Sent( + address indexed operator, + address indexed from, + address indexed to, + uint256 amount, + bytes data, + bytes operatorData + ); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Recipient.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Recipient.sol new file mode 100644 index 00000000..717dd8f8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Recipient.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. + * + * Accounts can be notified of {IERC777} tokens being sent to them by having a + * contract implement this interface (contract holders can be their own + * implementer) and registering it on the + * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * + * See {IERC1820Registry} and {ERC1820Implementer}. + */ +interface IERC777Recipient { + /** + * @dev Called by an {IERC777} token contract whenever tokens are being + * moved or created into a registered account (`to`). The type of operation + * is conveyed by `from` being the zero address or not. + * + * This call occurs _after_ the token contract's state is updated, so + * {IERC777-balanceOf}, etc., can be used to query the post-operation state. + * + * This function may revert to prevent the operation from being executed. + */ + function tokensReceived( + address operator, + address from, + address to, + uint256 amount, + bytes calldata userData, + bytes calldata operatorData + ) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Sender.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Sender.sol new file mode 100644 index 00000000..969e3e36 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Sender.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Sender.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC777TokensSender standard as defined in the EIP. + * + * {IERC777} Token holders can be notified of operations performed on their + * tokens by having a contract implement this interface (contract holders can be + * their own implementer) and registering it on the + * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * + * See {IERC1820Registry} and {ERC1820Implementer}. + */ +interface IERC777Sender { + /** + * @dev Called by an {IERC777} token contract whenever a registered holder's + * (`from`) tokens are about to be moved or destroyed. The type of operation + * is conveyed by `to` being the zero address or not. + * + * This call occurs _before_ the token contract's state is updated, so + * {IERC777-balanceOf}, etc., can be used to query the pre-operation state. + * + * This function may revert to prevent the operation from being executed. + */ + function tokensToSend( + address operator, + address from, + address to, + uint256 amount, + bytes calldata userData, + bytes calldata operatorData + ) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol new file mode 100644 index 00000000..8bd4b79a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC777/presets/ERC777PresetFixedSupply.sol) +pragma solidity ^0.8.0; + +import "../ERC777.sol"; + +/** + * @dev {ERC777} token, including: + * + * - Preminted initial supply + * - No access control mechanism (for minting/pausing) and hence no governance + * + * _Available since v3.4._ + */ +contract ERC777PresetFixedSupply is ERC777 { + /** + * @dev Mints `initialSupply` amount of token and transfers them to `owner`. + * + * See {ERC777-constructor}. + */ + constructor( + string memory name, + string memory symbol, + address[] memory defaultOperators, + uint256 initialSupply, + address owner + ) ERC777(name, symbol, defaultOperators) { + _mint(owner, initialSupply, "", ""); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/common/ERC2981.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/common/ERC2981.sol new file mode 100644 index 00000000..7d47b6c7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/token/common/ERC2981.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) + +pragma solidity ^0.8.0; + +import "../../interfaces/IERC2981.sol"; +import "../../utils/introspection/ERC165.sol"; + +/** + * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. + * + * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for + * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. + * + * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the + * fee is specified in basis points by default. + * + * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to + * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. + * + * _Available since v4.5._ + */ +abstract contract ERC2981 is IERC2981, ERC165 { + struct RoyaltyInfo { + address receiver; + uint96 royaltyFraction; + } + + RoyaltyInfo private _defaultRoyaltyInfo; + mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { + return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @inheritdoc IERC2981 + */ + function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { + RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; + + if (royalty.receiver == address(0)) { + royalty = _defaultRoyaltyInfo; + } + + uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); + + return (royalty.receiver, royaltyAmount); + } + + /** + * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a + * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an + * override. + */ + function _feeDenominator() internal pure virtual returns (uint96) { + return 10000; + } + + /** + * @dev Sets the royalty information that all ids in this contract will default to. + * + * Requirements: + * + * - `receiver` cannot be the zero address. + * - `feeNumerator` cannot be greater than the fee denominator. + */ + function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { + require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); + require(receiver != address(0), "ERC2981: invalid receiver"); + + _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); + } + + /** + * @dev Removes default royalty information. + */ + function _deleteDefaultRoyalty() internal virtual { + delete _defaultRoyaltyInfo; + } + + /** + * @dev Sets the royalty information for a specific token id, overriding the global default. + * + * Requirements: + * + * - `receiver` cannot be the zero address. + * - `feeNumerator` cannot be greater than the fee denominator. + */ + function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { + require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); + require(receiver != address(0), "ERC2981: Invalid parameters"); + + _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); + } + + /** + * @dev Resets royalty information for the token id back to the global default. + */ + function _resetTokenRoyalty(uint256 tokenId) internal virtual { + delete _tokenRoyaltyInfo[tokenId]; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol new file mode 100644 index 00000000..0791a66a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol @@ -0,0 +1,244 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) + +pragma solidity ^0.8.1; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * + * Furthermore, `isContract` will also return true if the target contract within + * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, + * which only has an effect at the end of a transaction. + * ==== + * + * [IMPORTANT] + * ==== + * You shouldn't rely on `isContract` to protect against flash loan attacks! + * + * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets + * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract + * constructor. + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize/address.code.length, which returns 0 + // for contracts in construction, since the code is only stored at the end + // of the constructor execution. + + return account.code.length > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + (bool success, ) = recipient.call{value: amount}(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain `call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value, + string memory errorMessage + ) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + (bool success, bytes memory returndata) = target.call{value: value}(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall( + address target, + bytes memory data, + string memory errorMessage + ) internal view returns (bytes memory) { + (bool success, bytes memory returndata) = target.staticcall(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + (bool success, bytes memory returndata) = target.delegatecall(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling + * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. + * + * _Available since v4.8._ + */ + function verifyCallResultFromTarget( + address target, + bool success, + bytes memory returndata, + string memory errorMessage + ) internal view returns (bytes memory) { + if (success) { + if (returndata.length == 0) { + // only check isContract if the call was successful and the return data is empty + // otherwise we already know that it was a contract + require(isContract(target), "Address: call to non-contract"); + } + return returndata; + } else { + _revert(returndata, errorMessage); + } + } + + /** + * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the + * revert reason or using the provided one. + * + * _Available since v4.3._ + */ + function verifyCallResult( + bool success, + bytes memory returndata, + string memory errorMessage + ) internal pure returns (bytes memory) { + if (success) { + return returndata; + } else { + _revert(returndata, errorMessage); + } + } + + function _revert(bytes memory returndata, string memory errorMessage) private pure { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + /// @solidity memory-safe-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol new file mode 100644 index 00000000..66fe322b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Arrays.sol) + +pragma solidity ^0.8.0; + +import "./StorageSlot.sol"; +import "./math/Math.sol"; + +/** + * @dev Collection of functions related to array types. + */ +library Arrays { + using StorageSlot for bytes32; + + /** + * @dev Searches a sorted `array` and returns the first index that contains + * a value greater or equal to `element`. If no such index exists (i.e. all + * values in the array are strictly less than `element`), the array length is + * returned. Time complexity O(log n). + * + * `array` is expected to be sorted in ascending order, and to contain no + * repeated elements. + */ + function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { + if (array.length == 0) { + return 0; + } + + uint256 low = 0; + uint256 high = array.length; + + while (low < high) { + uint256 mid = Math.average(low, high); + + // Note that mid will always be strictly less than high (i.e. it will be a valid array index) + // because Math.average rounds down (it does integer division with truncation). + if (unsafeAccess(array, mid).value > element) { + high = mid; + } else { + low = mid + 1; + } + } + + // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. + if (low > 0 && unsafeAccess(array, low - 1).value == element) { + return low - 1; + } else { + return low; + } + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { + bytes32 slot; + // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` + // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. + + /// @solidity memory-safe-assembly + assembly { + mstore(0, arr.slot) + slot := add(keccak256(0, 0x20), pos) + } + return slot.getAddressSlot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { + bytes32 slot; + // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` + // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. + + /// @solidity memory-safe-assembly + assembly { + mstore(0, arr.slot) + slot := add(keccak256(0, 0x20), pos) + } + return slot.getBytes32Slot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { + bytes32 slot; + // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` + // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. + + /// @solidity memory-safe-assembly + assembly { + mstore(0, arr.slot) + slot := add(keccak256(0, 0x20), pos) + } + return slot.getUint256Slot(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol new file mode 100644 index 00000000..bc606a2a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.6) (utils/Base64.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Provides a set of functions to operate with Base64 strings. + * + * _Available since v4.5._ + */ +library Base64 { + /** + * @dev Base64 Encoding/Decoding Table + */ + string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + /** + * @dev Converts a `bytes` to its Bytes64 `string` representation. + */ + function encode(bytes memory data) internal pure returns (string memory) { + /** + * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence + * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol + */ + if (data.length == 0) return ""; + + // Loads the table into memory + string memory table = _TABLE; + + // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter + // and split into 4 numbers of 6 bits. + // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up + // - `data.length + 2` -> Round up + // - `/ 3` -> Number of 3-bytes chunks + // - `4 *` -> 4 characters for each chunk + string memory result = new string(4 * ((data.length + 2) / 3)); + + /// @solidity memory-safe-assembly + assembly { + // Prepare the lookup table (skip the first "length" byte) + let tablePtr := add(table, 1) + + // Prepare result pointer, jump over length + let resultPtr := add(result, 0x20) + let dataPtr := data + let endPtr := add(data, mload(data)) + + // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and + // set it to zero to make sure no dirty bytes are read in that section. + let afterPtr := add(endPtr, 0x20) + let afterCache := mload(afterPtr) + mstore(afterPtr, 0x00) + + // Run over the input, 3 bytes at a time + for { + + } lt(dataPtr, endPtr) { + + } { + // Advance 3 bytes + dataPtr := add(dataPtr, 3) + let input := mload(dataPtr) + + // To write each character, shift the 3 byte (24 bits) chunk + // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) + // and apply logical AND with 0x3F to bitmask the least significant 6 bits. + // Use this as an index into the lookup table, mload an entire word + // so the desired character is in the least significant byte, and + // mstore8 this least significant byte into the result and continue. + + mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + + mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + + mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + + mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + } + + // Reset the value that was cached + mstore(afterPtr, afterCache) + + // When data `bytes` is not exactly 3 bytes long + // it is padded with `=` characters at the end + switch mod(mload(data), 3) + case 1 { + mstore8(sub(resultPtr, 1), 0x3d) + mstore8(sub(resultPtr, 2), 0x3d) + } + case 2 { + mstore8(sub(resultPtr, 1), 0x3d) + } + } + + return result; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol new file mode 100644 index 00000000..9d4f0f96 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol @@ -0,0 +1,560 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Checkpoints.sol) +// This file was procedurally generated from scripts/generate/templates/Checkpoints.js. + +pragma solidity ^0.8.0; + +import "./math/Math.sol"; +import "./math/SafeCast.sol"; + +/** + * @dev This library defines the `History` struct, for checkpointing values as they change at different points in + * time, and later looking up past values by block number. See {Votes} as an example. + * + * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new + * checkpoint for the current transaction block using the {push} function. + * + * _Available since v4.5._ + */ +library Checkpoints { + struct History { + Checkpoint[] _checkpoints; + } + + struct Checkpoint { + uint32 _blockNumber; + uint224 _value; + } + + /** + * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one + * before it is returned, or zero otherwise. Because the number returned corresponds to that at the end of the + * block, the requested block number must be in the past, excluding the current block. + */ + function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { + require(blockNumber < block.number, "Checkpoints: block not yet mined"); + uint32 key = SafeCast.toUint32(blockNumber); + + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one + * before it is returned, or zero otherwise. Similar to {upperLookup} but optimized for the case when the searched + * checkpoint is probably "recent", defined as being among the last sqrt(N) checkpoints where N is the number of + * checkpoints. + */ + function getAtProbablyRecentBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { + require(blockNumber < block.number, "Checkpoints: block not yet mined"); + uint32 key = SafeCast.toUint32(blockNumber); + + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._blockNumber) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block. + * + * Returns previous value and new value. + */ + function push(History storage self, uint256 value) internal returns (uint256, uint256) { + return _insert(self._checkpoints, SafeCast.toUint32(block.number), SafeCast.toUint224(value)); + } + + /** + * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will + * be set to `op(latest, delta)`. + * + * Returns previous value and new value. + */ + function push( + History storage self, + function(uint256, uint256) view returns (uint256) op, + uint256 delta + ) internal returns (uint256, uint256) { + return push(self, op(latest(self), delta)); + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(History storage self) internal view returns (uint224) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint( + History storage self + ) internal view returns (bool exists, uint32 _blockNumber, uint224 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._blockNumber, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoint. + */ + function length(History storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert(Checkpoint[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { + uint256 pos = self.length; + + if (pos > 0) { + // Copying to memory is important here. + Checkpoint memory last = _unsafeAccess(self, pos - 1); + + // Checkpoint keys must be non-decreasing. + require(last._blockNumber <= key, "Checkpoint: decreasing keys"); + + // Update or push new checkpoint + if (last._blockNumber == key) { + _unsafeAccess(self, pos - 1)._value = value; + } else { + self.push(Checkpoint({_blockNumber: key, _value: value})); + } + return (last._value, value); + } else { + self.push(Checkpoint({_blockNumber: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._blockNumber > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._blockNumber < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess(Checkpoint[] storage self, uint256 pos) private pure returns (Checkpoint storage result) { + assembly { + mstore(0, self.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } + + struct Trace224 { + Checkpoint224[] _checkpoints; + } + + struct Checkpoint224 { + uint32 _key; + uint224 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + */ + function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + */ + function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + */ + function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + */ + function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace224 storage self) internal view returns (uint224) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoint. + */ + function length(Trace224 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { + uint256 pos = self.length; + + if (pos > 0) { + // Copying to memory is important here. + Checkpoint224 memory last = _unsafeAccess(self, pos - 1); + + // Checkpoint keys must be non-decreasing. + require(last._key <= key, "Checkpoint: decreasing keys"); + + // Update or push new checkpoint + if (last._key == key) { + _unsafeAccess(self, pos - 1)._value = value; + } else { + self.push(Checkpoint224({_key: key, _value: value})); + } + return (last._value, value); + } else { + self.push(Checkpoint224({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint224[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint224[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint224[] storage self, + uint256 pos + ) private pure returns (Checkpoint224 storage result) { + assembly { + mstore(0, self.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } + + struct Trace160 { + Checkpoint160[] _checkpoints; + } + + struct Checkpoint160 { + uint96 _key; + uint160 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + */ + function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + */ + function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + */ + function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + */ + function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace160 storage self) internal view returns (uint160) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoint. + */ + function length(Trace160 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) { + uint256 pos = self.length; + + if (pos > 0) { + // Copying to memory is important here. + Checkpoint160 memory last = _unsafeAccess(self, pos - 1); + + // Checkpoint keys must be non-decreasing. + require(last._key <= key, "Checkpoint: decreasing keys"); + + // Update or push new checkpoint + if (last._key == key) { + _unsafeAccess(self, pos - 1)._value = value; + } else { + self.push(Checkpoint160({_key: key, _value: value})); + } + return (last._value, value); + } else { + self.push(Checkpoint160({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint160[] storage self, + uint96 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint160[] storage self, + uint96 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint160[] storage self, + uint256 pos + ) private pure returns (Checkpoint160 storage result) { + assembly { + mstore(0, self.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Context.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Context.sol new file mode 100644 index 00000000..8e410bda --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Context.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes calldata) { + return msg.data; + } + + function _contextSuffixLength() internal view virtual returns (uint256) { + return 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol new file mode 100644 index 00000000..8a4f2a2e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) + +pragma solidity ^0.8.0; + +/** + * @title Counters + * @author Matt Condon (@shrugs) + * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number + * of elements in a mapping, issuing ERC721 ids, or counting request ids. + * + * Include with `using Counters for Counters.Counter;` + */ +library Counters { + struct Counter { + // This variable should never be directly accessed by users of the library: interactions must be restricted to + // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add + // this feature: see https://github.com/ethereum/solidity/issues/4637 + uint256 _value; // default: 0 + } + + function current(Counter storage counter) internal view returns (uint256) { + return counter._value; + } + + function increment(Counter storage counter) internal { + unchecked { + counter._value += 1; + } + } + + function decrement(Counter storage counter) internal { + uint256 value = counter._value; + require(value > 0, "Counter: decrement overflow"); + unchecked { + counter._value = value - 1; + } + } + + function reset(Counter storage counter) internal { + counter._value = 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Create2.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Create2.sol new file mode 100644 index 00000000..29fa9732 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Create2.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Create2.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. + * `CREATE2` can be used to compute in advance the address where a smart + * contract will be deployed, which allows for interesting new mechanisms known + * as 'counterfactual interactions'. + * + * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more + * information. + */ +library Create2 { + /** + * @dev Deploys a contract using `CREATE2`. The address where the contract + * will be deployed can be known in advance via {computeAddress}. + * + * The bytecode for a contract can be obtained from Solidity with + * `type(contractName).creationCode`. + * + * Requirements: + * + * - `bytecode` must not be empty. + * - `salt` must have not been used for `bytecode` already. + * - the factory must have a balance of at least `amount`. + * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. + */ + function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { + require(address(this).balance >= amount, "Create2: insufficient balance"); + require(bytecode.length != 0, "Create2: bytecode length is zero"); + /// @solidity memory-safe-assembly + assembly { + addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) + } + require(addr != address(0), "Create2: Failed on deploy"); + } + + /** + * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the + * `bytecodeHash` or `salt` will result in a new destination address. + */ + function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) { + return computeAddress(salt, bytecodeHash, address(this)); + } + + /** + * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at + * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. + */ + function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { + /// @solidity memory-safe-assembly + assembly { + let ptr := mload(0x40) // Get free memory pointer + + // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | + // |-------------------|---------------------------------------------------------------------------| + // | bytecodeHash | CCCCCCCCCCCCC...CC | + // | salt | BBBBBBBBBBBBB...BB | + // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | + // | 0xFF | FF | + // |-------------------|---------------------------------------------------------------------------| + // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | + // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | + + mstore(add(ptr, 0x40), bytecodeHash) + mstore(add(ptr, 0x20), salt) + mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes + let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff + mstore8(start, 0xff) + addr := keccak256(start, 85) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Multicall.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Multicall.sol new file mode 100644 index 00000000..76bdc678 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Multicall.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.5) (utils/Multicall.sol) + +pragma solidity ^0.8.0; + +import "./Address.sol"; +import "./Context.sol"; + +/** + * @dev Provides a function to batch together multiple calls in a single external call. + * + * Consider any assumption about calldata validation performed by the sender may be violated if it's not especially + * careful about sending transactions invoking {multicall}. For example, a relay address that filters function + * selectors won't filter calls nested within a {multicall} operation. + * + * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}). + * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data` + * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of + * {_msgSender} are not propagated to subcalls. + * + * _Available since v4.1._ + */ +abstract contract Multicall is Context { + /** + * @dev Receives and executes a batch of function calls on this contract. + * @custom:oz-upgrades-unsafe-allow-reachable delegatecall + */ + function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) { + bytes memory context = msg.sender == _msgSender() + ? new bytes(0) + : msg.data[msg.data.length - _contextSuffixLength():]; + + results = new bytes[](data.length); + for (uint256 i = 0; i < data.length; i++) { + results[i] = Address.functionDelegateCall(address(this), bytes.concat(data[i], context)); + } + return results; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/ShortStrings.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/ShortStrings.sol new file mode 100644 index 00000000..90a05499 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/ShortStrings.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) + +pragma solidity ^0.8.8; + +import "./StorageSlot.sol"; + +// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | +// | length | 0x BB | +type ShortString is bytes32; + +/** + * @dev This library provides functions to convert short memory strings + * into a `ShortString` type that can be used as an immutable variable. + * + * Strings of arbitrary length can be optimized using this library if + * they are short enough (up to 31 bytes) by packing them with their + * length (1 byte) in a single EVM word (32 bytes). Additionally, a + * fallback mechanism can be used for every other case. + * + * Usage example: + * + * ```solidity + * contract Named { + * using ShortStrings for *; + * + * ShortString private immutable _name; + * string private _nameFallback; + * + * constructor(string memory contractName) { + * _name = contractName.toShortStringWithFallback(_nameFallback); + * } + * + * function name() external view returns (string memory) { + * return _name.toStringWithFallback(_nameFallback); + * } + * } + * ``` + */ +library ShortStrings { + // Used as an identifier for strings longer than 31 bytes. + bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; + + error StringTooLong(string str); + error InvalidShortString(); + + /** + * @dev Encode a string of at most 31 chars into a `ShortString`. + * + * This will trigger a `StringTooLong` error is the input string is too long. + */ + function toShortString(string memory str) internal pure returns (ShortString) { + bytes memory bstr = bytes(str); + if (bstr.length > 31) { + revert StringTooLong(str); + } + return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); + } + + /** + * @dev Decode a `ShortString` back to a "normal" string. + */ + function toString(ShortString sstr) internal pure returns (string memory) { + uint256 len = byteLength(sstr); + // using `new string(len)` would work locally but is not memory safe. + string memory str = new string(32); + /// @solidity memory-safe-assembly + assembly { + mstore(str, len) + mstore(add(str, 0x20), sstr) + } + return str; + } + + /** + * @dev Return the length of a `ShortString`. + */ + function byteLength(ShortString sstr) internal pure returns (uint256) { + uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; + if (result > 31) { + revert InvalidShortString(); + } + return result; + } + + /** + * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. + */ + function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { + if (bytes(value).length < 32) { + return toShortString(value); + } else { + StorageSlot.getStringSlot(store).value = value; + return ShortString.wrap(_FALLBACK_SENTINEL); + } + } + + /** + * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. + */ + function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { + if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + return toString(value); + } else { + return store; + } + } + + /** + * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. + * + * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of + * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. + */ + function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { + if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + return byteLength(value); + } else { + return bytes(store).length; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/StorageSlot.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/StorageSlot.sol new file mode 100644 index 00000000..df62b8f7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/StorageSlot.sol @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) +// This file was procedurally generated from scripts/generate/templates/StorageSlot.js. + +pragma solidity ^0.8.0; + +/** + * @dev Library for reading and writing primitive types to specific storage slots. + * + * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. + * This library helps with reading and writing to such slots without the need for inline assembly. + * + * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. + * + * Example usage to set ERC1967 implementation slot: + * ```solidity + * contract ERC1967 { + * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + * + * function _getImplementation() internal view returns (address) { + * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; + * } + * + * function _setImplementation(address newImplementation) internal { + * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); + * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; + * } + * } + * ``` + * + * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ + * _Available since v4.9 for `string`, `bytes`._ + */ +library StorageSlot { + struct AddressSlot { + address value; + } + + struct BooleanSlot { + bool value; + } + + struct Bytes32Slot { + bytes32 value; + } + + struct Uint256Slot { + uint256 value; + } + + struct StringSlot { + string value; + } + + struct BytesSlot { + bytes value; + } + + /** + * @dev Returns an `AddressSlot` with member `value` located at `slot`. + */ + function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `BooleanSlot` with member `value` located at `slot`. + */ + function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. + */ + function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `Uint256Slot` with member `value` located at `slot`. + */ + function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `StringSlot` with member `value` located at `slot`. + */ + function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `StringSlot` representation of the string storage pointer `store`. + */ + function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := store.slot + } + } + + /** + * @dev Returns an `BytesSlot` with member `value` located at `slot`. + */ + function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. + */ + function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := store.slot + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol new file mode 100644 index 00000000..657ebd66 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) + +pragma solidity ^0.8.0; + +import "./math/Math.sol"; +import "./math/SignedMath.sol"; + +/** + * @dev String operations. + */ +library Strings { + bytes16 private constant _SYMBOLS = "0123456789abcdef"; + uint8 private constant _ADDRESS_LENGTH = 20; + + /** + * @dev Converts a `uint256` to its ASCII `string` decimal representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + unchecked { + uint256 length = Math.log10(value) + 1; + string memory buffer = new string(length); + uint256 ptr; + /// @solidity memory-safe-assembly + assembly { + ptr := add(buffer, add(32, length)) + } + while (true) { + ptr--; + /// @solidity memory-safe-assembly + assembly { + mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) + } + value /= 10; + if (value == 0) break; + } + return buffer; + } + } + + /** + * @dev Converts a `int256` to its ASCII `string` decimal representation. + */ + function toString(int256 value) internal pure returns (string memory) { + return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. + */ + function toHexString(uint256 value) internal pure returns (string memory) { + unchecked { + return toHexString(value, Math.log256(value) + 1); + } + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. + */ + function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { + bytes memory buffer = new bytes(2 * length + 2); + buffer[0] = "0"; + buffer[1] = "x"; + for (uint256 i = 2 * length + 1; i > 1; --i) { + buffer[i] = _SYMBOLS[value & 0xf]; + value >>= 4; + } + require(value == 0, "Strings: hex length insufficient"); + return string(buffer); + } + + /** + * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. + */ + function toHexString(address addr) internal pure returns (string memory) { + return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); + } + + /** + * @dev Returns true if the two strings are equal. + */ + function equal(string memory a, string memory b) internal pure returns (bool) { + return keccak256(bytes(a)) == keccak256(bytes(b)); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol new file mode 100644 index 00000000..04f86645 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Timers.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Tooling for timepoints, timers and delays + * + * CAUTION: This file is deprecated as of 4.9 and will be removed in the next major release. + */ +library Timers { + struct Timestamp { + uint64 _deadline; + } + + function getDeadline(Timestamp memory timer) internal pure returns (uint64) { + return timer._deadline; + } + + function setDeadline(Timestamp storage timer, uint64 timestamp) internal { + timer._deadline = timestamp; + } + + function reset(Timestamp storage timer) internal { + timer._deadline = 0; + } + + function isUnset(Timestamp memory timer) internal pure returns (bool) { + return timer._deadline == 0; + } + + function isStarted(Timestamp memory timer) internal pure returns (bool) { + return timer._deadline > 0; + } + + function isPending(Timestamp memory timer) internal view returns (bool) { + return timer._deadline > block.timestamp; + } + + function isExpired(Timestamp memory timer) internal view returns (bool) { + return isStarted(timer) && timer._deadline <= block.timestamp; + } + + struct BlockNumber { + uint64 _deadline; + } + + function getDeadline(BlockNumber memory timer) internal pure returns (uint64) { + return timer._deadline; + } + + function setDeadline(BlockNumber storage timer, uint64 timestamp) internal { + timer._deadline = timestamp; + } + + function reset(BlockNumber storage timer) internal { + timer._deadline = 0; + } + + function isUnset(BlockNumber memory timer) internal pure returns (bool) { + return timer._deadline == 0; + } + + function isStarted(BlockNumber memory timer) internal pure returns (bool) { + return timer._deadline > 0; + } + + function isPending(BlockNumber memory timer) internal view returns (bool) { + return timer._deadline > block.number; + } + + function isExpired(BlockNumber memory timer) internal view returns (bool) { + return isStarted(timer) && timer._deadline <= block.number; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol new file mode 100644 index 00000000..4326e5b6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) + +pragma solidity ^0.8.0; + +import "../Strings.sol"; + +/** + * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. + * + * These functions can be used to verify that a message was signed by the holder + * of the private keys of a given address. + */ +library ECDSA { + enum RecoverError { + NoError, + InvalidSignature, + InvalidSignatureLength, + InvalidSignatureS, + InvalidSignatureV // Deprecated in v4.8 + } + + function _throwError(RecoverError error) private pure { + if (error == RecoverError.NoError) { + return; // no error: do nothing + } else if (error == RecoverError.InvalidSignature) { + revert("ECDSA: invalid signature"); + } else if (error == RecoverError.InvalidSignatureLength) { + revert("ECDSA: invalid signature length"); + } else if (error == RecoverError.InvalidSignatureS) { + revert("ECDSA: invalid signature 's' value"); + } + } + + /** + * @dev Returns the address that signed a hashed message (`hash`) with + * `signature` or error string. This address can then be used for verification purposes. + * + * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: + * this function rejects them by requiring the `s` value to be in the lower + * half order, and the `v` value to be either 27 or 28. + * + * IMPORTANT: `hash` _must_ be the result of a hash operation for the + * verification to be secure: it is possible to craft signatures that + * recover to arbitrary addresses for non-hashed data. A safe way to ensure + * this is by receiving a hash of the original message (which may otherwise + * be too long), and then calling {toEthSignedMessageHash} on it. + * + * Documentation for signature generation: + * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] + * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] + * + * _Available since v4.3._ + */ + function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { + if (signature.length == 65) { + bytes32 r; + bytes32 s; + uint8 v; + // ecrecover takes the signature parameters, and the only way to get them + // currently is to use assembly. + /// @solidity memory-safe-assembly + assembly { + r := mload(add(signature, 0x20)) + s := mload(add(signature, 0x40)) + v := byte(0, mload(add(signature, 0x60))) + } + return tryRecover(hash, v, r, s); + } else { + return (address(0), RecoverError.InvalidSignatureLength); + } + } + + /** + * @dev Returns the address that signed a hashed message (`hash`) with + * `signature`. This address can then be used for verification purposes. + * + * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: + * this function rejects them by requiring the `s` value to be in the lower + * half order, and the `v` value to be either 27 or 28. + * + * IMPORTANT: `hash` _must_ be the result of a hash operation for the + * verification to be secure: it is possible to craft signatures that + * recover to arbitrary addresses for non-hashed data. A safe way to ensure + * this is by receiving a hash of the original message (which may otherwise + * be too long), and then calling {toEthSignedMessageHash} on it. + */ + function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { + (address recovered, RecoverError error) = tryRecover(hash, signature); + _throwError(error); + return recovered; + } + + /** + * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. + * + * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] + * + * _Available since v4.3._ + */ + function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { + bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); + uint8 v = uint8((uint256(vs) >> 255) + 27); + return tryRecover(hash, v, r, s); + } + + /** + * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. + * + * _Available since v4.2._ + */ + function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { + (address recovered, RecoverError error) = tryRecover(hash, r, vs); + _throwError(error); + return recovered; + } + + /** + * @dev Overload of {ECDSA-tryRecover} that receives the `v`, + * `r` and `s` signature fields separately. + * + * _Available since v4.3._ + */ + function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { + // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature + // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines + // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most + // signatures from current libraries generate a unique signature with an s-value in the lower half order. + // + // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value + // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or + // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept + // these malleable signatures as well. + if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { + return (address(0), RecoverError.InvalidSignatureS); + } + + // If the signature is valid (and not malleable), return the signer address + address signer = ecrecover(hash, v, r, s); + if (signer == address(0)) { + return (address(0), RecoverError.InvalidSignature); + } + + return (signer, RecoverError.NoError); + } + + /** + * @dev Overload of {ECDSA-recover} that receives the `v`, + * `r` and `s` signature fields separately. + */ + function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { + (address recovered, RecoverError error) = tryRecover(hash, v, r, s); + _throwError(error); + return recovered; + } + + /** + * @dev Returns an Ethereum Signed Message, created from a `hash`. This + * produces hash corresponding to the one signed with the + * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] + * JSON-RPC method as part of EIP-191. + * + * See {recover}. + */ + function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { + // 32 is the length in bytes of hash, + // enforced by the type signature above + /// @solidity memory-safe-assembly + assembly { + mstore(0x00, "\x19Ethereum Signed Message:\n32") + mstore(0x1c, hash) + message := keccak256(0x00, 0x3c) + } + } + + /** + * @dev Returns an Ethereum Signed Message, created from `s`. This + * produces hash corresponding to the one signed with the + * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] + * JSON-RPC method as part of EIP-191. + * + * See {recover}. + */ + function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { + return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); + } + + /** + * @dev Returns an Ethereum Signed Typed Data, created from a + * `domainSeparator` and a `structHash`. This produces hash corresponding + * to the one signed with the + * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] + * JSON-RPC method as part of EIP-712. + * + * See {recover}. + */ + function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { + /// @solidity memory-safe-assembly + assembly { + let ptr := mload(0x40) + mstore(ptr, "\x19\x01") + mstore(add(ptr, 0x02), domainSeparator) + mstore(add(ptr, 0x22), structHash) + data := keccak256(ptr, 0x42) + } + } + + /** + * @dev Returns an Ethereum Signed Data with intended validator, created from a + * `validator` and `data` according to the version 0 of EIP-191. + * + * See {recover}. + */ + function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { + return keccak256(abi.encodePacked("\x19\x00", validator, data)); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/EIP712.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/EIP712.sol new file mode 100644 index 00000000..2a0e7348 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/EIP712.sol @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) + +pragma solidity ^0.8.8; + +import "./ECDSA.sol"; +import "../ShortStrings.sol"; +import "../../interfaces/IERC5267.sol"; + +/** + * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. + * + * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, + * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding + * they need in their contracts using a combination of `abi.encode` and `keccak256`. + * + * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding + * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA + * ({_hashTypedDataV4}). + * + * The implementation of the domain separator was designed to be as efficient as possible while still properly updating + * the chain id to protect against replay attacks on an eventual fork of the chain. + * + * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method + * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. + * + * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain + * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the + * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. + * + * _Available since v3.4._ + * + * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment + */ +abstract contract EIP712 is IERC5267 { + using ShortStrings for *; + + bytes32 private constant _TYPE_HASH = + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); + + // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to + // invalidate the cached domain separator if the chain id changes. + bytes32 private immutable _cachedDomainSeparator; + uint256 private immutable _cachedChainId; + address private immutable _cachedThis; + + bytes32 private immutable _hashedName; + bytes32 private immutable _hashedVersion; + + ShortString private immutable _name; + ShortString private immutable _version; + string private _nameFallback; + string private _versionFallback; + + /** + * @dev Initializes the domain separator and parameter caches. + * + * The meaning of `name` and `version` is specified in + * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: + * + * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. + * - `version`: the current major version of the signing domain. + * + * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart + * contract upgrade]. + */ + constructor(string memory name, string memory version) { + _name = name.toShortStringWithFallback(_nameFallback); + _version = version.toShortStringWithFallback(_versionFallback); + _hashedName = keccak256(bytes(name)); + _hashedVersion = keccak256(bytes(version)); + + _cachedChainId = block.chainid; + _cachedDomainSeparator = _buildDomainSeparator(); + _cachedThis = address(this); + } + + /** + * @dev Returns the domain separator for the current chain. + */ + function _domainSeparatorV4() internal view returns (bytes32) { + if (address(this) == _cachedThis && block.chainid == _cachedChainId) { + return _cachedDomainSeparator; + } else { + return _buildDomainSeparator(); + } + } + + function _buildDomainSeparator() private view returns (bytes32) { + return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); + } + + /** + * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this + * function returns the hash of the fully encoded EIP712 message for this domain. + * + * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: + * + * ```solidity + * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( + * keccak256("Mail(address to,string contents)"), + * mailTo, + * keccak256(bytes(mailContents)) + * ))); + * address signer = ECDSA.recover(digest, signature); + * ``` + */ + function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { + return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); + } + + /** + * @dev See {EIP-5267}. + * + * _Available since v4.9._ + */ + function eip712Domain() + public + view + virtual + override + returns ( + bytes1 fields, + string memory name, + string memory version, + uint256 chainId, + address verifyingContract, + bytes32 salt, + uint256[] memory extensions + ) + { + return ( + hex"0f", // 01111 + _name.toStringWithFallback(_nameFallback), + _version.toStringWithFallback(_versionFallback), + block.chainid, + address(this), + bytes32(0), + new uint256[](0) + ); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol new file mode 100644 index 00000000..19806eac --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) + +pragma solidity ^0.8.0; + +/** + * @dev These functions deal with verification of Merkle Tree proofs. + * + * The tree and the proofs can be generated using our + * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. + * You will find a quickstart guide in the readme. + * + * WARNING: You should avoid using leaf values that are 64 bytes long prior to + * hashing, or use a hash function other than keccak256 for hashing leaves. + * This is because the concatenation of a sorted pair of internal nodes in + * the merkle tree could be reinterpreted as a leaf value. + * OpenZeppelin's JavaScript library generates merkle trees that are safe + * against this attack out of the box. + */ +library MerkleProof { + /** + * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree + * defined by `root`. For this, a `proof` must be provided, containing + * sibling hashes on the branch from the leaf to the root of the tree. Each + * pair of leaves and each pair of pre-images are assumed to be sorted. + */ + function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { + return processProof(proof, leaf) == root; + } + + /** + * @dev Calldata version of {verify} + * + * _Available since v4.7._ + */ + function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { + return processProofCalldata(proof, leaf) == root; + } + + /** + * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up + * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt + * hash matches the root of the tree. When processing the proof, the pairs + * of leafs & pre-images are assumed to be sorted. + * + * _Available since v4.4._ + */ + function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = _hashPair(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Calldata version of {processProof} + * + * _Available since v4.7._ + */ + function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = _hashPair(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by + * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function multiProofVerify( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProof(proof, proofFlags, leaves) == root; + } + + /** + * @dev Calldata version of {multiProofVerify} + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function multiProofVerifyCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProofCalldata(proof, proofFlags, leaves) == root; + } + + /** + * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction + * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another + * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false + * respectively. + * + * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the + * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). + * + * _Available since v4.7._ + */ + function processMultiProof( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofLen = proof.length; + uint256 totalHashes = proofFlags.length; + + // Check proof validity. + require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); + + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](totalHashes); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < totalHashes; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = _hashPair(a, b); + } + + if (totalHashes > 0) { + require(proofPos == proofLen, "MerkleProof: invalid multiproof"); + unchecked { + return hashes[totalHashes - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + /** + * @dev Calldata version of {processMultiProof}. + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function processMultiProofCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofLen = proof.length; + uint256 totalHashes = proofFlags.length; + + // Check proof validity. + require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); + + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](totalHashes); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < totalHashes; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = _hashPair(a, b); + } + + if (totalHashes > 0) { + require(proofPos == proofLen, "MerkleProof: invalid multiproof"); + unchecked { + return hashes[totalHashes - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { + return a < b ? _efficientHash(a, b) : _efficientHash(b, a); + } + + function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { + /// @solidity memory-safe-assembly + assembly { + mstore(0x00, a) + mstore(0x20, b) + value := keccak256(0x00, 0x40) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol new file mode 100644 index 00000000..1815d27f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) + +pragma solidity ^0.8.0; + +import "./ECDSA.sol"; +import "../../interfaces/IERC1271.sol"; + +/** + * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA + * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like + * Argent and Gnosis Safe. + * + * _Available since v4.1._ + */ +library SignatureChecker { + /** + * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the + * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + */ + function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { + (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); + return + (error == ECDSA.RecoverError.NoError && recovered == signer) || + isValidERC1271SignatureNow(signer, hash, signature); + } + + /** + * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated + * against the signer smart contract using ERC1271. + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + */ + function isValidERC1271SignatureNow( + address signer, + bytes32 hash, + bytes memory signature + ) internal view returns (bool) { + (bool success, bytes memory result) = signer.staticcall( + abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) + ); + return (success && + result.length >= 32 && + abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol new file mode 100644 index 00000000..fdae3ba3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol) + +pragma solidity ^0.8.0; + +// EIP-712 is Final as of 2022-08-11. This file is deprecated. + +import "./EIP712.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol new file mode 100644 index 00000000..87f53815 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/escrow/ConditionalEscrow.sol) + +pragma solidity ^0.8.0; + +import "./Escrow.sol"; + +/** + * @title ConditionalEscrow + * @dev Base abstract escrow to only allow withdrawal if a condition is met. + * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. + */ +abstract contract ConditionalEscrow is Escrow { + /** + * @dev Returns whether an address is allowed to withdraw their funds. To be + * implemented by derived contracts. + * @param payee The destination address of the funds. + */ + function withdrawalAllowed(address payee) public view virtual returns (bool); + + function withdraw(address payable payee) public virtual override { + require(withdrawalAllowed(payee), "ConditionalEscrow: payee is not allowed to withdraw"); + super.withdraw(payee); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol new file mode 100644 index 00000000..48dd51ab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (utils/escrow/Escrow.sol) + +pragma solidity ^0.8.0; + +import "../../access/Ownable.sol"; +import "../Address.sol"; + +/** + * @title Escrow + * @dev Base escrow contract, holds funds designated for a payee until they + * withdraw them. + * + * Intended usage: This contract (and derived escrow contracts) should be a + * standalone contract, that only interacts with the contract that instantiated + * it. That way, it is guaranteed that all Ether will be handled according to + * the `Escrow` rules, and there is no need to check for payable functions or + * transfers in the inheritance tree. The contract that uses the escrow as its + * payment method should be its owner, and provide public methods redirecting + * to the escrow's deposit and withdraw. + */ +contract Escrow is Ownable { + using Address for address payable; + + event Deposited(address indexed payee, uint256 weiAmount); + event Withdrawn(address indexed payee, uint256 weiAmount); + + mapping(address => uint256) private _deposits; + + function depositsOf(address payee) public view returns (uint256) { + return _deposits[payee]; + } + + /** + * @dev Stores the sent amount as credit to be withdrawn. + * @param payee The destination address of the funds. + * + * Emits a {Deposited} event. + */ + function deposit(address payee) public payable virtual onlyOwner { + uint256 amount = msg.value; + _deposits[payee] += amount; + emit Deposited(payee, amount); + } + + /** + * @dev Withdraw accumulated balance for a payee, forwarding all gas to the + * recipient. + * + * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. + * Make sure you trust the recipient, or are either following the + * checks-effects-interactions pattern or using {ReentrancyGuard}. + * + * @param payee The address whose funds will be withdrawn and transferred to. + * + * Emits a {Withdrawn} event. + */ + function withdraw(address payable payee) public virtual onlyOwner { + uint256 payment = _deposits[payee]; + + _deposits[payee] = 0; + + payee.sendValue(payment); + + emit Withdrawn(payee, payment); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol new file mode 100644 index 00000000..0e9621fe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/escrow/RefundEscrow.sol) + +pragma solidity ^0.8.0; + +import "./ConditionalEscrow.sol"; + +/** + * @title RefundEscrow + * @dev Escrow that holds funds for a beneficiary, deposited from multiple + * parties. + * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. + * @dev The owner account (that is, the contract that instantiates this + * contract) may deposit, close the deposit period, and allow for either + * withdrawal by the beneficiary, or refunds to the depositors. All interactions + * with `RefundEscrow` will be made through the owner contract. + */ +contract RefundEscrow is ConditionalEscrow { + using Address for address payable; + + enum State { + Active, + Refunding, + Closed + } + + event RefundsClosed(); + event RefundsEnabled(); + + State private _state; + address payable private immutable _beneficiary; + + /** + * @dev Constructor. + * @param beneficiary_ The beneficiary of the deposits. + */ + constructor(address payable beneficiary_) { + require(beneficiary_ != address(0), "RefundEscrow: beneficiary is the zero address"); + _beneficiary = beneficiary_; + _state = State.Active; + } + + /** + * @return The current state of the escrow. + */ + function state() public view virtual returns (State) { + return _state; + } + + /** + * @return The beneficiary of the escrow. + */ + function beneficiary() public view virtual returns (address payable) { + return _beneficiary; + } + + /** + * @dev Stores funds that may later be refunded. + * @param refundee The address funds will be sent to if a refund occurs. + */ + function deposit(address refundee) public payable virtual override { + require(state() == State.Active, "RefundEscrow: can only deposit while active"); + super.deposit(refundee); + } + + /** + * @dev Allows for the beneficiary to withdraw their funds, rejecting + * further deposits. + */ + function close() public virtual onlyOwner { + require(state() == State.Active, "RefundEscrow: can only close while active"); + _state = State.Closed; + emit RefundsClosed(); + } + + /** + * @dev Allows for refunds to take place, rejecting further deposits. + */ + function enableRefunds() public virtual onlyOwner { + require(state() == State.Active, "RefundEscrow: can only enable refunds while active"); + _state = State.Refunding; + emit RefundsEnabled(); + } + + /** + * @dev Withdraws the beneficiary's funds. + */ + function beneficiaryWithdraw() public virtual { + require(state() == State.Closed, "RefundEscrow: beneficiary can only withdraw while closed"); + beneficiary().sendValue(address(this).balance); + } + + /** + * @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a + * 'payee' argument, but we ignore it here since the condition is global, not per-payee. + */ + function withdrawalAllowed(address) public view override returns (bool) { + return state() == State.Refunding; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165.sol new file mode 100644 index 00000000..3bf5613a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) + +pragma solidity ^0.8.0; + +import "./IERC165.sol"; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check + * for the additional interface id that will be supported. For example: + * + * ```solidity + * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); + * } + * ``` + * + * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. + */ +abstract contract ERC165 is IERC165 { + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IERC165).interfaceId; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Checker.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Checker.sol new file mode 100644 index 00000000..4831b652 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Checker.sol @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol) + +pragma solidity ^0.8.0; + +import "./IERC165.sol"; + +/** + * @dev Library used to query support of an interface declared via {IERC165}. + * + * Note that these functions return the actual result of the query: they do not + * `revert` if an interface is not supported. It is up to the caller to decide + * what to do in these cases. + */ +library ERC165Checker { + // As per the EIP-165 spec, no interface should ever match 0xffffffff + bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; + + /** + * @dev Returns true if `account` supports the {IERC165} interface. + */ + function supportsERC165(address account) internal view returns (bool) { + // Any contract that implements ERC165 must explicitly indicate support of + // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid + return + supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) && + !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); + } + + /** + * @dev Returns true if `account` supports the interface defined by + * `interfaceId`. Support for {IERC165} itself is queried automatically. + * + * See {IERC165-supportsInterface}. + */ + function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { + // query support of both ERC165 as per the spec and support of _interfaceId + return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); + } + + /** + * @dev Returns a boolean array where each value corresponds to the + * interfaces passed in and whether they're supported or not. This allows + * you to batch check interfaces for a contract where your expectation + * is that some interfaces may not be supported. + * + * See {IERC165-supportsInterface}. + * + * _Available since v3.4._ + */ + function getSupportedInterfaces( + address account, + bytes4[] memory interfaceIds + ) internal view returns (bool[] memory) { + // an array of booleans corresponding to interfaceIds and whether they're supported or not + bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); + + // query support of ERC165 itself + if (supportsERC165(account)) { + // query support of each interface in interfaceIds + for (uint256 i = 0; i < interfaceIds.length; i++) { + interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]); + } + } + + return interfaceIdsSupported; + } + + /** + * @dev Returns true if `account` supports all the interfaces defined in + * `interfaceIds`. Support for {IERC165} itself is queried automatically. + * + * Batch-querying can lead to gas savings by skipping repeated checks for + * {IERC165} support. + * + * See {IERC165-supportsInterface}. + */ + function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { + // query support of ERC165 itself + if (!supportsERC165(account)) { + return false; + } + + // query support of each interface in interfaceIds + for (uint256 i = 0; i < interfaceIds.length; i++) { + if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) { + return false; + } + } + + // all interfaces supported + return true; + } + + /** + * @notice Query if a contract implements an interface, does not check ERC165 support + * @param account The address of the contract to query for support of an interface + * @param interfaceId The interface identifier, as specified in ERC-165 + * @return true if the contract at account indicates support of the interface with + * identifier interfaceId, false otherwise + * @dev Assumes that account contains a contract that supports ERC165, otherwise + * the behavior of this method is undefined. This precondition can be checked + * with {supportsERC165}. + * + * Some precompiled contracts will falsely indicate support for a given interface, so caution + * should be exercised when using this function. + * + * Interface identification is specified in ERC-165. + */ + function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { + // prepare call + bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); + + // perform static call + bool success; + uint256 returnSize; + uint256 returnValue; + assembly { + success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) + returnSize := returndatasize() + returnValue := mload(0x00) + } + + return success && returnSize >= 0x20 && returnValue > 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol new file mode 100644 index 00000000..c99d9f3f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol) + +pragma solidity ^0.8.0; + +import "./ERC165.sol"; + +/** + * @dev Storage based implementation of the {IERC165} interface. + * + * Contracts may inherit from this and call {_registerInterface} to declare + * their support of an interface. + */ +abstract contract ERC165Storage is ERC165 { + /** + * @dev Mapping of interface ids to whether or not it's supported. + */ + mapping(bytes4 => bool) private _supportedInterfaces; + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; + } + + /** + * @dev Registers the contract as an implementer of the interface defined by + * `interfaceId`. Support of the actual ERC165 interface is automatic and + * registering its interface id is not required. + * + * See {IERC165-supportsInterface}. + * + * Requirements: + * + * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). + */ + function _registerInterface(bytes4 interfaceId) internal virtual { + require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); + _supportedInterfaces[interfaceId] = true; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol new file mode 100644 index 00000000..7a684ede --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC1820Implementer.sol) + +pragma solidity ^0.8.0; + +import "./IERC1820Implementer.sol"; + +/** + * @dev Implementation of the {IERC1820Implementer} interface. + * + * Contracts may inherit from this and call {_registerInterfaceForAddress} to + * declare their willingness to be implementers. + * {IERC1820Registry-setInterfaceImplementer} should then be called for the + * registration to be complete. + * + * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. + */ +contract ERC1820Implementer is IERC1820Implementer { + bytes32 private constant _ERC1820_ACCEPT_MAGIC = keccak256("ERC1820_ACCEPT_MAGIC"); + + mapping(bytes32 => mapping(address => bool)) private _supportedInterfaces; + + /** + * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}. + */ + function canImplementInterfaceForAddress( + bytes32 interfaceHash, + address account + ) public view virtual override returns (bytes32) { + return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00); + } + + /** + * @dev Declares the contract as willing to be an implementer of + * `interfaceHash` for `account`. + * + * See {IERC1820Registry-setInterfaceImplementer} and + * {IERC1820Registry-interfaceHash}. + */ + function _registerInterfaceForAddress(bytes32 interfaceHash, address account) internal virtual { + _supportedInterfaces[interfaceHash][account] = true; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC165.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC165.sol new file mode 100644 index 00000000..e8cdbdbf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC165.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165 { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Implementer.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Implementer.sol new file mode 100644 index 00000000..c4d0b302 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Implementer.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for an ERC1820 implementer, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP]. + * Used by contracts that will be registered as implementers in the + * {IERC1820Registry}. + */ +interface IERC1820Implementer { + /** + * @dev Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract + * implements `interfaceHash` for `account`. + * + * See {IERC1820Registry-setInterfaceImplementer}. + */ + function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Registry.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Registry.sol new file mode 100644 index 00000000..922df040 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Registry.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/IERC1820Registry.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the global ERC1820 Registry, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register + * implementers for interfaces in this registry, as well as query support. + * + * Implementers may be shared by multiple accounts, and can also implement more + * than a single interface for each account. Contracts can implement interfaces + * for themselves, but externally-owned accounts (EOA) must delegate this to a + * contract. + * + * {IERC165} interfaces can also be queried via the registry. + * + * For an in-depth explanation and source code analysis, see the EIP text. + */ +interface IERC1820Registry { + event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); + + event ManagerChanged(address indexed account, address indexed newManager); + + /** + * @dev Sets `newManager` as the manager for `account`. A manager of an + * account is able to set interface implementers for it. + * + * By default, each account is its own manager. Passing a value of `0x0` in + * `newManager` will reset the manager to this initial state. + * + * Emits a {ManagerChanged} event. + * + * Requirements: + * + * - the caller must be the current manager for `account`. + */ + function setManager(address account, address newManager) external; + + /** + * @dev Returns the manager for `account`. + * + * See {setManager}. + */ + function getManager(address account) external view returns (address); + + /** + * @dev Sets the `implementer` contract as ``account``'s implementer for + * `interfaceHash`. + * + * `account` being the zero address is an alias for the caller's address. + * The zero address can also be used in `implementer` to remove an old one. + * + * See {interfaceHash} to learn how these are created. + * + * Emits an {InterfaceImplementerSet} event. + * + * Requirements: + * + * - the caller must be the current manager for `account`. + * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not + * end in 28 zeroes). + * - `implementer` must implement {IERC1820Implementer} and return true when + * queried for support, unless `implementer` is the caller. See + * {IERC1820Implementer-canImplementInterfaceForAddress}. + */ + function setInterfaceImplementer(address account, bytes32 _interfaceHash, address implementer) external; + + /** + * @dev Returns the implementer of `interfaceHash` for `account`. If no such + * implementer is registered, returns the zero address. + * + * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 + * zeroes), `account` will be queried for support of it. + * + * `account` being the zero address is an alias for the caller's address. + */ + function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address); + + /** + * @dev Returns the interface hash for an `interfaceName`, as defined in the + * corresponding + * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. + */ + function interfaceHash(string calldata interfaceName) external pure returns (bytes32); + + /** + * @notice Updates the cache with whether the contract implements an ERC165 interface or not. + * @param account Address of the contract for which to update the cache. + * @param interfaceId ERC165 interface for which to update the cache. + */ + function updateERC165Cache(address account, bytes4 interfaceId) external; + + /** + * @notice Checks whether a contract implements an ERC165 interface or not. + * If the result is not cached a direct lookup on the contract address is performed. + * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling + * {updateERC165Cache} with the contract address. + * @param account Address of the contract to check. + * @param interfaceId ERC165 interface to check. + * @return True if `account` implements `interfaceId`, false otherwise. + */ + function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); + + /** + * @notice Checks whether a contract implements an ERC165 interface or not without using or updating the cache. + * @param account Address of the contract to check. + * @param interfaceId ERC165 interface to check. + * @return True if `account` implements `interfaceId`, false otherwise. + */ + function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol new file mode 100644 index 00000000..551b1a51 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol @@ -0,0 +1,339 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Standard math utilities missing in the Solidity language. + */ +library Math { + enum Rounding { + Down, // Toward negative infinity + Up, // Toward infinity + Zero // Toward zero + } + + /** + * @dev Returns the largest of two numbers. + */ + function max(uint256 a, uint256 b) internal pure returns (uint256) { + return a > b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(uint256 a, uint256 b) internal pure returns (uint256) { + return a < b ? a : b; + } + + /** + * @dev Returns the average of two numbers. The result is rounded towards + * zero. + */ + function average(uint256 a, uint256 b) internal pure returns (uint256) { + // (a + b) / 2 can overflow. + return (a & b) + (a ^ b) / 2; + } + + /** + * @dev Returns the ceiling of the division of two numbers. + * + * This differs from standard division with `/` in that it rounds up instead + * of rounding down. + */ + function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { + // (a + b - 1) / b can overflow on addition, so we distribute. + return a == 0 ? 0 : (a - 1) / b + 1; + } + + /** + * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 + * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) + * with further edits by Uniswap Labs also under MIT license. + */ + function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { + unchecked { + // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use + // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 + // variables such that product = prod1 * 2^256 + prod0. + uint256 prod0; // Least significant 256 bits of the product + uint256 prod1; // Most significant 256 bits of the product + assembly { + let mm := mulmod(x, y, not(0)) + prod0 := mul(x, y) + prod1 := sub(sub(mm, prod0), lt(mm, prod0)) + } + + // Handle non-overflow cases, 256 by 256 division. + if (prod1 == 0) { + // Solidity will revert if denominator == 0, unlike the div opcode on its own. + // The surrounding unchecked block does not change this fact. + // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. + return prod0 / denominator; + } + + // Make sure the result is less than 2^256. Also prevents denominator == 0. + require(denominator > prod1, "Math: mulDiv overflow"); + + /////////////////////////////////////////////// + // 512 by 256 division. + /////////////////////////////////////////////// + + // Make division exact by subtracting the remainder from [prod1 prod0]. + uint256 remainder; + assembly { + // Compute remainder using mulmod. + remainder := mulmod(x, y, denominator) + + // Subtract 256 bit number from 512 bit number. + prod1 := sub(prod1, gt(remainder, prod0)) + prod0 := sub(prod0, remainder) + } + + // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. + // See https://cs.stackexchange.com/q/138556/92363. + + // Does not overflow because the denominator cannot be zero at this stage in the function. + uint256 twos = denominator & (~denominator + 1); + assembly { + // Divide denominator by twos. + denominator := div(denominator, twos) + + // Divide [prod1 prod0] by twos. + prod0 := div(prod0, twos) + + // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. + twos := add(div(sub(0, twos), twos), 1) + } + + // Shift in bits from prod1 into prod0. + prod0 |= prod1 * twos; + + // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such + // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for + // four bits. That is, denominator * inv = 1 mod 2^4. + uint256 inverse = (3 * denominator) ^ 2; + + // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works + // in modular arithmetic, doubling the correct bits in each step. + inverse *= 2 - denominator * inverse; // inverse mod 2^8 + inverse *= 2 - denominator * inverse; // inverse mod 2^16 + inverse *= 2 - denominator * inverse; // inverse mod 2^32 + inverse *= 2 - denominator * inverse; // inverse mod 2^64 + inverse *= 2 - denominator * inverse; // inverse mod 2^128 + inverse *= 2 - denominator * inverse; // inverse mod 2^256 + + // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. + // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is + // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 + // is no longer required. + result = prod0 * inverse; + return result; + } + } + + /** + * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. + */ + function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { + uint256 result = mulDiv(x, y, denominator); + if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { + result += 1; + } + return result; + } + + /** + * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. + * + * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). + */ + function sqrt(uint256 a) internal pure returns (uint256) { + if (a == 0) { + return 0; + } + + // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. + // + // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have + // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. + // + // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` + // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` + // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` + // + // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. + uint256 result = 1 << (log2(a) >> 1); + + // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, + // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at + // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision + // into the expected uint128 result. + unchecked { + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + return min(result, a / result); + } + } + + /** + * @notice Calculates sqrt(a), following the selected rounding direction. + */ + function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = sqrt(a); + return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); + } + } + + /** + * @dev Return the log in base 2, rounded down, of a positive value. + * Returns 0 if given 0. + */ + function log2(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >> 128 > 0) { + value >>= 128; + result += 128; + } + if (value >> 64 > 0) { + value >>= 64; + result += 64; + } + if (value >> 32 > 0) { + value >>= 32; + result += 32; + } + if (value >> 16 > 0) { + value >>= 16; + result += 16; + } + if (value >> 8 > 0) { + value >>= 8; + result += 8; + } + if (value >> 4 > 0) { + value >>= 4; + result += 4; + } + if (value >> 2 > 0) { + value >>= 2; + result += 2; + } + if (value >> 1 > 0) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 2, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log2(value); + return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); + } + } + + /** + * @dev Return the log in base 10, rounded down, of a positive value. + * Returns 0 if given 0. + */ + function log10(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >= 10 ** 64) { + value /= 10 ** 64; + result += 64; + } + if (value >= 10 ** 32) { + value /= 10 ** 32; + result += 32; + } + if (value >= 10 ** 16) { + value /= 10 ** 16; + result += 16; + } + if (value >= 10 ** 8) { + value /= 10 ** 8; + result += 8; + } + if (value >= 10 ** 4) { + value /= 10 ** 4; + result += 4; + } + if (value >= 10 ** 2) { + value /= 10 ** 2; + result += 2; + } + if (value >= 10 ** 1) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 10, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log10(value); + return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); + } + } + + /** + * @dev Return the log in base 256, rounded down, of a positive value. + * Returns 0 if given 0. + * + * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. + */ + function log256(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >> 128 > 0) { + value >>= 128; + result += 16; + } + if (value >> 64 > 0) { + value >>= 64; + result += 8; + } + if (value >> 32 > 0) { + value >>= 32; + result += 4; + } + if (value >> 16 > 0) { + value >>= 16; + result += 2; + } + if (value >> 8 > 0) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 256, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log256(value); + return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeCast.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeCast.sol new file mode 100644 index 00000000..435a5f94 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeCast.sol @@ -0,0 +1,1136 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) +// This file was procedurally generated from scripts/generate/templates/SafeCast.js. + +pragma solidity ^0.8.0; + +/** + * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow + * checks. + * + * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can + * easily result in undesired exploitation or bugs, since developers usually + * assume that overflows raise errors. `SafeCast` restores this intuition by + * reverting the transaction when such an operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + * + * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing + * all math on `uint256` and `int256` and then downcasting. + */ +library SafeCast { + /** + * @dev Returns the downcasted uint248 from uint256, reverting on + * overflow (when the input is greater than largest uint248). + * + * Counterpart to Solidity's `uint248` operator. + * + * Requirements: + * + * - input must fit into 248 bits + * + * _Available since v4.7._ + */ + function toUint248(uint256 value) internal pure returns (uint248) { + require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits"); + return uint248(value); + } + + /** + * @dev Returns the downcasted uint240 from uint256, reverting on + * overflow (when the input is greater than largest uint240). + * + * Counterpart to Solidity's `uint240` operator. + * + * Requirements: + * + * - input must fit into 240 bits + * + * _Available since v4.7._ + */ + function toUint240(uint256 value) internal pure returns (uint240) { + require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits"); + return uint240(value); + } + + /** + * @dev Returns the downcasted uint232 from uint256, reverting on + * overflow (when the input is greater than largest uint232). + * + * Counterpart to Solidity's `uint232` operator. + * + * Requirements: + * + * - input must fit into 232 bits + * + * _Available since v4.7._ + */ + function toUint232(uint256 value) internal pure returns (uint232) { + require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits"); + return uint232(value); + } + + /** + * @dev Returns the downcasted uint224 from uint256, reverting on + * overflow (when the input is greater than largest uint224). + * + * Counterpart to Solidity's `uint224` operator. + * + * Requirements: + * + * - input must fit into 224 bits + * + * _Available since v4.2._ + */ + function toUint224(uint256 value) internal pure returns (uint224) { + require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); + return uint224(value); + } + + /** + * @dev Returns the downcasted uint216 from uint256, reverting on + * overflow (when the input is greater than largest uint216). + * + * Counterpart to Solidity's `uint216` operator. + * + * Requirements: + * + * - input must fit into 216 bits + * + * _Available since v4.7._ + */ + function toUint216(uint256 value) internal pure returns (uint216) { + require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits"); + return uint216(value); + } + + /** + * @dev Returns the downcasted uint208 from uint256, reverting on + * overflow (when the input is greater than largest uint208). + * + * Counterpart to Solidity's `uint208` operator. + * + * Requirements: + * + * - input must fit into 208 bits + * + * _Available since v4.7._ + */ + function toUint208(uint256 value) internal pure returns (uint208) { + require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits"); + return uint208(value); + } + + /** + * @dev Returns the downcasted uint200 from uint256, reverting on + * overflow (when the input is greater than largest uint200). + * + * Counterpart to Solidity's `uint200` operator. + * + * Requirements: + * + * - input must fit into 200 bits + * + * _Available since v4.7._ + */ + function toUint200(uint256 value) internal pure returns (uint200) { + require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits"); + return uint200(value); + } + + /** + * @dev Returns the downcasted uint192 from uint256, reverting on + * overflow (when the input is greater than largest uint192). + * + * Counterpart to Solidity's `uint192` operator. + * + * Requirements: + * + * - input must fit into 192 bits + * + * _Available since v4.7._ + */ + function toUint192(uint256 value) internal pure returns (uint192) { + require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits"); + return uint192(value); + } + + /** + * @dev Returns the downcasted uint184 from uint256, reverting on + * overflow (when the input is greater than largest uint184). + * + * Counterpart to Solidity's `uint184` operator. + * + * Requirements: + * + * - input must fit into 184 bits + * + * _Available since v4.7._ + */ + function toUint184(uint256 value) internal pure returns (uint184) { + require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits"); + return uint184(value); + } + + /** + * @dev Returns the downcasted uint176 from uint256, reverting on + * overflow (when the input is greater than largest uint176). + * + * Counterpart to Solidity's `uint176` operator. + * + * Requirements: + * + * - input must fit into 176 bits + * + * _Available since v4.7._ + */ + function toUint176(uint256 value) internal pure returns (uint176) { + require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits"); + return uint176(value); + } + + /** + * @dev Returns the downcasted uint168 from uint256, reverting on + * overflow (when the input is greater than largest uint168). + * + * Counterpart to Solidity's `uint168` operator. + * + * Requirements: + * + * - input must fit into 168 bits + * + * _Available since v4.7._ + */ + function toUint168(uint256 value) internal pure returns (uint168) { + require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits"); + return uint168(value); + } + + /** + * @dev Returns the downcasted uint160 from uint256, reverting on + * overflow (when the input is greater than largest uint160). + * + * Counterpart to Solidity's `uint160` operator. + * + * Requirements: + * + * - input must fit into 160 bits + * + * _Available since v4.7._ + */ + function toUint160(uint256 value) internal pure returns (uint160) { + require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits"); + return uint160(value); + } + + /** + * @dev Returns the downcasted uint152 from uint256, reverting on + * overflow (when the input is greater than largest uint152). + * + * Counterpart to Solidity's `uint152` operator. + * + * Requirements: + * + * - input must fit into 152 bits + * + * _Available since v4.7._ + */ + function toUint152(uint256 value) internal pure returns (uint152) { + require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits"); + return uint152(value); + } + + /** + * @dev Returns the downcasted uint144 from uint256, reverting on + * overflow (when the input is greater than largest uint144). + * + * Counterpart to Solidity's `uint144` operator. + * + * Requirements: + * + * - input must fit into 144 bits + * + * _Available since v4.7._ + */ + function toUint144(uint256 value) internal pure returns (uint144) { + require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits"); + return uint144(value); + } + + /** + * @dev Returns the downcasted uint136 from uint256, reverting on + * overflow (when the input is greater than largest uint136). + * + * Counterpart to Solidity's `uint136` operator. + * + * Requirements: + * + * - input must fit into 136 bits + * + * _Available since v4.7._ + */ + function toUint136(uint256 value) internal pure returns (uint136) { + require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits"); + return uint136(value); + } + + /** + * @dev Returns the downcasted uint128 from uint256, reverting on + * overflow (when the input is greater than largest uint128). + * + * Counterpart to Solidity's `uint128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v2.5._ + */ + function toUint128(uint256 value) internal pure returns (uint128) { + require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); + return uint128(value); + } + + /** + * @dev Returns the downcasted uint120 from uint256, reverting on + * overflow (when the input is greater than largest uint120). + * + * Counterpart to Solidity's `uint120` operator. + * + * Requirements: + * + * - input must fit into 120 bits + * + * _Available since v4.7._ + */ + function toUint120(uint256 value) internal pure returns (uint120) { + require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits"); + return uint120(value); + } + + /** + * @dev Returns the downcasted uint112 from uint256, reverting on + * overflow (when the input is greater than largest uint112). + * + * Counterpart to Solidity's `uint112` operator. + * + * Requirements: + * + * - input must fit into 112 bits + * + * _Available since v4.7._ + */ + function toUint112(uint256 value) internal pure returns (uint112) { + require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits"); + return uint112(value); + } + + /** + * @dev Returns the downcasted uint104 from uint256, reverting on + * overflow (when the input is greater than largest uint104). + * + * Counterpart to Solidity's `uint104` operator. + * + * Requirements: + * + * - input must fit into 104 bits + * + * _Available since v4.7._ + */ + function toUint104(uint256 value) internal pure returns (uint104) { + require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits"); + return uint104(value); + } + + /** + * @dev Returns the downcasted uint96 from uint256, reverting on + * overflow (when the input is greater than largest uint96). + * + * Counterpart to Solidity's `uint96` operator. + * + * Requirements: + * + * - input must fit into 96 bits + * + * _Available since v4.2._ + */ + function toUint96(uint256 value) internal pure returns (uint96) { + require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); + return uint96(value); + } + + /** + * @dev Returns the downcasted uint88 from uint256, reverting on + * overflow (when the input is greater than largest uint88). + * + * Counterpart to Solidity's `uint88` operator. + * + * Requirements: + * + * - input must fit into 88 bits + * + * _Available since v4.7._ + */ + function toUint88(uint256 value) internal pure returns (uint88) { + require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits"); + return uint88(value); + } + + /** + * @dev Returns the downcasted uint80 from uint256, reverting on + * overflow (when the input is greater than largest uint80). + * + * Counterpart to Solidity's `uint80` operator. + * + * Requirements: + * + * - input must fit into 80 bits + * + * _Available since v4.7._ + */ + function toUint80(uint256 value) internal pure returns (uint80) { + require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits"); + return uint80(value); + } + + /** + * @dev Returns the downcasted uint72 from uint256, reverting on + * overflow (when the input is greater than largest uint72). + * + * Counterpart to Solidity's `uint72` operator. + * + * Requirements: + * + * - input must fit into 72 bits + * + * _Available since v4.7._ + */ + function toUint72(uint256 value) internal pure returns (uint72) { + require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits"); + return uint72(value); + } + + /** + * @dev Returns the downcasted uint64 from uint256, reverting on + * overflow (when the input is greater than largest uint64). + * + * Counterpart to Solidity's `uint64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + * + * _Available since v2.5._ + */ + function toUint64(uint256 value) internal pure returns (uint64) { + require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); + return uint64(value); + } + + /** + * @dev Returns the downcasted uint56 from uint256, reverting on + * overflow (when the input is greater than largest uint56). + * + * Counterpart to Solidity's `uint56` operator. + * + * Requirements: + * + * - input must fit into 56 bits + * + * _Available since v4.7._ + */ + function toUint56(uint256 value) internal pure returns (uint56) { + require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits"); + return uint56(value); + } + + /** + * @dev Returns the downcasted uint48 from uint256, reverting on + * overflow (when the input is greater than largest uint48). + * + * Counterpart to Solidity's `uint48` operator. + * + * Requirements: + * + * - input must fit into 48 bits + * + * _Available since v4.7._ + */ + function toUint48(uint256 value) internal pure returns (uint48) { + require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits"); + return uint48(value); + } + + /** + * @dev Returns the downcasted uint40 from uint256, reverting on + * overflow (when the input is greater than largest uint40). + * + * Counterpart to Solidity's `uint40` operator. + * + * Requirements: + * + * - input must fit into 40 bits + * + * _Available since v4.7._ + */ + function toUint40(uint256 value) internal pure returns (uint40) { + require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits"); + return uint40(value); + } + + /** + * @dev Returns the downcasted uint32 from uint256, reverting on + * overflow (when the input is greater than largest uint32). + * + * Counterpart to Solidity's `uint32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + * + * _Available since v2.5._ + */ + function toUint32(uint256 value) internal pure returns (uint32) { + require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); + return uint32(value); + } + + /** + * @dev Returns the downcasted uint24 from uint256, reverting on + * overflow (when the input is greater than largest uint24). + * + * Counterpart to Solidity's `uint24` operator. + * + * Requirements: + * + * - input must fit into 24 bits + * + * _Available since v4.7._ + */ + function toUint24(uint256 value) internal pure returns (uint24) { + require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits"); + return uint24(value); + } + + /** + * @dev Returns the downcasted uint16 from uint256, reverting on + * overflow (when the input is greater than largest uint16). + * + * Counterpart to Solidity's `uint16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + * + * _Available since v2.5._ + */ + function toUint16(uint256 value) internal pure returns (uint16) { + require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); + return uint16(value); + } + + /** + * @dev Returns the downcasted uint8 from uint256, reverting on + * overflow (when the input is greater than largest uint8). + * + * Counterpart to Solidity's `uint8` operator. + * + * Requirements: + * + * - input must fit into 8 bits + * + * _Available since v2.5._ + */ + function toUint8(uint256 value) internal pure returns (uint8) { + require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); + return uint8(value); + } + + /** + * @dev Converts a signed int256 into an unsigned uint256. + * + * Requirements: + * + * - input must be greater than or equal to 0. + * + * _Available since v3.0._ + */ + function toUint256(int256 value) internal pure returns (uint256) { + require(value >= 0, "SafeCast: value must be positive"); + return uint256(value); + } + + /** + * @dev Returns the downcasted int248 from int256, reverting on + * overflow (when the input is less than smallest int248 or + * greater than largest int248). + * + * Counterpart to Solidity's `int248` operator. + * + * Requirements: + * + * - input must fit into 248 bits + * + * _Available since v4.7._ + */ + function toInt248(int256 value) internal pure returns (int248 downcasted) { + downcasted = int248(value); + require(downcasted == value, "SafeCast: value doesn't fit in 248 bits"); + } + + /** + * @dev Returns the downcasted int240 from int256, reverting on + * overflow (when the input is less than smallest int240 or + * greater than largest int240). + * + * Counterpart to Solidity's `int240` operator. + * + * Requirements: + * + * - input must fit into 240 bits + * + * _Available since v4.7._ + */ + function toInt240(int256 value) internal pure returns (int240 downcasted) { + downcasted = int240(value); + require(downcasted == value, "SafeCast: value doesn't fit in 240 bits"); + } + + /** + * @dev Returns the downcasted int232 from int256, reverting on + * overflow (when the input is less than smallest int232 or + * greater than largest int232). + * + * Counterpart to Solidity's `int232` operator. + * + * Requirements: + * + * - input must fit into 232 bits + * + * _Available since v4.7._ + */ + function toInt232(int256 value) internal pure returns (int232 downcasted) { + downcasted = int232(value); + require(downcasted == value, "SafeCast: value doesn't fit in 232 bits"); + } + + /** + * @dev Returns the downcasted int224 from int256, reverting on + * overflow (when the input is less than smallest int224 or + * greater than largest int224). + * + * Counterpart to Solidity's `int224` operator. + * + * Requirements: + * + * - input must fit into 224 bits + * + * _Available since v4.7._ + */ + function toInt224(int256 value) internal pure returns (int224 downcasted) { + downcasted = int224(value); + require(downcasted == value, "SafeCast: value doesn't fit in 224 bits"); + } + + /** + * @dev Returns the downcasted int216 from int256, reverting on + * overflow (when the input is less than smallest int216 or + * greater than largest int216). + * + * Counterpart to Solidity's `int216` operator. + * + * Requirements: + * + * - input must fit into 216 bits + * + * _Available since v4.7._ + */ + function toInt216(int256 value) internal pure returns (int216 downcasted) { + downcasted = int216(value); + require(downcasted == value, "SafeCast: value doesn't fit in 216 bits"); + } + + /** + * @dev Returns the downcasted int208 from int256, reverting on + * overflow (when the input is less than smallest int208 or + * greater than largest int208). + * + * Counterpart to Solidity's `int208` operator. + * + * Requirements: + * + * - input must fit into 208 bits + * + * _Available since v4.7._ + */ + function toInt208(int256 value) internal pure returns (int208 downcasted) { + downcasted = int208(value); + require(downcasted == value, "SafeCast: value doesn't fit in 208 bits"); + } + + /** + * @dev Returns the downcasted int200 from int256, reverting on + * overflow (when the input is less than smallest int200 or + * greater than largest int200). + * + * Counterpart to Solidity's `int200` operator. + * + * Requirements: + * + * - input must fit into 200 bits + * + * _Available since v4.7._ + */ + function toInt200(int256 value) internal pure returns (int200 downcasted) { + downcasted = int200(value); + require(downcasted == value, "SafeCast: value doesn't fit in 200 bits"); + } + + /** + * @dev Returns the downcasted int192 from int256, reverting on + * overflow (when the input is less than smallest int192 or + * greater than largest int192). + * + * Counterpart to Solidity's `int192` operator. + * + * Requirements: + * + * - input must fit into 192 bits + * + * _Available since v4.7._ + */ + function toInt192(int256 value) internal pure returns (int192 downcasted) { + downcasted = int192(value); + require(downcasted == value, "SafeCast: value doesn't fit in 192 bits"); + } + + /** + * @dev Returns the downcasted int184 from int256, reverting on + * overflow (when the input is less than smallest int184 or + * greater than largest int184). + * + * Counterpart to Solidity's `int184` operator. + * + * Requirements: + * + * - input must fit into 184 bits + * + * _Available since v4.7._ + */ + function toInt184(int256 value) internal pure returns (int184 downcasted) { + downcasted = int184(value); + require(downcasted == value, "SafeCast: value doesn't fit in 184 bits"); + } + + /** + * @dev Returns the downcasted int176 from int256, reverting on + * overflow (when the input is less than smallest int176 or + * greater than largest int176). + * + * Counterpart to Solidity's `int176` operator. + * + * Requirements: + * + * - input must fit into 176 bits + * + * _Available since v4.7._ + */ + function toInt176(int256 value) internal pure returns (int176 downcasted) { + downcasted = int176(value); + require(downcasted == value, "SafeCast: value doesn't fit in 176 bits"); + } + + /** + * @dev Returns the downcasted int168 from int256, reverting on + * overflow (when the input is less than smallest int168 or + * greater than largest int168). + * + * Counterpart to Solidity's `int168` operator. + * + * Requirements: + * + * - input must fit into 168 bits + * + * _Available since v4.7._ + */ + function toInt168(int256 value) internal pure returns (int168 downcasted) { + downcasted = int168(value); + require(downcasted == value, "SafeCast: value doesn't fit in 168 bits"); + } + + /** + * @dev Returns the downcasted int160 from int256, reverting on + * overflow (when the input is less than smallest int160 or + * greater than largest int160). + * + * Counterpart to Solidity's `int160` operator. + * + * Requirements: + * + * - input must fit into 160 bits + * + * _Available since v4.7._ + */ + function toInt160(int256 value) internal pure returns (int160 downcasted) { + downcasted = int160(value); + require(downcasted == value, "SafeCast: value doesn't fit in 160 bits"); + } + + /** + * @dev Returns the downcasted int152 from int256, reverting on + * overflow (when the input is less than smallest int152 or + * greater than largest int152). + * + * Counterpart to Solidity's `int152` operator. + * + * Requirements: + * + * - input must fit into 152 bits + * + * _Available since v4.7._ + */ + function toInt152(int256 value) internal pure returns (int152 downcasted) { + downcasted = int152(value); + require(downcasted == value, "SafeCast: value doesn't fit in 152 bits"); + } + + /** + * @dev Returns the downcasted int144 from int256, reverting on + * overflow (when the input is less than smallest int144 or + * greater than largest int144). + * + * Counterpart to Solidity's `int144` operator. + * + * Requirements: + * + * - input must fit into 144 bits + * + * _Available since v4.7._ + */ + function toInt144(int256 value) internal pure returns (int144 downcasted) { + downcasted = int144(value); + require(downcasted == value, "SafeCast: value doesn't fit in 144 bits"); + } + + /** + * @dev Returns the downcasted int136 from int256, reverting on + * overflow (when the input is less than smallest int136 or + * greater than largest int136). + * + * Counterpart to Solidity's `int136` operator. + * + * Requirements: + * + * - input must fit into 136 bits + * + * _Available since v4.7._ + */ + function toInt136(int256 value) internal pure returns (int136 downcasted) { + downcasted = int136(value); + require(downcasted == value, "SafeCast: value doesn't fit in 136 bits"); + } + + /** + * @dev Returns the downcasted int128 from int256, reverting on + * overflow (when the input is less than smallest int128 or + * greater than largest int128). + * + * Counterpart to Solidity's `int128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v3.1._ + */ + function toInt128(int256 value) internal pure returns (int128 downcasted) { + downcasted = int128(value); + require(downcasted == value, "SafeCast: value doesn't fit in 128 bits"); + } + + /** + * @dev Returns the downcasted int120 from int256, reverting on + * overflow (when the input is less than smallest int120 or + * greater than largest int120). + * + * Counterpart to Solidity's `int120` operator. + * + * Requirements: + * + * - input must fit into 120 bits + * + * _Available since v4.7._ + */ + function toInt120(int256 value) internal pure returns (int120 downcasted) { + downcasted = int120(value); + require(downcasted == value, "SafeCast: value doesn't fit in 120 bits"); + } + + /** + * @dev Returns the downcasted int112 from int256, reverting on + * overflow (when the input is less than smallest int112 or + * greater than largest int112). + * + * Counterpart to Solidity's `int112` operator. + * + * Requirements: + * + * - input must fit into 112 bits + * + * _Available since v4.7._ + */ + function toInt112(int256 value) internal pure returns (int112 downcasted) { + downcasted = int112(value); + require(downcasted == value, "SafeCast: value doesn't fit in 112 bits"); + } + + /** + * @dev Returns the downcasted int104 from int256, reverting on + * overflow (when the input is less than smallest int104 or + * greater than largest int104). + * + * Counterpart to Solidity's `int104` operator. + * + * Requirements: + * + * - input must fit into 104 bits + * + * _Available since v4.7._ + */ + function toInt104(int256 value) internal pure returns (int104 downcasted) { + downcasted = int104(value); + require(downcasted == value, "SafeCast: value doesn't fit in 104 bits"); + } + + /** + * @dev Returns the downcasted int96 from int256, reverting on + * overflow (when the input is less than smallest int96 or + * greater than largest int96). + * + * Counterpart to Solidity's `int96` operator. + * + * Requirements: + * + * - input must fit into 96 bits + * + * _Available since v4.7._ + */ + function toInt96(int256 value) internal pure returns (int96 downcasted) { + downcasted = int96(value); + require(downcasted == value, "SafeCast: value doesn't fit in 96 bits"); + } + + /** + * @dev Returns the downcasted int88 from int256, reverting on + * overflow (when the input is less than smallest int88 or + * greater than largest int88). + * + * Counterpart to Solidity's `int88` operator. + * + * Requirements: + * + * - input must fit into 88 bits + * + * _Available since v4.7._ + */ + function toInt88(int256 value) internal pure returns (int88 downcasted) { + downcasted = int88(value); + require(downcasted == value, "SafeCast: value doesn't fit in 88 bits"); + } + + /** + * @dev Returns the downcasted int80 from int256, reverting on + * overflow (when the input is less than smallest int80 or + * greater than largest int80). + * + * Counterpart to Solidity's `int80` operator. + * + * Requirements: + * + * - input must fit into 80 bits + * + * _Available since v4.7._ + */ + function toInt80(int256 value) internal pure returns (int80 downcasted) { + downcasted = int80(value); + require(downcasted == value, "SafeCast: value doesn't fit in 80 bits"); + } + + /** + * @dev Returns the downcasted int72 from int256, reverting on + * overflow (when the input is less than smallest int72 or + * greater than largest int72). + * + * Counterpart to Solidity's `int72` operator. + * + * Requirements: + * + * - input must fit into 72 bits + * + * _Available since v4.7._ + */ + function toInt72(int256 value) internal pure returns (int72 downcasted) { + downcasted = int72(value); + require(downcasted == value, "SafeCast: value doesn't fit in 72 bits"); + } + + /** + * @dev Returns the downcasted int64 from int256, reverting on + * overflow (when the input is less than smallest int64 or + * greater than largest int64). + * + * Counterpart to Solidity's `int64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + * + * _Available since v3.1._ + */ + function toInt64(int256 value) internal pure returns (int64 downcasted) { + downcasted = int64(value); + require(downcasted == value, "SafeCast: value doesn't fit in 64 bits"); + } + + /** + * @dev Returns the downcasted int56 from int256, reverting on + * overflow (when the input is less than smallest int56 or + * greater than largest int56). + * + * Counterpart to Solidity's `int56` operator. + * + * Requirements: + * + * - input must fit into 56 bits + * + * _Available since v4.7._ + */ + function toInt56(int256 value) internal pure returns (int56 downcasted) { + downcasted = int56(value); + require(downcasted == value, "SafeCast: value doesn't fit in 56 bits"); + } + + /** + * @dev Returns the downcasted int48 from int256, reverting on + * overflow (when the input is less than smallest int48 or + * greater than largest int48). + * + * Counterpart to Solidity's `int48` operator. + * + * Requirements: + * + * - input must fit into 48 bits + * + * _Available since v4.7._ + */ + function toInt48(int256 value) internal pure returns (int48 downcasted) { + downcasted = int48(value); + require(downcasted == value, "SafeCast: value doesn't fit in 48 bits"); + } + + /** + * @dev Returns the downcasted int40 from int256, reverting on + * overflow (when the input is less than smallest int40 or + * greater than largest int40). + * + * Counterpart to Solidity's `int40` operator. + * + * Requirements: + * + * - input must fit into 40 bits + * + * _Available since v4.7._ + */ + function toInt40(int256 value) internal pure returns (int40 downcasted) { + downcasted = int40(value); + require(downcasted == value, "SafeCast: value doesn't fit in 40 bits"); + } + + /** + * @dev Returns the downcasted int32 from int256, reverting on + * overflow (when the input is less than smallest int32 or + * greater than largest int32). + * + * Counterpart to Solidity's `int32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + * + * _Available since v3.1._ + */ + function toInt32(int256 value) internal pure returns (int32 downcasted) { + downcasted = int32(value); + require(downcasted == value, "SafeCast: value doesn't fit in 32 bits"); + } + + /** + * @dev Returns the downcasted int24 from int256, reverting on + * overflow (when the input is less than smallest int24 or + * greater than largest int24). + * + * Counterpart to Solidity's `int24` operator. + * + * Requirements: + * + * - input must fit into 24 bits + * + * _Available since v4.7._ + */ + function toInt24(int256 value) internal pure returns (int24 downcasted) { + downcasted = int24(value); + require(downcasted == value, "SafeCast: value doesn't fit in 24 bits"); + } + + /** + * @dev Returns the downcasted int16 from int256, reverting on + * overflow (when the input is less than smallest int16 or + * greater than largest int16). + * + * Counterpart to Solidity's `int16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + * + * _Available since v3.1._ + */ + function toInt16(int256 value) internal pure returns (int16 downcasted) { + downcasted = int16(value); + require(downcasted == value, "SafeCast: value doesn't fit in 16 bits"); + } + + /** + * @dev Returns the downcasted int8 from int256, reverting on + * overflow (when the input is less than smallest int8 or + * greater than largest int8). + * + * Counterpart to Solidity's `int8` operator. + * + * Requirements: + * + * - input must fit into 8 bits + * + * _Available since v3.1._ + */ + function toInt8(int256 value) internal pure returns (int8 downcasted) { + downcasted = int8(value); + require(downcasted == value, "SafeCast: value doesn't fit in 8 bits"); + } + + /** + * @dev Converts an unsigned uint256 into a signed int256. + * + * Requirements: + * + * - input must be less than or equal to maxInt256. + * + * _Available since v3.0._ + */ + function toInt256(uint256 value) internal pure returns (int256) { + // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive + require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); + return int256(value); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol new file mode 100644 index 00000000..f7315a61 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol @@ -0,0 +1,215 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) + +pragma solidity ^0.8.0; + +// CAUTION +// This version of SafeMath should only be used with Solidity 0.8 or later, +// because it relies on the compiler's built in overflow checks. + +/** + * @dev Wrappers over Solidity's arithmetic operations. + * + * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler + * now has built in overflow checking. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + uint256 c = a + b; + if (c < a) return (false, 0); + return (true, c); + } + } + + /** + * @dev Returns the subtraction of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + if (b > a) return (false, 0); + return (true, a - b); + } + } + + /** + * @dev Returns the multiplication of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) return (true, 0); + uint256 c = a * b; + if (c / a != b) return (false, 0); + return (true, c); + } + } + + /** + * @dev Returns the division of two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + if (b == 0) return (false, 0); + return (true, a / b); + } + } + + /** + * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + if (b == 0) return (false, 0); + return (true, a % b); + } + } + + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + return a + b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return a - b; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + return a * b; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return a % b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {trySub}. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + unchecked { + require(b <= a, errorMessage); + return a - b; + } + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + unchecked { + require(b > 0, errorMessage); + return a / b; + } + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting with custom message when dividing by zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryMod}. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + unchecked { + require(b > 0, errorMessage); + return a % b; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol new file mode 100644 index 00000000..3ea9f8bf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Standard signed math utilities missing in the Solidity language. + */ +library SignedMath { + /** + * @dev Returns the largest of two signed numbers. + */ + function max(int256 a, int256 b) internal pure returns (int256) { + return a > b ? a : b; + } + + /** + * @dev Returns the smallest of two signed numbers. + */ + function min(int256 a, int256 b) internal pure returns (int256) { + return a < b ? a : b; + } + + /** + * @dev Returns the average of two signed numbers without overflow. + * The result is rounded towards zero. + */ + function average(int256 a, int256 b) internal pure returns (int256) { + // Formula from the book "Hacker's Delight" + int256 x = (a & b) + ((a ^ b) >> 1); + return x + (int256(uint256(x) >> 255) & (a ^ b)); + } + + /** + * @dev Returns the absolute unsigned value of a signed value. + */ + function abs(int256 n) internal pure returns (uint256) { + unchecked { + // must be unchecked in order to support `n = type(int256).min` + return uint256(n >= 0 ? n : -n); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol new file mode 100644 index 00000000..6704d4ce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations. + * + * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler + * now has built in overflow checking. + */ +library SignedSafeMath { + /** + * @dev Returns the multiplication of two signed integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(int256 a, int256 b) internal pure returns (int256) { + return a * b; + } + + /** + * @dev Returns the integer division of two signed integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(int256 a, int256 b) internal pure returns (int256) { + return a / b; + } + + /** + * @dev Returns the subtraction of two signed integers, reverting on + * overflow. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(int256 a, int256 b) internal pure returns (int256) { + return a - b; + } + + /** + * @dev Returns the addition of two signed integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(int256 a, int256 b) internal pure returns (int256) { + return a + b; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/BitMaps.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/BitMaps.sol new file mode 100644 index 00000000..2567fce4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/BitMaps.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol) +pragma solidity ^0.8.0; + +/** + * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. + * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. + */ +library BitMaps { + struct BitMap { + mapping(uint256 => uint256) _data; + } + + /** + * @dev Returns whether the bit at `index` is set. + */ + function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { + uint256 bucket = index >> 8; + uint256 mask = 1 << (index & 0xff); + return bitmap._data[bucket] & mask != 0; + } + + /** + * @dev Sets the bit at `index` to the boolean `value`. + */ + function setTo(BitMap storage bitmap, uint256 index, bool value) internal { + if (value) { + set(bitmap, index); + } else { + unset(bitmap, index); + } + } + + /** + * @dev Sets the bit at `index`. + */ + function set(BitMap storage bitmap, uint256 index) internal { + uint256 bucket = index >> 8; + uint256 mask = 1 << (index & 0xff); + bitmap._data[bucket] |= mask; + } + + /** + * @dev Unsets the bit at `index`. + */ + function unset(BitMap storage bitmap, uint256 index) internal { + uint256 bucket = index >> 8; + uint256 mask = 1 << (index & 0xff); + bitmap._data[bucket] &= ~mask; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol new file mode 100644 index 00000000..325918d2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/DoubleEndedQueue.sol) +pragma solidity ^0.8.4; + +import "../math/SafeCast.sol"; + +/** + * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of + * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and + * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that + * the existing queue contents are left in storage. + * + * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be + * used in storage, and not in memory. + * ```solidity + * DoubleEndedQueue.Bytes32Deque queue; + * ``` + * + * _Available since v4.6._ + */ +library DoubleEndedQueue { + /** + * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty. + */ + error Empty(); + + /** + * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds. + */ + error OutOfBounds(); + + /** + * @dev Indices are signed integers because the queue can grow in any direction. They are 128 bits so begin and end + * are packed in a single storage slot for efficient access. Since the items are added one at a time we can safely + * assume that these 128-bit indices will not overflow, and use unchecked arithmetic. + * + * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to + * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and + * lead to unexpected behavior. + * + * Indices are in the range [begin, end) which means the first item is at data[begin] and the last item is at + * data[end - 1]. + */ + struct Bytes32Deque { + int128 _begin; + int128 _end; + mapping(int128 => bytes32) _data; + } + + /** + * @dev Inserts an item at the end of the queue. + */ + function pushBack(Bytes32Deque storage deque, bytes32 value) internal { + int128 backIndex = deque._end; + deque._data[backIndex] = value; + unchecked { + deque._end = backIndex + 1; + } + } + + /** + * @dev Removes the item at the end of the queue and returns it. + * + * Reverts with `Empty` if the queue is empty. + */ + function popBack(Bytes32Deque storage deque) internal returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 backIndex; + unchecked { + backIndex = deque._end - 1; + } + value = deque._data[backIndex]; + delete deque._data[backIndex]; + deque._end = backIndex; + } + + /** + * @dev Inserts an item at the beginning of the queue. + */ + function pushFront(Bytes32Deque storage deque, bytes32 value) internal { + int128 frontIndex; + unchecked { + frontIndex = deque._begin - 1; + } + deque._data[frontIndex] = value; + deque._begin = frontIndex; + } + + /** + * @dev Removes the item at the beginning of the queue and returns it. + * + * Reverts with `Empty` if the queue is empty. + */ + function popFront(Bytes32Deque storage deque) internal returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 frontIndex = deque._begin; + value = deque._data[frontIndex]; + delete deque._data[frontIndex]; + unchecked { + deque._begin = frontIndex + 1; + } + } + + /** + * @dev Returns the item at the beginning of the queue. + * + * Reverts with `Empty` if the queue is empty. + */ + function front(Bytes32Deque storage deque) internal view returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 frontIndex = deque._begin; + return deque._data[frontIndex]; + } + + /** + * @dev Returns the item at the end of the queue. + * + * Reverts with `Empty` if the queue is empty. + */ + function back(Bytes32Deque storage deque) internal view returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 backIndex; + unchecked { + backIndex = deque._end - 1; + } + return deque._data[backIndex]; + } + + /** + * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at + * `length(deque) - 1`. + * + * Reverts with `OutOfBounds` if the index is out of bounds. + */ + function at(Bytes32Deque storage deque, uint256 index) internal view returns (bytes32 value) { + // int256(deque._begin) is a safe upcast + int128 idx = SafeCast.toInt128(int256(deque._begin) + SafeCast.toInt256(index)); + if (idx >= deque._end) revert OutOfBounds(); + return deque._data[idx]; + } + + /** + * @dev Resets the queue back to being empty. + * + * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses + * out on potential gas refunds. + */ + function clear(Bytes32Deque storage deque) internal { + deque._begin = 0; + deque._end = 0; + } + + /** + * @dev Returns the number of items in the queue. + */ + function length(Bytes32Deque storage deque) internal view returns (uint256) { + // The interface preserves the invariant that begin <= end so we assume this will not overflow. + // We also assume there are at most int256.max items in the queue. + unchecked { + return uint256(int256(deque._end) - int256(deque._begin)); + } + } + + /** + * @dev Returns true if the queue is empty. + */ + function empty(Bytes32Deque storage deque) internal view returns (bool) { + return deque._end <= deque._begin; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol new file mode 100644 index 00000000..c49d2d67 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol @@ -0,0 +1,598 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableMap.sol) +// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js. + +pragma solidity ^0.8.0; + +import "./EnumerableSet.sol"; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ```solidity + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * The following map types are supported: + * + * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0 + * - `address -> uint256` (`AddressToUintMap`) since v4.6.0 + * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0 + * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0 + * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0 + * + * [WARNING] + * ==== + * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure + * unusable. + * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. + * + * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an + * array of EnumerableMap. + * ==== + */ +library EnumerableMap { + using EnumerableSet for EnumerableSet.Bytes32Set; + + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct Bytes32ToBytes32Map { + // Storage of keys + EnumerableSet.Bytes32Set _keys; + mapping(bytes32 => bytes32) _values; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) { + map._values[key] = value; + return map._keys.add(key); + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) { + delete map._values[key]; + return map._keys.remove(key); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) { + return map._keys.contains(key); + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) { + return map._keys.length(); + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32, bytes32) { + bytes32 key = map._keys.at(index); + return (key, map._values[key]); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) { + bytes32 value = map._values[key]; + if (value == bytes32(0)) { + return (contains(map, key), bytes32(0)); + } else { + return (true, value); + } + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) { + bytes32 value = map._values[key]; + require(value != 0 || contains(map, key), "EnumerableMap: nonexistent key"); + return value; + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + Bytes32ToBytes32Map storage map, + bytes32 key, + string memory errorMessage + ) internal view returns (bytes32) { + bytes32 value = map._values[key]; + require(value != 0 || contains(map, key), errorMessage); + return value; + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToBytes32Map storage map) internal view returns (bytes32[] memory) { + return map._keys.values(); + } + + // UintToUintMap + + struct UintToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) { + return set(map._inner, bytes32(key), bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToUintMap storage map, uint256 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToUintMap storage map, uint256 index) internal view returns (uint256, uint256) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (uint256(key), uint256(value)); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) { + (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); + return (success, uint256(value)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(key))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get(UintToUintMap storage map, uint256 key, string memory errorMessage) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(key), errorMessage)); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToUintMap storage map) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner); + uint256[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // UintToAddressMap + + struct UintToAddressMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (uint256(key), address(uint160(uint256(value)))); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { + (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(value)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint160(uint256(get(map._inner, bytes32(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + UintToAddressMap storage map, + uint256 key, + string memory errorMessage + ) internal view returns (address) { + return address(uint160(uint256(get(map._inner, bytes32(key), errorMessage)))); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToAddressMap storage map) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner); + uint256[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // AddressToUintMap + + struct AddressToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) { + return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(AddressToUintMap storage map, address key) internal returns (bool) { + return remove(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(AddressToUintMap storage map, address key) internal view returns (bool) { + return contains(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(AddressToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (address(uint160(uint256(key))), uint256(value)); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) { + (bool success, bytes32 value) = tryGet(map._inner, bytes32(uint256(uint160(key)))); + return (success, uint256(value)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(AddressToUintMap storage map, address key) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(uint256(uint160(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + AddressToUintMap storage map, + address key, + string memory errorMessage + ) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(uint256(uint160(key))), errorMessage)); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(AddressToUintMap storage map) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner); + address[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // Bytes32ToUintMap + + struct Bytes32ToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) { + return set(map._inner, key, bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) { + return remove(map._inner, key); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) { + return contains(map._inner, key); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(Bytes32ToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (key, uint256(value)); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) { + (bool success, bytes32 value) = tryGet(map._inner, key); + return (success, uint256(value)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) { + return uint256(get(map._inner, key)); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + Bytes32ToUintMap storage map, + bytes32 key, + string memory errorMessage + ) internal view returns (uint256) { + return uint256(get(map._inner, key, errorMessage)); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToUintMap storage map) internal view returns (bytes32[] memory) { + bytes32[] memory store = keys(map._inner); + bytes32[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol new file mode 100644 index 00000000..447f9630 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol @@ -0,0 +1,378 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) +// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. + +pragma solidity ^0.8.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ```solidity + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) + * and `uint256` (`UintSet`) are supported. + * + * [WARNING] + * ==== + * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure + * unusable. + * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. + * + * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an + * array of EnumerableSet. + * ==== + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping(bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { + // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + if (lastIndex != toDeleteIndex) { + bytes32 lastValue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastValue; + // Update the index for the moved value + set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex + } + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + return set._values[index]; + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function _values(Set storage set) private view returns (bytes32[] memory) { + return set._values; + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { + bytes32[] memory store = _values(set._inner); + bytes32[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(AddressSet storage set) internal view returns (address[] memory) { + bytes32[] memory store = _values(set._inner); + address[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(UintSet storage set) internal view returns (uint256[] memory) { + bytes32[] memory store = _values(set._inner); + uint256[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol new file mode 100644 index 00000000..658f7260 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/amb/IAMB.sol) +pragma solidity ^0.8.0; + +interface IAMB { + event UserRequestForAffirmation(bytes32 indexed messageId, bytes encodedData); + event UserRequestForSignature(bytes32 indexed messageId, bytes encodedData); + event AffirmationCompleted( + address indexed sender, + address indexed executor, + bytes32 indexed messageId, + bool status + ); + event RelayedMessage(address indexed sender, address indexed executor, bytes32 indexed messageId, bool status); + + function messageSender() external view returns (address); + + function maxGasPerTx() external view returns (uint256); + + function transactionHash() external view returns (bytes32); + + function messageId() external view returns (bytes32); + + function messageSourceChainId() external view returns (bytes32); + + function messageCallStatus(bytes32 _messageId) external view returns (bool); + + function failedMessageDataHash(bytes32 _messageId) external view returns (bytes32); + + function failedMessageReceiver(bytes32 _messageId) external view returns (address); + + function failedMessageSender(bytes32 _messageId) external view returns (address); + + function requireToPassMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); + + function requireToConfirmMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); + + function sourceChainId() external view returns (uint256); + + function destinationChainId() external view returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol new file mode 100644 index 00000000..ea4e7504 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol @@ -0,0 +1,134 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IArbSys.sol) + +pragma solidity >=0.4.21 <0.9.0; + +/** + * @title System level functionality + * @notice For use by contracts to interact with core L2-specific functionality. + * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. + */ +interface IArbSys { + /** + * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) + * @return block number as int + */ + function arbBlockNumber() external view returns (uint256); + + /** + * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum) + * @return block hash + */ + function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32); + + /** + * @notice Gets the rollup's unique chain identifier + * @return Chain identifier as int + */ + function arbChainID() external view returns (uint256); + + /** + * @notice Get internal version number identifying an ArbOS build + * @return version number as int + */ + function arbOSVersion() external view returns (uint256); + + /** + * @notice Returns 0 since Nitro has no concept of storage gas + * @return uint 0 + */ + function getStorageGasAvailable() external view returns (uint256); + + /** + * @notice (deprecated) check if current call is top level (meaning it was triggered by an EoA or a L1 contract) + * @dev this call has been deprecated and may be removed in a future release + * @return true if current execution frame is not a call by another L2 contract + */ + function isTopLevelCall() external view returns (bool); + + /** + * @notice map L1 sender contract address to its L2 alias + * @param sender sender address + * @param unused argument no longer used + * @return aliased sender address + */ + function mapL1SenderContractAddressToL2Alias(address sender, address unused) external pure returns (address); + + /** + * @notice check if the caller (of this caller of this) is an aliased L1 contract address + * @return true iff the caller's address is an alias for an L1 contract address + */ + function wasMyCallersAddressAliased() external view returns (bool); + + /** + * @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing + * @return address of the caller's caller, without applying L1 contract address aliasing + */ + function myCallersAddressWithoutAliasing() external view returns (address); + + /** + * @notice Send given amount of Eth to dest from sender. + * This is a convenience function, which is equivalent to calling sendTxToL1 with empty data. + * @param destination recipient address on L1 + * @return unique identifier for this L2-to-L1 transaction. + */ + function withdrawEth(address destination) external payable returns (uint256); + + /** + * @notice Send a transaction to L1 + * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data + * to a contract address without any code (as enforced by the Bridge contract). + * @param destination recipient address on L1 + * @param data (optional) calldata for L1 contract call + * @return a unique identifier for this L2-to-L1 transaction. + */ + function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256); + + /** + * @notice Get send Merkle tree state + * @return size number of sends in the history + * @return root root hash of the send history + * @return partials hashes of partial subtrees in the send history tree + */ + function sendMerkleTreeState() external view returns (uint256 size, bytes32 root, bytes32[] memory partials); + + /** + * @notice creates a send txn from L2 to L1 + * @param position = (level << 192) + leaf = (0 << 192) + leaf = leaf + */ + event L2ToL1Tx( + address caller, + address indexed destination, + uint256 indexed hash, + uint256 indexed position, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /// @dev DEPRECATED in favour of the new L2ToL1Tx event above after the nitro upgrade + event L2ToL1Transaction( + address caller, + address indexed destination, + uint256 indexed uniqueId, + uint256 indexed batchNumber, + uint256 indexInBatch, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /** + * @notice logs a merkle branch for proof synthesis + * @param reserved an index meant only to align the 4th index with L2ToL1Transaction's 4th event + * @param hash the merkle hash + * @param position = (level << 192) + leaf + */ + event SendMerkleUpdate(uint256 indexed reserved, bytes32 indexed hash, uint256 indexed position); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol new file mode 100644 index 00000000..398fb613 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol @@ -0,0 +1,102 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IBridge.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +interface IBridge { + event MessageDelivered( + uint256 indexed messageIndex, + bytes32 indexed beforeInboxAcc, + address inbox, + uint8 kind, + address sender, + bytes32 messageDataHash, + uint256 baseFeeL1, + uint64 timestamp + ); + + event BridgeCallTriggered(address indexed outbox, address indexed to, uint256 value, bytes data); + + event InboxToggle(address indexed inbox, bool enabled); + + event OutboxToggle(address indexed outbox, bool enabled); + + event SequencerInboxUpdated(address newSequencerInbox); + + function allowedDelayedInboxList(uint256) external returns (address); + + function allowedOutboxList(uint256) external returns (address); + + /// @dev Accumulator for delayed inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. + function delayedInboxAccs(uint256) external view returns (bytes32); + + /// @dev Accumulator for sequencer inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. + function sequencerInboxAccs(uint256) external view returns (bytes32); + + // OpenZeppelin: changed return type from IOwnable + function rollup() external view returns (address); + + function sequencerInbox() external view returns (address); + + function activeOutbox() external view returns (address); + + function allowedDelayedInboxes(address inbox) external view returns (bool); + + function allowedOutboxes(address outbox) external view returns (bool); + + function sequencerReportedSubMessageCount() external view returns (uint256); + + /** + * @dev Enqueue a message in the delayed inbox accumulator. + * These messages are later sequenced in the SequencerInbox, either + * by the sequencer as part of a normal batch, or by force inclusion. + */ + function enqueueDelayedMessage( + uint8 kind, + address sender, + bytes32 messageDataHash + ) external payable returns (uint256); + + function executeCall( + address to, + uint256 value, + bytes calldata data + ) external returns (bool success, bytes memory returnData); + + function delayedMessageCount() external view returns (uint256); + + function sequencerMessageCount() external view returns (uint256); + + // ---------- onlySequencerInbox functions ---------- + + function enqueueSequencerMessage( + bytes32 dataHash, + uint256 afterDelayedMessagesRead, + uint256 prevMessageCount, + uint256 newMessageCount + ) external returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc); + + /** + * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type + * This is done through a separate function entrypoint instead of allowing the sequencer inbox + * to call `enqueueDelayedMessage` to avoid the gas overhead of an extra SLOAD in either + * every delayed inbox or every sequencer inbox call. + */ + function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) external returns (uint256 msgNum); + + // ---------- onlyRollupOrOwner functions ---------- + + function setSequencerInbox(address _sequencerInbox) external; + + function setDelayedInbox(address inbox, bool enabled) external; + + function setOutbox(address inbox, bool enabled) external; + + // ---------- initializer ---------- + + // OpenZeppelin: changed rollup_ type from IOwnable + function initialize(address rollup_) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol new file mode 100644 index 00000000..914c25fb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol @@ -0,0 +1,16 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IDelayedMessageProvider.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +interface IDelayedMessageProvider { + /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator + event InboxMessageDelivered(uint256 indexed messageNum, bytes data); + + /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator + /// same as InboxMessageDelivered but the batch data is available in tx.input + event InboxMessageDeliveredFromOrigin(uint256 indexed messageNum); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol new file mode 100644 index 00000000..a8b67511 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol @@ -0,0 +1,152 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IInbox.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +import "./IBridge.sol"; +import "./IDelayedMessageProvider.sol"; + +interface IInbox is IDelayedMessageProvider { + function bridge() external view returns (IBridge); + + // OpenZeppelin: changed return type from ISequencerInbox + function sequencerInbox() external view returns (address); + + /** + * @notice Send a generic L2 message to the chain + * @dev This method is an optimization to avoid having to emit the entirety of the messageData in a log. Instead validators are expected to be able to parse the data from the transaction's input + * @param messageData Data of the message being sent + */ + function sendL2MessageFromOrigin(bytes calldata messageData) external returns (uint256); + + /** + * @notice Send a generic L2 message to the chain + * @dev This method can be used to send any type of message that doesn't require L1 validation + * @param messageData Data of the message being sent + */ + function sendL2Message(bytes calldata messageData) external returns (uint256); + + function sendL1FundedUnsignedTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + uint256 nonce, + address to, + bytes calldata data + ) external payable returns (uint256); + + function sendL1FundedContractTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + address to, + bytes calldata data + ) external payable returns (uint256); + + function sendUnsignedTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + uint256 nonce, + address to, + uint256 value, + bytes calldata data + ) external returns (uint256); + + function sendContractTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + address to, + uint256 value, + bytes calldata data + ) external returns (uint256); + + /** + * @notice Get the L1 fee for submitting a retryable + * @dev This fee can be paid by funds already in the L2 aliased address or by the current message value + * @dev This formula may change in the future, to future proof your code query this method instead of inlining!! + * @param dataLength The length of the retryable's calldata, in bytes + * @param baseFee The block basefee when the retryable is included in the chain, if 0 current block.basefee will be used + */ + function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) external view returns (uint256); + + /** + * @notice Deposit eth from L1 to L2 to address of the sender if sender is an EOA, and to its aliased address if the sender is a contract + * @dev This does not trigger the fallback function when receiving in the L2 side. + * Look into retryable tickets if you are interested in this functionality. + * @dev This function should not be called inside contract constructors + */ + function depositEth() external payable returns (uint256); + + /** + * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts + * @dev all msg.value will deposited to callValueRefundAddress on L2 + * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error + * @param to destination L2 contract address + * @param l2CallValue call value for retryable L2 message + * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee + * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance + * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled + * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param data ABI encoded data of L2 message + * @return unique message number of the retryable transaction + */ + function createRetryableTicket( + address to, + uint256 l2CallValue, + uint256 maxSubmissionCost, + address excessFeeRefundAddress, + address callValueRefundAddress, + uint256 gasLimit, + uint256 maxFeePerGas, + bytes calldata data + ) external payable returns (uint256); + + /** + * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts + * @dev Same as createRetryableTicket, but does not guarantee that submission will succeed by requiring the needed funds + * come from the deposit alone, rather than falling back on the user's L2 balance + * @dev Advanced usage only (does not rewrite aliases for excessFeeRefundAddress and callValueRefundAddress). + * createRetryableTicket method is the recommended standard. + * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error + * @param to destination L2 contract address + * @param l2CallValue call value for retryable L2 message + * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee + * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance + * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled + * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param data ABI encoded data of L2 message + * @return unique message number of the retryable transaction + */ + function unsafeCreateRetryableTicket( + address to, + uint256 l2CallValue, + uint256 maxSubmissionCost, + address excessFeeRefundAddress, + address callValueRefundAddress, + uint256 gasLimit, + uint256 maxFeePerGas, + bytes calldata data + ) external payable returns (uint256); + + // ---------- onlyRollupOrOwner functions ---------- + + /// @notice pauses all inbox functionality + function pause() external; + + /// @notice unpauses all inbox functionality + function unpause() external; + + // ---------- initializer ---------- + + /** + * @dev function to be called one time during the inbox upgrade process + * this is used to fix the storage slots + */ + function postUpgradeInit(IBridge _bridge) external; + + // OpenZeppelin: changed _sequencerInbox type from ISequencerInbox + function initialize(IBridge _bridge, address _sequencerInbox) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol new file mode 100644 index 00000000..359ea6c1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol @@ -0,0 +1,117 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IOutbox.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +import "./IBridge.sol"; + +interface IOutbox { + event SendRootUpdated(bytes32 indexed blockHash, bytes32 indexed outputRoot); + event OutBoxTransactionExecuted( + address indexed to, + address indexed l2Sender, + uint256 indexed zero, + uint256 transactionIndex + ); + + function rollup() external view returns (address); // the rollup contract + + function bridge() external view returns (IBridge); // the bridge contract + + function spent(uint256) external view returns (bytes32); // packed spent bitmap + + function roots(bytes32) external view returns (bytes32); // maps root hashes => L2 block hash + + // solhint-disable-next-line func-name-mixedcase + function OUTBOX_VERSION() external view returns (uint128); // the outbox version + + function updateSendRoot(bytes32 sendRoot, bytes32 l2BlockHash) external; + + /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account + /// When the return value is zero, that means this is a system message + /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies + function l2ToL1Sender() external view returns (address); + + /// @return l2Block return L2 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active + function l2ToL1Block() external view returns (uint256); + + /// @return l1Block return L1 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active + function l2ToL1EthBlock() external view returns (uint256); + + /// @return timestamp return L2 timestamp when the L2 tx was initiated or 0 if no L2 to L1 transaction is active + function l2ToL1Timestamp() external view returns (uint256); + + /// @return outputId returns the unique output identifier of the L2 to L1 tx or 0 if no L2 to L1 transaction is active + function l2ToL1OutputId() external view returns (bytes32); + + /** + * @notice Executes a messages in an Outbox entry. + * @dev Reverts if dispute period hasn't expired, since the outbox entry + * is only created once the rollup confirms the respective assertion. + * @dev it is not possible to execute any L2-to-L1 transaction which contains data + * to a contract address without any code (as enforced by the Bridge contract). + * @param proof Merkle proof of message inclusion in send root + * @param index Merkle path to message + * @param l2Sender sender if original message (i.e., caller of ArbSys.sendTxToL1) + * @param to destination address for L1 contract call + * @param l2Block l2 block number at which sendTxToL1 call was made + * @param l1Block l1 block number at which sendTxToL1 call was made + * @param l2Timestamp l2 Timestamp at which sendTxToL1 call was made + * @param value wei in L1 message + * @param data abi-encoded L1 message data + */ + function executeTransaction( + bytes32[] calldata proof, + uint256 index, + address l2Sender, + address to, + uint256 l2Block, + uint256 l1Block, + uint256 l2Timestamp, + uint256 value, + bytes calldata data + ) external; + + /** + * @dev function used to simulate the result of a particular function call from the outbox + * it is useful for things such as gas estimates. This function includes all costs except for + * proof validation (which can be considered offchain as a somewhat of a fixed cost - it's + * not really a fixed cost, but can be treated as so with a fixed overhead for gas estimation). + * We can't include the cost of proof validation since this is intended to be used to simulate txs + * that are included in yet-to-be confirmed merkle roots. The simulation entrypoint could instead pretend + * to confirm a pending merkle root, but that would be less practical for integrating with tooling. + * It is only possible to trigger it when the msg sender is address zero, which should be impossible + * unless under simulation in an eth_call or eth_estimateGas + */ + function executeTransactionSimulation( + uint256 index, + address l2Sender, + address to, + uint256 l2Block, + uint256 l1Block, + uint256 l2Timestamp, + uint256 value, + bytes calldata data + ) external; + + /** + * @param index Merkle path to message + * @return true if the message has been spent + */ + function isSpent(uint256 index) external view returns (bool); + + function calculateItemHash( + address l2Sender, + address to, + uint256 l2Block, + uint256 l1Block, + uint256 l2Timestamp, + uint256 value, + bytes calldata data + ) external pure returns (bytes32); + + function calculateMerkleRoot(bytes32[] memory proof, uint256 path, bytes32 item) external pure returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/compound/ICompoundTimelock.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/compound/ICompoundTimelock.sol new file mode 100644 index 00000000..fb33a680 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/compound/ICompoundTimelock.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (vendor/compound/ICompoundTimelock.sol) + +pragma solidity ^0.8.0; + +/** + * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface + */ +interface ICompoundTimelock { + event NewAdmin(address indexed newAdmin); + event NewPendingAdmin(address indexed newPendingAdmin); + event NewDelay(uint256 indexed newDelay); + event CancelTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event ExecuteTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event QueueTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + + receive() external payable; + + // solhint-disable-next-line func-name-mixedcase + function GRACE_PERIOD() external view returns (uint256); + + // solhint-disable-next-line func-name-mixedcase + function MINIMUM_DELAY() external view returns (uint256); + + // solhint-disable-next-line func-name-mixedcase + function MAXIMUM_DELAY() external view returns (uint256); + + function admin() external view returns (address); + + function pendingAdmin() external view returns (address); + + function delay() external view returns (uint256); + + function queuedTransactions(bytes32) external view returns (bool); + + function setDelay(uint256) external; + + function acceptAdmin() external; + + function setPendingAdmin(address) external; + + function queueTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external returns (bytes32); + + function cancelTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external; + + function executeTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external payable returns (bytes memory); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol new file mode 100644 index 00000000..461b88f6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/optimism/ICrossDomainMessenger.sol) +pragma solidity >0.5.0 <0.9.0; + +/** + * @title ICrossDomainMessenger + */ +interface ICrossDomainMessenger { + /********** + * Events * + **********/ + + event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit); + event RelayedMessage(bytes32 indexed msgHash); + event FailedRelayedMessage(bytes32 indexed msgHash); + + /************* + * Variables * + *************/ + + function xDomainMessageSender() external view returns (address); + + /******************** + * Public Functions * + ********************/ + + /** + * Sends a cross domain message to the target messenger. + * @param _target Target contract address. + * @param _message Message to send to the target. + * @param _gasLimit Gas limit for the provided message. + */ + function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol new file mode 100644 index 00000000..1c7b6f6f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/polygon/IFxMessageProcessor.sol) +pragma solidity ^0.8.0; + +interface IFxMessageProcessor { + function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/README.md b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/README.md new file mode 100644 index 00000000..53130e3c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/README.md @@ -0,0 +1,94 @@ +# OpenZeppelin + +[![NPM Package](https://img.shields.io/npm/v/@openzeppelin/contracts.svg)](https://www.npmjs.org/package/@openzeppelin/contracts) +[![Coverage Status](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts/graph/badge.svg)](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts) +[![GitPOAPs](https://public-api.gitpoap.io/v1/repo/OpenZeppelin/openzeppelin-contracts/badge)](https://www.gitpoap.io/gh/OpenZeppelin/openzeppelin-contracts) +[![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-yellow)](https://docs.openzeppelin.com/contracts) +[![Forum](https://img.shields.io/badge/forum-%F0%9F%92%AC-yellow)](https://docs.openzeppelin.com/contracts) + +**A library for secure smart contract development.** Build on a solid foundation of community-vetted code. + + * Implementations of standards like [ERC20](https://docs.openzeppelin.com/contracts/erc20) and [ERC721](https://docs.openzeppelin.com/contracts/erc721). + * Flexible [role-based permissioning](https://docs.openzeppelin.com/contracts/access-control) scheme. + * Reusable [Solidity components](https://docs.openzeppelin.com/contracts/utilities) to build custom contracts and complex decentralized systems. + +:mage: **Not sure how to get started?** Check out [Contracts Wizard](https://wizard.openzeppelin.com/) — an interactive smart contract generator. + +:building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a secure platform for automating and monitoring your operations. + +> **Note** +> You are looking at the upgradeable variant of OpenZeppelin Contracts. Be sure to review the documentation on [Using OpenZeppelin Contracts with Upgrades](https://docs.openzeppelin.com/contracts/4.x/upgradeable). + +## Overview + +### Installation + +``` +$ npm install @openzeppelin/contracts-upgradeable +``` + +OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version. + +An alternative to npm is to use the GitHub repository (`openzeppelin/openzeppelin-contracts-upgradeable`) to retrieve the contracts. When doing this, make sure to specify the tag for a release such as `v4.5.0`, instead of using the `master` branch. + +### Usage + +Once installed, you can use the contracts in the library by importing them: + +```solidity +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; + +contract MyCollectible is ERC721Upgradeable { + function initialize() initializer public { + __ERC721_init("MyCollectible", "MCO"); + } +} +``` + +_If you're new to smart contract development, head to [Developing Smart Contracts](https://docs.openzeppelin.com/learn/developing-smart-contracts) to learn about creating a new project and compiling your contracts._ + +To keep your system secure, you should **always** use the installed code as-is, and neither copy-paste it from online sources nor modify it yourself. The library is designed so that only the contracts and functions you use are deployed, so you don't need to worry about it needlessly increasing gas costs. + +## Learn More + +The guides in the [documentation site](https://docs.openzeppelin.com/contracts) will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides: + +* [Access Control](https://docs.openzeppelin.com/contracts/access-control): decide who can perform each of the actions on your system. +* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives, and distribute them via [Crowdsales](https://docs.openzeppelin.com/contracts/crowdsales). +* [Utilities](https://docs.openzeppelin.com/contracts/utilities): generic useful tools including non-overflowing math, signature verification, and trustless paying systems. + +The [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the [community forum](https://forum.openzeppelin.com). + +Finally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/guides), which cover several common use cases and good practices. The following articles provide great background reading, though please note that some of the referenced tools have changed, as the tooling in the ecosystem continues to rapidly evolve. + +* [The Hitchhiker’s Guide to Smart Contracts in Ethereum](https://blog.openzeppelin.com/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) will help you get an overview of the various tools available for smart contract development, and help you set up your environment. +* [A Gentle Introduction to Ethereum Programming, Part 1](https://blog.openzeppelin.com/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094) provides very useful information on an introductory level, including many basic concepts from the Ethereum platform. +* For a more in-depth dive, you may read the guide [Designing the Architecture for Your Ethereum Application](https://blog.openzeppelin.com/designing-the-architecture-for-your-ethereum-application-9cec086f8317), which discusses how to better structure your application and its relationship to the real world. + +## Security + +This project is maintained by [OpenZeppelin](https://openzeppelin.com) with the goal of providing a secure and reliable library of smart contract components for the ecosystem. We address security through risk management in various areas such as engineering and open source best practices, scoping and API design, multi-layered review processes, and incident response preparedness. + +The security policy is detailed in [`SECURITY.md`](./SECURITY.md), and specifies how you can report security vulnerabilities, which versions will receive security patches, and how to stay informed about them. We run a [bug bounty program on Immunefi](https://immunefi.com/bounty/openzeppelin) to reward the responsible disclosure of vulnerabilities. + +The engineering guidelines we follow to promote project quality can be found in [`GUIDELINES.md`](./GUIDELINES.md). + +Past audits can be found in [`audits/`](./audits). + +Smart contracts are a nascent technology and carry a high level of technical risk and uncertainty. Although OpenZeppelin is well known for its security audits, using OpenZeppelin Contracts is not a substitute for a security audit. + +OpenZeppelin Contracts is made available under the MIT License, which disclaims all warranties in relation to the project and which limits the liability of those that contribute and maintain the project, including OpenZeppelin. As set out further in the Terms, you acknowledge that you are solely responsible for any use of OpenZeppelin Contracts and you assume all risks associated with any such use. + +## Contribute + +OpenZeppelin Contracts exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out the [contribution guide](CONTRIBUTING.md)! + +## License + +OpenZeppelin Contracts is released under the [MIT License](LICENSE). + +## Legal + +Your use of this Project is governed by the terms found at www.openzeppelin.com/tos (the "Terms"). diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol new file mode 100644 index 00000000..4c5a822f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControlCrossChain.sol) + +pragma solidity ^0.8.4; + +import "./AccessControlUpgradeable.sol"; +import "../crosschain/CrossChainEnabledUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev An extension to {AccessControl} with support for cross-chain access management. + * For each role, is extension implements an equivalent "aliased" role that is used for + * restricting calls originating from other chains. + * + * For example, if a function `myFunction` is protected by `onlyRole(SOME_ROLE)`, and + * if an address `x` has role `SOME_ROLE`, it would be able to call `myFunction` directly. + * A wallet or contract at the same address on another chain would however not be able + * to call this function. In order to do so, it would require to have the role + * `_crossChainRoleAlias(SOME_ROLE)`. + * + * This aliasing is required to protect against multiple contracts living at the same + * address on different chains but controlled by conflicting entities. + * + * _Available since v4.6._ + */ +abstract contract AccessControlCrossChainUpgradeable is Initializable, AccessControlUpgradeable, CrossChainEnabledUpgradeable { + bytes32 public constant CROSSCHAIN_ALIAS = keccak256("CROSSCHAIN_ALIAS"); + + function __AccessControlCrossChain_init() internal onlyInitializing { + } + + function __AccessControlCrossChain_init_unchained() internal onlyInitializing { + } + /** + * @dev See {AccessControl-_checkRole}. + */ + function _checkRole(bytes32 role) internal view virtual override { + if (_isCrossChain()) { + _checkRole(_crossChainRoleAlias(role), _crossChainSender()); + } else { + super._checkRole(role); + } + } + + /** + * @dev Returns the aliased role corresponding to `role`. + */ + function _crossChainRoleAlias(bytes32 role) internal pure virtual returns (bytes32) { + return role ^ CROSSCHAIN_ALIAS; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlDefaultAdminRulesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlDefaultAdminRulesUpgradeable.sol new file mode 100644 index 00000000..fe82ee2d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlDefaultAdminRulesUpgradeable.sol @@ -0,0 +1,395 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControlDefaultAdminRules.sol) + +pragma solidity ^0.8.0; + +import "./AccessControlUpgradeable.sol"; +import "./IAccessControlDefaultAdminRulesUpgradeable.sol"; +import "../utils/math/SafeCastUpgradeable.sol"; +import "../interfaces/IERC5313Upgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {AccessControl} that allows specifying special rules to manage + * the `DEFAULT_ADMIN_ROLE` holder, which is a sensitive role with special permissions + * over other roles that may potentially have privileged rights in the system. + * + * If a specific role doesn't have an admin role assigned, the holder of the + * `DEFAULT_ADMIN_ROLE` will have the ability to grant it and revoke it. + * + * This contract implements the following risk mitigations on top of {AccessControl}: + * + * * Only one account holds the `DEFAULT_ADMIN_ROLE` since deployment until it's potentially renounced. + * * Enforces a 2-step process to transfer the `DEFAULT_ADMIN_ROLE` to another account. + * * Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted. + * * The delay can be changed by scheduling, see {changeDefaultAdminDelay}. + * * It is not possible to use another role to manage the `DEFAULT_ADMIN_ROLE`. + * + * Example usage: + * + * ```solidity + * contract MyToken is AccessControlDefaultAdminRules { + * constructor() AccessControlDefaultAdminRules( + * 3 days, + * msg.sender // Explicit initial `DEFAULT_ADMIN_ROLE` holder + * ) {} + * } + * ``` + * + * _Available since v4.9._ + */ +abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IAccessControlDefaultAdminRulesUpgradeable, IERC5313Upgradeable, AccessControlUpgradeable { + // pending admin pair read/written together frequently + address private _pendingDefaultAdmin; + uint48 private _pendingDefaultAdminSchedule; // 0 == unset + + uint48 private _currentDelay; + address private _currentDefaultAdmin; + + // pending delay pair read/written together frequently + uint48 private _pendingDelay; + uint48 private _pendingDelaySchedule; // 0 == unset + + /** + * @dev Sets the initial values for {defaultAdminDelay} and {defaultAdmin} address. + */ + function __AccessControlDefaultAdminRules_init(uint48 initialDelay, address initialDefaultAdmin) internal onlyInitializing { + __AccessControlDefaultAdminRules_init_unchained(initialDelay, initialDefaultAdmin); + } + + function __AccessControlDefaultAdminRules_init_unchained(uint48 initialDelay, address initialDefaultAdmin) internal onlyInitializing { + require(initialDefaultAdmin != address(0), "AccessControl: 0 default admin"); + _currentDelay = initialDelay; + _grantRole(DEFAULT_ADMIN_ROLE, initialDefaultAdmin); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlDefaultAdminRulesUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC5313-owner}. + */ + function owner() public view virtual returns (address) { + return defaultAdmin(); + } + + /// + /// Override AccessControl role management + /// + + /** + * @dev See {AccessControl-grantRole}. Reverts for `DEFAULT_ADMIN_ROLE`. + */ + function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { + require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly grant default admin role"); + super.grantRole(role, account); + } + + /** + * @dev See {AccessControl-revokeRole}. Reverts for `DEFAULT_ADMIN_ROLE`. + */ + function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { + require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly revoke default admin role"); + super.revokeRole(role, account); + } + + /** + * @dev See {AccessControl-renounceRole}. + * + * For the `DEFAULT_ADMIN_ROLE`, it only allows renouncing in two steps by first calling + * {beginDefaultAdminTransfer} to the `address(0)`, so it's required that the {pendingDefaultAdmin} schedule + * has also passed when calling this function. + * + * After its execution, it will not be possible to call `onlyRole(DEFAULT_ADMIN_ROLE)` functions. + * + * NOTE: Renouncing `DEFAULT_ADMIN_ROLE` will leave the contract without a {defaultAdmin}, + * thereby disabling any functionality that is only available for it, and the possibility of reassigning a + * non-administrated role. + */ + function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { + if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { + (address newDefaultAdmin, uint48 schedule) = pendingDefaultAdmin(); + require( + newDefaultAdmin == address(0) && _isScheduleSet(schedule) && _hasSchedulePassed(schedule), + "AccessControl: only can renounce in two delayed steps" + ); + delete _pendingDefaultAdminSchedule; + } + super.renounceRole(role, account); + } + + /** + * @dev See {AccessControl-_grantRole}. + * + * For `DEFAULT_ADMIN_ROLE`, it only allows granting if there isn't already a {defaultAdmin} or if the + * role has been previously renounced. + * + * NOTE: Exposing this function through another mechanism may make the `DEFAULT_ADMIN_ROLE` + * assignable again. Make sure to guarantee this is the expected behavior in your implementation. + */ + function _grantRole(bytes32 role, address account) internal virtual override { + if (role == DEFAULT_ADMIN_ROLE) { + require(defaultAdmin() == address(0), "AccessControl: default admin already granted"); + _currentDefaultAdmin = account; + } + super._grantRole(role, account); + } + + /** + * @dev See {AccessControl-_revokeRole}. + */ + function _revokeRole(bytes32 role, address account) internal virtual override { + if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { + delete _currentDefaultAdmin; + } + super._revokeRole(role, account); + } + + /** + * @dev See {AccessControl-_setRoleAdmin}. Reverts for `DEFAULT_ADMIN_ROLE`. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual override { + require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't violate default admin rules"); + super._setRoleAdmin(role, adminRole); + } + + /// + /// AccessControlDefaultAdminRules accessors + /// + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function defaultAdmin() public view virtual returns (address) { + return _currentDefaultAdmin; + } + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function pendingDefaultAdmin() public view virtual returns (address newAdmin, uint48 schedule) { + return (_pendingDefaultAdmin, _pendingDefaultAdminSchedule); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function defaultAdminDelay() public view virtual returns (uint48) { + uint48 schedule = _pendingDelaySchedule; + return (_isScheduleSet(schedule) && _hasSchedulePassed(schedule)) ? _pendingDelay : _currentDelay; + } + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function pendingDefaultAdminDelay() public view virtual returns (uint48 newDelay, uint48 schedule) { + schedule = _pendingDelaySchedule; + return (_isScheduleSet(schedule) && !_hasSchedulePassed(schedule)) ? (_pendingDelay, schedule) : (0, 0); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function defaultAdminDelayIncreaseWait() public view virtual returns (uint48) { + return 5 days; + } + + /// + /// AccessControlDefaultAdminRules public and internal setters for defaultAdmin/pendingDefaultAdmin + /// + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function beginDefaultAdminTransfer(address newAdmin) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _beginDefaultAdminTransfer(newAdmin); + } + + /** + * @dev See {beginDefaultAdminTransfer}. + * + * Internal function without access restriction. + */ + function _beginDefaultAdminTransfer(address newAdmin) internal virtual { + uint48 newSchedule = SafeCastUpgradeable.toUint48(block.timestamp) + defaultAdminDelay(); + _setPendingDefaultAdmin(newAdmin, newSchedule); + emit DefaultAdminTransferScheduled(newAdmin, newSchedule); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function cancelDefaultAdminTransfer() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _cancelDefaultAdminTransfer(); + } + + /** + * @dev See {cancelDefaultAdminTransfer}. + * + * Internal function without access restriction. + */ + function _cancelDefaultAdminTransfer() internal virtual { + _setPendingDefaultAdmin(address(0), 0); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function acceptDefaultAdminTransfer() public virtual { + (address newDefaultAdmin, ) = pendingDefaultAdmin(); + require(_msgSender() == newDefaultAdmin, "AccessControl: pending admin must accept"); + _acceptDefaultAdminTransfer(); + } + + /** + * @dev See {acceptDefaultAdminTransfer}. + * + * Internal function without access restriction. + */ + function _acceptDefaultAdminTransfer() internal virtual { + (address newAdmin, uint48 schedule) = pendingDefaultAdmin(); + require(_isScheduleSet(schedule) && _hasSchedulePassed(schedule), "AccessControl: transfer delay not passed"); + _revokeRole(DEFAULT_ADMIN_ROLE, defaultAdmin()); + _grantRole(DEFAULT_ADMIN_ROLE, newAdmin); + delete _pendingDefaultAdmin; + delete _pendingDefaultAdminSchedule; + } + + /// + /// AccessControlDefaultAdminRules public and internal setters for defaultAdminDelay/pendingDefaultAdminDelay + /// + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function changeDefaultAdminDelay(uint48 newDelay) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _changeDefaultAdminDelay(newDelay); + } + + /** + * @dev See {changeDefaultAdminDelay}. + * + * Internal function without access restriction. + */ + function _changeDefaultAdminDelay(uint48 newDelay) internal virtual { + uint48 newSchedule = SafeCastUpgradeable.toUint48(block.timestamp) + _delayChangeWait(newDelay); + _setPendingDelay(newDelay, newSchedule); + emit DefaultAdminDelayChangeScheduled(newDelay, newSchedule); + } + + /** + * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable + */ + function rollbackDefaultAdminDelay() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { + _rollbackDefaultAdminDelay(); + } + + /** + * @dev See {rollbackDefaultAdminDelay}. + * + * Internal function without access restriction. + */ + function _rollbackDefaultAdminDelay() internal virtual { + _setPendingDelay(0, 0); + } + + /** + * @dev Returns the amount of seconds to wait after the `newDelay` will + * become the new {defaultAdminDelay}. + * + * The value returned guarantees that if the delay is reduced, it will go into effect + * after a wait that honors the previously set delay. + * + * See {defaultAdminDelayIncreaseWait}. + */ + function _delayChangeWait(uint48 newDelay) internal view virtual returns (uint48) { + uint48 currentDelay = defaultAdminDelay(); + + // When increasing the delay, we schedule the delay change to occur after a period of "new delay" has passed, up + // to a maximum given by defaultAdminDelayIncreaseWait, by default 5 days. For example, if increasing from 1 day + // to 3 days, the new delay will come into effect after 3 days. If increasing from 1 day to 10 days, the new + // delay will come into effect after 5 days. The 5 day wait period is intended to be able to fix an error like + // using milliseconds instead of seconds. + // + // When decreasing the delay, we wait the difference between "current delay" and "new delay". This guarantees + // that an admin transfer cannot be made faster than "current delay" at the time the delay change is scheduled. + // For example, if decreasing from 10 days to 3 days, the new delay will come into effect after 7 days. + return + newDelay > currentDelay + ? uint48(MathUpgradeable.min(newDelay, defaultAdminDelayIncreaseWait())) // no need to safecast, both inputs are uint48 + : currentDelay - newDelay; + } + + /// + /// Private setters + /// + + /** + * @dev Setter of the tuple for pending admin and its schedule. + * + * May emit a DefaultAdminTransferCanceled event. + */ + function _setPendingDefaultAdmin(address newAdmin, uint48 newSchedule) private { + (, uint48 oldSchedule) = pendingDefaultAdmin(); + + _pendingDefaultAdmin = newAdmin; + _pendingDefaultAdminSchedule = newSchedule; + + // An `oldSchedule` from `pendingDefaultAdmin()` is only set if it hasn't been accepted. + if (_isScheduleSet(oldSchedule)) { + // Emit for implicit cancellations when another default admin was scheduled. + emit DefaultAdminTransferCanceled(); + } + } + + /** + * @dev Setter of the tuple for pending delay and its schedule. + * + * May emit a DefaultAdminDelayChangeCanceled event. + */ + function _setPendingDelay(uint48 newDelay, uint48 newSchedule) private { + uint48 oldSchedule = _pendingDelaySchedule; + + if (_isScheduleSet(oldSchedule)) { + if (_hasSchedulePassed(oldSchedule)) { + // Materialize a virtual delay + _currentDelay = _pendingDelay; + } else { + // Emit for implicit cancellations when another delay was scheduled. + emit DefaultAdminDelayChangeCanceled(); + } + } + + _pendingDelay = newDelay; + _pendingDelaySchedule = newSchedule; + } + + /// + /// Private helpers + /// + + /** + * @dev Defines if an `schedule` is considered set. For consistency purposes. + */ + function _isScheduleSet(uint48 schedule) private pure returns (bool) { + return schedule != 0; + } + + /** + * @dev Defines if an `schedule` is considered passed. For consistency purposes. + */ + function _hasSchedulePassed(uint48 schedule) private view returns (bool) { + return schedule < block.timestamp; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol new file mode 100644 index 00000000..61293e30 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControlEnumerableUpgradeable.sol"; +import "./AccessControlUpgradeable.sol"; +import "../utils/structs/EnumerableSetUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {AccessControl} that allows enumerating the members of each role. + */ +abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { + using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; + + mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; + + function __AccessControlEnumerable_init() internal onlyInitializing { + } + + function __AccessControlEnumerable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { + return _roleMembers[role].at(index); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { + return _roleMembers[role].length(); + } + + /** + * @dev Overload {_grantRole} to track enumerable memberships + */ + function _grantRole(bytes32 role, address account) internal virtual override { + super._grantRole(role, account); + _roleMembers[role].add(account); + } + + /** + * @dev Overload {_revokeRole} to track enumerable memberships + */ + function _revokeRole(bytes32 role, address account) internal virtual override { + super._revokeRole(role, account); + _roleMembers[role].remove(account); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlUpgradeable.sol new file mode 100644 index 00000000..2ef6bf2b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlUpgradeable.sol @@ -0,0 +1,261 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControlUpgradeable.sol"; +import "../utils/ContextUpgradeable.sol"; +import "../utils/StringsUpgradeable.sol"; +import "../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Contract module that allows children to implement role-based access + * control mechanisms. This is a lightweight version that doesn't allow enumerating role + * members except through off-chain means by accessing the contract event logs. Some + * applications may benefit from on-chain enumerability, for those cases see + * {AccessControlEnumerable}. + * + * Roles are referred to by their `bytes32` identifier. These should be exposed + * in the external API and be unique. The best way to achieve this is by + * using `public constant` hash digests: + * + * ```solidity + * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); + * ``` + * + * Roles can be used to represent a set of permissions. To restrict access to a + * function call, use {hasRole}: + * + * ```solidity + * function foo() public { + * require(hasRole(MY_ROLE, msg.sender)); + * ... + * } + * ``` + * + * Roles can be granted and revoked dynamically via the {grantRole} and + * {revokeRole} functions. Each role has an associated admin role, and only + * accounts that have a role's admin role can call {grantRole} and {revokeRole}. + * + * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means + * that only accounts with this role will be able to grant or revoke other + * roles. More complex role relationships can be created by using + * {_setRoleAdmin}. + * + * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to + * grant and revoke this role. Extra precautions should be taken to secure + * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} + * to enforce additional security measures for this role. + */ +abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { + struct RoleData { + mapping(address => bool) members; + bytes32 adminRole; + } + + mapping(bytes32 => RoleData) private _roles; + + bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; + + /** + * @dev Modifier that checks that an account has a specific role. Reverts + * with a standardized message including the required role. + * + * The format of the revert reason is given by the following regular expression: + * + * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + * + * _Available since v4.1._ + */ + modifier onlyRole(bytes32 role) { + _checkRole(role); + _; + } + + function __AccessControl_init() internal onlyInitializing { + } + + function __AccessControl_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) public view virtual override returns (bool) { + return _roles[role].members[account]; + } + + /** + * @dev Revert with a standard message if `_msgSender()` is missing `role`. + * Overriding this function changes the behavior of the {onlyRole} modifier. + * + * Format of the revert message is described in {_checkRole}. + * + * _Available since v4.6._ + */ + function _checkRole(bytes32 role) internal view virtual { + _checkRole(role, _msgSender()); + } + + /** + * @dev Revert with a standard message if `account` is missing `role`. + * + * The format of the revert reason is given by the following regular expression: + * + * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + */ + function _checkRole(bytes32 role, address account) internal view virtual { + if (!hasRole(role, account)) { + revert( + string( + abi.encodePacked( + "AccessControl: account ", + StringsUpgradeable.toHexString(account), + " is missing role ", + StringsUpgradeable.toHexString(uint256(role), 32) + ) + ) + ); + } + } + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { + return _roles[role].adminRole; + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + * + * May emit a {RoleGranted} event. + */ + function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + _grantRole(role, account); + } + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + * + * May emit a {RoleRevoked} event. + */ + function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + _revokeRole(role, account); + } + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been revoked `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + * + * May emit a {RoleRevoked} event. + */ + function renounceRole(bytes32 role, address account) public virtual override { + require(account == _msgSender(), "AccessControl: can only renounce roles for self"); + + _revokeRole(role, account); + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. Note that unlike {grantRole}, this function doesn't perform any + * checks on the calling account. + * + * May emit a {RoleGranted} event. + * + * [WARNING] + * ==== + * This function should only be called from the constructor when setting + * up the initial roles for the system. + * + * Using this function in any other way is effectively circumventing the admin + * system imposed by {AccessControl}. + * ==== + * + * NOTE: This function is deprecated in favor of {_grantRole}. + */ + function _setupRole(bytes32 role, address account) internal virtual { + _grantRole(role, account); + } + + /** + * @dev Sets `adminRole` as ``role``'s admin role. + * + * Emits a {RoleAdminChanged} event. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { + bytes32 previousAdminRole = getRoleAdmin(role); + _roles[role].adminRole = adminRole; + emit RoleAdminChanged(role, previousAdminRole, adminRole); + } + + /** + * @dev Grants `role` to `account`. + * + * Internal function without access restriction. + * + * May emit a {RoleGranted} event. + */ + function _grantRole(bytes32 role, address account) internal virtual { + if (!hasRole(role, account)) { + _roles[role].members[account] = true; + emit RoleGranted(role, account, _msgSender()); + } + } + + /** + * @dev Revokes `role` from `account`. + * + * Internal function without access restriction. + * + * May emit a {RoleRevoked} event. + */ + function _revokeRole(bytes32 role, address account) internal virtual { + if (hasRole(role, account)) { + _roles[role].members[account] = false; + emit RoleRevoked(role, account, _msgSender()); + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol new file mode 100644 index 00000000..0638e093 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/IAccessControlDefaultAdminRules.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControlUpgradeable.sol"; + +/** + * @dev External interface of AccessControlDefaultAdminRules declared to support ERC165 detection. + * + * _Available since v4.9._ + */ +interface IAccessControlDefaultAdminRulesUpgradeable is IAccessControlUpgradeable { + /** + * @dev Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next + * address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule` + * passes. + */ + event DefaultAdminTransferScheduled(address indexed newAdmin, uint48 acceptSchedule); + + /** + * @dev Emitted when a {pendingDefaultAdmin} is reset if it was never accepted, regardless of its schedule. + */ + event DefaultAdminTransferCanceled(); + + /** + * @dev Emitted when a {defaultAdminDelay} change is started, setting `newDelay` as the next + * delay to be applied between default admin transfer after `effectSchedule` has passed. + */ + event DefaultAdminDelayChangeScheduled(uint48 newDelay, uint48 effectSchedule); + + /** + * @dev Emitted when a {pendingDefaultAdminDelay} is reset if its schedule didn't pass. + */ + event DefaultAdminDelayChangeCanceled(); + + /** + * @dev Returns the address of the current `DEFAULT_ADMIN_ROLE` holder. + */ + function defaultAdmin() external view returns (address); + + /** + * @dev Returns a tuple of a `newAdmin` and an accept schedule. + * + * After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role + * by calling {acceptDefaultAdminTransfer}, completing the role transfer. + * + * A zero value only in `acceptSchedule` indicates no pending admin transfer. + * + * NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced. + */ + function pendingDefaultAdmin() external view returns (address newAdmin, uint48 acceptSchedule); + + /** + * @dev Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started. + * + * This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set + * the acceptance schedule. + * + * NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this + * function returns the new delay. See {changeDefaultAdminDelay}. + */ + function defaultAdminDelay() external view returns (uint48); + + /** + * @dev Returns a tuple of `newDelay` and an effect schedule. + * + * After the `schedule` passes, the `newDelay` will get into effect immediately for every + * new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}. + * + * A zero value only in `effectSchedule` indicates no pending delay change. + * + * NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay} + * will be zero after the effect schedule. + */ + function pendingDefaultAdminDelay() external view returns (uint48 newDelay, uint48 effectSchedule); + + /** + * @dev Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance + * after the current timestamp plus a {defaultAdminDelay}. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * Emits a DefaultAdminRoleChangeStarted event. + */ + function beginDefaultAdminTransfer(address newAdmin) external; + + /** + * @dev Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. + * + * A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * May emit a DefaultAdminTransferCanceled event. + */ + function cancelDefaultAdminTransfer() external; + + /** + * @dev Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. + * + * After calling the function: + * + * - `DEFAULT_ADMIN_ROLE` should be granted to the caller. + * - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder. + * - {pendingDefaultAdmin} should be reset to zero values. + * + * Requirements: + * + * - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`. + * - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed. + */ + function acceptDefaultAdminTransfer() external; + + /** + * @dev Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting + * into effect after the current timestamp plus a {defaultAdminDelay}. + * + * This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this + * method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay} + * set before calling. + * + * The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then + * calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin} + * complete transfer (including acceptance). + * + * The schedule is designed for two scenarios: + * + * - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by + * {defaultAdminDelayIncreaseWait}. + * - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`. + * + * A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event. + */ + function changeDefaultAdminDelay(uint48 newDelay) external; + + /** + * @dev Cancels a scheduled {defaultAdminDelay} change. + * + * Requirements: + * + * - Only can be called by the current {defaultAdmin}. + * + * May emit a DefaultAdminDelayChangeCanceled event. + */ + function rollbackDefaultAdminDelay() external; + + /** + * @dev Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay}) + * to take effect. Default to 5 days. + * + * When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with + * the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds) + * that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can + * be overrode for a custom {defaultAdminDelay} increase scheduling. + * + * IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise, + * there's a risk of setting a high new delay that goes into effect almost immediately without the + * possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds). + */ + function defaultAdminDelayIncreaseWait() external view returns (uint48); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol new file mode 100644 index 00000000..d7f00e90 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) + +pragma solidity ^0.8.0; + +import "./IAccessControlUpgradeable.sol"; + +/** + * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. + */ +interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) external view returns (address); + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) external view returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol new file mode 100644 index 00000000..963fdd1f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) + +pragma solidity ^0.8.0; + +/** + * @dev External interface of AccessControl declared to support ERC165 detection. + */ +interface IAccessControlUpgradeable { + /** + * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` + * + * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite + * {RoleAdminChanged} not being emitted signaling this. + * + * _Available since v3.1._ + */ + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + + /** + * @dev Emitted when `account` is granted `role`. + * + * `sender` is the account that originated the contract call, an admin role + * bearer except when using {AccessControl-_setupRole}. + */ + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Emitted when `account` is revoked `role`. + * + * `sender` is the account that originated the contract call: + * - if using `revokeRole`, it is the admin role bearer + * - if using `renounceRole`, it is the role bearer (i.e. `account`) + */ + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) external view returns (bool); + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {AccessControl-_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) external view returns (bytes32); + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function grantRole(bytes32 role, address account) external; + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function revokeRole(bytes32 role, address account) external; + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been granted `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + */ + function renounceRole(bytes32 role, address account) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol new file mode 100644 index 00000000..34c3c983 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) + +pragma solidity ^0.8.0; + +import "./OwnableUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Contract module which provides access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership} and {acceptOwnership}. + * + * This module is used through inheritance. It will make available all functions + * from parent (Ownable). + */ +abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { + address private _pendingOwner; + + event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); + + function __Ownable2Step_init() internal onlyInitializing { + __Ownable_init_unchained(); + } + + function __Ownable2Step_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns the address of the pending owner. + */ + function pendingOwner() public view virtual returns (address) { + return _pendingOwner; + } + + /** + * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual override onlyOwner { + _pendingOwner = newOwner; + emit OwnershipTransferStarted(owner(), newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual override { + delete _pendingOwner; + super._transferOwnership(newOwner); + } + + /** + * @dev The new owner accepts the ownership transfer. + */ + function acceptOwnership() public virtual { + address sender = _msgSender(); + require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); + _transferOwnership(sender); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol new file mode 100644 index 00000000..9b8399ff --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) + +pragma solidity ^0.8.0; + +import "../utils/ContextUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + function __Ownable_init() internal onlyInitializing { + __Ownable_init_unchained(); + } + + function __Ownable_init_unchained() internal onlyInitializing { + _transferOwnership(_msgSender()); + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + _checkOwner(); + _; + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if the sender is not the owner. + */ + function _checkOwner() internal view virtual { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby disabling any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + _transferOwnership(address(0)); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual { + address oldOwner = _owner; + _owner = newOwner; + emit OwnershipTransferred(oldOwner, newOwner); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc new file mode 100644 index 00000000..80ca0020 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc @@ -0,0 +1,27 @@ += Access Control + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/access + +This directory provides ways to restrict who can access the functions of a contract or when they can do it. + +- {AccessControl} provides a general role based access control mechanism. Multiple hierarchical roles can be created and assigned each to multiple accounts. +- {Ownable} is a simpler mechanism with a single owner "role" that can be assigned to a single account. This simpler mechanism can be useful for quick tests but projects with production concerns are likely to outgrow it. + +== Authorization + +{{Ownable}} + +{{Ownable2Step}} + +{{IAccessControl}} + +{{AccessControl}} + +{{AccessControlCrossChain}} + +{{IAccessControlEnumerable}} + +{{AccessControlEnumerable}} + +{{AccessControlDefaultAdminRules}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json new file mode 100644 index 00000000..78d6e1f4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json @@ -0,0 +1,241 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControlCrossChainUpgradeable", + "sourceName": "contracts/access/AccessControlCrossChainUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "CROSSCHAIN_ALIAS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json new file mode 100644 index 00000000..72080744 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json @@ -0,0 +1,413 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControlDefaultAdminRulesUpgradeable", + "sourceName": "contracts/access/AccessControlDefaultAdminRulesUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminDelayChangeCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "effectSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminDelayChangeScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminTransferCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "acceptSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminTransferScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "beginDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + } + ], + "name": "changeDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelayIncreaseWait", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollbackDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlEnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlEnumerableUpgradeable.json new file mode 100644 index 00000000..3d5bd6fa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlEnumerableUpgradeable.json @@ -0,0 +1,271 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControlEnumerableUpgradeable", + "sourceName": "contracts/access/AccessControlEnumerableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlUpgradeable.json new file mode 100644 index 00000000..5249f264 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlUpgradeable.json @@ -0,0 +1,228 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessControlUpgradeable", + "sourceName": "contracts/access/AccessControlUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json new file mode 100644 index 00000000..6dba1fe4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AddressUpgradeable", + "sourceName": "contracts/utils/AddressUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b5d3de90a80b3c54f7f70d12405beb5e859fdb6f03a20e43ec1ecfb4a2ff17ae64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b5d3de90a80b3c54f7f70d12405beb5e859fdb6f03a20e43ec1ecfb4a2ff17ae64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json new file mode 100644 index 00000000..deaffe91 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ArraysUpgradeable", + "sourceName": "contracts/utils/ArraysUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cb8458a1a8dcacdc7555eee46f53ed564e75cb1ce4350f51316ea9b5f1a5e86264736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cb8458a1a8dcacdc7555eee46f53ed564e75cb1ce4350f51316ea9b5f1a5e86264736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json new file mode 100644 index 00000000..a61982f3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Base64Upgradeable", + "sourceName": "contracts/utils/Base64Upgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba46c8f4d94d9ba757b159400cb8988eaa2fb8755e3f325489f32128fb4c7b5964736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba46c8f4d94d9ba757b159400cb8988eaa2fb8755e3f325489f32128fb4c7b5964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json new file mode 100644 index 00000000..fd438f99 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BitMapsUpgradeable", + "sourceName": "contracts/utils/structs/BitMapsUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220749146e2f7f435fe10128cac936ae771376ff5b54e4a07ef996395176db6590a64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220749146e2f7f435fe10128cac936ae771376ff5b54e4a07ef996395176db6590a64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json new file mode 100644 index 00000000..25624d06 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CheckpointsUpgradeable", + "sourceName": "contracts/utils/CheckpointsUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f5b158b322481ad803ef17cb5570e457d882d1a1a91557ed9a35832744bcf1e64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f5b158b322481ad803ef17cb5570e457d882d1a1a91557ed9a35832744bcf1e64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json new file mode 100644 index 00000000..f1954458 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ClonesUpgradeable", + "sourceName": "contracts/proxy/ClonesUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220328ac965bcf906b22031903e0eaf9e9ffcdbf1751921d8d767b9e8532f047dc664736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220328ac965bcf906b22031903e0eaf9e9ffcdbf1751921d8d767b9e8532f047dc664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json new file mode 100644 index 00000000..742850cd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json @@ -0,0 +1,185 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ConditionalEscrowUpgradeable", + "sourceName": "contracts/utils/escrow/ConditionalEscrowUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "depositsOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "withdrawalAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ContextUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ContextUpgradeable.json new file mode 100644 index 00000000..01657c10 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ContextUpgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ContextUpgradeable", + "sourceName": "contracts/utils/ContextUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json new file mode 100644 index 00000000..889419a8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CountersUpgradeable", + "sourceName": "contracts/utils/CountersUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d8e9a90cd6533f357804be52e54b4b7ba0a73c4aac5a744b588b3c77d9974b1d64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d8e9a90cd6533f357804be52e54b4b7ba0a73c4aac5a744b588b3c77d9974b1d64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json new file mode 100644 index 00000000..59a8517d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Create2Upgradeable", + "sourceName": "contracts/utils/Create2Upgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fca76b6dc79f68619e07179495313c8753ee72ebadb67a349f8671f8afe86a7764736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fca76b6dc79f68619e07179495313c8753ee72ebadb67a349f8671f8afe86a7764736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json new file mode 100644 index 00000000..4e8addc1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledAMBUpgradeable", + "sourceName": "contracts/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "bridge", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x60a0604052348015600f57600080fd5b5060405160bc38038060bc833981016040819052602a91603a565b6001600160a01b03166080526068565b600060208284031215604b57600080fd5b81516001600160a01b0381168114606157600080fd5b9392505050565b608051603f607d60003960005050603f6000f3fe6080604052600080fdfea264697066735822122055111f9525e543b915328ec6b36a1485755c4c5c899bc5b33f8af8630cde300964736f6c634300080d0033", + "deployedBytecode": "0x6080604052600080fdfea264697066735822122055111f9525e543b915328ec6b36a1485755c4c5c899bc5b33f8af8630cde300964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json new file mode 100644 index 00000000..8de68fe7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledArbitrumL1Upgradeable", + "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json new file mode 100644 index 00000000..3b327817 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledArbitrumL2Upgradeable", + "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json new file mode 100644 index 00000000..a0638e5c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledOptimismUpgradeable", + "sourceName": "contracts/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json new file mode 100644 index 00000000..274f6616 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json @@ -0,0 +1,52 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledPolygonChildUpgradeable", + "sourceName": "contracts/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "NotCrossChainCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rootMessageSender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "processMessageFromRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json new file mode 100644 index 00000000..ebc30fa7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrossChainEnabledUpgradeable", + "sourceName": "contracts/crosschain/CrossChainEnabledUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json new file mode 100644 index 00000000..37551416 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json @@ -0,0 +1,21 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "DoubleEndedQueueUpgradeable", + "sourceName": "contracts/utils/structs/DoubleEndedQueueUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfBounds", + "type": "error" + } + ], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122057a588c9a111b42c03d59d2ce19b91c2cc2ae09bc033eb692b49a6e641aec6d164736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122057a588c9a111b42c03d59d2ce19b91c2cc2ae09bc033eb692b49a6e641aec6d164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json new file mode 100644 index 00000000..e329be7f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ECDSAUpgradeable", + "sourceName": "contracts/utils/cryptography/ECDSAUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122019d381801bc1b029037013fd4ac098817be78995ac3ed49c8c5185ee59aabf8364736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122019d381801bc1b029037013fd4ac098817be78995ac3ed49c8c5185ee59aabf8364736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EIP712Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EIP712Upgradeable.json new file mode 100644 index 00000000..ab9fe936 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EIP712Upgradeable.json @@ -0,0 +1,73 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EIP712Upgradeable", + "sourceName": "contracts/utils/cryptography/EIP712Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155BurnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155BurnableUpgradeable.json new file mode 100644 index 00000000..72d16849 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155BurnableUpgradeable.json @@ -0,0 +1,382 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155BurnableUpgradeable", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "burnBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json new file mode 100644 index 00000000..8db3e834 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json @@ -0,0 +1,121 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155HolderUpgradeable", + "sourceName": "contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506103c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212206e6a61bb252ecc01600a8e12e454c166dc137b259467e326ea28a499fcb75eb864736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212206e6a61bb252ecc01600a8e12e454c166dc137b259467e326ea28a499fcb75eb864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PausableUpgradeable.json new file mode 100644 index 00000000..46398baf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PausableUpgradeable.json @@ -0,0 +1,375 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155PausableUpgradeable", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json new file mode 100644 index 00000000..8bcc4ed6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json @@ -0,0 +1,758 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155PresetMinterPauserUpgradeable", + "sourceName": "contracts/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "burnBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mintBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50612cc8806100206000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80638456cb59116100de578063d539139311610097578063e985e9c511610071578063e985e9c514610377578063f242432a146103b3578063f5298aca146103c6578063f62d1888146103d957600080fd5b8063d53913931461033a578063d547741f1461034f578063e63ab1e91461036257600080fd5b80638456cb59146102c65780639010d07c146102ce57806391d14854146102f9578063a217fddf1461030c578063a22cb46514610314578063ca15c8731461032757600080fd5b80632f2ff15d1161014b5780634e1273f4116101255780634e1273f4146102745780635c975abb146102945780636b20c454146102a0578063731133e9146102b357600080fd5b80632f2ff15d1461024657806336568abe146102595780633f4ba83a1461026c57600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e89341c146101db5780631f7fdffa146101fb578063248a9ca3146102105780632eb2c2d614610233575b600080fd5b6101a56101a0366004611f84565b6103ec565b6040519081526020015b60405180910390f35b6101cb6101c6366004611fc4565b610487565b60405190151581526020016101af565b6101ee6101e9366004611fe1565b610492565b6040516101af9190612052565b61020e6102093660046121b8565b610526565b005b6101a561021e366004611fe1565b60009081526065602052604090206001015490565b61020e610241366004612250565b61056c565b61020e6102543660046122f9565b6105b8565b61020e6102673660046122f9565b6105e2565b61020e610660565b610287610282366004612325565b6106f4565b6040516101af919061242a565b61012d5460ff166101cb565b61020e6102ae36600461243d565b61081d565b61020e6102c13660046124b0565b610860565b61020e6108a0565b6102e16102dc366004612504565b610932565b6040516001600160a01b0390911681526020016101af565b6101cb6103073660046122f9565b610951565b6101a5600081565b61020e610322366004612526565b61097c565b6101a5610335366004611fe1565b610987565b6101a5600080516020612c7383398151915281565b61020e61035d3660046122f9565b61099e565b6101a5600080516020612c5383398151915281565b6101cb610385366004612562565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b61020e6103c136600461258c565b6109c3565b61020e6103d43660046125f0565b610a08565b61020e6103e7366004612623565b610a4b565b60006001600160a01b03831661045c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815260c9602090815260408083206001600160a01b03861684529091529020545b92915050565b600061048182610b5d565b606060cb80546104a190612673565b80601f01602080910402602001604051908101604052809291908181526020018280546104cd90612673565b801561051a5780601f106104ef5761010080835404028352916020019161051a565b820191906000526020600020905b8154815290600101906020018083116104fd57829003601f168201915b50505050509050919050565b61053e600080516020612c7383398151915233610951565b61055a5760405162461bcd60e51b8152600401610453906126ad565b61056684848484610b9d565b50505050565b6001600160a01b03851633148061058857506105888533610385565b6105a45760405162461bcd60e51b81526004016104539061270a565b6105b18585858585610cf8565b5050505050565b6000828152606560205260409020600101546105d381610ea5565b6105dd8383610eb2565b505050565b6001600160a01b03811633146106525760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610453565b61065c8282610ed4565b5050565b610678600080516020612c5383398151915233610951565b6106ea5760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610453565b6106f2610ef6565b565b606081518351146107595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610453565b600083516001600160401b0381111561077457610774612065565b60405190808252806020026020018201604052801561079d578160200160208202803683370190505b50905060005b8451811015610815576107e88582815181106107c1576107c1612758565b60200260200101518583815181106107db576107db612758565b60200260200101516103ec565b8282815181106107fa576107fa612758565b602090810291909101015261080e81612784565b90506107a3565b509392505050565b6001600160a01b03831633148061083957506108398333610385565b6108555760405162461bcd60e51b81526004016104539061270a565b6105dd838383610f49565b610878600080516020612c7383398151915233610951565b6108945760405162461bcd60e51b8152600401610453906126ad565b610566848484846110e8565b6108b8600080516020612c5383398151915233610951565b61092a5760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610453565b6106f26111d3565b600082815260976020526040812061094a9083611211565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61065c33838361121d565b6000818152609760205260408120610481906112fd565b6000828152606560205260409020600101546109b981610ea5565b6105dd8383610ed4565b6001600160a01b0385163314806109df57506109df8533610385565b6109fb5760405162461bcd60e51b81526004016104539061270a565b6105b18585858585611307565b6001600160a01b038316331480610a245750610a248333610385565b610a405760405162461bcd60e51b81526004016104539061270a565b6105dd838383611443565b600054610100900460ff1615808015610a6b5750600054600160ff909116105b80610a855750303b158015610a85575060005460ff166001145b610ae85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610453565b6000805460ff191660011790558015610b0b576000805461ff0019166101001790555b610b148261155f565b801561065c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60006001600160e01b03198216636cdb3d1360e11b1480610b8e57506001600160e01b031982166303a24d0760e21b145b806104815750610481826115a0565b6001600160a01b038416610bc35760405162461bcd60e51b81526004016104539061279d565b8151835114610be45760405162461bcd60e51b8152600401610453906127de565b33610bf4816000878787876115c5565b60005b8451811015610c9057838181518110610c1257610c12612758565b602002602001015160c96000878481518110610c3057610c30612758565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c789190612826565b90915550819050610c8881612784565b915050610bf7565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ce192919061283e565b60405180910390a46105b1816000878787876115d3565b8151835114610d195760405162461bcd60e51b8152600401610453906127de565b6001600160a01b038416610d3f5760405162461bcd60e51b81526004016104539061286c565b33610d4e8187878787876115c5565b60005b8451811015610e37576000858281518110610d6e57610d6e612758565b602002602001015190506000858381518110610d8c57610d8c612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038e168352909352919091205490915081811015610ddd5760405162461bcd60e51b8152600401610453906128b1565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e1c908490612826565b9250508190555050505080610e3090612784565b9050610d51565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e8792919061283e565b60405180910390a4610e9d8187878787876115d3565b505050505050565b610eaf813361172e565b50565b610ebc8282611787565b60008281526097602052604090206105dd908261180d565b610ede8282611822565b60008281526097602052604090206105dd9082611889565b610efe61189e565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f6f5760405162461bcd60e51b8152600401610453906128fb565b8051825114610f905760405162461bcd60e51b8152600401610453906127de565b6000339050610fb3818560008686604051806020016040528060008152506115c5565b60005b835181101561107b576000848281518110610fd357610fd3612758565b602002602001015190506000848381518110610ff157610ff1612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038c1683529093529190912054909150818110156110425760405162461bcd60e51b81526004016104539061293e565b600092835260c9602090815260408085206001600160a01b038b168652909152909220910390558061107381612784565b915050610fb6565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516110cc92919061283e565b60405180910390a4604080516020810190915260009052610566565b6001600160a01b03841661110e5760405162461bcd60e51b81526004016104539061279d565b33600061111a856118e8565b90506000611127856118e8565b9050611138836000898585896115c5565b600086815260c9602090815260408083206001600160a01b038b1684529091528120805487929061116a908490612826565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46111ca83600089898989611933565b50505050505050565b6111db6119ee565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f2c3390565b600061094a8383611a35565b816001600160a01b0316836001600160a01b0316036112905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610453565b6001600160a01b03838116600081815260ca6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610481825490565b6001600160a01b03841661132d5760405162461bcd60e51b81526004016104539061286c565b336000611339856118e8565b90506000611346856118e8565b90506113568389898585896115c5565b600086815260c9602090815260408083206001600160a01b038c168452909152902054858110156113995760405162461bcd60e51b8152600401610453906128b1565b600087815260c9602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906113d8908490612826565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611438848a8a8a8a8a611933565b505050505050505050565b6001600160a01b0383166114695760405162461bcd60e51b8152600401610453906128fb565b336000611475846118e8565b90506000611482846118e8565b90506114a2838760008585604051806020016040528060008152506115c5565b600085815260c9602090815260408083206001600160a01b038a168452909152902054848110156114e55760405162461bcd60e51b81526004016104539061293e565b600086815260c9602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526111ca565b600054610100900460ff166115865760405162461bcd60e51b815260040161045390612982565b61158f81611a5f565b611597611a8f565b610eaf81611ac3565b60006001600160e01b03198216635a05180f60e01b1480610481575061048182611b25565b610e9d868686868686611b5a565b6001600160a01b0384163b15610e9d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061161790899089908890889088906004016129cd565b6020604051808303816000875af1925050508015611652575060408051601f3d908101601f1916820190925261164f91810190612a2b565b60015b6116fe5761165e612a48565b806308c379a0036116975750611672612a64565b8061167d5750611699565b8060405162461bcd60e51b81526004016104539190612052565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610453565b6001600160e01b0319811663bc197c8160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b6117388282610951565b61065c5761174581611bc3565b611750836020611bd5565b604051602001611761929190612b35565b60408051601f198184030181529082905262461bcd60e51b825261045391600401612052565b6117918282610951565b61065c5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117c93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061094a836001600160a01b038416611d70565b61182c8282610951565b1561065c5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061094a836001600160a01b038416611dbf565b61012d5460ff166106f25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610453565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061192257611922612758565b602090810291909101015292915050565b6001600160a01b0384163b15610e9d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906119779089908990889088908890600401612baa565b6020604051808303816000875af19250505080156119b2575060408051601f3d908101601f191682019092526119af91810190612a2b565b60015b6119be5761165e612a48565b6001600160e01b0319811663f23a6e6160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b61012d5460ff16156106f25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610453565b6000826000018281548110611a4c57611a4c612758565b9060005260206000200154905092915050565b600054610100900460ff16611a865760405162461bcd60e51b815260040161045390612982565b610eaf81611eb2565b600054610100900460ff16611ab65760405162461bcd60e51b815260040161045390612982565b61012d805460ff19169055565b600054610100900460ff16611aea5760405162461bcd60e51b815260040161045390612982565b611af5600033611ec5565b611b0d600080516020612c7383398151915233611ec5565b610eaf600080516020612c5383398151915233611ec5565b60006001600160e01b03198216637965db0b60e01b148061048157506301ffc9a760e01b6001600160e01b0319831614610481565b61012d5460ff1615610e9d5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610453565b60606104816001600160a01b03831660145b60606000611be4836002612bef565b611bef906002612826565b6001600160401b03811115611c0657611c06612065565b6040519080825280601f01601f191660200182016040528015611c30576020820181803683370190505b509050600360fc1b81600081518110611c4b57611c4b612758565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c7a57611c7a612758565b60200101906001600160f81b031916908160001a9053506000611c9e846002612bef565b611ca9906001612826565b90505b6001811115611d21576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cdd57611cdd612758565b1a60f81b828281518110611cf357611cf3612758565b60200101906001600160f81b031916908160001a90535060049490941c93611d1a81612c0e565b9050611cac565b50831561094a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610453565b6000818152600183016020526040812054611db757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610481565b506000610481565b60008181526001830160205260408120548015611ea8576000611de3600183612c25565b8554909150600090611df790600190612c25565b9050818114611e5c576000866000018281548110611e1757611e17612758565b9060005260206000200154905080876000018481548110611e3a57611e3a612758565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e6d57611e6d612c3c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610481565b6000915050610481565b805161065c9060cb906020840190611ecf565b61065c8282610eb2565b828054611edb90612673565b90600052602060002090601f016020900481019282611efd5760008555611f43565b82601f10611f1657805160ff1916838001178555611f43565b82800160010185558215611f43579182015b82811115611f43578251825591602001919060010190611f28565b50611f4f929150611f53565b5090565b5b80821115611f4f5760008155600101611f54565b80356001600160a01b0381168114611f7f57600080fd5b919050565b60008060408385031215611f9757600080fd5b611fa083611f68565b946020939093013593505050565b6001600160e01b031981168114610eaf57600080fd5b600060208284031215611fd657600080fd5b813561094a81611fae565b600060208284031215611ff357600080fd5b5035919050565b60005b83811015612015578181015183820152602001611ffd565b838111156105665750506000910152565b6000815180845261203e816020860160208601611ffa565b601f01601f19169290920160200192915050565b60208152600061094a6020830184612026565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156120a0576120a0612065565b6040525050565b60006001600160401b038211156120c0576120c0612065565b5060051b60200190565b600082601f8301126120db57600080fd5b813560206120e8826120a7565b6040516120f5828261207b565b83815260059390931b850182019282810191508684111561211557600080fd5b8286015b848110156121305780358352918301918301612119565b509695505050505050565b60006001600160401b0383111561215457612154612065565b60405161216b601f8501601f19166020018261207b565b80915083815284848401111561218057600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126121a957600080fd5b61094a8383356020850161213b565b600080600080608085870312156121ce57600080fd5b6121d785611f68565b935060208501356001600160401b03808211156121f357600080fd5b6121ff888389016120ca565b9450604087013591508082111561221557600080fd5b612221888389016120ca565b9350606087013591508082111561223757600080fd5b5061224487828801612198565b91505092959194509250565b600080600080600060a0868803121561226857600080fd5b61227186611f68565b945061227f60208701611f68565b935060408601356001600160401b038082111561229b57600080fd5b6122a789838a016120ca565b945060608801359150808211156122bd57600080fd5b6122c989838a016120ca565b935060808801359150808211156122df57600080fd5b506122ec88828901612198565b9150509295509295909350565b6000806040838503121561230c57600080fd5b8235915061231c60208401611f68565b90509250929050565b6000806040838503121561233857600080fd5b82356001600160401b038082111561234f57600080fd5b818501915085601f83011261236357600080fd5b81356020612370826120a7565b60405161237d828261207b565b83815260059390931b850182019282810191508984111561239d57600080fd5b948201945b838610156123c2576123b386611f68565b825294820194908201906123a2565b965050860135925050808211156123d857600080fd5b506123e5858286016120ca565b9150509250929050565b600081518084526020808501945080840160005b8381101561241f57815187529582019590820190600101612403565b509495945050505050565b60208152600061094a60208301846123ef565b60008060006060848603121561245257600080fd5b61245b84611f68565b925060208401356001600160401b038082111561247757600080fd5b612483878388016120ca565b9350604086013591508082111561249957600080fd5b506124a6868287016120ca565b9150509250925092565b600080600080608085870312156124c657600080fd5b6124cf85611f68565b9350602085013592506040850135915060608501356001600160401b038111156124f857600080fd5b61224487828801612198565b6000806040838503121561251757600080fd5b50508035926020909101359150565b6000806040838503121561253957600080fd5b61254283611f68565b91506020830135801515811461255757600080fd5b809150509250929050565b6000806040838503121561257557600080fd5b61257e83611f68565b915061231c60208401611f68565b600080600080600060a086880312156125a457600080fd5b6125ad86611f68565b94506125bb60208701611f68565b9350604086013592506060860135915060808601356001600160401b038111156125e457600080fd5b6122ec88828901612198565b60008060006060848603121561260557600080fd5b61260e84611f68565b95602085013595506040909401359392505050565b60006020828403121561263557600080fd5b81356001600160401b0381111561264b57600080fd5b8201601f8101841361265c57600080fd5b61266b8482356020840161213b565b949350505050565b600181811c9082168061268757607f821691505b6020821081036126a757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016127965761279661276e565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b600082198211156128395761283961276e565b500190565b60408152600061285160408301856123ef565b828103602084015261286381856123ef565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906129f9908301866123ef565b8281036060840152612a0b81866123ef565b90508281036080840152612a1f8185612026565b98975050505050505050565b600060208284031215612a3d57600080fd5b815161094a81611fae565b600060033d1115612a615760046000803e5060005160e01c5b90565b600060443d1015612a725790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612aa157505050505090565b8285019150815181811115612ab95750505050505090565b843d8701016020828501011115612ad35750505050505090565b612ae26020828601018761207b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b6d816017850160208801611ffa565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b9e816028840160208801611ffa565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612be490830184612026565b979650505050505050565b6000816000190483118215151615612c0957612c0961276e565b500290565b600081612c1d57612c1d61276e565b506000190190565b600082821015612c3757612c3761276e565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122074f93d3dbfcdae138425e5464f7a9ba83401fdaeebe9f4d4654f70483311cf7464736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c80638456cb59116100de578063d539139311610097578063e985e9c511610071578063e985e9c514610377578063f242432a146103b3578063f5298aca146103c6578063f62d1888146103d957600080fd5b8063d53913931461033a578063d547741f1461034f578063e63ab1e91461036257600080fd5b80638456cb59146102c65780639010d07c146102ce57806391d14854146102f9578063a217fddf1461030c578063a22cb46514610314578063ca15c8731461032757600080fd5b80632f2ff15d1161014b5780634e1273f4116101255780634e1273f4146102745780635c975abb146102945780636b20c454146102a0578063731133e9146102b357600080fd5b80632f2ff15d1461024657806336568abe146102595780633f4ba83a1461026c57600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e89341c146101db5780631f7fdffa146101fb578063248a9ca3146102105780632eb2c2d614610233575b600080fd5b6101a56101a0366004611f84565b6103ec565b6040519081526020015b60405180910390f35b6101cb6101c6366004611fc4565b610487565b60405190151581526020016101af565b6101ee6101e9366004611fe1565b610492565b6040516101af9190612052565b61020e6102093660046121b8565b610526565b005b6101a561021e366004611fe1565b60009081526065602052604090206001015490565b61020e610241366004612250565b61056c565b61020e6102543660046122f9565b6105b8565b61020e6102673660046122f9565b6105e2565b61020e610660565b610287610282366004612325565b6106f4565b6040516101af919061242a565b61012d5460ff166101cb565b61020e6102ae36600461243d565b61081d565b61020e6102c13660046124b0565b610860565b61020e6108a0565b6102e16102dc366004612504565b610932565b6040516001600160a01b0390911681526020016101af565b6101cb6103073660046122f9565b610951565b6101a5600081565b61020e610322366004612526565b61097c565b6101a5610335366004611fe1565b610987565b6101a5600080516020612c7383398151915281565b61020e61035d3660046122f9565b61099e565b6101a5600080516020612c5383398151915281565b6101cb610385366004612562565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b61020e6103c136600461258c565b6109c3565b61020e6103d43660046125f0565b610a08565b61020e6103e7366004612623565b610a4b565b60006001600160a01b03831661045c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815260c9602090815260408083206001600160a01b03861684529091529020545b92915050565b600061048182610b5d565b606060cb80546104a190612673565b80601f01602080910402602001604051908101604052809291908181526020018280546104cd90612673565b801561051a5780601f106104ef5761010080835404028352916020019161051a565b820191906000526020600020905b8154815290600101906020018083116104fd57829003601f168201915b50505050509050919050565b61053e600080516020612c7383398151915233610951565b61055a5760405162461bcd60e51b8152600401610453906126ad565b61056684848484610b9d565b50505050565b6001600160a01b03851633148061058857506105888533610385565b6105a45760405162461bcd60e51b81526004016104539061270a565b6105b18585858585610cf8565b5050505050565b6000828152606560205260409020600101546105d381610ea5565b6105dd8383610eb2565b505050565b6001600160a01b03811633146106525760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610453565b61065c8282610ed4565b5050565b610678600080516020612c5383398151915233610951565b6106ea5760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610453565b6106f2610ef6565b565b606081518351146107595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610453565b600083516001600160401b0381111561077457610774612065565b60405190808252806020026020018201604052801561079d578160200160208202803683370190505b50905060005b8451811015610815576107e88582815181106107c1576107c1612758565b60200260200101518583815181106107db576107db612758565b60200260200101516103ec565b8282815181106107fa576107fa612758565b602090810291909101015261080e81612784565b90506107a3565b509392505050565b6001600160a01b03831633148061083957506108398333610385565b6108555760405162461bcd60e51b81526004016104539061270a565b6105dd838383610f49565b610878600080516020612c7383398151915233610951565b6108945760405162461bcd60e51b8152600401610453906126ad565b610566848484846110e8565b6108b8600080516020612c5383398151915233610951565b61092a5760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610453565b6106f26111d3565b600082815260976020526040812061094a9083611211565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61065c33838361121d565b6000818152609760205260408120610481906112fd565b6000828152606560205260409020600101546109b981610ea5565b6105dd8383610ed4565b6001600160a01b0385163314806109df57506109df8533610385565b6109fb5760405162461bcd60e51b81526004016104539061270a565b6105b18585858585611307565b6001600160a01b038316331480610a245750610a248333610385565b610a405760405162461bcd60e51b81526004016104539061270a565b6105dd838383611443565b600054610100900460ff1615808015610a6b5750600054600160ff909116105b80610a855750303b158015610a85575060005460ff166001145b610ae85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610453565b6000805460ff191660011790558015610b0b576000805461ff0019166101001790555b610b148261155f565b801561065c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60006001600160e01b03198216636cdb3d1360e11b1480610b8e57506001600160e01b031982166303a24d0760e21b145b806104815750610481826115a0565b6001600160a01b038416610bc35760405162461bcd60e51b81526004016104539061279d565b8151835114610be45760405162461bcd60e51b8152600401610453906127de565b33610bf4816000878787876115c5565b60005b8451811015610c9057838181518110610c1257610c12612758565b602002602001015160c96000878481518110610c3057610c30612758565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c789190612826565b90915550819050610c8881612784565b915050610bf7565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ce192919061283e565b60405180910390a46105b1816000878787876115d3565b8151835114610d195760405162461bcd60e51b8152600401610453906127de565b6001600160a01b038416610d3f5760405162461bcd60e51b81526004016104539061286c565b33610d4e8187878787876115c5565b60005b8451811015610e37576000858281518110610d6e57610d6e612758565b602002602001015190506000858381518110610d8c57610d8c612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038e168352909352919091205490915081811015610ddd5760405162461bcd60e51b8152600401610453906128b1565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e1c908490612826565b9250508190555050505080610e3090612784565b9050610d51565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e8792919061283e565b60405180910390a4610e9d8187878787876115d3565b505050505050565b610eaf813361172e565b50565b610ebc8282611787565b60008281526097602052604090206105dd908261180d565b610ede8282611822565b60008281526097602052604090206105dd9082611889565b610efe61189e565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f6f5760405162461bcd60e51b8152600401610453906128fb565b8051825114610f905760405162461bcd60e51b8152600401610453906127de565b6000339050610fb3818560008686604051806020016040528060008152506115c5565b60005b835181101561107b576000848281518110610fd357610fd3612758565b602002602001015190506000848381518110610ff157610ff1612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038c1683529093529190912054909150818110156110425760405162461bcd60e51b81526004016104539061293e565b600092835260c9602090815260408085206001600160a01b038b168652909152909220910390558061107381612784565b915050610fb6565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516110cc92919061283e565b60405180910390a4604080516020810190915260009052610566565b6001600160a01b03841661110e5760405162461bcd60e51b81526004016104539061279d565b33600061111a856118e8565b90506000611127856118e8565b9050611138836000898585896115c5565b600086815260c9602090815260408083206001600160a01b038b1684529091528120805487929061116a908490612826565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46111ca83600089898989611933565b50505050505050565b6111db6119ee565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f2c3390565b600061094a8383611a35565b816001600160a01b0316836001600160a01b0316036112905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610453565b6001600160a01b03838116600081815260ca6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610481825490565b6001600160a01b03841661132d5760405162461bcd60e51b81526004016104539061286c565b336000611339856118e8565b90506000611346856118e8565b90506113568389898585896115c5565b600086815260c9602090815260408083206001600160a01b038c168452909152902054858110156113995760405162461bcd60e51b8152600401610453906128b1565b600087815260c9602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906113d8908490612826565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611438848a8a8a8a8a611933565b505050505050505050565b6001600160a01b0383166114695760405162461bcd60e51b8152600401610453906128fb565b336000611475846118e8565b90506000611482846118e8565b90506114a2838760008585604051806020016040528060008152506115c5565b600085815260c9602090815260408083206001600160a01b038a168452909152902054848110156114e55760405162461bcd60e51b81526004016104539061293e565b600086815260c9602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526111ca565b600054610100900460ff166115865760405162461bcd60e51b815260040161045390612982565b61158f81611a5f565b611597611a8f565b610eaf81611ac3565b60006001600160e01b03198216635a05180f60e01b1480610481575061048182611b25565b610e9d868686868686611b5a565b6001600160a01b0384163b15610e9d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061161790899089908890889088906004016129cd565b6020604051808303816000875af1925050508015611652575060408051601f3d908101601f1916820190925261164f91810190612a2b565b60015b6116fe5761165e612a48565b806308c379a0036116975750611672612a64565b8061167d5750611699565b8060405162461bcd60e51b81526004016104539190612052565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610453565b6001600160e01b0319811663bc197c8160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b6117388282610951565b61065c5761174581611bc3565b611750836020611bd5565b604051602001611761929190612b35565b60408051601f198184030181529082905262461bcd60e51b825261045391600401612052565b6117918282610951565b61065c5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117c93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061094a836001600160a01b038416611d70565b61182c8282610951565b1561065c5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061094a836001600160a01b038416611dbf565b61012d5460ff166106f25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610453565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061192257611922612758565b602090810291909101015292915050565b6001600160a01b0384163b15610e9d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906119779089908990889088908890600401612baa565b6020604051808303816000875af19250505080156119b2575060408051601f3d908101601f191682019092526119af91810190612a2b565b60015b6119be5761165e612a48565b6001600160e01b0319811663f23a6e6160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b61012d5460ff16156106f25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610453565b6000826000018281548110611a4c57611a4c612758565b9060005260206000200154905092915050565b600054610100900460ff16611a865760405162461bcd60e51b815260040161045390612982565b610eaf81611eb2565b600054610100900460ff16611ab65760405162461bcd60e51b815260040161045390612982565b61012d805460ff19169055565b600054610100900460ff16611aea5760405162461bcd60e51b815260040161045390612982565b611af5600033611ec5565b611b0d600080516020612c7383398151915233611ec5565b610eaf600080516020612c5383398151915233611ec5565b60006001600160e01b03198216637965db0b60e01b148061048157506301ffc9a760e01b6001600160e01b0319831614610481565b61012d5460ff1615610e9d5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610453565b60606104816001600160a01b03831660145b60606000611be4836002612bef565b611bef906002612826565b6001600160401b03811115611c0657611c06612065565b6040519080825280601f01601f191660200182016040528015611c30576020820181803683370190505b509050600360fc1b81600081518110611c4b57611c4b612758565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c7a57611c7a612758565b60200101906001600160f81b031916908160001a9053506000611c9e846002612bef565b611ca9906001612826565b90505b6001811115611d21576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cdd57611cdd612758565b1a60f81b828281518110611cf357611cf3612758565b60200101906001600160f81b031916908160001a90535060049490941c93611d1a81612c0e565b9050611cac565b50831561094a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610453565b6000818152600183016020526040812054611db757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610481565b506000610481565b60008181526001830160205260408120548015611ea8576000611de3600183612c25565b8554909150600090611df790600190612c25565b9050818114611e5c576000866000018281548110611e1757611e17612758565b9060005260206000200154905080876000018481548110611e3a57611e3a612758565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e6d57611e6d612c3c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610481565b6000915050610481565b805161065c9060cb906020840190611ecf565b61065c8282610eb2565b828054611edb90612673565b90600052602060002090601f016020900481019282611efd5760008555611f43565b82601f10611f1657805160ff1916838001178555611f43565b82800160010185558215611f43579182015b82811115611f43578251825591602001919060010190611f28565b50611f4f929150611f53565b5090565b5b80821115611f4f5760008155600101611f54565b80356001600160a01b0381168114611f7f57600080fd5b919050565b60008060408385031215611f9757600080fd5b611fa083611f68565b946020939093013593505050565b6001600160e01b031981168114610eaf57600080fd5b600060208284031215611fd657600080fd5b813561094a81611fae565b600060208284031215611ff357600080fd5b5035919050565b60005b83811015612015578181015183820152602001611ffd565b838111156105665750506000910152565b6000815180845261203e816020860160208601611ffa565b601f01601f19169290920160200192915050565b60208152600061094a6020830184612026565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156120a0576120a0612065565b6040525050565b60006001600160401b038211156120c0576120c0612065565b5060051b60200190565b600082601f8301126120db57600080fd5b813560206120e8826120a7565b6040516120f5828261207b565b83815260059390931b850182019282810191508684111561211557600080fd5b8286015b848110156121305780358352918301918301612119565b509695505050505050565b60006001600160401b0383111561215457612154612065565b60405161216b601f8501601f19166020018261207b565b80915083815284848401111561218057600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126121a957600080fd5b61094a8383356020850161213b565b600080600080608085870312156121ce57600080fd5b6121d785611f68565b935060208501356001600160401b03808211156121f357600080fd5b6121ff888389016120ca565b9450604087013591508082111561221557600080fd5b612221888389016120ca565b9350606087013591508082111561223757600080fd5b5061224487828801612198565b91505092959194509250565b600080600080600060a0868803121561226857600080fd5b61227186611f68565b945061227f60208701611f68565b935060408601356001600160401b038082111561229b57600080fd5b6122a789838a016120ca565b945060608801359150808211156122bd57600080fd5b6122c989838a016120ca565b935060808801359150808211156122df57600080fd5b506122ec88828901612198565b9150509295509295909350565b6000806040838503121561230c57600080fd5b8235915061231c60208401611f68565b90509250929050565b6000806040838503121561233857600080fd5b82356001600160401b038082111561234f57600080fd5b818501915085601f83011261236357600080fd5b81356020612370826120a7565b60405161237d828261207b565b83815260059390931b850182019282810191508984111561239d57600080fd5b948201945b838610156123c2576123b386611f68565b825294820194908201906123a2565b965050860135925050808211156123d857600080fd5b506123e5858286016120ca565b9150509250929050565b600081518084526020808501945080840160005b8381101561241f57815187529582019590820190600101612403565b509495945050505050565b60208152600061094a60208301846123ef565b60008060006060848603121561245257600080fd5b61245b84611f68565b925060208401356001600160401b038082111561247757600080fd5b612483878388016120ca565b9350604086013591508082111561249957600080fd5b506124a6868287016120ca565b9150509250925092565b600080600080608085870312156124c657600080fd5b6124cf85611f68565b9350602085013592506040850135915060608501356001600160401b038111156124f857600080fd5b61224487828801612198565b6000806040838503121561251757600080fd5b50508035926020909101359150565b6000806040838503121561253957600080fd5b61254283611f68565b91506020830135801515811461255757600080fd5b809150509250929050565b6000806040838503121561257557600080fd5b61257e83611f68565b915061231c60208401611f68565b600080600080600060a086880312156125a457600080fd5b6125ad86611f68565b94506125bb60208701611f68565b9350604086013592506060860135915060808601356001600160401b038111156125e457600080fd5b6122ec88828901612198565b60008060006060848603121561260557600080fd5b61260e84611f68565b95602085013595506040909401359392505050565b60006020828403121561263557600080fd5b81356001600160401b0381111561264b57600080fd5b8201601f8101841361265c57600080fd5b61266b8482356020840161213b565b949350505050565b600181811c9082168061268757607f821691505b6020821081036126a757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016127965761279661276e565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b600082198211156128395761283961276e565b500190565b60408152600061285160408301856123ef565b828103602084015261286381856123ef565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906129f9908301866123ef565b8281036060840152612a0b81866123ef565b90508281036080840152612a1f8185612026565b98975050505050505050565b600060208284031215612a3d57600080fd5b815161094a81611fae565b600060033d1115612a615760046000803e5060005160e01c5b90565b600060443d1015612a725790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612aa157505050505090565b8285019150815181811115612ab95750505050505090565b843d8701016020828501011115612ad35750505050505090565b612ae26020828601018761207b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b6d816017850160208801611ffa565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b9e816028840160208801611ffa565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612be490830184612026565b979650505050505050565b6000816000190483118215151615612c0957612c0961276e565b500290565b600081612c1d57612c1d61276e565b506000190190565b600082821015612c3757612c3761276e565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122074f93d3dbfcdae138425e5464f7a9ba83401fdaeebe9f4d4654f70483311cf7464736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json new file mode 100644 index 00000000..150168d8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json @@ -0,0 +1,121 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155ReceiverUpgradeable", + "sourceName": "contracts/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json new file mode 100644 index 00000000..21ae9bd0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json @@ -0,0 +1,374 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155SupplyUpgradeable", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "exists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155URIStorageUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155URIStorageUpgradeable.json new file mode 100644 index 00000000..64ea2640 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155URIStorageUpgradeable.json @@ -0,0 +1,336 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155URIStorageUpgradeable", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json new file mode 100644 index 00000000..5287fec6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json @@ -0,0 +1,336 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155Upgradeable", + "sourceName": "contracts/token/ERC1155/ERC1155Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50611391806100206000396000f3fe608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b48565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b8b565b610224565b60405190151581526020016100a9565b6100e86100e3366004610baf565b610276565b6040516100a99190610c15565b610108610103366004610d74565b61030a565b005b61011d610118366004610e1e565b610356565b6040516100a99190610f24565b610108610138366004610f37565b610480565b6100c561014b366004610f73565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b610108610187366004610fa6565b61048f565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025557506001600160e01b031982166303a24d0760e21b145b8061027057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060606780546102859061100b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b19061100b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103265750610326853361014b565b6103425760405162461bcd60e51b81526004016101f390611045565b61034f85858585856104d4565b5050505050565b606081518351146103bb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d7576103d7610c28565b604051908082528060200260200182016040528015610400578160200160208202803683370190505b50905060005b84518110156104785761044b85828151811061042457610424611093565b602002602001015185838151811061043e5761043e611093565b602002602001015161018c565b82828151811061045d5761045d611093565b6020908102919091010152610471816110bf565b9050610406565b509392505050565b61048b3383836106b4565b5050565b6001600160a01b0385163314806104ab57506104ab853361014b565b6104c75760405162461bcd60e51b81526004016101f390611045565b61034f8585858585610794565b81518351146105365760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055c5760405162461bcd60e51b81526004016101f3906110d8565b3360005b845181101561064657600085828151811061057d5761057d611093565b60200260200101519050600085838151811061059b5761059b611093565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156105ec5760405162461bcd60e51b81526004016101f39061111d565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062b908490611167565b925050819055505050508061063f906110bf565b9050610560565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161069692919061117f565b60405180910390a46106ac8187878787876108c2565b505050505050565b816001600160a01b0316836001600160a01b0316036107275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107ba5760405162461bcd60e51b81526004016101f3906110d8565b3360006107c685610a26565b905060006107d385610a26565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156108185760405162461bcd60e51b81526004016101f39061111d565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610857908490611167565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108b7848a8a8a8a8a610a71565b505050505050505050565b6001600160a01b0384163b156106ac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061090690899089908890889088906004016111ad565b6020604051808303816000875af1925050508015610941575060408051601f3d908101601f1916820190925261093e9181019061120b565b60015b6109ed5761094d611228565b806308c379a0036109865750610961611244565b8061096c5750610988565b8060405162461bcd60e51b81526004016101f39190610c15565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a6057610a60611093565b602090810291909101015292915050565b6001600160a01b0384163b156106ac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610ab59089908990889088908890600401611316565b6020604051808303816000875af1925050508015610af0575060408051601f3d908101601f19168201909252610aed9181019061120b565b60015b610afc5761094d611228565b6001600160e01b0319811663f23a6e6160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b80356001600160a01b0381168114610b4357600080fd5b919050565b60008060408385031215610b5b57600080fd5b610b6483610b2c565b946020939093013593505050565b6001600160e01b031981168114610b8857600080fd5b50565b600060208284031215610b9d57600080fd5b8135610ba881610b72565b9392505050565b600060208284031215610bc157600080fd5b5035919050565b6000815180845260005b81811015610bee57602081850181015186830182015201610bd2565b81811115610c00576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610ba86020830184610bc8565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c6457610c64610c28565b6040525050565b600067ffffffffffffffff821115610c8557610c85610c28565b5060051b60200190565b600082601f830112610ca057600080fd5b81356020610cad82610c6b565b604051610cba8282610c3e565b83815260059390931b8501820192828101915086841115610cda57600080fd5b8286015b84811015610cf55780358352918301918301610cde565b509695505050505050565b600082601f830112610d1157600080fd5b813567ffffffffffffffff811115610d2b57610d2b610c28565b604051610d42601f8301601f191660200182610c3e565b818152846020838601011115610d5757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8c57600080fd5b610d9586610b2c565b9450610da360208701610b2c565b9350604086013567ffffffffffffffff80821115610dc057600080fd5b610dcc89838a01610c8f565b94506060880135915080821115610de257600080fd5b610dee89838a01610c8f565b93506080880135915080821115610e0457600080fd5b50610e1188828901610d00565b9150509295509295909350565b60008060408385031215610e3157600080fd5b823567ffffffffffffffff80821115610e4957600080fd5b818501915085601f830112610e5d57600080fd5b81356020610e6a82610c6b565b604051610e778282610c3e565b83815260059390931b8501820192828101915089841115610e9757600080fd5b948201945b83861015610ebc57610ead86610b2c565b82529482019490820190610e9c565b96505086013592505080821115610ed257600080fd5b50610edf85828601610c8f565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1957815187529582019590820190600101610efd565b509495945050505050565b602081526000610ba86020830184610ee9565b60008060408385031215610f4a57600080fd5b610f5383610b2c565b915060208301358015158114610f6857600080fd5b809150509250929050565b60008060408385031215610f8657600080fd5b610f8f83610b2c565b9150610f9d60208401610b2c565b90509250929050565b600080600080600060a08688031215610fbe57600080fd5b610fc786610b2c565b9450610fd560208701610b2c565b93506040860135925060608601359150608086013567ffffffffffffffff811115610fff57600080fd5b610e1188828901610d00565b600181811c9082168061101f57607f821691505b60208210810361103f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110d1576110d16110a9565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561117a5761117a6110a9565b500190565b6040815260006111926040830185610ee9565b82810360208401526111a48185610ee9565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d990830186610ee9565b82810360608401526111eb8186610ee9565b905082810360808401526111ff8185610bc8565b98975050505050505050565b60006020828403121561121d57600080fd5b8151610ba881610b72565b600060033d11156112415760046000803e5060005160e01c5b90565b600060443d10156112525790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561128257505050505090565b828501915081518181111561129a5750505050505090565b843d87010160208285010111156112b45750505050505090565b6112c360208286010187610c3e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061135090830184610bc8565b97965050505050505056fea264697066735822122048baeabcd335b4b451538fdaca556a38845619bd9e68ebd583bca8ba11d4a90264736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b48565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b8b565b610224565b60405190151581526020016100a9565b6100e86100e3366004610baf565b610276565b6040516100a99190610c15565b610108610103366004610d74565b61030a565b005b61011d610118366004610e1e565b610356565b6040516100a99190610f24565b610108610138366004610f37565b610480565b6100c561014b366004610f73565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b610108610187366004610fa6565b61048f565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025557506001600160e01b031982166303a24d0760e21b145b8061027057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060606780546102859061100b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b19061100b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103265750610326853361014b565b6103425760405162461bcd60e51b81526004016101f390611045565b61034f85858585856104d4565b5050505050565b606081518351146103bb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d7576103d7610c28565b604051908082528060200260200182016040528015610400578160200160208202803683370190505b50905060005b84518110156104785761044b85828151811061042457610424611093565b602002602001015185838151811061043e5761043e611093565b602002602001015161018c565b82828151811061045d5761045d611093565b6020908102919091010152610471816110bf565b9050610406565b509392505050565b61048b3383836106b4565b5050565b6001600160a01b0385163314806104ab57506104ab853361014b565b6104c75760405162461bcd60e51b81526004016101f390611045565b61034f8585858585610794565b81518351146105365760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055c5760405162461bcd60e51b81526004016101f3906110d8565b3360005b845181101561064657600085828151811061057d5761057d611093565b60200260200101519050600085838151811061059b5761059b611093565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156105ec5760405162461bcd60e51b81526004016101f39061111d565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062b908490611167565b925050819055505050508061063f906110bf565b9050610560565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161069692919061117f565b60405180910390a46106ac8187878787876108c2565b505050505050565b816001600160a01b0316836001600160a01b0316036107275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107ba5760405162461bcd60e51b81526004016101f3906110d8565b3360006107c685610a26565b905060006107d385610a26565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156108185760405162461bcd60e51b81526004016101f39061111d565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610857908490611167565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108b7848a8a8a8a8a610a71565b505050505050505050565b6001600160a01b0384163b156106ac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061090690899089908890889088906004016111ad565b6020604051808303816000875af1925050508015610941575060408051601f3d908101601f1916820190925261093e9181019061120b565b60015b6109ed5761094d611228565b806308c379a0036109865750610961611244565b8061096c5750610988565b8060405162461bcd60e51b81526004016101f39190610c15565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a6057610a60611093565b602090810291909101015292915050565b6001600160a01b0384163b156106ac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610ab59089908990889088908890600401611316565b6020604051808303816000875af1925050508015610af0575060408051601f3d908101601f19168201909252610aed9181019061120b565b60015b610afc5761094d611228565b6001600160e01b0319811663f23a6e6160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b80356001600160a01b0381168114610b4357600080fd5b919050565b60008060408385031215610b5b57600080fd5b610b6483610b2c565b946020939093013593505050565b6001600160e01b031981168114610b8857600080fd5b50565b600060208284031215610b9d57600080fd5b8135610ba881610b72565b9392505050565b600060208284031215610bc157600080fd5b5035919050565b6000815180845260005b81811015610bee57602081850181015186830182015201610bd2565b81811115610c00576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610ba86020830184610bc8565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c6457610c64610c28565b6040525050565b600067ffffffffffffffff821115610c8557610c85610c28565b5060051b60200190565b600082601f830112610ca057600080fd5b81356020610cad82610c6b565b604051610cba8282610c3e565b83815260059390931b8501820192828101915086841115610cda57600080fd5b8286015b84811015610cf55780358352918301918301610cde565b509695505050505050565b600082601f830112610d1157600080fd5b813567ffffffffffffffff811115610d2b57610d2b610c28565b604051610d42601f8301601f191660200182610c3e565b818152846020838601011115610d5757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8c57600080fd5b610d9586610b2c565b9450610da360208701610b2c565b9350604086013567ffffffffffffffff80821115610dc057600080fd5b610dcc89838a01610c8f565b94506060880135915080821115610de257600080fd5b610dee89838a01610c8f565b93506080880135915080821115610e0457600080fd5b50610e1188828901610d00565b9150509295509295909350565b60008060408385031215610e3157600080fd5b823567ffffffffffffffff80821115610e4957600080fd5b818501915085601f830112610e5d57600080fd5b81356020610e6a82610c6b565b604051610e778282610c3e565b83815260059390931b8501820192828101915089841115610e9757600080fd5b948201945b83861015610ebc57610ead86610b2c565b82529482019490820190610e9c565b96505086013592505080821115610ed257600080fd5b50610edf85828601610c8f565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1957815187529582019590820190600101610efd565b509495945050505050565b602081526000610ba86020830184610ee9565b60008060408385031215610f4a57600080fd5b610f5383610b2c565b915060208301358015158114610f6857600080fd5b809150509250929050565b60008060408385031215610f8657600080fd5b610f8f83610b2c565b9150610f9d60208401610b2c565b90509250929050565b600080600080600060a08688031215610fbe57600080fd5b610fc786610b2c565b9450610fd560208701610b2c565b93506040860135925060608601359150608086013567ffffffffffffffff811115610fff57600080fd5b610e1188828901610d00565b600181811c9082168061101f57607f821691505b60208210810361103f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110d1576110d16110a9565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561117a5761117a6110a9565b500190565b6040815260006111926040830185610ee9565b82810360208401526111a48185610ee9565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d990830186610ee9565b82810360608401526111eb8186610ee9565b905082810360808401526111ff8185610bc8565b98975050505050505050565b60006020828403121561121d57600080fd5b8151610ba881610b72565b600060033d11156112415760046000803e5060005160e01c5b90565b600060443d10156112525790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561128257505050505090565b828501915081518181111561129a5750505050505090565b843d87010160208285010111156112b45750505050505090565b6112c360208286010187610c3e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061135090830184610bc8565b97965050505050505056fea264697066735822122048baeabcd335b4b451538fdaca556a38845619bd9e68ebd583bca8ba11d4a90264736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json new file mode 100644 index 00000000..c060f620 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC165CheckerUpgradeable", + "sourceName": "contracts/utils/introspection/ERC165CheckerUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fe28359dee6c74265ce775dd8efc5b7e6e59cd63eb268e2b84d07dd295b1935d64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fe28359dee6c74265ce775dd8efc5b7e6e59cd63eb268e2b84d07dd295b1935d64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json new file mode 100644 index 00000000..f0d3d16d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC165StorageUpgradeable", + "sourceName": "contracts/utils/introspection/ERC165StorageUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165Upgradeable.json new file mode 100644 index 00000000..61d191dc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165Upgradeable.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC165Upgradeable", + "sourceName": "contracts/utils/introspection/ERC165Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json new file mode 100644 index 00000000..536fc09f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json @@ -0,0 +1,48 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1820ImplementerUpgradeable", + "sourceName": "contracts/utils/introspection/ERC1820ImplementerUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "canImplementInterfaceForAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610116806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a6565b604e565b60405190815260200160405180910390f35b60008281526001602090815260408083206001600160a01b038516845290915281205460ff16607d576000609f565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b857600080fd5b8235915060208301356001600160a01b038116811460d557600080fd5b80915050925092905056fea264697066735822122023bc29a9009419670808fd66fea6d23d162e097c5da87a0ee6754383f5ae39b264736f6c634300080d0033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a6565b604e565b60405190815260200160405180910390f35b60008281526001602090815260408083206001600160a01b038516845290915281205460ff16607d576000609f565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b857600080fd5b8235915060208301356001600160a01b038116811460d557600080fd5b80915050925092905056fea264697066735822122023bc29a9009419670808fd66fea6d23d162e097c5da87a0ee6754383f5ae39b264736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json new file mode 100644 index 00000000..f22e5ec1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json @@ -0,0 +1,69 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1967UpgradeUpgradeable", + "sourceName": "contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20BurnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20BurnableUpgradeable.json new file mode 100644 index 00000000..46f9eeb8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20BurnableUpgradeable.json @@ -0,0 +1,325 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20BurnableUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20BurnableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json new file mode 100644 index 00000000..52027fd3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json @@ -0,0 +1,307 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20CappedUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20CappedUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json new file mode 100644 index 00000000..2e2011f1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json @@ -0,0 +1,371 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20FlashMintUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "flashFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC3156FlashBorrowerUpgradeable", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flashLoan", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "maxFlashLoan", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PausableUpgradeable.json new file mode 100644 index 00000000..67d2f746 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PausableUpgradeable.json @@ -0,0 +1,333 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20PausableUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json new file mode 100644 index 00000000..2e392d05 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json @@ -0,0 +1,418 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20PermitUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json new file mode 100644 index 00000000..76b0b81d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json @@ -0,0 +1,353 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20PresetFixedSupplyUpgradeable", + "sourceName": "contracts/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610ee6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146101d0578063a9059cbb146101e3578063bd3a13f6146101f6578063dd62ed3e1461020957600080fd5b806370a082311461018c57806379cc6790146101b557806395d89b41146101c857600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806342966c681461017757600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f761021c565b6040516101049190610b9f565b60405180910390f35b61012061011b366004610c10565b6102ae565b6040519015158152602001610104565b6035545b604051908152602001610104565b610120610150366004610c3a565b6102c6565b60405160128152602001610104565b610120610172366004610c10565b6102ea565b61018a610185366004610c76565b61030c565b005b61013461019a366004610c8f565b6001600160a01b031660009081526033602052604090205490565b61018a6101c3366004610c10565b610319565b6100f7610332565b6101206101de366004610c10565b610341565b6101206101f1366004610c10565b6103c1565b61018a610204366004610d54565b6103cf565b610134610217366004610dd2565b6104e8565b60606036805461022b90610e05565b80601f016020809104026020016040519081016040528092919081815260200182805461025790610e05565b80156102a45780601f10610279576101008083540402835291602001916102a4565b820191906000526020600020905b81548152906001019060200180831161028757829003601f168201915b5050505050905090565b6000336102bc818585610513565b5060019392505050565b6000336102d4858285610638565b6102df8585856106b2565b506001949350505050565b6000336102bc8185856102fd83836104e8565b6103079190610e3f565b610513565b610316338261085d565b50565b610324823383610638565b61032e828261085d565b5050565b60606037805461022b90610e05565b6000338161034f82866104e8565b9050838110156103b45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102df8286868403610513565b6000336102bc8185856106b2565b600054610100900460ff16158080156103ef5750600054600160ff909116105b806104095750303b158015610409575060005460ff166001145b61046c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103ab565b6000805460ff19166001179055801561048f576000805461ff0019166101001790555b61049b8585858561098e565b80156104e1576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166105755760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ab565b6001600160a01b0382166105d65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ab565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061064484846104e8565b905060001981146106ac578181101561069f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103ab565b6106ac8484848403610513565b50505050565b6001600160a01b0383166107165760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ab565b6001600160a01b0382166107785760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ab565b6001600160a01b038316600090815260336020526040902054818110156107f05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103ab565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906108509086815260200190565b60405180910390a36106ac565b6001600160a01b0382166108bd5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103ab565b6001600160a01b038216600090815260336020526040902054818110156109315760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103ab565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161062b565b505050565b600054610100900460ff166109b55760405162461bcd60e51b81526004016103ab90610e65565b6109bf84846109cb565b6106ac84848484610a19565b600054610100900460ff166109f25760405162461bcd60e51b81526004016103ab90610e65565b8151610a05906036906020850190610b06565b508051610989906037906020840190610b06565b600054610100900460ff16610a405760405162461bcd60e51b81526004016103ab90610e65565b6106ac81836001600160a01b038216610a9b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103ab565b8060356000828254610aad9190610e3f565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b828054610b1290610e05565b90600052602060002090601f016020900481019282610b345760008555610b7a565b82601f10610b4d57805160ff1916838001178555610b7a565b82800160010185558215610b7a579182015b82811115610b7a578251825591602001919060010190610b5f565b50610b86929150610b8a565b5090565b5b80821115610b865760008155600101610b8b565b600060208083528351808285015260005b81811015610bcc57858101830151858201604001528201610bb0565b81811115610bde576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610c0b57600080fd5b919050565b60008060408385031215610c2357600080fd5b610c2c83610bf4565b946020939093013593505050565b600080600060608486031215610c4f57600080fd5b610c5884610bf4565b9250610c6660208501610bf4565b9150604084013590509250925092565b600060208284031215610c8857600080fd5b5035919050565b600060208284031215610ca157600080fd5b610caa82610bf4565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610cd857600080fd5b813567ffffffffffffffff80821115610cf357610cf3610cb1565b604051601f8301601f19908116603f01168101908282118183101715610d1b57610d1b610cb1565b81604052838152866020858801011115610d3457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215610d6a57600080fd5b843567ffffffffffffffff80821115610d8257600080fd5b610d8e88838901610cc7565b95506020870135915080821115610da457600080fd5b50610db187828801610cc7565b93505060408501359150610dc760608601610bf4565b905092959194509250565b60008060408385031215610de557600080fd5b610dee83610bf4565b9150610dfc60208401610bf4565b90509250929050565b600181811c90821680610e1957607f821691505b602082108103610e3957634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610e6057634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220538cc04cdee059d947072e1a8d2ee5be686b57671faf49b65d09c671c9e4dc1664736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146101d0578063a9059cbb146101e3578063bd3a13f6146101f6578063dd62ed3e1461020957600080fd5b806370a082311461018c57806379cc6790146101b557806395d89b41146101c857600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806342966c681461017757600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f761021c565b6040516101049190610b9f565b60405180910390f35b61012061011b366004610c10565b6102ae565b6040519015158152602001610104565b6035545b604051908152602001610104565b610120610150366004610c3a565b6102c6565b60405160128152602001610104565b610120610172366004610c10565b6102ea565b61018a610185366004610c76565b61030c565b005b61013461019a366004610c8f565b6001600160a01b031660009081526033602052604090205490565b61018a6101c3366004610c10565b610319565b6100f7610332565b6101206101de366004610c10565b610341565b6101206101f1366004610c10565b6103c1565b61018a610204366004610d54565b6103cf565b610134610217366004610dd2565b6104e8565b60606036805461022b90610e05565b80601f016020809104026020016040519081016040528092919081815260200182805461025790610e05565b80156102a45780601f10610279576101008083540402835291602001916102a4565b820191906000526020600020905b81548152906001019060200180831161028757829003601f168201915b5050505050905090565b6000336102bc818585610513565b5060019392505050565b6000336102d4858285610638565b6102df8585856106b2565b506001949350505050565b6000336102bc8185856102fd83836104e8565b6103079190610e3f565b610513565b610316338261085d565b50565b610324823383610638565b61032e828261085d565b5050565b60606037805461022b90610e05565b6000338161034f82866104e8565b9050838110156103b45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102df8286868403610513565b6000336102bc8185856106b2565b600054610100900460ff16158080156103ef5750600054600160ff909116105b806104095750303b158015610409575060005460ff166001145b61046c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103ab565b6000805460ff19166001179055801561048f576000805461ff0019166101001790555b61049b8585858561098e565b80156104e1576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166105755760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ab565b6001600160a01b0382166105d65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ab565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061064484846104e8565b905060001981146106ac578181101561069f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103ab565b6106ac8484848403610513565b50505050565b6001600160a01b0383166107165760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ab565b6001600160a01b0382166107785760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ab565b6001600160a01b038316600090815260336020526040902054818110156107f05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103ab565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906108509086815260200190565b60405180910390a36106ac565b6001600160a01b0382166108bd5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103ab565b6001600160a01b038216600090815260336020526040902054818110156109315760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103ab565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161062b565b505050565b600054610100900460ff166109b55760405162461bcd60e51b81526004016103ab90610e65565b6109bf84846109cb565b6106ac84848484610a19565b600054610100900460ff166109f25760405162461bcd60e51b81526004016103ab90610e65565b8151610a05906036906020850190610b06565b508051610989906037906020840190610b06565b600054610100900460ff16610a405760405162461bcd60e51b81526004016103ab90610e65565b6106ac81836001600160a01b038216610a9b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103ab565b8060356000828254610aad9190610e3f565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b828054610b1290610e05565b90600052602060002090601f016020900481019282610b345760008555610b7a565b82601f10610b4d57805160ff1916838001178555610b7a565b82800160010185558215610b7a579182015b82811115610b7a578251825591602001919060010190610b5f565b50610b86929150610b8a565b5090565b5b80821115610b865760008155600101610b8b565b600060208083528351808285015260005b81811015610bcc57858101830151858201604001528201610bb0565b81811115610bde576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610c0b57600080fd5b919050565b60008060408385031215610c2357600080fd5b610c2c83610bf4565b946020939093013593505050565b600080600060608486031215610c4f57600080fd5b610c5884610bf4565b9250610c6660208501610bf4565b9150604084013590509250925092565b600060208284031215610c8857600080fd5b5035919050565b600060208284031215610ca157600080fd5b610caa82610bf4565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610cd857600080fd5b813567ffffffffffffffff80821115610cf357610cf3610cb1565b604051601f8301601f19908116603f01168101908282118183101715610d1b57610d1b610cb1565b81604052838152866020858801011115610d3457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215610d6a57600080fd5b843567ffffffffffffffff80821115610d8257600080fd5b610d8e88838901610cc7565b95506020870135915080821115610da457600080fd5b50610db187828801610cc7565b93505060408501359150610dc760608601610bf4565b905092959194509250565b60008060408385031215610de557600080fd5b610dee83610bf4565b9150610dfc60208401610bf4565b90509250929050565b600181811c90821680610e1957607f821691505b602082108103610e3957634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610e6057634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220538cc04cdee059d947072e1a8d2ee5be686b57671faf49b65d09c671c9e4dc1664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json new file mode 100644 index 00000000..2165c42e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json @@ -0,0 +1,687 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20PresetMinterPauserUpgradeable", + "sourceName": "contracts/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50611ce5806100206000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c975abb11610104578063a217fddf116100a2578063d539139311610071578063d5391393146103ce578063d547741f146103f5578063dd62ed3e14610408578063e63ab1e91461041b57600080fd5b8063a217fddf1461038d578063a457c2d714610395578063a9059cbb146103a8578063ca15c873146103bb57600080fd5b80638456cb59116100de5780638456cb591461033f5780639010d07c1461034757806391d148541461037257806395d89b411461038557600080fd5b80635c975abb146102f757806370a082311461030357806379cc67901461032c57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780634cd88b76146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e2366004611830565b610430565b60405190151581526020015b60405180910390f35b61020461045b565b6040516101f39190611886565b6101e761021f3660046118d5565b6104ed565b60cb545b6040519081526020016101f3565b6101e76102443660046118ff565b610505565b61022861025736600461193b565b60009081526065602052604090206001015490565b61027f61027a366004611954565b610529565b005b604051601281526020016101f3565b61027f61029e366004611954565b610553565b6101e76102b13660046118d5565b6105d6565b61027f6105f8565b61027f6102cc3660046118d5565b61068c565b61027f6102df36600461193b565b61072b565b61027f6102f2366004611a23565b610738565b61012d5460ff166101e7565b610228610311366004611a87565b6001600160a01b0316600090815260c9602052604090205490565b61027f61033a3660046118d5565b61084c565b61027f610861565b61035a610355366004611aa2565b6108f3565b6040516001600160a01b0390911681526020016101f3565b6101e7610380366004611954565b610912565b61020461093d565b610228600081565b6101e76103a33660046118d5565b61094c565b6101e76103b63660046118d5565b6109c7565b6102286103c936600461193b565b6109d5565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f610403366004611954565b6109ec565b610228610416366004611ac4565b610a11565b610228600080516020611c9083398151915281565b60006001600160e01b03198216635a05180f60e01b1480610455575061045582610a3c565b92915050565b606060cc805461046a90611aee565b80601f016020809104026020016040519081016040528092919081815260200182805461049690611aee565b80156104e35780601f106104b8576101008083540402835291602001916104e3565b820191906000526020600020905b8154815290600101906020018083116104c657829003601f168201915b5050505050905090565b6000336104fb818585610a71565b5060019392505050565b600033610513858285610b95565b61051e858585610c0f565b506001949350505050565b60008281526065602052604090206001015461054481610dc5565b61054e8383610dcf565b505050565b6001600160a01b03811633146105c85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105d28282610df1565b5050565b6000336104fb8185856105e98383610a11565b6105f39190611b3e565b610a71565b610610600080516020611c9083398151915233610912565b6106825760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105bf565b61068a610e13565b565b6106b67f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610912565b6107215760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105bf565b6105d28282610e66565b6107353382610f33565b50565b600054610100900460ff16158080156107585750600054600160ff909116105b806107725750303b158015610772575060005460ff166001145b6107d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105bf565b6000805460ff1916600117905580156107f8576000805461ff0019166101001790555b6108028383611073565b801561054e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b610857823383610b95565b6105d28282610f33565b610879600080516020611c9083398151915233610912565b6108eb5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105bf565b61068a6110b6565b600082815260976020526040812061090b90836110f4565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060cd805461046a90611aee565b6000338161095a8286610a11565b9050838110156109ba5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105bf565b61051e8286868403610a71565b6000336104fb818585610c0f565b600081815260976020526040812061045590611100565b600082815260656020526040902060010154610a0781610dc5565b61054e8383610df1565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061045557506301ffc9a760e01b6001600160e01b0319831614610455565b6001600160a01b038316610ad35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105bf565b6001600160a01b038216610b345760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105bf565b6001600160a01b03838116600081815260ca602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ba18484610a11565b90506000198114610c095781811015610bfc5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105bf565b610c098484848403610a71565b50505050565b6001600160a01b038316610c735760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105bf565b6001600160a01b038216610cd55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105bf565b610ce083838361110a565b6001600160a01b038316600090815260c9602052604090205481811015610d585760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105bf565b6001600160a01b03808516600081815260c9602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610db89086815260200190565b60405180910390a3610c09565b6107358133611115565b610dd9828261116e565b600082815260976020526040902061054e90826111f4565b610dfb8282611209565b600082815260976020526040902061054e9082611270565b610e1b611285565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610ebc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105bf565b610ec86000838361110a565b8060cb6000828254610eda9190611b3e565b90915550506001600160a01b038216600081815260c960209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f935760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105bf565b610f9f8260008361110a565b6001600160a01b038216600090815260c96020526040902054818110156110135760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105bf565b6001600160a01b038316600081815260c960209081526040808320868603905560cb80548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600054610100900460ff1661109a5760405162461bcd60e51b81526004016105bf90611b56565b6110a482826112cf565b6110ac61131d565b6105d28282611351565b6110be6113c5565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e493390565b600061090b838361140c565b6000610455825490565b61054e838383611436565b61111f8282610912565b6105d25761112c8161149d565b6111378360206114af565b604051602001611148929190611ba1565b60408051601f198184030181529082905262461bcd60e51b82526105bf91600401611886565b6111788282610912565b6105d25760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556111b03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061090b836001600160a01b03841661164b565b6112138282610912565b156105d25760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061090b836001600160a01b03841661169a565b61012d5460ff1661068a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105bf565b600054610100900460ff166112f65760405162461bcd60e51b81526004016105bf90611b56565b81516113099060cc906020850190611797565b50805161054e9060cd906020840190611797565b600054610100900460ff166113445760405162461bcd60e51b81526004016105bf90611b56565b61012d805460ff19169055565b600054610100900460ff166113785760405162461bcd60e51b81526004016105bf90611b56565b61138360003361178d565b6113ad7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361178d565b6105d2600080516020611c908339815191523361178d565b61012d5460ff161561068a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105bf565b600082600001828154811061142357611423611c16565b9060005260206000200154905092915050565b61012d5460ff161561054e5760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105bf565b60606104556001600160a01b03831660145b606060006114be836002611c2c565b6114c9906002611b3e565b67ffffffffffffffff8111156114e1576114e1611980565b6040519080825280601f01601f19166020018201604052801561150b576020820181803683370190505b509050600360fc1b8160008151811061152657611526611c16565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061155557611555611c16565b60200101906001600160f81b031916908160001a9053506000611579846002611c2c565b611584906001611b3e565b90505b60018111156115fc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106115b8576115b8611c16565b1a60f81b8282815181106115ce576115ce611c16565b60200101906001600160f81b031916908160001a90535060049490941c936115f581611c4b565b9050611587565b50831561090b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105bf565b600081815260018301602052604081205461169257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610455565b506000610455565b600081815260018301602052604081205480156117835760006116be600183611c62565b85549091506000906116d290600190611c62565b90508181146117375760008660000182815481106116f2576116f2611c16565b906000526020600020015490508087600001848154811061171557611715611c16565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061174857611748611c79565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610455565b6000915050610455565b6105d28282610dcf565b8280546117a390611aee565b90600052602060002090601f0160209004810192826117c5576000855561180b565b82601f106117de57805160ff191683800117855561180b565b8280016001018555821561180b579182015b8281111561180b5782518255916020019190600101906117f0565b5061181792915061181b565b5090565b5b80821115611817576000815560010161181c565b60006020828403121561184257600080fd5b81356001600160e01b03198116811461090b57600080fd5b60005b8381101561187557818101518382015260200161185d565b83811115610c095750506000910152565b60208152600082518060208401526118a581604085016020870161185a565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146118d057600080fd5b919050565b600080604083850312156118e857600080fd5b6118f1836118b9565b946020939093013593505050565b60008060006060848603121561191457600080fd5b61191d846118b9565b925061192b602085016118b9565b9150604084013590509250925092565b60006020828403121561194d57600080fd5b5035919050565b6000806040838503121561196757600080fd5b82359150611977602084016118b9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126119a757600080fd5b813567ffffffffffffffff808211156119c2576119c2611980565b604051601f8301601f19908116603f011681019082821181831017156119ea576119ea611980565b81604052838152866020858801011115611a0357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611a3657600080fd5b823567ffffffffffffffff80821115611a4e57600080fd5b611a5a86838701611996565b93506020850135915080821115611a7057600080fd5b50611a7d85828601611996565b9150509250929050565b600060208284031215611a9957600080fd5b61090b826118b9565b60008060408385031215611ab557600080fd5b50508035926020909101359150565b60008060408385031215611ad757600080fd5b611ae0836118b9565b9150611977602084016118b9565b600181811c90821680611b0257607f821691505b602082108103611b2257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b5157611b51611b28565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611bd981601785016020880161185a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c0a81602884016020880161185a565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615611c4657611c46611b28565b500290565b600081611c5a57611c5a611b28565b506000190190565b600082821015611c7457611c74611b28565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa2646970667358221220b2a58925fa532f9e285132e9eee480cb35222bc6d69051fbaf03f9fc062881ed64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c975abb11610104578063a217fddf116100a2578063d539139311610071578063d5391393146103ce578063d547741f146103f5578063dd62ed3e14610408578063e63ab1e91461041b57600080fd5b8063a217fddf1461038d578063a457c2d714610395578063a9059cbb146103a8578063ca15c873146103bb57600080fd5b80638456cb59116100de5780638456cb591461033f5780639010d07c1461034757806391d148541461037257806395d89b411461038557600080fd5b80635c975abb146102f757806370a082311461030357806379cc67901461032c57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780634cd88b76146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e2366004611830565b610430565b60405190151581526020015b60405180910390f35b61020461045b565b6040516101f39190611886565b6101e761021f3660046118d5565b6104ed565b60cb545b6040519081526020016101f3565b6101e76102443660046118ff565b610505565b61022861025736600461193b565b60009081526065602052604090206001015490565b61027f61027a366004611954565b610529565b005b604051601281526020016101f3565b61027f61029e366004611954565b610553565b6101e76102b13660046118d5565b6105d6565b61027f6105f8565b61027f6102cc3660046118d5565b61068c565b61027f6102df36600461193b565b61072b565b61027f6102f2366004611a23565b610738565b61012d5460ff166101e7565b610228610311366004611a87565b6001600160a01b0316600090815260c9602052604090205490565b61027f61033a3660046118d5565b61084c565b61027f610861565b61035a610355366004611aa2565b6108f3565b6040516001600160a01b0390911681526020016101f3565b6101e7610380366004611954565b610912565b61020461093d565b610228600081565b6101e76103a33660046118d5565b61094c565b6101e76103b63660046118d5565b6109c7565b6102286103c936600461193b565b6109d5565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f610403366004611954565b6109ec565b610228610416366004611ac4565b610a11565b610228600080516020611c9083398151915281565b60006001600160e01b03198216635a05180f60e01b1480610455575061045582610a3c565b92915050565b606060cc805461046a90611aee565b80601f016020809104026020016040519081016040528092919081815260200182805461049690611aee565b80156104e35780601f106104b8576101008083540402835291602001916104e3565b820191906000526020600020905b8154815290600101906020018083116104c657829003601f168201915b5050505050905090565b6000336104fb818585610a71565b5060019392505050565b600033610513858285610b95565b61051e858585610c0f565b506001949350505050565b60008281526065602052604090206001015461054481610dc5565b61054e8383610dcf565b505050565b6001600160a01b03811633146105c85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105d28282610df1565b5050565b6000336104fb8185856105e98383610a11565b6105f39190611b3e565b610a71565b610610600080516020611c9083398151915233610912565b6106825760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105bf565b61068a610e13565b565b6106b67f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610912565b6107215760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105bf565b6105d28282610e66565b6107353382610f33565b50565b600054610100900460ff16158080156107585750600054600160ff909116105b806107725750303b158015610772575060005460ff166001145b6107d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105bf565b6000805460ff1916600117905580156107f8576000805461ff0019166101001790555b6108028383611073565b801561054e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b610857823383610b95565b6105d28282610f33565b610879600080516020611c9083398151915233610912565b6108eb5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105bf565b61068a6110b6565b600082815260976020526040812061090b90836110f4565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060cd805461046a90611aee565b6000338161095a8286610a11565b9050838110156109ba5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105bf565b61051e8286868403610a71565b6000336104fb818585610c0f565b600081815260976020526040812061045590611100565b600082815260656020526040902060010154610a0781610dc5565b61054e8383610df1565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061045557506301ffc9a760e01b6001600160e01b0319831614610455565b6001600160a01b038316610ad35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105bf565b6001600160a01b038216610b345760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105bf565b6001600160a01b03838116600081815260ca602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ba18484610a11565b90506000198114610c095781811015610bfc5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105bf565b610c098484848403610a71565b50505050565b6001600160a01b038316610c735760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105bf565b6001600160a01b038216610cd55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105bf565b610ce083838361110a565b6001600160a01b038316600090815260c9602052604090205481811015610d585760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105bf565b6001600160a01b03808516600081815260c9602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610db89086815260200190565b60405180910390a3610c09565b6107358133611115565b610dd9828261116e565b600082815260976020526040902061054e90826111f4565b610dfb8282611209565b600082815260976020526040902061054e9082611270565b610e1b611285565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610ebc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105bf565b610ec86000838361110a565b8060cb6000828254610eda9190611b3e565b90915550506001600160a01b038216600081815260c960209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f935760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105bf565b610f9f8260008361110a565b6001600160a01b038216600090815260c96020526040902054818110156110135760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105bf565b6001600160a01b038316600081815260c960209081526040808320868603905560cb80548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600054610100900460ff1661109a5760405162461bcd60e51b81526004016105bf90611b56565b6110a482826112cf565b6110ac61131d565b6105d28282611351565b6110be6113c5565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e493390565b600061090b838361140c565b6000610455825490565b61054e838383611436565b61111f8282610912565b6105d25761112c8161149d565b6111378360206114af565b604051602001611148929190611ba1565b60408051601f198184030181529082905262461bcd60e51b82526105bf91600401611886565b6111788282610912565b6105d25760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556111b03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061090b836001600160a01b03841661164b565b6112138282610912565b156105d25760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061090b836001600160a01b03841661169a565b61012d5460ff1661068a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105bf565b600054610100900460ff166112f65760405162461bcd60e51b81526004016105bf90611b56565b81516113099060cc906020850190611797565b50805161054e9060cd906020840190611797565b600054610100900460ff166113445760405162461bcd60e51b81526004016105bf90611b56565b61012d805460ff19169055565b600054610100900460ff166113785760405162461bcd60e51b81526004016105bf90611b56565b61138360003361178d565b6113ad7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361178d565b6105d2600080516020611c908339815191523361178d565b61012d5460ff161561068a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105bf565b600082600001828154811061142357611423611c16565b9060005260206000200154905092915050565b61012d5460ff161561054e5760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105bf565b60606104556001600160a01b03831660145b606060006114be836002611c2c565b6114c9906002611b3e565b67ffffffffffffffff8111156114e1576114e1611980565b6040519080825280601f01601f19166020018201604052801561150b576020820181803683370190505b509050600360fc1b8160008151811061152657611526611c16565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061155557611555611c16565b60200101906001600160f81b031916908160001a9053506000611579846002611c2c565b611584906001611b3e565b90505b60018111156115fc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106115b8576115b8611c16565b1a60f81b8282815181106115ce576115ce611c16565b60200101906001600160f81b031916908160001a90535060049490941c936115f581611c4b565b9050611587565b50831561090b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105bf565b600081815260018301602052604081205461169257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610455565b506000610455565b600081815260018301602052604081205480156117835760006116be600183611c62565b85549091506000906116d290600190611c62565b90508181146117375760008660000182815481106116f2576116f2611c16565b906000526020600020015490508087600001848154811061171557611715611c16565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061174857611748611c79565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610455565b6000915050610455565b6105d28282610dcf565b8280546117a390611aee565b90600052602060002090601f0160209004810192826117c5576000855561180b565b82601f106117de57805160ff191683800117855561180b565b8280016001018555821561180b579182015b8281111561180b5782518255916020019190600101906117f0565b5061181792915061181b565b5090565b5b80821115611817576000815560010161181c565b60006020828403121561184257600080fd5b81356001600160e01b03198116811461090b57600080fd5b60005b8381101561187557818101518382015260200161185d565b83811115610c095750506000910152565b60208152600082518060208401526118a581604085016020870161185a565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146118d057600080fd5b919050565b600080604083850312156118e857600080fd5b6118f1836118b9565b946020939093013593505050565b60008060006060848603121561191457600080fd5b61191d846118b9565b925061192b602085016118b9565b9150604084013590509250925092565b60006020828403121561194d57600080fd5b5035919050565b6000806040838503121561196757600080fd5b82359150611977602084016118b9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126119a757600080fd5b813567ffffffffffffffff808211156119c2576119c2611980565b604051601f8301601f19908116603f011681019082821181831017156119ea576119ea611980565b81604052838152866020858801011115611a0357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611a3657600080fd5b823567ffffffffffffffff80821115611a4e57600080fd5b611a5a86838701611996565b93506020850135915080821115611a7057600080fd5b50611a7d85828601611996565b9150509250929050565b600060208284031215611a9957600080fd5b61090b826118b9565b60008060408385031215611ab557600080fd5b50508035926020909101359150565b60008060408385031215611ad757600080fd5b611ae0836118b9565b9150611977602084016118b9565b600181811c90821680611b0257607f821691505b602082108103611b2257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b5157611b51611b28565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611bd981601785016020880161185a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c0a81602884016020880161185a565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615611c4657611c46611b28565b500290565b600081611c5a57611c5a611b28565b506000190190565b600082821015611c7457611c74611b28565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa2646970667358221220b2a58925fa532f9e285132e9eee480cb35222bc6d69051fbaf03f9fc062881ed64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json new file mode 100644 index 00000000..e05caf96 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json @@ -0,0 +1,350 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20SnapshotUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "Snapshot", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "balanceOfAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "snapshotId", + "type": "uint256" + } + ], + "name": "totalSupplyAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json new file mode 100644 index 00000000..af2d7c1d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json @@ -0,0 +1,294 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Upgradeable", + "sourceName": "contracts/token/ERC20/ERC20Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610863806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c391906106a1565b60405180910390f35b6100df6100da366004610712565b610232565b60405190151581526020016100c3565b6035545b6040519081526020016100c3565b6100df61010f36600461073c565b61024a565b604051601281526020016100c3565b6100df610131366004610712565b61026e565b6100f3610144366004610778565b6001600160a01b031660009081526033602052604090205490565b6100b6610290565b6100df610175366004610712565b61029f565b6100df610188366004610712565b61031f565b6100f361019b36600461079a565b61032d565b6060603680546101af906107cd565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107cd565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610807565b610358565b6060603780546101af906107cd565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260336020526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106949086815260200190565b60405180910390a36104f0565b600060208083528351808285015260005b818110156106ce578581018301518582016040015282016106b2565b818111156106e0576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070d57600080fd5b919050565b6000806040838503121561072557600080fd5b61072e836106f6565b946020939093013593505050565b60008060006060848603121561075157600080fd5b61075a846106f6565b9250610768602085016106f6565b9150604084013590509250925092565b60006020828403121561078a57600080fd5b610793826106f6565b9392505050565b600080604083850312156107ad57600080fd5b6107b6836106f6565b91506107c4602084016106f6565b90509250929050565b600181811c908216806107e157607f821691505b60208210810361080157634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082857634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212201114b53ba744d7f329c32fd9dc1dffc377bd6a1902555d4eadd933c250f42e3564736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c391906106a1565b60405180910390f35b6100df6100da366004610712565b610232565b60405190151581526020016100c3565b6035545b6040519081526020016100c3565b6100df61010f36600461073c565b61024a565b604051601281526020016100c3565b6100df610131366004610712565b61026e565b6100f3610144366004610778565b6001600160a01b031660009081526033602052604090205490565b6100b6610290565b6100df610175366004610712565b61029f565b6100df610188366004610712565b61031f565b6100f361019b36600461079a565b61032d565b6060603680546101af906107cd565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107cd565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610807565b610358565b6060603780546101af906107cd565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260336020526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106949086815260200190565b60405180910390a36104f0565b600060208083528351808285015260005b818110156106ce578581018301518582016040015282016106b2565b818111156106e0576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070d57600080fd5b919050565b6000806040838503121561072557600080fd5b61072e836106f6565b946020939093013593505050565b60008060006060848603121561075157600080fd5b61075a846106f6565b9250610768602085016106f6565b9150604084013590509250925092565b60006020828403121561078a57600080fd5b610793826106f6565b9392505050565b600080604083850312156107ad57600080fd5b6107b6836106f6565b91506107c4602084016106f6565b90509250929050565b600181811c908216806107e157607f821691505b60208210810361080157634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082857634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212201114b53ba744d7f329c32fd9dc1dffc377bd6a1902555d4eadd933c250f42e3564736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json new file mode 100644 index 00000000..a047184e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json @@ -0,0 +1,724 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20VotesCompUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesUpgradeable.json new file mode 100644 index 00000000..41efd62d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesUpgradeable.json @@ -0,0 +1,681 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20VotesUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "pos", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint224", + "name": "votes", + "type": "uint224" + } + ], + "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20WrapperUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20WrapperUpgradeable.json new file mode 100644 index 00000000..955e473d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20WrapperUpgradeable.json @@ -0,0 +1,355 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20WrapperUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2771ContextUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2771ContextUpgradeable.json new file mode 100644 index 00000000..7a9c6c86 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2771ContextUpgradeable.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2771ContextUpgradeable", + "sourceName": "contracts/metatx/ERC2771ContextUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json new file mode 100644 index 00000000..03fd5447 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json @@ -0,0 +1,72 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2981Upgradeable", + "sourceName": "contracts/token/common/ERC2981Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC4626Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC4626Upgradeable.json new file mode 100644 index 00000000..13580e84 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC4626Upgradeable.json @@ -0,0 +1,684 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC4626Upgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC4626Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "convertToAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "convertToShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721BurnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721BurnableUpgradeable.json new file mode 100644 index 00000000..9164d680 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721BurnableUpgradeable.json @@ -0,0 +1,367 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721BurnableUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721BurnableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json new file mode 100644 index 00000000..f72afdf7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json @@ -0,0 +1,385 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721ConsecutiveUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "toTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAddress", + "type": "address" + } + ], + "name": "ConsecutiveTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721EnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721EnumerableUpgradeable.json new file mode 100644 index 00000000..83e59a53 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721EnumerableUpgradeable.json @@ -0,0 +1,410 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721EnumerableUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json new file mode 100644 index 00000000..91f3019a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json @@ -0,0 +1,58 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721HolderUpgradeable", + "sourceName": "contracts/token/ERC721/utils/ERC721HolderUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506101af806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea26469706673582212208118d8b307acc2428e77a3401a27f394c353bf27e3f4f5544333992986a65dcd64736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea26469706673582212208118d8b307acc2428e77a3401a27f394c353bf27e3f4f5544333992986a65dcd64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PausableUpgradeable.json new file mode 100644 index 00000000..e890f95f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PausableUpgradeable.json @@ -0,0 +1,393 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721PausableUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json new file mode 100644 index 00000000..2b06fe92 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json @@ -0,0 +1,766 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721PresetMinterPauserAutoIdUpgradeable", + "sourceName": "contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "baseTokenURI", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50612981806100206000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80636a6278421161010f578063a6487c53116100a2578063d539139311610071578063d539139314610416578063d547741f1461043d578063e63ab1e914610450578063e985e9c51461046557600080fd5b8063a6487c53146103ca578063b88d4fde146103dd578063c87b56dd146103f0578063ca15c8731461040357600080fd5b806391d14854116100de57806391d148541461039457806395d89b41146103a7578063a217fddf146103af578063a22cb465146103b757600080fd5b80636a6278421461035357806370a08231146103665780638456cb59146103795780639010d07c1461038157600080fd5b80632f745c591161018757806342966c681161015657806342966c681461030e5780634f6ccce7146103215780635c975abb146103345780636352211e1461034057600080fd5b80632f745c59146102cd57806336568abe146102e05780633f4ba83a146102f357806342842e0e146102fb57600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd14610284578063248a9ca3146102975780632f2ff15d146102ba57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b61020861020336600461227b565b6104a1565b60405190151581526020015b60405180910390f35b6102256104b2565b60405161021491906122f0565b610245610240366004612303565b610544565b6040516001600160a01b039091168152602001610214565b61027061026b366004612338565b61056b565b005b60fd545b604051908152602001610214565b610270610292366004612362565b610685565b6102766102a5366004612303565b60009081526065602052604090206001015490565b6102706102c836600461239e565b6106b7565b6102766102db366004612338565b6106dc565b6102706102ee36600461239e565b610772565b6102706107f0565b610270610309366004612362565b610886565b61027061031c366004612303565b6108a1565b61027661032f366004612303565b6108d2565b61015f5460ff16610208565b61024561034e366004612303565b610965565b6102706103613660046123ca565b6109c5565b6102766103743660046123ca565b610a83565b610270610b09565b61024561038f3660046123e5565b610b9b565b6102086103a236600461239e565b610bba565b610225610be5565b610276600081565b6102706103c5366004612407565b610bf4565b6102706103d83660046124ef565b610bff565b6102706103eb366004612577565b610d16565b6102256103fe366004612303565b610d48565b610276610411366004612303565b610dae565b6102767f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027061044b36600461239e565b610dc5565b61027660008051602061292c83398151915281565b6102086104733660046125f3565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205460ff1690565b60006104ac82610dea565b92915050565b606060c980546104c19061261d565b80601f01602080910402602001604051908101604052809291908181526020018280546104ed9061261d565b801561053a5780601f1061050f5761010080835404028352916020019161053a565b820191906000526020600020905b81548152906001019060200180831161051d57829003601f168201915b5050505050905090565b600061054f82610e0f565b50600090815260cd60205260409020546001600160a01b031690565b600061057682610965565b9050806001600160a01b0316836001600160a01b0316036105e85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061060457506106048133610473565b6106765760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105df565b6106808383610e6e565b505050565b610690335b82610edc565b6106ac5760405162461bcd60e51b81526004016105df90612657565b610680838383610f5b565b6000828152606560205260409020600101546106d2816110cc565b61068083836110d6565b60006106e783610a83565b82106107495760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105df565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b6001600160a01b03811633146107e25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105df565b6107ec82826110f8565b5050565b61080860008051602061292c83398151915233610bba565b61087c576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105df565b61088461111a565b565b61068083838360405180602001604052806000815250610d16565b6108aa3361068a565b6108c65760405162461bcd60e51b81526004016105df90612657565b6108cf8161116d565b50565b60006108dd60fd5490565b82106109405760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105df565b60fd8281548110610953576109536126a4565b90600052602060002001549050919050565b600081815260cb60205260408120546001600160a01b0316806104ac5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b6109ef7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bba565b610a615760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105df565b610a7481610a6f6101c35490565b611210565b6108cf6101c380546001019055565b60006001600160a01b038216610aed5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105df565b506001600160a01b0316600090815260cc602052604090205490565b610b2160008051602061292c83398151915233610bba565b610b935760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105df565b6108846113a9565b6000828152609760205260408120610bb390836113e7565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060ca80546104c19061261d565b6107ec3383836113f3565b600054610100900460ff1615808015610c1f5750600054600160ff909116105b80610c395750303b158015610c39575060005460ff166001145b610c9c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105df565b6000805460ff191660011790558015610cbf576000805461ff0019166101001790555b610cca8484846114c1565b8015610d10576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610d203383610edc565b610d3c5760405162461bcd60e51b81526004016105df90612657565b610d1084848484611505565b6060610d5382610e0f565b6000610d5d611538565b90506000815111610d7d5760405180602001604052806000815250610bb3565b80610d8784611548565b604051602001610d989291906126ba565b6040516020818303038152906040529392505050565b60008181526097602052604081206104ac906115db565b600082815260656020526040902060010154610de0816110cc565b61068083836110f8565b60006001600160e01b0319821663780e9d6360e01b14806104ac57506104ac826115e5565b600081815260cb60205260409020546001600160a01b03166108cf5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b600081815260cd6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610ea382610965565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610ee883610965565b9050806001600160a01b0316846001600160a01b03161480610f2f57506001600160a01b03808216600090815260ce602090815260408083209388168352929052205460ff165b80610f535750836001600160a01b0316610f4884610544565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f6e82610965565b6001600160a01b031614610f945760405162461bcd60e51b81526004016105df906126e9565b6001600160a01b038216610ff65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105df565b6110038383836001611625565b826001600160a01b031661101682610965565b6001600160a01b03161461103c5760405162461bcd60e51b81526004016105df906126e9565b600081815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260cc855283862080546000190190559087168086528386208054600101905586865260cb90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8133611631565b6110e0828261168a565b60008281526097602052604090206106809082611710565b6111028282611725565b6000828152609760205260409020610680908261178c565b6111226117a1565b61015f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061117882610965565b9050611188816000846001611625565b61119182610965565b600083815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b03851680855260cc8452828520805460001901905587855260cb909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112665760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105df565b600081815260cb60205260409020546001600160a01b0316156112cb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6112d9600083836001611625565b600081815260cb60205260409020546001600160a01b03161561133e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6001600160a01b038216600081815260cc602090815260408083208054600101905584835260cb90915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6113b16117eb565b61015f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111503390565b6000610bb38383611832565b816001600160a01b0316836001600160a01b0316036114545760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105df565b6001600160a01b03838116600081815260ce6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff166114e85760405162461bcd60e51b81526004016105df9061272e565b6114f2838361185c565b6114fa6118aa565b6106808383836118de565b611510848484610f5b565b61151c84848484611967565b610d105760405162461bcd60e51b81526004016105df90612779565b60606101c480546104c19061261d565b6060600061155583611a68565b600101905060008167ffffffffffffffff81111561157557611575612443565b6040519080825280601f01601f19166020018201604052801561159f576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115a957509392505050565b60006104ac825490565b60006001600160e01b031982166380ac58cd60e01b148061161657506001600160e01b03198216635b5e139f60e01b145b806104ac57506104ac82611b40565b610d1084848484611b65565b61163b8282610bba565b6107ec5761164881611bd9565b611653836020611beb565b6040516020016116649291906127cb565b60408051601f198184030181529082905262461bcd60e51b82526105df916004016122f0565b6116948282610bba565b6107ec5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116cc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bb3836001600160a01b038416611d87565b61172f8282610bba565b156107ec5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bb3836001600160a01b038416611dd6565b61015f5460ff166108845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105df565b61015f5460ff16156108845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105df565b6000826000018281548110611849576118496126a4565b9060005260206000200154905092915050565b600054610100900460ff166118835760405162461bcd60e51b81526004016105df9061272e565b81516118969060c99060208501906121cc565b5080516106809060ca9060208401906121cc565b600054610100900460ff166118d15760405162461bcd60e51b81526004016105df9061272e565b61015f805460ff19169055565b600054610100900460ff166119055760405162461bcd60e51b81526004016105df9061272e565b8051611919906101c49060208401906121cc565b50611925600033611ec9565b61194f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611ec9565b61068060008051602061292c83398151915233611ec9565b60006001600160a01b0384163b15611a5d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906119ab903390899088908890600401612840565b6020604051808303816000875af19250505080156119e6575060408051601f3d908101601f191682019092526119e39181019061287d565b60015b611a43573d808015611a14576040519150601f19603f3d011682016040523d82523d6000602084013e611a19565b606091505b508051600003611a3b5760405162461bcd60e51b81526004016105df90612779565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f53565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aa75772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad3576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af157662386f26fc10000830492506010015b6305f5e1008310611b09576305f5e100830492506008015b6127108310611b1d57612710830492506004015b60648310611b2f576064830492506002015b600a83106104ac5760010192915050565b60006001600160e01b03198216635a05180f60e01b14806104ac57506104ac82611ed3565b611b7184848484611f08565b61015f5460ff1615610d105760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105df565b60606104ac6001600160a01b03831660145b60606000611bfa8360026128b0565b611c059060026128cf565b67ffffffffffffffff811115611c1d57611c1d612443565b6040519080825280601f01601f191660200182016040528015611c47576020820181803683370190505b509050600360fc1b81600081518110611c6257611c626126a4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c9157611c916126a4565b60200101906001600160f81b031916908160001a9053506000611cb58460026128b0565b611cc09060016128cf565b90505b6001811115611d38576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cf457611cf46126a4565b1a60f81b828281518110611d0a57611d0a6126a4565b60200101906001600160f81b031916908160001a90535060049490941c93611d31816128e7565b9050611cc3565b508315610bb35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105df565b6000818152600183016020526040812054611dce575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104ac565b5060006104ac565b60008181526001830160205260408120548015611ebf576000611dfa6001836128fe565b8554909150600090611e0e906001906128fe565b9050818114611e73576000866000018281548110611e2e57611e2e6126a4565b9060005260206000200154905080876000018481548110611e5157611e516126a4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e8457611e84612915565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104ac565b60009150506104ac565b6107ec82826110d6565b60006001600160e01b03198216637965db0b60e01b14806104ac57506301ffc9a760e01b6001600160e01b03198316146104ac565b6001811115611f775760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105df565b816001600160a01b038516611fd357611fce8160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b611ff6565b836001600160a01b0316856001600160a01b031614611ff657611ff6858261203c565b6001600160a01b0384166120125761200d816120d9565b612035565b846001600160a01b0316846001600160a01b031614612035576120358482612188565b5050505050565b6000600161204984610a83565b61205391906128fe565b600083815260fc60205260409020549091508082146120a6576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906120eb906001906128fe565b600083815260fe602052604081205460fd8054939450909284908110612113576121136126a4565b906000526020600020015490508060fd8381548110612134576121346126a4565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061216c5761216c612915565b6001900381819060005260206000200160009055905550505050565b600061219383610a83565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b8280546121d89061261d565b90600052602060002090601f0160209004810192826121fa5760008555612240565b82601f1061221357805160ff1916838001178555612240565b82800160010185558215612240579182015b82811115612240578251825591602001919060010190612225565b5061224c929150612250565b5090565b5b8082111561224c5760008155600101612251565b6001600160e01b0319811681146108cf57600080fd5b60006020828403121561228d57600080fd5b8135610bb381612265565b60005b838110156122b357818101518382015260200161229b565b83811115610d105750506000910152565b600081518084526122dc816020860160208601612298565b601f01601f19169290920160200192915050565b602081526000610bb360208301846122c4565b60006020828403121561231557600080fd5b5035919050565b80356001600160a01b038116811461233357600080fd5b919050565b6000806040838503121561234b57600080fd5b6123548361231c565b946020939093013593505050565b60008060006060848603121561237757600080fd5b6123808461231c565b925061238e6020850161231c565b9150604084013590509250925092565b600080604083850312156123b157600080fd5b823591506123c16020840161231c565b90509250929050565b6000602082840312156123dc57600080fd5b610bb38261231c565b600080604083850312156123f857600080fd5b50508035926020909101359150565b6000806040838503121561241a57600080fd5b6124238361231c565b91506020830135801515811461243857600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561247457612474612443565b604051601f8501601f19908116603f0116810190828211818310171561249c5761249c612443565b816040528093508581528686860111156124b557600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126124e057600080fd5b610bb383833560208501612459565b60008060006060848603121561250457600080fd5b833567ffffffffffffffff8082111561251c57600080fd5b612528878388016124cf565b9450602086013591508082111561253e57600080fd5b61254a878388016124cf565b9350604086013591508082111561256057600080fd5b5061256d868287016124cf565b9150509250925092565b6000806000806080858703121561258d57600080fd5b6125968561231c565b93506125a46020860161231c565b925060408501359150606085013567ffffffffffffffff8111156125c757600080fd5b8501601f810187136125d857600080fd5b6125e787823560208401612459565b91505092959194509250565b6000806040838503121561260657600080fd5b61260f8361231c565b91506123c16020840161231c565b600181811c9082168061263157607f821691505b60208210810361265157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600083516126cc818460208801612298565b8351908301906126e0818360208801612298565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612803816017850160208801612298565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612834816028840160208801612298565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612873908301846122c4565b9695505050505050565b60006020828403121561288f57600080fd5b8151610bb381612265565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156128ca576128ca61289a565b500290565b600082198211156128e2576128e261289a565b500190565b6000816128f6576128f661289a565b506000190190565b6000828210156129105761291061289a565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212201b7252dec63958ca4364cbee917c87e2a12de519274a71ab71d044fe29c620c064736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80636a6278421161010f578063a6487c53116100a2578063d539139311610071578063d539139314610416578063d547741f1461043d578063e63ab1e914610450578063e985e9c51461046557600080fd5b8063a6487c53146103ca578063b88d4fde146103dd578063c87b56dd146103f0578063ca15c8731461040357600080fd5b806391d14854116100de57806391d148541461039457806395d89b41146103a7578063a217fddf146103af578063a22cb465146103b757600080fd5b80636a6278421461035357806370a08231146103665780638456cb59146103795780639010d07c1461038157600080fd5b80632f745c591161018757806342966c681161015657806342966c681461030e5780634f6ccce7146103215780635c975abb146103345780636352211e1461034057600080fd5b80632f745c59146102cd57806336568abe146102e05780633f4ba83a146102f357806342842e0e146102fb57600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd14610284578063248a9ca3146102975780632f2ff15d146102ba57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b61020861020336600461227b565b6104a1565b60405190151581526020015b60405180910390f35b6102256104b2565b60405161021491906122f0565b610245610240366004612303565b610544565b6040516001600160a01b039091168152602001610214565b61027061026b366004612338565b61056b565b005b60fd545b604051908152602001610214565b610270610292366004612362565b610685565b6102766102a5366004612303565b60009081526065602052604090206001015490565b6102706102c836600461239e565b6106b7565b6102766102db366004612338565b6106dc565b6102706102ee36600461239e565b610772565b6102706107f0565b610270610309366004612362565b610886565b61027061031c366004612303565b6108a1565b61027661032f366004612303565b6108d2565b61015f5460ff16610208565b61024561034e366004612303565b610965565b6102706103613660046123ca565b6109c5565b6102766103743660046123ca565b610a83565b610270610b09565b61024561038f3660046123e5565b610b9b565b6102086103a236600461239e565b610bba565b610225610be5565b610276600081565b6102706103c5366004612407565b610bf4565b6102706103d83660046124ef565b610bff565b6102706103eb366004612577565b610d16565b6102256103fe366004612303565b610d48565b610276610411366004612303565b610dae565b6102767f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027061044b36600461239e565b610dc5565b61027660008051602061292c83398151915281565b6102086104733660046125f3565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205460ff1690565b60006104ac82610dea565b92915050565b606060c980546104c19061261d565b80601f01602080910402602001604051908101604052809291908181526020018280546104ed9061261d565b801561053a5780601f1061050f5761010080835404028352916020019161053a565b820191906000526020600020905b81548152906001019060200180831161051d57829003601f168201915b5050505050905090565b600061054f82610e0f565b50600090815260cd60205260409020546001600160a01b031690565b600061057682610965565b9050806001600160a01b0316836001600160a01b0316036105e85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061060457506106048133610473565b6106765760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105df565b6106808383610e6e565b505050565b610690335b82610edc565b6106ac5760405162461bcd60e51b81526004016105df90612657565b610680838383610f5b565b6000828152606560205260409020600101546106d2816110cc565b61068083836110d6565b60006106e783610a83565b82106107495760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105df565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b6001600160a01b03811633146107e25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105df565b6107ec82826110f8565b5050565b61080860008051602061292c83398151915233610bba565b61087c576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105df565b61088461111a565b565b61068083838360405180602001604052806000815250610d16565b6108aa3361068a565b6108c65760405162461bcd60e51b81526004016105df90612657565b6108cf8161116d565b50565b60006108dd60fd5490565b82106109405760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105df565b60fd8281548110610953576109536126a4565b90600052602060002001549050919050565b600081815260cb60205260408120546001600160a01b0316806104ac5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b6109ef7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bba565b610a615760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105df565b610a7481610a6f6101c35490565b611210565b6108cf6101c380546001019055565b60006001600160a01b038216610aed5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105df565b506001600160a01b0316600090815260cc602052604090205490565b610b2160008051602061292c83398151915233610bba565b610b935760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105df565b6108846113a9565b6000828152609760205260408120610bb390836113e7565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060ca80546104c19061261d565b6107ec3383836113f3565b600054610100900460ff1615808015610c1f5750600054600160ff909116105b80610c395750303b158015610c39575060005460ff166001145b610c9c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105df565b6000805460ff191660011790558015610cbf576000805461ff0019166101001790555b610cca8484846114c1565b8015610d10576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610d203383610edc565b610d3c5760405162461bcd60e51b81526004016105df90612657565b610d1084848484611505565b6060610d5382610e0f565b6000610d5d611538565b90506000815111610d7d5760405180602001604052806000815250610bb3565b80610d8784611548565b604051602001610d989291906126ba565b6040516020818303038152906040529392505050565b60008181526097602052604081206104ac906115db565b600082815260656020526040902060010154610de0816110cc565b61068083836110f8565b60006001600160e01b0319821663780e9d6360e01b14806104ac57506104ac826115e5565b600081815260cb60205260409020546001600160a01b03166108cf5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b600081815260cd6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610ea382610965565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610ee883610965565b9050806001600160a01b0316846001600160a01b03161480610f2f57506001600160a01b03808216600090815260ce602090815260408083209388168352929052205460ff165b80610f535750836001600160a01b0316610f4884610544565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f6e82610965565b6001600160a01b031614610f945760405162461bcd60e51b81526004016105df906126e9565b6001600160a01b038216610ff65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105df565b6110038383836001611625565b826001600160a01b031661101682610965565b6001600160a01b03161461103c5760405162461bcd60e51b81526004016105df906126e9565b600081815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260cc855283862080546000190190559087168086528386208054600101905586865260cb90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8133611631565b6110e0828261168a565b60008281526097602052604090206106809082611710565b6111028282611725565b6000828152609760205260409020610680908261178c565b6111226117a1565b61015f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061117882610965565b9050611188816000846001611625565b61119182610965565b600083815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b03851680855260cc8452828520805460001901905587855260cb909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112665760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105df565b600081815260cb60205260409020546001600160a01b0316156112cb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6112d9600083836001611625565b600081815260cb60205260409020546001600160a01b03161561133e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6001600160a01b038216600081815260cc602090815260408083208054600101905584835260cb90915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6113b16117eb565b61015f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111503390565b6000610bb38383611832565b816001600160a01b0316836001600160a01b0316036114545760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105df565b6001600160a01b03838116600081815260ce6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff166114e85760405162461bcd60e51b81526004016105df9061272e565b6114f2838361185c565b6114fa6118aa565b6106808383836118de565b611510848484610f5b565b61151c84848484611967565b610d105760405162461bcd60e51b81526004016105df90612779565b60606101c480546104c19061261d565b6060600061155583611a68565b600101905060008167ffffffffffffffff81111561157557611575612443565b6040519080825280601f01601f19166020018201604052801561159f576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115a957509392505050565b60006104ac825490565b60006001600160e01b031982166380ac58cd60e01b148061161657506001600160e01b03198216635b5e139f60e01b145b806104ac57506104ac82611b40565b610d1084848484611b65565b61163b8282610bba565b6107ec5761164881611bd9565b611653836020611beb565b6040516020016116649291906127cb565b60408051601f198184030181529082905262461bcd60e51b82526105df916004016122f0565b6116948282610bba565b6107ec5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116cc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bb3836001600160a01b038416611d87565b61172f8282610bba565b156107ec5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bb3836001600160a01b038416611dd6565b61015f5460ff166108845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105df565b61015f5460ff16156108845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105df565b6000826000018281548110611849576118496126a4565b9060005260206000200154905092915050565b600054610100900460ff166118835760405162461bcd60e51b81526004016105df9061272e565b81516118969060c99060208501906121cc565b5080516106809060ca9060208401906121cc565b600054610100900460ff166118d15760405162461bcd60e51b81526004016105df9061272e565b61015f805460ff19169055565b600054610100900460ff166119055760405162461bcd60e51b81526004016105df9061272e565b8051611919906101c49060208401906121cc565b50611925600033611ec9565b61194f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611ec9565b61068060008051602061292c83398151915233611ec9565b60006001600160a01b0384163b15611a5d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906119ab903390899088908890600401612840565b6020604051808303816000875af19250505080156119e6575060408051601f3d908101601f191682019092526119e39181019061287d565b60015b611a43573d808015611a14576040519150601f19603f3d011682016040523d82523d6000602084013e611a19565b606091505b508051600003611a3b5760405162461bcd60e51b81526004016105df90612779565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f53565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aa75772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad3576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af157662386f26fc10000830492506010015b6305f5e1008310611b09576305f5e100830492506008015b6127108310611b1d57612710830492506004015b60648310611b2f576064830492506002015b600a83106104ac5760010192915050565b60006001600160e01b03198216635a05180f60e01b14806104ac57506104ac82611ed3565b611b7184848484611f08565b61015f5460ff1615610d105760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105df565b60606104ac6001600160a01b03831660145b60606000611bfa8360026128b0565b611c059060026128cf565b67ffffffffffffffff811115611c1d57611c1d612443565b6040519080825280601f01601f191660200182016040528015611c47576020820181803683370190505b509050600360fc1b81600081518110611c6257611c626126a4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c9157611c916126a4565b60200101906001600160f81b031916908160001a9053506000611cb58460026128b0565b611cc09060016128cf565b90505b6001811115611d38576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cf457611cf46126a4565b1a60f81b828281518110611d0a57611d0a6126a4565b60200101906001600160f81b031916908160001a90535060049490941c93611d31816128e7565b9050611cc3565b508315610bb35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105df565b6000818152600183016020526040812054611dce575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104ac565b5060006104ac565b60008181526001830160205260408120548015611ebf576000611dfa6001836128fe565b8554909150600090611e0e906001906128fe565b9050818114611e73576000866000018281548110611e2e57611e2e6126a4565b9060005260206000200154905080876000018481548110611e5157611e516126a4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e8457611e84612915565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104ac565b60009150506104ac565b6107ec82826110d6565b60006001600160e01b03198216637965db0b60e01b14806104ac57506301ffc9a760e01b6001600160e01b03198316146104ac565b6001811115611f775760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105df565b816001600160a01b038516611fd357611fce8160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b611ff6565b836001600160a01b0316856001600160a01b031614611ff657611ff6858261203c565b6001600160a01b0384166120125761200d816120d9565b612035565b846001600160a01b0316846001600160a01b031614612035576120358482612188565b5050505050565b6000600161204984610a83565b61205391906128fe565b600083815260fc60205260409020549091508082146120a6576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906120eb906001906128fe565b600083815260fe602052604081205460fd8054939450909284908110612113576121136126a4565b906000526020600020015490508060fd8381548110612134576121346126a4565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061216c5761216c612915565b6001900381819060005260206000200160009055905550505050565b600061219383610a83565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b8280546121d89061261d565b90600052602060002090601f0160209004810192826121fa5760008555612240565b82601f1061221357805160ff1916838001178555612240565b82800160010185558215612240579182015b82811115612240578251825591602001919060010190612225565b5061224c929150612250565b5090565b5b8082111561224c5760008155600101612251565b6001600160e01b0319811681146108cf57600080fd5b60006020828403121561228d57600080fd5b8135610bb381612265565b60005b838110156122b357818101518382015260200161229b565b83811115610d105750506000910152565b600081518084526122dc816020860160208601612298565b601f01601f19169290920160200192915050565b602081526000610bb360208301846122c4565b60006020828403121561231557600080fd5b5035919050565b80356001600160a01b038116811461233357600080fd5b919050565b6000806040838503121561234b57600080fd5b6123548361231c565b946020939093013593505050565b60008060006060848603121561237757600080fd5b6123808461231c565b925061238e6020850161231c565b9150604084013590509250925092565b600080604083850312156123b157600080fd5b823591506123c16020840161231c565b90509250929050565b6000602082840312156123dc57600080fd5b610bb38261231c565b600080604083850312156123f857600080fd5b50508035926020909101359150565b6000806040838503121561241a57600080fd5b6124238361231c565b91506020830135801515811461243857600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561247457612474612443565b604051601f8501601f19908116603f0116810190828211818310171561249c5761249c612443565b816040528093508581528686860111156124b557600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126124e057600080fd5b610bb383833560208501612459565b60008060006060848603121561250457600080fd5b833567ffffffffffffffff8082111561251c57600080fd5b612528878388016124cf565b9450602086013591508082111561253e57600080fd5b61254a878388016124cf565b9350604086013591508082111561256057600080fd5b5061256d868287016124cf565b9150509250925092565b6000806000806080858703121561258d57600080fd5b6125968561231c565b93506125a46020860161231c565b925060408501359150606085013567ffffffffffffffff8111156125c757600080fd5b8501601f810187136125d857600080fd5b6125e787823560208401612459565b91505092959194509250565b6000806040838503121561260657600080fd5b61260f8361231c565b91506123c16020840161231c565b600181811c9082168061263157607f821691505b60208210810361265157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600083516126cc818460208801612298565b8351908301906126e0818360208801612298565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612803816017850160208801612298565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612834816028840160208801612298565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612873908301846122c4565b9695505050505050565b60006020828403121561288f57600080fd5b8151610bb381612265565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156128ca576128ca61289a565b500290565b600082198211156128e2576128e261289a565b500190565b6000816128f6576128f661289a565b506000190190565b6000828210156129105761291061289a565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212201b7252dec63958ca4364cbee917c87e2a12de519274a71ab71d044fe29c620c064736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json new file mode 100644 index 00000000..52ba86a2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json @@ -0,0 +1,383 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721RoyaltyUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721URIStorageUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721URIStorageUpgradeable.json new file mode 100644 index 00000000..74b88d62 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721URIStorageUpgradeable.json @@ -0,0 +1,386 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721URIStorageUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + } + ], + "name": "BatchMetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "MetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json new file mode 100644 index 00000000..d72a04d8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json @@ -0,0 +1,354 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Upgradeable", + "sourceName": "contracts/token/ERC721/ERC721Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506110fb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606065805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152606960205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152606760205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526068602052604090205490565b60606066805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152606760205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea2646970667358221220f61e28cf38e2205efa30e3dfada16da5aefe80ca2a8d1c0cdb13ccb35670677864736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606065805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152606960205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152606760205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526068602052604090205490565b60606066805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152606760205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea2646970667358221220f61e28cf38e2205efa30e3dfada16da5aefe80ca2a8d1c0cdb13ccb35670677864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721VotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721VotesUpgradeable.json new file mode 100644 index 00000000..0d79e7b4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721VotesUpgradeable.json @@ -0,0 +1,643 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721VotesUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721VotesUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721WrapperUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721WrapperUpgradeable.json new file mode 100644 index 00000000..8e4b4f07 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721WrapperUpgradeable.json @@ -0,0 +1,449 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721WrapperUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721WrapperUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "depositFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "withdrawTo", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json new file mode 100644 index 00000000..4d607bf0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json @@ -0,0 +1,612 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC777PresetFixedSupplyUpgradeable", + "sourceName": "contracts/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "AuthorizedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Burned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "RevokedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Sent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "authorizeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "defaultOperators", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "granularity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address[]", + "name": "defaultOperators", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "isOperatorFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "revokeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50611dad806100206000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063768f950a116100ad578063d95b637111610071578063d95b637114610249578063dd62ed3e1461025c578063fad8b32a14610295578063fc673c4f146102a8578063fe9d9303146102bb57600080fd5b8063768f950a146101f5578063959b8c3f1461020857806395d89b411461021b5780639bd9bbc614610223578063a9059cbb1461023657600080fd5b806323b872dd116100f457806323b872dd1461018e578063313ce567146101a1578063556f0dc7146101b057806362ad1b83146101b757806370a08231146101cc57600080fd5b806306e485381461012657806306fdde0314610144578063095ea7b31461015957806318160ddd1461017c575b600080fd5b61012e6102ce565b60405161013b9190611671565b60405180910390f35b61014c610330565b60405161013b919061170b565b61016c610167366004611746565b6103b9565b604051901515815260200161013b565b6034545b60405190815260200161013b565b61016c61019c366004611772565b6103d1565b6040516012815260200161013b565b6001610180565b6101ca6101c536600461186a565b610417565b005b6101806101da3660046118fd565b6001600160a01b031660009081526033602052604090205490565b6101ca61020336600461191a565b61045c565b6101ca6102163660046118fd565b610577565b61014c610694565b6101ca610231366004611a2d565b6106a3565b61016c610244366004611746565b6106c6565b61016c610257366004611a86565b6106fe565b61018061026a366004611a86565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101ca6102a33660046118fd565b6107a0565b6101ca6102b6366004611abf565b6108bb565b6101ca6102c9366004611b3f565b6108f3565b6060603780548060200260200160405190810160405280929190818152602001828054801561032657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610308575b5050505050905090565b60606035805461033f90611b86565b80601f016020809104026020016040519081016040528092919081815260200182805461036b90611b86565b80156103265780601f1061038d57610100808354040283529160200191610326565b820191906000526020600020905b81548152906001019060200180831161039b57509395945050505050565b6000336103c7818585610912565b5060019392505050565b6000336103df858285610a39565b61040c85858560405180602001604052806000815250604051806020016040528060008152506000610ac5565b506001949350505050565b61042133866106fe565b6104465760405162461bcd60e51b815260040161043d90611bc0565b60405180910390fd5b61045585858585856001610ac5565b5050505050565b600054610100900460ff161580801561047c5750600054600160ff909116105b806104965750303b158015610496575060005460ff166001145b6104f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161043d565b6000805460ff19166001179055801561051c576000805461ff0019166101001790555b6105298686868686610bc1565b801561056f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6001600160a01b03811633036105db5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561062c57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff1916905561065b565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b60606036805461033f90611b86565b6106c133848484604051806020016040528060008152506001610ac5565b505050565b60006106f533848460405180602001604052806000815250604051806020016040528060008152506000610ac5565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061076957506001600160a01b03831660009081526038602052604090205460ff16801561076957506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061079957506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036108025760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561085657336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610882565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b6108c533856106fe565b6108e15760405162461bcd60e51b815260040161043d90611bc0565b6108ed84848484610c00565b50505050565b61090e33838360405180602001604052806000815250610c00565b5050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043d565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043d565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146108ed5781811015610ab85760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161043d565b6108ed8484848403610912565b6001600160a01b038616610b2a5760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161043d565b6001600160a01b038516610b8c5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161043d565b33610b9b818888888888610db5565b610ba9818888888888610edc565b610bb881888888888888611042565b50505050505050565b600054610100900460ff16610be85760405162461bcd60e51b815260040161043d90611c0c565b610bf3858585611207565b61045585858585856113f1565b6001600160a01b038416610c615760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161043d565b33610c7181866000878787610db5565b6001600160a01b03851660009081526033602052604090205484811015610ce65760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161043d565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610d15908490611c6d565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610d6393929190611c84565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190611cb9565b90506001600160a01b03811615610bb857604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610ea1908a908a908a908a908a908a90600401611cd6565b600060405180830381600087803b158015610ebb57600080fd5b505af1158015610ecf573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610f555760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161043d565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610f8c908490611d30565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610fe493929190611c84565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161103191815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611cb9565b90506001600160a01b03811615611163576040516223de2960e01b81526001600160a01b038216906223de299061112c908b908b908b908b908b908b90600401611cd6565b600060405180830381600087803b15801561114657600080fd5b505af115801561115a573d6000803e3d6000fd5b505050506111fd565b81156111fd576001600160a01b0386163b156111fd5760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161043d565b5050505050505050565b600054610100900460ff1661122e5760405162461bcd60e51b815260040161043d90611c0c565b8251611241906035906020860190611583565b508151611255906036906020850190611583565b508051611269906037906020840190611607565b5060005b81518110156112d25760016038600084848151811061128e5761128e611d48565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806112ca81611d5e565b91505061126d565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b1580156113dd57600080fd5b505af1158015610bb8573d6000803e3d6000fd5b600054610100900460ff166114185760405162461bcd60e51b815260040161043d90611c0c565b610455818360405180602001604052806000815250604051806020016040528060008152506108ed8484848460016001600160a01b03851661149c5760405162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f2061646472657373604482015260640161043d565b600033905084603460008282546114b39190611d30565b90915550506001600160a01b038616600090815260336020526040812080548792906114e0908490611d30565b909155506114f690508160008888888888611042565b856001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d87878760405161153d93929190611c84565b60405180910390a36040518581526001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610da5565b82805461158f90611b86565b90600052602060002090601f0160209004810192826115b157600085556115f7565b82601f106115ca57805160ff19168380011785556115f7565b828001600101855582156115f7579182015b828111156115f75782518255916020019190600101906115dc565b5061160392915061165c565b5090565b8280548282559060005260206000209081019282156115f7579160200282015b828111156115f757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611627565b5b80821115611603576000815560010161165d565b6020808252825182820181905260009190848201906040850190845b818110156116b25783516001600160a01b03168352928401929184019160010161168d565b50909695505050505050565b6000815180845260005b818110156116e4576020818501810151868301820152016116c8565b818111156116f6576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061079960208301846116be565b6001600160a01b038116811461173357600080fd5b50565b80356117418161171e565b919050565b6000806040838503121561175957600080fd5b82356117648161171e565b946020939093013593505050565b60008060006060848603121561178757600080fd5b83356117928161171e565b925060208401356117a28161171e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117f2576117f26117b3565b604052919050565b600082601f83011261180b57600080fd5b813567ffffffffffffffff811115611825576118256117b3565b611838601f8201601f19166020016117c9565b81815284602083860101111561184d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561188257600080fd5b853561188d8161171e565b9450602086013561189d8161171e565b935060408601359250606086013567ffffffffffffffff808211156118c157600080fd5b6118cd89838a016117fa565b935060808801359150808211156118e357600080fd5b506118f0888289016117fa565b9150509295509295909350565b60006020828403121561190f57600080fd5b81356107998161171e565b600080600080600060a0868803121561193257600080fd5b853567ffffffffffffffff8082111561194a57600080fd5b61195689838a016117fa565b965060209150818801358181111561196d57600080fd5b6119798a828b016117fa565b96505060408801358181111561198e57600080fd5b8801601f81018a1361199f57600080fd5b8035828111156119b1576119b16117b3565b8060051b92506119c28484016117c9565b818152928201840192848101908c8511156119dc57600080fd5b928501925b84841015611a0657833592506119f68361171e565b82825292850192908501906119e1565b975050505060608801359350611a2191505060808701611736565b90509295509295909350565b600080600060608486031215611a4257600080fd5b8335611a4d8161171e565b925060208401359150604084013567ffffffffffffffff811115611a7057600080fd5b611a7c868287016117fa565b9150509250925092565b60008060408385031215611a9957600080fd5b8235611aa48161171e565b91506020830135611ab48161171e565b809150509250929050565b60008060008060808587031215611ad557600080fd5b8435611ae08161171e565b935060208501359250604085013567ffffffffffffffff80821115611b0457600080fd5b611b10888389016117fa565b93506060870135915080821115611b2657600080fd5b50611b33878288016117fa565b91505092959194509250565b60008060408385031215611b5257600080fd5b82359150602083013567ffffffffffffffff811115611b7057600080fd5b611b7c858286016117fa565b9150509250929050565b600181811c90821680611b9a57607f821691505b602082108103611bba57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611c7f57611c7f611c57565b500390565b838152606060208201526000611c9d60608301856116be565b8281036040840152611caf81856116be565b9695505050505050565b600060208284031215611ccb57600080fd5b81516107998161171e565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c060808201819052600090611d11908301856116be565b82810360a0840152611d2381856116be565b9998505050505050505050565b60008219821115611d4357611d43611c57565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201611d7057611d70611c57565b506001019056fea264697066735822122030a4d695002835d9c151a106b00acb1075e2875f4b101a145a9be16e6efcd56864736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063768f950a116100ad578063d95b637111610071578063d95b637114610249578063dd62ed3e1461025c578063fad8b32a14610295578063fc673c4f146102a8578063fe9d9303146102bb57600080fd5b8063768f950a146101f5578063959b8c3f1461020857806395d89b411461021b5780639bd9bbc614610223578063a9059cbb1461023657600080fd5b806323b872dd116100f457806323b872dd1461018e578063313ce567146101a1578063556f0dc7146101b057806362ad1b83146101b757806370a08231146101cc57600080fd5b806306e485381461012657806306fdde0314610144578063095ea7b31461015957806318160ddd1461017c575b600080fd5b61012e6102ce565b60405161013b9190611671565b60405180910390f35b61014c610330565b60405161013b919061170b565b61016c610167366004611746565b6103b9565b604051901515815260200161013b565b6034545b60405190815260200161013b565b61016c61019c366004611772565b6103d1565b6040516012815260200161013b565b6001610180565b6101ca6101c536600461186a565b610417565b005b6101806101da3660046118fd565b6001600160a01b031660009081526033602052604090205490565b6101ca61020336600461191a565b61045c565b6101ca6102163660046118fd565b610577565b61014c610694565b6101ca610231366004611a2d565b6106a3565b61016c610244366004611746565b6106c6565b61016c610257366004611a86565b6106fe565b61018061026a366004611a86565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101ca6102a33660046118fd565b6107a0565b6101ca6102b6366004611abf565b6108bb565b6101ca6102c9366004611b3f565b6108f3565b6060603780548060200260200160405190810160405280929190818152602001828054801561032657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610308575b5050505050905090565b60606035805461033f90611b86565b80601f016020809104026020016040519081016040528092919081815260200182805461036b90611b86565b80156103265780601f1061038d57610100808354040283529160200191610326565b820191906000526020600020905b81548152906001019060200180831161039b57509395945050505050565b6000336103c7818585610912565b5060019392505050565b6000336103df858285610a39565b61040c85858560405180602001604052806000815250604051806020016040528060008152506000610ac5565b506001949350505050565b61042133866106fe565b6104465760405162461bcd60e51b815260040161043d90611bc0565b60405180910390fd5b61045585858585856001610ac5565b5050505050565b600054610100900460ff161580801561047c5750600054600160ff909116105b806104965750303b158015610496575060005460ff166001145b6104f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161043d565b6000805460ff19166001179055801561051c576000805461ff0019166101001790555b6105298686868686610bc1565b801561056f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6001600160a01b03811633036105db5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561062c57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff1916905561065b565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b60606036805461033f90611b86565b6106c133848484604051806020016040528060008152506001610ac5565b505050565b60006106f533848460405180602001604052806000815250604051806020016040528060008152506000610ac5565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061076957506001600160a01b03831660009081526038602052604090205460ff16801561076957506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061079957506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036108025760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561085657336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610882565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b6108c533856106fe565b6108e15760405162461bcd60e51b815260040161043d90611bc0565b6108ed84848484610c00565b50505050565b61090e33838360405180602001604052806000815250610c00565b5050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043d565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043d565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146108ed5781811015610ab85760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161043d565b6108ed8484848403610912565b6001600160a01b038616610b2a5760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161043d565b6001600160a01b038516610b8c5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161043d565b33610b9b818888888888610db5565b610ba9818888888888610edc565b610bb881888888888888611042565b50505050505050565b600054610100900460ff16610be85760405162461bcd60e51b815260040161043d90611c0c565b610bf3858585611207565b61045585858585856113f1565b6001600160a01b038416610c615760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161043d565b33610c7181866000878787610db5565b6001600160a01b03851660009081526033602052604090205484811015610ce65760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161043d565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610d15908490611c6d565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610d6393929190611c84565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190611cb9565b90506001600160a01b03811615610bb857604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610ea1908a908a908a908a908a908a90600401611cd6565b600060405180830381600087803b158015610ebb57600080fd5b505af1158015610ecf573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610f555760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161043d565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610f8c908490611d30565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610fe493929190611c84565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161103191815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611cb9565b90506001600160a01b03811615611163576040516223de2960e01b81526001600160a01b038216906223de299061112c908b908b908b908b908b908b90600401611cd6565b600060405180830381600087803b15801561114657600080fd5b505af115801561115a573d6000803e3d6000fd5b505050506111fd565b81156111fd576001600160a01b0386163b156111fd5760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161043d565b5050505050505050565b600054610100900460ff1661122e5760405162461bcd60e51b815260040161043d90611c0c565b8251611241906035906020860190611583565b508151611255906036906020850190611583565b508051611269906037906020840190611607565b5060005b81518110156112d25760016038600084848151811061128e5761128e611d48565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806112ca81611d5e565b91505061126d565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b1580156113dd57600080fd5b505af1158015610bb8573d6000803e3d6000fd5b600054610100900460ff166114185760405162461bcd60e51b815260040161043d90611c0c565b610455818360405180602001604052806000815250604051806020016040528060008152506108ed8484848460016001600160a01b03851661149c5760405162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f2061646472657373604482015260640161043d565b600033905084603460008282546114b39190611d30565b90915550506001600160a01b038616600090815260336020526040812080548792906114e0908490611d30565b909155506114f690508160008888888888611042565b856001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d87878760405161153d93929190611c84565b60405180910390a36040518581526001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610da5565b82805461158f90611b86565b90600052602060002090601f0160209004810192826115b157600085556115f7565b82601f106115ca57805160ff19168380011785556115f7565b828001600101855582156115f7579182015b828111156115f75782518255916020019190600101906115dc565b5061160392915061165c565b5090565b8280548282559060005260206000209081019282156115f7579160200282015b828111156115f757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611627565b5b80821115611603576000815560010161165d565b6020808252825182820181905260009190848201906040850190845b818110156116b25783516001600160a01b03168352928401929184019160010161168d565b50909695505050505050565b6000815180845260005b818110156116e4576020818501810151868301820152016116c8565b818111156116f6576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061079960208301846116be565b6001600160a01b038116811461173357600080fd5b50565b80356117418161171e565b919050565b6000806040838503121561175957600080fd5b82356117648161171e565b946020939093013593505050565b60008060006060848603121561178757600080fd5b83356117928161171e565b925060208401356117a28161171e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117f2576117f26117b3565b604052919050565b600082601f83011261180b57600080fd5b813567ffffffffffffffff811115611825576118256117b3565b611838601f8201601f19166020016117c9565b81815284602083860101111561184d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561188257600080fd5b853561188d8161171e565b9450602086013561189d8161171e565b935060408601359250606086013567ffffffffffffffff808211156118c157600080fd5b6118cd89838a016117fa565b935060808801359150808211156118e357600080fd5b506118f0888289016117fa565b9150509295509295909350565b60006020828403121561190f57600080fd5b81356107998161171e565b600080600080600060a0868803121561193257600080fd5b853567ffffffffffffffff8082111561194a57600080fd5b61195689838a016117fa565b965060209150818801358181111561196d57600080fd5b6119798a828b016117fa565b96505060408801358181111561198e57600080fd5b8801601f81018a1361199f57600080fd5b8035828111156119b1576119b16117b3565b8060051b92506119c28484016117c9565b818152928201840192848101908c8511156119dc57600080fd5b928501925b84841015611a0657833592506119f68361171e565b82825292850192908501906119e1565b975050505060608801359350611a2191505060808701611736565b90509295509295909350565b600080600060608486031215611a4257600080fd5b8335611a4d8161171e565b925060208401359150604084013567ffffffffffffffff811115611a7057600080fd5b611a7c868287016117fa565b9150509250925092565b60008060408385031215611a9957600080fd5b8235611aa48161171e565b91506020830135611ab48161171e565b809150509250929050565b60008060008060808587031215611ad557600080fd5b8435611ae08161171e565b935060208501359250604085013567ffffffffffffffff80821115611b0457600080fd5b611b10888389016117fa565b93506060870135915080821115611b2657600080fd5b50611b33878288016117fa565b91505092959194509250565b60008060408385031215611b5257600080fd5b82359150602083013567ffffffffffffffff811115611b7057600080fd5b611b7c858286016117fa565b9150509250929050565b600181811c90821680611b9a57607f821691505b602082108103611bba57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611c7f57611c7f611c57565b500390565b838152606060208201526000611c9d60608301856116be565b8281036040840152611caf81856116be565b9695505050505050565b600060208284031215611ccb57600080fd5b81516107998161171e565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c060808201819052600090611d11908301856116be565b82810360a0840152611d2381856116be565b9998505050505050505050565b60008219821115611d4357611d43611c57565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201611d7057611d70611c57565b506001019056fea264697066735822122030a4d695002835d9c151a106b00acb1075e2875f4b101a145a9be16e6efcd56864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json new file mode 100644 index 00000000..6ed2cba0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json @@ -0,0 +1,579 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC777Upgradeable", + "sourceName": "contracts/token/ERC777/ERC777Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "AuthorizedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Burned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "RevokedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Sent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "authorizeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "defaultOperators", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "granularity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "isOperatorFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "revokeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50611619806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6034545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526033602052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060603780548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060603580546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff16156104f357336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060603680546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526038602052604090205460ff16801561063057506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff161561071d57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526033602052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea26469706673582212207111d819d18f7e65e31b6cee7ce658eff0abc06b305d910f2e82199e5f9faba864736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6034545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526033602052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060603780548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060603580546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff16156104f357336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060603680546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526038602052604090205460ff16801561063057506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff161561071d57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526033602052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea26469706673582212207111d819d18f7e65e31b6cee7ce658eff0abc06b305d910f2e82199e5f9faba864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json new file mode 100644 index 00000000..2b7547ba --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EnumerableMapUpgradeable", + "sourceName": "contracts/utils/structs/EnumerableMapUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bd96dc64a5eb475047614c7fa721b2baf1792ed5cd4254417d9ae9e1c67e05a664736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bd96dc64a5eb475047614c7fa721b2baf1792ed5cd4254417d9ae9e1c67e05a664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json new file mode 100644 index 00000000..cdb814f1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EnumerableSetUpgradeable", + "sourceName": "contracts/utils/structs/EnumerableSetUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201eab4f8eca1462662c5f28da8628f33400567893987a0647164a05fdc5dba30264736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201eab4f8eca1462662c5f28da8628f33400567893987a0647164a05fdc5dba30264736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json new file mode 100644 index 00000000..7f67508d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json @@ -0,0 +1,166 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EscrowUpgradeable", + "sourceName": "contracts/utils/escrow/EscrowUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "depositsOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506106f2806100206000396000f3fe6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b146100c1578063e3a9db1a146100ee578063f2fde38b14610132578063f340fa011461015257600080fd5b806351cff8d914610075578063715018a6146100975780638129fc1c146100ac575b600080fd5b34801561008157600080fd5b50610095610090366004610627565b610165565b005b3480156100a357600080fd5b506100956101dc565b3480156100b857600080fd5b506100956101f0565b3480156100cd57600080fd5b506033546040516001600160a01b0390911681526020015b60405180910390f35b3480156100fa57600080fd5b50610124610109366004610627565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100e5565b34801561013e57600080fd5b5061009561014d366004610627565b610306565b610095610160366004610627565b61037c565b61016d6103ee565b6001600160a01b03811660008181526065602052604081208054919055906101959082610448565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101d091815260200190565b60405180910390a25050565b6101e46103ee565b6101ee6000610566565b565b600054610100900460ff16158080156102105750600054600160ff909116105b8061022a5750303b15801561022a575060005460ff166001145b6102925760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156102b5576000805461ff0019166101001790555b6102bd6105b8565b8015610303576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61030e6103ee565b6001600160a01b0381166103735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610289565b61030381610566565b6103846103ee565b6001600160a01b0381166000908152606560205260408120805434928392916103ae90849061064b565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101d0565b6033546001600160a01b031633146101ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610289565b804710156104985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610289565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146104e5576040519150601f19603f3d011682016040523d82523d6000602084013e6104ea565b606091505b50509050806105615760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610289565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166105df5760405162461bcd60e51b815260040161028990610671565b6101ee600054610100900460ff166106095760405162461bcd60e51b815260040161028990610671565b6101ee33610566565b6001600160a01b038116811461030357600080fd5b60006020828403121561063957600080fd5b813561064481610612565b9392505050565b6000821982111561066c57634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122023d227fb64677a6c46e7e32e5c723cde51856e37c95b1c55e9f926ce208756ac64736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b146100c1578063e3a9db1a146100ee578063f2fde38b14610132578063f340fa011461015257600080fd5b806351cff8d914610075578063715018a6146100975780638129fc1c146100ac575b600080fd5b34801561008157600080fd5b50610095610090366004610627565b610165565b005b3480156100a357600080fd5b506100956101dc565b3480156100b857600080fd5b506100956101f0565b3480156100cd57600080fd5b506033546040516001600160a01b0390911681526020015b60405180910390f35b3480156100fa57600080fd5b50610124610109366004610627565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100e5565b34801561013e57600080fd5b5061009561014d366004610627565b610306565b610095610160366004610627565b61037c565b61016d6103ee565b6001600160a01b03811660008181526065602052604081208054919055906101959082610448565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101d091815260200190565b60405180910390a25050565b6101e46103ee565b6101ee6000610566565b565b600054610100900460ff16158080156102105750600054600160ff909116105b8061022a5750303b15801561022a575060005460ff166001145b6102925760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156102b5576000805461ff0019166101001790555b6102bd6105b8565b8015610303576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61030e6103ee565b6001600160a01b0381166103735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610289565b61030381610566565b6103846103ee565b6001600160a01b0381166000908152606560205260408120805434928392916103ae90849061064b565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101d0565b6033546001600160a01b031633146101ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610289565b804710156104985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610289565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146104e5576040519150601f19603f3d011682016040523d82523d6000602084013e6104ea565b606091505b50509050806105615760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610289565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166105df5760405162461bcd60e51b815260040161028990610671565b6101ee600054610100900460ff166106095760405162461bcd60e51b815260040161028990610671565b6101ee33610566565b6001600160a01b038116811461030357600080fd5b60006020828403121561063957600080fd5b813561064481610612565b9392505050565b6000821982111561066c57634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122023d227fb64677a6c46e7e32e5c723cde51856e37c95b1c55e9f926ce208756ac64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json new file mode 100644 index 00000000..0258276b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json @@ -0,0 +1,1331 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCompatibilityBravoUpgradeable", + "sourceName": "contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "getActions", + "outputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "getReceipt", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "hasVoted", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "internalType": "struct IGovernorCompatibilityBravoUpgradeable.Receipt", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "startBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json new file mode 100644 index 00000000..0f46e924 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json @@ -0,0 +1,1045 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingSimpleUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorPreventLateQuorumUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorPreventLateQuorumUpgradeable.json new file mode 100644 index 00000000..9558a4ec --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorPreventLateQuorumUpgradeable.json @@ -0,0 +1,1080 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorPreventLateQuorumUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "oldVoteExtension", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newVoteExtension", + "type": "uint64" + } + ], + "name": "LateQuorumVoteExtensionSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "extendedDeadline", + "type": "uint64" + } + ], + "name": "ProposalExtended", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "lateQuorumVoteExtension", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newVoteExtension", + "type": "uint64" + } + ], + "name": "setLateQuorumVoteExtension", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json new file mode 100644 index 00000000..e07ad163 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json @@ -0,0 +1,1016 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorProposalThresholdUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorSettingsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorSettingsUpgradeable.json new file mode 100644 index 00000000..75e77f71 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorSettingsUpgradeable.json @@ -0,0 +1,1112 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorSettingsUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorSettingsUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldProposalThreshold", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newProposalThreshold", + "type": "uint256" + } + ], + "name": "ProposalThresholdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldVotingDelay", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newVotingDelay", + "type": "uint256" + } + ], + "name": "VotingDelaySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldVotingPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newVotingPeriod", + "type": "uint256" + } + ], + "name": "VotingPeriodSet", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newProposalThreshold", + "type": "uint256" + } + ], + "name": "setProposalThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newVotingDelay", + "type": "uint256" + } + ], + "name": "setVotingDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newVotingPeriod", + "type": "uint256" + } + ], + "name": "setVotingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockCompoundUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockCompoundUpgradeable.json new file mode 100644 index 00000000..14768326 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockCompoundUpgradeable.json @@ -0,0 +1,1140 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorTimelockCompoundUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldTimelock", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTimelock", + "type": "address" + } + ], + "name": "TimelockChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "__acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ICompoundTimelockUpgradeable", + "name": "newTimelock", + "type": "address" + } + ], + "name": "updateTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockControlUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockControlUpgradeable.json new file mode 100644 index 00000000..7e53a1ed --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockControlUpgradeable.json @@ -0,0 +1,1133 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorTimelockControlUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldTimelock", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTimelock", + "type": "address" + } + ], + "name": "TimelockChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TimelockControllerUpgradeable", + "name": "newTimelock", + "type": "address" + } + ], + "name": "updateTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json new file mode 100644 index 00000000..85d09455 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json @@ -0,0 +1,1016 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorUpgradeable", + "sourceName": "contracts/governance/GovernorUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json new file mode 100644 index 00000000..d0a0ed1e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json @@ -0,0 +1,1029 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesCompUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorVotesCompUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract ERC20VotesCompUpgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json new file mode 100644 index 00000000..57cdafcc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json @@ -0,0 +1,1106 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesQuorumFractionUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumDenominator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json new file mode 100644 index 00000000..46e9649b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json @@ -0,0 +1,1029 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorVotesUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "Empty", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json new file mode 100644 index 00000000..66bc1b0d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json @@ -0,0 +1,336 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAMBUpgradeable", + "sourceName": "contracts/vendor/amb/IAMBUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "AffirmationCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "encodedData", + "type": "bytes" + } + ], + "name": "UserRequestForAffirmation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "encodedData", + "type": "bytes" + } + ], + "name": "UserRequestForSignature", + "type": "event" + }, + { + "inputs": [], + "name": "destinationChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "failedMessageDataHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "failedMessageReceiver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "failedMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxGasPerTx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_messageId", + "type": "bytes32" + } + ], + "name": "messageCallStatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageSourceChainId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_contract", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gas", + "type": "uint256" + } + ], + "name": "requireToConfirmMessage", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_contract", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gas", + "type": "uint256" + } + ], + "name": "requireToPassMessage", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sourceChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "transactionHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json new file mode 100644 index 00000000..dca0fedd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json @@ -0,0 +1,355 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessControlDefaultAdminRulesUpgradeable", + "sourceName": "contracts/access/IAccessControlDefaultAdminRulesUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminDelayChangeCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "effectSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminDelayChangeScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "DefaultAdminTransferCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "acceptSchedule", + "type": "uint48" + } + ], + "name": "DefaultAdminTransferScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "acceptDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "beginDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelDefaultAdminTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + } + ], + "name": "changeDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultAdminDelayIncreaseWait", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdmin", + "outputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + }, + { + "internalType": "uint48", + "name": "acceptSchedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingDefaultAdminDelay", + "outputs": [ + { + "internalType": "uint48", + "name": "newDelay", + "type": "uint48" + }, + { + "internalType": "uint48", + "name": "effectSchedule", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollbackDefaultAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json new file mode 100644 index 00000000..da71abff --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json @@ -0,0 +1,226 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessControlEnumerableUpgradeable", + "sourceName": "contracts/access/IAccessControlEnumerableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json new file mode 100644 index 00000000..975c7175 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json @@ -0,0 +1,183 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessControlUpgradeable", + "sourceName": "contracts/access/IAccessControlUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json new file mode 100644 index 00000000..136a8cf3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json @@ -0,0 +1,364 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IArbSysUpgradeable", + "sourceName": "contracts/vendor/arbitrum/IArbSysUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "uniqueId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "batchNumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "indexInBatch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "callvalue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "L2ToL1Transaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "hash", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "position", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "arbBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethBlockNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "callvalue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "L2ToL1Tx", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "reserved", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "position", + "type": "uint256" + } + ], + "name": "SendMerkleUpdate", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "arbBlockNum", + "type": "uint256" + } + ], + "name": "arbBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbChainID", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "arbOSVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStorageGasAvailable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isTopLevelCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "unused", + "type": "address" + } + ], + "name": "mapL1SenderContractAddressToL2Alias", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "myCallersAddressWithoutAliasing", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sendMerkleTreeState", + "outputs": [ + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "partials", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendTxToL1", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "wasMyCallersAddressAliased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "withdrawEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json new file mode 100644 index 00000000..3a8085f0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IBeaconUpgradeable", + "sourceName": "contracts/proxy/beacon/IBeaconUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json new file mode 100644 index 00000000..7c245c2e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json @@ -0,0 +1,538 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IBridgeUpgradeable", + "sourceName": "contracts/vendor/arbitrum/IBridgeUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "outbox", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "BridgeCallTriggered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "InboxToggle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageIndex", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "beforeInboxAcc", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "kind", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "messageDataHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "baseFeeL1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "MessageDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "outbox", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "OutboxToggle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newSequencerInbox", + "type": "address" + } + ], + "name": "SequencerInboxUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "activeOutbox", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allowedDelayedInboxList", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "inbox", + "type": "address" + } + ], + "name": "allowedDelayedInboxes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allowedOutboxList", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "outbox", + "type": "address" + } + ], + "name": "allowedOutboxes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "delayedInboxAccs", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delayedMessageCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "messageDataHash", + "type": "bytes32" + } + ], + "name": "enqueueDelayedMessage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "afterDelayedMessagesRead", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "prevMessageCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMessageCount", + "type": "uint256" + } + ], + "name": "enqueueSequencerMessage", + "outputs": [ + { + "internalType": "uint256", + "name": "seqMessageIndex", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "beforeAcc", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "delayedAcc", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "acc", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeCall", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "rollup_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollup", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerInbox", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "sequencerInboxAccs", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerMessageCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerReportedSubMessageCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setDelayedInbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "inbox", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setOutbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sequencerInbox", + "type": "address" + } + ], + "name": "setSequencerInbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "batchPoster", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "dataHash", + "type": "bytes32" + } + ], + "name": "submitBatchSpendingReport", + "outputs": [ + { + "internalType": "uint256", + "name": "msgNum", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json new file mode 100644 index 00000000..564604b8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json @@ -0,0 +1,424 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ICompoundTimelockUpgradeable", + "sourceName": "contracts/vendor/compound/ICompoundTimelockUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "CancelTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ExecuteTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "NewDelay", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "QueueTransaction", + "type": "event" + }, + { + "inputs": [], + "name": "GRACE_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAXIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "executeTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "string", + "name": "signature", + "type": "string" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "queueTransaction", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "queuedTransactions", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "setDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json new file mode 100644 index 00000000..009a9c64 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json @@ -0,0 +1,110 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ICrossDomainMessengerUpgradeable", + "sourceName": "contracts/vendor/optimism/ICrossDomainMessengerUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "FailedRelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "msgHash", + "type": "bytes32" + } + ], + "name": "RelayedMessage", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "messageNonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + } + ], + "name": "SentMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "_gasLimit", + "type": "uint32" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xDomainMessageSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json new file mode 100644 index 00000000..0ab362d8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IDelayedMessageProviderUpgradeable", + "sourceName": "contracts/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "InboxMessageDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + } + ], + "name": "InboxMessageDeliveredFromOrigin", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json new file mode 100644 index 00000000..c6e73da9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json @@ -0,0 +1,323 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1155MetadataURIUpgradeable", + "sourceName": "contracts/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json new file mode 100644 index 00000000..89672a6b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json @@ -0,0 +1,108 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1155ReceiverUpgradeable", + "sourceName": "contracts/token/ERC1155/IERC1155ReceiverUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json new file mode 100644 index 00000000..5b39940d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json @@ -0,0 +1,304 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1155Upgradeable", + "sourceName": "contracts/token/ERC1155/IERC1155Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json new file mode 100644 index 00000000..dfed5226 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1271Upgradeable", + "sourceName": "contracts/interfaces/IERC1271Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json new file mode 100644 index 00000000..b3934f4c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json @@ -0,0 +1,45 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1363ReceiverUpgradeable", + "sourceName": "contracts/interfaces/IERC1363ReceiverUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onTransferReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json new file mode 100644 index 00000000..a87aede0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json @@ -0,0 +1,40 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1363SpenderUpgradeable", + "sourceName": "contracts/interfaces/IERC1363SpenderUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onApprovalReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json new file mode 100644 index 00000000..c9964459 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json @@ -0,0 +1,382 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1363Upgradeable", + "sourceName": "contracts/interfaces/IERC1363Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json new file mode 100644 index 00000000..fde5bccc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC165Upgradeable", + "sourceName": "contracts/utils/introspection/IERC165Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json new file mode 100644 index 00000000..917bde62 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1820ImplementerUpgradeable", + "sourceName": "contracts/utils/introspection/IERC1820ImplementerUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "canImplementInterfaceForAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json new file mode 100644 index 00000000..b6076613 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json @@ -0,0 +1,224 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1820RegistryUpgradeable", + "sourceName": "contracts/utils/introspection/IERC1820RegistryUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "implementer", + "type": "address" + } + ], + "name": "InterfaceImplementerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newManager", + "type": "address" + } + ], + "name": "ManagerChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_interfaceHash", + "type": "bytes32" + } + ], + "name": "getInterfaceImplementer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "implementsERC165Interface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "implementsERC165InterfaceNoCache", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "interfaceName", + "type": "string" + } + ], + "name": "interfaceHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "implementer", + "type": "address" + } + ], + "name": "setInterfaceImplementer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "newManager", + "type": "address" + } + ], + "name": "setManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "updateERC165Cache", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json new file mode 100644 index 00000000..2cd65da9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1822ProxiableUpgradeable", + "sourceName": "contracts/interfaces/draft-IERC1822Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json new file mode 100644 index 00000000..cb005c9f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json @@ -0,0 +1,56 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1967Upgradeable", + "sourceName": "contracts/interfaces/IERC1967Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json new file mode 100644 index 00000000..6edea5f8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json @@ -0,0 +1,233 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC20MetadataUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json new file mode 100644 index 00000000..87622fab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json @@ -0,0 +1,86 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC20PermitUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/IERC20PermitUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json new file mode 100644 index 00000000..caa613b9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json @@ -0,0 +1,194 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC20Upgradeable", + "sourceName": "contracts/token/ERC20/IERC20Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json new file mode 100644 index 00000000..79046d35 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json @@ -0,0 +1,42 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC2309Upgradeable", + "sourceName": "contracts/interfaces/IERC2309Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "toTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAddress", + "type": "address" + } + ], + "name": "ConsecutiveTransfer", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json new file mode 100644 index 00000000..65de162e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json @@ -0,0 +1,86 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC2612Upgradeable", + "sourceName": "contracts/interfaces/IERC2612Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json new file mode 100644 index 00000000..3d0f87a5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json @@ -0,0 +1,59 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC2981Upgradeable", + "sourceName": "contracts/interfaces/IERC2981Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "royaltyAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json new file mode 100644 index 00000000..84374d3c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json @@ -0,0 +1,50 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC3156FlashBorrowerUpgradeable", + "sourceName": "contracts/interfaces/IERC3156FlashBorrowerUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initiator", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onFlashLoan", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json new file mode 100644 index 00000000..4c639e69 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json @@ -0,0 +1,88 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC3156FlashLenderUpgradeable", + "sourceName": "contracts/interfaces/IERC3156FlashLenderUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "flashFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC3156FlashBorrowerUpgradeable", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flashLoan", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "maxFlashLoan", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json new file mode 100644 index 00000000..21ad0870 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json @@ -0,0 +1,623 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC4626Upgradeable", + "sourceName": "contracts/interfaces/IERC4626Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "assetTokenAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "convertToAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "convertToShares", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "maxDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "maxAssets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "maxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "maxShares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "maxShares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "maxAssets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewMint", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "totalManagedAssets", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json new file mode 100644 index 00000000..7c77c8fc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json @@ -0,0 +1,328 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC4906Upgradeable", + "sourceName": "contracts/interfaces/IERC4906Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + } + ], + "name": "BatchMetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "MetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json new file mode 100644 index 00000000..d4105c2b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json @@ -0,0 +1,60 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC5267Upgradeable", + "sourceName": "contracts/interfaces/IERC5267Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json new file mode 100644 index 00000000..402cb57d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC5313Upgradeable", + "sourceName": "contracts/interfaces/IERC5313Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json new file mode 100644 index 00000000..c9a6c12e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json @@ -0,0 +1,219 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC5805Upgradeable", + "sourceName": "contracts/interfaces/IERC5805Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json new file mode 100644 index 00000000..c6461595 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json @@ -0,0 +1,37 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC6372Upgradeable", + "sourceName": "contracts/interfaces/IERC6372Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json new file mode 100644 index 00000000..94424be2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json @@ -0,0 +1,352 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721EnumerableUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json new file mode 100644 index 00000000..318f9e81 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json @@ -0,0 +1,341 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721MetadataUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/IERC721MetadataUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json new file mode 100644 index 00000000..a5d144f4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json @@ -0,0 +1,45 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721ReceiverUpgradeable", + "sourceName": "contracts/token/ERC721/IERC721ReceiverUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json new file mode 100644 index 00000000..a2962889 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json @@ -0,0 +1,296 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721Upgradeable", + "sourceName": "contracts/token/ERC721/IERC721Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json new file mode 100644 index 00000000..d582c935 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json @@ -0,0 +1,49 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC777RecipientUpgradeable", + "sourceName": "contracts/token/ERC777/IERC777RecipientUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "userData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "tokensReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json new file mode 100644 index 00000000..5b484814 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json @@ -0,0 +1,49 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC777SenderUpgradeable", + "sourceName": "contracts/token/ERC777/IERC777SenderUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "userData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "tokensToSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json new file mode 100644 index 00000000..5456a34d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json @@ -0,0 +1,402 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC777Upgradeable", + "sourceName": "contracts/token/ERC777/IERC777Upgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "AuthorizedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Burned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "RevokedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "Sent", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "authorizeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "defaultOperators", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "granularity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenHolder", + "type": "address" + } + ], + "name": "isOperatorFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "operatorData", + "type": "bytes" + } + ], + "name": "operatorSend", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "revokeOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json new file mode 100644 index 00000000..ebcea6c1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json @@ -0,0 +1,34 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IFxMessageProcessorUpgradeable", + "sourceName": "contracts/vendor/polygon/IFxMessageProcessorUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "stateId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "rootMessageSender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "processMessageFromRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json new file mode 100644 index 00000000..5cc5c5e1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json @@ -0,0 +1,1014 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IGovernorCompatibilityBravoUpgradeable", + "sourceName": "contracts/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "getActions", + "outputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "getReceipt", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "hasVoted", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "internalType": "struct IGovernorCompatibilityBravoUpgradeable.Receipt", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "eta", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "startBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json new file mode 100644 index 00000000..166305cd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json @@ -0,0 +1,869 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IGovernorTimelockUpgradeable", + "sourceName": "contracts/governance/extensions/IGovernorTimelockUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "eta", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelock", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json new file mode 100644 index 00000000..87bc9125 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json @@ -0,0 +1,784 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IGovernorUpgradeable", + "sourceName": "contracts/governance/IGovernorUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernorUpgradeable.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json new file mode 100644 index 00000000..8dc02c76 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json @@ -0,0 +1,453 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IInboxUpgradeable", + "sourceName": "contracts/vendor/arbitrum/IInboxUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "InboxMessageDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + } + ], + "name": "InboxMessageDeliveredFromOrigin", + "type": "event" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridgeUpgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "dataLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseFee", + "type": "uint256" + } + ], + "name": "calculateRetryableSubmissionFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2CallValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "callValueRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "createRetryableTicket", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "depositEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBridgeUpgradeable", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_sequencerInbox", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBridgeUpgradeable", + "name": "_bridge", + "type": "address" + } + ], + "name": "postUpgradeInit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendContractTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendL1FundedContractTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendL1FundedUnsignedTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "messageData", + "type": "bytes" + } + ], + "name": "sendL2Message", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "messageData", + "type": "bytes" + } + ], + "name": "sendL2MessageFromOrigin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "sendUnsignedTransaction", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerInbox", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2CallValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "callValueRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "unsafeCreateRetryableTicket", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json new file mode 100644 index 00000000..110449f7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json @@ -0,0 +1,419 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IOutboxUpgradeable", + "sourceName": "contracts/vendor/arbitrum/IOutboxUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "zero", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "transactionIndex", + "type": "uint256" + } + ], + "name": "OutBoxTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "outputRoot", + "type": "bytes32" + } + ], + "name": "SendRootUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "OUTBOX_VERSION", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridgeUpgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l1Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l2Timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "calculateItemHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "path", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "item", + "type": "bytes32" + } + ], + "name": "calculateMerkleRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l1Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l2Timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "l2Sender", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "l2Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l1Block", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "l2Timestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeTransactionSimulation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "isSpent", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1Block", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1EthBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1OutputId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1Sender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ToL1Timestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rollup", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "roots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "spent", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "sendRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "l2BlockHash", + "type": "bytes32" + } + ], + "name": "updateSendRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json new file mode 100644 index 00000000..774cab68 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json @@ -0,0 +1,193 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IVotesUpgradeable", + "sourceName": "contracts/governance/utils/IVotesUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Initializable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Initializable.json new file mode 100644 index 00000000..96741fd2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Initializable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Initializable", + "sourceName": "contracts/proxy/utils/Initializable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json new file mode 100644 index 00000000..f2aee9b6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibAMBUpgradeable", + "sourceName": "contracts/crosschain/amb/LibAMBUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1491fb765213f903e09910386b22edec8801436ce19ab885f7b8ad8c722a42564736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1491fb765213f903e09910386b22edec8801436ce19ab885f7b8ad8c722a42564736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json new file mode 100644 index 00000000..f011295a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibArbitrumL1Upgradeable", + "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122038dfac37d38524b0388e49876faf180c9ce195a2183d1ad77bde369c8ed5f75864736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122038dfac37d38524b0388e49876faf180c9ce195a2183d1ad77bde369c8ed5f75864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json new file mode 100644 index 00000000..7dad3a43 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibArbitrumL2Upgradeable", + "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "ARBSYS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6091610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea264697066735822122041edcd22687c945b2264459f842a8b1ca8b00492f7d9aa8f4a2a63976c2b9dcd64736f6c634300080d0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea264697066735822122041edcd22687c945b2264459f842a8b1ca8b00492f7d9aa8f4a2a63976c2b9dcd64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json new file mode 100644 index 00000000..670fc434 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibOptimismUpgradeable", + "sourceName": "contracts/crosschain/optimism/LibOptimismUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204b3d2249766ec485b134f2b8c0bb5adac51165e4de6cfe94d37ac538a487225564736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204b3d2249766ec485b134f2b8c0bb5adac51165e4de6cfe94d37ac538a487225564736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json new file mode 100644 index 00000000..93e4acaf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MathUpgradeable", + "sourceName": "contracts/utils/math/MathUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d019b557c428fbaf9d402cc149e687077a162d89762d23db77edab8b9f20f98364736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d019b557c428fbaf9d402cc149e687077a162d89762d23db77edab8b9f20f98364736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json new file mode 100644 index 00000000..ec6b872b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MerkleProofUpgradeable", + "sourceName": "contracts/utils/cryptography/MerkleProofUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205a5f945da4a17583952bcd669282ad3702193f194e6654d7a8bda29f6852e14a64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205a5f945da4a17583952bcd669282ad3702193f194e6654d7a8bda29f6852e14a64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json new file mode 100644 index 00000000..4eebe523 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json @@ -0,0 +1,209 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MinimalForwarderUpgradeable", + "sourceName": "contracts/metatx/MinimalForwarderUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct MinimalForwarderUpgradeable.ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct MinimalForwarderUpgradeable.ForwardRequest", + "name": "req", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610c63806100206000396000f3fe60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610918565b6001600160a01b031660009081526035602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610948565b610106565b604051610084929190610a43565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610a66565b3480156100e257600080fd5b506100f66100f1366004610948565b61033e565b6040519015158152602001610084565b6000606061011585858561033e565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610afc565b603560006101a16020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610918565b6001600160a01b0316606088013560408901356101fb60a08b018b610b22565b61020860208d018d610918565b60405160200161021a93929190610b69565b60408051601f198184030181529082905261023491610b8f565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610bab565b5a1161029457fe5b90969095509350505050565b6000606080600080600060606001546000801b1480156102c05750600254155b6103045760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610178565b61030c6104bd565b61031461054f565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061045184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061044b92507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e4891506103ae905060208a018a610918565b6103be60408b0160208c01610918565b60408b013560608c013560808d01356103da60a08f018f610b22565b6040516103e8929190610bcd565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e0810191909152610100016040516020818303038152906040528051906020012061055e565b90610591565b90506080850135603560006104696020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020541480156104b4575061049f6020860186610918565b6001600160a01b0316816001600160a01b0316145b95945050505050565b6060600380546104cc90610bdd565b80601f01602080910402602001604051908101604052809291908181526020018280546104f890610bdd565b80156105455780601f1061051a57610100808354040283529160200191610545565b820191906000526020600020905b81548152906001019060200180831161052857829003601f168201915b5050505050905090565b6060600480546104cc90610bdd565b600061058b61056b6105b5565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b60008060006105a085856105c4565b915091506105ad81610609565b509392505050565b60006105bf610756565b905090565b60008082516041036105fa5760208301516040840151606085015160001a6105ee878285856107ca565b94509450505050610602565b506000905060025b9250929050565b600081600481111561061d5761061d610c17565b036106255750565b600181600481111561063957610639610c17565b036106865760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561069a5761069a610c17565b036106e75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156106fb576106fb610c17565b036107535760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61078161088e565b6107896108e7565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156108015750600090506003610885565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610855573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661087e57600060019250925050610885565b9150600090505b94509492505050565b6000806108996104bd565b8051909150156108b0578051602090910120919050565b60015480156108bf5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b6000806108f261054f565b805190915015610909578051602090910120919050565b60025480156108bf5792915050565b60006020828403121561092a57600080fd5b81356001600160a01b038116811461094157600080fd5b9392505050565b60008060006040848603121561095d57600080fd5b833567ffffffffffffffff8082111561097557600080fd5b9085019060c0828803121561098957600080fd5b9093506020850135908082111561099f57600080fd5b818601915086601f8301126109b357600080fd5b8135818111156109c257600080fd5b8760208285010111156109d457600080fd5b6020830194508093505050509250925092565b60005b83811015610a025781810151838201526020016109ea565b83811115610a11576000848401525b50505050565b60008151808452610a2f8160208601602086016109e7565b601f01601f19169290920160200192915050565b8215158152604060208201526000610a5e6040830184610a17565b949350505050565b60ff60f81b881681526000602060e081840152610a8660e084018a610a17565b8381036040850152610a98818a610a17565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610aea57835183529284019291840191600101610ace565b50909c9b505050505050505050505050565b60008219821115610b1d57634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610b3957600080fd5b83018035915067ffffffffffffffff821115610b5457600080fd5b60200191503681900382131561060257600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610ba18184602087016109e7565b9190910192915050565b600082610bc857634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610bf157607f821691505b602082108103610c1157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122016f24dae0379773d4daec6ca726dd6e7b67421e2bb8326014ca8b1b49e806e8864736f6c634300080d0033", + "deployedBytecode": "0x60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610918565b6001600160a01b031660009081526035602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610948565b610106565b604051610084929190610a43565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610a66565b3480156100e257600080fd5b506100f66100f1366004610948565b61033e565b6040519015158152602001610084565b6000606061011585858561033e565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610afc565b603560006101a16020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610918565b6001600160a01b0316606088013560408901356101fb60a08b018b610b22565b61020860208d018d610918565b60405160200161021a93929190610b69565b60408051601f198184030181529082905261023491610b8f565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610bab565b5a1161029457fe5b90969095509350505050565b6000606080600080600060606001546000801b1480156102c05750600254155b6103045760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610178565b61030c6104bd565b61031461054f565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061045184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061044b92507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e4891506103ae905060208a018a610918565b6103be60408b0160208c01610918565b60408b013560608c013560808d01356103da60a08f018f610b22565b6040516103e8929190610bcd565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e0810191909152610100016040516020818303038152906040528051906020012061055e565b90610591565b90506080850135603560006104696020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020541480156104b4575061049f6020860186610918565b6001600160a01b0316816001600160a01b0316145b95945050505050565b6060600380546104cc90610bdd565b80601f01602080910402602001604051908101604052809291908181526020018280546104f890610bdd565b80156105455780601f1061051a57610100808354040283529160200191610545565b820191906000526020600020905b81548152906001019060200180831161052857829003601f168201915b5050505050905090565b6060600480546104cc90610bdd565b600061058b61056b6105b5565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b60008060006105a085856105c4565b915091506105ad81610609565b509392505050565b60006105bf610756565b905090565b60008082516041036105fa5760208301516040840151606085015160001a6105ee878285856107ca565b94509450505050610602565b506000905060025b9250929050565b600081600481111561061d5761061d610c17565b036106255750565b600181600481111561063957610639610c17565b036106865760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561069a5761069a610c17565b036106e75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156106fb576106fb610c17565b036107535760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61078161088e565b6107896108e7565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156108015750600090506003610885565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610855573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661087e57600060019250925050610885565b9150600090505b94509492505050565b6000806108996104bd565b8051909150156108b0578051602090910120919050565b60015480156108bf5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b6000806108f261054f565b805190915015610909578051602090910120919050565b60025480156108bf5792915050565b60006020828403121561092a57600080fd5b81356001600160a01b038116811461094157600080fd5b9392505050565b60008060006040848603121561095d57600080fd5b833567ffffffffffffffff8082111561097557600080fd5b9085019060c0828803121561098957600080fd5b9093506020850135908082111561099f57600080fd5b818601915086601f8301126109b357600080fd5b8135818111156109c257600080fd5b8760208285010111156109d457600080fd5b6020830194508093505050509250925092565b60005b83811015610a025781810151838201526020016109ea565b83811115610a11576000848401525b50505050565b60008151808452610a2f8160208601602086016109e7565b601f01601f19169290920160200192915050565b8215158152604060208201526000610a5e6040830184610a17565b949350505050565b60ff60f81b881681526000602060e081840152610a8660e084018a610a17565b8381036040850152610a98818a610a17565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610aea57835183529284019291840191600101610ace565b50909c9b505050505050505050505050565b60008219821115610b1d57634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610b3957600080fd5b83018035915067ffffffffffffffff821115610b5457600080fd5b60200191503681900382131561060257600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610ba18184602087016109e7565b9190910192915050565b600082610bc857634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610bf157607f821691505b602082108103610c1157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122016f24dae0379773d4daec6ca726dd6e7b67421e2bb8326014ca8b1b49e806e8864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MulticallUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MulticallUpgradeable.json new file mode 100644 index 00000000..e9c13b32 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MulticallUpgradeable.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MulticallUpgradeable", + "sourceName": "contracts/utils/MulticallUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Ownable2StepUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Ownable2StepUpgradeable.json new file mode 100644 index 00000000..42546486 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Ownable2StepUpgradeable.json @@ -0,0 +1,115 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Ownable2StepUpgradeable", + "sourceName": "contracts/access/Ownable2StepUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/OwnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/OwnableUpgradeable.json new file mode 100644 index 00000000..4b602ae1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/OwnableUpgradeable.json @@ -0,0 +1,76 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "OwnableUpgradeable", + "sourceName": "contracts/access/OwnableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PausableUpgradeable.json new file mode 100644 index 00000000..5ed571ec --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PausableUpgradeable.json @@ -0,0 +1,63 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PausableUpgradeable", + "sourceName": "contracts/security/PausableUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json new file mode 100644 index 00000000..c585aee6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json @@ -0,0 +1,310 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PaymentSplitterUpgradeable", + "sourceName": "contracts/finance/PaymentSplitterUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20PaymentReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "PayeeAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "PaymentReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "PaymentReleased", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "payee", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "shares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "totalReleased", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReleased", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610c57806100206000396000f3fe6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109cb565b6102c9565b005b34801561011c57600080fd5b506033545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e8565b6001600160a01b03918216600090815260396020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e8565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a21565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109cb565b6001600160a01b031660009081526036602052604090205490565b34801561021457600080fd5b506101216102233660046109cb565b6104fa565b34801561023457600080fd5b506101216102433660046109e8565b610542565b34801561025457600080fd5b506101216102633660046109cb565b6001600160a01b031660009081526035602052604090205490565b34801561028a57600080fd5b506101216102993660046109cb565b6001600160a01b031660009081526038602052604090205490565b3480156102c057600080fd5b50603454610121565b6001600160a01b0381166000908152603560205260409020546103075760405162461bcd60e51b81526004016102fe90610a3a565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a80565b80603460008282546103469190610ae1565b90915550506001600160a01b0382166000908152603660205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152603560205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a3a565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a80565b6001600160a01b03831660009081526038602052604081208054839290610444908490610ae1565b90915550506001600160a01b03808416600090815260396020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000603782815481106104df576104df610af9565b6000918252602090912001546001600160a01b031692915050565b60008061050660345490565b6105109047610ae1565b905061053b8382610536866001600160a01b031660009081526036602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526038602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0f565b6105cf9190610ae1565b6001600160a01b03808616600090815260396020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107bb565b6033546001600160a01b038416600090815260356020526040812054909183916107a79086610b28565b6107b19190610b47565b6106059190610b69565b6000610810826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108909092919063ffffffff16565b90508051600014806108315750808060200190518101906108319190610b80565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b79190610bd2565b60006040518083038185875af1925050503d80600081146108f4576040519150601f19603f3d011682016040523d82523d6000602084013e6108f9565b606091505b509150915061090a87838387610915565b979650505050505050565b6060831561098457825160000361097d576001600160a01b0385163b61097d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109995781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610bee565b6001600160a01b03811681146109c857600080fd5b50565b6000602082840312156109dd57600080fd5b813561053b816109b3565b600080604083850312156109fb57600080fd5b8235610a06816109b3565b91506020830135610a16816109b3565b809150509250929050565b600060208284031215610a3357600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af457610af4610acb565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b2157600080fd5b5051919050565b6000816000190483118215151615610b4257610b42610acb565b500290565b600082610b6457634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7b57610b7b610acb565b500390565b600060208284031215610b9257600080fd5b8151801515811461053b57600080fd5b60005b83811015610bbd578181015183820152602001610ba5565b83811115610bcc576000848401525b50505050565b60008251610be4818460208701610ba2565b9190910192915050565b6020815260008251806020840152610c0d816040850160208701610ba2565b601f01601f1916919091016040019291505056fea2646970667358221220c0c3e78560be498d02cd00f5d3bcb617aa84868e7b53eda278c881029f42910864736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109cb565b6102c9565b005b34801561011c57600080fd5b506033545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e8565b6001600160a01b03918216600090815260396020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e8565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a21565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109cb565b6001600160a01b031660009081526036602052604090205490565b34801561021457600080fd5b506101216102233660046109cb565b6104fa565b34801561023457600080fd5b506101216102433660046109e8565b610542565b34801561025457600080fd5b506101216102633660046109cb565b6001600160a01b031660009081526035602052604090205490565b34801561028a57600080fd5b506101216102993660046109cb565b6001600160a01b031660009081526038602052604090205490565b3480156102c057600080fd5b50603454610121565b6001600160a01b0381166000908152603560205260409020546103075760405162461bcd60e51b81526004016102fe90610a3a565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a80565b80603460008282546103469190610ae1565b90915550506001600160a01b0382166000908152603660205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152603560205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a3a565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a80565b6001600160a01b03831660009081526038602052604081208054839290610444908490610ae1565b90915550506001600160a01b03808416600090815260396020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000603782815481106104df576104df610af9565b6000918252602090912001546001600160a01b031692915050565b60008061050660345490565b6105109047610ae1565b905061053b8382610536866001600160a01b031660009081526036602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526038602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0f565b6105cf9190610ae1565b6001600160a01b03808616600090815260396020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107bb565b6033546001600160a01b038416600090815260356020526040812054909183916107a79086610b28565b6107b19190610b47565b6106059190610b69565b6000610810826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108909092919063ffffffff16565b90508051600014806108315750808060200190518101906108319190610b80565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b79190610bd2565b60006040518083038185875af1925050503d80600081146108f4576040519150601f19603f3d011682016040523d82523d6000602084013e6108f9565b606091505b509150915061090a87838387610915565b979650505050505050565b6060831561098457825160000361097d576001600160a01b0385163b61097d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109995781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610bee565b6001600160a01b03811681146109c857600080fd5b50565b6000602082840312156109dd57600080fd5b813561053b816109b3565b600080604083850312156109fb57600080fd5b8235610a06816109b3565b91506020830135610a16816109b3565b809150509250929050565b600060208284031215610a3357600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af457610af4610acb565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b2157600080fd5b5051919050565b6000816000190483118215151615610b4257610b42610acb565b500290565b600082610b6457634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7b57610b7b610acb565b500390565b600060208284031215610b9257600080fd5b8151801515811461053b57600080fd5b60005b83811015610bbd578181015183820152602001610ba5565b83811115610bcc576000848401525b50505050565b60008251610be4818460208701610ba2565b9190910192915050565b6020815260008251806020840152610c0d816040850160208701610ba2565b601f01601f1916919091016040019291505056fea2646970667358221220c0c3e78560be498d02cd00f5d3bcb617aa84868e7b53eda278c881029f42910864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json new file mode 100644 index 00000000..4322c93c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json @@ -0,0 +1,56 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PullPaymentUpgradeable", + "sourceName": "contracts/security/PullPaymentUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "dest", + "type": "address" + } + ], + "name": "payments", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdrawPayments", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json new file mode 100644 index 00000000..1ea1638e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json @@ -0,0 +1,24 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ReentrancyGuardUpgradeable", + "sourceName": "contracts/security/ReentrancyGuardUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json new file mode 100644 index 00000000..0bfc52e4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json @@ -0,0 +1,244 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RefundEscrowUpgradeable", + "sourceName": "contracts/utils/escrow/RefundEscrowUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "RefundsClosed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "RefundsEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payee", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weiAmount", + "type": "uint256" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "beneficiaryWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "close", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "refundee", + "type": "address" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payee", + "type": "address" + } + ], + "name": "depositsOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "enableRefunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "state", + "outputs": [ + { + "internalType": "enum RefundEscrowUpgradeable.State", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "payee", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "withdrawalAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610b94806100206000396000f3fe6080604052600436106100c25760003560e01c80638c52dc411161007f578063c19d93fb11610059578063c19d93fb146101dc578063e3a9db1a146101fc578063f2fde38b14610240578063f340fa011461026057600080fd5b80638c52dc41146101945780638da5cb5b146101a95780639af6549a146101c757600080fd5b806338af3eed146100c757806343d726d61461010357806351cff8d91461011a578063685ca1941461013a578063715018a61461016a5780638129fc1c1461017f575b600080fd5b3480156100d357600080fd5b5060c95461010090046001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010f57600080fd5b50610118610273565b005b34801561012657600080fd5b50610118610135366004610a8b565b610330565b34801561014657600080fd5b5061015a610155366004610a8b565b6103ad565b60405190151581526020016100fa565b34801561017657600080fd5b506101186103cf565b34801561018b57600080fd5b506101186103e3565b3480156101a057600080fd5b506101186104f3565b3480156101b557600080fd5b506033546001600160a01b03166100e6565b3480156101d357600080fd5b506101186105b4565b3480156101e857600080fd5b5060c95460ff166040516100fa9190610ac5565b34801561020857600080fd5b50610232610217366004610a8b565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100fa565b34801561024c57600080fd5b5061011861025b366004610a8b565b61066b565b61011861026e366004610a8b565b6106e1565b61027b610764565b600060c95460ff16600281111561029457610294610aaf565b146102f85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b60c9805460ff191660021790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b610339816103ad565b6103a15760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102ef565b6103aa816107be565b50565b6000600160c95460ff1660028111156103c8576103c8610aaf565b1492915050565b6103d7610764565b6103e16000610835565b565b600054610100900460ff16158080156104035750600054600160ff909116105b8061041d5750303b15801561041d575060005460ff166001145b6104805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ef565b6000805460ff1916600117905580156104a3576000805461ff0019166101001790555b6104ab610887565b80156103aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b6104fb610764565b600060c95460ff16600281111561051457610514610aaf565b1461057c5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102ef565b60c9805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b600260c95460ff1660028111156105cd576105cd610aaf565b146106405760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102ef565b6103e14761065c60c9546001600160a01b036101009091041690565b6001600160a01b0316906108b6565b610673610764565b6001600160a01b0381166106d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ef565b6103aa81610835565b600060c95460ff1660028111156106fa576106fa610aaf565b1461075b5760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102ef565b6103aa816109d4565b6033546001600160a01b031633146103e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ef565b6107c6610764565b6001600160a01b03811660008181526065602052604081208054919055906107ee90826108b6565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58260405161082991815260200190565b60405180910390a25050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108ae5760405162461bcd60e51b81526004016102ef90610aed565b6103e1610a46565b804710156109065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102ef565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610953576040519150601f19603f3d011682016040523d82523d6000602084013e610958565b606091505b50509050806109cf5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102ef565b505050565b6109dc610764565b6001600160a01b038116600090815260656020526040812080543492839291610a06908490610b38565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c490602001610829565b600054610100900460ff16610a6d5760405162461bcd60e51b81526004016102ef90610aed565b6103e133610835565b6001600160a01b03811681146103aa57600080fd5b600060208284031215610a9d57600080fd5b8135610aa881610a76565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310610ae757634e487b7160e01b600052602160045260246000fd5b91905290565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115610b5957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220384fceb4627b7e0169e9f36c7c727acb2a5bae003c8bec1f92825039fe6644c464736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100c25760003560e01c80638c52dc411161007f578063c19d93fb11610059578063c19d93fb146101dc578063e3a9db1a146101fc578063f2fde38b14610240578063f340fa011461026057600080fd5b80638c52dc41146101945780638da5cb5b146101a95780639af6549a146101c757600080fd5b806338af3eed146100c757806343d726d61461010357806351cff8d91461011a578063685ca1941461013a578063715018a61461016a5780638129fc1c1461017f575b600080fd5b3480156100d357600080fd5b5060c95461010090046001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010f57600080fd5b50610118610273565b005b34801561012657600080fd5b50610118610135366004610a8b565b610330565b34801561014657600080fd5b5061015a610155366004610a8b565b6103ad565b60405190151581526020016100fa565b34801561017657600080fd5b506101186103cf565b34801561018b57600080fd5b506101186103e3565b3480156101a057600080fd5b506101186104f3565b3480156101b557600080fd5b506033546001600160a01b03166100e6565b3480156101d357600080fd5b506101186105b4565b3480156101e857600080fd5b5060c95460ff166040516100fa9190610ac5565b34801561020857600080fd5b50610232610217366004610a8b565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100fa565b34801561024c57600080fd5b5061011861025b366004610a8b565b61066b565b61011861026e366004610a8b565b6106e1565b61027b610764565b600060c95460ff16600281111561029457610294610aaf565b146102f85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b60c9805460ff191660021790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b610339816103ad565b6103a15760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102ef565b6103aa816107be565b50565b6000600160c95460ff1660028111156103c8576103c8610aaf565b1492915050565b6103d7610764565b6103e16000610835565b565b600054610100900460ff16158080156104035750600054600160ff909116105b8061041d5750303b15801561041d575060005460ff166001145b6104805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ef565b6000805460ff1916600117905580156104a3576000805461ff0019166101001790555b6104ab610887565b80156103aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b6104fb610764565b600060c95460ff16600281111561051457610514610aaf565b1461057c5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102ef565b60c9805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b600260c95460ff1660028111156105cd576105cd610aaf565b146106405760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102ef565b6103e14761065c60c9546001600160a01b036101009091041690565b6001600160a01b0316906108b6565b610673610764565b6001600160a01b0381166106d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ef565b6103aa81610835565b600060c95460ff1660028111156106fa576106fa610aaf565b1461075b5760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102ef565b6103aa816109d4565b6033546001600160a01b031633146103e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ef565b6107c6610764565b6001600160a01b03811660008181526065602052604081208054919055906107ee90826108b6565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58260405161082991815260200190565b60405180910390a25050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108ae5760405162461bcd60e51b81526004016102ef90610aed565b6103e1610a46565b804710156109065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102ef565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610953576040519150601f19603f3d011682016040523d82523d6000602084013e610958565b606091505b50509050806109cf5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102ef565b505050565b6109dc610764565b6001600160a01b038116600090815260656020526040812080543492839291610a06908490610b38565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c490602001610829565b600054610100900460ff16610a6d5760405162461bcd60e51b81526004016102ef90610aed565b6103e133610835565b6001600160a01b03811681146103aa57600080fd5b600060208284031215610a9d57600080fd5b8135610aa881610a76565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310610ae757634e487b7160e01b600052602160045260246000fd5b91905290565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115610b5957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220384fceb4627b7e0169e9f36c7c727acb2a5bae003c8bec1f92825039fe6644c464736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json new file mode 100644 index 00000000..6153de49 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeCastUpgradeable", + "sourceName": "contracts/utils/math/SafeCastUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d2a77af16ecd084e512a6178023471b0214c35d41bd15d20aedfea70b4540cf564736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d2a77af16ecd084e512a6178023471b0214c35d41bd15d20aedfea70b4540cf564736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json new file mode 100644 index 00000000..83658ece --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeERC20Upgradeable", + "sourceName": "contracts/token/ERC20/utils/SafeERC20Upgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ebac9eff1b0224d4ef7928bde051273e4de24428e9021fdd2aa9f9190c82100764736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ebac9eff1b0224d4ef7928bde051273e4de24428e9021fdd2aa9f9190c82100764736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json new file mode 100644 index 00000000..ec0206d9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeMathUpgradeable", + "sourceName": "contracts/utils/math/SafeMathUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122079076c714ca6ed81343f4920969e47dd0a850457e16ab0af9635f3e66e2d380964736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122079076c714ca6ed81343f4920969e47dd0a850457e16ab0af9635f3e66e2d380964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json new file mode 100644 index 00000000..185cc502 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json @@ -0,0 +1,27 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ShortStringsUpgradeable", + "sourceName": "contracts/utils/ShortStringsUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + } + ], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201103c0797f95514c1adb696f263b45f0f94bb39e77b630a16630699aa73cd0fd64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201103c0797f95514c1adb696f263b45f0f94bb39e77b630a16630699aa73cd0fd64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json new file mode 100644 index 00000000..13ace2ee --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignatureCheckerUpgradeable", + "sourceName": "contracts/utils/cryptography/SignatureCheckerUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3b459a7e817c77b0492ff3aeafaac868497026215b1e0df027214326eec16fd64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3b459a7e817c77b0492ff3aeafaac868497026215b1e0df027214326eec16fd64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json new file mode 100644 index 00000000..9524566d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignedMathUpgradeable", + "sourceName": "contracts/utils/math/SignedMathUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dd79cd58f645b9ec9683e658789c42b6dfb56ceb16bb5deb55c3917d3513e6aa64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dd79cd58f645b9ec9683e658789c42b6dfb56ceb16bb5deb55c3917d3513e6aa64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json new file mode 100644 index 00000000..b8cdf7f1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignedSafeMathUpgradeable", + "sourceName": "contracts/utils/math/SignedSafeMathUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204bab11c69037301c2804c2464b7b53e10ac9a33ad38852aca8388ab7c00944e964736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204bab11c69037301c2804c2464b7b53e10ac9a33ad38852aca8388ab7c00944e964736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json new file mode 100644 index 00000000..62c6dbbc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "StorageSlotUpgradeable", + "sourceName": "contracts/utils/StorageSlotUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206054cfc53183d55799d57a724cb708337ae12ffb6c9e57f2bc9567311a9685b864736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206054cfc53183d55799d57a724cb708337ae12ffb6c9e57f2bc9567311a9685b864736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json new file mode 100644 index 00000000..b1a5f471 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "StringsUpgradeable", + "sourceName": "contracts/utils/StringsUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220779b9f65dfd128ab2efa61539390da0c5990e0c84fbb6d68d00b439ad821f38564736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220779b9f65dfd128ab2efa61539390da0c5990e0c84fbb6d68d00b439ad821f38564736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json new file mode 100644 index 00000000..26276951 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json @@ -0,0 +1,887 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TimelockControllerUpgradeable", + "sourceName": "contracts/governance/TimelockControllerUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "CallExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "CallSalt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "CallScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "Cancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDuration", + "type": "uint256" + } + ], + "name": "MinDelayChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "CANCELLER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PROPOSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TIMELOCK_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "executeBatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getMinDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperationBatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationDone", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationPending", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationReady", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "schedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "scheduleBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50611e4c806100206000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610581578063e38335e5146105a1578063f23a6e61146105b4578063f27a0c92146105e057600080fd5b8063bc197c8114610508578063c4d252f514610534578063d45c44351461055457600080fd5b806391d14854116100c657806391d148541461047f578063a217fddf1461049f578063b08e51c0146104b4578063b1c5f427146104e857600080fd5b80638065657f1461040b5780638f2a0bb01461042b5780638f61f4f51461044b57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038b57806336568abe146103ab578063584b153e146103cb57806364d62353146103eb57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036b57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611447565b6105f5565b005b3480156101f557600080fd5b506102096102043660046114bb565b6106cb565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e5565b6106f6565b3480156102b357600080fd5b506102096102c2366004611550565b6107ab565b3480156102d357600080fd5b506102f26102e236600461161e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b50610252610326366004611550565b60009081526065602052604090206001015490565b34801561034757600080fd5b50610209610356366004611550565b60009081526097602052604090205460011490565b34801561037757600080fd5b506101e7610386366004611685565b6107d1565b34801561039757600080fd5b506102096103a6366004611550565b6107fb565b3480156103b757600080fd5b506101e76103c6366004611685565b610814565b3480156103d757600080fd5b506102096103e6366004611550565b610897565b3480156103f757600080fd5b506101e7610406366004611550565b6108ae565b34801561041757600080fd5b506102526104263660046114e5565b610952565b34801561043757600080fd5b506101e76104463660046116f5565b610991565b34801561045757600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048b57600080fd5b5061020961049a366004611685565b610b24565b3480156104ab57600080fd5b50610252600081565b3480156104c057600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f457600080fd5b506102526105033660046117a6565b610b4f565b34801561051457600080fd5b506102f26105233660046118cd565b63bc197c8160e01b95945050505050565b34801561054057600080fd5b506101e761054f366004611550565b610b94565b34801561056057600080fd5b5061025261056f366004611550565b60009081526097602052604090205490565b34801561058d57600080fd5b506101e761059c366004611685565b610c69565b6101e76105af3660046117a6565b610c8e565b3480156105c057600080fd5b506102f26105cf366004611976565b63f23a6e6160e01b95945050505050565b3480156105ec57600080fd5b50609854610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161061f81610e18565b600061062f898989898989610952565b905061063b8184610e25565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161067796959493929190611a03565b60405180910390a383156106c057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b791815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f057506106f082610f14565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610722816000610b24565b610730576107308133610f49565b6000610740888888888888610952565b905061074c8185610fa2565b6107588888888861103d565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107909493929190611a40565b60405180910390a36107a181611110565b5050505050505050565b6000818152609760205260408120546001811180156107ca5750428111155b9392505050565b6000828152606560205260409020600101546107ec81610e18565b6107f68383611149565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146108895760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089382826111cf565b5050565b60008181526097602052604081205460019061080d565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610880565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b600086868686868660405160200161096f96959493929190611a03565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e18565b8887146109da5760405162461bcd60e51b815260040161088090611a72565b8885146109f95760405162461bcd60e51b815260040161088090611a72565b6000610a0b8b8b8b8b8b8b8b8b610b4f565b9050610a178184610e25565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab5565b9050602002016020810190610a6c9190611acb565b8d8d86818110610a7e57610a7e611ab5565b905060200201358c8c87818110610a9757610a97611ab5565b9050602002810190610aa99190611ae6565b8c8b604051610abd96959493929190611a03565b60405180910390a3610ace81611b42565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b70989796959493929190611beb565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbe81610e18565b610bc782610897565b610c2d5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610880565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610c8481610e18565b6107f683836111cf565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cba816000610b24565b610cc857610cc88133610f49565b878614610ce75760405162461bcd60e51b815260040161088090611a72565b878414610d065760405162461bcd60e51b815260040161088090611a72565b6000610d188a8a8a8a8a8a8a8a610b4f565b9050610d248185610fa2565b60005b89811015610e025760008b8b83818110610d4357610d43611ab5565b9050602002016020810190610d589190611acb565b905060008a8a84818110610d6e57610d6e611ab5565b9050602002013590503660008a8a86818110610d8c57610d8c611ab5565b9050602002810190610d9e9190611ae6565b91509150610dae8484848461103d565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de59493929190611a40565b60405180910390a35050505080610dfb90611b42565b9050610d27565b50610e0c81611110565b50505050505050505050565b610e228133610f49565b50565b610e2e826107fb565b15610e935760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610880565b609854811015610ef45760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610880565b610efe8142611c96565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f057506301ffc9a760e01b6001600160e01b03198316146106f0565b610f538282610b24565b61089357610f6081611236565b610f6b836020611248565b604051602001610f7c929190611cde565b60408051601f198184030181529082905262461bcd60e51b825261088091600401611d53565b610fab826107ab565b610fc75760405162461bcd60e51b815260040161088090611d86565b801580610fe257506000818152609760205260409020546001145b6108935760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610880565b6000846001600160a01b031684848460405161105a929190611dd0565b60006040518083038185875af1925050503d8060008114611097576040519150601f19603f3d011682016040523d82523d6000602084013e61109c565b606091505b50509050806111095760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610880565b5050505050565b611119816107ab565b6111355760405162461bcd60e51b815260040161088090611d86565b600090815260976020526040902060019055565b6111538282610b24565b6108935760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561118b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d98282610b24565b156108935760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f06001600160a01b03831660145b60606000611257836002611de0565b611262906002611c96565b6001600160401b0381111561127957611279611569565b6040519080825280601f01601f1916602001820160405280156112a3576020820181803683370190505b509050600360fc1b816000815181106112be576112be611ab5565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112ed576112ed611ab5565b60200101906001600160f81b031916908160001a9053506000611311846002611de0565b61131c906001611c96565b90505b6001811115611394576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061135057611350611ab5565b1a60f81b82828151811061136657611366611ab5565b60200101906001600160f81b031916908160001a90535060049490941c9361138d81611dff565b905061131f565b5083156107ca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610880565b80356001600160a01b03811681146113fa57600080fd5b919050565b60008083601f84011261141157600080fd5b5081356001600160401b0381111561142857600080fd5b60208301915083602082850101111561144057600080fd5b9250929050565b600080600080600080600060c0888a03121561146257600080fd5b61146b886113e3565b96506020880135955060408801356001600160401b0381111561148d57600080fd5b6114998a828b016113ff565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114cd57600080fd5b81356001600160e01b0319811681146107ca57600080fd5b60008060008060008060a087890312156114fe57600080fd5b611507876113e3565b95506020870135945060408701356001600160401b0381111561152957600080fd5b61153589828a016113ff565b979a9699509760608101359660809091013595509350505050565b60006020828403121561156257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a7576115a7611569565b604052919050565b600082601f8301126115c057600080fd5b81356001600160401b038111156115d9576115d9611569565b6115ec601f8201601f191660200161157f565b81815284602083860101111561160157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561163457600080fd5b61163d856113e3565b935061164b602086016113e3565b92506040850135915060608501356001600160401b0381111561166d57600080fd5b611679878288016115af565b91505092959194509250565b6000806040838503121561169857600080fd5b823591506116a8602084016113e3565b90509250929050565b60008083601f8401126116c357600080fd5b5081356001600160401b038111156116da57600080fd5b6020830191508360208260051b850101111561144057600080fd5b600080600080600080600080600060c08a8c03121561171357600080fd5b89356001600160401b038082111561172a57600080fd5b6117368d838e016116b1565b909b50995060208c013591508082111561174f57600080fd5b61175b8d838e016116b1565b909950975060408c013591508082111561177457600080fd5b506117818c828d016116b1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117c257600080fd5b88356001600160401b03808211156117d957600080fd5b6117e58c838d016116b1565b909a50985060208b01359150808211156117fe57600080fd5b61180a8c838d016116b1565b909850965060408b013591508082111561182357600080fd5b506118308b828c016116b1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185f57600080fd5b813560206001600160401b0382111561187a5761187a611569565b8160051b61188982820161157f565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578235825291830191908301906118a9565b979650505050505050565b600080600080600060a086880312156118e557600080fd5b6118ee866113e3565b94506118fc602087016113e3565b935060408601356001600160401b038082111561191857600080fd5b61192489838a0161184e565b9450606088013591508082111561193a57600080fd5b61194689838a0161184e565b9350608088013591508082111561195c57600080fd5b50611969888289016115af565b9150509295509295909350565b600080600080600060a0868803121561198e57600080fd5b611997866113e3565b94506119a5602087016113e3565b9350604086013592506060860135915060808601356001600160401b038111156119ce57600080fd5b611969888289016115af565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2b60a0830186886119da565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a686060830184866119da565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611add57600080fd5b6107ca826113e3565b6000808335601e19843603018112611afd57600080fd5b8301803591506001600160401b03821115611b1757600080fd5b60200191503681900382131561144057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b5457611b54611b2c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bde5782840389528135601e19883603018112611b9657600080fd5b870180356001600160401b03811115611bae57600080fd5b803603891315611bbd57600080fd5b611bca86828985016119da565b9a87019a9550505090840190600101611b75565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c2c576001600160a01b03611c17846113e3565b16825260209283019290910190600101611bfe565b5083810360208501528881526001600160fb1b03891115611c4c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7d81888a611b5b565b6060850196909652505050608001529695505050505050565b60008219821115611ca957611ca9611b2c565b500190565b60005b83811015611cc9578181015183820152602001611cb1565b83811115611cd8576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d16816017850160208801611cae565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d47816028840160208801611cae565b01602801949350505050565b6020815260008251806020840152611d72816040850160208701611cae565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611dfa57611dfa611b2c565b500290565b600081611e0e57611e0e611b2c565b50600019019056fea26469706673582212206bced80116cf61341e6e1c0849b397290fa79bfaf89786bc9e3b4d13ea869a2464736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610581578063e38335e5146105a1578063f23a6e61146105b4578063f27a0c92146105e057600080fd5b8063bc197c8114610508578063c4d252f514610534578063d45c44351461055457600080fd5b806391d14854116100c657806391d148541461047f578063a217fddf1461049f578063b08e51c0146104b4578063b1c5f427146104e857600080fd5b80638065657f1461040b5780638f2a0bb01461042b5780638f61f4f51461044b57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038b57806336568abe146103ab578063584b153e146103cb57806364d62353146103eb57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036b57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611447565b6105f5565b005b3480156101f557600080fd5b506102096102043660046114bb565b6106cb565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e5565b6106f6565b3480156102b357600080fd5b506102096102c2366004611550565b6107ab565b3480156102d357600080fd5b506102f26102e236600461161e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b50610252610326366004611550565b60009081526065602052604090206001015490565b34801561034757600080fd5b50610209610356366004611550565b60009081526097602052604090205460011490565b34801561037757600080fd5b506101e7610386366004611685565b6107d1565b34801561039757600080fd5b506102096103a6366004611550565b6107fb565b3480156103b757600080fd5b506101e76103c6366004611685565b610814565b3480156103d757600080fd5b506102096103e6366004611550565b610897565b3480156103f757600080fd5b506101e7610406366004611550565b6108ae565b34801561041757600080fd5b506102526104263660046114e5565b610952565b34801561043757600080fd5b506101e76104463660046116f5565b610991565b34801561045757600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048b57600080fd5b5061020961049a366004611685565b610b24565b3480156104ab57600080fd5b50610252600081565b3480156104c057600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f457600080fd5b506102526105033660046117a6565b610b4f565b34801561051457600080fd5b506102f26105233660046118cd565b63bc197c8160e01b95945050505050565b34801561054057600080fd5b506101e761054f366004611550565b610b94565b34801561056057600080fd5b5061025261056f366004611550565b60009081526097602052604090205490565b34801561058d57600080fd5b506101e761059c366004611685565b610c69565b6101e76105af3660046117a6565b610c8e565b3480156105c057600080fd5b506102f26105cf366004611976565b63f23a6e6160e01b95945050505050565b3480156105ec57600080fd5b50609854610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161061f81610e18565b600061062f898989898989610952565b905061063b8184610e25565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161067796959493929190611a03565b60405180910390a383156106c057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b791815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f057506106f082610f14565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610722816000610b24565b610730576107308133610f49565b6000610740888888888888610952565b905061074c8185610fa2565b6107588888888861103d565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107909493929190611a40565b60405180910390a36107a181611110565b5050505050505050565b6000818152609760205260408120546001811180156107ca5750428111155b9392505050565b6000828152606560205260409020600101546107ec81610e18565b6107f68383611149565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146108895760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089382826111cf565b5050565b60008181526097602052604081205460019061080d565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610880565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b600086868686868660405160200161096f96959493929190611a03565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e18565b8887146109da5760405162461bcd60e51b815260040161088090611a72565b8885146109f95760405162461bcd60e51b815260040161088090611a72565b6000610a0b8b8b8b8b8b8b8b8b610b4f565b9050610a178184610e25565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab5565b9050602002016020810190610a6c9190611acb565b8d8d86818110610a7e57610a7e611ab5565b905060200201358c8c87818110610a9757610a97611ab5565b9050602002810190610aa99190611ae6565b8c8b604051610abd96959493929190611a03565b60405180910390a3610ace81611b42565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b70989796959493929190611beb565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbe81610e18565b610bc782610897565b610c2d5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610880565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610c8481610e18565b6107f683836111cf565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cba816000610b24565b610cc857610cc88133610f49565b878614610ce75760405162461bcd60e51b815260040161088090611a72565b878414610d065760405162461bcd60e51b815260040161088090611a72565b6000610d188a8a8a8a8a8a8a8a610b4f565b9050610d248185610fa2565b60005b89811015610e025760008b8b83818110610d4357610d43611ab5565b9050602002016020810190610d589190611acb565b905060008a8a84818110610d6e57610d6e611ab5565b9050602002013590503660008a8a86818110610d8c57610d8c611ab5565b9050602002810190610d9e9190611ae6565b91509150610dae8484848461103d565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de59493929190611a40565b60405180910390a35050505080610dfb90611b42565b9050610d27565b50610e0c81611110565b50505050505050505050565b610e228133610f49565b50565b610e2e826107fb565b15610e935760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610880565b609854811015610ef45760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610880565b610efe8142611c96565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f057506301ffc9a760e01b6001600160e01b03198316146106f0565b610f538282610b24565b61089357610f6081611236565b610f6b836020611248565b604051602001610f7c929190611cde565b60408051601f198184030181529082905262461bcd60e51b825261088091600401611d53565b610fab826107ab565b610fc75760405162461bcd60e51b815260040161088090611d86565b801580610fe257506000818152609760205260409020546001145b6108935760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610880565b6000846001600160a01b031684848460405161105a929190611dd0565b60006040518083038185875af1925050503d8060008114611097576040519150601f19603f3d011682016040523d82523d6000602084013e61109c565b606091505b50509050806111095760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610880565b5050505050565b611119816107ab565b6111355760405162461bcd60e51b815260040161088090611d86565b600090815260976020526040902060019055565b6111538282610b24565b6108935760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561118b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d98282610b24565b156108935760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f06001600160a01b03831660145b60606000611257836002611de0565b611262906002611c96565b6001600160401b0381111561127957611279611569565b6040519080825280601f01601f1916602001820160405280156112a3576020820181803683370190505b509050600360fc1b816000815181106112be576112be611ab5565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112ed576112ed611ab5565b60200101906001600160f81b031916908160001a9053506000611311846002611de0565b61131c906001611c96565b90505b6001811115611394576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061135057611350611ab5565b1a60f81b82828151811061136657611366611ab5565b60200101906001600160f81b031916908160001a90535060049490941c9361138d81611dff565b905061131f565b5083156107ca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610880565b80356001600160a01b03811681146113fa57600080fd5b919050565b60008083601f84011261141157600080fd5b5081356001600160401b0381111561142857600080fd5b60208301915083602082850101111561144057600080fd5b9250929050565b600080600080600080600060c0888a03121561146257600080fd5b61146b886113e3565b96506020880135955060408801356001600160401b0381111561148d57600080fd5b6114998a828b016113ff565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114cd57600080fd5b81356001600160e01b0319811681146107ca57600080fd5b60008060008060008060a087890312156114fe57600080fd5b611507876113e3565b95506020870135945060408701356001600160401b0381111561152957600080fd5b61153589828a016113ff565b979a9699509760608101359660809091013595509350505050565b60006020828403121561156257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a7576115a7611569565b604052919050565b600082601f8301126115c057600080fd5b81356001600160401b038111156115d9576115d9611569565b6115ec601f8201601f191660200161157f565b81815284602083860101111561160157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561163457600080fd5b61163d856113e3565b935061164b602086016113e3565b92506040850135915060608501356001600160401b0381111561166d57600080fd5b611679878288016115af565b91505092959194509250565b6000806040838503121561169857600080fd5b823591506116a8602084016113e3565b90509250929050565b60008083601f8401126116c357600080fd5b5081356001600160401b038111156116da57600080fd5b6020830191508360208260051b850101111561144057600080fd5b600080600080600080600080600060c08a8c03121561171357600080fd5b89356001600160401b038082111561172a57600080fd5b6117368d838e016116b1565b909b50995060208c013591508082111561174f57600080fd5b61175b8d838e016116b1565b909950975060408c013591508082111561177457600080fd5b506117818c828d016116b1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117c257600080fd5b88356001600160401b03808211156117d957600080fd5b6117e58c838d016116b1565b909a50985060208b01359150808211156117fe57600080fd5b61180a8c838d016116b1565b909850965060408b013591508082111561182357600080fd5b506118308b828c016116b1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185f57600080fd5b813560206001600160401b0382111561187a5761187a611569565b8160051b61188982820161157f565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578235825291830191908301906118a9565b979650505050505050565b600080600080600060a086880312156118e557600080fd5b6118ee866113e3565b94506118fc602087016113e3565b935060408601356001600160401b038082111561191857600080fd5b61192489838a0161184e565b9450606088013591508082111561193a57600080fd5b61194689838a0161184e565b9350608088013591508082111561195c57600080fd5b50611969888289016115af565b9150509295509295909350565b600080600080600060a0868803121561198e57600080fd5b611997866113e3565b94506119a5602087016113e3565b9350604086013592506060860135915060808601356001600160401b038111156119ce57600080fd5b611969888289016115af565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2b60a0830186886119da565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a686060830184866119da565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611add57600080fd5b6107ca826113e3565b6000808335601e19843603018112611afd57600080fd5b8301803591506001600160401b03821115611b1757600080fd5b60200191503681900382131561144057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b5457611b54611b2c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bde5782840389528135601e19883603018112611b9657600080fd5b870180356001600160401b03811115611bae57600080fd5b803603891315611bbd57600080fd5b611bca86828985016119da565b9a87019a9550505090840190600101611b75565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c2c576001600160a01b03611c17846113e3565b16825260209283019290910190600101611bfe565b5083810360208501528881526001600160fb1b03891115611c4c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7d81888a611b5b565b6060850196909652505050608001529695505050505050565b60008219821115611ca957611ca9611b2c565b500190565b60005b83811015611cc9578181015183820152602001611cb1565b83811115611cd8576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d16816017850160208801611cae565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d47816028840160208801611cae565b01602801949350505050565b6020815260008251806020840152611d72816040850160208701611cae565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611dfa57611dfa611b2c565b500290565b600081611e0e57611e0e611b2c565b50600019019056fea26469706673582212206bced80116cf61341e6e1c0849b397290fa79bfaf89786bc9e3b4d13ea869a2464736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json new file mode 100644 index 00000000..d7daeb18 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json @@ -0,0 +1,894 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TimelockControllerWith46MigrationUpgradeable", + "sourceName": "contracts/governance/TimelockControllerWith46MigrationUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "CallExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "CallSalt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "CallScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "Cancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDuration", + "type": "uint256" + } + ], + "name": "MinDelayChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "CANCELLER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PROPOSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TIMELOCK_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "executeBatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getMinDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperationBatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationDone", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationPending", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationReady", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "migrateTo46", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "schedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "scheduleBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50611fcc806100206000396000f3fe6080604052600436106101c65760003560e01c806364d62353116100f7578063b1c5f42711610095578063d547741f11610064578063d547741f1461057d578063e38335e51461059d578063f23a6e61146105b0578063f27a0c92146105dc57600080fd5b8063b1c5f427146104e4578063bc197c8114610504578063c4d252f514610530578063d45c44351461055057600080fd5b80638f61f4f5116100d15780638f61f4f51461046b57806391d148541461048d578063a217fddf146104ad578063b08e51c0146104c257600080fd5b806364d623531461040b5780638065657f1461042b5780638f2a0bb01461044b57600080fd5b80631fb78738116101645780632f2ff15d1161013e5780632f2ff15d1461038b57806331d50750146103ab57806336568abe146103cb578063584b153e146103eb57600080fd5b80631fb7873814610316578063248a9ca31461032b5780632ab0f5291461035b57600080fd5b80630d3cf6fc116101a05780630d3cf6fc1461026b578063134008d31461029f57806313bc9f20146102b2578063150b7a02146102d257600080fd5b806301d5062a146101d257806301ffc9a7146101f457806307bd02651461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611587565b6105f1565b005b34801561020057600080fd5b5061021461020f3660046115fb565b6106b5565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b5061025d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610220565b34801561027757600080fd5b5061025d7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101f26102ad366004611625565b6106e0565b3480156102be57600080fd5b506102146102cd366004611690565b610795565b3480156102de57600080fd5b506102fd6102ed36600461175e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610220565b34801561032257600080fd5b506101f26107bb565b34801561033757600080fd5b5061025d610346366004611690565b60009081526065602052604090206001015490565b34801561036757600080fd5b50610214610376366004611690565b60009081526097602052604090205460011490565b34801561039757600080fd5b506101f26103a63660046117c5565b6108ef565b3480156103b757600080fd5b506102146103c6366004611690565b610919565b3480156103d757600080fd5b506101f26103e63660046117c5565b610932565b3480156103f757600080fd5b50610214610406366004611690565b6109b0565b34801561041757600080fd5b506101f2610426366004611690565b6109c7565b34801561043757600080fd5b5061025d610446366004611625565b610a6b565b34801561045757600080fd5b506101f2610466366004611835565b610aaa565b34801561047757600080fd5b5061025d600080516020611f5783398151915281565b34801561049957600080fd5b506102146104a83660046117c5565b610c2b565b3480156104b957600080fd5b5061025d600081565b3480156104ce57600080fd5b5061025d600080516020611f7783398151915281565b3480156104f057600080fd5b5061025d6104ff3660046118e6565b610c56565b34801561051057600080fd5b506102fd61051f366004611a0d565b63bc197c8160e01b95945050505050565b34801561053c57600080fd5b506101f261054b366004611690565b610c9b565b34801561055c57600080fd5b5061025d61056b366004611690565b60009081526097602052604090205490565b34801561058957600080fd5b506101f26105983660046117c5565b610d5e565b6101f26105ab3660046118e6565b610d83565b3480156105bc57600080fd5b506102fd6105cb366004611ab6565b63f23a6e6160e01b95945050505050565b3480156105e857600080fd5b5060985461025d565b600080516020611f5783398151915261060981610f0d565b6000610619898989898989610a6b565b90506106258184610f1a565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161066196959493929190611b43565b60405180910390a383156106aa57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a191815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106da57506106da82611009565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6361070c816000610c2b565b61071a5761071a813361103e565b600061072a888888888888610a6b565b90506107368185611097565b61074288888888611132565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161077a9493929190611b80565b60405180910390a361078b81611205565b5050505050505050565b6000818152609760205260408120546001811180156107b45750428111155b9392505050565b600080516020611f5783398151915260005260656020527fafe71ff1fe81c59ca16af21c02420893e650adae4948ece1623218f842885478547f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca51480156108585750600080516020611f7783398151915260005260656020527fb33a3829f2d1f31fd111fcd13892b72b93a782f7b93bf968903b15b040efa32154155b6108b55760405162461bcd60e51b8152602060048201526024808201527f54696d656c6f636b436f6e74726f6c6c65723a20616c7265616479206d696772604482015263185d195960e21b60648201526084015b60405180910390fd5b6108ed600080516020611f778339815191527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca561123e565b565b60008281526065602052604090206001015461090a81610f0d565b6109148383611289565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146109a25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108ac565b6109ac828261130f565b5050565b60008181526097602052604081205460019061092b565b333014610a2a5760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b60648201526084016108ac565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b6000868686868686604051602001610a8896959493929190611b43565b6040516020818303038152906040528051906020012090509695505050505050565b600080516020611f57833981519152610ac281610f0d565b888714610ae15760405162461bcd60e51b81526004016108ac90611bb2565b888514610b005760405162461bcd60e51b81526004016108ac90611bb2565b6000610b128b8b8b8b8b8b8b8b610c56565b9050610b1e8184610f1a565b60005b8a811015610bdc5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610b5e57610b5e611bf5565b9050602002016020810190610b739190611c0b565b8d8d86818110610b8557610b85611bf5565b905060200201358c8c87818110610b9e57610b9e611bf5565b9050602002810190610bb09190611c26565b8c8b604051610bc496959493929190611b43565b60405180910390a3610bd581611c82565b9050610b21565b508315610c1e57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610c1591815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610c77989796959493929190611d2b565b60405160208183030381529060405280519060200120905098975050505050505050565b600080516020611f77833981519152610cb381610f0d565b610cbc826109b0565b610d225760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b60648201526084016108ac565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610d7981610f0d565b610914838361130f565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610daf816000610c2b565b610dbd57610dbd813361103e565b878614610ddc5760405162461bcd60e51b81526004016108ac90611bb2565b878414610dfb5760405162461bcd60e51b81526004016108ac90611bb2565b6000610e0d8a8a8a8a8a8a8a8a610c56565b9050610e198185611097565b60005b89811015610ef75760008b8b83818110610e3857610e38611bf5565b9050602002016020810190610e4d9190611c0b565b905060008a8a84818110610e6357610e63611bf5565b9050602002013590503660008a8a86818110610e8157610e81611bf5565b9050602002810190610e939190611c26565b91509150610ea384848484611132565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610eda9493929190611b80565b60405180910390a35050505080610ef090611c82565b9050610e1c565b50610f0181611205565b50505050505050505050565b610f17813361103e565b50565b610f2382610919565b15610f885760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b60648201526084016108ac565b609854811015610fe95760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b60648201526084016108ac565b610ff38142611dd6565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106da57506301ffc9a760e01b6001600160e01b03198316146106da565b6110488282610c2b565b6109ac5761105581611376565b611060836020611388565b604051602001611071929190611e1e565b60408051601f198184030181529082905262461bcd60e51b82526108ac91600401611e93565b6110a082610795565b6110bc5760405162461bcd60e51b81526004016108ac90611ec6565b8015806110d757506000818152609760205260409020546001145b6109ac5760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b60648201526084016108ac565b6000846001600160a01b031684848460405161114f929190611f10565b60006040518083038185875af1925050503d806000811461118c576040519150601f19603f3d011682016040523d82523d6000602084013e611191565b606091505b50509050806111fe5760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b60648201526084016108ac565b5050505050565b61120e81610795565b61122a5760405162461bcd60e51b81526004016108ac90611ec6565b600090815260976020526040902060019055565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6112938282610c2b565b6109ac5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556112cb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6113198282610c2b565b156109ac5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106da6001600160a01b03831660145b60606000611397836002611f20565b6113a2906002611dd6565b6001600160401b038111156113b9576113b96116a9565b6040519080825280601f01601f1916602001820160405280156113e3576020820181803683370190505b509050600360fc1b816000815181106113fe576113fe611bf5565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061142d5761142d611bf5565b60200101906001600160f81b031916908160001a9053506000611451846002611f20565b61145c906001611dd6565b90505b60018111156114d4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061149057611490611bf5565b1a60f81b8282815181106114a6576114a6611bf5565b60200101906001600160f81b031916908160001a90535060049490941c936114cd81611f3f565b905061145f565b5083156107b45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ac565b80356001600160a01b038116811461153a57600080fd5b919050565b60008083601f84011261155157600080fd5b5081356001600160401b0381111561156857600080fd5b60208301915083602082850101111561158057600080fd5b9250929050565b600080600080600080600060c0888a0312156115a257600080fd5b6115ab88611523565b96506020880135955060408801356001600160401b038111156115cd57600080fd5b6115d98a828b0161153f565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561160d57600080fd5b81356001600160e01b0319811681146107b457600080fd5b60008060008060008060a0878903121561163e57600080fd5b61164787611523565b95506020870135945060408701356001600160401b0381111561166957600080fd5b61167589828a0161153f565b979a9699509760608101359660809091013595509350505050565b6000602082840312156116a257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156116e7576116e76116a9565b604052919050565b600082601f83011261170057600080fd5b81356001600160401b03811115611719576117196116a9565b61172c601f8201601f19166020016116bf565b81815284602083860101111561174157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561177457600080fd5b61177d85611523565b935061178b60208601611523565b92506040850135915060608501356001600160401b038111156117ad57600080fd5b6117b9878288016116ef565b91505092959194509250565b600080604083850312156117d857600080fd5b823591506117e860208401611523565b90509250929050565b60008083601f84011261180357600080fd5b5081356001600160401b0381111561181a57600080fd5b6020830191508360208260051b850101111561158057600080fd5b600080600080600080600080600060c08a8c03121561185357600080fd5b89356001600160401b038082111561186a57600080fd5b6118768d838e016117f1565b909b50995060208c013591508082111561188f57600080fd5b61189b8d838e016117f1565b909950975060408c01359150808211156118b457600080fd5b506118c18c828d016117f1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561190257600080fd5b88356001600160401b038082111561191957600080fd5b6119258c838d016117f1565b909a50985060208b013591508082111561193e57600080fd5b61194a8c838d016117f1565b909850965060408b013591508082111561196357600080fd5b506119708b828c016117f1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261199f57600080fd5b813560206001600160401b038211156119ba576119ba6116a9565b8160051b6119c98282016116bf565b92835284810182019282810190878511156119e357600080fd5b83870192505b84831015611a02578235825291830191908301906119e9565b979650505050505050565b600080600080600060a08688031215611a2557600080fd5b611a2e86611523565b9450611a3c60208701611523565b935060408601356001600160401b0380821115611a5857600080fd5b611a6489838a0161198e565b94506060880135915080821115611a7a57600080fd5b611a8689838a0161198e565b93506080880135915080821115611a9c57600080fd5b50611aa9888289016116ef565b9150509295509295909350565b600080600080600060a08688031215611ace57600080fd5b611ad786611523565b9450611ae560208701611523565b9350604086013592506060860135915060808601356001600160401b03811115611b0e57600080fd5b611aa9888289016116ef565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611b6b60a083018688611b1a565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611ba8606083018486611b1a565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611c1d57600080fd5b6107b482611523565b6000808335601e19843603018112611c3d57600080fd5b8301803591506001600160401b03821115611c5757600080fd5b60200191503681900382131561158057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611c9457611c94611c6c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611d1e5782840389528135601e19883603018112611cd657600080fd5b870180356001600160401b03811115611cee57600080fd5b803603891315611cfd57600080fd5b611d0a8682898501611b1a565b9a87019a9550505090840190600101611cb5565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611d6c576001600160a01b03611d5784611523565b16825260209283019290910190600101611d3e565b5083810360208501528881526001600160fb1b03891115611d8c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611dbd81888a611c9b565b6060850196909652505050608001529695505050505050565b60008219821115611de957611de9611c6c565b500190565b60005b83811015611e09578181015183820152602001611df1565b83811115611e18576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611e56816017850160208801611dee565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e87816028840160208801611dee565b01602801949350505050565b6020815260008251806020840152611eb2816040850160208701611dee565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611f3a57611f3a611c6c565b500290565b600081611f4e57611f4e611c6c565b50600019019056feb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783a2646970667358221220d077a2e7d5f73ec1d1b9baca38e81476feb5ad3406db97f5aa84b06c3ddc1aa164736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106101c65760003560e01c806364d62353116100f7578063b1c5f42711610095578063d547741f11610064578063d547741f1461057d578063e38335e51461059d578063f23a6e61146105b0578063f27a0c92146105dc57600080fd5b8063b1c5f427146104e4578063bc197c8114610504578063c4d252f514610530578063d45c44351461055057600080fd5b80638f61f4f5116100d15780638f61f4f51461046b57806391d148541461048d578063a217fddf146104ad578063b08e51c0146104c257600080fd5b806364d623531461040b5780638065657f1461042b5780638f2a0bb01461044b57600080fd5b80631fb78738116101645780632f2ff15d1161013e5780632f2ff15d1461038b57806331d50750146103ab57806336568abe146103cb578063584b153e146103eb57600080fd5b80631fb7873814610316578063248a9ca31461032b5780632ab0f5291461035b57600080fd5b80630d3cf6fc116101a05780630d3cf6fc1461026b578063134008d31461029f57806313bc9f20146102b2578063150b7a02146102d257600080fd5b806301d5062a146101d257806301ffc9a7146101f457806307bd02651461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611587565b6105f1565b005b34801561020057600080fd5b5061021461020f3660046115fb565b6106b5565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b5061025d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610220565b34801561027757600080fd5b5061025d7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101f26102ad366004611625565b6106e0565b3480156102be57600080fd5b506102146102cd366004611690565b610795565b3480156102de57600080fd5b506102fd6102ed36600461175e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610220565b34801561032257600080fd5b506101f26107bb565b34801561033757600080fd5b5061025d610346366004611690565b60009081526065602052604090206001015490565b34801561036757600080fd5b50610214610376366004611690565b60009081526097602052604090205460011490565b34801561039757600080fd5b506101f26103a63660046117c5565b6108ef565b3480156103b757600080fd5b506102146103c6366004611690565b610919565b3480156103d757600080fd5b506101f26103e63660046117c5565b610932565b3480156103f757600080fd5b50610214610406366004611690565b6109b0565b34801561041757600080fd5b506101f2610426366004611690565b6109c7565b34801561043757600080fd5b5061025d610446366004611625565b610a6b565b34801561045757600080fd5b506101f2610466366004611835565b610aaa565b34801561047757600080fd5b5061025d600080516020611f5783398151915281565b34801561049957600080fd5b506102146104a83660046117c5565b610c2b565b3480156104b957600080fd5b5061025d600081565b3480156104ce57600080fd5b5061025d600080516020611f7783398151915281565b3480156104f057600080fd5b5061025d6104ff3660046118e6565b610c56565b34801561051057600080fd5b506102fd61051f366004611a0d565b63bc197c8160e01b95945050505050565b34801561053c57600080fd5b506101f261054b366004611690565b610c9b565b34801561055c57600080fd5b5061025d61056b366004611690565b60009081526097602052604090205490565b34801561058957600080fd5b506101f26105983660046117c5565b610d5e565b6101f26105ab3660046118e6565b610d83565b3480156105bc57600080fd5b506102fd6105cb366004611ab6565b63f23a6e6160e01b95945050505050565b3480156105e857600080fd5b5060985461025d565b600080516020611f5783398151915261060981610f0d565b6000610619898989898989610a6b565b90506106258184610f1a565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161066196959493929190611b43565b60405180910390a383156106aa57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a191815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106da57506106da82611009565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6361070c816000610c2b565b61071a5761071a813361103e565b600061072a888888888888610a6b565b90506107368185611097565b61074288888888611132565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161077a9493929190611b80565b60405180910390a361078b81611205565b5050505050505050565b6000818152609760205260408120546001811180156107b45750428111155b9392505050565b600080516020611f5783398151915260005260656020527fafe71ff1fe81c59ca16af21c02420893e650adae4948ece1623218f842885478547f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca51480156108585750600080516020611f7783398151915260005260656020527fb33a3829f2d1f31fd111fcd13892b72b93a782f7b93bf968903b15b040efa32154155b6108b55760405162461bcd60e51b8152602060048201526024808201527f54696d656c6f636b436f6e74726f6c6c65723a20616c7265616479206d696772604482015263185d195960e21b60648201526084015b60405180910390fd5b6108ed600080516020611f778339815191527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca561123e565b565b60008281526065602052604090206001015461090a81610f0d565b6109148383611289565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146109a25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108ac565b6109ac828261130f565b5050565b60008181526097602052604081205460019061092b565b333014610a2a5760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b60648201526084016108ac565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b6000868686868686604051602001610a8896959493929190611b43565b6040516020818303038152906040528051906020012090509695505050505050565b600080516020611f57833981519152610ac281610f0d565b888714610ae15760405162461bcd60e51b81526004016108ac90611bb2565b888514610b005760405162461bcd60e51b81526004016108ac90611bb2565b6000610b128b8b8b8b8b8b8b8b610c56565b9050610b1e8184610f1a565b60005b8a811015610bdc5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610b5e57610b5e611bf5565b9050602002016020810190610b739190611c0b565b8d8d86818110610b8557610b85611bf5565b905060200201358c8c87818110610b9e57610b9e611bf5565b9050602002810190610bb09190611c26565b8c8b604051610bc496959493929190611b43565b60405180910390a3610bd581611c82565b9050610b21565b508315610c1e57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610c1591815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610c77989796959493929190611d2b565b60405160208183030381529060405280519060200120905098975050505050505050565b600080516020611f77833981519152610cb381610f0d565b610cbc826109b0565b610d225760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b60648201526084016108ac565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610d7981610f0d565b610914838361130f565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610daf816000610c2b565b610dbd57610dbd813361103e565b878614610ddc5760405162461bcd60e51b81526004016108ac90611bb2565b878414610dfb5760405162461bcd60e51b81526004016108ac90611bb2565b6000610e0d8a8a8a8a8a8a8a8a610c56565b9050610e198185611097565b60005b89811015610ef75760008b8b83818110610e3857610e38611bf5565b9050602002016020810190610e4d9190611c0b565b905060008a8a84818110610e6357610e63611bf5565b9050602002013590503660008a8a86818110610e8157610e81611bf5565b9050602002810190610e939190611c26565b91509150610ea384848484611132565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610eda9493929190611b80565b60405180910390a35050505080610ef090611c82565b9050610e1c565b50610f0181611205565b50505050505050505050565b610f17813361103e565b50565b610f2382610919565b15610f885760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b60648201526084016108ac565b609854811015610fe95760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b60648201526084016108ac565b610ff38142611dd6565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106da57506301ffc9a760e01b6001600160e01b03198316146106da565b6110488282610c2b565b6109ac5761105581611376565b611060836020611388565b604051602001611071929190611e1e565b60408051601f198184030181529082905262461bcd60e51b82526108ac91600401611e93565b6110a082610795565b6110bc5760405162461bcd60e51b81526004016108ac90611ec6565b8015806110d757506000818152609760205260409020546001145b6109ac5760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b60648201526084016108ac565b6000846001600160a01b031684848460405161114f929190611f10565b60006040518083038185875af1925050503d806000811461118c576040519150601f19603f3d011682016040523d82523d6000602084013e611191565b606091505b50509050806111fe5760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b60648201526084016108ac565b5050505050565b61120e81610795565b61122a5760405162461bcd60e51b81526004016108ac90611ec6565b600090815260976020526040902060019055565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6112938282610c2b565b6109ac5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556112cb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6113198282610c2b565b156109ac5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106da6001600160a01b03831660145b60606000611397836002611f20565b6113a2906002611dd6565b6001600160401b038111156113b9576113b96116a9565b6040519080825280601f01601f1916602001820160405280156113e3576020820181803683370190505b509050600360fc1b816000815181106113fe576113fe611bf5565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061142d5761142d611bf5565b60200101906001600160f81b031916908160001a9053506000611451846002611f20565b61145c906001611dd6565b90505b60018111156114d4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061149057611490611bf5565b1a60f81b8282815181106114a6576114a6611bf5565b60200101906001600160f81b031916908160001a90535060049490941c936114cd81611f3f565b905061145f565b5083156107b45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ac565b80356001600160a01b038116811461153a57600080fd5b919050565b60008083601f84011261155157600080fd5b5081356001600160401b0381111561156857600080fd5b60208301915083602082850101111561158057600080fd5b9250929050565b600080600080600080600060c0888a0312156115a257600080fd5b6115ab88611523565b96506020880135955060408801356001600160401b038111156115cd57600080fd5b6115d98a828b0161153f565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561160d57600080fd5b81356001600160e01b0319811681146107b457600080fd5b60008060008060008060a0878903121561163e57600080fd5b61164787611523565b95506020870135945060408701356001600160401b0381111561166957600080fd5b61167589828a0161153f565b979a9699509760608101359660809091013595509350505050565b6000602082840312156116a257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156116e7576116e76116a9565b604052919050565b600082601f83011261170057600080fd5b81356001600160401b03811115611719576117196116a9565b61172c601f8201601f19166020016116bf565b81815284602083860101111561174157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561177457600080fd5b61177d85611523565b935061178b60208601611523565b92506040850135915060608501356001600160401b038111156117ad57600080fd5b6117b9878288016116ef565b91505092959194509250565b600080604083850312156117d857600080fd5b823591506117e860208401611523565b90509250929050565b60008083601f84011261180357600080fd5b5081356001600160401b0381111561181a57600080fd5b6020830191508360208260051b850101111561158057600080fd5b600080600080600080600080600060c08a8c03121561185357600080fd5b89356001600160401b038082111561186a57600080fd5b6118768d838e016117f1565b909b50995060208c013591508082111561188f57600080fd5b61189b8d838e016117f1565b909950975060408c01359150808211156118b457600080fd5b506118c18c828d016117f1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561190257600080fd5b88356001600160401b038082111561191957600080fd5b6119258c838d016117f1565b909a50985060208b013591508082111561193e57600080fd5b61194a8c838d016117f1565b909850965060408b013591508082111561196357600080fd5b506119708b828c016117f1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261199f57600080fd5b813560206001600160401b038211156119ba576119ba6116a9565b8160051b6119c98282016116bf565b92835284810182019282810190878511156119e357600080fd5b83870192505b84831015611a02578235825291830191908301906119e9565b979650505050505050565b600080600080600060a08688031215611a2557600080fd5b611a2e86611523565b9450611a3c60208701611523565b935060408601356001600160401b0380821115611a5857600080fd5b611a6489838a0161198e565b94506060880135915080821115611a7a57600080fd5b611a8689838a0161198e565b93506080880135915080821115611a9c57600080fd5b50611aa9888289016116ef565b9150509295509295909350565b600080600080600060a08688031215611ace57600080fd5b611ad786611523565b9450611ae560208701611523565b9350604086013592506060860135915060808601356001600160401b03811115611b0e57600080fd5b611aa9888289016116ef565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611b6b60a083018688611b1a565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611ba8606083018486611b1a565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611c1d57600080fd5b6107b482611523565b6000808335601e19843603018112611c3d57600080fd5b8301803591506001600160401b03821115611c5757600080fd5b60200191503681900382131561158057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611c9457611c94611c6c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611d1e5782840389528135601e19883603018112611cd657600080fd5b870180356001600160401b03811115611cee57600080fd5b803603891315611cfd57600080fd5b611d0a8682898501611b1a565b9a87019a9550505090840190600101611cb5565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611d6c576001600160a01b03611d5784611523565b16825260209283019290910190600101611d3e565b5083810360208501528881526001600160fb1b03891115611d8c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611dbd81888a611c9b565b6060850196909652505050608001529695505050505050565b60008219821115611de957611de9611c6c565b500190565b60005b83811015611e09578181015183820152602001611df1565b83811115611e18576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611e56816017850160208801611dee565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e87816028840160208801611dee565b01602801949350505050565b6020815260008251806020840152611eb2816040850160208701611dee565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611f3a57611f3a611c6c565b500290565b600081611f4e57611f4e611c6c565b50600019019056feb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783a2646970667358221220d077a2e7d5f73ec1d1b9baca38e81476feb5ad3406db97f5aa84b06c3ddc1aa164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json new file mode 100644 index 00000000..1aed81b3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TimersUpgradeable", + "sourceName": "contracts/utils/TimersUpgradeable.sol", + "abi": [], + "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ccb39ca7887c7d55dde815bef65def12a8b337409cfc81ec0548e6f977f8785f64736f6c634300080d0033", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ccb39ca7887c7d55dde815bef65def12a8b337409cfc81ec0548e6f977f8785f64736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json new file mode 100644 index 00000000..92c44838 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json @@ -0,0 +1,70 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TokenTimelockUpgradeable", + "sourceName": "contracts/token/ERC20/utils/TokenTimelockUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "releaseTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506105de806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f1461007b578063b91d400114610085578063fc0c546a14610096575b600080fd5b6001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100836100ad565b005b600254604051908152602001610072565b6000546201000090046001600160a01b031661005e565b60025442101561011f5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b600080546201000090046001600160a01b03166040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019c91906104e7565b9050600081116101fa5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610116565b61022861020f6001546001600160a01b031690565b6000546201000090046001600160a01b0316908361022b565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261027d908490610282565b505050565b60006102d7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103579092919063ffffffff16565b90508051600014806102f85750808060200190518101906102f89190610500565b61027d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610116565b6060610366848460008561036e565b949350505050565b6060824710156103cf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610116565b600080866001600160a01b031685876040516103eb9190610559565b60006040518083038185875af1925050503d8060008114610428576040519150601f19603f3d011682016040523d82523d6000602084013e61042d565b606091505b509150915061043e87838387610449565b979650505050505050565b606083156104b85782516000036104b1576001600160a01b0385163b6104b15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610116565b5081610366565b61036683838151156104cd5781518083602001fd5b8060405162461bcd60e51b81526004016101169190610575565b6000602082840312156104f957600080fd5b5051919050565b60006020828403121561051257600080fd5b8151801515811461052257600080fd5b9392505050565b60005b8381101561054457818101518382015260200161052c565b83811115610553576000848401525b50505050565b6000825161056b818460208701610529565b9190910192915050565b6020815260008251806020840152610594816040850160208701610529565b601f01601f1916919091016040019291505056fea26469706673582212204747b23234c7135a16f967df9807faedc83cbf6deee2e1db3bad123b145662b664736f6c634300080d0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f1461007b578063b91d400114610085578063fc0c546a14610096575b600080fd5b6001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100836100ad565b005b600254604051908152602001610072565b6000546201000090046001600160a01b031661005e565b60025442101561011f5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b600080546201000090046001600160a01b03166040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019c91906104e7565b9050600081116101fa5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610116565b61022861020f6001546001600160a01b031690565b6000546201000090046001600160a01b0316908361022b565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261027d908490610282565b505050565b60006102d7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103579092919063ffffffff16565b90508051600014806102f85750808060200190518101906102f89190610500565b61027d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610116565b6060610366848460008561036e565b949350505050565b6060824710156103cf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610116565b600080866001600160a01b031685876040516103eb9190610559565b60006040518083038185875af1925050503d8060008114610428576040519150601f19603f3d011682016040523d82523d6000602084013e61042d565b606091505b509150915061043e87838387610449565b979650505050505050565b606083156104b85782516000036104b1576001600160a01b0385163b6104b15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610116565b5081610366565b61036683838151156104cd5781518083602001fd5b8060405162461bcd60e51b81526004016101169190610575565b6000602082840312156104f957600080fd5b5051919050565b60006020828403121561051257600080fd5b8151801515811461052257600080fd5b9392505050565b60005b8381101561054457818101518382015260200161052c565b83811115610553576000848401525b50505050565b6000825161056b818460208701610529565b9190910192915050565b6020815260008251806020840152610594816040850160208701610529565b601f01601f1916919091016040019291505056fea26469706673582212204747b23234c7135a16f967df9807faedc83cbf6deee2e1db3bad123b145662b664736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/UUPSUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/UUPSUpgradeable.json new file mode 100644 index 00000000..f373b85e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/UUPSUpgradeable.json @@ -0,0 +1,113 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "UUPSUpgradeable", + "sourceName": "contracts/proxy/utils/UUPSUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json new file mode 100644 index 00000000..0d8f5416 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json @@ -0,0 +1,226 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VestingWalletUpgradeable", + "sourceName": "contracts/finance/VestingWalletUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20Released", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EtherReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "beneficiary", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610aec806100206000396000f3fe6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f14610168578063961325211461017d5780639852595c14610192578063a3f8eace146101c8578063be9a6555146101e8578063fbccedae1461020e57600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df57806319165587146100fe57806338af3eed14610120578063810ec23b1461014857600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c73660046108f6565b610223565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b5060365467ffffffffffffffff166100cc565b34801561010a57600080fd5b5061011e610119366004610928565b610247565b005b34801561012c57600080fd5b506035546040516001600160a01b0390911681526020016100d6565b34801561015457600080fd5b506100cc610163366004610943565b6102e2565b34801561017457600080fd5b5061011e610378565b34801561018957600080fd5b506033546100cc565b34801561019e57600080fd5b506100cc6101ad366004610928565b6001600160a01b031660009081526034602052604090205490565b3480156101d457600080fd5b506100cc6101e3366004610928565b6103ec565b3480156101f457600080fd5b50603554600160a01b900467ffffffffffffffff166100cc565b34801561021a57600080fd5b506100cc610419565b600061024161023160335490565b61023b904761098c565b8361043c565b92915050565b6000610252826103ec565b6001600160a01b03831660009081526034602052604081208054929350839290919061027f90849061098c565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a26102de826102d86035546001600160a01b031690565b836104ff565b5050565b6001600160a01b038216600090815260346020526040812054610371906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015610343573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036791906109a4565b61023b919061098c565b9392505050565b6000610382610419565b90508060336000828254610396919061098c565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a16103e96103e36035546001600160a01b031690565b82610556565b50565b6001600160a01b03811660009081526034602052604081205461040f83426102e2565b61024191906109bd565b600061042460335490565b61042d42610223565b61043791906109bd565b905090565b603554600090600160a01b900467ffffffffffffffff168267ffffffffffffffff16101561046c57506000610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff16610497919061098c565b8267ffffffffffffffff1611156104af575081610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff166104e49067ffffffffffffffff85166109bd565b6104ee90856109d4565b6104f891906109f3565b9050610241565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610551908490610674565b505050565b804710156105ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146105f8576040519150601f19603f3d011682016040523d82523d6000602084013e6105fd565b606091505b50509050806105515760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016105a2565b60006106c9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107499092919063ffffffff16565b90508051600014806106ea5750808060200190518101906106ea9190610a15565b6105515760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a2565b60606107588484600085610760565b949350505050565b6060824710156107c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105a2565b600080866001600160a01b031685876040516107dd9190610a67565b60006040518083038185875af1925050503d806000811461081a576040519150601f19603f3d011682016040523d82523d6000602084013e61081f565b606091505b50915091506108308783838761083b565b979650505050505050565b606083156108aa5782516000036108a3576001600160a01b0385163b6108a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a2565b5081610758565b61075883838151156108bf5781518083602001fd5b8060405162461bcd60e51b81526004016105a29190610a83565b803567ffffffffffffffff811681146108f157600080fd5b919050565b60006020828403121561090857600080fd5b610371826108d9565b80356001600160a01b03811681146108f157600080fd5b60006020828403121561093a57600080fd5b61037182610911565b6000806040838503121561095657600080fd5b61095f83610911565b915061096d602084016108d9565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561099f5761099f610976565b500190565b6000602082840312156109b657600080fd5b5051919050565b6000828210156109cf576109cf610976565b500390565b60008160001904831182151516156109ee576109ee610976565b500290565b600082610a1057634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610a2757600080fd5b8151801515811461037157600080fd5b60005b83811015610a52578181015183820152602001610a3a565b83811115610a61576000848401525b50505050565b60008251610a79818460208701610a37565b9190910192915050565b6020815260008251806020840152610aa2816040850160208701610a37565b601f01601f1916919091016040019291505056fea2646970667358221220f3282a88c5acb4f0c81e9219e582257765313d4de0f7f49fcbe53dcc9c10d4a164736f6c634300080d0033", + "deployedBytecode": "0x6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f14610168578063961325211461017d5780639852595c14610192578063a3f8eace146101c8578063be9a6555146101e8578063fbccedae1461020e57600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df57806319165587146100fe57806338af3eed14610120578063810ec23b1461014857600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c73660046108f6565b610223565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b5060365467ffffffffffffffff166100cc565b34801561010a57600080fd5b5061011e610119366004610928565b610247565b005b34801561012c57600080fd5b506035546040516001600160a01b0390911681526020016100d6565b34801561015457600080fd5b506100cc610163366004610943565b6102e2565b34801561017457600080fd5b5061011e610378565b34801561018957600080fd5b506033546100cc565b34801561019e57600080fd5b506100cc6101ad366004610928565b6001600160a01b031660009081526034602052604090205490565b3480156101d457600080fd5b506100cc6101e3366004610928565b6103ec565b3480156101f457600080fd5b50603554600160a01b900467ffffffffffffffff166100cc565b34801561021a57600080fd5b506100cc610419565b600061024161023160335490565b61023b904761098c565b8361043c565b92915050565b6000610252826103ec565b6001600160a01b03831660009081526034602052604081208054929350839290919061027f90849061098c565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a26102de826102d86035546001600160a01b031690565b836104ff565b5050565b6001600160a01b038216600090815260346020526040812054610371906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015610343573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036791906109a4565b61023b919061098c565b9392505050565b6000610382610419565b90508060336000828254610396919061098c565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a16103e96103e36035546001600160a01b031690565b82610556565b50565b6001600160a01b03811660009081526034602052604081205461040f83426102e2565b61024191906109bd565b600061042460335490565b61042d42610223565b61043791906109bd565b905090565b603554600090600160a01b900467ffffffffffffffff168267ffffffffffffffff16101561046c57506000610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff16610497919061098c565b8267ffffffffffffffff1611156104af575081610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff166104e49067ffffffffffffffff85166109bd565b6104ee90856109d4565b6104f891906109f3565b9050610241565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610551908490610674565b505050565b804710156105ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146105f8576040519150601f19603f3d011682016040523d82523d6000602084013e6105fd565b606091505b50509050806105515760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016105a2565b60006106c9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107499092919063ffffffff16565b90508051600014806106ea5750808060200190518101906106ea9190610a15565b6105515760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a2565b60606107588484600085610760565b949350505050565b6060824710156107c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105a2565b600080866001600160a01b031685876040516107dd9190610a67565b60006040518083038185875af1925050503d806000811461081a576040519150601f19603f3d011682016040523d82523d6000602084013e61081f565b606091505b50915091506108308783838761083b565b979650505050505050565b606083156108aa5782516000036108a3576001600160a01b0385163b6108a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a2565b5081610758565b61075883838151156108bf5781518083602001fd5b8060405162461bcd60e51b81526004016105a29190610a83565b803567ffffffffffffffff811681146108f157600080fd5b919050565b60006020828403121561090857600080fd5b610371826108d9565b80356001600160a01b03811681146108f157600080fd5b60006020828403121561093a57600080fd5b61037182610911565b6000806040838503121561095657600080fd5b61095f83610911565b915061096d602084016108d9565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561099f5761099f610976565b500190565b6000602082840312156109b657600080fd5b5051919050565b6000828210156109cf576109cf610976565b500390565b60008160001904831182151516156109ee576109ee610976565b500290565b600082610a1057634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610a2757600080fd5b8151801515811461037157600080fd5b60005b83811015610a52578181015183820152602001610a3a565b83811115610a61576000848401525b50505050565b60008251610a79818460208701610a37565b9190910192915050565b6020815260008251806020840152610aa2816040850160208701610a37565b601f01601f1916919091016040019291505056fea2646970667358221220f3282a88c5acb4f0c81e9219e582257765313d4de0f7f49fcbe53dcc9c10d4a164736f6c634300080d0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VotesUpgradeable.json new file mode 100644 index 00000000..0b24a88d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VotesUpgradeable.json @@ -0,0 +1,313 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VotesUpgradeable", + "sourceName": "contracts/governance/utils/VotesUpgradeable.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol new file mode 100644 index 00000000..3a089afe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/CrossChainEnabled.sol) + +pragma solidity ^0.8.4; + +import "./errorsUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Provides information for building cross-chain aware contracts. This + * abstract contract provides accessors and modifiers to control the execution + * flow when receiving cross-chain messages. + * + * Actual implementations of cross-chain aware contracts, which are based on + * this abstraction, will have to inherit from a bridge-specific + * specialization. Such specializations are provided under + * `crosschain//CrossChainEnabled.sol`. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabledUpgradeable is Initializable { + /** + * @dev Throws if the current function call is not the result of a + * cross-chain execution. + */ + modifier onlyCrossChain() { + if (!_isCrossChain()) revert NotCrossChainCall(); + _; + } + + /** + * @dev Throws if the current function call is not the result of a + * cross-chain execution initiated by `account`. + */ + modifier onlyCrossChainSender(address expected) { + address actual = _crossChainSender(); + if (expected != actual) revert InvalidCrossChainSender(actual, expected); + _; + } + + function __CrossChainEnabled_init() internal onlyInitializing { + } + + function __CrossChainEnabled_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message. + */ + function _isCrossChain() internal view virtual returns (bool); + + /** + * @dev Returns the address of the sender of the cross-chain message that + * triggered the current function call. + * + * IMPORTANT: Should revert with `NotCrossChainCall` if the current function + * call is not the result of a cross-chain message. + */ + function _crossChainSender() internal view virtual returns (address); + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc new file mode 100644 index 00000000..266b1530 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc @@ -0,0 +1,34 @@ += Cross Chain Awareness + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/crosschain + +This directory provides building blocks to improve cross-chain awareness of smart contracts. + +- {CrossChainEnabled} is an abstraction that contains accessors and modifiers to control the execution flow when receiving cross-chain messages. + +== CrossChainEnabled specializations + +The following specializations of {CrossChainEnabled} provide implementations of the {CrossChainEnabled} abstraction for specific bridges. This can be used to complex cross-chain aware components such as {AccessControlCrossChain}. + +{{CrossChainEnabledAMB}} + +{{CrossChainEnabledArbitrumL1}} + +{{CrossChainEnabledArbitrumL2}} + +{{CrossChainEnabledOptimism}} + +{{CrossChainEnabledPolygonChild}} + +== Libraries for cross-chain + +In addition to the {CrossChainEnabled} abstraction, cross-chain awareness is also available through libraries. These libraries can be used to build complex designs such as contracts with the ability to interact with multiple bridges. + +{{LibAMB}} + +{{LibArbitrumL1}} + +{{LibArbitrumL2}} + +{{LibOptimism}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol new file mode 100644 index 00000000..4329398e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/CrossChainEnabledAMB.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabledUpgradeable.sol"; +import "./LibAMBUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] + * specialization or the {CrossChainEnabled} abstraction. + * + * As of february 2020, AMB bridges are available between the following chains: + * + * - https://docs.tokenbridge.net/eth-xdai-amb-bridge/about-the-eth-xdai-amb[ETH ⇌ xDai] + * - https://docs.tokenbridge.net/eth-qdai-bridge/about-the-eth-qdai-amb[ETH ⇌ qDai] + * - https://docs.tokenbridge.net/eth-etc-amb-bridge/about-the-eth-etc-amb[ETH ⇌ ETC] + * - https://docs.tokenbridge.net/eth-bsc-amb/about-the-eth-bsc-amb[ETH ⇌ BSC] + * - https://docs.tokenbridge.net/eth-poa-amb-bridge/about-the-eth-poa-amb[ETH ⇌ POA] + * - https://docs.tokenbridge.net/bsc-xdai-amb/about-the-bsc-xdai-amb[BSC ⇌ xDai] + * - https://docs.tokenbridge.net/poa-xdai-amb/about-the-poa-xdai-amb[POA ⇌ xDai] + * - https://docs.tokenbridge.net/rinkeby-xdai-amb-bridge/about-the-rinkeby-xdai-amb[Rinkeby ⇌ xDai] + * - https://docs.tokenbridge.net/kovan-sokol-amb-bridge/about-the-kovan-sokol-amb[Kovan ⇌ Sokol] + * + * _Available since v4.6._ + */ +contract CrossChainEnabledAMBUpgradeable is Initializable, CrossChainEnabledUpgradeable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _bridge; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address bridge) { + _bridge = bridge; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibAMBUpgradeable.isCrossChain(_bridge); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibAMBUpgradeable.crossChainSender(_bridge); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol new file mode 100644 index 00000000..313d2df4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/LibAMB.sol) + +pragma solidity ^0.8.4; + +import {IAMBUpgradeable as AMB_Bridge} from "../../vendor/amb/IAMBUpgradeable.sol"; +import "../errorsUpgradeable.sol"; + +/** + * @dev Primitives for cross-chain aware contracts using the + * https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] + * family of bridges. + */ +library LibAMBUpgradeable { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by `bridge`. + */ + function isCrossChain(address bridge) internal view returns (bool) { + return msg.sender == bridge; + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through `bridge`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address bridge) internal view returns (address) { + if (!isCrossChain(bridge)) revert NotCrossChainCall(); + return AMB_Bridge(bridge).messageSender(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol new file mode 100644 index 00000000..a8625157 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabledUpgradeable.sol"; +import "./LibArbitrumL1Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev https://arbitrum.io/[Arbitrum] specialization or the + * {CrossChainEnabled} abstraction the L1 side (mainnet). + * + * This version should only be deployed on L1 to process cross-chain messages + * originating from L2. For the other side, use {CrossChainEnabledArbitrumL2}. + * + * The bridge contract is provided and maintained by the arbitrum team. You can + * find the address of this contract on the rinkeby testnet in + * https://developer.offchainlabs.com/docs/useful_addresses[Arbitrum's developer documentation]. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabledArbitrumL1Upgradeable is Initializable, CrossChainEnabledUpgradeable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _bridge; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address bridge) { + _bridge = bridge; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibArbitrumL1Upgradeable.isCrossChain(_bridge); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibArbitrumL1Upgradeable.crossChainSender(_bridge); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol new file mode 100644 index 00000000..80bb3a85 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabledUpgradeable.sol"; +import "./LibArbitrumL2Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev https://arbitrum.io/[Arbitrum] specialization or the + * {CrossChainEnabled} abstraction the L2 side (arbitrum). + * + * This version should only be deployed on L2 to process cross-chain messages + * originating from L1. For the other side, use {CrossChainEnabledArbitrumL1}. + * + * Arbitrum L2 includes the `ArbSys` contract at a fixed address. Therefore, + * this specialization of {CrossChainEnabled} does not include a constructor. + * + * _Available since v4.6._ + * + * WARNING: There is currently a bug in Arbitrum that causes this contract to + * fail to detect cross-chain calls when deployed behind a proxy. This will be + * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for + * August 31st 2022. + */ +abstract contract CrossChainEnabledArbitrumL2Upgradeable is Initializable, CrossChainEnabledUpgradeable { + function __CrossChainEnabledArbitrumL2_init() internal onlyInitializing { + } + + function __CrossChainEnabledArbitrumL2_init_unchained() internal onlyInitializing { + } + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibArbitrumL2Upgradeable.isCrossChain(LibArbitrumL2Upgradeable.ARBSYS); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibArbitrumL2Upgradeable.crossChainSender(LibArbitrumL2Upgradeable.ARBSYS); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol new file mode 100644 index 00000000..a66ed348 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL1.sol) + +pragma solidity ^0.8.4; + +import {IBridgeUpgradeable as ArbitrumL1_Bridge} from "../../vendor/arbitrum/IBridgeUpgradeable.sol"; +import {IOutboxUpgradeable as ArbitrumL1_Outbox} from "../../vendor/arbitrum/IOutboxUpgradeable.sol"; +import "../errorsUpgradeable.sol"; + +/** + * @dev Primitives for cross-chain aware contracts for + * https://arbitrum.io/[Arbitrum]. + * + * This version should only be used on L1 to process cross-chain messages + * originating from L2. For the other side, use {LibArbitrumL2}. + */ +library LibArbitrumL1Upgradeable { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by the `bridge`. + */ + function isCrossChain(address bridge) internal view returns (bool) { + return msg.sender == bridge; + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through the `bridge`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address bridge) internal view returns (address) { + if (!isCrossChain(bridge)) revert NotCrossChainCall(); + + address sender = ArbitrumL1_Outbox(ArbitrumL1_Bridge(bridge).activeOutbox()).l2ToL1Sender(); + require(sender != address(0), "LibArbitrumL1: system messages without sender"); + + return sender; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol new file mode 100644 index 00000000..e8abb606 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL2.sol) + +pragma solidity ^0.8.4; + +import {IArbSysUpgradeable as ArbitrumL2_Bridge} from "../../vendor/arbitrum/IArbSysUpgradeable.sol"; +import "../errorsUpgradeable.sol"; + +/** + * @dev Primitives for cross-chain aware contracts for + * https://arbitrum.io/[Arbitrum]. + * + * This version should only be used on L2 to process cross-chain messages + * originating from L1. For the other side, use {LibArbitrumL1}. + * + * WARNING: There is currently a bug in Arbitrum that causes this contract to + * fail to detect cross-chain calls when deployed behind a proxy. This will be + * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for + * August 31st 2022. + */ +library LibArbitrumL2Upgradeable { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by `arbsys`. + */ + address public constant ARBSYS = 0x0000000000000000000000000000000000000064; + + function isCrossChain(address arbsys) internal view returns (bool) { + return ArbitrumL2_Bridge(arbsys).wasMyCallersAddressAliased(); + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through `arbsys`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address arbsys) internal view returns (address) { + if (!isCrossChain(arbsys)) revert NotCrossChainCall(); + + return ArbitrumL2_Bridge(arbsys).myCallersAddressWithoutAliasing(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol new file mode 100644 index 00000000..004460e9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/errors.sol) + +pragma solidity ^0.8.4; + +error NotCrossChainCall(); +error InvalidCrossChainSender(address actual, address expected); diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol new file mode 100644 index 00000000..e6c5cd2d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/CrossChainEnabledOptimism.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabledUpgradeable.sol"; +import "./LibOptimismUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev https://www.optimism.io/[Optimism] specialization or the + * {CrossChainEnabled} abstraction. + * + * The messenger (`CrossDomainMessenger`) contract is provided and maintained by + * the optimism team. You can find the address of this contract on mainnet and + * kovan in the https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/deployments[deployments section of Optimism monorepo]. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabledOptimismUpgradeable is Initializable, CrossChainEnabledUpgradeable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _messenger; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address messenger) { + _messenger = messenger; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return LibOptimismUpgradeable.isCrossChain(_messenger); + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return LibOptimismUpgradeable.crossChainSender(_messenger); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol new file mode 100644 index 00000000..9fb8ed55 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/LibOptimism.sol) + +pragma solidity ^0.8.4; + +import {ICrossDomainMessengerUpgradeable as Optimism_Bridge} from "../../vendor/optimism/ICrossDomainMessengerUpgradeable.sol"; +import "../errorsUpgradeable.sol"; + +/** + * @dev Primitives for cross-chain aware contracts for https://www.optimism.io/[Optimism]. + * See the https://community.optimism.io/docs/developers/bridge/messaging/#accessing-msg-sender[documentation] + * for the functionality used here. + */ +library LibOptimismUpgradeable { + /** + * @dev Returns whether the current function call is the result of a + * cross-chain message relayed by `messenger`. + */ + function isCrossChain(address messenger) internal view returns (bool) { + return msg.sender == messenger; + } + + /** + * @dev Returns the address of the sender that triggered the current + * cross-chain message through `messenger`. + * + * NOTE: {isCrossChain} should be checked before trying to recover the + * sender, as it will revert with `NotCrossChainCall` if the current + * function call is not the result of a cross-chain message. + */ + function crossChainSender(address messenger) internal view returns (address) { + if (!isCrossChain(messenger)) revert NotCrossChainCall(); + + return Optimism_Bridge(messenger).xDomainMessageSender(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol new file mode 100644 index 00000000..6f76ec93 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol) + +pragma solidity ^0.8.4; + +import "../CrossChainEnabledUpgradeable.sol"; +import "../../security/ReentrancyGuardUpgradeable.sol"; +import "../../utils/AddressUpgradeable.sol"; +import "../../vendor/polygon/IFxMessageProcessorUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +address constant DEFAULT_SENDER = 0x000000000000000000000000000000000000dEaD; + +/** + * @dev https://polygon.technology/[Polygon] specialization or the + * {CrossChainEnabled} abstraction the child side (polygon/mumbai). + * + * This version should only be deployed on child chain to process cross-chain + * messages originating from the parent chain. + * + * The fxChild contract is provided and maintained by the polygon team. You can + * find the address of this contract polygon and mumbai in + * https://docs.polygon.technology/docs/develop/l1-l2-communication/fx-portal/#contract-addresses[Polygon's Fx-Portal documentation]. + * + * _Available since v4.6._ + */ +abstract contract CrossChainEnabledPolygonChildUpgradeable is Initializable, IFxMessageProcessorUpgradeable, CrossChainEnabledUpgradeable, ReentrancyGuardUpgradeable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _fxChild; + address private _sender = DEFAULT_SENDER; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address fxChild) { + _fxChild = fxChild; + } + + /** + * @dev see {CrossChainEnabled-_isCrossChain} + */ + function _isCrossChain() internal view virtual override returns (bool) { + return msg.sender == _fxChild; + } + + /** + * @dev see {CrossChainEnabled-_crossChainSender} + */ + function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { + return _sender; + } + + /** + * @dev External entry point to receive and relay messages originating + * from the fxChild. + * + * Non-reentrancy is crucial to avoid a cross-chain call being able + * to impersonate anyone by just looping through this with user-defined + * arguments. + * + * Note: if _fxChild calls any other function that does a delegate-call, + * then security could be compromised. + */ + function processMessageFromRoot( + uint256 /* stateId */, + address rootMessageSender, + bytes calldata data + ) external override nonReentrant { + if (!_isCrossChain()) revert NotCrossChainCall(); + + _sender = rootMessageSender; + AddressUpgradeable.functionDelegateCall(address(this), data, "cross-chain execution failed"); + _sender = DEFAULT_SENDER; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol new file mode 100644 index 00000000..f2d8b8b6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol @@ -0,0 +1,226 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/utils/SafeERC20Upgradeable.sol"; +import "../utils/AddressUpgradeable.sol"; +import "../utils/ContextUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @title PaymentSplitter + * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware + * that the Ether will be split in this way, since it is handled transparently by the contract. + * + * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each + * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim + * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the + * time of contract deployment and can't be updated thereafter. + * + * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the + * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} + * function. + * + * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and + * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you + * to run tests before sending real value to this contract. + */ +contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { + event PayeeAdded(address account, uint256 shares); + event PaymentReleased(address to, uint256 amount); + event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); + event PaymentReceived(address from, uint256 amount); + + uint256 private _totalShares; + uint256 private _totalReleased; + + mapping(address => uint256) private _shares; + mapping(address => uint256) private _released; + address[] private _payees; + + mapping(IERC20Upgradeable => uint256) private _erc20TotalReleased; + mapping(IERC20Upgradeable => mapping(address => uint256)) private _erc20Released; + + /** + * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at + * the matching position in the `shares` array. + * + * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no + * duplicates in `payees`. + */ + function __PaymentSplitter_init(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { + __PaymentSplitter_init_unchained(payees, shares_); + } + + function __PaymentSplitter_init_unchained(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { + require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); + require(payees.length > 0, "PaymentSplitter: no payees"); + + for (uint256 i = 0; i < payees.length; i++) { + _addPayee(payees[i], shares_[i]); + } + } + + /** + * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully + * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the + * reliability of the events, and not the actual splitting of Ether. + * + * To learn more about this see the Solidity documentation for + * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback + * functions]. + */ + receive() external payable virtual { + emit PaymentReceived(_msgSender(), msg.value); + } + + /** + * @dev Getter for the total shares held by payees. + */ + function totalShares() public view returns (uint256) { + return _totalShares; + } + + /** + * @dev Getter for the total amount of Ether already released. + */ + function totalReleased() public view returns (uint256) { + return _totalReleased; + } + + /** + * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 + * contract. + */ + function totalReleased(IERC20Upgradeable token) public view returns (uint256) { + return _erc20TotalReleased[token]; + } + + /** + * @dev Getter for the amount of shares held by an account. + */ + function shares(address account) public view returns (uint256) { + return _shares[account]; + } + + /** + * @dev Getter for the amount of Ether already released to a payee. + */ + function released(address account) public view returns (uint256) { + return _released[account]; + } + + /** + * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an + * IERC20 contract. + */ + function released(IERC20Upgradeable token, address account) public view returns (uint256) { + return _erc20Released[token][account]; + } + + /** + * @dev Getter for the address of the payee number `index`. + */ + function payee(uint256 index) public view returns (address) { + return _payees[index]; + } + + /** + * @dev Getter for the amount of payee's releasable Ether. + */ + function releasable(address account) public view returns (uint256) { + uint256 totalReceived = address(this).balance + totalReleased(); + return _pendingPayment(account, totalReceived, released(account)); + } + + /** + * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an + * IERC20 contract. + */ + function releasable(IERC20Upgradeable token, address account) public view returns (uint256) { + uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); + return _pendingPayment(account, totalReceived, released(token, account)); + } + + /** + * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the + * total shares and their previous withdrawals. + */ + function release(address payable account) public virtual { + require(_shares[account] > 0, "PaymentSplitter: account has no shares"); + + uint256 payment = releasable(account); + + require(payment != 0, "PaymentSplitter: account is not due payment"); + + // _totalReleased is the sum of all values in _released. + // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. + _totalReleased += payment; + unchecked { + _released[account] += payment; + } + + AddressUpgradeable.sendValue(account, payment); + emit PaymentReleased(account, payment); + } + + /** + * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their + * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 + * contract. + */ + function release(IERC20Upgradeable token, address account) public virtual { + require(_shares[account] > 0, "PaymentSplitter: account has no shares"); + + uint256 payment = releasable(token, account); + + require(payment != 0, "PaymentSplitter: account is not due payment"); + + // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. + // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" + // cannot overflow. + _erc20TotalReleased[token] += payment; + unchecked { + _erc20Released[token][account] += payment; + } + + SafeERC20Upgradeable.safeTransfer(token, account, payment); + emit ERC20PaymentReleased(token, account, payment); + } + + /** + * @dev internal logic for computing the pending payment of an `account` given the token historical balances and + * already released amounts. + */ + function _pendingPayment( + address account, + uint256 totalReceived, + uint256 alreadyReleased + ) private view returns (uint256) { + return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; + } + + /** + * @dev Add a new payee to the contract. + * @param account The address of the payee to add. + * @param shares_ The number of shares owned by the payee. + */ + function _addPayee(address account, uint256 shares_) private { + require(account != address(0), "PaymentSplitter: account is the zero address"); + require(shares_ > 0, "PaymentSplitter: shares are 0"); + require(_shares[account] == 0, "PaymentSplitter: account already has shares"); + + _payees.push(account); + _shares[account] = shares_; + _totalShares = _totalShares + shares_; + emit PayeeAdded(account, shares_); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[43] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc new file mode 100644 index 00000000..b64af312 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc @@ -0,0 +1,20 @@ += Finance + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance + +This directory includes primitives for financial systems: + +- {PaymentSplitter} allows to split Ether and ERC20 payments among a group of accounts. The sender does not need to be + aware that the assets will be split in this way, since it is handled transparently by the contract. The split can be + in equal parts or in any other arbitrary proportion. + +- {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can + be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting + schedule. + +== Contracts + +{{PaymentSplitter}} + +{{VestingWallet}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol new file mode 100644 index 00000000..32854c6e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol @@ -0,0 +1,159 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (finance/VestingWallet.sol) +pragma solidity ^0.8.0; + +import "../token/ERC20/utils/SafeERC20Upgradeable.sol"; +import "../utils/AddressUpgradeable.sol"; +import "../utils/ContextUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @title VestingWallet + * @dev This contract handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens + * can be given to this contract, which will release the token to the beneficiary following a given vesting schedule. + * The vesting schedule is customizable through the {vestedAmount} function. + * + * Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning. + * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly) + * be immediately releasable. + * + * @custom:storage-size 52 + */ +contract VestingWalletUpgradeable is Initializable, ContextUpgradeable { + event EtherReleased(uint256 amount); + event ERC20Released(address indexed token, uint256 amount); + + uint256 private _released; + mapping(address => uint256) private _erc20Released; + address private _beneficiary; + uint64 private _start; + uint64 private _duration; + + /** + * @dev Set the beneficiary, start timestamp and vesting duration of the vesting wallet. + */ + function __VestingWallet_init(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) internal onlyInitializing { + __VestingWallet_init_unchained(beneficiaryAddress, startTimestamp, durationSeconds); + } + + function __VestingWallet_init_unchained(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) internal onlyInitializing { + require(beneficiaryAddress != address(0), "VestingWallet: beneficiary is zero address"); + _beneficiary = beneficiaryAddress; + _start = startTimestamp; + _duration = durationSeconds; + } + + /** + * @dev The contract should be able to receive Eth. + */ + receive() external payable virtual {} + + /** + * @dev Getter for the beneficiary address. + */ + function beneficiary() public view virtual returns (address) { + return _beneficiary; + } + + /** + * @dev Getter for the start timestamp. + */ + function start() public view virtual returns (uint256) { + return _start; + } + + /** + * @dev Getter for the vesting duration. + */ + function duration() public view virtual returns (uint256) { + return _duration; + } + + /** + * @dev Amount of eth already released + */ + function released() public view virtual returns (uint256) { + return _released; + } + + /** + * @dev Amount of token already released + */ + function released(address token) public view virtual returns (uint256) { + return _erc20Released[token]; + } + + /** + * @dev Getter for the amount of releasable eth. + */ + function releasable() public view virtual returns (uint256) { + return vestedAmount(uint64(block.timestamp)) - released(); + } + + /** + * @dev Getter for the amount of releasable `token` tokens. `token` should be the address of an + * IERC20 contract. + */ + function releasable(address token) public view virtual returns (uint256) { + return vestedAmount(token, uint64(block.timestamp)) - released(token); + } + + /** + * @dev Release the native token (ether) that have already vested. + * + * Emits a {EtherReleased} event. + */ + function release() public virtual { + uint256 amount = releasable(); + _released += amount; + emit EtherReleased(amount); + AddressUpgradeable.sendValue(payable(beneficiary()), amount); + } + + /** + * @dev Release the tokens that have already vested. + * + * Emits a {ERC20Released} event. + */ + function release(address token) public virtual { + uint256 amount = releasable(token); + _erc20Released[token] += amount; + emit ERC20Released(token, amount); + SafeERC20Upgradeable.safeTransfer(IERC20Upgradeable(token), beneficiary(), amount); + } + + /** + * @dev Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve. + */ + function vestedAmount(uint64 timestamp) public view virtual returns (uint256) { + return _vestingSchedule(address(this).balance + released(), timestamp); + } + + /** + * @dev Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve. + */ + function vestedAmount(address token, uint64 timestamp) public view virtual returns (uint256) { + return _vestingSchedule(IERC20Upgradeable(token).balanceOf(address(this)) + released(token), timestamp); + } + + /** + * @dev Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for + * an asset given its total historical allocation. + */ + function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) { + if (timestamp < start()) { + return 0; + } else if (timestamp > start() + duration()) { + return totalAllocation; + } else { + return (totalAllocation * (timestamp - start())) / duration(); + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol new file mode 100644 index 00000000..f5af5733 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol @@ -0,0 +1,736 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.1) (governance/Governor.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/IERC721ReceiverUpgradeable.sol"; +import "../token/ERC1155/IERC1155ReceiverUpgradeable.sol"; +import "../utils/cryptography/ECDSAUpgradeable.sol"; +import "../utils/cryptography/EIP712Upgradeable.sol"; +import "../utils/introspection/ERC165Upgradeable.sol"; +import "../utils/math/SafeCastUpgradeable.sol"; +import "../utils/structs/DoubleEndedQueueUpgradeable.sol"; +import "../utils/AddressUpgradeable.sol"; +import "../utils/ContextUpgradeable.sol"; +import "./IGovernorUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Core of the governance system, designed to be extended though various modules. + * + * This contract is abstract and requires several functions to be implemented in various modules: + * + * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} + * - A voting module must implement {_getVotes} + * - Additionally, {votingPeriod} must also be implemented + * + * _Available since v4.3._ + */ +abstract contract GovernorUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, EIP712Upgradeable, IGovernorUpgradeable, IERC721ReceiverUpgradeable, IERC1155ReceiverUpgradeable { + using DoubleEndedQueueUpgradeable for DoubleEndedQueueUpgradeable.Bytes32Deque; + + bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); + bytes32 public constant EXTENDED_BALLOT_TYPEHASH = + keccak256("ExtendedBallot(uint256 proposalId,uint8 support,string reason,bytes params)"); + + // solhint-disable var-name-mixedcase + struct ProposalCore { + // --- start retyped from Timers.BlockNumber at offset 0x00 --- + uint64 voteStart; + address proposer; + bytes4 __gap_unused0; + // --- start retyped from Timers.BlockNumber at offset 0x20 --- + uint64 voteEnd; + bytes24 __gap_unused1; + // --- Remaining fields starting at offset 0x40 --------------- + bool executed; + bool canceled; + } + // solhint-enable var-name-mixedcase + + string private _name; + + /// @custom:oz-retyped-from mapping(uint256 => Governor.ProposalCore) + mapping(uint256 => ProposalCore) private _proposals; + + // This queue keeps track of the governor operating on itself. Calls to functions protected by the + // {onlyGovernance} modifier needs to be whitelisted in this queue. Whitelisting is set in {_beforeExecute}, + // consumed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the + // execution of {onlyGovernance} protected calls can only be achieved through successful proposals. + DoubleEndedQueueUpgradeable.Bytes32Deque private _governanceCall; + + /** + * @dev Restricts a function so it can only be executed through governance proposals. For example, governance + * parameter setters in {GovernorSettings} are protected using this modifier. + * + * The governance executing address may be different from the Governor's own address, for example it could be a + * timelock. This can be customized by modules by overriding {_executor}. The executor is only able to invoke these + * functions during the execution of the governor's {execute} function, and not under any other circumstances. Thus, + * for example, additional timelock proposers are not able to change governance parameters without going through the + * governance protocol (since v4.6). + */ + modifier onlyGovernance() { + require(_msgSender() == _executor(), "Governor: onlyGovernance"); + if (_executor() != address(this)) { + bytes32 msgDataHash = keccak256(_msgData()); + // loop until popping the expected operation - throw if deque is empty (operation not authorized) + while (_governanceCall.popFront() != msgDataHash) {} + } + _; + } + + /** + * @dev Sets the value for {name} and {version} + */ + function __Governor_init(string memory name_) internal onlyInitializing { + __EIP712_init_unchained(name_, version()); + __Governor_init_unchained(name_); + } + + function __Governor_init_unchained(string memory name_) internal onlyInitializing { + _name = name_; + } + + /** + * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) + */ + receive() external payable virtual { + require(_executor() == address(this), "Governor: must send to executor"); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { + bytes4 governorCancelId = this.cancel.selector ^ this.proposalProposer.selector; + + bytes4 governorParamsId = this.castVoteWithReasonAndParams.selector ^ + this.castVoteWithReasonAndParamsBySig.selector ^ + this.getVotesWithParams.selector; + + // The original interface id in v4.3. + bytes4 governor43Id = type(IGovernorUpgradeable).interfaceId ^ + type(IERC6372Upgradeable).interfaceId ^ + governorCancelId ^ + governorParamsId; + + // An updated interface id in v4.6, with params added. + bytes4 governor46Id = type(IGovernorUpgradeable).interfaceId ^ type(IERC6372Upgradeable).interfaceId ^ governorCancelId; + + // For the updated interface id in v4.9, we use governorCancelId directly. + + return + interfaceId == governor43Id || + interfaceId == governor46Id || + interfaceId == governorCancelId || + interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IGovernor-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IGovernor-version}. + */ + function version() public view virtual override returns (string memory) { + return "1"; + } + + /** + * @dev See {IGovernor-hashProposal}. + * + * The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array + * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id + * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in + * advance, before the proposal is submitted. + * + * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the + * same proposal (with same operation and same description) will have the same id if submitted on multiple governors + * across multiple networks. This also means that in order to execute the same operation twice (on the same + * governor) the proposer will have to change the description in order to avoid proposal id conflicts. + */ + function hashProposal( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public pure virtual override returns (uint256) { + return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); + } + + /** + * @dev See {IGovernor-state}. + */ + function state(uint256 proposalId) public view virtual override returns (ProposalState) { + ProposalCore storage proposal = _proposals[proposalId]; + + if (proposal.executed) { + return ProposalState.Executed; + } + + if (proposal.canceled) { + return ProposalState.Canceled; + } + + uint256 snapshot = proposalSnapshot(proposalId); + + if (snapshot == 0) { + revert("Governor: unknown proposal id"); + } + + uint256 currentTimepoint = clock(); + + if (snapshot >= currentTimepoint) { + return ProposalState.Pending; + } + + uint256 deadline = proposalDeadline(proposalId); + + if (deadline >= currentTimepoint) { + return ProposalState.Active; + } + + if (_quorumReached(proposalId) && _voteSucceeded(proposalId)) { + return ProposalState.Succeeded; + } else { + return ProposalState.Defeated; + } + } + + /** + * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. + */ + function proposalThreshold() public view virtual returns (uint256) { + return 0; + } + + /** + * @dev See {IGovernor-proposalSnapshot}. + */ + function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { + return _proposals[proposalId].voteStart; + } + + /** + * @dev See {IGovernor-proposalDeadline}. + */ + function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { + return _proposals[proposalId].voteEnd; + } + + /** + * @dev Returns the account that created a given proposal. + */ + function proposalProposer(uint256 proposalId) public view virtual override returns (address) { + return _proposals[proposalId].proposer; + } + + /** + * @dev Amount of votes already cast passes the threshold limit. + */ + function _quorumReached(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Is the proposal successful or not. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Get the voting weight of `account` at a specific `timepoint`, for a vote as described by `params`. + */ + function _getVotes(address account, uint256 timepoint, bytes memory params) internal view virtual returns (uint256); + + /** + * @dev Register a vote for `proposalId` by `account` with a given `support`, voting `weight` and voting `params`. + * + * Note: Support is generic and can represent various things depending on the voting system used. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 weight, + bytes memory params + ) internal virtual; + + /** + * @dev Default additional encoded parameters used by castVote methods that don't include them + * + * Note: Should be overridden by specific implementations to use an appropriate value, the + * meaning of the additional params, in the context of that implementation + */ + function _defaultParams() internal view virtual returns (bytes memory) { + return ""; + } + + /** + * @dev See {IGovernor-propose}. This function has opt-in frontrunning protection, described in {_isValidDescriptionForProposer}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + address proposer = _msgSender(); + require(_isValidDescriptionForProposer(proposer, description), "Governor: proposer restricted"); + + uint256 currentTimepoint = clock(); + require( + getVotes(proposer, currentTimepoint - 1) >= proposalThreshold(), + "Governor: proposer votes below proposal threshold" + ); + + uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); + + require(targets.length == values.length, "Governor: invalid proposal length"); + require(targets.length == calldatas.length, "Governor: invalid proposal length"); + require(targets.length > 0, "Governor: empty proposal"); + require(_proposals[proposalId].voteStart == 0, "Governor: proposal already exists"); + + uint256 snapshot = currentTimepoint + votingDelay(); + uint256 deadline = snapshot + votingPeriod(); + + _proposals[proposalId] = ProposalCore({ + proposer: proposer, + voteStart: SafeCastUpgradeable.toUint64(snapshot), + voteEnd: SafeCastUpgradeable.toUint64(deadline), + executed: false, + canceled: false, + __gap_unused0: 0, + __gap_unused1: 0 + }); + + emit ProposalCreated( + proposalId, + proposer, + targets, + values, + new string[](targets.length), + calldatas, + snapshot, + deadline, + description + ); + + return proposalId; + } + + /** + * @dev See {IGovernor-execute}. + */ + function execute( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public payable virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + ProposalState currentState = state(proposalId); + require( + currentState == ProposalState.Succeeded || currentState == ProposalState.Queued, + "Governor: proposal not successful" + ); + _proposals[proposalId].executed = true; + + emit ProposalExecuted(proposalId); + + _beforeExecute(proposalId, targets, values, calldatas, descriptionHash); + _execute(proposalId, targets, values, calldatas, descriptionHash); + _afterExecute(proposalId, targets, values, calldatas, descriptionHash); + + return proposalId; + } + + /** + * @dev See {IGovernor-cancel}. + */ + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + require(state(proposalId) == ProposalState.Pending, "Governor: too late to cancel"); + require(_msgSender() == _proposals[proposalId].proposer, "Governor: only proposer can cancel"); + return _cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Internal execution mechanism. Can be overridden to implement different execution mechanism + */ + function _execute( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual { + string memory errorMessage = "Governor: call reverted without message"; + for (uint256 i = 0; i < targets.length; ++i) { + (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); + AddressUpgradeable.verifyCallResult(success, returndata, errorMessage); + } + } + + /** + * @dev Hook before execution is triggered. + */ + function _beforeExecute( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory /* values */, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual { + if (_executor() != address(this)) { + for (uint256 i = 0; i < targets.length; ++i) { + if (targets[i] == address(this)) { + _governanceCall.pushBack(keccak256(calldatas[i])); + } + } + } + } + + /** + * @dev Hook after execution is triggered. + */ + function _afterExecute( + uint256 /* proposalId */, + address[] memory /* targets */, + uint256[] memory /* values */, + bytes[] memory /* calldatas */, + bytes32 /*descriptionHash*/ + ) internal virtual { + if (_executor() != address(this)) { + if (!_governanceCall.empty()) { + _governanceCall.clear(); + } + } + } + + /** + * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as + * canceled to allow distinguishing it from executed proposals. + * + * Emits a {IGovernor-ProposalCanceled} event. + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + ProposalState currentState = state(proposalId); + + require( + currentState != ProposalState.Canceled && + currentState != ProposalState.Expired && + currentState != ProposalState.Executed, + "Governor: proposal not active" + ); + _proposals[proposalId].canceled = true; + + emit ProposalCanceled(proposalId); + + return proposalId; + } + + /** + * @dev See {IGovernor-getVotes}. + */ + function getVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { + return _getVotes(account, timepoint, _defaultParams()); + } + + /** + * @dev See {IGovernor-getVotesWithParams}. + */ + function getVotesWithParams( + address account, + uint256 timepoint, + bytes memory params + ) public view virtual override returns (uint256) { + return _getVotes(account, timepoint, params); + } + + /** + * @dev See {IGovernor-castVote}. + */ + function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, ""); + } + + /** + * @dev See {IGovernor-castVoteWithReason}. + */ + function castVoteWithReason( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual override returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason); + } + + /** + * @dev See {IGovernor-castVoteWithReasonAndParams}. + */ + function castVoteWithReasonAndParams( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params + ) public virtual override returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason, params); + } + + /** + * @dev See {IGovernor-castVoteBySig}. + */ + function castVoteBySig( + uint256 proposalId, + uint8 support, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override returns (uint256) { + address voter = ECDSAUpgradeable.recover( + _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))), + v, + r, + s + ); + return _castVote(proposalId, voter, support, ""); + } + + /** + * @dev See {IGovernor-castVoteWithReasonAndParamsBySig}. + */ + function castVoteWithReasonAndParamsBySig( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override returns (uint256) { + address voter = ECDSAUpgradeable.recover( + _hashTypedDataV4( + keccak256( + abi.encode( + EXTENDED_BALLOT_TYPEHASH, + proposalId, + support, + keccak256(bytes(reason)), + keccak256(params) + ) + ) + ), + v, + r, + s + ); + + return _castVote(proposalId, voter, support, reason, params); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. Uses the _defaultParams(). + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason + ) internal virtual returns (uint256) { + return _castVote(proposalId, account, support, reason, _defaultParams()); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason, + bytes memory params + ) internal virtual returns (uint256) { + ProposalCore storage proposal = _proposals[proposalId]; + require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active"); + + uint256 weight = _getVotes(account, proposal.voteStart, params); + _countVote(proposalId, account, support, weight, params); + + if (params.length == 0) { + emit VoteCast(account, proposalId, support, weight, reason); + } else { + emit VoteCastWithParams(account, proposalId, support, weight, reason, params); + } + + return weight; + } + + /** + * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor + * is some contract other than the governor itself, like when using a timelock, this function can be invoked + * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. + * Note that if the executor is simply the governor itself, use of `relay` is redundant. + */ + function relay(address target, uint256 value, bytes calldata data) external payable virtual onlyGovernance { + (bool success, bytes memory returndata) = target.call{value: value}(data); + AddressUpgradeable.verifyCallResult(success, returndata, "Governor: relay reverted without message"); + } + + /** + * @dev Address through which the governor executes action. Will be overloaded by module that execute actions + * through another contract such as a timelock. + */ + function _executor() internal view virtual returns (address) { + return address(this); + } + + /** + * @dev See {IERC721Receiver-onERC721Received}. + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + return this.onERC721Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155Received}. + */ + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + */ + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155BatchReceived.selector; + } + + /** + * @dev Check if the proposer is authorized to submit a proposal with the given description. + * + * If the proposal description ends with `#proposer=0x???`, where `0x???` is an address written as a hex string + * (case insensitive), then the submission of this proposal will only be authorized to said address. + * + * This is used for frontrunning protection. By adding this pattern at the end of their proposal, one can ensure + * that no other address can submit the same proposal. An attacker would have to either remove or change that part, + * which would result in a different proposal id. + * + * If the description does not match this pattern, it is unrestricted and anyone can submit it. This includes: + * - If the `0x???` part is not a valid hex string. + * - If the `0x???` part is a valid hex string, but does not contain exactly 40 hex digits. + * - If it ends with the expected suffix followed by newlines or other whitespace. + * - If it ends with some other similar suffix, e.g. `#other=abc`. + * - If it does not end with any such suffix. + */ + function _isValidDescriptionForProposer( + address proposer, + string memory description + ) internal view virtual returns (bool) { + uint256 len = bytes(description).length; + + // Length is too short to contain a valid proposer suffix + if (len < 52) { + return true; + } + + // Extract what would be the `#proposer=0x` marker beginning the suffix + bytes12 marker; + assembly { + // - Start of the string contents in memory = description + 32 + // - First character of the marker = len - 52 + // - Length of "#proposer=0x0000000000000000000000000000000000000000" = 52 + // - We read the memory word starting at the first character of the marker: + // - (description + 32) + (len - 52) = description + (len - 20) + // - Note: Solidity will ignore anything past the first 12 bytes + marker := mload(add(description, sub(len, 20))) + } + + // If the marker is not found, there is no proposer suffix to check + if (marker != bytes12("#proposer=0x")) { + return true; + } + + // Parse the 40 characters following the marker as uint160 + uint160 recovered = 0; + for (uint256 i = len - 40; i < len; ++i) { + (bool isHex, uint8 value) = _tryHexToUint(bytes(description)[i]); + // If any of the characters is not a hex digit, ignore the suffix entirely + if (!isHex) { + return true; + } + recovered = (recovered << 4) | value; + } + + return recovered == uint160(proposer); + } + + /** + * @dev Try to parse a character from a string as a hex value. Returns `(true, value)` if the char is in + * `[0-9a-fA-F]` and `(false, 0)` otherwise. Value is guaranteed to be in the range `0 <= value < 16` + */ + function _tryHexToUint(bytes1 char) private pure returns (bool, uint8) { + uint8 c = uint8(char); + unchecked { + // Case 0-9 + if (47 < c && c < 58) { + return (true, c - 48); + } + // Case A-F + else if (64 < c && c < 71) { + return (true, c - 55); + } + // Case a-f + else if (96 < c && c < 103) { + return (true, c - 87); + } + // Else: not a hex char + else { + return (false, 0); + } + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[46] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol new file mode 100644 index 00000000..7b5485e7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol @@ -0,0 +1,326 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/IGovernor.sol) + +pragma solidity ^0.8.0; + +import "../interfaces/IERC165Upgradeable.sol"; +import "../interfaces/IERC6372Upgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Interface of the {Governor} core. + * + * _Available since v4.3._ + */ +abstract contract IGovernorUpgradeable is Initializable, IERC165Upgradeable, IERC6372Upgradeable { + enum ProposalState { + Pending, + Active, + Canceled, + Defeated, + Succeeded, + Queued, + Expired, + Executed + } + + /** + * @dev Emitted when a proposal is created. + */ + event ProposalCreated( + uint256 proposalId, + address proposer, + address[] targets, + uint256[] values, + string[] signatures, + bytes[] calldatas, + uint256 voteStart, + uint256 voteEnd, + string description + ); + + /** + * @dev Emitted when a proposal is canceled. + */ + event ProposalCanceled(uint256 proposalId); + + /** + * @dev Emitted when a proposal is executed. + */ + event ProposalExecuted(uint256 proposalId); + + /** + * @dev Emitted when a vote is cast without params. + * + * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. + */ + event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); + + /** + * @dev Emitted when a vote is cast with params. + * + * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. + * `params` are additional encoded parameters. Their interpepretation also depends on the voting module used. + */ + event VoteCastWithParams( + address indexed voter, + uint256 proposalId, + uint8 support, + uint256 weight, + string reason, + bytes params + ); + + function __IGovernor_init() internal onlyInitializing { + } + + function __IGovernor_init_unchained() internal onlyInitializing { + } + /** + * @notice module:core + * @dev Name of the governor instance (used in building the ERC712 domain separator). + */ + function name() public view virtual returns (string memory); + + /** + * @notice module:core + * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1" + */ + function version() public view virtual returns (string memory); + + /** + * @notice module:core + * @dev See {IERC6372} + */ + function clock() public view virtual override returns (uint48); + + /** + * @notice module:core + * @dev See EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory); + + /** + * @notice module:voting + * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to + * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of + * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`. + * + * There are 2 standard keys: `support` and `quorum`. + * + * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`. + * - `quorum=bravo` means that only For votes are counted towards quorum. + * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum. + * + * If a counting module makes use of encoded `params`, it should include this under a `params` key with a unique + * name that describes the behavior. For example: + * + * - `params=fractional` might refer to a scheme where votes are divided fractionally between for/against/abstain. + * - `params=erc721` might refer to a scheme where specific NFTs are delegated to vote. + * + * NOTE: The string can be decoded by the standard + * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`] + * JavaScript class. + */ + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public view virtual returns (string memory); + + /** + * @notice module:core + * @dev Hashing function used to (re)build the proposal id from the proposal details.. + */ + function hashProposal( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public pure virtual returns (uint256); + + /** + * @notice module:core + * @dev Current state of a proposal, following Compound's convention + */ + function state(uint256 proposalId) public view virtual returns (ProposalState); + + /** + * @notice module:core + * @dev Timepoint used to retrieve user's votes and quorum. If using block number (as per Compound's Comp), the + * snapshot is performed at the end of this block. Hence, voting for this proposal starts at the beginning of the + * following block. + */ + function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256); + + /** + * @notice module:core + * @dev Timepoint at which votes close. If using block number, votes close at the end of this block, so it is + * possible to cast a vote during this block. + */ + function proposalDeadline(uint256 proposalId) public view virtual returns (uint256); + + /** + * @notice module:core + * @dev The account that created a proposal. + */ + function proposalProposer(uint256 proposalId) public view virtual returns (address); + + /** + * @notice module:user-config + * @dev Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends + * on the clock (see EIP-6372) this contract uses. + * + * This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a + * proposal starts. + */ + function votingDelay() public view virtual returns (uint256); + + /** + * @notice module:user-config + * @dev Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock + * (see EIP-6372) this contract uses. + * + * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting + * duration compared to the voting delay. + */ + function votingPeriod() public view virtual returns (uint256); + + /** + * @notice module:user-config + * @dev Minimum number of cast voted required for a proposal to be successful. + * + * NOTE: The `timepoint` parameter corresponds to the snapshot used for counting vote. This allows to scale the + * quorum depending on values such as the totalSupply of a token at this timepoint (see {ERC20Votes}). + */ + function quorum(uint256 timepoint) public view virtual returns (uint256); + + /** + * @notice module:reputation + * @dev Voting power of an `account` at a specific `timepoint`. + * + * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or + * multiple), {ERC20Votes} tokens. + */ + function getVotes(address account, uint256 timepoint) public view virtual returns (uint256); + + /** + * @notice module:reputation + * @dev Voting power of an `account` at a specific `timepoint` given additional encoded parameters. + */ + function getVotesWithParams( + address account, + uint256 timepoint, + bytes memory params + ) public view virtual returns (uint256); + + /** + * @notice module:voting + * @dev Returns whether `account` has cast a vote on `proposalId`. + */ + function hasVoted(uint256 proposalId, address account) public view virtual returns (bool); + + /** + * @dev Create a new proposal. Vote start after a delay specified by {IGovernor-votingDelay} and lasts for a + * duration specified by {IGovernor-votingPeriod}. + * + * Emits a {ProposalCreated} event. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual returns (uint256 proposalId); + + /** + * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the + * deadline to be reached. + * + * Emits a {ProposalExecuted} event. + * + * Note: some module can modify the requirements for execution, for example by adding an additional timelock. + */ + function execute( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public payable virtual returns (uint256 proposalId); + + /** + * @dev Cancel a proposal. A proposal is cancellable by the proposer, but only while it is Pending state, i.e. + * before the vote starts. + * + * Emits a {ProposalCanceled} event. + */ + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256 proposalId); + + /** + * @dev Cast a vote + * + * Emits a {VoteCast} event. + */ + function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote with a reason + * + * Emits a {VoteCast} event. + */ + function castVoteWithReason( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote with a reason and additional encoded parameters + * + * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. + */ + function castVoteWithReasonAndParams( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params + ) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote using the user's cryptographic signature. + * + * Emits a {VoteCast} event. + */ + function castVoteBySig( + uint256 proposalId, + uint8 support, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual returns (uint256 balance); + + /** + * @dev Cast a vote with a reason and additional encoded parameters using the user's cryptographic signature. + * + * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. + */ + function castVoteWithReasonAndParamsBySig( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual returns (uint256 balance); + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc new file mode 100644 index 00000000..6d53e973 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc @@ -0,0 +1,176 @@ += Governance + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/governance + +This directory includes primitives for on-chain governance. + +== Governor + +This modular system of Governor contracts allows the deployment on-chain voting protocols similar to https://compound.finance/docs/governance[Compound's Governor Alpha & Bravo] and beyond, through the ability to easily customize multiple aspects of the protocol. + +[TIP] +==== +For a guided experience, set up your Governor contract using https://wizard.openzeppelin.com/#governor[Contracts Wizard]. + +For a written walkthrough, check out our guide on xref:ROOT:governance.adoc[How to set up on-chain governance]. +==== + +* {Governor}: The core contract that contains all the logic and primitives. It is abstract and requires choosing one of each of the modules below, or custom ones. + +Votes modules determine the source of voting power, and sometimes quorum number. + +* {GovernorVotes}: Extracts voting weight from an {ERC20Votes}, or since v4.5 an {ERC721Votes} token. + +* {GovernorVotesComp}: Extracts voting weight from a COMP-like or {ERC20VotesComp} token. + +* {GovernorVotesQuorumFraction}: Combines with `GovernorVotes` to set the quorum as a fraction of the total token supply. + +Counting modules determine valid voting options. + +* {GovernorCountingSimple}: Simple voting mechanism with 3 voting options: Against, For and Abstain. + +Timelock extensions add a delay for governance decisions to be executed. The workflow is extended to require a `queue` step before execution. With these modules, proposals are executed by the external timelock contract, thus it is the timelock that has to hold the assets that are being governed. + +* {GovernorTimelockControl}: Connects with an instance of {TimelockController}. Allows multiple proposers and executors, in addition to the Governor itself. + +* {GovernorTimelockCompound}: Connects with an instance of Compound's https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[`Timelock`] contract. + +Other extensions can customize the behavior or interface in multiple ways. + +* {GovernorCompatibilityBravo}: Extends the interface to be fully `GovernorBravo`-compatible. Note that events are compatible regardless of whether this extension is included or not. + +* {GovernorSettings}: Manages some of the settings (voting delay, voting period duration, and proposal threshold) in a way that can be updated through a governance proposal, without requiring an upgrade. + +* {GovernorPreventLateQuorum}: Ensures there is a minimum voting period after quorum is reached as a security protection against large voters. + +In addition to modules and extensions, the core contract requires a few virtual functions to be implemented to your particular specifications: + +* <>: Delay (in EIP-6372 clock) since the proposal is submitted until voting power is fixed and voting starts. This can be used to enforce a delay after a proposal is published for users to buy tokens, or delegate their votes. +* <>: Delay (in EIP-6372 clock) since the proposal starts until voting ends. +* <>: Quorum required for a proposal to be successful. This function includes a `timepoint` argument (see EIP-6372) so the quorum can adapt through time, for example, to follow a token's `totalSupply`. + +NOTE: Functions of the `Governor` contract do not include access control. If you want to restrict access, you should add these checks by overloading the particular functions. Among these, {Governor-_cancel} is internal by default, and you will have to expose it (with the right access control mechanism) yourself if this function is needed. + +=== Core + +{{IGovernor}} + +{{Governor}} + +=== Modules + +{{GovernorCountingSimple}} + +{{GovernorVotes}} + +{{GovernorVotesQuorumFraction}} + +{{GovernorVotesComp}} + +=== Extensions + +{{GovernorTimelockControl}} + +{{GovernorTimelockCompound}} + +{{GovernorSettings}} + +{{GovernorPreventLateQuorum}} + +{{GovernorCompatibilityBravo}} + +=== Deprecated + +{{GovernorProposalThreshold}} + +== Utils + +{{Votes}} + +== Timelock + +In a governance system, the {TimelockController} contract is in charge of introducing a delay between a proposal and its execution. It can be used with or without a {Governor}. + +{{TimelockController}} + +[[timelock-terminology]] +==== Terminology + +* *Operation:* A transaction (or a set of transactions) that is the subject of the timelock. It has to be scheduled by a proposer and executed by an executor. The timelock enforces a minimum delay between the proposition and the execution (see xref:access-control.adoc#operation_lifecycle[operation lifecycle]). If the operation contains multiple transactions (batch mode), they are executed atomically. Operations are identified by the hash of their content. +* *Operation status:* +** *Unset:* An operation that is not part of the timelock mechanism. +** *Pending:* An operation that has been scheduled, before the timer expires. +** *Ready:* An operation that has been scheduled, after the timer expires. +** *Done:* An operation that has been executed. +* *Predecessor*: An (optional) dependency between operations. An operation can depend on another operation (its predecessor), forcing the execution order of these two operations. +* *Role*: +** *Admin:* An address (smart contract or EOA) that is in charge of granting the roles of Proposer and Executor. +** *Proposer:* An address (smart contract or EOA) that is in charge of scheduling (and cancelling) operations. +** *Executor:* An address (smart contract or EOA) that is in charge of executing operations once the timelock has expired. This role can be given to the zero address to allow anyone to execute operations. + +[[timelock-operation]] +==== Operation structure + +Operation executed by the xref:api:governance.adoc#TimelockController[`TimelockController`] can contain one or multiple subsequent calls. Depending on whether you need to multiple calls to be executed atomically, you can either use simple or batched operations. + +Both operations contain: + +* *Target*, the address of the smart contract that the timelock should operate on. +* *Value*, in wei, that should be sent with the transaction. Most of the time this will be 0. Ether can be deposited before-end or passed along when executing the transaction. +* *Data*, containing the encoded function selector and parameters of the call. This can be produced using a number of tools. For example, a maintenance operation granting role `ROLE` to `ACCOUNT` can be encoded using web3js as follows: + +```javascript +const data = timelock.contract.methods.grantRole(ROLE, ACCOUNT).encodeABI() +``` + +* *Predecessor*, that specifies a dependency between operations. This dependency is optional. Use `bytes32(0)` if the operation does not have any dependency. +* *Salt*, used to disambiguate two otherwise identical operations. This can be any random value. + +In the case of batched operations, `target`, `value` and `data` are specified as arrays, which must be of the same length. + +[[timelock-operation-lifecycle]] +==== Operation lifecycle + +Timelocked operations are identified by a unique id (their hash) and follow a specific lifecycle: + +`Unset` -> `Pending` -> `Pending` + `Ready` -> `Done` + +* By calling xref:api:governance.adoc#TimelockController-schedule-address-uint256-bytes-bytes32-bytes32-uint256-[`schedule`] (or xref:api:governance.adoc#TimelockController-scheduleBatch-address---uint256---bytes---bytes32-bytes32-uint256-[`scheduleBatch`]), a proposer moves the operation from the `Unset` to the `Pending` state. This starts a timer that must be longer than the minimum delay. The timer expires at a timestamp accessible through the xref:api:governance.adoc#TimelockController-getTimestamp-bytes32-[`getTimestamp`] method. +* Once the timer expires, the operation automatically gets the `Ready` state. At this point, it can be executed. +* By calling xref:api:governance.adoc#TimelockController-TimelockController-execute-address-uint256-bytes-bytes32-bytes32-[`execute`] (or xref:api:governance.adoc#TimelockController-executeBatch-address---uint256---bytes---bytes32-bytes32-[`executeBatch`]), an executor triggers the operation's underlying transactions and moves it to the `Done` state. If the operation has a predecessor, it has to be in the `Done` state for this transition to succeed. +* xref:api:governance.adoc#TimelockController-TimelockController-cancel-bytes32-[`cancel`] allows proposers to cancel any `Pending` operation. This resets the operation to the `Unset` state. It is thus possible for a proposer to re-schedule an operation that has been cancelled. In this case, the timer restarts when the operation is re-scheduled. + +Operations status can be queried using the functions: + +* xref:api:governance.adoc#TimelockController-isOperationPending-bytes32-[`isOperationPending(bytes32)`] +* xref:api:governance.adoc#TimelockController-isOperationReady-bytes32-[`isOperationReady(bytes32)`] +* xref:api:governance.adoc#TimelockController-isOperationDone-bytes32-[`isOperationDone(bytes32)`] + +[[timelock-roles]] +==== Roles + +[[timelock-admin]] +===== Admin + +The admins are in charge of managing proposers and executors. For the timelock to be self-governed, this role should only be given to the timelock itself. Upon deployment, the admin role can be granted to any address (in addition to the timelock itself). After further configuration and testing, this optional admin should renounce its role such that all further maintenance operations have to go through the timelock process. + +This role is identified by the *TIMELOCK_ADMIN_ROLE* value: `0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5` + +[[timelock-proposer]] +===== Proposer + +The proposers are in charge of scheduling (and cancelling) operations. This is a critical role, that should be given to governing entities. This could be an EOA, a multisig, or a DAO. + +WARNING: *Proposer fight:* Having multiple proposers, while providing redundancy in case one becomes unavailable, can be dangerous. As proposer have their say on all operations, they could cancel operations they disagree with, including operations to remove them for the proposers. + +This role is identified by the *PROPOSER_ROLE* value: `0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1` + +[[timelock-executor]] +===== Executor + +The executors are in charge of executing the operations scheduled by the proposers once the timelock expires. Logic dictates that multisig or DAO that are proposers should also be executors in order to guarantee operations that have been scheduled will eventually be executed. However, having additional executors can reduce the cost (the executing transaction does not require validation by the multisig or DAO that proposed it), while ensuring whoever is in charge of execution cannot trigger actions that have not been scheduled by the proposers. Alternatively, it is possible to allow _any_ address to execute a proposal once the timelock has expired by granting the executor role to the zero address. + +This role is identified by the *EXECUTOR_ROLE* value: `0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63` + +WARNING: A live contract without at least one proposer and one executor is locked. Make sure these roles are filled by reliable entities before the deployer renounces its administrative rights in favour of the timelock contract itself. See the {AccessControl} documentation to learn more about role management. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerUpgradeable.sol new file mode 100644 index 00000000..de4abf21 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerUpgradeable.sol @@ -0,0 +1,434 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/TimelockController.sol) + +pragma solidity ^0.8.0; + +import "../access/AccessControlUpgradeable.sol"; +import "../token/ERC721/IERC721ReceiverUpgradeable.sol"; +import "../token/ERC1155/IERC1155ReceiverUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Contract module which acts as a timelocked controller. When set as the + * owner of an `Ownable` smart contract, it enforces a timelock on all + * `onlyOwner` maintenance operations. This gives time for users of the + * controlled contract to exit before a potentially dangerous maintenance + * operation is applied. + * + * By default, this contract is self administered, meaning administration tasks + * have to go through the timelock process. The proposer (resp executor) role + * is in charge of proposing (resp executing) operations. A common use case is + * to position this {TimelockController} as the owner of a smart contract, with + * a multisig or a DAO as the sole proposer. + * + * _Available since v3.3._ + */ +contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeable, IERC721ReceiverUpgradeable, IERC1155ReceiverUpgradeable { + bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); + bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); + bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); + bytes32 public constant CANCELLER_ROLE = keccak256("CANCELLER_ROLE"); + uint256 internal constant _DONE_TIMESTAMP = uint256(1); + + mapping(bytes32 => uint256) private _timestamps; + uint256 private _minDelay; + + /** + * @dev Emitted when a call is scheduled as part of operation `id`. + */ + event CallScheduled( + bytes32 indexed id, + uint256 indexed index, + address target, + uint256 value, + bytes data, + bytes32 predecessor, + uint256 delay + ); + + /** + * @dev Emitted when a call is performed as part of operation `id`. + */ + event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data); + + /** + * @dev Emitted when new proposal is scheduled with non-zero salt. + */ + event CallSalt(bytes32 indexed id, bytes32 salt); + + /** + * @dev Emitted when operation `id` is cancelled. + */ + event Cancelled(bytes32 indexed id); + + /** + * @dev Emitted when the minimum delay for future operations is modified. + */ + event MinDelayChange(uint256 oldDuration, uint256 newDuration); + + /** + * @dev Initializes the contract with the following parameters: + * + * - `minDelay`: initial minimum delay for operations + * - `proposers`: accounts to be granted proposer and canceller roles + * - `executors`: accounts to be granted executor role + * - `admin`: optional account to be granted admin role; disable with zero address + * + * IMPORTANT: The optional admin can aid with initial configuration of roles after deployment + * without being subject to delay, but this role should be subsequently renounced in favor of + * administration through timelocked proposals. Previous versions of this contract would assign + * this admin to the deployer automatically and should be renounced as well. + */ + function __TimelockController_init(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) internal onlyInitializing { + __TimelockController_init_unchained(minDelay, proposers, executors, admin); + } + + function __TimelockController_init_unchained(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) internal onlyInitializing { + _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE); + _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE); + _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE); + _setRoleAdmin(CANCELLER_ROLE, TIMELOCK_ADMIN_ROLE); + + // self administration + _setupRole(TIMELOCK_ADMIN_ROLE, address(this)); + + // optional admin + if (admin != address(0)) { + _setupRole(TIMELOCK_ADMIN_ROLE, admin); + } + + // register proposers and cancellers + for (uint256 i = 0; i < proposers.length; ++i) { + _setupRole(PROPOSER_ROLE, proposers[i]); + _setupRole(CANCELLER_ROLE, proposers[i]); + } + + // register executors + for (uint256 i = 0; i < executors.length; ++i) { + _setupRole(EXECUTOR_ROLE, executors[i]); + } + + _minDelay = minDelay; + emit MinDelayChange(0, minDelay); + } + + /** + * @dev Modifier to make a function callable only by a certain role. In + * addition to checking the sender's role, `address(0)` 's role is also + * considered. Granting a role to `address(0)` is equivalent to enabling + * this role for everyone. + */ + modifier onlyRoleOrOpenRole(bytes32 role) { + if (!hasRole(role, address(0))) { + _checkRole(role, _msgSender()); + } + _; + } + + /** + * @dev Contract might receive/hold ETH as part of the maintenance process. + */ + receive() external payable {} + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, AccessControlUpgradeable) returns (bool) { + return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns whether an id correspond to a registered operation. This + * includes both Pending, Ready and Done operations. + */ + function isOperation(bytes32 id) public view virtual returns (bool) { + return getTimestamp(id) > 0; + } + + /** + * @dev Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready". + */ + function isOperationPending(bytes32 id) public view virtual returns (bool) { + return getTimestamp(id) > _DONE_TIMESTAMP; + } + + /** + * @dev Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending". + */ + function isOperationReady(bytes32 id) public view virtual returns (bool) { + uint256 timestamp = getTimestamp(id); + return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp; + } + + /** + * @dev Returns whether an operation is done or not. + */ + function isOperationDone(bytes32 id) public view virtual returns (bool) { + return getTimestamp(id) == _DONE_TIMESTAMP; + } + + /** + * @dev Returns the timestamp at which an operation becomes ready (0 for + * unset operations, 1 for done operations). + */ + function getTimestamp(bytes32 id) public view virtual returns (uint256) { + return _timestamps[id]; + } + + /** + * @dev Returns the minimum delay for an operation to become valid. + * + * This value can be changed by executing an operation that calls `updateDelay`. + */ + function getMinDelay() public view virtual returns (uint256) { + return _minDelay; + } + + /** + * @dev Returns the identifier of an operation containing a single + * transaction. + */ + function hashOperation( + address target, + uint256 value, + bytes calldata data, + bytes32 predecessor, + bytes32 salt + ) public pure virtual returns (bytes32) { + return keccak256(abi.encode(target, value, data, predecessor, salt)); + } + + /** + * @dev Returns the identifier of an operation containing a batch of + * transactions. + */ + function hashOperationBatch( + address[] calldata targets, + uint256[] calldata values, + bytes[] calldata payloads, + bytes32 predecessor, + bytes32 salt + ) public pure virtual returns (bytes32) { + return keccak256(abi.encode(targets, values, payloads, predecessor, salt)); + } + + /** + * @dev Schedule an operation containing a single transaction. + * + * Emits {CallSalt} if salt is nonzero, and {CallScheduled}. + * + * Requirements: + * + * - the caller must have the 'proposer' role. + */ + function schedule( + address target, + uint256 value, + bytes calldata data, + bytes32 predecessor, + bytes32 salt, + uint256 delay + ) public virtual onlyRole(PROPOSER_ROLE) { + bytes32 id = hashOperation(target, value, data, predecessor, salt); + _schedule(id, delay); + emit CallScheduled(id, 0, target, value, data, predecessor, delay); + if (salt != bytes32(0)) { + emit CallSalt(id, salt); + } + } + + /** + * @dev Schedule an operation containing a batch of transactions. + * + * Emits {CallSalt} if salt is nonzero, and one {CallScheduled} event per transaction in the batch. + * + * Requirements: + * + * - the caller must have the 'proposer' role. + */ + function scheduleBatch( + address[] calldata targets, + uint256[] calldata values, + bytes[] calldata payloads, + bytes32 predecessor, + bytes32 salt, + uint256 delay + ) public virtual onlyRole(PROPOSER_ROLE) { + require(targets.length == values.length, "TimelockController: length mismatch"); + require(targets.length == payloads.length, "TimelockController: length mismatch"); + + bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); + _schedule(id, delay); + for (uint256 i = 0; i < targets.length; ++i) { + emit CallScheduled(id, i, targets[i], values[i], payloads[i], predecessor, delay); + } + if (salt != bytes32(0)) { + emit CallSalt(id, salt); + } + } + + /** + * @dev Schedule an operation that is to become valid after a given delay. + */ + function _schedule(bytes32 id, uint256 delay) private { + require(!isOperation(id), "TimelockController: operation already scheduled"); + require(delay >= getMinDelay(), "TimelockController: insufficient delay"); + _timestamps[id] = block.timestamp + delay; + } + + /** + * @dev Cancel an operation. + * + * Requirements: + * + * - the caller must have the 'canceller' role. + */ + function cancel(bytes32 id) public virtual onlyRole(CANCELLER_ROLE) { + require(isOperationPending(id), "TimelockController: operation cannot be cancelled"); + delete _timestamps[id]; + + emit Cancelled(id); + } + + /** + * @dev Execute an (ready) operation containing a single transaction. + * + * Emits a {CallExecuted} event. + * + * Requirements: + * + * - the caller must have the 'executor' role. + */ + // This function can reenter, but it doesn't pose a risk because _afterCall checks that the proposal is pending, + // thus any modifications to the operation during reentrancy should be caught. + // slither-disable-next-line reentrancy-eth + function execute( + address target, + uint256 value, + bytes calldata payload, + bytes32 predecessor, + bytes32 salt + ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { + bytes32 id = hashOperation(target, value, payload, predecessor, salt); + + _beforeCall(id, predecessor); + _execute(target, value, payload); + emit CallExecuted(id, 0, target, value, payload); + _afterCall(id); + } + + /** + * @dev Execute an (ready) operation containing a batch of transactions. + * + * Emits one {CallExecuted} event per transaction in the batch. + * + * Requirements: + * + * - the caller must have the 'executor' role. + */ + // This function can reenter, but it doesn't pose a risk because _afterCall checks that the proposal is pending, + // thus any modifications to the operation during reentrancy should be caught. + // slither-disable-next-line reentrancy-eth + function executeBatch( + address[] calldata targets, + uint256[] calldata values, + bytes[] calldata payloads, + bytes32 predecessor, + bytes32 salt + ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { + require(targets.length == values.length, "TimelockController: length mismatch"); + require(targets.length == payloads.length, "TimelockController: length mismatch"); + + bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); + + _beforeCall(id, predecessor); + for (uint256 i = 0; i < targets.length; ++i) { + address target = targets[i]; + uint256 value = values[i]; + bytes calldata payload = payloads[i]; + _execute(target, value, payload); + emit CallExecuted(id, i, target, value, payload); + } + _afterCall(id); + } + + /** + * @dev Execute an operation's call. + */ + function _execute(address target, uint256 value, bytes calldata data) internal virtual { + (bool success, ) = target.call{value: value}(data); + require(success, "TimelockController: underlying transaction reverted"); + } + + /** + * @dev Checks before execution of an operation's calls. + */ + function _beforeCall(bytes32 id, bytes32 predecessor) private view { + require(isOperationReady(id), "TimelockController: operation is not ready"); + require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency"); + } + + /** + * @dev Checks after execution of an operation's calls. + */ + function _afterCall(bytes32 id) private { + require(isOperationReady(id), "TimelockController: operation is not ready"); + _timestamps[id] = _DONE_TIMESTAMP; + } + + /** + * @dev Changes the minimum timelock duration for future operations. + * + * Emits a {MinDelayChange} event. + * + * Requirements: + * + * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing + * an operation where the timelock is the target and the data is the ABI-encoded call to this function. + */ + function updateDelay(uint256 newDelay) external virtual { + require(msg.sender == address(this), "TimelockController: caller must be timelock"); + emit MinDelayChange(_minDelay, newDelay); + _minDelay = newDelay; + } + + /** + * @dev See {IERC721Receiver-onERC721Received}. + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + return this.onERC721Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155Received}. + */ + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + */ + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155BatchReceived.selector; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol new file mode 100644 index 00000000..c24ddf52 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.6.0 (governance/TimelockControllerWith46Migration.sol) + +pragma solidity ^0.8.0; + +import "./TimelockControllerUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of the TimelockController that includes an additional + * function to migrate from OpenZeppelin Upgradeable Contracts <4.6 to >=4.6. + * + * This migration is necessary to setup administration rights over the new + * `CANCELLER_ROLE`. + * + * The migration is trustless and can be performed by anyone. + * + * _Available since v4.6._ + */ +contract TimelockControllerWith46MigrationUpgradeable is Initializable, TimelockControllerUpgradeable { + function __TimelockControllerWith46Migration_init( + uint256 minDelay, + address[] memory proposers, + address[] memory executors, + address admin + ) internal onlyInitializing { + __TimelockController_init_unchained(minDelay, proposers, executors, admin); + } + + function __TimelockControllerWith46Migration_init_unchained( + uint256, + address[] memory, + address[] memory, + address + ) internal onlyInitializing {} + + /** + * @dev Migration function. Running it is necessary for upgradeable + * instances that were initially setup with code <4.6 and that upgraded + * to >=4.6. + */ + function migrateTo46() public virtual { + require( + getRoleAdmin(PROPOSER_ROLE) == TIMELOCK_ADMIN_ROLE && getRoleAdmin(CANCELLER_ROLE) == DEFAULT_ADMIN_ROLE, + "TimelockController: already migrated" + ); + _setRoleAdmin(CANCELLER_ROLE, TIMELOCK_ADMIN_ROLE); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol new file mode 100644 index 00000000..09e9e820 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol @@ -0,0 +1,346 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/GovernorCompatibilityBravo.sol) + +pragma solidity ^0.8.0; + +import "../../utils/math/SafeCastUpgradeable.sol"; +import "../extensions/IGovernorTimelockUpgradeable.sol"; +import "../GovernorUpgradeable.sol"; +import "./IGovernorCompatibilityBravoUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Compatibility layer that implements GovernorBravo compatibility on top of {Governor}. + * + * This compatibility layer includes a voting system and requires a {IGovernorTimelock} compatible module to be added + * through inheritance. It does not include token bindings, nor does it include any variable upgrade patterns. + * + * NOTE: When using this module, you may need to enable the Solidity optimizer to avoid hitting the contract size limit. + * + * _Available since v4.3._ + */ +abstract contract GovernorCompatibilityBravoUpgradeable is Initializable, IGovernorTimelockUpgradeable, IGovernorCompatibilityBravoUpgradeable, GovernorUpgradeable { + enum VoteType { + Against, + For, + Abstain + } + + struct ProposalDetails { + address proposer; + address[] targets; + uint256[] values; + string[] signatures; + bytes[] calldatas; + uint256 forVotes; + uint256 againstVotes; + uint256 abstainVotes; + mapping(address => Receipt) receipts; + bytes32 descriptionHash; + } + + mapping(uint256 => ProposalDetails) private _proposalDetails; + + function __GovernorCompatibilityBravo_init() internal onlyInitializing { + } + + function __GovernorCompatibilityBravo_init_unchained() internal onlyInitializing { + } + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo&quorum=bravo"; + } + + // ============================================== Proposal lifecycle ============================================== + /** + * @dev See {IGovernor-propose}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (uint256) { + // Stores the proposal details (if not already present) and executes the propose logic from the core. + _storeProposal(_msgSender(), targets, values, new string[](calldatas.length), calldatas, description); + return super.propose(targets, values, calldatas, description); + } + + /** + * @dev See {IGovernorCompatibilityBravo-propose}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + require(signatures.length == calldatas.length, "GovernorBravo: invalid signatures length"); + // Stores the full proposal and fallback to the public (possibly overridden) propose. The fallback is done + // after the full proposal is stored, so the store operation included in the fallback will be skipped. Here we + // call `propose` and not `super.propose` to make sure if a child contract override `propose`, whatever code + // is added there is also executed when calling this alternative interface. + _storeProposal(_msgSender(), targets, values, signatures, calldatas, description); + return propose(targets, values, _encodeCalldata(signatures, calldatas), description); + } + + /** + * @dev See {IGovernorCompatibilityBravo-queue}. + */ + function queue(uint256 proposalId) public virtual override { + ( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) = _getProposalParameters(proposalId); + + queue(targets, values, calldatas, descriptionHash); + } + + /** + * @dev See {IGovernorCompatibilityBravo-execute}. + */ + function execute(uint256 proposalId) public payable virtual override { + ( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) = _getProposalParameters(proposalId); + + execute(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Cancel a proposal with GovernorBravo logic. + */ + function cancel(uint256 proposalId) public virtual override { + ( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) = _getProposalParameters(proposalId); + + cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Cancel a proposal with GovernorBravo logic. At any moment a proposal can be cancelled, either by the + * proposer, or by third parties if the proposer's voting power has dropped below the proposal threshold. + */ + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + address proposer = _proposalDetails[proposalId].proposer; + + require( + _msgSender() == proposer || getVotes(proposer, clock() - 1) < proposalThreshold(), + "GovernorBravo: proposer above threshold" + ); + + return _cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Encodes calldatas with optional function signature. + */ + function _encodeCalldata( + string[] memory signatures, + bytes[] memory calldatas + ) private pure returns (bytes[] memory) { + bytes[] memory fullcalldatas = new bytes[](calldatas.length); + for (uint256 i = 0; i < fullcalldatas.length; ++i) { + fullcalldatas[i] = bytes(signatures[i]).length == 0 + ? calldatas[i] + : abi.encodePacked(bytes4(keccak256(bytes(signatures[i]))), calldatas[i]); + } + + return fullcalldatas; + } + + /** + * @dev Retrieve proposal parameters by id, with fully encoded calldatas. + */ + function _getProposalParameters( + uint256 proposalId + ) + private + view + returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash) + { + ProposalDetails storage details = _proposalDetails[proposalId]; + return ( + details.targets, + details.values, + _encodeCalldata(details.signatures, details.calldatas), + details.descriptionHash + ); + } + + /** + * @dev Store proposal metadata (if not already present) for later lookup. + */ + function _storeProposal( + address proposer, + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) private { + bytes32 descriptionHash = keccak256(bytes(description)); + uint256 proposalId = hashProposal(targets, values, _encodeCalldata(signatures, calldatas), descriptionHash); + + ProposalDetails storage details = _proposalDetails[proposalId]; + if (details.descriptionHash == bytes32(0)) { + details.proposer = proposer; + details.targets = targets; + details.values = values; + details.signatures = signatures; + details.calldatas = calldatas; + details.descriptionHash = descriptionHash; + } + } + + // ==================================================== Views ===================================================== + /** + * @dev See {IGovernorCompatibilityBravo-proposals}. + */ + function proposals( + uint256 proposalId + ) + public + view + virtual + override + returns ( + uint256 id, + address proposer, + uint256 eta, + uint256 startBlock, + uint256 endBlock, + uint256 forVotes, + uint256 againstVotes, + uint256 abstainVotes, + bool canceled, + bool executed + ) + { + id = proposalId; + eta = proposalEta(proposalId); + startBlock = proposalSnapshot(proposalId); + endBlock = proposalDeadline(proposalId); + + ProposalDetails storage details = _proposalDetails[proposalId]; + proposer = details.proposer; + forVotes = details.forVotes; + againstVotes = details.againstVotes; + abstainVotes = details.abstainVotes; + + ProposalState currentState = state(proposalId); + canceled = currentState == ProposalState.Canceled; + executed = currentState == ProposalState.Executed; + } + + /** + * @dev See {IGovernorCompatibilityBravo-getActions}. + */ + function getActions( + uint256 proposalId + ) + public + view + virtual + override + returns ( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas + ) + { + ProposalDetails storage details = _proposalDetails[proposalId]; + return (details.targets, details.values, details.signatures, details.calldatas); + } + + /** + * @dev See {IGovernorCompatibilityBravo-getReceipt}. + */ + function getReceipt(uint256 proposalId, address voter) public view virtual override returns (Receipt memory) { + return _proposalDetails[proposalId].receipts[voter]; + } + + /** + * @dev See {IGovernorCompatibilityBravo-quorumVotes}. + */ + function quorumVotes() public view virtual override returns (uint256) { + return quorum(clock() - 1); + } + + // ==================================================== Voting ==================================================== + /** + * @dev See {IGovernor-hasVoted}. + */ + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + return _proposalDetails[proposalId].receipts[account].hasVoted; + } + + /** + * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum. + */ + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + ProposalDetails storage details = _proposalDetails[proposalId]; + return quorum(proposalSnapshot(proposalId)) <= details.forVotes; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + ProposalDetails storage details = _proposalDetails[proposalId]; + return details.forVotes > details.againstVotes; + } + + /** + * @dev See {Governor-_countVote}. In this module, the support follows Governor Bravo. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 weight, + bytes memory // params + ) internal virtual override { + ProposalDetails storage details = _proposalDetails[proposalId]; + Receipt storage receipt = details.receipts[account]; + + require(!receipt.hasVoted, "GovernorCompatibilityBravo: vote already cast"); + receipt.hasVoted = true; + receipt.support = support; + receipt.votes = SafeCastUpgradeable.toUint96(weight); + + if (support == uint8(VoteType.Against)) { + details.againstVotes += weight; + } else if (support == uint8(VoteType.For)) { + details.forVotes += weight; + } else if (support == uint8(VoteType.Abstain)) { + details.abstainVotes += weight; + } else { + revert("GovernorCompatibilityBravo: invalid vote type"); + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol new file mode 100644 index 00000000..e2c309e2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/IGovernorCompatibilityBravo.sol) + +pragma solidity ^0.8.0; + +import "../IGovernorUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility. + * + * _Available since v4.3._ + */ +abstract contract IGovernorCompatibilityBravoUpgradeable is Initializable, IGovernorUpgradeable { + /** + * @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as + * {{proposal}} returns a very different structure. + */ + struct Proposal { + uint256 id; + address proposer; + uint256 eta; + address[] targets; + uint256[] values; + string[] signatures; + bytes[] calldatas; + uint256 startBlock; + uint256 endBlock; + uint256 forVotes; + uint256 againstVotes; + uint256 abstainVotes; + bool canceled; + bool executed; + mapping(address => Receipt) receipts; + } + + /** + * @dev Receipt structure from Compound Governor Bravo + */ + struct Receipt { + bool hasVoted; + uint8 support; + uint96 votes; + } + + function __IGovernorCompatibilityBravo_init() internal onlyInitializing { + } + + function __IGovernorCompatibilityBravo_init_unchained() internal onlyInitializing { + } + /** + * @dev Part of the Governor Bravo's interface. + */ + function quorumVotes() public view virtual returns (uint256); + + /** + * @dev Part of the Governor Bravo's interface: _"The official record of all proposals ever proposed"_. + */ + function proposals( + uint256 + ) + public + view + virtual + returns ( + uint256 id, + address proposer, + uint256 eta, + uint256 startBlock, + uint256 endBlock, + uint256 forVotes, + uint256 againstVotes, + uint256 abstainVotes, + bool canceled, + bool executed + ); + + /** + * @dev Part of the Governor Bravo's interface: _"Function used to propose a new proposal"_. + */ + function propose( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) public virtual returns (uint256); + + /** + * @dev Part of the Governor Bravo's interface: _"Queues a proposal of state succeeded"_. + */ + function queue(uint256 proposalId) public virtual; + + /** + * @dev Part of the Governor Bravo's interface: _"Executes a queued proposal if eta has passed"_. + */ + function execute(uint256 proposalId) public payable virtual; + + /** + * @dev Cancels a proposal only if the sender is the proposer or the proposer delegates' voting power dropped below the proposal threshold. + */ + function cancel(uint256 proposalId) public virtual; + + /** + * @dev Part of the Governor Bravo's interface: _"Gets actions of a proposal"_. + */ + function getActions( + uint256 proposalId + ) + public + view + virtual + returns ( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas + ); + + /** + * @dev Part of the Governor Bravo's interface: _"Gets the receipt for a voter on a given proposal"_. + */ + function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory); + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol new file mode 100644 index 00000000..6a7f58e9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorCountingSimple.sol) + +pragma solidity ^0.8.0; + +import "../GovernorUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for simple, 3 options, vote counting. + * + * _Available since v4.3._ + */ +abstract contract GovernorCountingSimpleUpgradeable is Initializable, GovernorUpgradeable { + /** + * @dev Supported vote types. Matches Governor Bravo ordering. + */ + enum VoteType { + Against, + For, + Abstain + } + + struct ProposalVote { + uint256 againstVotes; + uint256 forVotes; + uint256 abstainVotes; + mapping(address => bool) hasVoted; + } + + mapping(uint256 => ProposalVote) private _proposalVotes; + + function __GovernorCountingSimple_init() internal onlyInitializing { + } + + function __GovernorCountingSimple_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IGovernor-COUNTING_MODE}. + */ + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo&quorum=for,abstain"; + } + + /** + * @dev See {IGovernor-hasVoted}. + */ + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + return _proposalVotes[proposalId].hasVoted[account]; + } + + /** + * @dev Accessor to the internal vote counts. + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); + } + + /** + * @dev See {Governor-_quorumReached}. + */ + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + return proposalVote.forVotes > proposalVote.againstVotes; + } + + /** + * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo). + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 weight, + bytes memory // params + ) internal virtual override { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + require(!proposalVote.hasVoted[account], "GovernorVotingSimple: vote already cast"); + proposalVote.hasVoted[account] = true; + + if (support == uint8(VoteType.Against)) { + proposalVote.againstVotes += weight; + } else if (support == uint8(VoteType.For)) { + proposalVote.forVotes += weight; + } else if (support == uint8(VoteType.Abstain)) { + proposalVote.abstainVotes += weight; + } else { + revert("GovernorVotingSimple: invalid value for enum VoteType"); + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol new file mode 100644 index 00000000..493ffea3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorPreventLateQuorum.sol) + +pragma solidity ^0.8.0; + +import "../GovernorUpgradeable.sol"; +import "../../utils/math/MathUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev A module that ensures there is a minimum voting period after quorum is reached. This prevents a large voter from + * swaying a vote and triggering quorum at the last minute, by ensuring there is always time for other voters to react + * and try to oppose the decision. + * + * If a vote causes quorum to be reached, the proposal's voting period may be extended so that it does not end before at + * least a specified time has passed (the "vote extension" parameter). This parameter can be set through a governance + * proposal. + * + * _Available since v4.5._ + */ +abstract contract GovernorPreventLateQuorumUpgradeable is Initializable, GovernorUpgradeable { + uint64 private _voteExtension; + + /// @custom:oz-retyped-from mapping(uint256 => Timers.BlockNumber) + mapping(uint256 => uint64) private _extendedDeadlines; + + /// @dev Emitted when a proposal deadline is pushed back due to reaching quorum late in its voting period. + event ProposalExtended(uint256 indexed proposalId, uint64 extendedDeadline); + + /// @dev Emitted when the {lateQuorumVoteExtension} parameter is changed. + event LateQuorumVoteExtensionSet(uint64 oldVoteExtension, uint64 newVoteExtension); + + /** + * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the governor + * clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period ends. If + * necessary the voting period will be extended beyond the one set during proposal creation. + */ + function __GovernorPreventLateQuorum_init(uint64 initialVoteExtension) internal onlyInitializing { + __GovernorPreventLateQuorum_init_unchained(initialVoteExtension); + } + + function __GovernorPreventLateQuorum_init_unchained(uint64 initialVoteExtension) internal onlyInitializing { + _setLateQuorumVoteExtension(initialVoteExtension); + } + + /** + * @dev Returns the proposal deadline, which may have been extended beyond that set at proposal creation, if the + * proposal reached quorum late in the voting period. See {Governor-proposalDeadline}. + */ + function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { + return MathUpgradeable.max(super.proposalDeadline(proposalId), _extendedDeadlines[proposalId]); + } + + /** + * @dev Casts a vote and detects if it caused quorum to be reached, potentially extending the voting period. See + * {Governor-_castVote}. + * + * May emit a {ProposalExtended} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason, + bytes memory params + ) internal virtual override returns (uint256) { + uint256 result = super._castVote(proposalId, account, support, reason, params); + + if (_extendedDeadlines[proposalId] == 0 && _quorumReached(proposalId)) { + uint64 extendedDeadline = clock() + lateQuorumVoteExtension(); + + if (extendedDeadline > proposalDeadline(proposalId)) { + emit ProposalExtended(proposalId, extendedDeadline); + } + + _extendedDeadlines[proposalId] = extendedDeadline; + } + + return result; + } + + /** + * @dev Returns the current value of the vote extension parameter: the number of blocks that are required to pass + * from the time a proposal reaches quorum until its voting period ends. + */ + function lateQuorumVoteExtension() public view virtual returns (uint64) { + return _voteExtension; + } + + /** + * @dev Changes the {lateQuorumVoteExtension}. This operation can only be performed by the governance executor, + * generally through a governance proposal. + * + * Emits a {LateQuorumVoteExtensionSet} event. + */ + function setLateQuorumVoteExtension(uint64 newVoteExtension) public virtual onlyGovernance { + _setLateQuorumVoteExtension(newVoteExtension); + } + + /** + * @dev Changes the {lateQuorumVoteExtension}. This is an internal function that can be exposed in a public function + * like {setLateQuorumVoteExtension} if another access control mechanism is needed. + * + * Emits a {LateQuorumVoteExtensionSet} event. + */ + function _setLateQuorumVoteExtension(uint64 newVoteExtension) internal virtual { + emit LateQuorumVoteExtensionSet(_voteExtension, newVoteExtension); + _voteExtension = newVoteExtension; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol new file mode 100644 index 00000000..6b266cda --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorProposalThreshold.sol) + +pragma solidity ^0.8.0; + +import "../GovernorUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance. + * + * _Available since v4.3._ + * _Deprecated since v4.4._ + */ +abstract contract GovernorProposalThresholdUpgradeable is Initializable, GovernorUpgradeable { + function __GovernorProposalThreshold_init() internal onlyInitializing { + } + + function __GovernorProposalThreshold_init_unchained() internal onlyInitializing { + } + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + return super.propose(targets, values, calldatas, description); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol new file mode 100644 index 00000000..6d95992a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorSettings.sol) + +pragma solidity ^0.8.0; + +import "../GovernorUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for settings updatable through governance. + * + * _Available since v4.4._ + */ +abstract contract GovernorSettingsUpgradeable is Initializable, GovernorUpgradeable { + uint256 private _votingDelay; + uint256 private _votingPeriod; + uint256 private _proposalThreshold; + + event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay); + event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod); + event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold); + + /** + * @dev Initialize the governance parameters. + */ + function __GovernorSettings_init(uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold) internal onlyInitializing { + __GovernorSettings_init_unchained(initialVotingDelay, initialVotingPeriod, initialProposalThreshold); + } + + function __GovernorSettings_init_unchained(uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold) internal onlyInitializing { + _setVotingDelay(initialVotingDelay); + _setVotingPeriod(initialVotingPeriod); + _setProposalThreshold(initialProposalThreshold); + } + + /** + * @dev See {IGovernor-votingDelay}. + */ + function votingDelay() public view virtual override returns (uint256) { + return _votingDelay; + } + + /** + * @dev See {IGovernor-votingPeriod}. + */ + function votingPeriod() public view virtual override returns (uint256) { + return _votingPeriod; + } + + /** + * @dev See {Governor-proposalThreshold}. + */ + function proposalThreshold() public view virtual override returns (uint256) { + return _proposalThreshold; + } + + /** + * @dev Update the voting delay. This operation can only be performed through a governance proposal. + * + * Emits a {VotingDelaySet} event. + */ + function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance { + _setVotingDelay(newVotingDelay); + } + + /** + * @dev Update the voting period. This operation can only be performed through a governance proposal. + * + * Emits a {VotingPeriodSet} event. + */ + function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance { + _setVotingPeriod(newVotingPeriod); + } + + /** + * @dev Update the proposal threshold. This operation can only be performed through a governance proposal. + * + * Emits a {ProposalThresholdSet} event. + */ + function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance { + _setProposalThreshold(newProposalThreshold); + } + + /** + * @dev Internal setter for the voting delay. + * + * Emits a {VotingDelaySet} event. + */ + function _setVotingDelay(uint256 newVotingDelay) internal virtual { + emit VotingDelaySet(_votingDelay, newVotingDelay); + _votingDelay = newVotingDelay; + } + + /** + * @dev Internal setter for the voting period. + * + * Emits a {VotingPeriodSet} event. + */ + function _setVotingPeriod(uint256 newVotingPeriod) internal virtual { + // voting period must be at least one block long + require(newVotingPeriod > 0, "GovernorSettings: voting period too low"); + emit VotingPeriodSet(_votingPeriod, newVotingPeriod); + _votingPeriod = newVotingPeriod; + } + + /** + * @dev Internal setter for the proposal threshold. + * + * Emits a {ProposalThresholdSet} event. + */ + function _setProposalThreshold(uint256 newProposalThreshold) internal virtual { + emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold); + _proposalThreshold = newProposalThreshold; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[47] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol new file mode 100644 index 00000000..0032b66a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol @@ -0,0 +1,202 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockCompound.sol) + +pragma solidity ^0.8.0; + +import "./IGovernorTimelockUpgradeable.sol"; +import "../GovernorUpgradeable.sol"; +import "../../utils/math/SafeCastUpgradeable.sol"; +import "../../vendor/compound/ICompoundTimelockUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by + * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be + * the admin of the timelock for any operation to be performed. A public, unrestricted, + * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock. + * + * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, + * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be + * inaccessible. + * + * _Available since v4.3._ + */ +abstract contract GovernorTimelockCompoundUpgradeable is Initializable, IGovernorTimelockUpgradeable, GovernorUpgradeable { + ICompoundTimelockUpgradeable private _timelock; + + /// @custom:oz-retyped-from mapping(uint256 => GovernorTimelockCompound.ProposalTimelock) + mapping(uint256 => uint64) private _proposalTimelocks; + + /** + * @dev Emitted when the timelock controller used for proposal execution is modified. + */ + event TimelockChange(address oldTimelock, address newTimelock); + + /** + * @dev Set the timelock. + */ + function __GovernorTimelockCompound_init(ICompoundTimelockUpgradeable timelockAddress) internal onlyInitializing { + __GovernorTimelockCompound_init_unchained(timelockAddress); + } + + function __GovernorTimelockCompound_init_unchained(ICompoundTimelockUpgradeable timelockAddress) internal onlyInitializing { + _updateTimelock(timelockAddress); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, GovernorUpgradeable) returns (bool) { + return interfaceId == type(IGovernorTimelockUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Overridden version of the {Governor-state} function with added support for the `Queued` and `Expired` state. + */ + function state(uint256 proposalId) public view virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (ProposalState) { + ProposalState currentState = super.state(proposalId); + + if (currentState != ProposalState.Succeeded) { + return currentState; + } + + uint256 eta = proposalEta(proposalId); + if (eta == 0) { + return currentState; + } else if (block.timestamp >= eta + _timelock.GRACE_PERIOD()) { + return ProposalState.Expired; + } else { + return ProposalState.Queued; + } + } + + /** + * @dev Public accessor to check the address of the timelock + */ + function timelock() public view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Public accessor to check the eta of a queued proposal + */ + function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { + return _proposalTimelocks[proposalId]; + } + + /** + * @dev Function to queue a proposal to the timelock. + */ + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); + + uint256 eta = block.timestamp + _timelock.delay(); + _proposalTimelocks[proposalId] = SafeCastUpgradeable.toUint64(eta); + + for (uint256 i = 0; i < targets.length; ++i) { + require( + !_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], eta))), + "GovernorTimelockCompound: identical proposal action already queued" + ); + _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], eta); + } + + emit ProposalQueued(proposalId, eta); + + return proposalId; + } + + /** + * @dev Overridden execute function that run the already queued proposal through the timelock. + */ + function _execute( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual override { + uint256 eta = proposalEta(proposalId); + require(eta > 0, "GovernorTimelockCompound: proposal not yet queued"); + AddressUpgradeable.sendValue(payable(_timelock), msg.value); + for (uint256 i = 0; i < targets.length; ++i) { + _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta); + } + } + + /** + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * been queued. + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + uint256 eta = proposalEta(proposalId); + if (eta > 0) { + // update state first + delete _proposalTimelocks[proposalId]; + // do external call later + for (uint256 i = 0; i < targets.length; ++i) { + _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], eta); + } + } + + return proposalId; + } + + /** + * @dev Address through which the governor executes action. In this case, the timelock. + */ + function _executor() internal view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Accept admin right over the timelock. + */ + // solhint-disable-next-line private-vars-leading-underscore + function __acceptAdmin() public { + _timelock.acceptAdmin(); + } + + /** + * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates + * must be proposed, scheduled, and executed through governance proposals. + * + * For security reasons, the timelock must be handed over to another admin before setting up a new one. The two + * operations (hand over the timelock) and do the update can be batched in a single proposal. + * + * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the + * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of + * governance. + + * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. + */ + function updateTimelock(ICompoundTimelockUpgradeable newTimelock) external virtual onlyGovernance { + _updateTimelock(newTimelock); + } + + function _updateTimelock(ICompoundTimelockUpgradeable newTimelock) private { + emit TimelockChange(address(_timelock), address(newTimelock)); + _timelock = newTimelock; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol new file mode 100644 index 00000000..2112d19e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol @@ -0,0 +1,178 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockControl.sol) + +pragma solidity ^0.8.0; + +import "./IGovernorTimelockUpgradeable.sol"; +import "../GovernorUpgradeable.sol"; +import "../TimelockControllerUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a + * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The + * {Governor} needs the proposer (and ideally the executor) roles for the {Governor} to work properly. + * + * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, + * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be + * inaccessible. + * + * WARNING: Setting up the TimelockController to have additional proposers besides the governor is very risky, as it + * grants them powers that they must be trusted or known not to use: 1) {onlyGovernance} functions like {relay} are + * available to them through the timelock, and 2) approved governance proposals can be blocked by them, effectively + * executing a Denial of Service attack. This risk will be mitigated in a future release. + * + * _Available since v4.3._ + */ +abstract contract GovernorTimelockControlUpgradeable is Initializable, IGovernorTimelockUpgradeable, GovernorUpgradeable { + TimelockControllerUpgradeable private _timelock; + mapping(uint256 => bytes32) private _timelockIds; + + /** + * @dev Emitted when the timelock controller used for proposal execution is modified. + */ + event TimelockChange(address oldTimelock, address newTimelock); + + /** + * @dev Set the timelock. + */ + function __GovernorTimelockControl_init(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing { + __GovernorTimelockControl_init_unchained(timelockAddress); + } + + function __GovernorTimelockControl_init_unchained(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing { + _updateTimelock(timelockAddress); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, GovernorUpgradeable) returns (bool) { + return interfaceId == type(IGovernorTimelockUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Overridden version of the {Governor-state} function with added support for the `Queued` state. + */ + function state(uint256 proposalId) public view virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (ProposalState) { + ProposalState currentState = super.state(proposalId); + + if (currentState != ProposalState.Succeeded) { + return currentState; + } + + // core tracks execution, so we just have to check if successful proposal have been queued. + bytes32 queueid = _timelockIds[proposalId]; + if (queueid == bytes32(0)) { + return currentState; + } else if (_timelock.isOperationDone(queueid)) { + return ProposalState.Executed; + } else if (_timelock.isOperationPending(queueid)) { + return ProposalState.Queued; + } else { + return ProposalState.Canceled; + } + } + + /** + * @dev Public accessor to check the address of the timelock + */ + function timelock() public view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Public accessor to check the eta of a queued proposal + */ + function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { + uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]); + return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value + } + + /** + * @dev Function to queue a proposal to the timelock. + */ + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual override returns (uint256) { + uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); + + require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); + + uint256 delay = _timelock.getMinDelay(); + _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash); + _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay); + + emit ProposalQueued(proposalId, block.timestamp + delay); + + return proposalId; + } + + /** + * @dev Overridden execute function that run the already queued proposal through the timelock. + */ + function _execute( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override { + _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash); + } + + /** + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * been queued. + */ + // This function can reenter through the external call to the timelock, but we assume the timelock is trusted and + // well behaved (according to TimelockController) and this will not happen. + // slither-disable-next-line reentrancy-no-eth + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + if (_timelockIds[proposalId] != 0) { + _timelock.cancel(_timelockIds[proposalId]); + delete _timelockIds[proposalId]; + } + + return proposalId; + } + + /** + * @dev Address through which the governor executes action. In this case, the timelock. + */ + function _executor() internal view virtual override returns (address) { + return address(_timelock); + } + + /** + * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates + * must be proposed, scheduled, and executed through governance proposals. + * + * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. + */ + function updateTimelock(TimelockControllerUpgradeable newTimelock) external virtual onlyGovernance { + _updateTimelock(newTimelock); + } + + function _updateTimelock(TimelockControllerUpgradeable newTimelock) private { + emit TimelockChange(address(_timelock), address(newTimelock)); + _timelock = newTimelock; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol new file mode 100644 index 00000000..7ef657ab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesComp.sol) + +pragma solidity ^0.8.0; + +import "../GovernorUpgradeable.sol"; +import "../../token/ERC20/extensions/ERC20VotesCompUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from a Comp token. + * + * _Available since v4.3._ + * + * @custom:storage-size 51 + */ +abstract contract GovernorVotesCompUpgradeable is Initializable, GovernorUpgradeable { + ERC20VotesCompUpgradeable public token; + + function __GovernorVotesComp_init(ERC20VotesCompUpgradeable token_) internal onlyInitializing { + __GovernorVotesComp_init_unchained(token_); + } + + function __GovernorVotesComp_init_unchained(ERC20VotesCompUpgradeable token_) internal onlyInitializing { + token = token_; + } + + /** + * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token + * does not implement EIP-6372. + */ + function clock() public view virtual override returns (uint48) { + try token.clock() returns (uint48 timepoint) { + return timepoint; + } catch { + return SafeCastUpgradeable.toUint48(block.number); + } + } + + /** + * @dev Machine-readable description of the clock as specified in EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + try token.CLOCK_MODE() returns (string memory clockmode) { + return clockmode; + } catch { + return "mode=blocknumber&from=default"; + } + } + + /** + * Read the voting weight from the token's built-in snapshot mechanism (see {Governor-_getVotes}). + */ + function _getVotes( + address account, + uint256 timepoint, + bytes memory /*params*/ + ) internal view virtual override returns (uint256) { + return token.getPriorVotes(account, timepoint); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol new file mode 100644 index 00000000..80c09f5f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesQuorumFraction.sol) + +pragma solidity ^0.8.0; + +import "./GovernorVotesUpgradeable.sol"; +import "../../utils/CheckpointsUpgradeable.sol"; +import "../../utils/math/SafeCastUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a + * fraction of the total supply. + * + * _Available since v4.3._ + */ +abstract contract GovernorVotesQuorumFractionUpgradeable is Initializable, GovernorVotesUpgradeable { + using CheckpointsUpgradeable for CheckpointsUpgradeable.Trace224; + + uint256 private _quorumNumerator; // DEPRECATED in favor of _quorumNumeratorHistory + + /// @custom:oz-retyped-from Checkpoints.History + CheckpointsUpgradeable.Trace224 private _quorumNumeratorHistory; + + event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator); + + /** + * @dev Initialize quorum as a fraction of the token's total supply. + * + * The fraction is specified as `numerator / denominator`. By default the denominator is 100, so quorum is + * specified as a percent: a numerator of 10 corresponds to quorum being 10% of total supply. The denominator can be + * customized by overriding {quorumDenominator}. + */ + function __GovernorVotesQuorumFraction_init(uint256 quorumNumeratorValue) internal onlyInitializing { + __GovernorVotesQuorumFraction_init_unchained(quorumNumeratorValue); + } + + function __GovernorVotesQuorumFraction_init_unchained(uint256 quorumNumeratorValue) internal onlyInitializing { + _updateQuorumNumerator(quorumNumeratorValue); + } + + /** + * @dev Returns the current quorum numerator. See {quorumDenominator}. + */ + function quorumNumerator() public view virtual returns (uint256) { + return _quorumNumeratorHistory._checkpoints.length == 0 ? _quorumNumerator : _quorumNumeratorHistory.latest(); + } + + /** + * @dev Returns the quorum numerator at a specific timepoint. See {quorumDenominator}. + */ + function quorumNumerator(uint256 timepoint) public view virtual returns (uint256) { + // If history is empty, fallback to old storage + uint256 length = _quorumNumeratorHistory._checkpoints.length; + if (length == 0) { + return _quorumNumerator; + } + + // Optimistic search, check the latest checkpoint + CheckpointsUpgradeable.Checkpoint224 memory latest = _quorumNumeratorHistory._checkpoints[length - 1]; + if (latest._key <= timepoint) { + return latest._value; + } + + // Otherwise, do the binary search + return _quorumNumeratorHistory.upperLookupRecent(SafeCastUpgradeable.toUint32(timepoint)); + } + + /** + * @dev Returns the quorum denominator. Defaults to 100, but may be overridden. + */ + function quorumDenominator() public view virtual returns (uint256) { + return 100; + } + + /** + * @dev Returns the quorum for a timepoint, in terms of number of votes: `supply * numerator / denominator`. + */ + function quorum(uint256 timepoint) public view virtual override returns (uint256) { + return (token.getPastTotalSupply(timepoint) * quorumNumerator(timepoint)) / quorumDenominator(); + } + + /** + * @dev Changes the quorum numerator. + * + * Emits a {QuorumNumeratorUpdated} event. + * + * Requirements: + * + * - Must be called through a governance proposal. + * - New numerator must be smaller or equal to the denominator. + */ + function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance { + _updateQuorumNumerator(newQuorumNumerator); + } + + /** + * @dev Changes the quorum numerator. + * + * Emits a {QuorumNumeratorUpdated} event. + * + * Requirements: + * + * - New numerator must be smaller or equal to the denominator. + */ + function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual { + require( + newQuorumNumerator <= quorumDenominator(), + "GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator" + ); + + uint256 oldQuorumNumerator = quorumNumerator(); + + // Make sure we keep track of the original numerator in contracts upgraded from a version without checkpoints. + if (oldQuorumNumerator != 0 && _quorumNumeratorHistory._checkpoints.length == 0) { + _quorumNumeratorHistory._checkpoints.push( + CheckpointsUpgradeable.Checkpoint224({_key: 0, _value: SafeCastUpgradeable.toUint224(oldQuorumNumerator)}) + ); + } + + // Set new quorum for future proposals + _quorumNumeratorHistory.push(SafeCastUpgradeable.toUint32(clock()), SafeCastUpgradeable.toUint224(newQuorumNumerator)); + + emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol new file mode 100644 index 00000000..85a58282 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotes.sol) + +pragma solidity ^0.8.0; + +import "../GovernorUpgradeable.sol"; +import "../../interfaces/IERC5805Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. + * + * _Available since v4.3._ + * + * @custom:storage-size 51 + */ +abstract contract GovernorVotesUpgradeable is Initializable, GovernorUpgradeable { + IERC5805Upgradeable public token; + + function __GovernorVotes_init(IVotesUpgradeable tokenAddress) internal onlyInitializing { + __GovernorVotes_init_unchained(tokenAddress); + } + + function __GovernorVotes_init_unchained(IVotesUpgradeable tokenAddress) internal onlyInitializing { + token = IERC5805Upgradeable(address(tokenAddress)); + } + + /** + * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token + * does not implement EIP-6372. + */ + function clock() public view virtual override returns (uint48) { + try token.clock() returns (uint48 timepoint) { + return timepoint; + } catch { + return SafeCastUpgradeable.toUint48(block.number); + } + } + + /** + * @dev Machine-readable description of the clock as specified in EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + try token.CLOCK_MODE() returns (string memory clockmode) { + return clockmode; + } catch { + return "mode=blocknumber&from=default"; + } + } + + /** + * Read the voting weight from the token's built in snapshot mechanism (see {Governor-_getVotes}). + */ + function _getVotes( + address account, + uint256 timepoint, + bytes memory /*params*/ + ) internal view virtual override returns (uint256) { + return token.getPastVotes(account, timepoint); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol new file mode 100644 index 00000000..0cfd5fb8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol) + +pragma solidity ^0.8.0; + +import "../IGovernorUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of the {IGovernor} for timelock supporting modules. + * + * _Available since v4.3._ + */ +abstract contract IGovernorTimelockUpgradeable is Initializable, IGovernorUpgradeable { + event ProposalQueued(uint256 proposalId, uint256 eta); + + function __IGovernorTimelock_init() internal onlyInitializing { + } + + function __IGovernorTimelock_init_unchained() internal onlyInitializing { + } + function timelock() public view virtual returns (address); + + function proposalEta(uint256 proposalId) public view virtual returns (uint256); + + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256 proposalId); + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol new file mode 100644 index 00000000..eeb5d94b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol) +pragma solidity ^0.8.0; + +/** + * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. + * + * _Available since v4.5._ + */ +interface IVotesUpgradeable { + /** + * @dev Emitted when an account changes their delegate. + */ + event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); + + /** + * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. + */ + event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); + + /** + * @dev Returns the current amount of votes that `account` has. + */ + function getVotes(address account) external view returns (uint256); + + /** + * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + */ + function getPastVotes(address account, uint256 timepoint) external view returns (uint256); + + /** + * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. + * Votes that have not been delegated are still part of total supply, even though they would not participate in a + * vote. + */ + function getPastTotalSupply(uint256 timepoint) external view returns (uint256); + + /** + * @dev Returns the delegate that `account` has chosen. + */ + function delegates(address account) external view returns (address); + + /** + * @dev Delegates votes from the sender to `delegatee`. + */ + function delegate(address delegatee) external; + + /** + * @dev Delegates votes from signer to `delegatee`. + */ + function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/VotesUpgradeable.sol new file mode 100644 index 00000000..fcc47b04 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/VotesUpgradeable.sol @@ -0,0 +1,257 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/Votes.sol) +pragma solidity ^0.8.0; + +import "../../interfaces/IERC5805Upgradeable.sol"; +import "../../utils/ContextUpgradeable.sol"; +import "../../utils/CountersUpgradeable.sol"; +import "../../utils/CheckpointsUpgradeable.sol"; +import "../../utils/cryptography/EIP712Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be + * transferred, and provides a system of vote delegation, where an account can delegate its voting units to a sort of + * "representative" that will pool delegated voting units from different accounts and can then use it to vote in + * decisions. In fact, voting units _must_ be delegated in order to count as actual votes, and an account has to + * delegate those votes to itself if it wishes to participate in decisions and does not have a trusted representative. + * + * This contract is often combined with a token contract such that voting units correspond to token units. For an + * example, see {ERC721Votes}. + * + * The full history of delegate votes is tracked on-chain so that governance protocols can consider votes as distributed + * at a particular block number to protect against flash loans and double voting. The opt-in delegate system makes the + * cost of this history tracking optional. + * + * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return + * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the + * previous example, it would be included in {ERC721-_beforeTokenTransfer}). + * + * _Available since v4.5._ + */ +abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712Upgradeable, IERC5805Upgradeable { + using CheckpointsUpgradeable for CheckpointsUpgradeable.Trace224; + using CountersUpgradeable for CountersUpgradeable.Counter; + + bytes32 private constant _DELEGATION_TYPEHASH = + keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); + + mapping(address => address) private _delegation; + + /// @custom:oz-retyped-from mapping(address => Checkpoints.History) + mapping(address => CheckpointsUpgradeable.Trace224) private _delegateCheckpoints; + + /// @custom:oz-retyped-from Checkpoints.History + CheckpointsUpgradeable.Trace224 private _totalCheckpoints; + + mapping(address => CountersUpgradeable.Counter) private _nonces; + + function __Votes_init() internal onlyInitializing { + } + + function __Votes_init_unchained() internal onlyInitializing { + } + /** + * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based + * checkpoints (and voting), in which case {CLOCK_MODE} should be overridden as well to match. + */ + function clock() public view virtual override returns (uint48) { + return SafeCastUpgradeable.toUint48(block.number); + } + + /** + * @dev Machine-readable description of the clock as specified in EIP-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + // Check that the clock was not modified + require(clock() == block.number, "Votes: broken clock mode"); + return "mode=blocknumber&from=default"; + } + + /** + * @dev Returns the current amount of votes that `account` has. + */ + function getVotes(address account) public view virtual override returns (uint256) { + return _delegateCheckpoints[account].latest(); + } + + /** + * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "Votes: future lookup"); + return _delegateCheckpoints[account].upperLookupRecent(SafeCastUpgradeable.toUint32(timepoint)); + } + + /** + * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. + * Votes that have not been delegated are still part of total supply, even though they would not participate in a + * vote. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "Votes: future lookup"); + return _totalCheckpoints.upperLookupRecent(SafeCastUpgradeable.toUint32(timepoint)); + } + + /** + * @dev Returns the current total supply of votes. + */ + function _getTotalSupply() internal view virtual returns (uint256) { + return _totalCheckpoints.latest(); + } + + /** + * @dev Returns the delegate that `account` has chosen. + */ + function delegates(address account) public view virtual override returns (address) { + return _delegation[account]; + } + + /** + * @dev Delegates votes from the sender to `delegatee`. + */ + function delegate(address delegatee) public virtual override { + address account = _msgSender(); + _delegate(account, delegatee); + } + + /** + * @dev Delegates votes from signer to `delegatee`. + */ + function delegateBySig( + address delegatee, + uint256 nonce, + uint256 expiry, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override { + require(block.timestamp <= expiry, "Votes: signature expired"); + address signer = ECDSAUpgradeable.recover( + _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), + v, + r, + s + ); + require(nonce == _useNonce(signer), "Votes: invalid nonce"); + _delegate(signer, delegatee); + } + + /** + * @dev Delegate all of `account`'s voting units to `delegatee`. + * + * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. + */ + function _delegate(address account, address delegatee) internal virtual { + address oldDelegate = delegates(account); + _delegation[account] = delegatee; + + emit DelegateChanged(account, oldDelegate, delegatee); + _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account)); + } + + /** + * @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to` + * should be zero. Total supply of voting units will be adjusted with mints and burns. + */ + function _transferVotingUnits(address from, address to, uint256 amount) internal virtual { + if (from == address(0)) { + _push(_totalCheckpoints, _add, SafeCastUpgradeable.toUint224(amount)); + } + if (to == address(0)) { + _push(_totalCheckpoints, _subtract, SafeCastUpgradeable.toUint224(amount)); + } + _moveDelegateVotes(delegates(from), delegates(to), amount); + } + + /** + * @dev Moves delegated votes from one delegate to another. + */ + function _moveDelegateVotes(address from, address to, uint256 amount) private { + if (from != to && amount > 0) { + if (from != address(0)) { + (uint256 oldValue, uint256 newValue) = _push( + _delegateCheckpoints[from], + _subtract, + SafeCastUpgradeable.toUint224(amount) + ); + emit DelegateVotesChanged(from, oldValue, newValue); + } + if (to != address(0)) { + (uint256 oldValue, uint256 newValue) = _push( + _delegateCheckpoints[to], + _add, + SafeCastUpgradeable.toUint224(amount) + ); + emit DelegateVotesChanged(to, oldValue, newValue); + } + } + } + + function _push( + CheckpointsUpgradeable.Trace224 storage store, + function(uint224, uint224) view returns (uint224) op, + uint224 delta + ) private returns (uint224, uint224) { + return store.push(SafeCastUpgradeable.toUint32(clock()), op(store.latest(), delta)); + } + + function _add(uint224 a, uint224 b) private pure returns (uint224) { + return a + b; + } + + function _subtract(uint224 a, uint224 b) private pure returns (uint224) { + return a - b; + } + + /** + * @dev Consumes a nonce. + * + * Returns the current value and increments nonce. + */ + function _useNonce(address owner) internal virtual returns (uint256 current) { + CountersUpgradeable.Counter storage nonce = _nonces[owner]; + current = nonce.current(); + nonce.increment(); + } + + /** + * @dev Returns an address nonce. + */ + function nonces(address owner) public view virtual returns (uint256) { + return _nonces[owner].current(); + } + + /** + * @dev Returns the contract's {EIP712} domain separator. + */ + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view returns (bytes32) { + return _domainSeparatorV4(); + } + + /** + * @dev Must return the voting units held by an account. + */ + function _getVotingUnits(address) internal view virtual returns (uint256); + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[46] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol new file mode 100644 index 00000000..35c3f851 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol new file mode 100644 index 00000000..1e9e6e32 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC1155/IERC1155ReceiverUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol new file mode 100644 index 00000000..3df26dc5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC1155/IERC1155Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol new file mode 100644 index 00000000..631d222a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC1271 standard signature validation method for + * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. + * + * _Available since v4.1._ + */ +interface IERC1271Upgradeable { + /** + * @dev Should return whether the signature provided is valid for the provided data + * @param hash Hash of the data to be signed + * @param signature Signature byte array associated with _data + */ + function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol new file mode 100644 index 00000000..3aa402b6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Receiver.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for any contract that wants to support {IERC1363-transferAndCall} + * or {IERC1363-transferFromAndCall} from {ERC1363} token contracts. + */ +interface IERC1363ReceiverUpgradeable { + /* + * Note: the ERC-165 identifier for this interface is 0x88a7ca5c. + * 0x88a7ca5c === bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)")) + */ + + /** + * @notice Handle the receipt of ERC1363 tokens + * @dev Any ERC1363 smart contract calls this function on the recipient + * after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the + * transfer. Return of other than the magic value MUST result in the + * transaction being reverted. + * Note: the token contract address is always the message sender. + * @param operator address The address which called `transferAndCall` or `transferFromAndCall` function + * @param from address The address which are token transferred from + * @param amount uint256 The amount of tokens transferred + * @param data bytes Additional data with no specified format + * @return `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` unless throwing + */ + function onTransferReceived( + address operator, + address from, + uint256 amount, + bytes memory data + ) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol new file mode 100644 index 00000000..2ef81c43 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Spender.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for any contract that wants to support {IERC1363-approveAndCall} + * from {ERC1363} token contracts. + */ +interface IERC1363SpenderUpgradeable { + /* + * Note: the ERC-165 identifier for this interface is 0x7b04a2d0. + * 0x7b04a2d0 === bytes4(keccak256("onApprovalReceived(address,uint256,bytes)")) + */ + + /** + * @notice Handle the approval of ERC1363 tokens + * @dev Any ERC1363 smart contract calls this function on the recipient + * after an `approve`. This function MAY throw to revert and reject the + * approval. Return of other than the magic value MUST result in the + * transaction being reverted. + * Note: the token contract address is always the message sender. + * @param owner address The address which called `approveAndCall` function + * @param amount uint256 The amount of tokens to be spent + * @param data bytes Additional data with no specified format + * @return `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`unless throwing + */ + function onApprovalReceived(address owner, uint256 amount, bytes memory data) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol new file mode 100644 index 00000000..724605e6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363.sol) + +pragma solidity ^0.8.0; + +import "./IERC20Upgradeable.sol"; +import "./IERC165Upgradeable.sol"; + +/** + * @dev Interface of an ERC1363 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-1363[EIP]. + * + * Defines a interface for ERC20 tokens that supports executing recipient + * code after `transfer` or `transferFrom`, or spender code after `approve`. + */ +interface IERC1363Upgradeable is IERC165Upgradeable, IERC20Upgradeable { + /* + * Note: the ERC-165 identifier for this interface is 0xb0202a11. + * 0xb0202a11 === + * bytes4(keccak256('transferAndCall(address,uint256)')) ^ + * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ + * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ + * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ + * bytes4(keccak256('approveAndCall(address,uint256)')) ^ + * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) + */ + + /** + * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @return true unless throwing + */ + function transferAndCall(address to, uint256 amount) external returns (bool); + + /** + * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @param data bytes Additional data with no specified format, sent in call to `to` + * @return true unless throwing + */ + function transferAndCall(address to, uint256 amount, bytes memory data) external returns (bool); + + /** + * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver + * @param from address The address which you want to send tokens from + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @return true unless throwing + */ + function transferFromAndCall(address from, address to, uint256 amount) external returns (bool); + + /** + * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver + * @param from address The address which you want to send tokens from + * @param to address The address which you want to transfer to + * @param amount uint256 The amount of tokens to be transferred + * @param data bytes Additional data with no specified format, sent in call to `to` + * @return true unless throwing + */ + function transferFromAndCall(address from, address to, uint256 amount, bytes memory data) external returns (bool); + + /** + * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender + * and then call `onApprovalReceived` on spender. + * @param spender address The address which will spend the funds + * @param amount uint256 The amount of tokens to be spent + */ + function approveAndCall(address spender, uint256 amount) external returns (bool); + + /** + * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender + * and then call `onApprovalReceived` on spender. + * @param spender address The address which will spend the funds + * @param amount uint256 The amount of tokens to be spent + * @param data bytes Additional data with no specified format, sent in call to `spender` + */ + function approveAndCall(address spender, uint256 amount, bytes memory data) external returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol new file mode 100644 index 00000000..08eb433b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC165Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol new file mode 100644 index 00000000..1f5aeba5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC1820ImplementerUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol new file mode 100644 index 00000000..088fbd68 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC1820RegistryUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol new file mode 100644 index 00000000..d576dff4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) + +pragma solidity ^0.8.0; + +/** + * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. + * + * _Available since v4.8.3._ + */ +interface IERC1967Upgradeable { + /** + * @dev Emitted when the implementation is upgraded. + */ + event Upgraded(address indexed implementation); + + /** + * @dev Emitted when the admin account has changed. + */ + event AdminChanged(address previousAdmin, address newAdmin); + + /** + * @dev Emitted when the beacon is changed. + */ + event BeaconUpgraded(address indexed beacon); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol new file mode 100644 index 00000000..c24417a2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol new file mode 100644 index 00000000..a0d5cdbf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/IERC20Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol new file mode 100644 index 00000000..9cb0aae6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (interfaces/IERC2309.sol) + +pragma solidity ^0.8.0; + +/** + * @dev ERC-2309: ERC-721 Consecutive Transfer Extension. + * + * _Available since v4.8._ + */ +interface IERC2309Upgradeable { + /** + * @dev Emitted when the tokens from `fromTokenId` to `toTokenId` are transferred from `fromAddress` to `toAddress`. + */ + event ConsecutiveTransfer( + uint256 indexed fromTokenId, + uint256 toTokenId, + address indexed fromAddress, + address indexed toAddress + ); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol new file mode 100644 index 00000000..a8d1cef4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2612.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/extensions/IERC20PermitUpgradeable.sol"; + +interface IERC2612Upgradeable is IERC20PermitUpgradeable {} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol new file mode 100644 index 00000000..fd5a7033 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) + +pragma solidity ^0.8.0; + +import "../utils/introspection/IERC165Upgradeable.sol"; + +/** + * @dev Interface for the NFT Royalty Standard. + * + * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal + * support for royalty payments across all NFT marketplaces and ecosystem participants. + * + * _Available since v4.5._ + */ +interface IERC2981Upgradeable is IERC165Upgradeable { + /** + * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of + * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. + */ + function royaltyInfo( + uint256 tokenId, + uint256 salePrice + ) external view returns (address receiver, uint256 royaltyAmount); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol new file mode 100644 index 00000000..a786fb13 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC3156FlashBorrower.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC3156 FlashBorrower, as defined in + * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. + * + * _Available since v4.1._ + */ +interface IERC3156FlashBorrowerUpgradeable { + /** + * @dev Receive a flash loan. + * @param initiator The initiator of the loan. + * @param token The loan currency. + * @param amount The amount of tokens lent. + * @param fee The additional amount of tokens to repay. + * @param data Arbitrary data structure, intended to contain user-defined parameters. + * @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan" + */ + function onFlashLoan( + address initiator, + address token, + uint256 amount, + uint256 fee, + bytes calldata data + ) external returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol new file mode 100644 index 00000000..d2543d1f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol) + +pragma solidity ^0.8.0; + +import "./IERC3156FlashBorrowerUpgradeable.sol"; + +/** + * @dev Interface of the ERC3156 FlashLender, as defined in + * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. + * + * _Available since v4.1._ + */ +interface IERC3156FlashLenderUpgradeable { + /** + * @dev The amount of currency available to be lended. + * @param token The loan currency. + * @return The amount of `token` that can be borrowed. + */ + function maxFlashLoan(address token) external view returns (uint256); + + /** + * @dev The fee to be charged for a given loan. + * @param token The loan currency. + * @param amount The amount of tokens lent. + * @return The amount of `token` to be charged for the loan, on top of the returned principal. + */ + function flashFee(address token, uint256 amount) external view returns (uint256); + + /** + * @dev Initiate a flash loan. + * @param receiver The receiver of the tokens in the loan, and the receiver of the callback. + * @param token The loan currency. + * @param amount The amount of tokens lent. + * @param data Arbitrary data structure, intended to contain user-defined parameters. + */ + function flashLoan( + IERC3156FlashBorrowerUpgradeable receiver, + address token, + uint256 amount, + bytes calldata data + ) external returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol new file mode 100644 index 00000000..1a9fd642 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol) + +pragma solidity ^0.8.0; + +import "./IERC3156FlashBorrowerUpgradeable.sol"; +import "./IERC3156FlashLenderUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol new file mode 100644 index 00000000..16a4cda7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol @@ -0,0 +1,232 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/IERC20Upgradeable.sol"; +import "../token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; + +/** + * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in + * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. + * + * _Available since v4.7._ + */ +interface IERC4626Upgradeable is IERC20Upgradeable, IERC20MetadataUpgradeable { + event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); + + event Withdraw( + address indexed sender, + address indexed receiver, + address indexed owner, + uint256 assets, + uint256 shares + ); + + /** + * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. + * + * - MUST be an ERC-20 token contract. + * - MUST NOT revert. + */ + function asset() external view returns (address assetTokenAddress); + + /** + * @dev Returns the total amount of the underlying asset that is “managed” by Vault. + * + * - SHOULD include any compounding that occurs from yield. + * - MUST be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT revert. + */ + function totalAssets() external view returns (uint256 totalManagedAssets); + + /** + * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal + * scenario where all the conditions are met. + * + * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + * - MUST NOT revert. + * + * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + * from. + */ + function convertToShares(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal + * scenario where all the conditions are met. + * + * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + * - MUST NOT revert. + * + * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + * from. + */ + function convertToAssets(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, + * through a deposit call. + * + * - MUST return a limited value if receiver is subject to some deposit limit. + * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. + * - MUST NOT revert. + */ + function maxDeposit(address receiver) external view returns (uint256 maxAssets); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given + * current on-chain conditions. + * + * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit + * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called + * in the same transaction. + * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the + * deposit would be accepted, regardless if the user has enough tokens approved, etc. + * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by depositing. + */ + function previewDeposit(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. + * + * - MUST emit the Deposit event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * deposit execution, and are accounted for during deposit. + * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not + * approving enough underlying tokens to the Vault contract, etc). + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + */ + function deposit(uint256 assets, address receiver) external returns (uint256 shares); + + /** + * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. + * - MUST return a limited value if receiver is subject to some mint limit. + * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. + * - MUST NOT revert. + */ + function maxMint(address receiver) external view returns (uint256 maxShares); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given + * current on-chain conditions. + * + * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call + * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the + * same transaction. + * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint + * would be accepted, regardless if the user has enough tokens approved, etc. + * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by minting. + */ + function previewMint(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. + * + * - MUST emit the Deposit event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint + * execution, and are accounted for during mint. + * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not + * approving enough underlying tokens to the Vault contract, etc). + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + */ + function mint(uint256 shares, address receiver) external returns (uint256 assets); + + /** + * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the + * Vault, through a withdraw call. + * + * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + * - MUST NOT revert. + */ + function maxWithdraw(address owner) external view returns (uint256 maxAssets); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, + * given current on-chain conditions. + * + * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw + * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if + * called + * in the same transaction. + * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though + * the withdrawal would be accepted, regardless if the user has enough shares, etc. + * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by depositing. + */ + function previewWithdraw(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. + * + * - MUST emit the Withdraw event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * withdraw execution, and are accounted for during withdraw. + * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner + * not having enough shares, etc). + * + * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + * Those methods should be performed separately. + */ + function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); + + /** + * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, + * through a redeem call. + * + * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. + * - MUST NOT revert. + */ + function maxRedeem(address owner) external view returns (uint256 maxShares); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, + * given current on-chain conditions. + * + * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call + * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the + * same transaction. + * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the + * redemption would be accepted, regardless if the user has enough shares, etc. + * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by redeeming. + */ + function previewRedeem(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. + * + * - MUST emit the Withdraw event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * redeem execution, and are accounted for during redeem. + * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner + * not having enough shares, etc). + * + * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + * Those methods should be performed separately. + */ + function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol new file mode 100644 index 00000000..103e7e5e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4906.sol) + +pragma solidity ^0.8.0; + +import "./IERC165Upgradeable.sol"; +import "./IERC721Upgradeable.sol"; + +/// @title EIP-721 Metadata Update Extension +interface IERC4906Upgradeable is IERC165Upgradeable, IERC721Upgradeable { + /// @dev This event emits when the metadata of a token is changed. + /// So that the third-party platforms such as NFT market could + /// timely update the images and related attributes of the NFT. + event MetadataUpdate(uint256 _tokenId); + + /// @dev This event emits when the metadata of a range of tokens is changed. + /// So that the third-party platforms such as NFT market could + /// timely update the images and related attributes of the NFTs. + event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol new file mode 100644 index 00000000..66d0007d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) + +pragma solidity ^0.8.0; + +interface IERC5267Upgradeable { + /** + * @dev MAY be emitted to signal that the domain could have changed. + */ + event EIP712DomainChanged(); + + /** + * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 + * signature. + */ + function eip712Domain() + external + view + returns ( + bytes1 fields, + string memory name, + string memory version, + uint256 chainId, + address verifyingContract, + bytes32 salt, + uint256[] memory extensions + ); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol new file mode 100644 index 00000000..04f88041 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5313.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for the Light Contract Ownership Standard. + * + * A standardized minimal interface required to identify an account that controls a contract + * + * _Available since v4.9._ + */ +interface IERC5313Upgradeable { + /** + * @dev Gets the address of the owner. + */ + function owner() external view returns (address); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol new file mode 100644 index 00000000..75d9b3ae --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol) + +pragma solidity ^0.8.0; + +import "../governance/utils/IVotesUpgradeable.sol"; +import "./IERC6372Upgradeable.sol"; + +interface IERC5805Upgradeable is IERC6372Upgradeable, IVotesUpgradeable {} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol new file mode 100644 index 00000000..262513ac --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol) + +pragma solidity ^0.8.0; + +interface IERC6372Upgradeable { + /** + * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). + */ + function clock() external view returns (uint48); + + /** + * @dev Description of the clock + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() external view returns (string memory); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol new file mode 100644 index 00000000..06e732d0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol new file mode 100644 index 00000000..1ec3b802 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/extensions/IERC721MetadataUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol new file mode 100644 index 00000000..bdbe94c2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/IERC721ReceiverUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol new file mode 100644 index 00000000..414e630f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC721/IERC721Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol new file mode 100644 index 00000000..219b28df --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC777/IERC777RecipientUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol new file mode 100644 index 00000000..0e1440b2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC777/IERC777SenderUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol new file mode 100644 index 00000000..858d3f48 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC777/IERC777Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc new file mode 100644 index 00000000..4525bc9a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc @@ -0,0 +1,73 @@ += Interfaces + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/interfaces + +== List of standardized interfaces +These interfaces are available as `.sol` files, and also as compiler `.json` ABI files (through the npm package). These +are useful to interact with third party contracts that implement them. + +- {IERC20} +- {IERC20Metadata} +- {IERC165} +- {IERC721} +- {IERC721Receiver} +- {IERC721Enumerable} +- {IERC721Metadata} +- {IERC777} +- {IERC777Recipient} +- {IERC777Sender} +- {IERC1155} +- {IERC1155Receiver} +- {IERC1155MetadataURI} +- {IERC1271} +- {IERC1363} +- {IERC1363Receiver} +- {IERC1363Spender} +- {IERC1820Implementer} +- {IERC1820Registry} +- {IERC1822Proxiable} +- {IERC2612} +- {IERC2981} +- {IERC3156FlashLender} +- {IERC3156FlashBorrower} +- {IERC4626} +- {IERC4906} +- {IERC5267} +- {IERC5313} +- {IERC5805} +- {IERC6372} + +== Detailed ABI + +{{IERC1271}} + +{{IERC1363}} + +{{IERC1363Receiver}} + +{{IERC1363Spender}} + +{{IERC1820Implementer}} + +{{IERC1820Registry}} + +{{IERC1822Proxiable}} + +{{IERC2612}} + +{{IERC2981}} + +{{IERC3156FlashLender}} + +{{IERC3156FlashBorrower}} + +{{IERC4626}} + +{{IERC5313}} + +{{IERC5267}} + +{{IERC5805}} + +{{IERC6372}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol new file mode 100644 index 00000000..e14596ab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) + +pragma solidity ^0.8.0; + +/** + * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified + * proxy whose upgrades are fully controlled by the current implementation. + */ +interface IERC1822ProxiableUpgradeable { + /** + * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation + * address. + * + * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks + * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this + * function revert if invoked through a proxy. + */ + function proxiableUUID() external view returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol new file mode 100644 index 00000000..ee7297fb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/draft-IERC2612.sol) + +pragma solidity ^0.8.0; + +// EIP-2612 is Final as of 2022-11-01. This file is deprecated. + +import "./IERC2612Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol new file mode 100644 index 00000000..e18ca1b4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (metatx/ERC2771Context.sol) + +pragma solidity ^0.8.9; + +import "../utils/ContextUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Context variant with ERC2771 support. + * + * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption. + * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender} + * recovery. + */ +abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _trustedForwarder; + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address trustedForwarder) { + _trustedForwarder = trustedForwarder; + } + + function isTrustedForwarder(address forwarder) public view virtual returns (bool) { + return forwarder == _trustedForwarder; + } + + function _msgSender() internal view virtual override returns (address) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { + return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); + } else { + return super._msgSender(); + } + } + + function _msgData() internal view virtual override returns (bytes calldata) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { + return msg.data[:calldataLength - contextSuffixLength]; + } else { + return super._msgData(); + } + } + + /** + * @dev ERC-2771 specifies the context as being a single address (20 bytes). + */ + function _contextSuffixLength() internal view virtual override returns (uint256) { + return 20; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol new file mode 100644 index 00000000..563ce2c5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (metatx/MinimalForwarder.sol) + +pragma solidity ^0.8.0; + +import "../utils/cryptography/ECDSAUpgradeable.sol"; +import "../utils/cryptography/EIP712Upgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Simple minimal forwarder to be used together with an ERC2771 compatible contract. See {ERC2771Context}. + * + * MinimalForwarder is mainly meant for testing, as it is missing features to be a good production-ready forwarder. This + * contract does not intend to have all the properties that are needed for a sound forwarding system. A fully + * functioning forwarding system with good properties requires more complexity. We suggest you look at other projects + * such as the GSN which do have the goal of building a system like that. + */ +contract MinimalForwarderUpgradeable is Initializable, EIP712Upgradeable { + using ECDSAUpgradeable for bytes32; + + struct ForwardRequest { + address from; + address to; + uint256 value; + uint256 gas; + uint256 nonce; + bytes data; + } + + bytes32 private constant _TYPEHASH = + keccak256("ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data)"); + + mapping(address => uint256) private _nonces; + + function __MinimalForwarder_init() internal onlyInitializing { + __EIP712_init_unchained("MinimalForwarder", "0.0.1"); + } + + function __MinimalForwarder_init_unchained() internal onlyInitializing {} + + function getNonce(address from) public view returns (uint256) { + return _nonces[from]; + } + + function verify(ForwardRequest calldata req, bytes calldata signature) public view returns (bool) { + address signer = _hashTypedDataV4( + keccak256(abi.encode(_TYPEHASH, req.from, req.to, req.value, req.gas, req.nonce, keccak256(req.data))) + ).recover(signature); + return _nonces[req.from] == req.nonce && signer == req.from; + } + + function execute( + ForwardRequest calldata req, + bytes calldata signature + ) public payable returns (bool, bytes memory) { + require(verify(req, signature), "MinimalForwarder: signature does not match request"); + _nonces[req.from] = req.nonce + 1; + + (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}( + abi.encodePacked(req.data, req.from) + ); + + // Validate that the relayer has sent enough gas for the call. + // See https://ronan.eth.limo/blog/ethereum-gas-dangers/ + if (gasleft() <= req.gas / 63) { + // We explicitly trigger invalid opcode to consume all gas and bubble-up the effects, since + // neither revert or assert consume all gas since Solidity 0.8.0 + // https://docs.soliditylang.org/en/v0.8.0/control-structures.html#panic-via-assert-and-error-via-require + /// @solidity memory-safe-assembly + assembly { + invalid() + } + } + + return (success, returndata); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc new file mode 100644 index 00000000..eccdeaf9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc @@ -0,0 +1,12 @@ += Meta Transactions + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/metatx + +== Core + +{{ERC2771Context}} + +== Utils + +{{MinimalForwarder}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json new file mode 100644 index 00000000..d9059593 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json @@ -0,0 +1,32 @@ +{ + "name": "@openzeppelin/contracts-upgradeable", + "description": "Secure Smart Contract library for Solidity", + "version": "4.9.6", + "files": [ + "**/*.sol", + "/build/contracts/*.json", + "!/mocks/**/*" + ], + "scripts": { + "prepare": "bash ../scripts/prepare-contracts-package.sh", + "prepare-docs": "cd ..; npm run prepare-docs" + }, + "repository": { + "type": "git", + "url": "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable.git" + }, + "keywords": [ + "solidity", + "ethereum", + "smart", + "contracts", + "security", + "zeppelin" + ], + "author": "OpenZeppelin Community ", + "license": "MIT", + "bugs": { + "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/issues" + }, + "homepage": "https://openzeppelin.com/contracts/" +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol new file mode 100644 index 00000000..450fd0e4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol) + +pragma solidity ^0.8.0; + +/** + * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for + * deploying minimal proxy contracts, also known as "clones". + * + * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies + * > a minimal bytecode implementation that delegates all calls to a known, fixed address. + * + * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` + * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the + * deterministic method. + * + * _Available since v3.4._ + */ +library ClonesUpgradeable { + /** + * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. + * + * This function uses the create opcode, which should never revert. + */ + function clone(address implementation) internal returns (address instance) { + /// @solidity memory-safe-assembly + assembly { + // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes + // of the `implementation` address with the bytecode before the address. + mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) + // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. + mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) + instance := create(0, 0x09, 0x37) + } + require(instance != address(0), "ERC1167: create failed"); + } + + /** + * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. + * + * This function uses the create2 opcode and a `salt` to deterministically deploy + * the clone. Using the same `implementation` and `salt` multiple time will revert, since + * the clones cannot be deployed twice at the same address. + */ + function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { + /// @solidity memory-safe-assembly + assembly { + // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes + // of the `implementation` address with the bytecode before the address. + mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) + // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. + mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) + instance := create2(0, 0x09, 0x37, salt) + } + require(instance != address(0), "ERC1167: create2 failed"); + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. + */ + function predictDeterministicAddress( + address implementation, + bytes32 salt, + address deployer + ) internal pure returns (address predicted) { + /// @solidity memory-safe-assembly + assembly { + let ptr := mload(0x40) + mstore(add(ptr, 0x38), deployer) + mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) + mstore(add(ptr, 0x14), implementation) + mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) + mstore(add(ptr, 0x58), salt) + mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) + predicted := keccak256(add(ptr, 0x43), 0x55) + } + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. + */ + function predictDeterministicAddress( + address implementation, + bytes32 salt + ) internal view returns (address predicted) { + return predictDeterministicAddress(implementation, salt, address(this)); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol new file mode 100644 index 00000000..14868cc9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) + +pragma solidity ^0.8.2; + +import "../beacon/IBeaconUpgradeable.sol"; +import "../../interfaces/IERC1967Upgradeable.sol"; +import "../../interfaces/draft-IERC1822Upgradeable.sol"; +import "../../utils/AddressUpgradeable.sol"; +import "../../utils/StorageSlotUpgradeable.sol"; +import {Initializable} from "../utils/Initializable.sol"; + +/** + * @dev This abstract contract provides getters and event emitting update functions for + * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. + * + * _Available since v4.1._ + */ +abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable { + // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 + bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; + + /** + * @dev Storage slot with the address of the current implementation. + * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is + * validated in the constructor. + */ + bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + + function __ERC1967Upgrade_init() internal onlyInitializing { + } + + function __ERC1967Upgrade_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns the current implementation address. + */ + function _getImplementation() internal view returns (address) { + return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; + } + + /** + * @dev Stores a new address in the EIP1967 implementation slot. + */ + function _setImplementation(address newImplementation) private { + require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); + StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; + } + + /** + * @dev Perform implementation upgrade + * + * Emits an {Upgraded} event. + */ + function _upgradeTo(address newImplementation) internal { + _setImplementation(newImplementation); + emit Upgraded(newImplementation); + } + + /** + * @dev Perform implementation upgrade with additional setup call. + * + * Emits an {Upgraded} event. + */ + function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { + _upgradeTo(newImplementation); + if (data.length > 0 || forceCall) { + AddressUpgradeable.functionDelegateCall(newImplementation, data); + } + } + + /** + * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. + * + * Emits an {Upgraded} event. + */ + function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { + // Upgrades from old implementations will perform a rollback test. This test requires the new + // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing + // this special case will break upgrade paths from old UUPS implementation to new ones. + if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { + _setImplementation(newImplementation); + } else { + try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { + require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); + } catch { + revert("ERC1967Upgrade: new implementation is not UUPS"); + } + _upgradeToAndCall(newImplementation, data, forceCall); + } + } + + /** + * @dev Storage slot with the admin of the contract. + * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is + * validated in the constructor. + */ + bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + + /** + * @dev Returns the current admin. + */ + function _getAdmin() internal view returns (address) { + return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; + } + + /** + * @dev Stores a new address in the EIP1967 admin slot. + */ + function _setAdmin(address newAdmin) private { + require(newAdmin != address(0), "ERC1967: new admin is the zero address"); + StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; + } + + /** + * @dev Changes the admin of the proxy. + * + * Emits an {AdminChanged} event. + */ + function _changeAdmin(address newAdmin) internal { + emit AdminChanged(_getAdmin(), newAdmin); + _setAdmin(newAdmin); + } + + /** + * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. + * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. + */ + bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; + + /** + * @dev Returns the current beacon. + */ + function _getBeacon() internal view returns (address) { + return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; + } + + /** + * @dev Stores a new beacon in the EIP1967 beacon slot. + */ + function _setBeacon(address newBeacon) private { + require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); + require( + AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), + "ERC1967: beacon implementation is not a contract" + ); + StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; + } + + /** + * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does + * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). + * + * Emits a {BeaconUpgraded} event. + */ + function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { + _setBeacon(newBeacon); + emit BeaconUpgraded(newBeacon); + if (data.length > 0 || forceCall) { + AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc new file mode 100644 index 00000000..89717a7b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc @@ -0,0 +1,87 @@ += Proxies + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/proxy + +This is a low-level set of contracts implementing different proxy patterns with and without upgradeability. For an in-depth overview of this pattern check out the xref:upgrades-plugins::proxies.adoc[Proxy Upgrade Pattern] page. + +Most of the proxies below are built on an abstract base contract. + +- {Proxy}: Abstract contract implementing the core delegation functionality. + +In order to avoid clashes with the storage variables of the implementation contract behind a proxy, we use https://eips.ethereum.org/EIPS/eip-1967[EIP1967] storage slots. + +- {ERC1967Upgrade}: Internal functions to get and set the storage slots defined in EIP1967. +- {ERC1967Proxy}: A proxy using EIP1967 storage slots. Not upgradeable by default. + +There are two alternative ways to add upgradeability to an ERC1967 proxy. Their differences are explained below in <>. + +- {TransparentUpgradeableProxy}: A proxy with a built in admin and upgrade interface. +- {UUPSUpgradeable}: An upgradeability mechanism to be included in the implementation contract. + +CAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Truffle and Hardhat. + +A different family of proxies are beacon proxies. This pattern, popularized by Dharma, allows multiple proxies to be upgraded to a different implementation in a single transaction. + +- {BeaconProxy}: A proxy that retrieves its implementation from a beacon contract. +- {UpgradeableBeacon}: A beacon contract with a built in admin that can upgrade the {BeaconProxy} pointing to it. + +In this pattern, the proxy contract doesn't hold the implementation address in storage like an ERC1967 proxy. Instead, the address is stored in a separate beacon contract. The `upgrade` operations are sent to the beacon instead of to the proxy contract, and all proxies that follow that beacon are automatically upgraded. + +Outside the realm of upgradeability, proxies can also be useful to make cheap contract clones, such as those created by an on-chain factory contract that creates many instances of the same contract. These instances are designed to be both cheap to deploy, and cheap to call. + +- {Clones}: A library that can deploy cheap minimal non-upgradeable proxies. + +[[transparent-vs-uups]] +== Transparent vs UUPS Proxies + +The original proxies included in OpenZeppelin followed the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[Transparent Proxy Pattern]. While this pattern is still provided, our recommendation is now shifting towards UUPS proxies, which are both lightweight and versatile. The name UUPS comes from https://eips.ethereum.org/EIPS/eip-1822[EIP1822], which first documented the pattern. + +While both of these share the same interface for upgrades, in UUPS proxies the upgrade is handled by the implementation, and can eventually be removed. Transparent proxies, on the other hand, include the upgrade and admin logic in the proxy itself. This means {TransparentUpgradeableProxy} is more expensive to deploy than what is possible with UUPS proxies. + +UUPS proxies are implemented using an {ERC1967Proxy}. Note that this proxy is not by itself upgradeable. It is the role of the implementation to include, alongside the contract's logic, all the code necessary to update the implementation's address that is stored at a specific slot in the proxy's storage space. This is where the {UUPSUpgradeable} contract comes in. Inheriting from it (and overriding the {xref-UUPSUpgradeable-_authorizeUpgrade-address-}[`_authorizeUpgrade`] function with the relevant access control mechanism) will turn your contract into a UUPS compliant implementation. + +Note that since both proxies use the same storage slot for the implementation address, using a UUPS compliant implementation with a {TransparentUpgradeableProxy} might allow non-admins to perform upgrade operations. + +By default, the upgrade functionality included in {UUPSUpgradeable} contains a security mechanism that will prevent any upgrades to a non UUPS compliant implementation. This prevents upgrades to an implementation contract that wouldn't contain the necessary upgrade mechanism, as it would lock the upgradeability of the proxy forever. This security mechanism can be bypassed by either of: + +- Adding a flag mechanism in the implementation that will disable the upgrade function when triggered. +- Upgrading to an implementation that features an upgrade mechanism without the additional security check, and then upgrading again to another implementation without the upgrade mechanism. + +The current implementation of this security mechanism uses https://eips.ethereum.org/EIPS/eip-1822[EIP1822] to detect the storage slot used by the implementation. A previous implementation, now deprecated, relied on a rollback check. It is possible to upgrade from a contract using the old mechanism to a new one. The inverse is however not possible, as old implementations (before version 4.5) did not include the `ERC1822` interface. + +== Core + +{{Proxy}} + +== ERC1967 + +{{IERC1967}} + +{{ERC1967Proxy}} + +{{ERC1967Upgrade}} + +== Transparent Proxy + +{{TransparentUpgradeableProxy}} + +{{ProxyAdmin}} + +== Beacon + +{{BeaconProxy}} + +{{IBeacon}} + +{{UpgradeableBeacon}} + +== Minimal Clones + +{{Clones}} + +== Utils + +{{Initializable}} + +{{UUPSUpgradeable}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol new file mode 100644 index 00000000..7a17d4fc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) + +pragma solidity ^0.8.0; + +/** + * @dev This is the interface that {BeaconProxy} expects of its beacon. + */ +interface IBeaconUpgradeable { + /** + * @dev Must return an address that can be used as a delegate call target. + * + * {BeaconProxy} will check that this address is a contract. + */ + function implementation() external view returns (address); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/Initializable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/Initializable.sol new file mode 100644 index 00000000..47658dc6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/Initializable.sol @@ -0,0 +1,166 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) + +pragma solidity ^0.8.2; + +import "../../utils/AddressUpgradeable.sol"; + +/** + * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed + * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an + * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer + * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. + * + * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be + * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in + * case an upgrade adds a module that needs to be initialized. + * + * For example: + * + * [.hljs-theme-light.nopadding] + * ```solidity + * contract MyToken is ERC20Upgradeable { + * function initialize() initializer public { + * __ERC20_init("MyToken", "MTK"); + * } + * } + * + * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { + * function initializeV2() reinitializer(2) public { + * __ERC20Permit_init("MyToken"); + * } + * } + * ``` + * + * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as + * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. + * + * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure + * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. + * + * [CAUTION] + * ==== + * Avoid leaving a contract uninitialized. + * + * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation + * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke + * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: + * + * [.hljs-theme-light.nopadding] + * ``` + * /// @custom:oz-upgrades-unsafe-allow constructor + * constructor() { + * _disableInitializers(); + * } + * ``` + * ==== + */ +abstract contract Initializable { + /** + * @dev Indicates that the contract has been initialized. + * @custom:oz-retyped-from bool + */ + uint8 private _initialized; + + /** + * @dev Indicates that the contract is in the process of being initialized. + */ + bool private _initializing; + + /** + * @dev Triggered when the contract has been initialized or reinitialized. + */ + event Initialized(uint8 version); + + /** + * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, + * `onlyInitializing` functions can be used to initialize parent contracts. + * + * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a + * constructor. + * + * Emits an {Initialized} event. + */ + modifier initializer() { + bool isTopLevelCall = !_initializing; + require( + (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), + "Initializable: contract is already initialized" + ); + _initialized = 1; + if (isTopLevelCall) { + _initializing = true; + } + _; + if (isTopLevelCall) { + _initializing = false; + emit Initialized(1); + } + } + + /** + * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the + * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be + * used to initialize parent contracts. + * + * A reinitializer may be used after the original initialization step. This is essential to configure modules that + * are added through upgrades and that require initialization. + * + * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` + * cannot be nested. If one is invoked in the context of another, execution will revert. + * + * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in + * a contract, executing them in the right order is up to the developer or operator. + * + * WARNING: setting the version to 255 will prevent any future reinitialization. + * + * Emits an {Initialized} event. + */ + modifier reinitializer(uint8 version) { + require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); + _initialized = version; + _initializing = true; + _; + _initializing = false; + emit Initialized(version); + } + + /** + * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the + * {initializer} and {reinitializer} modifiers, directly or indirectly. + */ + modifier onlyInitializing() { + require(_initializing, "Initializable: contract is not initializing"); + _; + } + + /** + * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. + * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized + * to any version. It is recommended to use this to lock implementation contracts that are designed to be called + * through proxies. + * + * Emits an {Initialized} event the first time it is successfully executed. + */ + function _disableInitializers() internal virtual { + require(!_initializing, "Initializable: contract is initializing"); + if (_initialized != type(uint8).max) { + _initialized = type(uint8).max; + emit Initialized(type(uint8).max); + } + } + + /** + * @dev Returns the highest version that has been initialized. See {reinitializer}. + */ + function _getInitializedVersion() internal view returns (uint8) { + return _initialized; + } + + /** + * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. + */ + function _isInitializing() internal view returns (bool) { + return _initializing; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol new file mode 100644 index 00000000..134d6565 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) + +pragma solidity ^0.8.0; + +import "../../interfaces/draft-IERC1822Upgradeable.sol"; +import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; +import {Initializable} from "./Initializable.sol"; + +/** + * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an + * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. + * + * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is + * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing + * `UUPSUpgradeable` with a custom implementation of upgrades. + * + * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. + * + * _Available since v4.1._ + */ +abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment + address private immutable __self = address(this); + + /** + * @dev Check that the execution is being performed through a delegatecall call and that the execution context is + * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case + * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a + * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to + * fail. + */ + modifier onlyProxy() { + require(address(this) != __self, "Function must be called through delegatecall"); + require(_getImplementation() == __self, "Function must be called through active proxy"); + _; + } + + /** + * @dev Check that the execution is not being performed through a delegate call. This allows a function to be + * callable on the implementing contract but not through proxies. + */ + modifier notDelegated() { + require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); + _; + } + + function __UUPSUpgradeable_init() internal onlyInitializing { + } + + function __UUPSUpgradeable_init_unchained() internal onlyInitializing { + } + /** + * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the + * implementation. It is used to validate the implementation's compatibility when performing an upgrade. + * + * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks + * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this + * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. + */ + function proxiableUUID() external view virtual override notDelegated returns (bytes32) { + return _IMPLEMENTATION_SLOT; + } + + /** + * @dev Upgrade the implementation of the proxy to `newImplementation`. + * + * Calls {_authorizeUpgrade}. + * + * Emits an {Upgraded} event. + * + * @custom:oz-upgrades-unsafe-allow-reachable delegatecall + */ + function upgradeTo(address newImplementation) public virtual onlyProxy { + _authorizeUpgrade(newImplementation); + _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); + } + + /** + * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call + * encoded in `data`. + * + * Calls {_authorizeUpgrade}. + * + * Emits an {Upgraded} event. + * + * @custom:oz-upgrades-unsafe-allow-reachable delegatecall + */ + function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { + _authorizeUpgrade(newImplementation); + _upgradeToAndCallUUPS(newImplementation, data, true); + } + + /** + * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by + * {upgradeTo} and {upgradeToAndCall}. + * + * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. + * + * ```solidity + * function _authorizeUpgrade(address) internal override onlyOwner {} + * ``` + */ + function _authorizeUpgrade(address newImplementation) internal virtual; + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PausableUpgradeable.sol new file mode 100644 index 00000000..ed6e2c01 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PausableUpgradeable.sol @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) + +pragma solidity ^0.8.0; + +import "../utils/ContextUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + function __Pausable_init() internal onlyInitializing { + __Pausable_init_unchained(); + } + + function __Pausable_init_unchained() internal onlyInitializing { + _paused = false; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + _requireNotPaused(); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + _requirePaused(); + _; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view virtual returns (bool) { + return _paused; + } + + /** + * @dev Throws if the contract is paused. + */ + function _requireNotPaused() internal view virtual { + require(!paused(), "Pausable: paused"); + } + + /** + * @dev Throws if the contract is not paused. + */ + function _requirePaused() internal view virtual { + require(paused(), "Pausable: not paused"); + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol new file mode 100644 index 00000000..2fa331bc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (security/PullPayment.sol) + +pragma solidity ^0.8.0; + +import "../utils/escrow/EscrowUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Simple implementation of a + * https://consensys.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/#favor-pull-over-push-for-external-calls[pull-payment] + * strategy, where the paying contract doesn't interact directly with the + * receiver account, which must withdraw its payments itself. + * + * Pull-payments are often considered the best practice when it comes to sending + * Ether, security-wise. It prevents recipients from blocking execution, and + * eliminates reentrancy concerns. + * + * TIP: If you would like to learn more about reentrancy and alternative ways + * to protect against it, check out our blog post + * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + * + * To use, derive from the `PullPayment` contract, and use {_asyncTransfer} + * instead of Solidity's `transfer` function. Payees can query their due + * payments with {payments}, and retrieve them with {withdrawPayments}. + * + * @custom:storage-size 51 + */ +abstract contract PullPaymentUpgradeable is Initializable { + EscrowUpgradeable private _escrow; + + function __PullPayment_init() internal onlyInitializing { + __PullPayment_init_unchained(); + } + + function __PullPayment_init_unchained() internal onlyInitializing { + _escrow = new EscrowUpgradeable(); + _escrow.initialize(); + } + + /** + * @dev Withdraw accumulated payments, forwarding all gas to the recipient. + * + * Note that _any_ account can call this function, not just the `payee`. + * This means that contracts unaware of the `PullPayment` protocol can still + * receive funds this way, by having a separate account call + * {withdrawPayments}. + * + * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. + * Make sure you trust the recipient, or are either following the + * checks-effects-interactions pattern or using {ReentrancyGuard}. + * + * @param payee Whose payments will be withdrawn. + * + * Causes the `escrow` to emit a {Withdrawn} event. + */ + function withdrawPayments(address payable payee) public virtual { + _escrow.withdraw(payee); + } + + /** + * @dev Returns the payments owed to an address. + * @param dest The creditor's address. + */ + function payments(address dest) public view returns (uint256) { + return _escrow.depositsOf(dest); + } + + /** + * @dev Called by the payer to store the sent amount as credit to be pulled. + * Funds sent in this way are stored in an intermediate {Escrow} contract, so + * there is no danger of them being spent before withdrawal. + * + * @param dest The destination address of the funds. + * @param amount The amount to transfer. + * + * Causes the `escrow` to emit a {Deposited} event. + */ + function _asyncTransfer(address dest, uint256 amount) internal virtual { + _escrow.deposit{value: amount}(dest); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc new file mode 100644 index 00000000..66f398fe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc @@ -0,0 +1,20 @@ += Security + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/security + +These contracts aim to cover common security practices. + +* {PullPayment}: A pattern that can be used to avoid reentrancy attacks. +* {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions. +* {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending. + +TIP: For an overview on reentrancy and the possible mechanisms to prevent it, read our article https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + +== Contracts + +{{PullPayment}} + +{{ReentrancyGuard}} + +{{Pausable}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol new file mode 100644 index 00000000..66b24250 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) + +pragma solidity ^0.8.0; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Contract module that helps prevent reentrant calls to a function. + * + * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier + * available, which can be applied to functions to make sure there are no nested + * (reentrant) calls to them. + * + * Note that because there is a single `nonReentrant` guard, functions marked as + * `nonReentrant` may not call one another. This can be worked around by making + * those functions `private`, and then adding `external` `nonReentrant` entry + * points to them. + * + * TIP: If you would like to learn more about reentrancy and alternative ways + * to protect against it, check out our blog post + * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + */ +abstract contract ReentrancyGuardUpgradeable is Initializable { + // Booleans are more expensive than uint256 or any type that takes up a full + // word because each write operation emits an extra SLOAD to first read the + // slot's contents, replace the bits taken up by the boolean, and then write + // back. This is the compiler's defense against contract upgrades and + // pointer aliasing, and it cannot be disabled. + + // The values being non-zero value makes deployment a bit more expensive, + // but in exchange the refund on every call to nonReentrant will be lower in + // amount. Since refunds are capped to a percentage of the total + // transaction's gas, it is best to keep them low in cases like this one, to + // increase the likelihood of the full refund coming into effect. + uint256 private constant _NOT_ENTERED = 1; + uint256 private constant _ENTERED = 2; + + uint256 private _status; + + function __ReentrancyGuard_init() internal onlyInitializing { + __ReentrancyGuard_init_unchained(); + } + + function __ReentrancyGuard_init_unchained() internal onlyInitializing { + _status = _NOT_ENTERED; + } + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + * Calling a `nonReentrant` function from another `nonReentrant` + * function is not supported. It is possible to prevent this from happening + * by making the `nonReentrant` function external, and making it call a + * `private` function that does the actual work. + */ + modifier nonReentrant() { + _nonReentrantBefore(); + _; + _nonReentrantAfter(); + } + + function _nonReentrantBefore() private { + // On the first call to nonReentrant, _status will be _NOT_ENTERED + require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); + + // Any calls to nonReentrant after this point will fail + _status = _ENTERED; + } + + function _nonReentrantAfter() private { + // By storing the original value once again, a refund is triggered (see + // https://eips.ethereum.org/EIPS/eip-2200) + _status = _NOT_ENTERED; + } + + /** + * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a + * `nonReentrant` function in the call stack. + */ + function _reentrancyGuardEntered() internal view returns (bool) { + return _status == _ENTERED; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol new file mode 100644 index 00000000..90561110 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol @@ -0,0 +1,509 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol) + +pragma solidity ^0.8.0; + +import "./IERC1155Upgradeable.sol"; +import "./IERC1155ReceiverUpgradeable.sol"; +import "./extensions/IERC1155MetadataURIUpgradeable.sol"; +import "../../utils/AddressUpgradeable.sol"; +import "../../utils/ContextUpgradeable.sol"; +import "../../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the basic standard multi-token. + * See https://eips.ethereum.org/EIPS/eip-1155 + * Originally based on code by Enjin: https://github.com/enjin/erc-1155 + * + * _Available since v3.1._ + */ +contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { + using AddressUpgradeable for address; + + // Mapping from token ID to account balances + mapping(uint256 => mapping(address => uint256)) private _balances; + + // Mapping from account to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json + string private _uri; + + /** + * @dev See {_setURI}. + */ + function __ERC1155_init(string memory uri_) internal onlyInitializing { + __ERC1155_init_unchained(uri_); + } + + function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { + _setURI(uri_); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { + return + interfaceId == type(IERC1155Upgradeable).interfaceId || + interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC1155MetadataURI-uri}. + * + * This implementation returns the same URI for *all* token types. It relies + * on the token type ID substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. + * + * Clients calling this function must replace the `\{id\}` substring with the + * actual token type ID. + */ + function uri(uint256) public view virtual override returns (string memory) { + return _uri; + } + + /** + * @dev See {IERC1155-balanceOf}. + * + * Requirements: + * + * - `account` cannot be the zero address. + */ + function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { + require(account != address(0), "ERC1155: address zero is not a valid owner"); + return _balances[id][account]; + } + + /** + * @dev See {IERC1155-balanceOfBatch}. + * + * Requirements: + * + * - `accounts` and `ids` must have the same length. + */ + function balanceOfBatch( + address[] memory accounts, + uint256[] memory ids + ) public view virtual override returns (uint256[] memory) { + require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); + + uint256[] memory batchBalances = new uint256[](accounts.length); + + for (uint256 i = 0; i < accounts.length; ++i) { + batchBalances[i] = balanceOf(accounts[i], ids[i]); + } + + return batchBalances; + } + + /** + * @dev See {IERC1155-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC1155-isApprovedForAll}. + */ + function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { + return _operatorApprovals[account][operator]; + } + + /** + * @dev See {IERC1155-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 id, + uint256 amount, + bytes memory data + ) public virtual override { + require( + from == _msgSender() || isApprovedForAll(from, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + _safeTransferFrom(from, to, id, amount, data); + } + + /** + * @dev See {IERC1155-safeBatchTransferFrom}. + */ + function safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) public virtual override { + require( + from == _msgSender() || isApprovedForAll(from, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + _safeBatchTransferFrom(from, to, ids, amounts, data); + } + + /** + * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `from` must have a balance of tokens of type `id` of at least `amount`. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _safeTransferFrom( + address from, + address to, + uint256 id, + uint256 amount, + bytes memory data + ) internal virtual { + require(to != address(0), "ERC1155: transfer to the zero address"); + + address operator = _msgSender(); + uint256[] memory ids = _asSingletonArray(id); + uint256[] memory amounts = _asSingletonArray(amount); + + _beforeTokenTransfer(operator, from, to, ids, amounts, data); + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + _balances[id][to] += amount; + + emit TransferSingle(operator, from, to, id, amount); + + _afterTokenTransfer(operator, from, to, ids, amounts, data); + + _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function _safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual { + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + require(to != address(0), "ERC1155: transfer to the zero address"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, from, to, ids, amounts, data); + + for (uint256 i = 0; i < ids.length; ++i) { + uint256 id = ids[i]; + uint256 amount = amounts[i]; + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + _balances[id][to] += amount; + } + + emit TransferBatch(operator, from, to, ids, amounts); + + _afterTokenTransfer(operator, from, to, ids, amounts, data); + + _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); + } + + /** + * @dev Sets a new URI for all token types, by relying on the token type ID + * substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. + * + * By this mechanism, any occurrence of the `\{id\}` substring in either the + * URI or any of the amounts in the JSON file at said URI will be replaced by + * clients with the token type ID. + * + * For example, the `https://token-cdn-domain/\{id\}.json` URI would be + * interpreted by clients as + * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` + * for token type ID 0x4cce0. + * + * See {uri}. + * + * Because these URIs cannot be meaningfully represented by the {URI} event, + * this function emits no events. + */ + function _setURI(string memory newuri) internal virtual { + _uri = newuri; + } + + /** + * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { + require(to != address(0), "ERC1155: mint to the zero address"); + + address operator = _msgSender(); + uint256[] memory ids = _asSingletonArray(id); + uint256[] memory amounts = _asSingletonArray(amount); + + _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); + + _balances[id][to] += amount; + emit TransferSingle(operator, address(0), to, id, amount); + + _afterTokenTransfer(operator, address(0), to, ids, amounts, data); + + _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `amounts` must have the same length. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function _mintBatch( + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual { + require(to != address(0), "ERC1155: mint to the zero address"); + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); + + for (uint256 i = 0; i < ids.length; i++) { + _balances[ids[i]][to] += amounts[i]; + } + + emit TransferBatch(operator, address(0), to, ids, amounts); + + _afterTokenTransfer(operator, address(0), to, ids, amounts, data); + + _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); + } + + /** + * @dev Destroys `amount` tokens of token type `id` from `from` + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `from` must have at least `amount` tokens of token type `id`. + */ + function _burn(address from, uint256 id, uint256 amount) internal virtual { + require(from != address(0), "ERC1155: burn from the zero address"); + + address operator = _msgSender(); + uint256[] memory ids = _asSingletonArray(id); + uint256[] memory amounts = _asSingletonArray(amount); + + _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + + emit TransferSingle(operator, from, address(0), id, amount); + + _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `amounts` must have the same length. + */ + function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { + require(from != address(0), "ERC1155: burn from the zero address"); + require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); + + for (uint256 i = 0; i < ids.length; i++) { + uint256 id = ids[i]; + uint256 amount = amounts[i]; + + uint256 fromBalance = _balances[id][from]; + require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); + unchecked { + _balances[id][from] = fromBalance - amount; + } + } + + emit TransferBatch(operator, from, address(0), ids, amounts); + + _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Emits an {ApprovalForAll} event. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + require(owner != operator, "ERC1155: setting approval status for self"); + _operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning, as well as batched variants. + * + * The same hook is called on both single and batched variants. For single + * transfers, the length of the `ids` and `amounts` arrays will be 1. + * + * Calling conditions (for each `id` and `amount` pair): + * + * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * of token type `id` will be transferred to `to`. + * - When `from` is zero, `amount` tokens of token type `id` will be minted + * for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` + * will be burned. + * - `from` and `to` are never both zero. + * - `ids` and `amounts` have the same, non-zero length. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual {} + + /** + * @dev Hook that is called after any token transfer. This includes minting + * and burning, as well as batched variants. + * + * The same hook is called on both single and batched variants. For single + * transfers, the length of the `id` and `amount` arrays will be 1. + * + * Calling conditions (for each `id` and `amount` pair): + * + * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * of token type `id` will be transferred to `to`. + * - When `from` is zero, `amount` tokens of token type `id` will be minted + * for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` + * will be burned. + * - `from` and `to` are never both zero. + * - `ids` and `amounts` have the same, non-zero length. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _afterTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual {} + + function _doSafeTransferAcceptanceCheck( + address operator, + address from, + address to, + uint256 id, + uint256 amount, + bytes memory data + ) private { + if (to.isContract()) { + try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { + if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) { + revert("ERC1155: ERC1155Receiver rejected tokens"); + } + } catch Error(string memory reason) { + revert(reason); + } catch { + revert("ERC1155: transfer to non-ERC1155Receiver implementer"); + } + } + } + + function _doSafeBatchTransferAcceptanceCheck( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) private { + if (to.isContract()) { + try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( + bytes4 response + ) { + if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) { + revert("ERC1155: ERC1155Receiver rejected tokens"); + } + } catch Error(string memory reason) { + revert(reason); + } catch { + revert("ERC1155: transfer to non-ERC1155Receiver implementer"); + } + } + } + + function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { + uint256[] memory array = new uint256[](1); + array[0] = element; + + return array; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[47] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol new file mode 100644 index 00000000..2a40cc5a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) + +pragma solidity ^0.8.0; + +import "../../utils/introspection/IERC165Upgradeable.sol"; + +/** + * @dev _Available since v3.1._ + */ +interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { + /** + * @dev Handles the receipt of a single ERC1155 token type. This function is + * called at the end of a `safeTransferFrom` after the balance has been updated. + * + * NOTE: To accept the transfer, this must return + * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` + * (i.e. 0xf23a6e61, or its own function selector). + * + * @param operator The address which initiated the transfer (i.e. msg.sender) + * @param from The address which previously owned the token + * @param id The ID of the token being transferred + * @param value The amount of tokens being transferred + * @param data Additional data with no specified format + * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed + */ + function onERC1155Received( + address operator, + address from, + uint256 id, + uint256 value, + bytes calldata data + ) external returns (bytes4); + + /** + * @dev Handles the receipt of a multiple ERC1155 token types. This function + * is called at the end of a `safeBatchTransferFrom` after the balances have + * been updated. + * + * NOTE: To accept the transfer(s), this must return + * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` + * (i.e. 0xbc197c81, or its own function selector). + * + * @param operator The address which initiated the batch transfer (i.e. msg.sender) + * @param from The address which previously owned the token + * @param ids An array containing ids of each token being transferred (order and length must match values array) + * @param values An array containing amounts of each token being transferred (order and length must match ids array) + * @param data Additional data with no specified format + * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed + */ + function onERC1155BatchReceived( + address operator, + address from, + uint256[] calldata ids, + uint256[] calldata values, + bytes calldata data + ) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol new file mode 100644 index 00000000..461a6d00 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) + +pragma solidity ^0.8.0; + +import "../../utils/introspection/IERC165Upgradeable.sol"; + +/** + * @dev Required interface of an ERC1155 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-1155[EIP]. + * + * _Available since v3.1._ + */ +interface IERC1155Upgradeable is IERC165Upgradeable { + /** + * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. + */ + event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); + + /** + * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all + * transfers. + */ + event TransferBatch( + address indexed operator, + address indexed from, + address indexed to, + uint256[] ids, + uint256[] values + ); + + /** + * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to + * `approved`. + */ + event ApprovalForAll(address indexed account, address indexed operator, bool approved); + + /** + * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. + * + * If an {URI} event was emitted for `id`, the standard + * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value + * returned by {IERC1155MetadataURI-uri}. + */ + event URI(string value, uint256 indexed id); + + /** + * @dev Returns the amount of tokens of token type `id` owned by `account`. + * + * Requirements: + * + * - `account` cannot be the zero address. + */ + function balanceOf(address account, uint256 id) external view returns (uint256); + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. + * + * Requirements: + * + * - `accounts` and `ids` must have the same length. + */ + function balanceOfBatch( + address[] calldata accounts, + uint256[] calldata ids + ) external view returns (uint256[] memory); + + /** + * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, + * + * Emits an {ApprovalForAll} event. + * + * Requirements: + * + * - `operator` cannot be the caller. + */ + function setApprovalForAll(address operator, bool approved) external; + + /** + * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. + * + * See {setApprovalForAll}. + */ + function isApprovedForAll(address account, address operator) external view returns (bool); + + /** + * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. + * - `from` must have a balance of tokens of type `id` of at least `amount`. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `amounts` must have the same length. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function safeBatchTransferFrom( + address from, + address to, + uint256[] calldata ids, + uint256[] calldata amounts, + bytes calldata data + ) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc new file mode 100644 index 00000000..13ffbdbd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc @@ -0,0 +1,49 @@ += ERC 1155 + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc1155 + +This set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-1155[ERC1155 Multi Token Standard]. + +The EIP consists of three interfaces which fulfill different roles, found here as {IERC1155}, {IERC1155MetadataURI} and {IERC1155Receiver}. + +{ERC1155} implements the mandatory {IERC1155} interface, as well as the optional extension {IERC1155MetadataURI}, by relying on the substitution mechanism to use the same URI for all token types, dramatically reducing gas costs. + +Additionally there are multiple custom extensions, including: + +* designation of addresses that can pause token transfers for all users ({ERC1155Pausable}). +* destruction of own tokens ({ERC1155Burnable}). + +NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC1155 (such as <>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc1155.adoc#Presets[ERC1155 Presets] (such as {ERC1155PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts. + +== Core + +{{IERC1155}} + +{{IERC1155MetadataURI}} + +{{ERC1155}} + +{{IERC1155Receiver}} + +{{ERC1155Receiver}} + +== Extensions + +{{ERC1155Pausable}} + +{{ERC1155Burnable}} + +{{ERC1155Supply}} + +{{ERC1155URIStorage}} + +== Presets + +These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code. + +{{ERC1155PresetMinterPauser}} + +== Utilities + +{{ERC1155Holder}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol new file mode 100644 index 00000000..112ec6ce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC1155} that allows token holders to destroy both their + * own tokens and those that they have been approved to use. + * + * _Available since v3.1._ + */ +abstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable { + function __ERC1155Burnable_init() internal onlyInitializing { + } + + function __ERC1155Burnable_init_unchained() internal onlyInitializing { + } + function burn(address account, uint256 id, uint256 value) public virtual { + require( + account == _msgSender() || isApprovedForAll(account, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + + _burn(account, id, value); + } + + function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { + require( + account == _msgSender() || isApprovedForAll(account, _msgSender()), + "ERC1155: caller is not token owner or approved" + ); + + _burnBatch(account, ids, values); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol new file mode 100644 index 00000000..dc766cf7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC1155/extensions/ERC1155Pausable.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155Upgradeable.sol"; +import "../../../security/PausableUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev ERC1155 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract unpausable. + * + * _Available since v3.1._ + */ +abstract contract ERC1155PausableUpgradeable is Initializable, ERC1155Upgradeable, PausableUpgradeable { + function __ERC1155Pausable_init() internal onlyInitializing { + __Pausable_init_unchained(); + } + + function __ERC1155Pausable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC1155-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual override { + super._beforeTokenTransfer(operator, from, to, ids, amounts, data); + + require(!paused(), "ERC1155Pausable: token transfer while paused"); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol new file mode 100644 index 00000000..1b97ad16 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC1155 that adds tracking of total supply per id. + * + * Useful for scenarios where Fungible and Non-fungible tokens have to be + * clearly identified. Note: While a totalSupply of 1 might mean the + * corresponding is an NFT, there is no guarantees that no other token with the + * same id are not going to be minted. + */ +abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { + mapping(uint256 => uint256) private _totalSupply; + + function __ERC1155Supply_init() internal onlyInitializing { + } + + function __ERC1155Supply_init_unchained() internal onlyInitializing { + } + /** + * @dev Total amount of tokens in with a given id. + */ + function totalSupply(uint256 id) public view virtual returns (uint256) { + return _totalSupply[id]; + } + + /** + * @dev Indicates whether any token exist with a given id, or not. + */ + function exists(uint256 id) public view virtual returns (bool) { + return ERC1155SupplyUpgradeable.totalSupply(id) > 0; + } + + /** + * @dev See {ERC1155-_beforeTokenTransfer}. + */ + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual override { + super._beforeTokenTransfer(operator, from, to, ids, amounts, data); + + if (from == address(0)) { + for (uint256 i = 0; i < ids.length; ++i) { + _totalSupply[ids[i]] += amounts[i]; + } + } + + if (to == address(0)) { + for (uint256 i = 0; i < ids.length; ++i) { + uint256 id = ids[i]; + uint256 amount = amounts[i]; + uint256 supply = _totalSupply[id]; + require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); + unchecked { + _totalSupply[id] = supply - amount; + } + } + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol new file mode 100644 index 00000000..d07e60bc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) + +pragma solidity ^0.8.0; + +import "../../../utils/StringsUpgradeable.sol"; +import "../ERC1155Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev ERC1155 token with storage based token URI management. + * Inspired by the ERC721URIStorage extension + * + * _Available since v4.6._ + */ +abstract contract ERC1155URIStorageUpgradeable is Initializable, ERC1155Upgradeable { + using StringsUpgradeable for uint256; + + // Optional base URI + string private _baseURI; + + // Optional mapping for token URIs + mapping(uint256 => string) private _tokenURIs; + + function __ERC1155URIStorage_init() internal onlyInitializing { + __ERC1155URIStorage_init_unchained(); + } + + function __ERC1155URIStorage_init_unchained() internal onlyInitializing { + _baseURI = ""; + } + /** + * @dev See {IERC1155MetadataURI-uri}. + * + * This implementation returns the concatenation of the `_baseURI` + * and the token-specific uri if the latter is set + * + * This enables the following behaviors: + * + * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation + * of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` + * is empty per default); + * + * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` + * which in most cases will contain `ERC1155._uri`; + * + * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a + * uri value set, then the result is empty. + */ + function uri(uint256 tokenId) public view virtual override returns (string memory) { + string memory tokenURI = _tokenURIs[tokenId]; + + // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). + return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); + } + + /** + * @dev Sets `tokenURI` as the tokenURI of `tokenId`. + */ + function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { + _tokenURIs[tokenId] = tokenURI; + emit URI(uri(tokenId), tokenId); + } + + /** + * @dev Sets `baseURI` as the `_baseURI` for all tokens + */ + function _setBaseURI(string memory baseURI) internal virtual { + _baseURI = baseURI; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol new file mode 100644 index 00000000..e47f021d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) + +pragma solidity ^0.8.0; + +import "../IERC1155Upgradeable.sol"; + +/** + * @dev Interface of the optional ERC1155MetadataExtension interface, as defined + * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. + * + * _Available since v3.1._ + */ +interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { + /** + * @dev Returns the URI for token type `id`. + * + * If the `\{id\}` substring is present in the URI, it must be replaced by + * clients with the actual token type ID. + */ + function uri(uint256 id) external view returns (string memory); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol new file mode 100644 index 00000000..9b807b19 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol) + +pragma solidity ^0.8.0; + +import "../ERC1155Upgradeable.sol"; +import "../extensions/ERC1155BurnableUpgradeable.sol"; +import "../extensions/ERC1155PausableUpgradeable.sol"; +import "../../../access/AccessControlEnumerableUpgradeable.sol"; +import "../../../utils/ContextUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev {ERC1155} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC1155PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC1155BurnableUpgradeable, ERC1155PausableUpgradeable { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + function initialize(string memory uri) public virtual initializer { + __ERC1155PresetMinterPauser_init(uri); + } + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that + * deploys the contract. + */ + function __ERC1155PresetMinterPauser_init(string memory uri) internal onlyInitializing { + __ERC1155_init_unchained(uri); + __Pausable_init_unchained(); + __ERC1155PresetMinterPauser_init_unchained(uri); + } + + function __ERC1155PresetMinterPauser_init_unchained(string memory) internal onlyInitializing { + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + } + + /** + * @dev Creates `amount` new tokens for `to`, of token type `id`. + * + * See {ERC1155-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to, uint256 id, uint256 amount, bytes memory data) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); + + _mint(to, id, amount, data); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}. + */ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); + + _mintBatch(to, ids, amounts, data); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC1155Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC1155Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to unpause"); + _unpause(); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(AccessControlEnumerableUpgradeable, ERC1155Upgradeable) returns (bool) { + return super.supportsInterface(interfaceId); + } + + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal virtual override(ERC1155Upgradeable, ERC1155PausableUpgradeable) { + super._beforeTokenTransfer(operator, from, to, ids, amounts, data); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md new file mode 100644 index 00000000..468200b7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md @@ -0,0 +1 @@ +Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol new file mode 100644 index 00000000..00b16a4a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) + +pragma solidity ^0.8.0; + +import "./ERC1155ReceiverUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. + * + * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be + * stuck. + * + * @dev _Available since v3.1._ + */ +contract ERC1155HolderUpgradeable is Initializable, ERC1155ReceiverUpgradeable { + function __ERC1155Holder_init() internal onlyInitializing { + } + + function __ERC1155Holder_init_unchained() internal onlyInitializing { + } + function onERC1155Received( + address, + address, + uint256, + uint256, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155Received.selector; + } + + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual override returns (bytes4) { + return this.onERC1155BatchReceived.selector; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol new file mode 100644 index 00000000..19b7cc60 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) + +pragma solidity ^0.8.0; + +import "../IERC1155ReceiverUpgradeable.sol"; +import "../../../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev _Available since v3.1._ + */ +abstract contract ERC1155ReceiverUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable { + function __ERC1155Receiver_init() internal onlyInitializing { + } + + function __ERC1155Receiver_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { + return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol new file mode 100644 index 00000000..bbb2c87b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol @@ -0,0 +1,377 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) + +pragma solidity ^0.8.0; + +import "./IERC20Upgradeable.sol"; +import "./extensions/IERC20MetadataUpgradeable.sol"; +import "../../utils/ContextUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * For a generic mechanism see {ERC20PresetMinterPauser}. + * + * TIP: For a detailed writeup see our guide + * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * The default value of {decimals} is 18. To change this, you should override + * this function so it returns a different value. + * + * We have followed general OpenZeppelin Contracts guidelines: functions revert + * instead returning `false` on failure. This behavior is nonetheless + * conventional and does not conflict with the expectations of ERC20 + * applications. + * + * Additionally, an {Approval} event is emitted on calls to {transferFrom}. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} + * functions have been added to mitigate the well-known issues around setting + * allowances. See {IERC20-approve}. + */ +contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { + mapping(address => uint256) private _balances; + + mapping(address => mapping(address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + /** + * @dev Sets the values for {name} and {symbol}. + * + * All two of these values are immutable: they can only be set once during + * construction. + */ + function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { + __ERC20_init_unchained(name_, symbol_); + } + + function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5.05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the default value returned by this function, unless + * it's overridden. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view virtual override returns (uint8) { + return 18; + } + + /** + * @dev See {IERC20-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view virtual override returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address to, uint256 amount) public virtual override returns (bool) { + address owner = _msgSender(); + _transfer(owner, to, amount); + return true; + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) public view virtual override returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on + * `transferFrom`. This is semantically equivalent to an infinite approval. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public virtual override returns (bool) { + address owner = _msgSender(); + _approve(owner, spender, amount); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {ERC20}. + * + * NOTE: Does not update the allowance if the current allowance + * is the maximum `uint256`. + * + * Requirements: + * + * - `from` and `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + * - the caller must have allowance for ``from``'s tokens of at least + * `amount`. + */ + function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { + address spender = _msgSender(); + _spendAllowance(from, spender, amount); + _transfer(from, to, amount); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { + address owner = _msgSender(); + _approve(owner, spender, allowance(owner, spender) + addedValue); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { + address owner = _msgSender(); + uint256 currentAllowance = allowance(owner, spender); + require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); + unchecked { + _approve(owner, spender, currentAllowance - subtractedValue); + } + + return true; + } + + /** + * @dev Moves `amount` of tokens from `from` to `to`. + * + * This internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `from` must have a balance of at least `amount`. + */ + function _transfer(address from, address to, uint256 amount) internal virtual { + require(from != address(0), "ERC20: transfer from the zero address"); + require(to != address(0), "ERC20: transfer to the zero address"); + + _beforeTokenTransfer(from, to, amount); + + uint256 fromBalance = _balances[from]; + require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); + unchecked { + _balances[from] = fromBalance - amount; + // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by + // decrementing then incrementing. + _balances[to] += amount; + } + + emit Transfer(from, to, amount); + + _afterTokenTransfer(from, to, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements: + * + * - `account` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: mint to the zero address"); + + _beforeTokenTransfer(address(0), account, amount); + + _totalSupply += amount; + unchecked { + // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. + _balances[account] += amount; + } + emit Transfer(address(0), account, amount); + + _afterTokenTransfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements: + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: burn from the zero address"); + + _beforeTokenTransfer(account, address(0), amount); + + uint256 accountBalance = _balances[account]; + require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); + unchecked { + _balances[account] = accountBalance - amount; + // Overflow not possible: amount <= accountBalance <= totalSupply. + _totalSupply -= amount; + } + + emit Transfer(account, address(0), amount); + + _afterTokenTransfer(account, address(0), amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. + * + * This internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 amount) internal virtual { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } + + /** + * @dev Updates `owner` s allowance for `spender` based on spent `amount`. + * + * Does not update the allowance amount in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Might emit an {Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { + uint256 currentAllowance = allowance(owner, spender); + if (currentAllowance != type(uint256).max) { + require(currentAllowance >= amount, "ERC20: insufficient allowance"); + unchecked { + _approve(owner, spender, currentAllowance - amount); + } + } + } + + /** + * @dev Hook that is called before any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * will be transferred to `to`. + * - when `from` is zero, `amount` tokens will be minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} + + /** + * @dev Hook that is called after any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * has been transferred to `to`. + * - when `from` is zero, `amount` tokens have been minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens have been burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[45] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol new file mode 100644 index 00000000..f57407b4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. + */ +interface IERC20Upgradeable { + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to {approve}. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); + + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `to`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address to, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through {transferFrom}. This is + * zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `from` to `to` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 amount) external returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc new file mode 100644 index 00000000..4d1cc0f2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc @@ -0,0 +1,80 @@ += ERC 20 + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc20 + +This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC20 Token Standard]. + +TIP: For an overview of ERC20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide]. + +There are a few core contracts that implement the behavior specified in the EIP: + +* {IERC20}: the interface all ERC20 implementations should conform to. +* {IERC20Metadata}: the extended ERC20 interface including the <>, <> and <> functions. +* {ERC20}: the implementation of the ERC20 interface, including the <>, <> and <> optional standard extension to the base interface. + +Additionally there are multiple custom extensions, including: + +* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612). +* {ERC20Burnable}: destruction of own tokens. +* {ERC20Capped}: enforcement of a cap to the total supply when minting tokens. +* {ERC20Pausable}: ability to pause token transfers. +* {ERC20Snapshot}: efficient storage of past token balances to be later queried at any point in time. +* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156). +* {ERC20Votes}: support for voting and vote delegation. +* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions). +* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}. +* {ERC4626}: tokenized vault that manages shares (represented as ERC20) that are backed by assets (another ERC20). + +Finally, there are some utilities to interact with ERC20 contracts in various ways. + +* {SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values. +* {TokenTimelock}: hold tokens for a beneficiary until a specified time. + +NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc20.adoc#Presets[ERC20 Presets] (such as {ERC20PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts. + +== Core + +{{IERC20}} + +{{IERC20Metadata}} + +{{ERC20}} + +== Extensions + +{{IERC20Permit}} + +{{ERC20Permit}} + +{{ERC20Burnable}} + +{{ERC20Capped}} + +{{ERC20Pausable}} + +{{ERC20Snapshot}} + +{{ERC20Votes}} + +{{ERC20VotesComp}} + +{{ERC20Wrapper}} + +{{ERC20FlashMint}} + +{{ERC4626}} + +== Presets + +These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code. + +{{ERC20PresetMinterPauser}} + +{{ERC20PresetFixedSupply}} + +== Utilities + +{{SafeERC20}} + +{{TokenTimelock}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol new file mode 100644 index 00000000..7fabbcaa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) + +pragma solidity ^0.8.0; + +import "../ERC20Upgradeable.sol"; +import "../../../utils/ContextUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC20} that allows token holders to destroy both their own + * tokens and those that they have an allowance for, in a way that can be + * recognized off-chain (via event analysis). + */ +abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable { + function __ERC20Burnable_init() internal onlyInitializing { + } + + function __ERC20Burnable_init_unchained() internal onlyInitializing { + } + /** + * @dev Destroys `amount` tokens from the caller. + * + * See {ERC20-_burn}. + */ + function burn(uint256 amount) public virtual { + _burn(_msgSender(), amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, deducting from the caller's + * allowance. + * + * See {ERC20-_burn} and {ERC20-allowance}. + * + * Requirements: + * + * - the caller must have allowance for ``accounts``'s tokens of at least + * `amount`. + */ + function burnFrom(address account, uint256 amount) public virtual { + _spendAllowance(account, _msgSender(), amount); + _burn(account, amount); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol new file mode 100644 index 00000000..b85257e2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) + +pragma solidity ^0.8.0; + +import "../ERC20Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC20} that adds a cap to the supply of tokens. + * + * @custom:storage-size 51 + */ +abstract contract ERC20CappedUpgradeable is Initializable, ERC20Upgradeable { + uint256 private _cap; + + /** + * @dev Sets the value of the `cap`. This value is immutable, it can only be + * set once during construction. + */ + function __ERC20Capped_init(uint256 cap_) internal onlyInitializing { + __ERC20Capped_init_unchained(cap_); + } + + function __ERC20Capped_init_unchained(uint256 cap_) internal onlyInitializing { + require(cap_ > 0, "ERC20Capped: cap is 0"); + _cap = cap_; + } + + /** + * @dev Returns the cap on the token's total supply. + */ + function cap() public view virtual returns (uint256) { + return _cap; + } + + /** + * @dev See {ERC20-_mint}. + */ + function _mint(address account, uint256 amount) internal virtual override { + require(ERC20Upgradeable.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded"); + super._mint(account, amount); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol new file mode 100644 index 00000000..9e030996 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/ERC20FlashMint.sol) + +pragma solidity ^0.8.0; + +import "../../../interfaces/IERC3156FlashBorrowerUpgradeable.sol"; +import "../../../interfaces/IERC3156FlashLenderUpgradeable.sol"; +import "../ERC20Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the ERC3156 Flash loans extension, as defined in + * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. + * + * Adds the {flashLoan} method, which provides flash loan support at the token + * level. By default there is no fee, but this can be changed by overriding {flashFee}. + * + * _Available since v4.1._ + */ +abstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, IERC3156FlashLenderUpgradeable { + bytes32 private constant _RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); + + function __ERC20FlashMint_init() internal onlyInitializing { + } + + function __ERC20FlashMint_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns the maximum amount of tokens available for loan. + * @param token The address of the token that is requested. + * @return The amount of token that can be loaned. + */ + function maxFlashLoan(address token) public view virtual override returns (uint256) { + return token == address(this) ? type(uint256).max - ERC20Upgradeable.totalSupply() : 0; + } + + /** + * @dev Returns the fee applied when doing flash loans. This function calls + * the {_flashFee} function which returns the fee applied when doing flash + * loans. + * @param token The token to be flash loaned. + * @param amount The amount of tokens to be loaned. + * @return The fees applied to the corresponding flash loan. + */ + function flashFee(address token, uint256 amount) public view virtual override returns (uint256) { + require(token == address(this), "ERC20FlashMint: wrong token"); + return _flashFee(token, amount); + } + + /** + * @dev Returns the fee applied when doing flash loans. By default this + * implementation has 0 fees. This function can be overloaded to make + * the flash loan mechanism deflationary. + * @param token The token to be flash loaned. + * @param amount The amount of tokens to be loaned. + * @return The fees applied to the corresponding flash loan. + */ + function _flashFee(address token, uint256 amount) internal view virtual returns (uint256) { + // silence warning about unused variable without the addition of bytecode. + token; + amount; + return 0; + } + + /** + * @dev Returns the receiver address of the flash fee. By default this + * implementation returns the address(0) which means the fee amount will be burnt. + * This function can be overloaded to change the fee receiver. + * @return The address for which the flash fee will be sent to. + */ + function _flashFeeReceiver() internal view virtual returns (address) { + return address(0); + } + + /** + * @dev Performs a flash loan. New tokens are minted and sent to the + * `receiver`, who is required to implement the {IERC3156FlashBorrower} + * interface. By the end of the flash loan, the receiver is expected to own + * amount + fee tokens and have them approved back to the token contract itself so + * they can be burned. + * @param receiver The receiver of the flash loan. Should implement the + * {IERC3156FlashBorrower-onFlashLoan} interface. + * @param token The token to be flash loaned. Only `address(this)` is + * supported. + * @param amount The amount of tokens to be loaned. + * @param data An arbitrary datafield that is passed to the receiver. + * @return `true` if the flash loan was successful. + */ + // This function can reenter, but it doesn't pose a risk because it always preserves the property that the amount + // minted at the beginning is always recovered and burned at the end, or else the entire function will revert. + // slither-disable-next-line reentrancy-no-eth + function flashLoan( + IERC3156FlashBorrowerUpgradeable receiver, + address token, + uint256 amount, + bytes calldata data + ) public virtual override returns (bool) { + require(amount <= maxFlashLoan(token), "ERC20FlashMint: amount exceeds maxFlashLoan"); + uint256 fee = flashFee(token, amount); + _mint(address(receiver), amount); + require( + receiver.onFlashLoan(msg.sender, token, amount, fee, data) == _RETURN_VALUE, + "ERC20FlashMint: invalid return value" + ); + address flashFeeReceiver = _flashFeeReceiver(); + _spendAllowance(address(receiver), address(this), amount + fee); + if (fee == 0 || flashFeeReceiver == address(0)) { + _burn(address(receiver), amount + fee); + } else { + _burn(address(receiver), amount); + _transfer(address(receiver), flashFeeReceiver, fee); + } + return true; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol new file mode 100644 index 00000000..2db1ef52 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol) + +pragma solidity ^0.8.0; + +import "../ERC20Upgradeable.sol"; +import "../../../security/PausableUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev ERC20 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract unpausable. + */ +abstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable { + function __ERC20Pausable_init() internal onlyInitializing { + __Pausable_init_unchained(); + } + + function __ERC20Pausable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC20-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { + super._beforeTokenTransfer(from, to, amount); + + require(!paused(), "ERC20Pausable: token transfer while paused"); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol new file mode 100644 index 00000000..1d84d386 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol) + +pragma solidity ^0.8.0; + +import "./IERC20PermitUpgradeable.sol"; +import "../ERC20Upgradeable.sol"; +import "../../../utils/cryptography/ECDSAUpgradeable.sol"; +import "../../../utils/cryptography/EIP712Upgradeable.sol"; +import "../../../utils/CountersUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * + * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't + * need to send a transaction, and thus is not required to hold Ether at all. + * + * _Available since v3.4._ + * + * @custom:storage-size 51 + */ +abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable { + using CountersUpgradeable for CountersUpgradeable.Counter; + + mapping(address => CountersUpgradeable.Counter) private _nonces; + + // solhint-disable-next-line var-name-mixedcase + bytes32 private constant _PERMIT_TYPEHASH = + keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); + /** + * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. + * However, to ensure consistency with the upgradeable transpiler, we will continue + * to reserve a slot. + * @custom:oz-renamed-from _PERMIT_TYPEHASH + */ + // solhint-disable-next-line var-name-mixedcase + bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; + + /** + * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. + * + * It's a good idea to use the same `name` that is defined as the ERC20 token name. + */ + function __ERC20Permit_init(string memory name) internal onlyInitializing { + __EIP712_init_unchained(name, "1"); + } + + function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {} + + /** + * @inheritdoc IERC20PermitUpgradeable + */ + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override { + require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); + + bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); + + bytes32 hash = _hashTypedDataV4(structHash); + + address signer = ECDSAUpgradeable.recover(hash, v, r, s); + require(signer == owner, "ERC20Permit: invalid signature"); + + _approve(owner, spender, value); + } + + /** + * @inheritdoc IERC20PermitUpgradeable + */ + function nonces(address owner) public view virtual override returns (uint256) { + return _nonces[owner].current(); + } + + /** + * @inheritdoc IERC20PermitUpgradeable + */ + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view override returns (bytes32) { + return _domainSeparatorV4(); + } + + /** + * @dev "Consume a nonce": return the current value and increment. + * + * _Available since v4.1._ + */ + function _useNonce(address owner) internal virtual returns (uint256 current) { + CountersUpgradeable.Counter storage nonce = _nonces[owner]; + current = nonce.current(); + nonce.increment(); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol new file mode 100644 index 00000000..13c9b8fa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Snapshot.sol) + +pragma solidity ^0.8.0; + +import "../ERC20Upgradeable.sol"; +import "../../../utils/ArraysUpgradeable.sol"; +import "../../../utils/CountersUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and + * total supply at the time are recorded for later access. + * + * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. + * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different + * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be + * used to create an efficient ERC20 forking mechanism. + * + * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a + * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot + * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id + * and the account address. + * + * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it + * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this + * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract. + * + * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient + * alternative consider {ERC20Votes}. + * + * ==== Gas Costs + * + * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log + * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much + * smaller since identical balances in subsequent snapshots are stored as a single entry. + * + * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is + * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent + * transfers will have normal cost until the next snapshot, and so on. + */ + +abstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable { + // Inspired by Jordi Baylina's MiniMeToken to record historical balances: + // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol + + using ArraysUpgradeable for uint256[]; + using CountersUpgradeable for CountersUpgradeable.Counter; + + // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a + // Snapshot struct, but that would impede usage of functions that work on an array. + struct Snapshots { + uint256[] ids; + uint256[] values; + } + + mapping(address => Snapshots) private _accountBalanceSnapshots; + Snapshots private _totalSupplySnapshots; + + // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. + CountersUpgradeable.Counter private _currentSnapshotId; + + /** + * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. + */ + event Snapshot(uint256 id); + + function __ERC20Snapshot_init() internal onlyInitializing { + } + + function __ERC20Snapshot_init_unchained() internal onlyInitializing { + } + /** + * @dev Creates a new snapshot and returns its snapshot id. + * + * Emits a {Snapshot} event that contains the same id. + * + * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a + * set of accounts, for example using {AccessControl}, or it may be open to the public. + * + * [WARNING] + * ==== + * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, + * you must consider that it can potentially be used by attackers in two ways. + * + * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow + * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target + * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs + * section above. + * + * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. + * ==== + */ + function _snapshot() internal virtual returns (uint256) { + _currentSnapshotId.increment(); + + uint256 currentId = _getCurrentSnapshotId(); + emit Snapshot(currentId); + return currentId; + } + + /** + * @dev Get the current snapshotId + */ + function _getCurrentSnapshotId() internal view virtual returns (uint256) { + return _currentSnapshotId.current(); + } + + /** + * @dev Retrieves the balance of `account` at the time `snapshotId` was created. + */ + function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) { + (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); + + return snapshotted ? value : balanceOf(account); + } + + /** + * @dev Retrieves the total supply at the time `snapshotId` was created. + */ + function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) { + (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); + + return snapshotted ? value : totalSupply(); + } + + // Update balance and/or total supply snapshots before the values are modified. This is implemented + // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { + super._beforeTokenTransfer(from, to, amount); + + if (from == address(0)) { + // mint + _updateAccountSnapshot(to); + _updateTotalSupplySnapshot(); + } else if (to == address(0)) { + // burn + _updateAccountSnapshot(from); + _updateTotalSupplySnapshot(); + } else { + // transfer + _updateAccountSnapshot(from); + _updateAccountSnapshot(to); + } + } + + function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { + require(snapshotId > 0, "ERC20Snapshot: id is 0"); + require(snapshotId <= _getCurrentSnapshotId(), "ERC20Snapshot: nonexistent id"); + + // When a valid snapshot is queried, there are three possibilities: + // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never + // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds + // to this id is the current one. + // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the + // requested id, and its value is the one to return. + // c) More snapshots were created after the requested one, and the queried value was later modified. There will be + // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is + // larger than the requested one. + // + // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if + // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does + // exactly this. + + uint256 index = snapshots.ids.findUpperBound(snapshotId); + + if (index == snapshots.ids.length) { + return (false, 0); + } else { + return (true, snapshots.values[index]); + } + } + + function _updateAccountSnapshot(address account) private { + _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); + } + + function _updateTotalSupplySnapshot() private { + _updateSnapshot(_totalSupplySnapshots, totalSupply()); + } + + function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { + uint256 currentId = _getCurrentSnapshotId(); + if (_lastSnapshotId(snapshots.ids) < currentId) { + snapshots.ids.push(currentId); + snapshots.values.push(currentValue); + } + } + + function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { + if (ids.length == 0) { + return 0; + } else { + return ids[ids.length - 1]; + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[46] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol new file mode 100644 index 00000000..73c9ae55 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20VotesComp.sol) + +pragma solidity ^0.8.0; + +import "./ERC20VotesUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC20 to support Compound's voting and delegation. This version exactly matches Compound's + * interface, with the drawback of only supporting supply up to (2^96^ - 1). + * + * NOTE: You should use this contract if you need exact compatibility with COMP (for example in order to use your token + * with Governor Alpha or Bravo) and if you are sure the supply cap of 2^96^ is enough for you. Otherwise, use the + * {ERC20Votes} variant of this module. + * + * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either + * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting + * power can be queried through the public accessors {getCurrentVotes} and {getPriorVotes}. + * + * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it + * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. + * + * _Available since v4.2._ + */ +abstract contract ERC20VotesCompUpgradeable is Initializable, ERC20VotesUpgradeable { + function __ERC20VotesComp_init() internal onlyInitializing { + } + + function __ERC20VotesComp_init_unchained() internal onlyInitializing { + } + /** + * @dev Comp version of the {getVotes} accessor, with `uint96` return type. + */ + function getCurrentVotes(address account) external view virtual returns (uint96) { + return SafeCastUpgradeable.toUint96(getVotes(account)); + } + + /** + * @dev Comp version of the {getPastVotes} accessor, with `uint96` return type. + */ + function getPriorVotes(address account, uint256 blockNumber) external view virtual returns (uint96) { + return SafeCastUpgradeable.toUint96(getPastVotes(account, blockNumber)); + } + + /** + * @dev Maximum token supply. Reduced to `type(uint96).max` (2^96^ - 1) to fit COMP interface. + */ + function _maxSupply() internal view virtual override returns (uint224) { + return type(uint96).max; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol new file mode 100644 index 00000000..aefd66b8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol @@ -0,0 +1,303 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol) + +pragma solidity ^0.8.0; + +import "./ERC20PermitUpgradeable.sol"; +import "../../../interfaces/IERC5805Upgradeable.sol"; +import "../../../utils/math/MathUpgradeable.sol"; +import "../../../utils/math/SafeCastUpgradeable.sol"; +import "../../../utils/cryptography/ECDSAUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, + * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. + * + * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module. + * + * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either + * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting + * power can be queried through the public accessors {getVotes} and {getPastVotes}. + * + * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it + * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. + * + * _Available since v4.2._ + */ +abstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable, IERC5805Upgradeable { + struct Checkpoint { + uint32 fromBlock; + uint224 votes; + } + + bytes32 private constant _DELEGATION_TYPEHASH = + keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); + + mapping(address => address) private _delegates; + mapping(address => Checkpoint[]) private _checkpoints; + Checkpoint[] private _totalSupplyCheckpoints; + + function __ERC20Votes_init() internal onlyInitializing { + } + + function __ERC20Votes_init_unchained() internal onlyInitializing { + } + /** + * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). + */ + function clock() public view virtual override returns (uint48) { + return SafeCastUpgradeable.toUint48(block.number); + } + + /** + * @dev Description of the clock + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + // Check that the clock was not modified + require(clock() == block.number, "ERC20Votes: broken clock mode"); + return "mode=blocknumber&from=default"; + } + + /** + * @dev Get the `pos`-th checkpoint for `account`. + */ + function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) { + return _checkpoints[account][pos]; + } + + /** + * @dev Get number of checkpoints for `account`. + */ + function numCheckpoints(address account) public view virtual returns (uint32) { + return SafeCastUpgradeable.toUint32(_checkpoints[account].length); + } + + /** + * @dev Get the address `account` is currently delegating to. + */ + function delegates(address account) public view virtual override returns (address) { + return _delegates[account]; + } + + /** + * @dev Gets the current votes balance for `account` + */ + function getVotes(address account) public view virtual override returns (uint256) { + uint256 pos = _checkpoints[account].length; + unchecked { + return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes; + } + } + + /** + * @dev Retrieve the number of votes for `account` at the end of `timepoint`. + * + * Requirements: + * + * - `timepoint` must be in the past + */ + function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "ERC20Votes: future lookup"); + return _checkpointsLookup(_checkpoints[account], timepoint); + } + + /** + * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. + * It is NOT the sum of all the delegated votes! + * + * Requirements: + * + * - `timepoint` must be in the past + */ + function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { + require(timepoint < clock(), "ERC20Votes: future lookup"); + return _checkpointsLookup(_totalSupplyCheckpoints, timepoint); + } + + /** + * @dev Lookup a value in a list of (sorted) checkpoints. + */ + function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 timepoint) private view returns (uint256) { + // We run a binary search to look for the last (most recent) checkpoint taken before (or at) `timepoint`. + // + // Initially we check if the block is recent to narrow the search range. + // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). + // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. + // - If the middle checkpoint is after `timepoint`, we look in [low, mid) + // - If the middle checkpoint is before or equal to `timepoint`, we look in [mid+1, high) + // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not + // out of bounds (in which case we're looking too far in the past and the result is 0). + // Note that if the latest checkpoint available is exactly for `timepoint`, we end up with an index that is + // past the end of the array, so we technically don't find a checkpoint after `timepoint`, but it works out + // the same. + uint256 length = ckpts.length; + + uint256 low = 0; + uint256 high = length; + + if (length > 5) { + uint256 mid = length - MathUpgradeable.sqrt(length); + if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { + high = mid; + } else { + low = mid + 1; + } + } + + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { + high = mid; + } else { + low = mid + 1; + } + } + + unchecked { + return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes; + } + } + + /** + * @dev Delegate votes from the sender to `delegatee`. + */ + function delegate(address delegatee) public virtual override { + _delegate(_msgSender(), delegatee); + } + + /** + * @dev Delegates votes from signer to `delegatee` + */ + function delegateBySig( + address delegatee, + uint256 nonce, + uint256 expiry, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual override { + require(block.timestamp <= expiry, "ERC20Votes: signature expired"); + address signer = ECDSAUpgradeable.recover( + _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), + v, + r, + s + ); + require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce"); + _delegate(signer, delegatee); + } + + /** + * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). + */ + function _maxSupply() internal view virtual returns (uint224) { + return type(uint224).max; + } + + /** + * @dev Snapshots the totalSupply after it has been increased. + */ + function _mint(address account, uint256 amount) internal virtual override { + super._mint(account, amount); + require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes"); + + _writeCheckpoint(_totalSupplyCheckpoints, _add, amount); + } + + /** + * @dev Snapshots the totalSupply after it has been decreased. + */ + function _burn(address account, uint256 amount) internal virtual override { + super._burn(account, amount); + + _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount); + } + + /** + * @dev Move voting power when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override { + super._afterTokenTransfer(from, to, amount); + + _moveVotingPower(delegates(from), delegates(to), amount); + } + + /** + * @dev Change delegation for `delegator` to `delegatee`. + * + * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. + */ + function _delegate(address delegator, address delegatee) internal virtual { + address currentDelegate = delegates(delegator); + uint256 delegatorBalance = balanceOf(delegator); + _delegates[delegator] = delegatee; + + emit DelegateChanged(delegator, currentDelegate, delegatee); + + _moveVotingPower(currentDelegate, delegatee, delegatorBalance); + } + + function _moveVotingPower(address src, address dst, uint256 amount) private { + if (src != dst && amount > 0) { + if (src != address(0)) { + (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount); + emit DelegateVotesChanged(src, oldWeight, newWeight); + } + + if (dst != address(0)) { + (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount); + emit DelegateVotesChanged(dst, oldWeight, newWeight); + } + } + } + + function _writeCheckpoint( + Checkpoint[] storage ckpts, + function(uint256, uint256) view returns (uint256) op, + uint256 delta + ) private returns (uint256 oldWeight, uint256 newWeight) { + uint256 pos = ckpts.length; + + unchecked { + Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1); + + oldWeight = oldCkpt.votes; + newWeight = op(oldWeight, delta); + + if (pos > 0 && oldCkpt.fromBlock == clock()) { + _unsafeAccess(ckpts, pos - 1).votes = SafeCastUpgradeable.toUint224(newWeight); + } else { + ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(clock()), votes: SafeCastUpgradeable.toUint224(newWeight)})); + } + } + } + + function _add(uint256 a, uint256 b) private pure returns (uint256) { + return a + b; + } + + function _subtract(uint256 a, uint256 b) private pure returns (uint256) { + return a - b; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) { + assembly { + mstore(0, ckpts.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[47] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol new file mode 100644 index 00000000..349bf811 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Wrapper.sol) + +pragma solidity ^0.8.0; + +import "../ERC20Upgradeable.sol"; +import "../utils/SafeERC20Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of the ERC20 token contract to support token wrapping. + * + * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful + * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the + * wrapping of an existing "basic" ERC20 into a governance token. + * + * _Available since v4.2._ + * + * @custom:storage-size 51 + */ +abstract contract ERC20WrapperUpgradeable is Initializable, ERC20Upgradeable { + IERC20Upgradeable private _underlying; + + function __ERC20Wrapper_init(IERC20Upgradeable underlyingToken) internal onlyInitializing { + __ERC20Wrapper_init_unchained(underlyingToken); + } + + function __ERC20Wrapper_init_unchained(IERC20Upgradeable underlyingToken) internal onlyInitializing { + require(underlyingToken != this, "ERC20Wrapper: cannot self wrap"); + _underlying = underlyingToken; + } + + /** + * @dev See {ERC20-decimals}. + */ + function decimals() public view virtual override returns (uint8) { + try IERC20MetadataUpgradeable(address(_underlying)).decimals() returns (uint8 value) { + return value; + } catch { + return super.decimals(); + } + } + + /** + * @dev Returns the address of the underlying ERC-20 token that is being wrapped. + */ + function underlying() public view returns (IERC20Upgradeable) { + return _underlying; + } + + /** + * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens. + */ + function depositFor(address account, uint256 amount) public virtual returns (bool) { + address sender = _msgSender(); + require(sender != address(this), "ERC20Wrapper: wrapper can't deposit"); + SafeERC20Upgradeable.safeTransferFrom(_underlying, sender, address(this), amount); + _mint(account, amount); + return true; + } + + /** + * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens. + */ + function withdrawTo(address account, uint256 amount) public virtual returns (bool) { + _burn(_msgSender(), amount); + SafeERC20Upgradeable.safeTransfer(_underlying, account, amount); + return true; + } + + /** + * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal + * function that can be exposed with access control if desired. + */ + function _recover(address account) internal virtual returns (uint256) { + uint256 value = _underlying.balanceOf(address(this)) - totalSupply(); + _mint(account, value); + return value; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol new file mode 100644 index 00000000..1470be61 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol @@ -0,0 +1,268 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC4626.sol) + +pragma solidity ^0.8.0; + +import "../ERC20Upgradeable.sol"; +import "../utils/SafeERC20Upgradeable.sol"; +import "../../../interfaces/IERC4626Upgradeable.sol"; +import "../../../utils/math/MathUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the ERC4626 "Tokenized Vault Standard" as defined in + * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626]. + * + * This extension allows the minting and burning of "shares" (represented using the ERC20 inheritance) in exchange for + * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends + * the ERC20 standard. Any additional extensions included along it would affect the "shares" token represented by this + * contract and not the "assets" token which is an independent contract. + * + * [CAUTION] + * ==== + * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning + * with a "donation" to the vault that inflates the price of a share. This is variously known as a donation or inflation + * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial + * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may + * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by + * verifying the amount received is as expected, using a wrapper that performs these checks such as + * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. + * + * Since v4.9, this implementation uses virtual assets and shares to mitigate that risk. The `_decimalsOffset()` + * corresponds to an offset in the decimal representation between the underlying asset's decimals and the vault + * decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which itself + * determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default offset + * (0) makes it non-profitable, as a result of the value being captured by the virtual shares (out of the attacker's + * donation) matching the attacker's expected gains. With a larger offset, the attack becomes orders of magnitude more + * expensive than it is profitable. More details about the underlying math can be found + * xref:erc4626.adoc#inflation-attack[here]. + * + * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued + * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets + * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience + * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the + * `_convertToShares` and `_convertToAssets` functions. + * + * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide]. + * ==== + * + * _Available since v4.7._ + */ +abstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC4626Upgradeable { + using MathUpgradeable for uint256; + + IERC20Upgradeable private _asset; + uint8 private _underlyingDecimals; + + /** + * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777). + */ + function __ERC4626_init(IERC20Upgradeable asset_) internal onlyInitializing { + __ERC4626_init_unchained(asset_); + } + + function __ERC4626_init_unchained(IERC20Upgradeable asset_) internal onlyInitializing { + (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_); + _underlyingDecimals = success ? assetDecimals : 18; + _asset = asset_; + } + + /** + * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way. + */ + function _tryGetAssetDecimals(IERC20Upgradeable asset_) private view returns (bool, uint8) { + (bool success, bytes memory encodedDecimals) = address(asset_).staticcall( + abi.encodeWithSelector(IERC20MetadataUpgradeable.decimals.selector) + ); + if (success && encodedDecimals.length >= 32) { + uint256 returnedDecimals = abi.decode(encodedDecimals, (uint256)); + if (returnedDecimals <= type(uint8).max) { + return (true, uint8(returnedDecimals)); + } + } + return (false, 0); + } + + /** + * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This + * "original" value is cached during construction of the vault contract. If this read operation fails (e.g., the + * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals. + * + * See {IERC20Metadata-decimals}. + */ + function decimals() public view virtual override(IERC20MetadataUpgradeable, ERC20Upgradeable) returns (uint8) { + return _underlyingDecimals + _decimalsOffset(); + } + + /** @dev See {IERC4626-asset}. */ + function asset() public view virtual override returns (address) { + return address(_asset); + } + + /** @dev See {IERC4626-totalAssets}. */ + function totalAssets() public view virtual override returns (uint256) { + return _asset.balanceOf(address(this)); + } + + /** @dev See {IERC4626-convertToShares}. */ + function convertToShares(uint256 assets) public view virtual override returns (uint256) { + return _convertToShares(assets, MathUpgradeable.Rounding.Down); + } + + /** @dev See {IERC4626-convertToAssets}. */ + function convertToAssets(uint256 shares) public view virtual override returns (uint256) { + return _convertToAssets(shares, MathUpgradeable.Rounding.Down); + } + + /** @dev See {IERC4626-maxDeposit}. */ + function maxDeposit(address) public view virtual override returns (uint256) { + return type(uint256).max; + } + + /** @dev See {IERC4626-maxMint}. */ + function maxMint(address) public view virtual override returns (uint256) { + return type(uint256).max; + } + + /** @dev See {IERC4626-maxWithdraw}. */ + function maxWithdraw(address owner) public view virtual override returns (uint256) { + return _convertToAssets(balanceOf(owner), MathUpgradeable.Rounding.Down); + } + + /** @dev See {IERC4626-maxRedeem}. */ + function maxRedeem(address owner) public view virtual override returns (uint256) { + return balanceOf(owner); + } + + /** @dev See {IERC4626-previewDeposit}. */ + function previewDeposit(uint256 assets) public view virtual override returns (uint256) { + return _convertToShares(assets, MathUpgradeable.Rounding.Down); + } + + /** @dev See {IERC4626-previewMint}. */ + function previewMint(uint256 shares) public view virtual override returns (uint256) { + return _convertToAssets(shares, MathUpgradeable.Rounding.Up); + } + + /** @dev See {IERC4626-previewWithdraw}. */ + function previewWithdraw(uint256 assets) public view virtual override returns (uint256) { + return _convertToShares(assets, MathUpgradeable.Rounding.Up); + } + + /** @dev See {IERC4626-previewRedeem}. */ + function previewRedeem(uint256 shares) public view virtual override returns (uint256) { + return _convertToAssets(shares, MathUpgradeable.Rounding.Down); + } + + /** @dev See {IERC4626-deposit}. */ + function deposit(uint256 assets, address receiver) public virtual override returns (uint256) { + require(assets <= maxDeposit(receiver), "ERC4626: deposit more than max"); + + uint256 shares = previewDeposit(assets); + _deposit(_msgSender(), receiver, assets, shares); + + return shares; + } + + /** @dev See {IERC4626-mint}. + * + * As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero. + * In this case, the shares will be minted without requiring any assets to be deposited. + */ + function mint(uint256 shares, address receiver) public virtual override returns (uint256) { + require(shares <= maxMint(receiver), "ERC4626: mint more than max"); + + uint256 assets = previewMint(shares); + _deposit(_msgSender(), receiver, assets, shares); + + return assets; + } + + /** @dev See {IERC4626-withdraw}. */ + function withdraw(uint256 assets, address receiver, address owner) public virtual override returns (uint256) { + require(assets <= maxWithdraw(owner), "ERC4626: withdraw more than max"); + + uint256 shares = previewWithdraw(assets); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return shares; + } + + /** @dev See {IERC4626-redeem}. */ + function redeem(uint256 shares, address receiver, address owner) public virtual override returns (uint256) { + require(shares <= maxRedeem(owner), "ERC4626: redeem more than max"); + + uint256 assets = previewRedeem(shares); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return assets; + } + + /** + * @dev Internal conversion function (from assets to shares) with support for rounding direction. + */ + function _convertToShares(uint256 assets, MathUpgradeable.Rounding rounding) internal view virtual returns (uint256) { + return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding); + } + + /** + * @dev Internal conversion function (from shares to assets) with support for rounding direction. + */ + function _convertToAssets(uint256 shares, MathUpgradeable.Rounding rounding) internal view virtual returns (uint256) { + return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding); + } + + /** + * @dev Deposit/mint common workflow. + */ + function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual { + // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the + // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the + // assets are transferred and before the shares are minted, which is a valid state. + // slither-disable-next-line reentrancy-no-eth + SafeERC20Upgradeable.safeTransferFrom(_asset, caller, address(this), assets); + _mint(receiver, shares); + + emit Deposit(caller, receiver, assets, shares); + } + + /** + * @dev Withdraw/redeem common workflow. + */ + function _withdraw( + address caller, + address receiver, + address owner, + uint256 assets, + uint256 shares + ) internal virtual { + if (caller != owner) { + _spendAllowance(owner, caller, shares); + } + + // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the + // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the + // shares are burned and after the assets are transferred, which is a valid state. + _burn(owner, shares); + SafeERC20Upgradeable.safeTransfer(_asset, receiver, assets); + + emit Withdraw(caller, receiver, owner, assets, shares); + } + + function _decimalsOffset() internal view virtual returns (uint8) { + return 0; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol new file mode 100644 index 00000000..381d8ea2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) + +pragma solidity ^0.8.0; + +import "../IERC20Upgradeable.sol"; + +/** + * @dev Interface for the optional metadata functions from the ERC20 standard. + * + * _Available since v4.1._ + */ +interface IERC20MetadataUpgradeable is IERC20Upgradeable { + /** + * @dev Returns the name of the token. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the symbol of the token. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the decimals places of the token. + */ + function decimals() external view returns (uint8); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol new file mode 100644 index 00000000..09e89a9a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * + * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't + * need to send a transaction, and thus is not required to hold Ether at all. + * + * ==== Security Considerations + * + * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature + * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be + * considered as an intention to spend the allowance in any specific way. The second is that because permits have + * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should + * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be + * generally recommended is: + * + * ```solidity + * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { + * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} + * doThing(..., value); + * } + * + * function doThing(..., uint256 value) public { + * token.safeTransferFrom(msg.sender, address(this), value); + * ... + * } + * ``` + * + * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of + * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also + * {SafeERC20-safeTransferFrom}). + * + * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so + * contracts should have entry points that don't rely on permit. + */ +interface IERC20PermitUpgradeable { + /** + * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, + * given ``owner``'s signed approval. + * + * IMPORTANT: The same issues {IERC20-approve} has related to transaction + * ordering also apply here. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `deadline` must be a timestamp in the future. + * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` + * over the EIP712-formatted function arguments. + * - the signature must use ``owner``'s current nonce (see {nonces}). + * + * For more information on the signature format, see the + * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP + * section]. + * + * CAUTION: See Security Considerations above. + */ + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external; + + /** + * @dev Returns the current nonce for `owner`. This value must be + * included whenever a signature is generated for {permit}. + * + * Every successful call to {permit} increases ``owner``'s nonce by one. This + * prevents a signature from being used multiple times. + */ + function nonces(address owner) external view returns (uint256); + + /** + * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. + */ + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol new file mode 100644 index 00000000..74ded65d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-ERC20Permit.sol) + +pragma solidity ^0.8.0; + +// EIP-2612 is Final as of 2022-11-01. This file is deprecated. + +import "./ERC20PermitUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol new file mode 100644 index 00000000..72fd7ceb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol) + +pragma solidity ^0.8.0; + +// EIP-2612 is Final as of 2022-11-01. This file is deprecated. + +import "./IERC20PermitUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol new file mode 100644 index 00000000..09e26650 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/presets/ERC20PresetFixedSupply.sol) +pragma solidity ^0.8.0; + +import "../extensions/ERC20BurnableUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev {ERC20} token, including: + * + * - Preminted initial supply + * - Ability for holders to burn (destroy) their tokens + * - No access control mechanism (for minting/pausing) and hence no governance + * + * This contract uses {ERC20Burnable} to include burn capabilities - head to + * its documentation for details. + * + * _Available since v3.4._ + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC20PresetFixedSupplyUpgradeable is Initializable, ERC20BurnableUpgradeable { + function initialize(string memory name, string memory symbol, uint256 initialSupply, address owner) public virtual initializer { + __ERC20PresetFixedSupply_init(name, symbol, initialSupply, owner); + } + /** + * @dev Mints `initialSupply` amount of token and transfers them to `owner`. + * + * See {ERC20-constructor}. + */ + function __ERC20PresetFixedSupply_init(string memory name, string memory symbol, uint256 initialSupply, address owner) internal onlyInitializing { + __ERC20_init_unchained(name, symbol); + __ERC20PresetFixedSupply_init_unchained(name, symbol, initialSupply, owner); + } + + function __ERC20PresetFixedSupply_init_unchained(string memory, string memory, uint256 initialSupply, address owner) internal onlyInitializing { + _mint(owner, initialSupply); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol new file mode 100644 index 00000000..9bbec096 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol) + +pragma solidity ^0.8.0; + +import "../ERC20Upgradeable.sol"; +import "../extensions/ERC20BurnableUpgradeable.sol"; +import "../extensions/ERC20PausableUpgradeable.sol"; +import "../../../access/AccessControlEnumerableUpgradeable.sol"; +import "../../../utils/ContextUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev {ERC20} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + function initialize(string memory name, string memory symbol) public virtual initializer { + __ERC20PresetMinterPauser_init(name, symbol); + } + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * See {ERC20-constructor}. + */ + function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal onlyInitializing { + __ERC20_init_unchained(name, symbol); + __Pausable_init_unchained(); + __ERC20PresetMinterPauser_init_unchained(name, symbol); + } + + function __ERC20PresetMinterPauser_init_unchained(string memory, string memory) internal onlyInitializing { + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + } + + /** + * @dev Creates `amount` new tokens for `to`. + * + * See {ERC20-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to, uint256 amount) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint"); + _mint(to, amount); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC20Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC20Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 amount + ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) { + super._beforeTokenTransfer(from, to, amount); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md new file mode 100644 index 00000000..468200b7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md @@ -0,0 +1 @@ +Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol new file mode 100644 index 00000000..ec47efc7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) + +pragma solidity ^0.8.0; + +import "../IERC20Upgradeable.sol"; +import "../extensions/IERC20PermitUpgradeable.sol"; +import "../../../utils/AddressUpgradeable.sol"; + +/** + * @title SafeERC20 + * @dev Wrappers around ERC20 operations that throw on failure (when the token + * contract returns false). Tokens that return no value (and instead revert or + * throw on failure) are also supported, non-reverting calls are assumed to be + * successful. + * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, + * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. + */ +library SafeERC20Upgradeable { + using AddressUpgradeable for address; + + /** + * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + */ + function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); + } + + /** + * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the + * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. + */ + function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); + } + + /** + * @dev Deprecated. This function has issues similar to the ones found in + * {IERC20-approve}, and its usage is discouraged. + * + * Whenever possible, use {safeIncreaseAllowance} and + * {safeDecreaseAllowance} instead. + */ + function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal { + // safeApprove should only be called when setting an initial allowance, + // or when resetting it to zero. To increase and decrease it, use + // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' + require( + (value == 0) || (token.allowance(address(this), spender) == 0), + "SafeERC20: approve from non-zero to non-zero allowance" + ); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); + } + + /** + * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + */ + function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { + uint256 oldAllowance = token.allowance(address(this), spender); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); + } + + /** + * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + */ + function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { + unchecked { + uint256 oldAllowance = token.allowance(address(this), spender); + require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); + } + } + + /** + * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval + * to be set to zero before setting it to a non-zero value, such as USDT. + */ + function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal { + bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); + + if (!_callOptionalReturnBool(token, approvalCall)) { + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); + _callOptionalReturn(token, approvalCall); + } + } + + /** + * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. + * Revert on invalid signature. + */ + function safePermit( + IERC20PermitUpgradeable token, + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) internal { + uint256 nonceBefore = token.nonces(owner); + token.permit(owner, spender, value, deadline, v, r, s); + uint256 nonceAfter = token.nonces(owner); + require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); + } + + /** + * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement + * on the return value: the return value is optional (but if data is returned, it must not be false). + * @param token The token targeted by the call. + * @param data The call data (encoded using abi.encode or one of its variants). + */ + function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { + // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since + // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that + // the target address contains contract code and also asserts for success in the low-level call. + + bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); + require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); + } + + /** + * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement + * on the return value: the return value is optional (but if data is returned, it must not be false). + * @param token The token targeted by the call. + * @param data The call data (encoded using abi.encode or one of its variants). + * + * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. + */ + function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) { + // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since + // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false + // and not revert is the subcall reverts. + + (bool success, bytes memory returndata) = address(token).call(data); + return + success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token)); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol new file mode 100644 index 00000000..821781c3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/TokenTimelock.sol) + +pragma solidity ^0.8.0; + +import "./SafeERC20Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev A token holder contract that will allow a beneficiary to extract the + * tokens after a given release time. + * + * Useful for simple vesting schedules like "advisors get all of their tokens + * after 1 year". + * + * @custom:storage-size 53 + */ +contract TokenTimelockUpgradeable is Initializable { + using SafeERC20Upgradeable for IERC20Upgradeable; + + // ERC20 basic token contract being held + IERC20Upgradeable private _token; + + // beneficiary of tokens after they are released + address private _beneficiary; + + // timestamp when token release is enabled + uint256 private _releaseTime; + + /** + * @dev Deploys a timelock instance that is able to hold the token specified, and will only release it to + * `beneficiary_` when {release} is invoked after `releaseTime_`. The release time is specified as a Unix timestamp + * (in seconds). + */ + function __TokenTimelock_init(IERC20Upgradeable token_, address beneficiary_, uint256 releaseTime_) internal onlyInitializing { + __TokenTimelock_init_unchained(token_, beneficiary_, releaseTime_); + } + + function __TokenTimelock_init_unchained(IERC20Upgradeable token_, address beneficiary_, uint256 releaseTime_) internal onlyInitializing { + require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time"); + _token = token_; + _beneficiary = beneficiary_; + _releaseTime = releaseTime_; + } + + /** + * @dev Returns the token being held. + */ + function token() public view virtual returns (IERC20Upgradeable) { + return _token; + } + + /** + * @dev Returns the beneficiary that will receive the tokens. + */ + function beneficiary() public view virtual returns (address) { + return _beneficiary; + } + + /** + * @dev Returns the time when the tokens are released in seconds since Unix epoch (i.e. Unix timestamp). + */ + function releaseTime() public view virtual returns (uint256) { + return _releaseTime; + } + + /** + * @dev Transfers tokens held by the timelock to the beneficiary. Will only succeed if invoked after the release + * time. + */ + function release() public virtual { + require(block.timestamp >= releaseTime(), "TokenTimelock: current time is before release time"); + + uint256 amount = token().balanceOf(address(this)); + require(amount > 0, "TokenTimelock: no tokens to release"); + + token().safeTransfer(beneficiary(), amount); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol new file mode 100644 index 00000000..68f9420b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol @@ -0,0 +1,478 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) + +pragma solidity ^0.8.0; + +import "./IERC721Upgradeable.sol"; +import "./IERC721ReceiverUpgradeable.sol"; +import "./extensions/IERC721MetadataUpgradeable.sol"; +import "../../utils/AddressUpgradeable.sol"; +import "../../utils/ContextUpgradeable.sol"; +import "../../utils/StringsUpgradeable.sol"; +import "../../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including + * the Metadata extension, but not including the Enumerable extension, which is available separately as + * {ERC721Enumerable}. + */ +contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { + using AddressUpgradeable for address; + using StringsUpgradeable for uint256; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Mapping from token ID to owner address + mapping(uint256 => address) private _owners; + + // Mapping owner address to token count + mapping(address => uint256) private _balances; + + // Mapping from token ID to approved address + mapping(uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { + __ERC721_init_unchained(name_, symbol_); + } + + function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { + return + interfaceId == type(IERC721Upgradeable).interfaceId || + interfaceId == type(IERC721MetadataUpgradeable).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + require(owner != address(0), "ERC721: address zero is not a valid owner"); + return _balances[owner]; + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + address owner = _ownerOf(tokenId); + require(owner != address(0), "ERC721: invalid token ID"); + return owner; + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + _requireMinted(tokenId); + + string memory baseURI = _baseURI(); + return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; + } + + /** + * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each + * token will be the concatenation of the `baseURI` and the `tokenId`. Empty + * by default, can be overridden in child contracts. + */ + function _baseURI() internal view virtual returns (string memory) { + return ""; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ERC721Upgradeable.ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require( + _msgSender() == owner || isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not token owner or approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + _requireMinted(tokenId); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom(address from, address to, uint256 tokenId) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); + _safeTransfer(from, to, tokenId, data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist + */ + function _ownerOf(uint256 tokenId) internal view virtual returns (address) { + return _owners[tokenId]; + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return _ownerOf(tokenId) != address(0); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { + address owner = ERC721Upgradeable.ownerOf(tokenId); + return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + * + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { + _mint(to, tokenId); + require( + _checkOnERC721Received(address(0), to, tokenId, data), + "ERC721: transfer to non ERC721Receiver implementer" + ); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId, 1); + + // Check that tokenId was not minted by `_beforeTokenTransfer` hook + require(!_exists(tokenId), "ERC721: token already minted"); + + unchecked { + // Will not overflow unless all 2**256 token ids are minted to the same owner. + // Given that tokens are minted one by one, it is impossible in practice that + // this ever happens. Might change if we allow batch minting. + // The ERC fails to describe this case. + _balances[to] += 1; + } + + _owners[tokenId] = to; + + emit Transfer(address(0), to, tokenId); + + _afterTokenTransfer(address(0), to, tokenId, 1); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * This is an internal function that does not check if the sender is authorized to operate on the token. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ERC721Upgradeable.ownerOf(tokenId); + + _beforeTokenTransfer(owner, address(0), tokenId, 1); + + // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook + owner = ERC721Upgradeable.ownerOf(tokenId); + + // Clear approvals + delete _tokenApprovals[tokenId]; + + unchecked { + // Cannot overflow, as that would require more tokens to be burned/transferred + // out than the owner initially received through minting and transferring in. + _balances[owner] -= 1; + } + delete _owners[tokenId]; + + emit Transfer(owner, address(0), tokenId); + + _afterTokenTransfer(owner, address(0), tokenId, 1); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal virtual { + require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId, 1); + + // Check that tokenId was not transferred by `_beforeTokenTransfer` hook + require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); + + // Clear approvals from the previous owner + delete _tokenApprovals[tokenId]; + + unchecked { + // `_balances[from]` cannot overflow for the same reason as described in `_burn`: + // `from`'s balance is the number of token held, which is at least one before the current + // transfer. + // `_balances[to]` could overflow in the conditions described in `_mint`. That would require + // all 2**256 token ids to be minted, which in practice is impossible. + _balances[from] -= 1; + _balances[to] += 1; + } + _owners[tokenId] = to; + + emit Transfer(from, to, tokenId); + + _afterTokenTransfer(from, to, tokenId, 1); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits an {Approval} event. + */ + function _approve(address to, uint256 tokenId) internal virtual { + _tokenApprovals[tokenId] = to; + emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Emits an {ApprovalForAll} event. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + require(owner != operator, "ERC721: approve to caller"); + _operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Reverts if the `tokenId` has not been minted yet. + */ + function _requireMinted(uint256 tokenId) internal view virtual { + require(_exists(tokenId), "ERC721: invalid token ID"); + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received( + address from, + address to, + uint256 tokenId, + bytes memory data + ) private returns (bool) { + if (to.isContract()) { + try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { + return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; + } catch (bytes memory reason) { + if (reason.length == 0) { + revert("ERC721: transfer to non ERC721Receiver implementer"); + } else { + /// @solidity memory-safe-assembly + assembly { + revert(add(32, reason), mload(reason)) + } + } + } + } else { + return true; + } + } + + /** + * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is + * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. + * - When `from` is zero, the tokens will be minted for `to`. + * - When `to` is zero, ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * - `batchSize` is non-zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} + + /** + * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is + * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. + * - When `from` is zero, the tokens were minted for `to`. + * - When `to` is zero, ``from``'s tokens were burned. + * - `from` and `to` are never both zero. + * - `batchSize` is non-zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} + + /** + * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. + * + * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant + * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such + * that `ownerOf(tokenId)` is `a`. + */ + // solhint-disable-next-line func-name-mixedcase + function __unsafe_increaseBalance(address account, uint256 amount) internal { + _balances[account] += amount; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[44] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol new file mode 100644 index 00000000..c8328178 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) + +pragma solidity ^0.8.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721ReceiverUpgradeable { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. + */ + function onERC721Received( + address operator, + address from, + uint256 tokenId, + bytes calldata data + ) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol new file mode 100644 index 00000000..70fdcdcb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol @@ -0,0 +1,132 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) + +pragma solidity ^0.8.0; + +import "../../utils/introspection/IERC165Upgradeable.sol"; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721Upgradeable is IERC165Upgradeable { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 + * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must + * understand this adds an external call which potentially creates a reentrancy vulnerability. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool approved) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc new file mode 100644 index 00000000..f571f5c5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc @@ -0,0 +1,73 @@ += ERC 721 + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc721 + +This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard]. + +TIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide]. + +The EIP specifies four interfaces: + +* {IERC721}: Core functionality required in all compliant implementation. +* {IERC721Metadata}: Optional extension that adds name, symbol, and token URI, almost always included. +* {IERC721Enumerable}: Optional extension that allows enumerating the tokens on chain, often not included since it requires large gas overhead. +* {IERC721Receiver}: An interface that must be implemented by contracts if they want to accept tokens through `safeTransferFrom`. + +OpenZeppelin Contracts provides implementations of all four interfaces: + +* {ERC721}: The core and metadata extensions, with a base URI mechanism. +* {ERC721Enumerable}: The enumerable extension. +* {ERC721Holder}: A bare bones implementation of the receiver interface. + +Additionally there are a few of other extensions: + +* {ERC721Consecutive}: An implementation of https://eips.ethereum.org/EIPS/eip-2309[ERC2309] for minting batchs of tokens during construction, in accordance with ERC721. +* {ERC721URIStorage}: A more flexible but more expensive way of storing metadata. +* {ERC721Votes}: Support for voting and vote delegation. +* {ERC721Royalty}: A way to signal royalty information following ERC2981. +* {ERC721Pausable}: A primitive to pause contract operation. +* {ERC721Burnable}: A way for token holders to burn their own tokens. +* {ERC721Wrapper}: Wrapper to create an ERC721 backed by another ERC721, with deposit and withdraw methods. Useful in conjunction with {ERC721Votes}. + +NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc721.adoc#Presets[ERC721 Presets] (such as {ERC721PresetMinterPauserAutoId}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts. + +== Core + +{{IERC721}} + +{{IERC721Metadata}} + +{{IERC721Enumerable}} + +{{ERC721}} + +{{ERC721Enumerable}} + +{{IERC721Receiver}} + +== Extensions + +{{ERC721Pausable}} + +{{ERC721Burnable}} + +{{ERC721Consecutive}} + +{{ERC721URIStorage}} + +{{ERC721Votes}} + +{{ERC721Royalty}} + +{{ERC721Wrapper}} + +== Presets + +These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code. + +{{ERC721PresetMinterPauserAutoId}} + +== Utilities + +{{ERC721Holder}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol new file mode 100644 index 00000000..0cefa958 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "../../../utils/ContextUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @title ERC721 Burnable Token + * @dev ERC721 Token that can be burned (destroyed). + */ +abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { + function __ERC721Burnable_init() internal onlyInitializing { + } + + function __ERC721Burnable_init_unchained() internal onlyInitializing { + } + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); + _burn(tokenId); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol new file mode 100644 index 00000000..31208a7c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Consecutive.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "../../../interfaces/IERC2309Upgradeable.sol"; +import "../../../utils/CheckpointsUpgradeable.sol"; +import "../../../utils/structs/BitMapsUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the ERC2309 "Consecutive Transfer Extension" as defined in + * https://eips.ethereum.org/EIPS/eip-2309[EIP-2309]. + * + * This extension allows the minting of large batches of tokens, during contract construction only. For upgradeable + * contracts this implies that batch minting is only available during proxy deployment, and not in subsequent upgrades. + * These batches are limited to 5000 tokens at a time by default to accommodate off-chain indexers. + * + * Using this extension removes the ability to mint single tokens during contract construction. This ability is + * regained after construction. During construction, only batch minting is allowed. + * + * IMPORTANT: This extension bypasses the hooks {_beforeTokenTransfer} and {_afterTokenTransfer} for tokens minted in + * batch. When using this extension, you should consider the {_beforeConsecutiveTokenTransfer} and + * {_afterConsecutiveTokenTransfer} hooks in addition to {_beforeTokenTransfer} and {_afterTokenTransfer}. + * + * IMPORTANT: When overriding {_afterTokenTransfer}, be careful about call ordering. {ownerOf} may return invalid + * values during the {_afterTokenTransfer} execution if the super call is not called first. To be safe, execute the + * super call before your custom logic. + * + * _Available since v4.8._ + */ +abstract contract ERC721ConsecutiveUpgradeable is Initializable, IERC2309Upgradeable, ERC721Upgradeable { + using BitMapsUpgradeable for BitMapsUpgradeable.BitMap; + using CheckpointsUpgradeable for CheckpointsUpgradeable.Trace160; + + CheckpointsUpgradeable.Trace160 private _sequentialOwnership; + BitMapsUpgradeable.BitMap private _sequentialBurn; + + function __ERC721Consecutive_init() internal onlyInitializing { + } + + function __ERC721Consecutive_init_unchained() internal onlyInitializing { + } + /** + * @dev Maximum size of a batch of consecutive tokens. This is designed to limit stress on off-chain indexing + * services that have to record one entry per token, and have protections against "unreasonably large" batches of + * tokens. + * + * NOTE: Overriding the default value of 5000 will not cause on-chain issues, but may result in the asset not being + * correctly supported by off-chain indexing services (including marketplaces). + */ + function _maxBatchSize() internal view virtual returns (uint96) { + return 5000; + } + + /** + * @dev See {ERC721-_ownerOf}. Override that checks the sequential ownership structure for tokens that have + * been minted as part of a batch, and not yet transferred. + */ + function _ownerOf(uint256 tokenId) internal view virtual override returns (address) { + address owner = super._ownerOf(tokenId); + + // If token is owned by the core, or beyond consecutive range, return base value + if (owner != address(0) || tokenId > type(uint96).max) { + return owner; + } + + // Otherwise, check the token was not burned, and fetch ownership from the anchors + // Note: no need for safe cast, we know that tokenId <= type(uint96).max + return _sequentialBurn.get(tokenId) ? address(0) : address(_sequentialOwnership.lowerLookup(uint96(tokenId))); + } + + /** + * @dev Mint a batch of tokens of length `batchSize` for `to`. Returns the token id of the first token minted in the + * batch; if `batchSize` is 0, returns the number of consecutive ids minted so far. + * + * Requirements: + * + * - `batchSize` must not be greater than {_maxBatchSize}. + * - The function is called in the constructor of the contract (directly or indirectly). + * + * CAUTION: Does not emit a `Transfer` event. This is ERC721 compliant as long as it is done inside of the + * constructor, which is enforced by this function. + * + * CAUTION: Does not invoke `onERC721Received` on the receiver. + * + * Emits a {IERC2309-ConsecutiveTransfer} event. + */ + function _mintConsecutive(address to, uint96 batchSize) internal virtual returns (uint96) { + uint96 first = _totalConsecutiveSupply(); + + // minting a batch of size 0 is a no-op + if (batchSize > 0) { + require(!AddressUpgradeable.isContract(address(this)), "ERC721Consecutive: batch minting restricted to constructor"); + require(to != address(0), "ERC721Consecutive: mint to the zero address"); + require(batchSize <= _maxBatchSize(), "ERC721Consecutive: batch too large"); + + // hook before + _beforeTokenTransfer(address(0), to, first, batchSize); + + // push an ownership checkpoint & emit event + uint96 last = first + batchSize - 1; + _sequentialOwnership.push(last, uint160(to)); + + // The invariant required by this function is preserved because the new sequentialOwnership checkpoint + // is attributing ownership of `batchSize` new tokens to account `to`. + __unsafe_increaseBalance(to, batchSize); + + emit ConsecutiveTransfer(first, last, address(0), to); + + // hook after + _afterTokenTransfer(address(0), to, first, batchSize); + } + + return first; + } + + /** + * @dev See {ERC721-_mint}. Override version that restricts normal minting to after construction. + * + * Warning: Using {ERC721Consecutive} prevents using {_mint} during construction in favor of {_mintConsecutive}. + * After construction, {_mintConsecutive} is no longer available and {_mint} becomes available. + */ + function _mint(address to, uint256 tokenId) internal virtual override { + require(AddressUpgradeable.isContract(address(this)), "ERC721Consecutive: can't mint during construction"); + super._mint(to, tokenId); + } + + /** + * @dev See {ERC721-_afterTokenTransfer}. Burning of tokens that have been sequentially minted must be explicit. + */ + function _afterTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + if ( + to == address(0) && // if we burn + firstTokenId < _totalConsecutiveSupply() && // and the tokenId was minted in a batch + !_sequentialBurn.get(firstTokenId) // and the token was never marked as burnt + ) { + require(batchSize == 1, "ERC721Consecutive: batch burn not supported"); + _sequentialBurn.set(firstTokenId); + } + super._afterTokenTransfer(from, to, firstTokenId, batchSize); + } + + function _totalConsecutiveSupply() private view returns (uint96) { + (bool exists, uint96 latestId, ) = _sequentialOwnership.latestCheckpoint(); + return exists ? latestId + 1 : 0; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol new file mode 100644 index 00000000..5966eb65 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "./IERC721EnumerableUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev This implements an optional extension of {ERC721} defined in the EIP that adds + * enumerability of all the token ids in the contract as well as all token ids owned by each + * account. + */ +abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { + // Mapping from owner to list of owned token IDs + mapping(address => mapping(uint256 => uint256)) private _ownedTokens; + + // Mapping from token ID to index of the owner tokens list + mapping(uint256 => uint256) private _ownedTokensIndex; + + // Array with all token ids, used for enumeration + uint256[] private _allTokens; + + // Mapping from token id to position in the allTokens array + mapping(uint256 => uint256) private _allTokensIndex; + + function __ERC721Enumerable_init() internal onlyInitializing { + } + + function __ERC721Enumerable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { + return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { + require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); + return _ownedTokens[owner][index]; + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + return _allTokens.length; + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view virtual override returns (uint256) { + require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); + return _allTokens[index]; + } + + /** + * @dev See {ERC721-_beforeTokenTransfer}. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + super._beforeTokenTransfer(from, to, firstTokenId, batchSize); + + if (batchSize > 1) { + // Will only trigger during construction. Batch transferring (minting) is not available afterwards. + revert("ERC721Enumerable: consecutive transfers not supported"); + } + + uint256 tokenId = firstTokenId; + + if (from == address(0)) { + _addTokenToAllTokensEnumeration(tokenId); + } else if (from != to) { + _removeTokenFromOwnerEnumeration(from, tokenId); + } + if (to == address(0)) { + _removeTokenFromAllTokensEnumeration(tokenId); + } else if (to != from) { + _addTokenToOwnerEnumeration(to, tokenId); + } + } + + /** + * @dev Private function to add a token to this extension's ownership-tracking data structures. + * @param to address representing the new owner of the given token ID + * @param tokenId uint256 ID of the token to be added to the tokens list of the given address + */ + function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { + uint256 length = ERC721Upgradeable.balanceOf(to); + _ownedTokens[to][length] = tokenId; + _ownedTokensIndex[tokenId] = length; + } + + /** + * @dev Private function to add a token to this extension's token tracking data structures. + * @param tokenId uint256 ID of the token to be added to the tokens list + */ + function _addTokenToAllTokensEnumeration(uint256 tokenId) private { + _allTokensIndex[tokenId] = _allTokens.length; + _allTokens.push(tokenId); + } + + /** + * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that + * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for + * gas optimizations e.g. when performing a transfer operation (avoiding double writes). + * This has O(1) time complexity, but alters the order of the _ownedTokens array. + * @param from address representing the previous owner of the given token ID + * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address + */ + function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { + // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; + uint256 tokenIndex = _ownedTokensIndex[tokenId]; + + // When the token to delete is the last token, the swap operation is unnecessary + if (tokenIndex != lastTokenIndex) { + uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; + + _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + } + + // This also deletes the contents at the last position of the array + delete _ownedTokensIndex[tokenId]; + delete _ownedTokens[from][lastTokenIndex]; + } + + /** + * @dev Private function to remove a token from this extension's token tracking data structures. + * This has O(1) time complexity, but alters the order of the _allTokens array. + * @param tokenId uint256 ID of the token to be removed from the tokens list + */ + function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { + // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = _allTokens.length - 1; + uint256 tokenIndex = _allTokensIndex[tokenId]; + + // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so + // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding + // an 'if' statement (like in _removeTokenFromOwnerEnumeration) + uint256 lastTokenId = _allTokens[lastTokenIndex]; + + _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + + // This also deletes the contents at the last position of the array + delete _allTokensIndex[tokenId]; + _allTokens.pop(); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[46] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol new file mode 100644 index 00000000..bac42a77 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/extensions/ERC721Pausable.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "../../../security/PausableUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev ERC721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract unpausable. + */ +abstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable { + function __ERC721Pausable_init() internal onlyInitializing { + __Pausable_init_unchained(); + } + + function __ERC721Pausable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC721-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + super._beforeTokenTransfer(from, to, firstTokenId, batchSize); + + require(!paused(), "ERC721Pausable: token transfer while paused"); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol new file mode 100644 index 00000000..7f09d51c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "../../common/ERC2981Upgradeable.sol"; +import "../../../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment + * information. + * + * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for + * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. + * + * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to + * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. + * + * _Available since v4.5._ + */ +abstract contract ERC721RoyaltyUpgradeable is Initializable, ERC2981Upgradeable, ERC721Upgradeable { + function __ERC721Royalty_init() internal onlyInitializing { + } + + function __ERC721Royalty_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, ERC2981Upgradeable) returns (bool) { + return super.supportsInterface(interfaceId); + } + + /** + * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. + */ + function _burn(uint256 tokenId) internal virtual override { + super._burn(tokenId); + _resetTokenRoyalty(tokenId); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol new file mode 100644 index 00000000..a811eabc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721URIStorage.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "../../../interfaces/IERC4906Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev ERC721 token with storage based token URI management. + */ +abstract contract ERC721URIStorageUpgradeable is Initializable, IERC4906Upgradeable, ERC721Upgradeable { + using StringsUpgradeable for uint256; + + // Optional mapping for token URIs + mapping(uint256 => string) private _tokenURIs; + + function __ERC721URIStorage_init() internal onlyInitializing { + } + + function __ERC721URIStorage_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface} + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, IERC165Upgradeable) returns (bool) { + return interfaceId == bytes4(0x49064906) || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + _requireMinted(tokenId); + + string memory _tokenURI = _tokenURIs[tokenId]; + string memory base = _baseURI(); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return _tokenURI; + } + // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). + if (bytes(_tokenURI).length > 0) { + return string(abi.encodePacked(base, _tokenURI)); + } + + return super.tokenURI(tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Emits {MetadataUpdate}. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); + _tokenURIs[tokenId] = _tokenURI; + + emit MetadataUpdate(tokenId); + } + + /** + * @dev See {ERC721-_burn}. This override additionally checks to see if a + * token-specific URI was set for the token, and if so, it deletes the token URI from + * the storage mapping. + */ + function _burn(uint256 tokenId) internal virtual override { + super._burn(tokenId); + + if (bytes(_tokenURIs[tokenId]).length != 0) { + delete _tokenURIs[tokenId]; + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol new file mode 100644 index 00000000..649d810c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Votes.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "../../../governance/utils/VotesUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts + * as 1 vote unit. + * + * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost + * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of + * the votes in governance decisions, or they can delegate to themselves to be their own representative. + * + * _Available since v4.5._ + */ +abstract contract ERC721VotesUpgradeable is Initializable, ERC721Upgradeable, VotesUpgradeable { + function __ERC721Votes_init() internal onlyInitializing { + } + + function __ERC721Votes_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC721-_afterTokenTransfer}. Adjusts votes when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _afterTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override { + _transferVotingUnits(from, to, batchSize); + super._afterTokenTransfer(from, to, firstTokenId, batchSize); + } + + /** + * @dev Returns the balance of `account`. + * + * WARNING: Overriding this function will likely result in incorrect vote tracking. + */ + function _getVotingUnits(address account) internal view virtual override returns (uint256) { + return balanceOf(account); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol new file mode 100644 index 00000000..6be9df96 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Wrapper.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Extension of the ERC721 token contract to support token wrapping. + * + * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is useful + * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow the + * wrapping of an existing "basic" ERC721 into a governance token. + * + * _Available since v4.9.0_ + */ +abstract contract ERC721WrapperUpgradeable is Initializable, ERC721Upgradeable, IERC721ReceiverUpgradeable { + IERC721Upgradeable private _underlying; + + function __ERC721Wrapper_init(IERC721Upgradeable underlyingToken) internal onlyInitializing { + __ERC721Wrapper_init_unchained(underlyingToken); + } + + function __ERC721Wrapper_init_unchained(IERC721Upgradeable underlyingToken) internal onlyInitializing { + _underlying = underlyingToken; + } + + /** + * @dev Allow a user to deposit underlying tokens and mint the corresponding tokenIds. + */ + function depositFor(address account, uint256[] memory tokenIds) public virtual returns (bool) { + uint256 length = tokenIds.length; + for (uint256 i = 0; i < length; ++i) { + uint256 tokenId = tokenIds[i]; + + // This is an "unsafe" transfer that doesn't call any hook on the receiver. With underlying() being trusted + // (by design of this contract) and no other contracts expected to be called from there, we are safe. + // slither-disable-next-line reentrancy-no-eth + underlying().transferFrom(_msgSender(), address(this), tokenId); + _safeMint(account, tokenId); + } + + return true; + } + + /** + * @dev Allow a user to burn wrapped tokens and withdraw the corresponding tokenIds of the underlying tokens. + */ + function withdrawTo(address account, uint256[] memory tokenIds) public virtual returns (bool) { + uint256 length = tokenIds.length; + for (uint256 i = 0; i < length; ++i) { + uint256 tokenId = tokenIds[i]; + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Wrapper: caller is not token owner or approved"); + _burn(tokenId); + // Checks were already performed at this point, and there's no way to retake ownership or approval from + // the wrapped tokenId after this point, so it's safe to remove the reentrancy check for the next line. + // slither-disable-next-line reentrancy-no-eth + underlying().safeTransferFrom(address(this), account, tokenId); + } + + return true; + } + + /** + * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC721 transfers to + * this contract. + * + * In case there's data attached, it validates that the operator is this contract, so only trusted data + * is accepted from {depositFor}. + * + * WARNING: Doesn't work with unsafe transfers (eg. {IERC721-transferFrom}). Use {ERC721Wrapper-_recover} + * for recovering in that scenario. + */ + function onERC721Received( + address, + address from, + uint256 tokenId, + bytes memory + ) public virtual override returns (bytes4) { + require(address(underlying()) == _msgSender(), "ERC721Wrapper: caller is not underlying"); + _safeMint(from, tokenId); + return IERC721ReceiverUpgradeable.onERC721Received.selector; + } + + /** + * @dev Mint a wrapped token to cover any underlyingToken that would have been transferred by mistake. Internal + * function that can be exposed with access control if desired. + */ + function _recover(address account, uint256 tokenId) internal virtual returns (uint256) { + require(underlying().ownerOf(tokenId) == address(this), "ERC721Wrapper: wrapper is not token owner"); + _safeMint(account, tokenId); + return tokenId; + } + + /** + * @dev Returns the underlying token. + */ + function underlying() public view virtual returns (IERC721Upgradeable) { + return _underlying; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol new file mode 100644 index 00000000..77a76317 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) + +pragma solidity ^0.8.0; + +import "../IERC721Upgradeable.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721EnumerableUpgradeable is IERC721Upgradeable { + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol new file mode 100644 index 00000000..2a3ce91d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) + +pragma solidity ^0.8.0; + +import "../IERC721Upgradeable.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721MetadataUpgradeable is IERC721Upgradeable { + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol new file mode 100644 index 00000000..80e8f442 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/draft-ERC721Votes.sol) + +pragma solidity ^0.8.0; + +// ERC721Votes was marked as draft due to the EIP-712 dependency. +// EIP-712 is Final as of 2022-08-11. This file is deprecated. + +import "./ERC721VotesUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol new file mode 100644 index 00000000..41b10a87 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol @@ -0,0 +1,149 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol) + +pragma solidity ^0.8.0; + +import "../ERC721Upgradeable.sol"; +import "../extensions/ERC721EnumerableUpgradeable.sol"; +import "../extensions/ERC721BurnableUpgradeable.sol"; +import "../extensions/ERC721PausableUpgradeable.sol"; +import "../../../access/AccessControlEnumerableUpgradeable.sol"; +import "../../../utils/ContextUpgradeable.sol"; +import "../../../utils/CountersUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev {ERC721} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * - token ID and URI autogeneration + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + * + * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ + */ +contract ERC721PresetMinterPauserAutoIdUpgradeable is + Initializable, ContextUpgradeable, + AccessControlEnumerableUpgradeable, + ERC721EnumerableUpgradeable, + ERC721BurnableUpgradeable, + ERC721PausableUpgradeable +{ + using CountersUpgradeable for CountersUpgradeable.Counter; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + CountersUpgradeable.Counter private _tokenIdTracker; + + string private _baseTokenURI; + + function initialize(string memory name, string memory symbol, string memory baseTokenURI) public virtual initializer { + __ERC721PresetMinterPauserAutoId_init(name, symbol, baseTokenURI); + } + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * Token URIs will be autogenerated based on `baseURI` and their token IDs. + * See {ERC721-tokenURI}. + */ + function __ERC721PresetMinterPauserAutoId_init(string memory name, string memory symbol, string memory baseTokenURI) internal onlyInitializing { + __ERC721_init_unchained(name, symbol); + __Pausable_init_unchained(); + __ERC721PresetMinterPauserAutoId_init_unchained(name, symbol, baseTokenURI); + } + + function __ERC721PresetMinterPauserAutoId_init_unchained(string memory, string memory, string memory baseTokenURI) internal onlyInitializing { + _baseTokenURI = baseTokenURI; + + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + } + + function _baseURI() internal view virtual override returns (string memory) { + return _baseTokenURI; + } + + /** + * @dev Creates a new token for `to`. Its token ID will be automatically + * assigned (and available on the emitted {IERC721-Transfer} event), and the token + * URI autogenerated based on the base URI passed at construction. + * + * See {ERC721-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); + + // We cannot just use balanceOf to create the new tokenId because tokens + // can be burned (destroyed), so we need a separate counter. + _mint(to, _tokenIdTracker.current()); + _tokenIdTracker.increment(); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 firstTokenId, + uint256 batchSize + ) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable) { + super._beforeTokenTransfer(from, to, firstTokenId, batchSize); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(AccessControlEnumerableUpgradeable, ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (bool) { + return super.supportsInterface(interfaceId); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md new file mode 100644 index 00000000..468200b7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md @@ -0,0 +1 @@ +Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol new file mode 100644 index 00000000..72544add --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol) + +pragma solidity ^0.8.0; + +import "../IERC721ReceiverUpgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the {IERC721Receiver} interface. + * + * Accepts all token transfers. + * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. + */ +contract ERC721HolderUpgradeable is Initializable, IERC721ReceiverUpgradeable { + function __ERC721Holder_init() internal onlyInitializing { + } + + function __ERC721Holder_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC721Receiver-onERC721Received}. + * + * Always returns `IERC721Receiver.onERC721Received.selector`. + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + return this.onERC721Received.selector; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol new file mode 100644 index 00000000..17632bf4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol @@ -0,0 +1,526 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/ERC777.sol) + +pragma solidity ^0.8.0; + +import "./IERC777Upgradeable.sol"; +import "./IERC777RecipientUpgradeable.sol"; +import "./IERC777SenderUpgradeable.sol"; +import "../ERC20/IERC20Upgradeable.sol"; +import "../../utils/AddressUpgradeable.sol"; +import "../../utils/ContextUpgradeable.sol"; +import "../../utils/introspection/IERC1820RegistryUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the {IERC777} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * + * Support for ERC20 is included in this contract, as specified by the EIP: both + * the ERC777 and ERC20 interfaces can be safely used when interacting with it. + * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token + * movements. + * + * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there + * are no special restrictions in the amount of tokens that created, moved, or + * destroyed. This makes integration with ERC20 applications seamless. + * + * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. + */ +contract ERC777Upgradeable is Initializable, ContextUpgradeable, IERC777Upgradeable, IERC20Upgradeable { + using AddressUpgradeable for address; + + IERC1820RegistryUpgradeable internal constant _ERC1820_REGISTRY = IERC1820RegistryUpgradeable(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); + + mapping(address => uint256) private _balances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender"); + bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient"); + + // This isn't ever read from - it's only used to respond to the defaultOperators query. + address[] private _defaultOperatorsArray; + + // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators). + mapping(address => bool) private _defaultOperators; + + // For each account, a mapping of its operators and revoked default operators. + mapping(address => mapping(address => bool)) private _operators; + mapping(address => mapping(address => bool)) private _revokedDefaultOperators; + + // ERC20-allowances + mapping(address => mapping(address => uint256)) private _allowances; + + /** + * @dev `defaultOperators` may be an empty array. + */ + function __ERC777_init(string memory name_, string memory symbol_, address[] memory defaultOperators_) internal onlyInitializing { + __ERC777_init_unchained(name_, symbol_, defaultOperators_); + } + + function __ERC777_init_unchained(string memory name_, string memory symbol_, address[] memory defaultOperators_) internal onlyInitializing { + _name = name_; + _symbol = symbol_; + + _defaultOperatorsArray = defaultOperators_; + for (uint256 i = 0; i < defaultOperators_.length; i++) { + _defaultOperators[defaultOperators_[i]] = true; + } + + // register interfaces + _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC777Token"), address(this)); + _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC20Token"), address(this)); + } + + /** + * @dev See {IERC777-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC777-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {ERC20-decimals}. + * + * Always returns 18, as per the + * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility). + */ + function decimals() public pure virtual returns (uint8) { + return 18; + } + + /** + * @dev See {IERC777-granularity}. + * + * This implementation always returns `1`. + */ + function granularity() public view virtual override returns (uint256) { + return 1; + } + + /** + * @dev See {IERC777-totalSupply}. + */ + function totalSupply() public view virtual override(IERC20Upgradeable, IERC777Upgradeable) returns (uint256) { + return _totalSupply; + } + + /** + * @dev Returns the amount of tokens owned by an account (`tokenHolder`). + */ + function balanceOf(address tokenHolder) public view virtual override(IERC20Upgradeable, IERC777Upgradeable) returns (uint256) { + return _balances[tokenHolder]; + } + + /** + * @dev See {IERC777-send}. + * + * Also emits a {IERC20-Transfer} event for ERC20 compatibility. + */ + function send(address recipient, uint256 amount, bytes memory data) public virtual override { + _send(_msgSender(), recipient, amount, data, "", true); + } + + /** + * @dev See {IERC20-transfer}. + * + * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient} + * interface if it is a contract. + * + * Also emits a {Sent} event. + */ + function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + _send(_msgSender(), recipient, amount, "", "", false); + return true; + } + + /** + * @dev See {IERC777-burn}. + * + * Also emits a {IERC20-Transfer} event for ERC20 compatibility. + */ + function burn(uint256 amount, bytes memory data) public virtual override { + _burn(_msgSender(), amount, data, ""); + } + + /** + * @dev See {IERC777-isOperatorFor}. + */ + function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) { + return + operator == tokenHolder || + (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) || + _operators[tokenHolder][operator]; + } + + /** + * @dev See {IERC777-authorizeOperator}. + */ + function authorizeOperator(address operator) public virtual override { + require(_msgSender() != operator, "ERC777: authorizing self as operator"); + + if (_defaultOperators[operator]) { + delete _revokedDefaultOperators[_msgSender()][operator]; + } else { + _operators[_msgSender()][operator] = true; + } + + emit AuthorizedOperator(operator, _msgSender()); + } + + /** + * @dev See {IERC777-revokeOperator}. + */ + function revokeOperator(address operator) public virtual override { + require(operator != _msgSender(), "ERC777: revoking self as operator"); + + if (_defaultOperators[operator]) { + _revokedDefaultOperators[_msgSender()][operator] = true; + } else { + delete _operators[_msgSender()][operator]; + } + + emit RevokedOperator(operator, _msgSender()); + } + + /** + * @dev See {IERC777-defaultOperators}. + */ + function defaultOperators() public view virtual override returns (address[] memory) { + return _defaultOperatorsArray; + } + + /** + * @dev See {IERC777-operatorSend}. + * + * Emits {Sent} and {IERC20-Transfer} events. + */ + function operatorSend( + address sender, + address recipient, + uint256 amount, + bytes memory data, + bytes memory operatorData + ) public virtual override { + require(isOperatorFor(_msgSender(), sender), "ERC777: caller is not an operator for holder"); + _send(sender, recipient, amount, data, operatorData, true); + } + + /** + * @dev See {IERC777-operatorBurn}. + * + * Emits {Burned} and {IERC20-Transfer} events. + */ + function operatorBurn( + address account, + uint256 amount, + bytes memory data, + bytes memory operatorData + ) public virtual override { + require(isOperatorFor(_msgSender(), account), "ERC777: caller is not an operator for holder"); + _burn(account, amount, data, operatorData); + } + + /** + * @dev See {IERC20-allowance}. + * + * Note that operator and allowance concepts are orthogonal: operators may + * not have allowance, and accounts with allowance may not be operators + * themselves. + */ + function allowance(address holder, address spender) public view virtual override returns (uint256) { + return _allowances[holder][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on + * `transferFrom`. This is semantically equivalent to an infinite approval. + * + * Note that accounts cannot have allowance issued by their operators. + */ + function approve(address spender, uint256 value) public virtual override returns (bool) { + address holder = _msgSender(); + _approve(holder, spender, value); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * NOTE: Does not update the allowance if the current allowance + * is the maximum `uint256`. + * + * Note that operator and allowance concepts are orthogonal: operators cannot + * call `transferFrom` (unless they have allowance), and accounts with + * allowance cannot call `operatorSend` (unless they are operators). + * + * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events. + */ + function transferFrom(address holder, address recipient, uint256 amount) public virtual override returns (bool) { + address spender = _msgSender(); + _spendAllowance(holder, spender, amount); + _send(holder, recipient, amount, "", "", false); + return true; + } + + /** + * @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * If a send hook is registered for `account`, the corresponding function + * will be called with the caller address as the `operator` and with + * `userData` and `operatorData`. + * + * See {IERC777Sender} and {IERC777Recipient}. + * + * Emits {Minted} and {IERC20-Transfer} events. + * + * Requirements + * + * - `account` cannot be the zero address. + * - if `account` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function _mint(address account, uint256 amount, bytes memory userData, bytes memory operatorData) internal virtual { + _mint(account, amount, userData, operatorData, true); + } + + /** + * @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * If `requireReceptionAck` is set to true, and if a send hook is + * registered for `account`, the corresponding function will be called with + * `operator`, `data` and `operatorData`. + * + * See {IERC777Sender} and {IERC777Recipient}. + * + * Emits {Minted} and {IERC20-Transfer} events. + * + * Requirements + * + * - `account` cannot be the zero address. + * - if `account` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function _mint( + address account, + uint256 amount, + bytes memory userData, + bytes memory operatorData, + bool requireReceptionAck + ) internal virtual { + require(account != address(0), "ERC777: mint to the zero address"); + + address operator = _msgSender(); + + _beforeTokenTransfer(operator, address(0), account, amount); + + // Update state variables + _totalSupply += amount; + _balances[account] += amount; + + _callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck); + + emit Minted(operator, account, amount, userData, operatorData); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Send tokens + * @param from address token holder address + * @param to address recipient address + * @param amount uint256 amount of tokens to transfer + * @param userData bytes extra information provided by the token holder (if any) + * @param operatorData bytes extra information provided by the operator (if any) + * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient + */ + function _send( + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData, + bool requireReceptionAck + ) internal virtual { + require(from != address(0), "ERC777: transfer from the zero address"); + require(to != address(0), "ERC777: transfer to the zero address"); + + address operator = _msgSender(); + + _callTokensToSend(operator, from, to, amount, userData, operatorData); + + _move(operator, from, to, amount, userData, operatorData); + + _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck); + } + + /** + * @dev Burn tokens + * @param from address token holder address + * @param amount uint256 amount of tokens to burn + * @param data bytes extra information provided by the token holder + * @param operatorData bytes extra information provided by the operator (if any) + */ + function _burn(address from, uint256 amount, bytes memory data, bytes memory operatorData) internal virtual { + require(from != address(0), "ERC777: burn from the zero address"); + + address operator = _msgSender(); + + _callTokensToSend(operator, from, address(0), amount, data, operatorData); + + _beforeTokenTransfer(operator, from, address(0), amount); + + // Update state variables + uint256 fromBalance = _balances[from]; + require(fromBalance >= amount, "ERC777: burn amount exceeds balance"); + unchecked { + _balances[from] = fromBalance - amount; + } + _totalSupply -= amount; + + emit Burned(operator, from, amount, data, operatorData); + emit Transfer(from, address(0), amount); + } + + function _move( + address operator, + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData + ) private { + _beforeTokenTransfer(operator, from, to, amount); + + uint256 fromBalance = _balances[from]; + require(fromBalance >= amount, "ERC777: transfer amount exceeds balance"); + unchecked { + _balances[from] = fromBalance - amount; + } + _balances[to] += amount; + + emit Sent(operator, from, to, amount, userData, operatorData); + emit Transfer(from, to, amount); + } + + /** + * @dev See {ERC20-_approve}. + * + * Note that accounts cannot have allowance issued by their operators. + */ + function _approve(address holder, address spender, uint256 value) internal virtual { + require(holder != address(0), "ERC777: approve from the zero address"); + require(spender != address(0), "ERC777: approve to the zero address"); + + _allowances[holder][spender] = value; + emit Approval(holder, spender, value); + } + + /** + * @dev Call from.tokensToSend() if the interface is registered + * @param operator address operator requesting the transfer + * @param from address token holder address + * @param to address recipient address + * @param amount uint256 amount of tokens to transfer + * @param userData bytes extra information provided by the token holder (if any) + * @param operatorData bytes extra information provided by the operator (if any) + */ + function _callTokensToSend( + address operator, + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData + ) private { + address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH); + if (implementer != address(0)) { + IERC777SenderUpgradeable(implementer).tokensToSend(operator, from, to, amount, userData, operatorData); + } + } + + /** + * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but + * tokensReceived() was not registered for the recipient + * @param operator address operator requesting the transfer + * @param from address token holder address + * @param to address recipient address + * @param amount uint256 amount of tokens to transfer + * @param userData bytes extra information provided by the token holder (if any) + * @param operatorData bytes extra information provided by the operator (if any) + * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient + */ + function _callTokensReceived( + address operator, + address from, + address to, + uint256 amount, + bytes memory userData, + bytes memory operatorData, + bool requireReceptionAck + ) private { + address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH); + if (implementer != address(0)) { + IERC777RecipientUpgradeable(implementer).tokensReceived(operator, from, to, amount, userData, operatorData); + } else if (requireReceptionAck) { + require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"); + } + } + + /** + * @dev Updates `owner` s allowance for `spender` based on spent `amount`. + * + * Does not update the allowance amount in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Might emit an {IERC20-Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { + uint256 currentAllowance = allowance(owner, spender); + if (currentAllowance != type(uint256).max) { + require(currentAllowance >= amount, "ERC777: insufficient allowance"); + unchecked { + _approve(owner, spender, currentAllowance - amount); + } + } + } + + /** + * @dev Hook that is called before any token transfer. This includes + * calls to {send}, {transfer}, {operatorSend}, {transferFrom}, minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * will be to transferred to `to`. + * - when `from` is zero, `amount` tokens will be minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address operator, address from, address to, uint256 amount) internal virtual {} + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[41] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol new file mode 100644 index 00000000..9ffe79cf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. + * + * Accounts can be notified of {IERC777} tokens being sent to them by having a + * contract implement this interface (contract holders can be their own + * implementer) and registering it on the + * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * + * See {IERC1820Registry} and {ERC1820Implementer}. + */ +interface IERC777RecipientUpgradeable { + /** + * @dev Called by an {IERC777} token contract whenever tokens are being + * moved or created into a registered account (`to`). The type of operation + * is conveyed by `from` being the zero address or not. + * + * This call occurs _after_ the token contract's state is updated, so + * {IERC777-balanceOf}, etc., can be used to query the post-operation state. + * + * This function may revert to prevent the operation from being executed. + */ + function tokensReceived( + address operator, + address from, + address to, + uint256 amount, + bytes calldata userData, + bytes calldata operatorData + ) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol new file mode 100644 index 00000000..3455d0ac --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Sender.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC777TokensSender standard as defined in the EIP. + * + * {IERC777} Token holders can be notified of operations performed on their + * tokens by having a contract implement this interface (contract holders can be + * their own implementer) and registering it on the + * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * + * See {IERC1820Registry} and {ERC1820Implementer}. + */ +interface IERC777SenderUpgradeable { + /** + * @dev Called by an {IERC777} token contract whenever a registered holder's + * (`from`) tokens are about to be moved or destroyed. The type of operation + * is conveyed by `to` being the zero address or not. + * + * This call occurs _before_ the token contract's state is updated, so + * {IERC777-balanceOf}, etc., can be used to query the pre-operation state. + * + * This function may revert to prevent the operation from being executed. + */ + function tokensToSend( + address operator, + address from, + address to, + uint256 amount, + bytes calldata userData, + bytes calldata operatorData + ) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol new file mode 100644 index 00000000..18be45b3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/IERC777.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC777Token standard as defined in the EIP. + * + * This contract uses the + * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let + * token holders and recipients react to token movements by using setting implementers + * for the associated interfaces in said registry. See {IERC1820Registry} and + * {ERC1820Implementer}. + */ +interface IERC777Upgradeable { + /** + * @dev Emitted when `amount` tokens are created by `operator` and assigned to `to`. + * + * Note that some additional user `data` and `operatorData` can be logged in the event. + */ + event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); + + /** + * @dev Emitted when `operator` destroys `amount` tokens from `account`. + * + * Note that some additional user `data` and `operatorData` can be logged in the event. + */ + event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); + + /** + * @dev Emitted when `operator` is made operator for `tokenHolder`. + */ + event AuthorizedOperator(address indexed operator, address indexed tokenHolder); + + /** + * @dev Emitted when `operator` is revoked its operator status for `tokenHolder`. + */ + event RevokedOperator(address indexed operator, address indexed tokenHolder); + + /** + * @dev Returns the name of the token. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the smallest part of the token that is not divisible. This + * means all token operations (creation, movement and destruction) must have + * amounts that are a multiple of this number. + * + * For most token contracts, this value will equal 1. + */ + function granularity() external view returns (uint256); + + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by an account (`owner`). + */ + function balanceOf(address owner) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * If send or receive hooks are registered for the caller and `recipient`, + * the corresponding functions will be called with `data` and empty + * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. + * + * Emits a {Sent} event. + * + * Requirements + * + * - the caller must have at least `amount` tokens. + * - `recipient` cannot be the zero address. + * - if `recipient` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function send(address recipient, uint256 amount, bytes calldata data) external; + + /** + * @dev Destroys `amount` tokens from the caller's account, reducing the + * total supply. + * + * If a send hook is registered for the caller, the corresponding function + * will be called with `data` and empty `operatorData`. See {IERC777Sender}. + * + * Emits a {Burned} event. + * + * Requirements + * + * - the caller must have at least `amount` tokens. + */ + function burn(uint256 amount, bytes calldata data) external; + + /** + * @dev Returns true if an account is an operator of `tokenHolder`. + * Operators can send and burn tokens on behalf of their owners. All + * accounts are their own operator. + * + * See {operatorSend} and {operatorBurn}. + */ + function isOperatorFor(address operator, address tokenHolder) external view returns (bool); + + /** + * @dev Make an account an operator of the caller. + * + * See {isOperatorFor}. + * + * Emits an {AuthorizedOperator} event. + * + * Requirements + * + * - `operator` cannot be calling address. + */ + function authorizeOperator(address operator) external; + + /** + * @dev Revoke an account's operator status for the caller. + * + * See {isOperatorFor} and {defaultOperators}. + * + * Emits a {RevokedOperator} event. + * + * Requirements + * + * - `operator` cannot be calling address. + */ + function revokeOperator(address operator) external; + + /** + * @dev Returns the list of default operators. These accounts are operators + * for all token holders, even if {authorizeOperator} was never called on + * them. + * + * This list is immutable, but individual holders may revoke these via + * {revokeOperator}, in which case {isOperatorFor} will return false. + */ + function defaultOperators() external view returns (address[] memory); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must + * be an operator of `sender`. + * + * If send or receive hooks are registered for `sender` and `recipient`, + * the corresponding functions will be called with `data` and + * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. + * + * Emits a {Sent} event. + * + * Requirements + * + * - `sender` cannot be the zero address. + * - `sender` must have at least `amount` tokens. + * - the caller must be an operator for `sender`. + * - `recipient` cannot be the zero address. + * - if `recipient` is a contract, it must implement the {IERC777Recipient} + * interface. + */ + function operatorSend( + address sender, + address recipient, + uint256 amount, + bytes calldata data, + bytes calldata operatorData + ) external; + + /** + * @dev Destroys `amount` tokens from `account`, reducing the total supply. + * The caller must be an operator of `account`. + * + * If a send hook is registered for `account`, the corresponding function + * will be called with `data` and `operatorData`. See {IERC777Sender}. + * + * Emits a {Burned} event. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + * - the caller must be an operator for `account`. + */ + function operatorBurn(address account, uint256 amount, bytes calldata data, bytes calldata operatorData) external; + + event Sent( + address indexed operator, + address indexed from, + address indexed to, + uint256 amount, + bytes data, + bytes operatorData + ); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc new file mode 100644 index 00000000..ac326abe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc @@ -0,0 +1,32 @@ += ERC 777 + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc777 + +CAUTION: As of v4.9, OpenZeppelin's implementation of ERC-777 is deprecated and will be removed in the next major release. + +This set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-777[ERC777 token standard]. + +TIP: For an overview of ERC777 tokens and a walk through on how to create a token contract read our xref:ROOT:erc777.adoc[ERC777 guide]. + +The token behavior itself is implemented in the core contracts: {IERC777}, {ERC777}. + +Additionally there are interfaces used to develop contracts that react to token movements: {IERC777Sender}, {IERC777Recipient}. + +== Core + +{{IERC777}} + +{{ERC777}} + +== Hooks + +{{IERC777Sender}} + +{{IERC777Recipient}} + +== Presets + +These contracts are preconfigured combinations of features. They can be used through inheritance or as models to copy and paste their source code. + +{{ERC777PresetFixedSupply}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol new file mode 100644 index 00000000..71827f94 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC777/presets/ERC777PresetFixedSupply.sol) +pragma solidity ^0.8.0; + +import "../ERC777Upgradeable.sol"; +import {Initializable} from "../../../proxy/utils/Initializable.sol"; + +/** + * @dev {ERC777} token, including: + * + * - Preminted initial supply + * - No access control mechanism (for minting/pausing) and hence no governance + * + * _Available since v3.4._ + */ +contract ERC777PresetFixedSupplyUpgradeable is Initializable, ERC777Upgradeable { + function initialize( + string memory name, + string memory symbol, + address[] memory defaultOperators, + uint256 initialSupply, + address owner + ) public virtual initializer { + __ERC777PresetFixedSupply_init(name, symbol, defaultOperators, initialSupply, owner); + } + /** + * @dev Mints `initialSupply` amount of token and transfers them to `owner`. + * + * See {ERC777-constructor}. + */ + function __ERC777PresetFixedSupply_init( + string memory name, + string memory symbol, + address[] memory defaultOperators, + uint256 initialSupply, + address owner + ) internal onlyInitializing { + __ERC777_init_unchained(name, symbol, defaultOperators); + __ERC777PresetFixedSupply_init_unchained(name, symbol, defaultOperators, initialSupply, owner); + } + + function __ERC777PresetFixedSupply_init_unchained( + string memory, + string memory, + address[] memory, + uint256 initialSupply, + address owner + ) internal onlyInitializing { + _mint(owner, initialSupply, "", ""); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol new file mode 100644 index 00000000..6420b8b5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol @@ -0,0 +1,120 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) + +pragma solidity ^0.8.0; + +import "../../interfaces/IERC2981Upgradeable.sol"; +import "../../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. + * + * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for + * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. + * + * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the + * fee is specified in basis points by default. + * + * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to + * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. + * + * _Available since v4.5._ + */ +abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { + struct RoyaltyInfo { + address receiver; + uint96 royaltyFraction; + } + + RoyaltyInfo private _defaultRoyaltyInfo; + mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; + + function __ERC2981_init() internal onlyInitializing { + } + + function __ERC2981_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { + return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @inheritdoc IERC2981Upgradeable + */ + function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { + RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; + + if (royalty.receiver == address(0)) { + royalty = _defaultRoyaltyInfo; + } + + uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); + + return (royalty.receiver, royaltyAmount); + } + + /** + * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a + * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an + * override. + */ + function _feeDenominator() internal pure virtual returns (uint96) { + return 10000; + } + + /** + * @dev Sets the royalty information that all ids in this contract will default to. + * + * Requirements: + * + * - `receiver` cannot be the zero address. + * - `feeNumerator` cannot be greater than the fee denominator. + */ + function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { + require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); + require(receiver != address(0), "ERC2981: invalid receiver"); + + _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); + } + + /** + * @dev Removes default royalty information. + */ + function _deleteDefaultRoyalty() internal virtual { + delete _defaultRoyaltyInfo; + } + + /** + * @dev Sets the royalty information for a specific token id, overriding the global default. + * + * Requirements: + * + * - `receiver` cannot be the zero address. + * - `feeNumerator` cannot be greater than the fee denominator. + */ + function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { + require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); + require(receiver != address(0), "ERC2981: Invalid parameters"); + + _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); + } + + /** + * @dev Resets royalty information for the token id back to the global default. + */ + function _resetTokenRoyalty(uint256 tokenId) internal virtual { + delete _tokenRoyaltyInfo[tokenId]; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc new file mode 100644 index 00000000..af616746 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc @@ -0,0 +1,10 @@ += Common (Tokens) + +Functionality that is common to multiple token standards. + +* {ERC2981}: NFT Royalties compatible with both ERC721 and ERC1155. +** For ERC721 consider {ERC721Royalty} which clears the royalty information from storage on burn. + +== Contracts + +{{ERC2981}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol new file mode 100644 index 00000000..3201666f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol @@ -0,0 +1,244 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) + +pragma solidity ^0.8.1; + +/** + * @dev Collection of functions related to the address type + */ +library AddressUpgradeable { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * + * Furthermore, `isContract` will also return true if the target contract within + * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, + * which only has an effect at the end of a transaction. + * ==== + * + * [IMPORTANT] + * ==== + * You shouldn't rely on `isContract` to protect against flash loan attacks! + * + * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets + * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract + * constructor. + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize/address.code.length, which returns 0 + // for contracts in construction, since the code is only stored at the end + // of the constructor execution. + + return account.code.length > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + (bool success, ) = recipient.call{value: amount}(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain `call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value, + string memory errorMessage + ) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + (bool success, bytes memory returndata) = target.call{value: value}(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall( + address target, + bytes memory data, + string memory errorMessage + ) internal view returns (bytes memory) { + (bool success, bytes memory returndata) = target.staticcall(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + (bool success, bytes memory returndata) = target.delegatecall(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling + * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. + * + * _Available since v4.8._ + */ + function verifyCallResultFromTarget( + address target, + bool success, + bytes memory returndata, + string memory errorMessage + ) internal view returns (bytes memory) { + if (success) { + if (returndata.length == 0) { + // only check isContract if the call was successful and the return data is empty + // otherwise we already know that it was a contract + require(isContract(target), "Address: call to non-contract"); + } + return returndata; + } else { + _revert(returndata, errorMessage); + } + } + + /** + * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the + * revert reason or using the provided one. + * + * _Available since v4.3._ + */ + function verifyCallResult( + bool success, + bytes memory returndata, + string memory errorMessage + ) internal pure returns (bytes memory) { + if (success) { + return returndata; + } else { + _revert(returndata, errorMessage); + } + } + + function _revert(bytes memory returndata, string memory errorMessage) private pure { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + /// @solidity memory-safe-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol new file mode 100644 index 00000000..bb2fc486 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Arrays.sol) + +pragma solidity ^0.8.0; + +import "./StorageSlotUpgradeable.sol"; +import "./math/MathUpgradeable.sol"; + +/** + * @dev Collection of functions related to array types. + */ +library ArraysUpgradeable { + using StorageSlotUpgradeable for bytes32; + + /** + * @dev Searches a sorted `array` and returns the first index that contains + * a value greater or equal to `element`. If no such index exists (i.e. all + * values in the array are strictly less than `element`), the array length is + * returned. Time complexity O(log n). + * + * `array` is expected to be sorted in ascending order, and to contain no + * repeated elements. + */ + function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { + if (array.length == 0) { + return 0; + } + + uint256 low = 0; + uint256 high = array.length; + + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + + // Note that mid will always be strictly less than high (i.e. it will be a valid array index) + // because Math.average rounds down (it does integer division with truncation). + if (unsafeAccess(array, mid).value > element) { + high = mid; + } else { + low = mid + 1; + } + } + + // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. + if (low > 0 && unsafeAccess(array, low - 1).value == element) { + return low - 1; + } else { + return low; + } + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) { + bytes32 slot; + // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` + // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. + + /// @solidity memory-safe-assembly + assembly { + mstore(0, arr.slot) + slot := add(keccak256(0, 0x20), pos) + } + return slot.getAddressSlot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) { + bytes32 slot; + // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` + // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. + + /// @solidity memory-safe-assembly + assembly { + mstore(0, arr.slot) + slot := add(keccak256(0, 0x20), pos) + } + return slot.getBytes32Slot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) { + bytes32 slot; + // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` + // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. + + /// @solidity memory-safe-assembly + assembly { + mstore(0, arr.slot) + slot := add(keccak256(0, 0x20), pos) + } + return slot.getUint256Slot(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol new file mode 100644 index 00000000..efbda771 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.6) (utils/Base64.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Provides a set of functions to operate with Base64 strings. + * + * _Available since v4.5._ + */ +library Base64Upgradeable { + /** + * @dev Base64 Encoding/Decoding Table + */ + string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + /** + * @dev Converts a `bytes` to its Bytes64 `string` representation. + */ + function encode(bytes memory data) internal pure returns (string memory) { + /** + * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence + * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol + */ + if (data.length == 0) return ""; + + // Loads the table into memory + string memory table = _TABLE; + + // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter + // and split into 4 numbers of 6 bits. + // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up + // - `data.length + 2` -> Round up + // - `/ 3` -> Number of 3-bytes chunks + // - `4 *` -> 4 characters for each chunk + string memory result = new string(4 * ((data.length + 2) / 3)); + + /// @solidity memory-safe-assembly + assembly { + // Prepare the lookup table (skip the first "length" byte) + let tablePtr := add(table, 1) + + // Prepare result pointer, jump over length + let resultPtr := add(result, 0x20) + let dataPtr := data + let endPtr := add(data, mload(data)) + + // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and + // set it to zero to make sure no dirty bytes are read in that section. + let afterPtr := add(endPtr, 0x20) + let afterCache := mload(afterPtr) + mstore(afterPtr, 0x00) + + // Run over the input, 3 bytes at a time + for { + + } lt(dataPtr, endPtr) { + + } { + // Advance 3 bytes + dataPtr := add(dataPtr, 3) + let input := mload(dataPtr) + + // To write each character, shift the 3 byte (24 bits) chunk + // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) + // and apply logical AND with 0x3F to bitmask the least significant 6 bits. + // Use this as an index into the lookup table, mload an entire word + // so the desired character is in the least significant byte, and + // mstore8 this least significant byte into the result and continue. + + mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + + mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + + mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + + mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) + resultPtr := add(resultPtr, 1) // Advance + } + + // Reset the value that was cached + mstore(afterPtr, afterCache) + + // When data `bytes` is not exactly 3 bytes long + // it is padded with `=` characters at the end + switch mod(mload(data), 3) + case 1 { + mstore8(sub(resultPtr, 1), 0x3d) + mstore8(sub(resultPtr, 2), 0x3d) + } + case 2 { + mstore8(sub(resultPtr, 1), 0x3d) + } + } + + return result; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol new file mode 100644 index 00000000..6dc53b51 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol @@ -0,0 +1,560 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Checkpoints.sol) +// This file was procedurally generated from scripts/generate/templates/Checkpoints.js. + +pragma solidity ^0.8.0; + +import "./math/MathUpgradeable.sol"; +import "./math/SafeCastUpgradeable.sol"; + +/** + * @dev This library defines the `History` struct, for checkpointing values as they change at different points in + * time, and later looking up past values by block number. See {Votes} as an example. + * + * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new + * checkpoint for the current transaction block using the {push} function. + * + * _Available since v4.5._ + */ +library CheckpointsUpgradeable { + struct History { + Checkpoint[] _checkpoints; + } + + struct Checkpoint { + uint32 _blockNumber; + uint224 _value; + } + + /** + * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one + * before it is returned, or zero otherwise. Because the number returned corresponds to that at the end of the + * block, the requested block number must be in the past, excluding the current block. + */ + function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { + require(blockNumber < block.number, "Checkpoints: block not yet mined"); + uint32 key = SafeCastUpgradeable.toUint32(blockNumber); + + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one + * before it is returned, or zero otherwise. Similar to {upperLookup} but optimized for the case when the searched + * checkpoint is probably "recent", defined as being among the last sqrt(N) checkpoints where N is the number of + * checkpoints. + */ + function getAtProbablyRecentBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { + require(blockNumber < block.number, "Checkpoints: block not yet mined"); + uint32 key = SafeCastUpgradeable.toUint32(blockNumber); + + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - MathUpgradeable.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._blockNumber) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block. + * + * Returns previous value and new value. + */ + function push(History storage self, uint256 value) internal returns (uint256, uint256) { + return _insert(self._checkpoints, SafeCastUpgradeable.toUint32(block.number), SafeCastUpgradeable.toUint224(value)); + } + + /** + * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will + * be set to `op(latest, delta)`. + * + * Returns previous value and new value. + */ + function push( + History storage self, + function(uint256, uint256) view returns (uint256) op, + uint256 delta + ) internal returns (uint256, uint256) { + return push(self, op(latest(self), delta)); + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(History storage self) internal view returns (uint224) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint( + History storage self + ) internal view returns (bool exists, uint32 _blockNumber, uint224 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._blockNumber, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoint. + */ + function length(History storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert(Checkpoint[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { + uint256 pos = self.length; + + if (pos > 0) { + // Copying to memory is important here. + Checkpoint memory last = _unsafeAccess(self, pos - 1); + + // Checkpoint keys must be non-decreasing. + require(last._blockNumber <= key, "Checkpoint: decreasing keys"); + + // Update or push new checkpoint + if (last._blockNumber == key) { + _unsafeAccess(self, pos - 1)._value = value; + } else { + self.push(Checkpoint({_blockNumber: key, _value: value})); + } + return (last._value, value); + } else { + self.push(Checkpoint({_blockNumber: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + if (_unsafeAccess(self, mid)._blockNumber > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + if (_unsafeAccess(self, mid)._blockNumber < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess(Checkpoint[] storage self, uint256 pos) private pure returns (Checkpoint storage result) { + assembly { + mstore(0, self.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } + + struct Trace224 { + Checkpoint224[] _checkpoints; + } + + struct Checkpoint224 { + uint32 _key; + uint224 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + */ + function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + */ + function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + */ + function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + */ + function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - MathUpgradeable.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace224 storage self) internal view returns (uint224) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoint. + */ + function length(Trace224 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { + uint256 pos = self.length; + + if (pos > 0) { + // Copying to memory is important here. + Checkpoint224 memory last = _unsafeAccess(self, pos - 1); + + // Checkpoint keys must be non-decreasing. + require(last._key <= key, "Checkpoint: decreasing keys"); + + // Update or push new checkpoint + if (last._key == key) { + _unsafeAccess(self, pos - 1)._value = value; + } else { + self.push(Checkpoint224({_key: key, _value: value})); + } + return (last._value, value); + } else { + self.push(Checkpoint224({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint224[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint224[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint224[] storage self, + uint256 pos + ) private pure returns (Checkpoint224 storage result) { + assembly { + mstore(0, self.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } + + struct Trace160 { + Checkpoint160[] _checkpoints; + } + + struct Checkpoint160 { + uint96 _key; + uint160 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + */ + function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. + */ + function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + */ + function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). + */ + function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - MathUpgradeable.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace160 storage self) internal view returns (uint160) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoint. + */ + function length(Trace160 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) { + uint256 pos = self.length; + + if (pos > 0) { + // Copying to memory is important here. + Checkpoint160 memory last = _unsafeAccess(self, pos - 1); + + // Checkpoint keys must be non-decreasing. + require(last._key <= key, "Checkpoint: decreasing keys"); + + // Update or push new checkpoint + if (last._key == key) { + _unsafeAccess(self, pos - 1)._value = value; + } else { + self.push(Checkpoint160({_key: key, _value: value})); + } + return (last._value, value); + } else { + self.push(Checkpoint160({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint160[] storage self, + uint96 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. + * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint160[] storage self, + uint96 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = MathUpgradeable.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint160[] storage self, + uint256 pos + ) private pure returns (Checkpoint160 storage result) { + assembly { + mstore(0, self.slot) + result.slot := add(keccak256(0, 0x20), pos) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ContextUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ContextUpgradeable.sol new file mode 100644 index 00000000..91ea6fb1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ContextUpgradeable.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) + +pragma solidity ^0.8.0; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract ContextUpgradeable is Initializable { + function __Context_init() internal onlyInitializing { + } + + function __Context_init_unchained() internal onlyInitializing { + } + function _msgSender() internal view virtual returns (address) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes calldata) { + return msg.data; + } + + function _contextSuffixLength() internal view virtual returns (uint256) { + return 0; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol new file mode 100644 index 00000000..cfe7e908 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) + +pragma solidity ^0.8.0; + +/** + * @title Counters + * @author Matt Condon (@shrugs) + * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number + * of elements in a mapping, issuing ERC721 ids, or counting request ids. + * + * Include with `using Counters for Counters.Counter;` + */ +library CountersUpgradeable { + struct Counter { + // This variable should never be directly accessed by users of the library: interactions must be restricted to + // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add + // this feature: see https://github.com/ethereum/solidity/issues/4637 + uint256 _value; // default: 0 + } + + function current(Counter storage counter) internal view returns (uint256) { + return counter._value; + } + + function increment(Counter storage counter) internal { + unchecked { + counter._value += 1; + } + } + + function decrement(Counter storage counter) internal { + uint256 value = counter._value; + require(value > 0, "Counter: decrement overflow"); + unchecked { + counter._value = value - 1; + } + } + + function reset(Counter storage counter) internal { + counter._value = 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol new file mode 100644 index 00000000..ebc5429c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Create2.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. + * `CREATE2` can be used to compute in advance the address where a smart + * contract will be deployed, which allows for interesting new mechanisms known + * as 'counterfactual interactions'. + * + * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more + * information. + */ +library Create2Upgradeable { + /** + * @dev Deploys a contract using `CREATE2`. The address where the contract + * will be deployed can be known in advance via {computeAddress}. + * + * The bytecode for a contract can be obtained from Solidity with + * `type(contractName).creationCode`. + * + * Requirements: + * + * - `bytecode` must not be empty. + * - `salt` must have not been used for `bytecode` already. + * - the factory must have a balance of at least `amount`. + * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. + */ + function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { + require(address(this).balance >= amount, "Create2: insufficient balance"); + require(bytecode.length != 0, "Create2: bytecode length is zero"); + /// @solidity memory-safe-assembly + assembly { + addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) + } + require(addr != address(0), "Create2: Failed on deploy"); + } + + /** + * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the + * `bytecodeHash` or `salt` will result in a new destination address. + */ + function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) { + return computeAddress(salt, bytecodeHash, address(this)); + } + + /** + * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at + * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. + */ + function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { + /// @solidity memory-safe-assembly + assembly { + let ptr := mload(0x40) // Get free memory pointer + + // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | + // |-------------------|---------------------------------------------------------------------------| + // | bytecodeHash | CCCCCCCCCCCCC...CC | + // | salt | BBBBBBBBBBBBB...BB | + // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | + // | 0xFF | FF | + // |-------------------|---------------------------------------------------------------------------| + // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | + // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | + + mstore(add(ptr, 0x40), bytecodeHash) + mstore(add(ptr, 0x20), salt) + mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes + let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff + mstore8(start, 0xff) + addr := keccak256(start, 85) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/MulticallUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/MulticallUpgradeable.sol new file mode 100644 index 00000000..0f69f3b5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/MulticallUpgradeable.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.5) (utils/Multicall.sol) + +pragma solidity ^0.8.0; + +import "./AddressUpgradeable.sol"; +import "./ContextUpgradeable.sol"; +import {Initializable} from "../proxy/utils/Initializable.sol"; + +/** + * @dev Provides a function to batch together multiple calls in a single external call. + * + * Consider any assumption about calldata validation performed by the sender may be violated if it's not especially + * careful about sending transactions invoking {multicall}. For example, a relay address that filters function + * selectors won't filter calls nested within a {multicall} operation. + * + * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}). + * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data` + * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of + * {_msgSender} are not propagated to subcalls. + * + * _Available since v4.1._ + */ +abstract contract MulticallUpgradeable is Initializable, ContextUpgradeable { + function __Multicall_init() internal onlyInitializing { + } + + function __Multicall_init_unchained() internal onlyInitializing { + } + /** + * @dev Receives and executes a batch of function calls on this contract. + * @custom:oz-upgrades-unsafe-allow-reachable delegatecall + */ + function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) { + bytes memory context = msg.sender == _msgSender() + ? new bytes(0) + : msg.data[msg.data.length - _contextSuffixLength():]; + + results = new bytes[](data.length); + for (uint256 i = 0; i < data.length; i++) { + results[i] = AddressUpgradeable.functionDelegateCall(address(this), bytes.concat(data[i], context)); + } + return results; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc new file mode 100644 index 00000000..5e8af93e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc @@ -0,0 +1,113 @@ += Utilities + +[.readme-notice] +NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils + +Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives. + +The {Address}, {Arrays}, {Base64} and {Strings} libraries provide more operations related to these native data types, while {SafeCast} adds ways to safely convert between the different signed and unsigned numeric types. +{Multicall} provides a function to batch together multiple calls in a single external call. + +For new data types: + + * {Counters}: a simple way to get a counter that can only be incremented, decremented or reset. Very useful for ID generation, counting contract activity, among others. + * {EnumerableMap}: like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type, but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`). + * {EnumerableSet}: like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc. + +[NOTE] +==== +Because Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types. + +As of v3.0, {EnumerableMap} supports `uint256 -> address` (`UintToAddressMap`), and {EnumerableSet} supports `address` and `uint256` (`AddressSet` and `UintSet`). +==== + +Finally, {Create2} contains all necessary utilities to safely use the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode], without having to deal with low-level assembly. + +== Math + +{{Math}} + +{{SignedMath}} + +{{SafeCast}} + +{{SafeMath}} + +{{SignedSafeMath}} + +== Cryptography + +{{ECDSA}} + +{{SignatureChecker}} + +{{MerkleProof}} + +{{EIP712}} + +== Escrow + +{{ConditionalEscrow}} + +{{Escrow}} + +{{RefundEscrow}} + +== Introspection + +This set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_. + +Ethereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. `ERC20` tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors. + +There are two main ways to approach this. + +* Locally, where a contract implements `IERC165` and declares an interface, and a second one queries it directly via `ERC165Checker`. +* Globally, where a global and unique registry (`IERC1820Registry`) is used to register implementers of a certain interface (`IERC1820Implementer`). It is then the registry that is queried, which allows for more complex setups, like contracts implementing interfaces for externally-owned accounts. + +Note that, in all cases, accounts simply _declare_ their interfaces, but they are not required to actually implement them. This mechanism can therefore be used to both prevent errors and allow for complex interactions (see `ERC777`), but it must not be relied on for security. + +{{IERC165}} + +{{ERC165}} + +{{ERC165Storage}} + +{{ERC165Checker}} + +{{IERC1820Registry}} + +{{IERC1820Implementer}} + +{{ERC1820Implementer}} + +== Data Structures + +{{BitMaps}} + +{{EnumerableMap}} + +{{EnumerableSet}} + +{{DoubleEndedQueue}} + +{{Checkpoints}} + +== Libraries + +{{Create2}} + +{{Address}} + +{{Arrays}} + +{{Base64}} + +{{Counters}} + +{{Strings}} + +{{ShortStrings}} + +{{StorageSlot}} + +{{Multicall}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol new file mode 100644 index 00000000..50e3c8bd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) + +pragma solidity ^0.8.8; + +import "./StorageSlotUpgradeable.sol"; + +// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | +// | length | 0x BB | +type ShortString is bytes32; + +/** + * @dev This library provides functions to convert short memory strings + * into a `ShortString` type that can be used as an immutable variable. + * + * Strings of arbitrary length can be optimized using this library if + * they are short enough (up to 31 bytes) by packing them with their + * length (1 byte) in a single EVM word (32 bytes). Additionally, a + * fallback mechanism can be used for every other case. + * + * Usage example: + * + * ```solidity + * contract Named { + * using ShortStrings for *; + * + * ShortString private immutable _name; + * string private _nameFallback; + * + * constructor(string memory contractName) { + * _name = contractName.toShortStringWithFallback(_nameFallback); + * } + * + * function name() external view returns (string memory) { + * return _name.toStringWithFallback(_nameFallback); + * } + * } + * ``` + */ +library ShortStringsUpgradeable { + // Used as an identifier for strings longer than 31 bytes. + bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; + + error StringTooLong(string str); + error InvalidShortString(); + + /** + * @dev Encode a string of at most 31 chars into a `ShortString`. + * + * This will trigger a `StringTooLong` error is the input string is too long. + */ + function toShortString(string memory str) internal pure returns (ShortString) { + bytes memory bstr = bytes(str); + if (bstr.length > 31) { + revert StringTooLong(str); + } + return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); + } + + /** + * @dev Decode a `ShortString` back to a "normal" string. + */ + function toString(ShortString sstr) internal pure returns (string memory) { + uint256 len = byteLength(sstr); + // using `new string(len)` would work locally but is not memory safe. + string memory str = new string(32); + /// @solidity memory-safe-assembly + assembly { + mstore(str, len) + mstore(add(str, 0x20), sstr) + } + return str; + } + + /** + * @dev Return the length of a `ShortString`. + */ + function byteLength(ShortString sstr) internal pure returns (uint256) { + uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; + if (result > 31) { + revert InvalidShortString(); + } + return result; + } + + /** + * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. + */ + function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { + if (bytes(value).length < 32) { + return toShortString(value); + } else { + StorageSlotUpgradeable.getStringSlot(store).value = value; + return ShortString.wrap(_FALLBACK_SENTINEL); + } + } + + /** + * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. + */ + function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { + if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + return toString(value); + } else { + return store; + } + } + + /** + * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. + * + * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of + * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. + */ + function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { + if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + return byteLength(value); + } else { + return bytes(store).length; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol new file mode 100644 index 00000000..77adc33a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) +// This file was procedurally generated from scripts/generate/templates/StorageSlot.js. + +pragma solidity ^0.8.0; + +/** + * @dev Library for reading and writing primitive types to specific storage slots. + * + * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. + * This library helps with reading and writing to such slots without the need for inline assembly. + * + * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. + * + * Example usage to set ERC1967 implementation slot: + * ```solidity + * contract ERC1967 { + * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + * + * function _getImplementation() internal view returns (address) { + * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; + * } + * + * function _setImplementation(address newImplementation) internal { + * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); + * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; + * } + * } + * ``` + * + * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ + * _Available since v4.9 for `string`, `bytes`._ + */ +library StorageSlotUpgradeable { + struct AddressSlot { + address value; + } + + struct BooleanSlot { + bool value; + } + + struct Bytes32Slot { + bytes32 value; + } + + struct Uint256Slot { + uint256 value; + } + + struct StringSlot { + string value; + } + + struct BytesSlot { + bytes value; + } + + /** + * @dev Returns an `AddressSlot` with member `value` located at `slot`. + */ + function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `BooleanSlot` with member `value` located at `slot`. + */ + function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. + */ + function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `Uint256Slot` with member `value` located at `slot`. + */ + function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `StringSlot` with member `value` located at `slot`. + */ + function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `StringSlot` representation of the string storage pointer `store`. + */ + function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := store.slot + } + } + + /** + * @dev Returns an `BytesSlot` with member `value` located at `slot`. + */ + function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := slot + } + } + + /** + * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. + */ + function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { + /// @solidity memory-safe-assembly + assembly { + r.slot := store.slot + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol new file mode 100644 index 00000000..f16ae6c5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) + +pragma solidity ^0.8.0; + +import "./math/MathUpgradeable.sol"; +import "./math/SignedMathUpgradeable.sol"; + +/** + * @dev String operations. + */ +library StringsUpgradeable { + bytes16 private constant _SYMBOLS = "0123456789abcdef"; + uint8 private constant _ADDRESS_LENGTH = 20; + + /** + * @dev Converts a `uint256` to its ASCII `string` decimal representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + unchecked { + uint256 length = MathUpgradeable.log10(value) + 1; + string memory buffer = new string(length); + uint256 ptr; + /// @solidity memory-safe-assembly + assembly { + ptr := add(buffer, add(32, length)) + } + while (true) { + ptr--; + /// @solidity memory-safe-assembly + assembly { + mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) + } + value /= 10; + if (value == 0) break; + } + return buffer; + } + } + + /** + * @dev Converts a `int256` to its ASCII `string` decimal representation. + */ + function toString(int256 value) internal pure returns (string memory) { + return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.abs(value)))); + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. + */ + function toHexString(uint256 value) internal pure returns (string memory) { + unchecked { + return toHexString(value, MathUpgradeable.log256(value) + 1); + } + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. + */ + function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { + bytes memory buffer = new bytes(2 * length + 2); + buffer[0] = "0"; + buffer[1] = "x"; + for (uint256 i = 2 * length + 1; i > 1; --i) { + buffer[i] = _SYMBOLS[value & 0xf]; + value >>= 4; + } + require(value == 0, "Strings: hex length insufficient"); + return string(buffer); + } + + /** + * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. + */ + function toHexString(address addr) internal pure returns (string memory) { + return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); + } + + /** + * @dev Returns true if the two strings are equal. + */ + function equal(string memory a, string memory b) internal pure returns (bool) { + return keccak256(bytes(a)) == keccak256(bytes(b)); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol new file mode 100644 index 00000000..db6a7359 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/Timers.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Tooling for timepoints, timers and delays + * + * CAUTION: This file is deprecated as of 4.9 and will be removed in the next major release. + */ +library TimersUpgradeable { + struct Timestamp { + uint64 _deadline; + } + + function getDeadline(Timestamp memory timer) internal pure returns (uint64) { + return timer._deadline; + } + + function setDeadline(Timestamp storage timer, uint64 timestamp) internal { + timer._deadline = timestamp; + } + + function reset(Timestamp storage timer) internal { + timer._deadline = 0; + } + + function isUnset(Timestamp memory timer) internal pure returns (bool) { + return timer._deadline == 0; + } + + function isStarted(Timestamp memory timer) internal pure returns (bool) { + return timer._deadline > 0; + } + + function isPending(Timestamp memory timer) internal view returns (bool) { + return timer._deadline > block.timestamp; + } + + function isExpired(Timestamp memory timer) internal view returns (bool) { + return isStarted(timer) && timer._deadline <= block.timestamp; + } + + struct BlockNumber { + uint64 _deadline; + } + + function getDeadline(BlockNumber memory timer) internal pure returns (uint64) { + return timer._deadline; + } + + function setDeadline(BlockNumber storage timer, uint64 timestamp) internal { + timer._deadline = timestamp; + } + + function reset(BlockNumber storage timer) internal { + timer._deadline = 0; + } + + function isUnset(BlockNumber memory timer) internal pure returns (bool) { + return timer._deadline == 0; + } + + function isStarted(BlockNumber memory timer) internal pure returns (bool) { + return timer._deadline > 0; + } + + function isPending(BlockNumber memory timer) internal view returns (bool) { + return timer._deadline > block.number; + } + + function isExpired(BlockNumber memory timer) internal view returns (bool) { + return isStarted(timer) && timer._deadline <= block.number; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol new file mode 100644 index 00000000..7aff45e7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) + +pragma solidity ^0.8.0; + +import "../StringsUpgradeable.sol"; + +/** + * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. + * + * These functions can be used to verify that a message was signed by the holder + * of the private keys of a given address. + */ +library ECDSAUpgradeable { + enum RecoverError { + NoError, + InvalidSignature, + InvalidSignatureLength, + InvalidSignatureS, + InvalidSignatureV // Deprecated in v4.8 + } + + function _throwError(RecoverError error) private pure { + if (error == RecoverError.NoError) { + return; // no error: do nothing + } else if (error == RecoverError.InvalidSignature) { + revert("ECDSA: invalid signature"); + } else if (error == RecoverError.InvalidSignatureLength) { + revert("ECDSA: invalid signature length"); + } else if (error == RecoverError.InvalidSignatureS) { + revert("ECDSA: invalid signature 's' value"); + } + } + + /** + * @dev Returns the address that signed a hashed message (`hash`) with + * `signature` or error string. This address can then be used for verification purposes. + * + * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: + * this function rejects them by requiring the `s` value to be in the lower + * half order, and the `v` value to be either 27 or 28. + * + * IMPORTANT: `hash` _must_ be the result of a hash operation for the + * verification to be secure: it is possible to craft signatures that + * recover to arbitrary addresses for non-hashed data. A safe way to ensure + * this is by receiving a hash of the original message (which may otherwise + * be too long), and then calling {toEthSignedMessageHash} on it. + * + * Documentation for signature generation: + * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] + * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] + * + * _Available since v4.3._ + */ + function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { + if (signature.length == 65) { + bytes32 r; + bytes32 s; + uint8 v; + // ecrecover takes the signature parameters, and the only way to get them + // currently is to use assembly. + /// @solidity memory-safe-assembly + assembly { + r := mload(add(signature, 0x20)) + s := mload(add(signature, 0x40)) + v := byte(0, mload(add(signature, 0x60))) + } + return tryRecover(hash, v, r, s); + } else { + return (address(0), RecoverError.InvalidSignatureLength); + } + } + + /** + * @dev Returns the address that signed a hashed message (`hash`) with + * `signature`. This address can then be used for verification purposes. + * + * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: + * this function rejects them by requiring the `s` value to be in the lower + * half order, and the `v` value to be either 27 or 28. + * + * IMPORTANT: `hash` _must_ be the result of a hash operation for the + * verification to be secure: it is possible to craft signatures that + * recover to arbitrary addresses for non-hashed data. A safe way to ensure + * this is by receiving a hash of the original message (which may otherwise + * be too long), and then calling {toEthSignedMessageHash} on it. + */ + function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { + (address recovered, RecoverError error) = tryRecover(hash, signature); + _throwError(error); + return recovered; + } + + /** + * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. + * + * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] + * + * _Available since v4.3._ + */ + function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { + bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); + uint8 v = uint8((uint256(vs) >> 255) + 27); + return tryRecover(hash, v, r, s); + } + + /** + * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. + * + * _Available since v4.2._ + */ + function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { + (address recovered, RecoverError error) = tryRecover(hash, r, vs); + _throwError(error); + return recovered; + } + + /** + * @dev Overload of {ECDSA-tryRecover} that receives the `v`, + * `r` and `s` signature fields separately. + * + * _Available since v4.3._ + */ + function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { + // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature + // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines + // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most + // signatures from current libraries generate a unique signature with an s-value in the lower half order. + // + // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value + // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or + // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept + // these malleable signatures as well. + if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { + return (address(0), RecoverError.InvalidSignatureS); + } + + // If the signature is valid (and not malleable), return the signer address + address signer = ecrecover(hash, v, r, s); + if (signer == address(0)) { + return (address(0), RecoverError.InvalidSignature); + } + + return (signer, RecoverError.NoError); + } + + /** + * @dev Overload of {ECDSA-recover} that receives the `v`, + * `r` and `s` signature fields separately. + */ + function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { + (address recovered, RecoverError error) = tryRecover(hash, v, r, s); + _throwError(error); + return recovered; + } + + /** + * @dev Returns an Ethereum Signed Message, created from a `hash`. This + * produces hash corresponding to the one signed with the + * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] + * JSON-RPC method as part of EIP-191. + * + * See {recover}. + */ + function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { + // 32 is the length in bytes of hash, + // enforced by the type signature above + /// @solidity memory-safe-assembly + assembly { + mstore(0x00, "\x19Ethereum Signed Message:\n32") + mstore(0x1c, hash) + message := keccak256(0x00, 0x3c) + } + } + + /** + * @dev Returns an Ethereum Signed Message, created from `s`. This + * produces hash corresponding to the one signed with the + * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] + * JSON-RPC method as part of EIP-191. + * + * See {recover}. + */ + function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { + return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); + } + + /** + * @dev Returns an Ethereum Signed Typed Data, created from a + * `domainSeparator` and a `structHash`. This produces hash corresponding + * to the one signed with the + * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] + * JSON-RPC method as part of EIP-712. + * + * See {recover}. + */ + function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { + /// @solidity memory-safe-assembly + assembly { + let ptr := mload(0x40) + mstore(ptr, "\x19\x01") + mstore(add(ptr, 0x02), domainSeparator) + mstore(add(ptr, 0x22), structHash) + data := keccak256(ptr, 0x42) + } + } + + /** + * @dev Returns an Ethereum Signed Data with intended validator, created from a + * `validator` and `data` according to the version 0 of EIP-191. + * + * See {recover}. + */ + function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { + return keccak256(abi.encodePacked("\x19\x00", validator, data)); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/EIP712Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/EIP712Upgradeable.sol new file mode 100644 index 00000000..f36b38ee --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/EIP712Upgradeable.sol @@ -0,0 +1,205 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) + +pragma solidity ^0.8.8; + +import "./ECDSAUpgradeable.sol"; +import "../../interfaces/IERC5267Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. + * + * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, + * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding + * they need in their contracts using a combination of `abi.encode` and `keccak256`. + * + * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding + * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA + * ({_hashTypedDataV4}). + * + * The implementation of the domain separator was designed to be as efficient as possible while still properly updating + * the chain id to protect against replay attacks on an eventual fork of the chain. + * + * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method + * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. + * + * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain + * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the + * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. + * + * _Available since v3.4._ + * + * @custom:storage-size 52 + */ +abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { + bytes32 private constant _TYPE_HASH = + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); + + /// @custom:oz-renamed-from _HASHED_NAME + bytes32 private _hashedName; + /// @custom:oz-renamed-from _HASHED_VERSION + bytes32 private _hashedVersion; + + string private _name; + string private _version; + + /** + * @dev Initializes the domain separator and parameter caches. + * + * The meaning of `name` and `version` is specified in + * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: + * + * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. + * - `version`: the current major version of the signing domain. + * + * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart + * contract upgrade]. + */ + function __EIP712_init(string memory name, string memory version) internal onlyInitializing { + __EIP712_init_unchained(name, version); + } + + function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { + _name = name; + _version = version; + + // Reset prior values in storage if upgrading + _hashedName = 0; + _hashedVersion = 0; + } + + /** + * @dev Returns the domain separator for the current chain. + */ + function _domainSeparatorV4() internal view returns (bytes32) { + return _buildDomainSeparator(); + } + + function _buildDomainSeparator() private view returns (bytes32) { + return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); + } + + /** + * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this + * function returns the hash of the fully encoded EIP712 message for this domain. + * + * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: + * + * ```solidity + * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( + * keccak256("Mail(address to,string contents)"), + * mailTo, + * keccak256(bytes(mailContents)) + * ))); + * address signer = ECDSA.recover(digest, signature); + * ``` + */ + function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { + return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash); + } + + /** + * @dev See {EIP-5267}. + * + * _Available since v4.9._ + */ + function eip712Domain() + public + view + virtual + override + returns ( + bytes1 fields, + string memory name, + string memory version, + uint256 chainId, + address verifyingContract, + bytes32 salt, + uint256[] memory extensions + ) + { + // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized + // and the EIP712 domain is not reliable, as it will be missing name and version. + require(_hashedName == 0 && _hashedVersion == 0, "EIP712: Uninitialized"); + + return ( + hex"0f", // 01111 + _EIP712Name(), + _EIP712Version(), + block.chainid, + address(this), + bytes32(0), + new uint256[](0) + ); + } + + /** + * @dev The name parameter for the EIP712 domain. + * + * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs + * are a concern. + */ + function _EIP712Name() internal virtual view returns (string memory) { + return _name; + } + + /** + * @dev The version parameter for the EIP712 domain. + * + * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs + * are a concern. + */ + function _EIP712Version() internal virtual view returns (string memory) { + return _version; + } + + /** + * @dev The hash of the name parameter for the EIP712 domain. + * + * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead. + */ + function _EIP712NameHash() internal view returns (bytes32) { + string memory name = _EIP712Name(); + if (bytes(name).length > 0) { + return keccak256(bytes(name)); + } else { + // If the name is empty, the contract may have been upgraded without initializing the new storage. + // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design. + bytes32 hashedName = _hashedName; + if (hashedName != 0) { + return hashedName; + } else { + return keccak256(""); + } + } + } + + /** + * @dev The hash of the version parameter for the EIP712 domain. + * + * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead. + */ + function _EIP712VersionHash() internal view returns (bytes32) { + string memory version = _EIP712Version(); + if (bytes(version).length > 0) { + return keccak256(bytes(version)); + } else { + // If the version is empty, the contract may have been upgraded without initializing the new storage. + // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design. + bytes32 hashedVersion = _hashedVersion; + if (hashedVersion != 0) { + return hashedVersion; + } else { + return keccak256(""); + } + } + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol new file mode 100644 index 00000000..e4f6c37a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) + +pragma solidity ^0.8.0; + +/** + * @dev These functions deal with verification of Merkle Tree proofs. + * + * The tree and the proofs can be generated using our + * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. + * You will find a quickstart guide in the readme. + * + * WARNING: You should avoid using leaf values that are 64 bytes long prior to + * hashing, or use a hash function other than keccak256 for hashing leaves. + * This is because the concatenation of a sorted pair of internal nodes in + * the merkle tree could be reinterpreted as a leaf value. + * OpenZeppelin's JavaScript library generates merkle trees that are safe + * against this attack out of the box. + */ +library MerkleProofUpgradeable { + /** + * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree + * defined by `root`. For this, a `proof` must be provided, containing + * sibling hashes on the branch from the leaf to the root of the tree. Each + * pair of leaves and each pair of pre-images are assumed to be sorted. + */ + function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { + return processProof(proof, leaf) == root; + } + + /** + * @dev Calldata version of {verify} + * + * _Available since v4.7._ + */ + function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { + return processProofCalldata(proof, leaf) == root; + } + + /** + * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up + * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt + * hash matches the root of the tree. When processing the proof, the pairs + * of leafs & pre-images are assumed to be sorted. + * + * _Available since v4.4._ + */ + function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = _hashPair(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Calldata version of {processProof} + * + * _Available since v4.7._ + */ + function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = _hashPair(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by + * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function multiProofVerify( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProof(proof, proofFlags, leaves) == root; + } + + /** + * @dev Calldata version of {multiProofVerify} + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function multiProofVerifyCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProofCalldata(proof, proofFlags, leaves) == root; + } + + /** + * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction + * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another + * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false + * respectively. + * + * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the + * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). + * + * _Available since v4.7._ + */ + function processMultiProof( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofLen = proof.length; + uint256 totalHashes = proofFlags.length; + + // Check proof validity. + require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); + + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](totalHashes); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < totalHashes; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = _hashPair(a, b); + } + + if (totalHashes > 0) { + require(proofPos == proofLen, "MerkleProof: invalid multiproof"); + unchecked { + return hashes[totalHashes - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + /** + * @dev Calldata version of {processMultiProof}. + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function processMultiProofCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofLen = proof.length; + uint256 totalHashes = proofFlags.length; + + // Check proof validity. + require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); + + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](totalHashes); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < totalHashes; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = _hashPair(a, b); + } + + if (totalHashes > 0) { + require(proofPos == proofLen, "MerkleProof: invalid multiproof"); + unchecked { + return hashes[totalHashes - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { + return a < b ? _efficientHash(a, b) : _efficientHash(b, a); + } + + function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { + /// @solidity memory-safe-assembly + assembly { + mstore(0x00, a) + mstore(0x20, b) + value := keccak256(0x00, 0x40) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol new file mode 100644 index 00000000..631bc5fd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) + +pragma solidity ^0.8.0; + +import "./ECDSAUpgradeable.sol"; +import "../../interfaces/IERC1271Upgradeable.sol"; + +/** + * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA + * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like + * Argent and Gnosis Safe. + * + * _Available since v4.1._ + */ +library SignatureCheckerUpgradeable { + /** + * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the + * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + */ + function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { + (address recovered, ECDSAUpgradeable.RecoverError error) = ECDSAUpgradeable.tryRecover(hash, signature); + return + (error == ECDSAUpgradeable.RecoverError.NoError && recovered == signer) || + isValidERC1271SignatureNow(signer, hash, signature); + } + + /** + * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated + * against the signer smart contract using ERC1271. + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + */ + function isValidERC1271SignatureNow( + address signer, + bytes32 hash, + bytes memory signature + ) internal view returns (bool) { + (bool success, bytes memory result) = signer.staticcall( + abi.encodeWithSelector(IERC1271Upgradeable.isValidSignature.selector, hash, signature) + ); + return (success && + result.length >= 32 && + abi.decode(result, (bytes32)) == bytes32(IERC1271Upgradeable.isValidSignature.selector)); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol new file mode 100644 index 00000000..001c34ed --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol) + +pragma solidity ^0.8.0; + +// EIP-712 is Final as of 2022-08-11. This file is deprecated. + +import "./EIP712Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol new file mode 100644 index 00000000..886f6ae6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/escrow/ConditionalEscrow.sol) + +pragma solidity ^0.8.0; + +import "./EscrowUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @title ConditionalEscrow + * @dev Base abstract escrow to only allow withdrawal if a condition is met. + * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. + */ +abstract contract ConditionalEscrowUpgradeable is Initializable, EscrowUpgradeable { + function __ConditionalEscrow_init() internal onlyInitializing { + __Ownable_init_unchained(); + } + + function __ConditionalEscrow_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns whether an address is allowed to withdraw their funds. To be + * implemented by derived contracts. + * @param payee The destination address of the funds. + */ + function withdrawalAllowed(address payee) public view virtual returns (bool); + + function withdraw(address payable payee) public virtual override { + require(withdrawalAllowed(payee), "ConditionalEscrow: payee is not allowed to withdraw"); + super.withdraw(payee); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol new file mode 100644 index 00000000..bc1aac32 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (utils/escrow/Escrow.sol) + +pragma solidity ^0.8.0; + +import "../../access/OwnableUpgradeable.sol"; +import "../AddressUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @title Escrow + * @dev Base escrow contract, holds funds designated for a payee until they + * withdraw them. + * + * Intended usage: This contract (and derived escrow contracts) should be a + * standalone contract, that only interacts with the contract that instantiated + * it. That way, it is guaranteed that all Ether will be handled according to + * the `Escrow` rules, and there is no need to check for payable functions or + * transfers in the inheritance tree. The contract that uses the escrow as its + * payment method should be its owner, and provide public methods redirecting + * to the escrow's deposit and withdraw. + */ +contract EscrowUpgradeable is Initializable, OwnableUpgradeable { + using AddressUpgradeable for address payable; + + event Deposited(address indexed payee, uint256 weiAmount); + event Withdrawn(address indexed payee, uint256 weiAmount); + + mapping(address => uint256) private _deposits; + + function __Escrow_init() internal onlyInitializing { + __Ownable_init_unchained(); + } + + function __Escrow_init_unchained() internal onlyInitializing { + } + function initialize() public virtual initializer { + __Escrow_init(); + } + function depositsOf(address payee) public view returns (uint256) { + return _deposits[payee]; + } + + /** + * @dev Stores the sent amount as credit to be withdrawn. + * @param payee The destination address of the funds. + * + * Emits a {Deposited} event. + */ + function deposit(address payee) public payable virtual onlyOwner { + uint256 amount = msg.value; + _deposits[payee] += amount; + emit Deposited(payee, amount); + } + + /** + * @dev Withdraw accumulated balance for a payee, forwarding all gas to the + * recipient. + * + * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. + * Make sure you trust the recipient, or are either following the + * checks-effects-interactions pattern or using {ReentrancyGuard}. + * + * @param payee The address whose funds will be withdrawn and transferred to. + * + * Emits a {Withdrawn} event. + */ + function withdraw(address payable payee) public virtual onlyOwner { + uint256 payment = _deposits[payee]; + + _deposits[payee] = 0; + + payee.sendValue(payment); + + emit Withdrawn(payee, payment); + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol new file mode 100644 index 00000000..2e132b54 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/escrow/RefundEscrow.sol) + +pragma solidity ^0.8.0; + +import "./ConditionalEscrowUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @title RefundEscrow + * @dev Escrow that holds funds for a beneficiary, deposited from multiple + * parties. + * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. + * @dev The owner account (that is, the contract that instantiates this + * contract) may deposit, close the deposit period, and allow for either + * withdrawal by the beneficiary, or refunds to the depositors. All interactions + * with `RefundEscrow` will be made through the owner contract. + */ +contract RefundEscrowUpgradeable is Initializable, ConditionalEscrowUpgradeable { + using AddressUpgradeable for address payable; + + enum State { + Active, + Refunding, + Closed + } + + event RefundsClosed(); + event RefundsEnabled(); + + State private _state; + address payable private _beneficiary; + + /** + * @dev Constructor. + * @param beneficiary_ The beneficiary of the deposits. + */ + function __RefundEscrow_init(address payable beneficiary_) internal onlyInitializing { + __Ownable_init_unchained(); + __RefundEscrow_init_unchained(beneficiary_); + } + + function __RefundEscrow_init_unchained(address payable beneficiary_) internal onlyInitializing { + require(beneficiary_ != address(0), "RefundEscrow: beneficiary is the zero address"); + _beneficiary = beneficiary_; + _state = State.Active; + } + + /** + * @return The current state of the escrow. + */ + function state() public view virtual returns (State) { + return _state; + } + + /** + * @return The beneficiary of the escrow. + */ + function beneficiary() public view virtual returns (address payable) { + return _beneficiary; + } + + /** + * @dev Stores funds that may later be refunded. + * @param refundee The address funds will be sent to if a refund occurs. + */ + function deposit(address refundee) public payable virtual override { + require(state() == State.Active, "RefundEscrow: can only deposit while active"); + super.deposit(refundee); + } + + /** + * @dev Allows for the beneficiary to withdraw their funds, rejecting + * further deposits. + */ + function close() public virtual onlyOwner { + require(state() == State.Active, "RefundEscrow: can only close while active"); + _state = State.Closed; + emit RefundsClosed(); + } + + /** + * @dev Allows for refunds to take place, rejecting further deposits. + */ + function enableRefunds() public virtual onlyOwner { + require(state() == State.Active, "RefundEscrow: can only enable refunds while active"); + _state = State.Refunding; + emit RefundsEnabled(); + } + + /** + * @dev Withdraws the beneficiary's funds. + */ + function beneficiaryWithdraw() public virtual { + require(state() == State.Closed, "RefundEscrow: beneficiary can only withdraw while closed"); + beneficiary().sendValue(address(this).balance); + } + + /** + * @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a + * 'payee' argument, but we ignore it here since the condition is global, not per-payee. + */ + function withdrawalAllowed(address) public view override returns (bool) { + return state() == State.Refunding; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol new file mode 100644 index 00000000..7500d2cc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol) + +pragma solidity ^0.8.0; + +import "./IERC165Upgradeable.sol"; + +/** + * @dev Library used to query support of an interface declared via {IERC165}. + * + * Note that these functions return the actual result of the query: they do not + * `revert` if an interface is not supported. It is up to the caller to decide + * what to do in these cases. + */ +library ERC165CheckerUpgradeable { + // As per the EIP-165 spec, no interface should ever match 0xffffffff + bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; + + /** + * @dev Returns true if `account` supports the {IERC165} interface. + */ + function supportsERC165(address account) internal view returns (bool) { + // Any contract that implements ERC165 must explicitly indicate support of + // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid + return + supportsERC165InterfaceUnchecked(account, type(IERC165Upgradeable).interfaceId) && + !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); + } + + /** + * @dev Returns true if `account` supports the interface defined by + * `interfaceId`. Support for {IERC165} itself is queried automatically. + * + * See {IERC165-supportsInterface}. + */ + function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { + // query support of both ERC165 as per the spec and support of _interfaceId + return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); + } + + /** + * @dev Returns a boolean array where each value corresponds to the + * interfaces passed in and whether they're supported or not. This allows + * you to batch check interfaces for a contract where your expectation + * is that some interfaces may not be supported. + * + * See {IERC165-supportsInterface}. + * + * _Available since v3.4._ + */ + function getSupportedInterfaces( + address account, + bytes4[] memory interfaceIds + ) internal view returns (bool[] memory) { + // an array of booleans corresponding to interfaceIds and whether they're supported or not + bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); + + // query support of ERC165 itself + if (supportsERC165(account)) { + // query support of each interface in interfaceIds + for (uint256 i = 0; i < interfaceIds.length; i++) { + interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]); + } + } + + return interfaceIdsSupported; + } + + /** + * @dev Returns true if `account` supports all the interfaces defined in + * `interfaceIds`. Support for {IERC165} itself is queried automatically. + * + * Batch-querying can lead to gas savings by skipping repeated checks for + * {IERC165} support. + * + * See {IERC165-supportsInterface}. + */ + function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { + // query support of ERC165 itself + if (!supportsERC165(account)) { + return false; + } + + // query support of each interface in interfaceIds + for (uint256 i = 0; i < interfaceIds.length; i++) { + if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) { + return false; + } + } + + // all interfaces supported + return true; + } + + /** + * @notice Query if a contract implements an interface, does not check ERC165 support + * @param account The address of the contract to query for support of an interface + * @param interfaceId The interface identifier, as specified in ERC-165 + * @return true if the contract at account indicates support of the interface with + * identifier interfaceId, false otherwise + * @dev Assumes that account contains a contract that supports ERC165, otherwise + * the behavior of this method is undefined. This precondition can be checked + * with {supportsERC165}. + * + * Some precompiled contracts will falsely indicate support for a given interface, so caution + * should be exercised when using this function. + * + * Interface identification is specified in ERC-165. + */ + function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { + // prepare call + bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId); + + // perform static call + bool success; + uint256 returnSize; + uint256 returnValue; + assembly { + success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) + returnSize := returndatasize() + returnValue := mload(0x00) + } + + return success && returnSize >= 0x20 && returnValue > 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol new file mode 100644 index 00000000..66fefad0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol) + +pragma solidity ^0.8.0; + +import "./ERC165Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Storage based implementation of the {IERC165} interface. + * + * Contracts may inherit from this and call {_registerInterface} to declare + * their support of an interface. + */ +abstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable { + /** + * @dev Mapping of interface ids to whether or not it's supported. + */ + mapping(bytes4 => bool) private _supportedInterfaces; + + function __ERC165Storage_init() internal onlyInitializing { + } + + function __ERC165Storage_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; + } + + /** + * @dev Registers the contract as an implementer of the interface defined by + * `interfaceId`. Support of the actual ERC165 interface is automatic and + * registering its interface id is not required. + * + * See {IERC165-supportsInterface}. + * + * Requirements: + * + * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). + */ + function _registerInterface(bytes4 interfaceId) internal virtual { + require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); + _supportedInterfaces[interfaceId] = true; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol new file mode 100644 index 00000000..386b74d7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) + +pragma solidity ^0.8.0; + +import "./IERC165Upgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check + * for the additional interface id that will be supported. For example: + * + * ```solidity + * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); + * } + * ``` + * + * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. + */ +abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { + function __ERC165_init() internal onlyInitializing { + } + + function __ERC165_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IERC165Upgradeable).interfaceId; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol new file mode 100644 index 00000000..e3e3d1d0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC1820Implementer.sol) + +pragma solidity ^0.8.0; + +import "./IERC1820ImplementerUpgradeable.sol"; +import {Initializable} from "../../proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the {IERC1820Implementer} interface. + * + * Contracts may inherit from this and call {_registerInterfaceForAddress} to + * declare their willingness to be implementers. + * {IERC1820Registry-setInterfaceImplementer} should then be called for the + * registration to be complete. + * + * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. + */ +contract ERC1820ImplementerUpgradeable is Initializable, IERC1820ImplementerUpgradeable { + bytes32 private constant _ERC1820_ACCEPT_MAGIC = keccak256("ERC1820_ACCEPT_MAGIC"); + + mapping(bytes32 => mapping(address => bool)) private _supportedInterfaces; + + function __ERC1820Implementer_init() internal onlyInitializing { + } + + function __ERC1820Implementer_init_unchained() internal onlyInitializing { + } + /** + * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}. + */ + function canImplementInterfaceForAddress( + bytes32 interfaceHash, + address account + ) public view virtual override returns (bytes32) { + return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00); + } + + /** + * @dev Declares the contract as willing to be an implementer of + * `interfaceHash` for `account`. + * + * See {IERC1820Registry-setInterfaceImplementer} and + * {IERC1820Registry-interfaceHash}. + */ + function _registerInterfaceForAddress(bytes32 interfaceHash, address account) internal virtual { + _supportedInterfaces[interfaceHash][account] = true; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol new file mode 100644 index 00000000..26fc1d7d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165Upgradeable { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol new file mode 100644 index 00000000..7a19d897 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface for an ERC1820 implementer, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP]. + * Used by contracts that will be registered as implementers in the + * {IERC1820Registry}. + */ +interface IERC1820ImplementerUpgradeable { + /** + * @dev Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract + * implements `interfaceHash` for `account`. + * + * See {IERC1820Registry-setInterfaceImplementer}. + */ + function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol new file mode 100644 index 00000000..ce23caa1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/IERC1820Registry.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the global ERC1820 Registry, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register + * implementers for interfaces in this registry, as well as query support. + * + * Implementers may be shared by multiple accounts, and can also implement more + * than a single interface for each account. Contracts can implement interfaces + * for themselves, but externally-owned accounts (EOA) must delegate this to a + * contract. + * + * {IERC165} interfaces can also be queried via the registry. + * + * For an in-depth explanation and source code analysis, see the EIP text. + */ +interface IERC1820RegistryUpgradeable { + event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); + + event ManagerChanged(address indexed account, address indexed newManager); + + /** + * @dev Sets `newManager` as the manager for `account`. A manager of an + * account is able to set interface implementers for it. + * + * By default, each account is its own manager. Passing a value of `0x0` in + * `newManager` will reset the manager to this initial state. + * + * Emits a {ManagerChanged} event. + * + * Requirements: + * + * - the caller must be the current manager for `account`. + */ + function setManager(address account, address newManager) external; + + /** + * @dev Returns the manager for `account`. + * + * See {setManager}. + */ + function getManager(address account) external view returns (address); + + /** + * @dev Sets the `implementer` contract as ``account``'s implementer for + * `interfaceHash`. + * + * `account` being the zero address is an alias for the caller's address. + * The zero address can also be used in `implementer` to remove an old one. + * + * See {interfaceHash} to learn how these are created. + * + * Emits an {InterfaceImplementerSet} event. + * + * Requirements: + * + * - the caller must be the current manager for `account`. + * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not + * end in 28 zeroes). + * - `implementer` must implement {IERC1820Implementer} and return true when + * queried for support, unless `implementer` is the caller. See + * {IERC1820Implementer-canImplementInterfaceForAddress}. + */ + function setInterfaceImplementer(address account, bytes32 _interfaceHash, address implementer) external; + + /** + * @dev Returns the implementer of `interfaceHash` for `account`. If no such + * implementer is registered, returns the zero address. + * + * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 + * zeroes), `account` will be queried for support of it. + * + * `account` being the zero address is an alias for the caller's address. + */ + function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address); + + /** + * @dev Returns the interface hash for an `interfaceName`, as defined in the + * corresponding + * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. + */ + function interfaceHash(string calldata interfaceName) external pure returns (bytes32); + + /** + * @notice Updates the cache with whether the contract implements an ERC165 interface or not. + * @param account Address of the contract for which to update the cache. + * @param interfaceId ERC165 interface for which to update the cache. + */ + function updateERC165Cache(address account, bytes4 interfaceId) external; + + /** + * @notice Checks whether a contract implements an ERC165 interface or not. + * If the result is not cached a direct lookup on the contract address is performed. + * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling + * {updateERC165Cache} with the contract address. + * @param account Address of the contract to check. + * @param interfaceId ERC165 interface to check. + * @return True if `account` implements `interfaceId`, false otherwise. + */ + function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); + + /** + * @notice Checks whether a contract implements an ERC165 interface or not without using or updating the cache. + * @param account Address of the contract to check. + * @param interfaceId ERC165 interface to check. + * @return True if `account` implements `interfaceId`, false otherwise. + */ + function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol new file mode 100644 index 00000000..c6c014ff --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol @@ -0,0 +1,339 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Standard math utilities missing in the Solidity language. + */ +library MathUpgradeable { + enum Rounding { + Down, // Toward negative infinity + Up, // Toward infinity + Zero // Toward zero + } + + /** + * @dev Returns the largest of two numbers. + */ + function max(uint256 a, uint256 b) internal pure returns (uint256) { + return a > b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(uint256 a, uint256 b) internal pure returns (uint256) { + return a < b ? a : b; + } + + /** + * @dev Returns the average of two numbers. The result is rounded towards + * zero. + */ + function average(uint256 a, uint256 b) internal pure returns (uint256) { + // (a + b) / 2 can overflow. + return (a & b) + (a ^ b) / 2; + } + + /** + * @dev Returns the ceiling of the division of two numbers. + * + * This differs from standard division with `/` in that it rounds up instead + * of rounding down. + */ + function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { + // (a + b - 1) / b can overflow on addition, so we distribute. + return a == 0 ? 0 : (a - 1) / b + 1; + } + + /** + * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 + * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) + * with further edits by Uniswap Labs also under MIT license. + */ + function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { + unchecked { + // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use + // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 + // variables such that product = prod1 * 2^256 + prod0. + uint256 prod0; // Least significant 256 bits of the product + uint256 prod1; // Most significant 256 bits of the product + assembly { + let mm := mulmod(x, y, not(0)) + prod0 := mul(x, y) + prod1 := sub(sub(mm, prod0), lt(mm, prod0)) + } + + // Handle non-overflow cases, 256 by 256 division. + if (prod1 == 0) { + // Solidity will revert if denominator == 0, unlike the div opcode on its own. + // The surrounding unchecked block does not change this fact. + // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. + return prod0 / denominator; + } + + // Make sure the result is less than 2^256. Also prevents denominator == 0. + require(denominator > prod1, "Math: mulDiv overflow"); + + /////////////////////////////////////////////// + // 512 by 256 division. + /////////////////////////////////////////////// + + // Make division exact by subtracting the remainder from [prod1 prod0]. + uint256 remainder; + assembly { + // Compute remainder using mulmod. + remainder := mulmod(x, y, denominator) + + // Subtract 256 bit number from 512 bit number. + prod1 := sub(prod1, gt(remainder, prod0)) + prod0 := sub(prod0, remainder) + } + + // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. + // See https://cs.stackexchange.com/q/138556/92363. + + // Does not overflow because the denominator cannot be zero at this stage in the function. + uint256 twos = denominator & (~denominator + 1); + assembly { + // Divide denominator by twos. + denominator := div(denominator, twos) + + // Divide [prod1 prod0] by twos. + prod0 := div(prod0, twos) + + // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. + twos := add(div(sub(0, twos), twos), 1) + } + + // Shift in bits from prod1 into prod0. + prod0 |= prod1 * twos; + + // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such + // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for + // four bits. That is, denominator * inv = 1 mod 2^4. + uint256 inverse = (3 * denominator) ^ 2; + + // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works + // in modular arithmetic, doubling the correct bits in each step. + inverse *= 2 - denominator * inverse; // inverse mod 2^8 + inverse *= 2 - denominator * inverse; // inverse mod 2^16 + inverse *= 2 - denominator * inverse; // inverse mod 2^32 + inverse *= 2 - denominator * inverse; // inverse mod 2^64 + inverse *= 2 - denominator * inverse; // inverse mod 2^128 + inverse *= 2 - denominator * inverse; // inverse mod 2^256 + + // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. + // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is + // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 + // is no longer required. + result = prod0 * inverse; + return result; + } + } + + /** + * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. + */ + function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { + uint256 result = mulDiv(x, y, denominator); + if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { + result += 1; + } + return result; + } + + /** + * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. + * + * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). + */ + function sqrt(uint256 a) internal pure returns (uint256) { + if (a == 0) { + return 0; + } + + // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. + // + // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have + // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. + // + // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` + // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` + // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` + // + // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. + uint256 result = 1 << (log2(a) >> 1); + + // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, + // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at + // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision + // into the expected uint128 result. + unchecked { + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + return min(result, a / result); + } + } + + /** + * @notice Calculates sqrt(a), following the selected rounding direction. + */ + function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = sqrt(a); + return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); + } + } + + /** + * @dev Return the log in base 2, rounded down, of a positive value. + * Returns 0 if given 0. + */ + function log2(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >> 128 > 0) { + value >>= 128; + result += 128; + } + if (value >> 64 > 0) { + value >>= 64; + result += 64; + } + if (value >> 32 > 0) { + value >>= 32; + result += 32; + } + if (value >> 16 > 0) { + value >>= 16; + result += 16; + } + if (value >> 8 > 0) { + value >>= 8; + result += 8; + } + if (value >> 4 > 0) { + value >>= 4; + result += 4; + } + if (value >> 2 > 0) { + value >>= 2; + result += 2; + } + if (value >> 1 > 0) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 2, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log2(value); + return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); + } + } + + /** + * @dev Return the log in base 10, rounded down, of a positive value. + * Returns 0 if given 0. + */ + function log10(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >= 10 ** 64) { + value /= 10 ** 64; + result += 64; + } + if (value >= 10 ** 32) { + value /= 10 ** 32; + result += 32; + } + if (value >= 10 ** 16) { + value /= 10 ** 16; + result += 16; + } + if (value >= 10 ** 8) { + value /= 10 ** 8; + result += 8; + } + if (value >= 10 ** 4) { + value /= 10 ** 4; + result += 4; + } + if (value >= 10 ** 2) { + value /= 10 ** 2; + result += 2; + } + if (value >= 10 ** 1) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 10, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log10(value); + return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); + } + } + + /** + * @dev Return the log in base 256, rounded down, of a positive value. + * Returns 0 if given 0. + * + * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. + */ + function log256(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >> 128 > 0) { + value >>= 128; + result += 16; + } + if (value >> 64 > 0) { + value >>= 64; + result += 8; + } + if (value >> 32 > 0) { + value >>= 32; + result += 4; + } + if (value >> 16 > 0) { + value >>= 16; + result += 2; + } + if (value >> 8 > 0) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 256, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log256(value); + return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol new file mode 100644 index 00000000..9b2db2a8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol @@ -0,0 +1,1136 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) +// This file was procedurally generated from scripts/generate/templates/SafeCast.js. + +pragma solidity ^0.8.0; + +/** + * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow + * checks. + * + * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can + * easily result in undesired exploitation or bugs, since developers usually + * assume that overflows raise errors. `SafeCast` restores this intuition by + * reverting the transaction when such an operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + * + * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing + * all math on `uint256` and `int256` and then downcasting. + */ +library SafeCastUpgradeable { + /** + * @dev Returns the downcasted uint248 from uint256, reverting on + * overflow (when the input is greater than largest uint248). + * + * Counterpart to Solidity's `uint248` operator. + * + * Requirements: + * + * - input must fit into 248 bits + * + * _Available since v4.7._ + */ + function toUint248(uint256 value) internal pure returns (uint248) { + require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits"); + return uint248(value); + } + + /** + * @dev Returns the downcasted uint240 from uint256, reverting on + * overflow (when the input is greater than largest uint240). + * + * Counterpart to Solidity's `uint240` operator. + * + * Requirements: + * + * - input must fit into 240 bits + * + * _Available since v4.7._ + */ + function toUint240(uint256 value) internal pure returns (uint240) { + require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits"); + return uint240(value); + } + + /** + * @dev Returns the downcasted uint232 from uint256, reverting on + * overflow (when the input is greater than largest uint232). + * + * Counterpart to Solidity's `uint232` operator. + * + * Requirements: + * + * - input must fit into 232 bits + * + * _Available since v4.7._ + */ + function toUint232(uint256 value) internal pure returns (uint232) { + require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits"); + return uint232(value); + } + + /** + * @dev Returns the downcasted uint224 from uint256, reverting on + * overflow (when the input is greater than largest uint224). + * + * Counterpart to Solidity's `uint224` operator. + * + * Requirements: + * + * - input must fit into 224 bits + * + * _Available since v4.2._ + */ + function toUint224(uint256 value) internal pure returns (uint224) { + require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); + return uint224(value); + } + + /** + * @dev Returns the downcasted uint216 from uint256, reverting on + * overflow (when the input is greater than largest uint216). + * + * Counterpart to Solidity's `uint216` operator. + * + * Requirements: + * + * - input must fit into 216 bits + * + * _Available since v4.7._ + */ + function toUint216(uint256 value) internal pure returns (uint216) { + require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits"); + return uint216(value); + } + + /** + * @dev Returns the downcasted uint208 from uint256, reverting on + * overflow (when the input is greater than largest uint208). + * + * Counterpart to Solidity's `uint208` operator. + * + * Requirements: + * + * - input must fit into 208 bits + * + * _Available since v4.7._ + */ + function toUint208(uint256 value) internal pure returns (uint208) { + require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits"); + return uint208(value); + } + + /** + * @dev Returns the downcasted uint200 from uint256, reverting on + * overflow (when the input is greater than largest uint200). + * + * Counterpart to Solidity's `uint200` operator. + * + * Requirements: + * + * - input must fit into 200 bits + * + * _Available since v4.7._ + */ + function toUint200(uint256 value) internal pure returns (uint200) { + require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits"); + return uint200(value); + } + + /** + * @dev Returns the downcasted uint192 from uint256, reverting on + * overflow (when the input is greater than largest uint192). + * + * Counterpart to Solidity's `uint192` operator. + * + * Requirements: + * + * - input must fit into 192 bits + * + * _Available since v4.7._ + */ + function toUint192(uint256 value) internal pure returns (uint192) { + require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits"); + return uint192(value); + } + + /** + * @dev Returns the downcasted uint184 from uint256, reverting on + * overflow (when the input is greater than largest uint184). + * + * Counterpart to Solidity's `uint184` operator. + * + * Requirements: + * + * - input must fit into 184 bits + * + * _Available since v4.7._ + */ + function toUint184(uint256 value) internal pure returns (uint184) { + require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits"); + return uint184(value); + } + + /** + * @dev Returns the downcasted uint176 from uint256, reverting on + * overflow (when the input is greater than largest uint176). + * + * Counterpart to Solidity's `uint176` operator. + * + * Requirements: + * + * - input must fit into 176 bits + * + * _Available since v4.7._ + */ + function toUint176(uint256 value) internal pure returns (uint176) { + require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits"); + return uint176(value); + } + + /** + * @dev Returns the downcasted uint168 from uint256, reverting on + * overflow (when the input is greater than largest uint168). + * + * Counterpart to Solidity's `uint168` operator. + * + * Requirements: + * + * - input must fit into 168 bits + * + * _Available since v4.7._ + */ + function toUint168(uint256 value) internal pure returns (uint168) { + require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits"); + return uint168(value); + } + + /** + * @dev Returns the downcasted uint160 from uint256, reverting on + * overflow (when the input is greater than largest uint160). + * + * Counterpart to Solidity's `uint160` operator. + * + * Requirements: + * + * - input must fit into 160 bits + * + * _Available since v4.7._ + */ + function toUint160(uint256 value) internal pure returns (uint160) { + require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits"); + return uint160(value); + } + + /** + * @dev Returns the downcasted uint152 from uint256, reverting on + * overflow (when the input is greater than largest uint152). + * + * Counterpart to Solidity's `uint152` operator. + * + * Requirements: + * + * - input must fit into 152 bits + * + * _Available since v4.7._ + */ + function toUint152(uint256 value) internal pure returns (uint152) { + require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits"); + return uint152(value); + } + + /** + * @dev Returns the downcasted uint144 from uint256, reverting on + * overflow (when the input is greater than largest uint144). + * + * Counterpart to Solidity's `uint144` operator. + * + * Requirements: + * + * - input must fit into 144 bits + * + * _Available since v4.7._ + */ + function toUint144(uint256 value) internal pure returns (uint144) { + require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits"); + return uint144(value); + } + + /** + * @dev Returns the downcasted uint136 from uint256, reverting on + * overflow (when the input is greater than largest uint136). + * + * Counterpart to Solidity's `uint136` operator. + * + * Requirements: + * + * - input must fit into 136 bits + * + * _Available since v4.7._ + */ + function toUint136(uint256 value) internal pure returns (uint136) { + require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits"); + return uint136(value); + } + + /** + * @dev Returns the downcasted uint128 from uint256, reverting on + * overflow (when the input is greater than largest uint128). + * + * Counterpart to Solidity's `uint128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v2.5._ + */ + function toUint128(uint256 value) internal pure returns (uint128) { + require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); + return uint128(value); + } + + /** + * @dev Returns the downcasted uint120 from uint256, reverting on + * overflow (when the input is greater than largest uint120). + * + * Counterpart to Solidity's `uint120` operator. + * + * Requirements: + * + * - input must fit into 120 bits + * + * _Available since v4.7._ + */ + function toUint120(uint256 value) internal pure returns (uint120) { + require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits"); + return uint120(value); + } + + /** + * @dev Returns the downcasted uint112 from uint256, reverting on + * overflow (when the input is greater than largest uint112). + * + * Counterpart to Solidity's `uint112` operator. + * + * Requirements: + * + * - input must fit into 112 bits + * + * _Available since v4.7._ + */ + function toUint112(uint256 value) internal pure returns (uint112) { + require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits"); + return uint112(value); + } + + /** + * @dev Returns the downcasted uint104 from uint256, reverting on + * overflow (when the input is greater than largest uint104). + * + * Counterpart to Solidity's `uint104` operator. + * + * Requirements: + * + * - input must fit into 104 bits + * + * _Available since v4.7._ + */ + function toUint104(uint256 value) internal pure returns (uint104) { + require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits"); + return uint104(value); + } + + /** + * @dev Returns the downcasted uint96 from uint256, reverting on + * overflow (when the input is greater than largest uint96). + * + * Counterpart to Solidity's `uint96` operator. + * + * Requirements: + * + * - input must fit into 96 bits + * + * _Available since v4.2._ + */ + function toUint96(uint256 value) internal pure returns (uint96) { + require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); + return uint96(value); + } + + /** + * @dev Returns the downcasted uint88 from uint256, reverting on + * overflow (when the input is greater than largest uint88). + * + * Counterpart to Solidity's `uint88` operator. + * + * Requirements: + * + * - input must fit into 88 bits + * + * _Available since v4.7._ + */ + function toUint88(uint256 value) internal pure returns (uint88) { + require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits"); + return uint88(value); + } + + /** + * @dev Returns the downcasted uint80 from uint256, reverting on + * overflow (when the input is greater than largest uint80). + * + * Counterpart to Solidity's `uint80` operator. + * + * Requirements: + * + * - input must fit into 80 bits + * + * _Available since v4.7._ + */ + function toUint80(uint256 value) internal pure returns (uint80) { + require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits"); + return uint80(value); + } + + /** + * @dev Returns the downcasted uint72 from uint256, reverting on + * overflow (when the input is greater than largest uint72). + * + * Counterpart to Solidity's `uint72` operator. + * + * Requirements: + * + * - input must fit into 72 bits + * + * _Available since v4.7._ + */ + function toUint72(uint256 value) internal pure returns (uint72) { + require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits"); + return uint72(value); + } + + /** + * @dev Returns the downcasted uint64 from uint256, reverting on + * overflow (when the input is greater than largest uint64). + * + * Counterpart to Solidity's `uint64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + * + * _Available since v2.5._ + */ + function toUint64(uint256 value) internal pure returns (uint64) { + require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); + return uint64(value); + } + + /** + * @dev Returns the downcasted uint56 from uint256, reverting on + * overflow (when the input is greater than largest uint56). + * + * Counterpart to Solidity's `uint56` operator. + * + * Requirements: + * + * - input must fit into 56 bits + * + * _Available since v4.7._ + */ + function toUint56(uint256 value) internal pure returns (uint56) { + require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits"); + return uint56(value); + } + + /** + * @dev Returns the downcasted uint48 from uint256, reverting on + * overflow (when the input is greater than largest uint48). + * + * Counterpart to Solidity's `uint48` operator. + * + * Requirements: + * + * - input must fit into 48 bits + * + * _Available since v4.7._ + */ + function toUint48(uint256 value) internal pure returns (uint48) { + require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits"); + return uint48(value); + } + + /** + * @dev Returns the downcasted uint40 from uint256, reverting on + * overflow (when the input is greater than largest uint40). + * + * Counterpart to Solidity's `uint40` operator. + * + * Requirements: + * + * - input must fit into 40 bits + * + * _Available since v4.7._ + */ + function toUint40(uint256 value) internal pure returns (uint40) { + require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits"); + return uint40(value); + } + + /** + * @dev Returns the downcasted uint32 from uint256, reverting on + * overflow (when the input is greater than largest uint32). + * + * Counterpart to Solidity's `uint32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + * + * _Available since v2.5._ + */ + function toUint32(uint256 value) internal pure returns (uint32) { + require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); + return uint32(value); + } + + /** + * @dev Returns the downcasted uint24 from uint256, reverting on + * overflow (when the input is greater than largest uint24). + * + * Counterpart to Solidity's `uint24` operator. + * + * Requirements: + * + * - input must fit into 24 bits + * + * _Available since v4.7._ + */ + function toUint24(uint256 value) internal pure returns (uint24) { + require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits"); + return uint24(value); + } + + /** + * @dev Returns the downcasted uint16 from uint256, reverting on + * overflow (when the input is greater than largest uint16). + * + * Counterpart to Solidity's `uint16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + * + * _Available since v2.5._ + */ + function toUint16(uint256 value) internal pure returns (uint16) { + require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); + return uint16(value); + } + + /** + * @dev Returns the downcasted uint8 from uint256, reverting on + * overflow (when the input is greater than largest uint8). + * + * Counterpart to Solidity's `uint8` operator. + * + * Requirements: + * + * - input must fit into 8 bits + * + * _Available since v2.5._ + */ + function toUint8(uint256 value) internal pure returns (uint8) { + require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); + return uint8(value); + } + + /** + * @dev Converts a signed int256 into an unsigned uint256. + * + * Requirements: + * + * - input must be greater than or equal to 0. + * + * _Available since v3.0._ + */ + function toUint256(int256 value) internal pure returns (uint256) { + require(value >= 0, "SafeCast: value must be positive"); + return uint256(value); + } + + /** + * @dev Returns the downcasted int248 from int256, reverting on + * overflow (when the input is less than smallest int248 or + * greater than largest int248). + * + * Counterpart to Solidity's `int248` operator. + * + * Requirements: + * + * - input must fit into 248 bits + * + * _Available since v4.7._ + */ + function toInt248(int256 value) internal pure returns (int248 downcasted) { + downcasted = int248(value); + require(downcasted == value, "SafeCast: value doesn't fit in 248 bits"); + } + + /** + * @dev Returns the downcasted int240 from int256, reverting on + * overflow (when the input is less than smallest int240 or + * greater than largest int240). + * + * Counterpart to Solidity's `int240` operator. + * + * Requirements: + * + * - input must fit into 240 bits + * + * _Available since v4.7._ + */ + function toInt240(int256 value) internal pure returns (int240 downcasted) { + downcasted = int240(value); + require(downcasted == value, "SafeCast: value doesn't fit in 240 bits"); + } + + /** + * @dev Returns the downcasted int232 from int256, reverting on + * overflow (when the input is less than smallest int232 or + * greater than largest int232). + * + * Counterpart to Solidity's `int232` operator. + * + * Requirements: + * + * - input must fit into 232 bits + * + * _Available since v4.7._ + */ + function toInt232(int256 value) internal pure returns (int232 downcasted) { + downcasted = int232(value); + require(downcasted == value, "SafeCast: value doesn't fit in 232 bits"); + } + + /** + * @dev Returns the downcasted int224 from int256, reverting on + * overflow (when the input is less than smallest int224 or + * greater than largest int224). + * + * Counterpart to Solidity's `int224` operator. + * + * Requirements: + * + * - input must fit into 224 bits + * + * _Available since v4.7._ + */ + function toInt224(int256 value) internal pure returns (int224 downcasted) { + downcasted = int224(value); + require(downcasted == value, "SafeCast: value doesn't fit in 224 bits"); + } + + /** + * @dev Returns the downcasted int216 from int256, reverting on + * overflow (when the input is less than smallest int216 or + * greater than largest int216). + * + * Counterpart to Solidity's `int216` operator. + * + * Requirements: + * + * - input must fit into 216 bits + * + * _Available since v4.7._ + */ + function toInt216(int256 value) internal pure returns (int216 downcasted) { + downcasted = int216(value); + require(downcasted == value, "SafeCast: value doesn't fit in 216 bits"); + } + + /** + * @dev Returns the downcasted int208 from int256, reverting on + * overflow (when the input is less than smallest int208 or + * greater than largest int208). + * + * Counterpart to Solidity's `int208` operator. + * + * Requirements: + * + * - input must fit into 208 bits + * + * _Available since v4.7._ + */ + function toInt208(int256 value) internal pure returns (int208 downcasted) { + downcasted = int208(value); + require(downcasted == value, "SafeCast: value doesn't fit in 208 bits"); + } + + /** + * @dev Returns the downcasted int200 from int256, reverting on + * overflow (when the input is less than smallest int200 or + * greater than largest int200). + * + * Counterpart to Solidity's `int200` operator. + * + * Requirements: + * + * - input must fit into 200 bits + * + * _Available since v4.7._ + */ + function toInt200(int256 value) internal pure returns (int200 downcasted) { + downcasted = int200(value); + require(downcasted == value, "SafeCast: value doesn't fit in 200 bits"); + } + + /** + * @dev Returns the downcasted int192 from int256, reverting on + * overflow (when the input is less than smallest int192 or + * greater than largest int192). + * + * Counterpart to Solidity's `int192` operator. + * + * Requirements: + * + * - input must fit into 192 bits + * + * _Available since v4.7._ + */ + function toInt192(int256 value) internal pure returns (int192 downcasted) { + downcasted = int192(value); + require(downcasted == value, "SafeCast: value doesn't fit in 192 bits"); + } + + /** + * @dev Returns the downcasted int184 from int256, reverting on + * overflow (when the input is less than smallest int184 or + * greater than largest int184). + * + * Counterpart to Solidity's `int184` operator. + * + * Requirements: + * + * - input must fit into 184 bits + * + * _Available since v4.7._ + */ + function toInt184(int256 value) internal pure returns (int184 downcasted) { + downcasted = int184(value); + require(downcasted == value, "SafeCast: value doesn't fit in 184 bits"); + } + + /** + * @dev Returns the downcasted int176 from int256, reverting on + * overflow (when the input is less than smallest int176 or + * greater than largest int176). + * + * Counterpart to Solidity's `int176` operator. + * + * Requirements: + * + * - input must fit into 176 bits + * + * _Available since v4.7._ + */ + function toInt176(int256 value) internal pure returns (int176 downcasted) { + downcasted = int176(value); + require(downcasted == value, "SafeCast: value doesn't fit in 176 bits"); + } + + /** + * @dev Returns the downcasted int168 from int256, reverting on + * overflow (when the input is less than smallest int168 or + * greater than largest int168). + * + * Counterpart to Solidity's `int168` operator. + * + * Requirements: + * + * - input must fit into 168 bits + * + * _Available since v4.7._ + */ + function toInt168(int256 value) internal pure returns (int168 downcasted) { + downcasted = int168(value); + require(downcasted == value, "SafeCast: value doesn't fit in 168 bits"); + } + + /** + * @dev Returns the downcasted int160 from int256, reverting on + * overflow (when the input is less than smallest int160 or + * greater than largest int160). + * + * Counterpart to Solidity's `int160` operator. + * + * Requirements: + * + * - input must fit into 160 bits + * + * _Available since v4.7._ + */ + function toInt160(int256 value) internal pure returns (int160 downcasted) { + downcasted = int160(value); + require(downcasted == value, "SafeCast: value doesn't fit in 160 bits"); + } + + /** + * @dev Returns the downcasted int152 from int256, reverting on + * overflow (when the input is less than smallest int152 or + * greater than largest int152). + * + * Counterpart to Solidity's `int152` operator. + * + * Requirements: + * + * - input must fit into 152 bits + * + * _Available since v4.7._ + */ + function toInt152(int256 value) internal pure returns (int152 downcasted) { + downcasted = int152(value); + require(downcasted == value, "SafeCast: value doesn't fit in 152 bits"); + } + + /** + * @dev Returns the downcasted int144 from int256, reverting on + * overflow (when the input is less than smallest int144 or + * greater than largest int144). + * + * Counterpart to Solidity's `int144` operator. + * + * Requirements: + * + * - input must fit into 144 bits + * + * _Available since v4.7._ + */ + function toInt144(int256 value) internal pure returns (int144 downcasted) { + downcasted = int144(value); + require(downcasted == value, "SafeCast: value doesn't fit in 144 bits"); + } + + /** + * @dev Returns the downcasted int136 from int256, reverting on + * overflow (when the input is less than smallest int136 or + * greater than largest int136). + * + * Counterpart to Solidity's `int136` operator. + * + * Requirements: + * + * - input must fit into 136 bits + * + * _Available since v4.7._ + */ + function toInt136(int256 value) internal pure returns (int136 downcasted) { + downcasted = int136(value); + require(downcasted == value, "SafeCast: value doesn't fit in 136 bits"); + } + + /** + * @dev Returns the downcasted int128 from int256, reverting on + * overflow (when the input is less than smallest int128 or + * greater than largest int128). + * + * Counterpart to Solidity's `int128` operator. + * + * Requirements: + * + * - input must fit into 128 bits + * + * _Available since v3.1._ + */ + function toInt128(int256 value) internal pure returns (int128 downcasted) { + downcasted = int128(value); + require(downcasted == value, "SafeCast: value doesn't fit in 128 bits"); + } + + /** + * @dev Returns the downcasted int120 from int256, reverting on + * overflow (when the input is less than smallest int120 or + * greater than largest int120). + * + * Counterpart to Solidity's `int120` operator. + * + * Requirements: + * + * - input must fit into 120 bits + * + * _Available since v4.7._ + */ + function toInt120(int256 value) internal pure returns (int120 downcasted) { + downcasted = int120(value); + require(downcasted == value, "SafeCast: value doesn't fit in 120 bits"); + } + + /** + * @dev Returns the downcasted int112 from int256, reverting on + * overflow (when the input is less than smallest int112 or + * greater than largest int112). + * + * Counterpart to Solidity's `int112` operator. + * + * Requirements: + * + * - input must fit into 112 bits + * + * _Available since v4.7._ + */ + function toInt112(int256 value) internal pure returns (int112 downcasted) { + downcasted = int112(value); + require(downcasted == value, "SafeCast: value doesn't fit in 112 bits"); + } + + /** + * @dev Returns the downcasted int104 from int256, reverting on + * overflow (when the input is less than smallest int104 or + * greater than largest int104). + * + * Counterpart to Solidity's `int104` operator. + * + * Requirements: + * + * - input must fit into 104 bits + * + * _Available since v4.7._ + */ + function toInt104(int256 value) internal pure returns (int104 downcasted) { + downcasted = int104(value); + require(downcasted == value, "SafeCast: value doesn't fit in 104 bits"); + } + + /** + * @dev Returns the downcasted int96 from int256, reverting on + * overflow (when the input is less than smallest int96 or + * greater than largest int96). + * + * Counterpart to Solidity's `int96` operator. + * + * Requirements: + * + * - input must fit into 96 bits + * + * _Available since v4.7._ + */ + function toInt96(int256 value) internal pure returns (int96 downcasted) { + downcasted = int96(value); + require(downcasted == value, "SafeCast: value doesn't fit in 96 bits"); + } + + /** + * @dev Returns the downcasted int88 from int256, reverting on + * overflow (when the input is less than smallest int88 or + * greater than largest int88). + * + * Counterpart to Solidity's `int88` operator. + * + * Requirements: + * + * - input must fit into 88 bits + * + * _Available since v4.7._ + */ + function toInt88(int256 value) internal pure returns (int88 downcasted) { + downcasted = int88(value); + require(downcasted == value, "SafeCast: value doesn't fit in 88 bits"); + } + + /** + * @dev Returns the downcasted int80 from int256, reverting on + * overflow (when the input is less than smallest int80 or + * greater than largest int80). + * + * Counterpart to Solidity's `int80` operator. + * + * Requirements: + * + * - input must fit into 80 bits + * + * _Available since v4.7._ + */ + function toInt80(int256 value) internal pure returns (int80 downcasted) { + downcasted = int80(value); + require(downcasted == value, "SafeCast: value doesn't fit in 80 bits"); + } + + /** + * @dev Returns the downcasted int72 from int256, reverting on + * overflow (when the input is less than smallest int72 or + * greater than largest int72). + * + * Counterpart to Solidity's `int72` operator. + * + * Requirements: + * + * - input must fit into 72 bits + * + * _Available since v4.7._ + */ + function toInt72(int256 value) internal pure returns (int72 downcasted) { + downcasted = int72(value); + require(downcasted == value, "SafeCast: value doesn't fit in 72 bits"); + } + + /** + * @dev Returns the downcasted int64 from int256, reverting on + * overflow (when the input is less than smallest int64 or + * greater than largest int64). + * + * Counterpart to Solidity's `int64` operator. + * + * Requirements: + * + * - input must fit into 64 bits + * + * _Available since v3.1._ + */ + function toInt64(int256 value) internal pure returns (int64 downcasted) { + downcasted = int64(value); + require(downcasted == value, "SafeCast: value doesn't fit in 64 bits"); + } + + /** + * @dev Returns the downcasted int56 from int256, reverting on + * overflow (when the input is less than smallest int56 or + * greater than largest int56). + * + * Counterpart to Solidity's `int56` operator. + * + * Requirements: + * + * - input must fit into 56 bits + * + * _Available since v4.7._ + */ + function toInt56(int256 value) internal pure returns (int56 downcasted) { + downcasted = int56(value); + require(downcasted == value, "SafeCast: value doesn't fit in 56 bits"); + } + + /** + * @dev Returns the downcasted int48 from int256, reverting on + * overflow (when the input is less than smallest int48 or + * greater than largest int48). + * + * Counterpart to Solidity's `int48` operator. + * + * Requirements: + * + * - input must fit into 48 bits + * + * _Available since v4.7._ + */ + function toInt48(int256 value) internal pure returns (int48 downcasted) { + downcasted = int48(value); + require(downcasted == value, "SafeCast: value doesn't fit in 48 bits"); + } + + /** + * @dev Returns the downcasted int40 from int256, reverting on + * overflow (when the input is less than smallest int40 or + * greater than largest int40). + * + * Counterpart to Solidity's `int40` operator. + * + * Requirements: + * + * - input must fit into 40 bits + * + * _Available since v4.7._ + */ + function toInt40(int256 value) internal pure returns (int40 downcasted) { + downcasted = int40(value); + require(downcasted == value, "SafeCast: value doesn't fit in 40 bits"); + } + + /** + * @dev Returns the downcasted int32 from int256, reverting on + * overflow (when the input is less than smallest int32 or + * greater than largest int32). + * + * Counterpart to Solidity's `int32` operator. + * + * Requirements: + * + * - input must fit into 32 bits + * + * _Available since v3.1._ + */ + function toInt32(int256 value) internal pure returns (int32 downcasted) { + downcasted = int32(value); + require(downcasted == value, "SafeCast: value doesn't fit in 32 bits"); + } + + /** + * @dev Returns the downcasted int24 from int256, reverting on + * overflow (when the input is less than smallest int24 or + * greater than largest int24). + * + * Counterpart to Solidity's `int24` operator. + * + * Requirements: + * + * - input must fit into 24 bits + * + * _Available since v4.7._ + */ + function toInt24(int256 value) internal pure returns (int24 downcasted) { + downcasted = int24(value); + require(downcasted == value, "SafeCast: value doesn't fit in 24 bits"); + } + + /** + * @dev Returns the downcasted int16 from int256, reverting on + * overflow (when the input is less than smallest int16 or + * greater than largest int16). + * + * Counterpart to Solidity's `int16` operator. + * + * Requirements: + * + * - input must fit into 16 bits + * + * _Available since v3.1._ + */ + function toInt16(int256 value) internal pure returns (int16 downcasted) { + downcasted = int16(value); + require(downcasted == value, "SafeCast: value doesn't fit in 16 bits"); + } + + /** + * @dev Returns the downcasted int8 from int256, reverting on + * overflow (when the input is less than smallest int8 or + * greater than largest int8). + * + * Counterpart to Solidity's `int8` operator. + * + * Requirements: + * + * - input must fit into 8 bits + * + * _Available since v3.1._ + */ + function toInt8(int256 value) internal pure returns (int8 downcasted) { + downcasted = int8(value); + require(downcasted == value, "SafeCast: value doesn't fit in 8 bits"); + } + + /** + * @dev Converts an unsigned uint256 into a signed int256. + * + * Requirements: + * + * - input must be less than or equal to maxInt256. + * + * _Available since v3.0._ + */ + function toInt256(uint256 value) internal pure returns (int256) { + // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive + require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); + return int256(value); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol new file mode 100644 index 00000000..e155a64d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol @@ -0,0 +1,215 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) + +pragma solidity ^0.8.0; + +// CAUTION +// This version of SafeMath should only be used with Solidity 0.8 or later, +// because it relies on the compiler's built in overflow checks. + +/** + * @dev Wrappers over Solidity's arithmetic operations. + * + * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler + * now has built in overflow checking. + */ +library SafeMathUpgradeable { + /** + * @dev Returns the addition of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + uint256 c = a + b; + if (c < a) return (false, 0); + return (true, c); + } + } + + /** + * @dev Returns the subtraction of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + if (b > a) return (false, 0); + return (true, a - b); + } + } + + /** + * @dev Returns the multiplication of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) return (true, 0); + uint256 c = a * b; + if (c / a != b) return (false, 0); + return (true, c); + } + } + + /** + * @dev Returns the division of two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + if (b == 0) return (false, 0); + return (true, a / b); + } + } + + /** + * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { + unchecked { + if (b == 0) return (false, 0); + return (true, a % b); + } + } + + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + return a + b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return a - b; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + return a * b; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return a % b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {trySub}. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + unchecked { + require(b <= a, errorMessage); + return a - b; + } + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + unchecked { + require(b > 0, errorMessage); + return a / b; + } + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting with custom message when dividing by zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryMod}. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + unchecked { + require(b > 0, errorMessage); + return a % b; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol new file mode 100644 index 00000000..122fcbc4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Standard signed math utilities missing in the Solidity language. + */ +library SignedMathUpgradeable { + /** + * @dev Returns the largest of two signed numbers. + */ + function max(int256 a, int256 b) internal pure returns (int256) { + return a > b ? a : b; + } + + /** + * @dev Returns the smallest of two signed numbers. + */ + function min(int256 a, int256 b) internal pure returns (int256) { + return a < b ? a : b; + } + + /** + * @dev Returns the average of two signed numbers without overflow. + * The result is rounded towards zero. + */ + function average(int256 a, int256 b) internal pure returns (int256) { + // Formula from the book "Hacker's Delight" + int256 x = (a & b) + ((a ^ b) >> 1); + return x + (int256(uint256(x) >> 255) & (a ^ b)); + } + + /** + * @dev Returns the absolute unsigned value of a signed value. + */ + function abs(int256 n) internal pure returns (uint256) { + unchecked { + // must be unchecked in order to support `n = type(int256).min` + return uint256(n >= 0 ? n : -n); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol new file mode 100644 index 00000000..4d9ee8b2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations. + * + * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler + * now has built in overflow checking. + */ +library SignedSafeMathUpgradeable { + /** + * @dev Returns the multiplication of two signed integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(int256 a, int256 b) internal pure returns (int256) { + return a * b; + } + + /** + * @dev Returns the integer division of two signed integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(int256 a, int256 b) internal pure returns (int256) { + return a / b; + } + + /** + * @dev Returns the subtraction of two signed integers, reverting on + * overflow. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(int256 a, int256 b) internal pure returns (int256) { + return a - b; + } + + /** + * @dev Returns the addition of two signed integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(int256 a, int256 b) internal pure returns (int256) { + return a + b; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol new file mode 100644 index 00000000..7d275a5b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol) +pragma solidity ^0.8.0; + +/** + * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. + * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. + */ +library BitMapsUpgradeable { + struct BitMap { + mapping(uint256 => uint256) _data; + } + + /** + * @dev Returns whether the bit at `index` is set. + */ + function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { + uint256 bucket = index >> 8; + uint256 mask = 1 << (index & 0xff); + return bitmap._data[bucket] & mask != 0; + } + + /** + * @dev Sets the bit at `index` to the boolean `value`. + */ + function setTo(BitMap storage bitmap, uint256 index, bool value) internal { + if (value) { + set(bitmap, index); + } else { + unset(bitmap, index); + } + } + + /** + * @dev Sets the bit at `index`. + */ + function set(BitMap storage bitmap, uint256 index) internal { + uint256 bucket = index >> 8; + uint256 mask = 1 << (index & 0xff); + bitmap._data[bucket] |= mask; + } + + /** + * @dev Unsets the bit at `index`. + */ + function unset(BitMap storage bitmap, uint256 index) internal { + uint256 bucket = index >> 8; + uint256 mask = 1 << (index & 0xff); + bitmap._data[bucket] &= ~mask; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol new file mode 100644 index 00000000..16eb272a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/DoubleEndedQueue.sol) +pragma solidity ^0.8.4; + +import "../math/SafeCastUpgradeable.sol"; + +/** + * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of + * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and + * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that + * the existing queue contents are left in storage. + * + * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be + * used in storage, and not in memory. + * ```solidity + * DoubleEndedQueue.Bytes32Deque queue; + * ``` + * + * _Available since v4.6._ + */ +library DoubleEndedQueueUpgradeable { + /** + * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty. + */ + error Empty(); + + /** + * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds. + */ + error OutOfBounds(); + + /** + * @dev Indices are signed integers because the queue can grow in any direction. They are 128 bits so begin and end + * are packed in a single storage slot for efficient access. Since the items are added one at a time we can safely + * assume that these 128-bit indices will not overflow, and use unchecked arithmetic. + * + * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to + * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and + * lead to unexpected behavior. + * + * Indices are in the range [begin, end) which means the first item is at data[begin] and the last item is at + * data[end - 1]. + */ + struct Bytes32Deque { + int128 _begin; + int128 _end; + mapping(int128 => bytes32) _data; + } + + /** + * @dev Inserts an item at the end of the queue. + */ + function pushBack(Bytes32Deque storage deque, bytes32 value) internal { + int128 backIndex = deque._end; + deque._data[backIndex] = value; + unchecked { + deque._end = backIndex + 1; + } + } + + /** + * @dev Removes the item at the end of the queue and returns it. + * + * Reverts with `Empty` if the queue is empty. + */ + function popBack(Bytes32Deque storage deque) internal returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 backIndex; + unchecked { + backIndex = deque._end - 1; + } + value = deque._data[backIndex]; + delete deque._data[backIndex]; + deque._end = backIndex; + } + + /** + * @dev Inserts an item at the beginning of the queue. + */ + function pushFront(Bytes32Deque storage deque, bytes32 value) internal { + int128 frontIndex; + unchecked { + frontIndex = deque._begin - 1; + } + deque._data[frontIndex] = value; + deque._begin = frontIndex; + } + + /** + * @dev Removes the item at the beginning of the queue and returns it. + * + * Reverts with `Empty` if the queue is empty. + */ + function popFront(Bytes32Deque storage deque) internal returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 frontIndex = deque._begin; + value = deque._data[frontIndex]; + delete deque._data[frontIndex]; + unchecked { + deque._begin = frontIndex + 1; + } + } + + /** + * @dev Returns the item at the beginning of the queue. + * + * Reverts with `Empty` if the queue is empty. + */ + function front(Bytes32Deque storage deque) internal view returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 frontIndex = deque._begin; + return deque._data[frontIndex]; + } + + /** + * @dev Returns the item at the end of the queue. + * + * Reverts with `Empty` if the queue is empty. + */ + function back(Bytes32Deque storage deque) internal view returns (bytes32 value) { + if (empty(deque)) revert Empty(); + int128 backIndex; + unchecked { + backIndex = deque._end - 1; + } + return deque._data[backIndex]; + } + + /** + * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at + * `length(deque) - 1`. + * + * Reverts with `OutOfBounds` if the index is out of bounds. + */ + function at(Bytes32Deque storage deque, uint256 index) internal view returns (bytes32 value) { + // int256(deque._begin) is a safe upcast + int128 idx = SafeCastUpgradeable.toInt128(int256(deque._begin) + SafeCastUpgradeable.toInt256(index)); + if (idx >= deque._end) revert OutOfBounds(); + return deque._data[idx]; + } + + /** + * @dev Resets the queue back to being empty. + * + * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses + * out on potential gas refunds. + */ + function clear(Bytes32Deque storage deque) internal { + deque._begin = 0; + deque._end = 0; + } + + /** + * @dev Returns the number of items in the queue. + */ + function length(Bytes32Deque storage deque) internal view returns (uint256) { + // The interface preserves the invariant that begin <= end so we assume this will not overflow. + // We also assume there are at most int256.max items in the queue. + unchecked { + return uint256(int256(deque._end) - int256(deque._begin)); + } + } + + /** + * @dev Returns true if the queue is empty. + */ + function empty(Bytes32Deque storage deque) internal view returns (bool) { + return deque._end <= deque._begin; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol new file mode 100644 index 00000000..dbf5a158 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol @@ -0,0 +1,598 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableMap.sol) +// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js. + +pragma solidity ^0.8.0; + +import "./EnumerableSetUpgradeable.sol"; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ```solidity + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * The following map types are supported: + * + * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0 + * - `address -> uint256` (`AddressToUintMap`) since v4.6.0 + * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0 + * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0 + * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0 + * + * [WARNING] + * ==== + * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure + * unusable. + * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. + * + * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an + * array of EnumerableMap. + * ==== + */ +library EnumerableMapUpgradeable { + using EnumerableSetUpgradeable for EnumerableSetUpgradeable.Bytes32Set; + + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct Bytes32ToBytes32Map { + // Storage of keys + EnumerableSetUpgradeable.Bytes32Set _keys; + mapping(bytes32 => bytes32) _values; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) { + map._values[key] = value; + return map._keys.add(key); + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) { + delete map._values[key]; + return map._keys.remove(key); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) { + return map._keys.contains(key); + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) { + return map._keys.length(); + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32, bytes32) { + bytes32 key = map._keys.at(index); + return (key, map._values[key]); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) { + bytes32 value = map._values[key]; + if (value == bytes32(0)) { + return (contains(map, key), bytes32(0)); + } else { + return (true, value); + } + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) { + bytes32 value = map._values[key]; + require(value != 0 || contains(map, key), "EnumerableMap: nonexistent key"); + return value; + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + Bytes32ToBytes32Map storage map, + bytes32 key, + string memory errorMessage + ) internal view returns (bytes32) { + bytes32 value = map._values[key]; + require(value != 0 || contains(map, key), errorMessage); + return value; + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToBytes32Map storage map) internal view returns (bytes32[] memory) { + return map._keys.values(); + } + + // UintToUintMap + + struct UintToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) { + return set(map._inner, bytes32(key), bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToUintMap storage map, uint256 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToUintMap storage map, uint256 index) internal view returns (uint256, uint256) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (uint256(key), uint256(value)); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) { + (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); + return (success, uint256(value)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(key))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get(UintToUintMap storage map, uint256 key, string memory errorMessage) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(key), errorMessage)); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToUintMap storage map) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner); + uint256[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // UintToAddressMap + + struct UintToAddressMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (uint256(key), address(uint160(uint256(value)))); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { + (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(value)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint160(uint256(get(map._inner, bytes32(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + UintToAddressMap storage map, + uint256 key, + string memory errorMessage + ) internal view returns (address) { + return address(uint160(uint256(get(map._inner, bytes32(key), errorMessage)))); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToAddressMap storage map) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner); + uint256[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // AddressToUintMap + + struct AddressToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) { + return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(AddressToUintMap storage map, address key) internal returns (bool) { + return remove(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(AddressToUintMap storage map, address key) internal view returns (bool) { + return contains(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(AddressToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (address(uint160(uint256(key))), uint256(value)); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) { + (bool success, bytes32 value) = tryGet(map._inner, bytes32(uint256(uint160(key)))); + return (success, uint256(value)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(AddressToUintMap storage map, address key) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(uint256(uint160(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + AddressToUintMap storage map, + address key, + string memory errorMessage + ) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(uint256(uint160(key))), errorMessage)); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(AddressToUintMap storage map) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner); + address[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // Bytes32ToUintMap + + struct Bytes32ToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) { + return set(map._inner, key, bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) { + return remove(map._inner, key); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) { + return contains(map._inner, key); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(Bytes32ToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) { + (bytes32 key, bytes32 value) = at(map._inner, index); + return (key, uint256(value)); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) { + (bool success, bytes32 value) = tryGet(map._inner, key); + return (success, uint256(value)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) { + return uint256(get(map._inner, key)); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get( + Bytes32ToUintMap storage map, + bytes32 key, + string memory errorMessage + ) internal view returns (uint256) { + return uint256(get(map._inner, key, errorMessage)); + } + + /** + * @dev Return the an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToUintMap storage map) internal view returns (bytes32[] memory) { + bytes32[] memory store = keys(map._inner); + bytes32[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol new file mode 100644 index 00000000..925b79df --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol @@ -0,0 +1,378 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) +// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. + +pragma solidity ^0.8.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ```solidity + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) + * and `uint256` (`UintSet`) are supported. + * + * [WARNING] + * ==== + * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure + * unusable. + * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. + * + * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an + * array of EnumerableSet. + * ==== + */ +library EnumerableSetUpgradeable { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping(bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { + // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + if (lastIndex != toDeleteIndex) { + bytes32 lastValue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastValue; + // Update the index for the moved value + set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex + } + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + return set._values[index]; + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function _values(Set storage set) private view returns (bytes32[] memory) { + return set._values; + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { + bytes32[] memory store = _values(set._inner); + bytes32[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(AddressSet storage set) internal view returns (address[] memory) { + bytes32[] memory store = _values(set._inner); + address[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(UintSet storage set) internal view returns (uint256[] memory) { + bytes32[] memory store = _values(set._inner); + uint256[] memory result; + + /// @solidity memory-safe-assembly + assembly { + result := store + } + + return result; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol new file mode 100644 index 00000000..2a534a32 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/amb/IAMB.sol) +pragma solidity ^0.8.0; + +interface IAMBUpgradeable { + event UserRequestForAffirmation(bytes32 indexed messageId, bytes encodedData); + event UserRequestForSignature(bytes32 indexed messageId, bytes encodedData); + event AffirmationCompleted( + address indexed sender, + address indexed executor, + bytes32 indexed messageId, + bool status + ); + event RelayedMessage(address indexed sender, address indexed executor, bytes32 indexed messageId, bool status); + + function messageSender() external view returns (address); + + function maxGasPerTx() external view returns (uint256); + + function transactionHash() external view returns (bytes32); + + function messageId() external view returns (bytes32); + + function messageSourceChainId() external view returns (bytes32); + + function messageCallStatus(bytes32 _messageId) external view returns (bool); + + function failedMessageDataHash(bytes32 _messageId) external view returns (bytes32); + + function failedMessageReceiver(bytes32 _messageId) external view returns (address); + + function failedMessageSender(bytes32 _messageId) external view returns (address); + + function requireToPassMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); + + function requireToConfirmMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); + + function sourceChainId() external view returns (uint256); + + function destinationChainId() external view returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol new file mode 100644 index 00000000..a973c7a3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol @@ -0,0 +1,134 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IArbSys.sol) + +pragma solidity >=0.4.21 <0.9.0; + +/** + * @title System level functionality + * @notice For use by contracts to interact with core L2-specific functionality. + * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. + */ +interface IArbSysUpgradeable { + /** + * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) + * @return block number as int + */ + function arbBlockNumber() external view returns (uint256); + + /** + * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum) + * @return block hash + */ + function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32); + + /** + * @notice Gets the rollup's unique chain identifier + * @return Chain identifier as int + */ + function arbChainID() external view returns (uint256); + + /** + * @notice Get internal version number identifying an ArbOS build + * @return version number as int + */ + function arbOSVersion() external view returns (uint256); + + /** + * @notice Returns 0 since Nitro has no concept of storage gas + * @return uint 0 + */ + function getStorageGasAvailable() external view returns (uint256); + + /** + * @notice (deprecated) check if current call is top level (meaning it was triggered by an EoA or a L1 contract) + * @dev this call has been deprecated and may be removed in a future release + * @return true if current execution frame is not a call by another L2 contract + */ + function isTopLevelCall() external view returns (bool); + + /** + * @notice map L1 sender contract address to its L2 alias + * @param sender sender address + * @param unused argument no longer used + * @return aliased sender address + */ + function mapL1SenderContractAddressToL2Alias(address sender, address unused) external pure returns (address); + + /** + * @notice check if the caller (of this caller of this) is an aliased L1 contract address + * @return true iff the caller's address is an alias for an L1 contract address + */ + function wasMyCallersAddressAliased() external view returns (bool); + + /** + * @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing + * @return address of the caller's caller, without applying L1 contract address aliasing + */ + function myCallersAddressWithoutAliasing() external view returns (address); + + /** + * @notice Send given amount of Eth to dest from sender. + * This is a convenience function, which is equivalent to calling sendTxToL1 with empty data. + * @param destination recipient address on L1 + * @return unique identifier for this L2-to-L1 transaction. + */ + function withdrawEth(address destination) external payable returns (uint256); + + /** + * @notice Send a transaction to L1 + * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data + * to a contract address without any code (as enforced by the Bridge contract). + * @param destination recipient address on L1 + * @param data (optional) calldata for L1 contract call + * @return a unique identifier for this L2-to-L1 transaction. + */ + function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256); + + /** + * @notice Get send Merkle tree state + * @return size number of sends in the history + * @return root root hash of the send history + * @return partials hashes of partial subtrees in the send history tree + */ + function sendMerkleTreeState() external view returns (uint256 size, bytes32 root, bytes32[] memory partials); + + /** + * @notice creates a send txn from L2 to L1 + * @param position = (level << 192) + leaf = (0 << 192) + leaf = leaf + */ + event L2ToL1Tx( + address caller, + address indexed destination, + uint256 indexed hash, + uint256 indexed position, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /// @dev DEPRECATED in favour of the new L2ToL1Tx event above after the nitro upgrade + event L2ToL1Transaction( + address caller, + address indexed destination, + uint256 indexed uniqueId, + uint256 indexed batchNumber, + uint256 indexInBatch, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /** + * @notice logs a merkle branch for proof synthesis + * @param reserved an index meant only to align the 4th index with L2ToL1Transaction's 4th event + * @param hash the merkle hash + * @param position = (level << 192) + leaf + */ + event SendMerkleUpdate(uint256 indexed reserved, bytes32 indexed hash, uint256 indexed position); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol new file mode 100644 index 00000000..1e429192 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol @@ -0,0 +1,102 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IBridge.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +interface IBridgeUpgradeable { + event MessageDelivered( + uint256 indexed messageIndex, + bytes32 indexed beforeInboxAcc, + address inbox, + uint8 kind, + address sender, + bytes32 messageDataHash, + uint256 baseFeeL1, + uint64 timestamp + ); + + event BridgeCallTriggered(address indexed outbox, address indexed to, uint256 value, bytes data); + + event InboxToggle(address indexed inbox, bool enabled); + + event OutboxToggle(address indexed outbox, bool enabled); + + event SequencerInboxUpdated(address newSequencerInbox); + + function allowedDelayedInboxList(uint256) external returns (address); + + function allowedOutboxList(uint256) external returns (address); + + /// @dev Accumulator for delayed inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. + function delayedInboxAccs(uint256) external view returns (bytes32); + + /// @dev Accumulator for sequencer inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. + function sequencerInboxAccs(uint256) external view returns (bytes32); + + // OpenZeppelin: changed return type from IOwnable + function rollup() external view returns (address); + + function sequencerInbox() external view returns (address); + + function activeOutbox() external view returns (address); + + function allowedDelayedInboxes(address inbox) external view returns (bool); + + function allowedOutboxes(address outbox) external view returns (bool); + + function sequencerReportedSubMessageCount() external view returns (uint256); + + /** + * @dev Enqueue a message in the delayed inbox accumulator. + * These messages are later sequenced in the SequencerInbox, either + * by the sequencer as part of a normal batch, or by force inclusion. + */ + function enqueueDelayedMessage( + uint8 kind, + address sender, + bytes32 messageDataHash + ) external payable returns (uint256); + + function executeCall( + address to, + uint256 value, + bytes calldata data + ) external returns (bool success, bytes memory returnData); + + function delayedMessageCount() external view returns (uint256); + + function sequencerMessageCount() external view returns (uint256); + + // ---------- onlySequencerInbox functions ---------- + + function enqueueSequencerMessage( + bytes32 dataHash, + uint256 afterDelayedMessagesRead, + uint256 prevMessageCount, + uint256 newMessageCount + ) external returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc); + + /** + * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type + * This is done through a separate function entrypoint instead of allowing the sequencer inbox + * to call `enqueueDelayedMessage` to avoid the gas overhead of an extra SLOAD in either + * every delayed inbox or every sequencer inbox call. + */ + function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) external returns (uint256 msgNum); + + // ---------- onlyRollupOrOwner functions ---------- + + function setSequencerInbox(address _sequencerInbox) external; + + function setDelayedInbox(address inbox, bool enabled) external; + + function setOutbox(address inbox, bool enabled) external; + + // ---------- initializer ---------- + + // OpenZeppelin: changed rollup_ type from IOwnable + function initialize(address rollup_) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol new file mode 100644 index 00000000..0dc69d64 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol @@ -0,0 +1,16 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IDelayedMessageProvider.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +interface IDelayedMessageProviderUpgradeable { + /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator + event InboxMessageDelivered(uint256 indexed messageNum, bytes data); + + /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator + /// same as InboxMessageDelivered but the batch data is available in tx.input + event InboxMessageDeliveredFromOrigin(uint256 indexed messageNum); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol new file mode 100644 index 00000000..e2c9d229 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol @@ -0,0 +1,152 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IInbox.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +import "./IBridgeUpgradeable.sol"; +import "./IDelayedMessageProviderUpgradeable.sol"; + +interface IInboxUpgradeable is IDelayedMessageProviderUpgradeable { + function bridge() external view returns (IBridgeUpgradeable); + + // OpenZeppelin: changed return type from ISequencerInbox + function sequencerInbox() external view returns (address); + + /** + * @notice Send a generic L2 message to the chain + * @dev This method is an optimization to avoid having to emit the entirety of the messageData in a log. Instead validators are expected to be able to parse the data from the transaction's input + * @param messageData Data of the message being sent + */ + function sendL2MessageFromOrigin(bytes calldata messageData) external returns (uint256); + + /** + * @notice Send a generic L2 message to the chain + * @dev This method can be used to send any type of message that doesn't require L1 validation + * @param messageData Data of the message being sent + */ + function sendL2Message(bytes calldata messageData) external returns (uint256); + + function sendL1FundedUnsignedTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + uint256 nonce, + address to, + bytes calldata data + ) external payable returns (uint256); + + function sendL1FundedContractTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + address to, + bytes calldata data + ) external payable returns (uint256); + + function sendUnsignedTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + uint256 nonce, + address to, + uint256 value, + bytes calldata data + ) external returns (uint256); + + function sendContractTransaction( + uint256 gasLimit, + uint256 maxFeePerGas, + address to, + uint256 value, + bytes calldata data + ) external returns (uint256); + + /** + * @notice Get the L1 fee for submitting a retryable + * @dev This fee can be paid by funds already in the L2 aliased address or by the current message value + * @dev This formula may change in the future, to future proof your code query this method instead of inlining!! + * @param dataLength The length of the retryable's calldata, in bytes + * @param baseFee The block basefee when the retryable is included in the chain, if 0 current block.basefee will be used + */ + function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) external view returns (uint256); + + /** + * @notice Deposit eth from L1 to L2 to address of the sender if sender is an EOA, and to its aliased address if the sender is a contract + * @dev This does not trigger the fallback function when receiving in the L2 side. + * Look into retryable tickets if you are interested in this functionality. + * @dev This function should not be called inside contract constructors + */ + function depositEth() external payable returns (uint256); + + /** + * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts + * @dev all msg.value will deposited to callValueRefundAddress on L2 + * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error + * @param to destination L2 contract address + * @param l2CallValue call value for retryable L2 message + * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee + * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance + * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled + * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param data ABI encoded data of L2 message + * @return unique message number of the retryable transaction + */ + function createRetryableTicket( + address to, + uint256 l2CallValue, + uint256 maxSubmissionCost, + address excessFeeRefundAddress, + address callValueRefundAddress, + uint256 gasLimit, + uint256 maxFeePerGas, + bytes calldata data + ) external payable returns (uint256); + + /** + * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts + * @dev Same as createRetryableTicket, but does not guarantee that submission will succeed by requiring the needed funds + * come from the deposit alone, rather than falling back on the user's L2 balance + * @dev Advanced usage only (does not rewrite aliases for excessFeeRefundAddress and callValueRefundAddress). + * createRetryableTicket method is the recommended standard. + * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error + * @param to destination L2 contract address + * @param l2CallValue call value for retryable L2 message + * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee + * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance + * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled + * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param data ABI encoded data of L2 message + * @return unique message number of the retryable transaction + */ + function unsafeCreateRetryableTicket( + address to, + uint256 l2CallValue, + uint256 maxSubmissionCost, + address excessFeeRefundAddress, + address callValueRefundAddress, + uint256 gasLimit, + uint256 maxFeePerGas, + bytes calldata data + ) external payable returns (uint256); + + // ---------- onlyRollupOrOwner functions ---------- + + /// @notice pauses all inbox functionality + function pause() external; + + /// @notice unpauses all inbox functionality + function unpause() external; + + // ---------- initializer ---------- + + /** + * @dev function to be called one time during the inbox upgrade process + * this is used to fix the storage slots + */ + function postUpgradeInit(IBridgeUpgradeable _bridge) external; + + // OpenZeppelin: changed _sequencerInbox type from ISequencerInbox + function initialize(IBridgeUpgradeable _bridge, address _sequencerInbox) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol new file mode 100644 index 00000000..17d65d1d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol @@ -0,0 +1,117 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IOutbox.sol) + +// solhint-disable-next-line compiler-version +pragma solidity >=0.6.9 <0.9.0; + +import "./IBridgeUpgradeable.sol"; + +interface IOutboxUpgradeable { + event SendRootUpdated(bytes32 indexed blockHash, bytes32 indexed outputRoot); + event OutBoxTransactionExecuted( + address indexed to, + address indexed l2Sender, + uint256 indexed zero, + uint256 transactionIndex + ); + + function rollup() external view returns (address); // the rollup contract + + function bridge() external view returns (IBridgeUpgradeable); // the bridge contract + + function spent(uint256) external view returns (bytes32); // packed spent bitmap + + function roots(bytes32) external view returns (bytes32); // maps root hashes => L2 block hash + + // solhint-disable-next-line func-name-mixedcase + function OUTBOX_VERSION() external view returns (uint128); // the outbox version + + function updateSendRoot(bytes32 sendRoot, bytes32 l2BlockHash) external; + + /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account + /// When the return value is zero, that means this is a system message + /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies + function l2ToL1Sender() external view returns (address); + + /// @return l2Block return L2 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active + function l2ToL1Block() external view returns (uint256); + + /// @return l1Block return L1 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active + function l2ToL1EthBlock() external view returns (uint256); + + /// @return timestamp return L2 timestamp when the L2 tx was initiated or 0 if no L2 to L1 transaction is active + function l2ToL1Timestamp() external view returns (uint256); + + /// @return outputId returns the unique output identifier of the L2 to L1 tx or 0 if no L2 to L1 transaction is active + function l2ToL1OutputId() external view returns (bytes32); + + /** + * @notice Executes a messages in an Outbox entry. + * @dev Reverts if dispute period hasn't expired, since the outbox entry + * is only created once the rollup confirms the respective assertion. + * @dev it is not possible to execute any L2-to-L1 transaction which contains data + * to a contract address without any code (as enforced by the Bridge contract). + * @param proof Merkle proof of message inclusion in send root + * @param index Merkle path to message + * @param l2Sender sender if original message (i.e., caller of ArbSys.sendTxToL1) + * @param to destination address for L1 contract call + * @param l2Block l2 block number at which sendTxToL1 call was made + * @param l1Block l1 block number at which sendTxToL1 call was made + * @param l2Timestamp l2 Timestamp at which sendTxToL1 call was made + * @param value wei in L1 message + * @param data abi-encoded L1 message data + */ + function executeTransaction( + bytes32[] calldata proof, + uint256 index, + address l2Sender, + address to, + uint256 l2Block, + uint256 l1Block, + uint256 l2Timestamp, + uint256 value, + bytes calldata data + ) external; + + /** + * @dev function used to simulate the result of a particular function call from the outbox + * it is useful for things such as gas estimates. This function includes all costs except for + * proof validation (which can be considered offchain as a somewhat of a fixed cost - it's + * not really a fixed cost, but can be treated as so with a fixed overhead for gas estimation). + * We can't include the cost of proof validation since this is intended to be used to simulate txs + * that are included in yet-to-be confirmed merkle roots. The simulation entrypoint could instead pretend + * to confirm a pending merkle root, but that would be less practical for integrating with tooling. + * It is only possible to trigger it when the msg sender is address zero, which should be impossible + * unless under simulation in an eth_call or eth_estimateGas + */ + function executeTransactionSimulation( + uint256 index, + address l2Sender, + address to, + uint256 l2Block, + uint256 l1Block, + uint256 l2Timestamp, + uint256 value, + bytes calldata data + ) external; + + /** + * @param index Merkle path to message + * @return true if the message has been spent + */ + function isSpent(uint256 index) external view returns (bool); + + function calculateItemHash( + address l2Sender, + address to, + uint256 l2Block, + uint256 l1Block, + uint256 l2Timestamp, + uint256 value, + bytes calldata data + ) external pure returns (bytes32); + + function calculateMerkleRoot(bytes32[] memory proof, uint256 path, bytes32 item) external pure returns (bytes32); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol new file mode 100644 index 00000000..250b831a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (vendor/compound/ICompoundTimelock.sol) + +pragma solidity ^0.8.0; + +/** + * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface + */ +interface ICompoundTimelockUpgradeable { + event NewAdmin(address indexed newAdmin); + event NewPendingAdmin(address indexed newPendingAdmin); + event NewDelay(uint256 indexed newDelay); + event CancelTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event ExecuteTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event QueueTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + + receive() external payable; + + // solhint-disable-next-line func-name-mixedcase + function GRACE_PERIOD() external view returns (uint256); + + // solhint-disable-next-line func-name-mixedcase + function MINIMUM_DELAY() external view returns (uint256); + + // solhint-disable-next-line func-name-mixedcase + function MAXIMUM_DELAY() external view returns (uint256); + + function admin() external view returns (address); + + function pendingAdmin() external view returns (address); + + function delay() external view returns (uint256); + + function queuedTransactions(bytes32) external view returns (bool); + + function setDelay(uint256) external; + + function acceptAdmin() external; + + function setPendingAdmin(address) external; + + function queueTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external returns (bytes32); + + function cancelTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external; + + function executeTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) external payable returns (bytes memory); +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE new file mode 100644 index 00000000..7da23247 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE @@ -0,0 +1,11 @@ +Copyright 2020 Compound Labs, Inc. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol new file mode 100644 index 00000000..70e35e57 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/optimism/ICrossDomainMessenger.sol) +pragma solidity >0.5.0 <0.9.0; + +/** + * @title ICrossDomainMessenger + */ +interface ICrossDomainMessengerUpgradeable { + /********** + * Events * + **********/ + + event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit); + event RelayedMessage(bytes32 indexed msgHash); + event FailedRelayedMessage(bytes32 indexed msgHash); + + /************* + * Variables * + *************/ + + function xDomainMessageSender() external view returns (address); + + /******************** + * Public Functions * + ********************/ + + /** + * Sends a cross domain message to the target messenger. + * @param _target Target contract address. + * @param _message Message to send to the target. + * @param _gasLimit Gas limit for the provided message. + */ + function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE new file mode 100644 index 00000000..6a7da521 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright 2020-2021 Optimism + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol new file mode 100644 index 00000000..de89e2c2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.9.0) (vendor/polygon/IFxMessageProcessor.sol) +pragma solidity ^0.8.0; + +interface IFxMessageProcessorUpgradeable { + function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external; +} diff --git a/dependencies/forge-std-1.16.1/.github/CODEOWNERS b/dependencies/forge-std-1.16.1/.github/CODEOWNERS new file mode 100644 index 00000000..0a74e9c6 --- /dev/null +++ b/dependencies/forge-std-1.16.1/.github/CODEOWNERS @@ -0,0 +1 @@ +* @danipopes @mattsse @grandizzy @zerosnacks @onbjerg @0xrusowsky diff --git a/dependencies/forge-std-1.16.1/.github/dependabot.yml b/dependencies/forge-std-1.16.1/.github/dependabot.yml new file mode 100644 index 00000000..6cc00712 --- /dev/null +++ b/dependencies/forge-std-1.16.1/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 7 diff --git a/dependencies/forge-std-1.16.1/.github/workflows/ci.yml b/dependencies/forge-std-1.16.1/.github/workflows/ci.yml new file mode 100644 index 00000000..ff485d33 --- /dev/null +++ b/dependencies/forge-std-1.16.1/.github/workflows/ci.yml @@ -0,0 +1,163 @@ +name: CI + +permissions: {} + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + +env: + SOLC_MINIMUM: "0.8.13" + SOLC_LATEST: "0.8.35" + SOLC_PRERELEASE: "" + +jobs: + build-matrix: + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + outputs: + matrix: ${{ steps.generate.outputs.matrix }} + steps: + - id: generate + run: | + MINIMUM="${{ env.SOLC_MINIMUM }}" + LATEST="${{ env.SOLC_LATEST }}" + PRERELEASE="${{ env.SOLC_PRERELEASE }}" + matrix='{"include":[' + for toolchain in stable nightly; do + for flags in \ + "" \ + "--via-ir" \ + "--use solc:${LATEST}" \ + "--use solc:${LATEST} --via-ir" \ + "--use solc:${MINIMUM}" \ + "--use solc:${MINIMUM} --via-ir" + do + matrix+='{"toolchain":"'"$toolchain"'","flags":"'"$flags"'","prerelease":false},' + done + done + # prerelease (nightly only, svm-rs is not up to date on stable) + if [ -n "$PRERELEASE" ]; then + for flags in \ + "--use solc:${PRERELEASE}" \ + "--use solc:${PRERELEASE} --via-ir" + do + matrix+='{"toolchain":"nightly","flags":"'"$flags"'","prerelease":true},' + done + fi + matrix="${matrix%,}]}" + echo "matrix=$matrix" >> "$GITHUB_OUTPUT" + + build: + needs: build-matrix + name: build +${{ matrix.toolchain }} ${{ matrix.flags }} + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.build-matrix.outputs.matrix) }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: foundry-rs/foundry-toolchain@8789b3e21e6c11b2697f5eb56eddae542f746c10 # v1.7.0 + with: + version: ${{ matrix.toolchain }} + - run: forge --version + # 3805: "This is a pre-release compiler version, please do not use it in production." + - run: forge build -vvvvv --skip test --deny warnings ${{ matrix.prerelease && '--ignored-error-codes 3805' || '' }} ${{ matrix.flags }} --contracts 'test/compilation/*' + + test: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + strategy: + fail-fast: false + matrix: + toolchain: [stable, nightly] + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: foundry-rs/foundry-toolchain@8789b3e21e6c11b2697f5eb56eddae542f746c10 # v1.7.0 + with: + version: ${{ matrix.toolchain }} + - run: forge --version + - run: forge test -vvv + + fmt: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: foundry-rs/foundry-toolchain@8789b3e21e6c11b2697f5eb56eddae542f746c10 # v1.7.0 + - run: forge --version + - run: forge fmt --check + + typos: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: crate-ci/typos@cf5f1c29a8ac336af8568821ec41919923b05a83 # v1.45.1 + + codeql: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + security-events: write + actions: read + contents: read + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Initialize CodeQL + uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2 + with: + category: "/language:${{matrix.language}}" + + ci-success: + runs-on: ubuntu-latest + if: always() + needs: + - build-matrix + - build + - test + - fmt + - typos + - codeql + timeout-minutes: 10 + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/dependencies/forge-std-1.16.1/.github/workflows/sync.yml b/dependencies/forge-std-1.16.1/.github/workflows/sync.yml new file mode 100644 index 00000000..1e427de4 --- /dev/null +++ b/dependencies/forge-std-1.16.1/.github/workflows/sync.yml @@ -0,0 +1,36 @@ +name: Sync Release Branch + +permissions: {} + +on: + release: + types: + - created + +jobs: + sync-release-branch: + runs-on: ubuntu-latest + permissions: + contents: write + if: startsWith(github.event.release.tag_name, 'v1') + steps: + - name: Check out the repo + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: true + fetch-depth: 0 + ref: v1 + + # The email is derived from the bots user id, + # found here: https://api.github.com/users/github-actions%5Bbot%5D + - name: Configure Git + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + + - name: Sync Release Branch + run: | + git fetch --tags + git checkout v1 + git reset --hard ${GITHUB_REF} + git push --force diff --git a/dependencies/forge-std-1.16.1/.gitignore b/dependencies/forge-std-1.16.1/.gitignore new file mode 100644 index 00000000..756106d3 --- /dev/null +++ b/dependencies/forge-std-1.16.1/.gitignore @@ -0,0 +1,4 @@ +cache/ +out/ +.vscode +.idea diff --git a/dependencies/forge-std-1.16.1/CONTRIBUTING.md b/dependencies/forge-std-1.16.1/CONTRIBUTING.md new file mode 100644 index 00000000..8f4aa895 --- /dev/null +++ b/dependencies/forge-std-1.16.1/CONTRIBUTING.md @@ -0,0 +1,193 @@ +## Contributing to Foundry + +Thanks for your interest in improving Foundry! + +There are multiple opportunities to contribute at any level. It doesn't matter if you are just getting started with Rust or are the most weathered expert, we can use your help. + +This document will help you get started. **Do not let the document intimidate you**. +It should be considered as a guide to help you navigate the process. + +The [dev Telegram][dev-tg] is available for any concerns you may have that are not covered in this guide. + +### Code of Conduct + +The Foundry project adheres to the [Rust Code of Conduct][rust-coc]. This code of conduct describes the _minimum_ behavior expected from all contributors. + +Instances of violations of the Code of Conduct can be reported by contacting the team at [me@gakonst.com](mailto:me@gakonst.com). + +### Ways to contribute + +There are fundamentally four ways an individual can contribute: + +1. **By opening an issue:** For example, if you believe that you have uncovered a bug + in Foundry, creating a new issue in the issue tracker is the way to report it. +2. **By adding context:** Providing additional context to existing issues, + such as screenshots and code snippets, which help resolve issues. +3. **By resolving issues:** Typically this is done in the form of either + demonstrating that the issue reported is not a problem after all, or more often, + by opening a pull request that fixes the underlying problem, in a concrete and + reviewable manner. + +**Anybody can participate in any stage of contribution**. We urge you to participate in the discussion +around bugs and participate in reviewing PRs. + +### Contributions Related to Spelling and Grammar + +At this time, we will not be accepting contributions that only fix spelling or grammatical errors in documentation, code or +elsewhere. + +### Asking for help + +If you have reviewed existing documentation and still have questions, or you are having problems, you can get help in the following ways: + +- **Asking in the support Telegram:** The [Foundry Support Telegram][support-tg] is a fast and easy way to ask questions. +- **Opening a discussion:** This repository comes with a discussions board where you can also ask for help. Click the "Discussions" tab at the top. + +As Foundry is still in heavy development, the documentation can be a bit scattered. +The [Foundry Book][foundry-book] is our current best-effort attempt at keeping up-to-date information. + +### Submitting a bug report + +When filing a new bug report in the issue tracker, you will be presented with a basic form to fill out. + +If you believe that you have uncovered a bug, please fill out the form to the best of your ability. Do not worry if you cannot answer every detail; just fill in what you can. Contributors will ask follow-up questions if something is unclear. + +The most important pieces of information we need in a bug report are: + +- The Foundry version you are on (and that it is up to date) +- The platform you are on (Windows, macOS, an M1 Mac or Linux) +- Code snippets if this is happening in relation to testing or building code +- Concrete steps to reproduce the bug + +In order to rule out the possibility of the bug being in your project, the code snippets should be as minimal +as possible. It is better if you can reproduce the bug with a small snippet as opposed to an entire project! + +See [this guide][mcve] on how to create a minimal, complete, and verifiable example. + +### Submitting a feature request + +When adding a feature request in the issue tracker, you will be presented with a basic form to fill out. + +Please include as detailed of an explanation as possible of the feature you would like, adding additional context if necessary. + +If you have examples of other tools that have the feature you are requesting, please include them as well. + +### Resolving an issue + +Pull requests are the way concrete changes are made to the code, documentation, and dependencies of Foundry. + +Even minor pull requests, such as those fixing wording, are greatly appreciated. Before making a large change, it is usually +a good idea to first open an issue describing the change to solicit feedback and guidance. This will increase +the likelihood of the PR getting merged. + +Please make sure that the following commands pass if you have changed the code: + +```sh +forge fmt --check +forge test -vvv +``` + +To make sure your changes are compatible with all compiler version targets, run the following commands: + +```sh +forge build --skip test --use solc:0.6.2 +forge build --skip test --use solc:0.6.12 +forge build --skip test --use solc:0.7.0 +forge build --skip test --use solc:0.7.6 +forge build --skip test --use solc:0.8.0 +``` + +The CI will also ensure that the code is formatted correctly and that the tests are passing across all compiler version targets. + +#### Adding cheatcodes + +Please follow the guide outlined in the [cheatcodes](https://github.com/foundry-rs/foundry/blob/master/docs/dev/cheatcodes.md#adding-a-new-cheatcode) documentation of Foundry. + +When making modifications to the native cheatcodes or adding new ones, please make sure to run [`./scripts/vm.py`](./scripts/vm.py) to update the cheatcodes in the [`src/Vm.sol`](./src/Vm.sol) file. + +By default the script will automatically generate the cheatcodes from the [`cheatcodes.json`](https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json) file but alternatively you can provide a path to a JSON file containing the Vm interface, as generated by Foundry, with the `--from` flag. + +```sh +./scripts/vm.py --from path/to/cheatcodes.json +``` + +It is possible that the resulting [`src/Vm.sol`](./src/Vm.sol) file will have some changes that are not directly related to your changes, this is not a problem. + +#### Commits + +It is a recommended best practice to keep your changes as logically grouped as possible within individual commits. There is no limit to the number of commits any single pull request may have, and many contributors find it easier to review changes that are split across multiple commits. + +That said, if you have a number of commits that are "checkpoints" and don't represent a single logical change, please squash those together. + +#### Opening the pull request + +From within GitHub, opening a new pull request will present you with a template that should be filled out. Please try your best at filling out the details, but feel free to skip parts if you're not sure what to put. + +#### Discuss and update + +You will probably get feedback or requests for changes to your pull request. +This is a big part of the submission process, so don't be discouraged! Some contributors may sign off on the pull request right away, others may have more detailed comments or feedback. +This is a necessary part of the process in order to evaluate whether the changes are correct and necessary. + +**Any community member can review a PR, so you might get conflicting feedback**. +Keep an eye out for comments from code owners to provide guidance on conflicting feedback. + +#### Reviewing pull requests + +**Any Foundry community member is welcome to review any pull request**. + +All contributors who choose to review and provide feedback on pull requests have a responsibility to both the project and individual making the contribution. Reviews and feedback must be helpful, insightful, and geared towards improving the contribution as opposed to simply blocking it. If there are reasons why you feel the PR should not be merged, explain what those are. Do not expect to be able to block a PR from advancing simply because you say "no" without giving an explanation. Be open to having your mind changed. Be open to working _with_ the contributor to make the pull request better. + +Reviews that are dismissive or disrespectful of the contributor or any other reviewers are strictly counter to the Code of Conduct. + +When reviewing a pull request, the primary goals are for the codebase to improve and for the person submitting the request to succeed. **Even if a pull request is not merged, the submitter should come away from the experience feeling like their effort was appreciated**. Every PR from a new contributor is an opportunity to grow the community. + +##### Review a bit at a time + +Do not overwhelm new contributors. + +It is tempting to micro-optimize and make everything about relative performance, perfect grammar, or exact style matches. Do not succumb to that temptation. + +Focus first on the most significant aspects of the change: + +1. Does this change make sense for Foundry? +2. Does this change make Foundry better, even if only incrementally? +3. Are there clear bugs or larger scale issues that need attending? +4. Are the commit messages readable and correct? If it contains a breaking change, is it clear enough? + +Note that only **incremental** improvement is needed to land a PR. This means that the PR does not need to be perfect, only better than the status quo. Follow-up PRs may be opened to continue iterating. + +When changes are necessary, _request_ them, do not _demand_ them, and **do not assume that the submitter already knows how to add a test or run a benchmark**. + +Specific performance optimization techniques, coding styles and conventions change over time. The first impression you give to a new contributor never does. + +Nits (requests for small changes that are not essential) are fine, but try to avoid stalling the pull request. Most nits can typically be fixed by the Foundry maintainers merging the pull request, but they can also be an opportunity for the contributor to learn a bit more about the project. + +It is always good to clearly indicate nits when you comment, e.g.: `Nit: change foo() to bar(). But this is not blocking`. + +If your comments were addressed but were not folded after new commits, or if they proved to be mistaken, please, [hide them][hiding-a-comment] with the appropriate reason to keep the conversation flow concise and relevant. + +##### Be aware of the person behind the code + +Be aware that _how_ you communicate requests and reviews in your feedback can have a significant impact on the success of the pull request. Yes, we may merge a particular change that makes Foundry better, but the individual might just not want to have anything to do with Foundry ever again. The goal is not just having good code. + +##### Abandoned or stale pull requests + +If a pull request appears to be abandoned or stalled, it is polite to first check with the contributor to see if they intend to continue the work before checking if they would mind if you took it over (especially if it just has nits left). When doing so, it is courteous to give the original contributor credit for the work they started, either by preserving their name and e-mail address in the commit log, or by using the `Author: ` or `Co-authored-by: ` metadata tag in the commits. + +_Adapted from the [ethers-rs contributing guide](https://github.com/gakonst/ethers-rs/blob/master/CONTRIBUTING.md)_. + +### Releasing + +Releases are automatically done by the release workflow when a tag is pushed, however, these steps still need to be taken: + +1. Ensure that the versions in the relevant `Cargo.toml` files are up-to-date. +2. Update documentation links +3. Perform a final audit for breaking changes. + +[rust-coc]: https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md +[dev-tg]: https://t.me/foundry_rs +[foundry-book]: https://github.com/foundry-rs/foundry-book +[support-tg]: https://t.me/foundry_support +[mcve]: https://stackoverflow.com/help/mcve +[hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment diff --git a/dependencies/forge-std-1.16.1/LICENSE-APACHE b/dependencies/forge-std-1.16.1/LICENSE-APACHE new file mode 100644 index 00000000..cf01a499 --- /dev/null +++ b/dependencies/forge-std-1.16.1/LICENSE-APACHE @@ -0,0 +1,203 @@ +Copyright Contributors to Forge Standard Library + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/dependencies/forge-std-1.16.1/LICENSE-MIT b/dependencies/forge-std-1.16.1/LICENSE-MIT new file mode 100644 index 00000000..28f98304 --- /dev/null +++ b/dependencies/forge-std-1.16.1/LICENSE-MIT @@ -0,0 +1,25 @@ +Copyright Contributors to Forge Standard Library + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE O THE USE OR OTHER +DEALINGS IN THE SOFTWARE.R diff --git a/dependencies/forge-std-1.16.1/README.md b/dependencies/forge-std-1.16.1/README.md new file mode 100644 index 00000000..13015e4f --- /dev/null +++ b/dependencies/forge-std-1.16.1/README.md @@ -0,0 +1,314 @@ +# Forge Standard Library • [![CI status](https://github.com/foundry-rs/forge-std/actions/workflows/ci.yml/badge.svg)](https://github.com/foundry-rs/forge-std/actions/workflows/ci.yml) + +Forge Standard Library is a collection of helpful contracts and libraries for use with [Forge and Foundry](https://github.com/foundry-rs/foundry). It leverages Forge's cheatcodes to make writing tests easier and faster, while improving the UX of cheatcodes. + +**Learn how to use Forge-Std with the [📖 Foundry Book (Forge-Std Guide)](https://getfoundry.sh/reference/forge-std/overview/).** + +## Install + +```bash +forge install foundry-rs/forge-std +``` + +## Contracts + +### stdError + +This is a helper contract for errors and reverts. In Forge, this contract is particularly helpful for the `expectRevert` cheatcode, as it provides all compiler built-in errors. + +See the contract itself for all error codes. + +#### Example usage + +```solidity + +import "forge-std/Test.sol"; + +contract TestContract is Test { + ErrorsTest test; + + function setUp() public { + test = new ErrorsTest(); + } + + function testExpectArithmetic() public { + vm.expectRevert(stdError.arithmeticError); + test.arithmeticError(10); + } +} + +contract ErrorsTest { + function arithmeticError(uint256 a) public { + a = a - 100; + } +} +``` + +### stdStorage + +This is a rather large contract due to all of the overloading to make the UX decent. Primarily, it is a wrapper around the `record` and `accesses` cheatcodes. It can _always_ find and write the storage slot(s) associated with a particular variable without knowing the storage layout. By default, writing to packed storage variables is not supported and will throw an error. However, you can enable packed slot support by calling `enable_packed_slots()` before using `find()` or `checked_write()`. + +This works by recording all `SLOAD`s and `SSTORE`s during a function call. If there is a single slot read or written to, it immediately returns the slot. Otherwise, behind the scenes, we iterate through and check each one (assuming the user passed in a `depth` parameter). If the variable is a struct, you can pass in a `depth` parameter which is basically the field depth. + +I.e.: + +```solidity +struct T { + // depth 0 + uint256 a; + // depth 1 + uint256 b; +} +``` + +#### Example usage + +```solidity +import "forge-std/Test.sol"; + +contract TestContract is Test { + using stdStorage for StdStorage; + + Storage test; + + function setUp() public { + test = new Storage(); + } + + function testFindExists() public { + // Let's say we want to find the slot for the public + // variable `exists`. We just pass in the function selector + // to the `find` command + uint256 slot = stdstore.target(address(test)).sig("exists()").find(); + assertEq(slot, 0); + } + + function testWriteExists() public { + // Let's say we want to write to the slot for the public + // variable `exists`. We just pass in the function selector + // to the `checked_write` command + stdstore.target(address(test)).sig("exists()").checked_write(100); + assertEq(test.exists(), 100); + } + + // It supports arbitrary storage layouts, like assembly-based storage locations + function testFindHidden() public { + // `hidden` is a random hash of bytes; iterating through slots would + // not find it. Our mechanism does + // Also, you can use the selector instead of a string + uint256 slot = stdstore.target(address(test)).sig(test.hidden.selector).find(); + assertEq(slot, uint256(keccak256("my.random.var"))); + } + + // If targeting a mapping, you have to pass in the keys necessary to perform the find + // i.e.: + function testFindMapping() public { + uint256 slot = stdstore + .target(address(test)) + .sig(test.map_addr.selector) + .with_key(address(this)) + .find(); + // in the `Storage` constructor, we wrote that this address' value was 1 in the map + // so when we load the slot, we expect it to be 1 + assertEq(uint(vm.load(address(test), bytes32(slot))), 1); + } + + // If the target is a struct, you can specify the field depth: + function testFindStruct() public { + // NOTE: see the depth parameter - 0 means 0th field, 1 means 1st field, etc. + uint256 slot_for_a_field = stdstore + .target(address(test)) + .sig(test.basicStruct.selector) + .depth(0) + .find(); + + uint256 slot_for_b_field = stdstore + .target(address(test)) + .sig(test.basicStruct.selector) + .depth(1) + .find(); + + assertEq(uint(vm.load(address(test), bytes32(slot_for_a_field))), 1); + assertEq(uint(vm.load(address(test), bytes32(slot_for_b_field))), 2); + } +} + +// A complex storage contract +contract Storage { + struct UnpackedStruct { + uint256 a; + uint256 b; + } + + constructor() { + map_addr[msg.sender] = 1; + } + + uint256 public exists = 1; + mapping(address => uint256) public map_addr; + // mapping(address => Packed) public map_packed; + mapping(address => UnpackedStruct) public map_struct; + mapping(address => mapping(address => uint256)) public deep_map; + mapping(address => mapping(address => UnpackedStruct)) public deep_map_struct; + UnpackedStruct public basicStruct = UnpackedStruct({ + a: 1, + b: 2 + }); + + function hidden() public view returns (bytes32 t) { + // an extremely hidden storage slot + bytes32 slot = keccak256("my.random.var"); + assembly { + t := sload(slot) + } + } +} +``` + +### stdCheats + +This is a wrapper around miscellaneous cheatcodes that need wrappers to be more dev-friendly. It includes functions for pranking, dealing with ETH and tokens, deploying contracts, creating test addresses, time manipulation, and fuzzing helpers. In general, users may expect ETH to be put into an address with `prank`, but this is not the case for safety reasons. Explicitly, this `hoax` function should only be used for addresses that have expected balances as it will get overwritten. If an address already has ETH, you should just use `prank`. If you want to change that balance explicitly, just use `deal`. If you want to do both, `hoax` is also right for you. + +#### Example usage: + +```solidity + +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.0; + +import "forge-std/Test.sol"; + +// Inherit the stdCheats +contract StdCheatsTest is Test { + Bar test; + function setUp() public { + test = new Bar(); + } + + function testHoax() public { + // we call `hoax`, which gives the target address + // eth and then calls `prank` + hoax(address(1337)); + test.bar{value: 100}(address(1337)); + + // overloaded to allow you to specify how much eth to + // initialize the address with + hoax(address(1337), 1); + test.bar{value: 1}(address(1337)); + } + + function testStartHoax() public { + // we call `startHoax`, which gives the target address + // eth and then calls `startPrank` + // + // it is also overloaded so that you can specify an eth amount + startHoax(address(1337)); + test.bar{value: 100}(address(1337)); + test.bar{value: 100}(address(1337)); + vm.stopPrank(); + test.bar(address(this)); + } +} + +contract Bar { + function bar(address expectedSender) public payable { + require(msg.sender == expectedSender, "!prank"); + } +} +``` + +### Std Assertions + +Provides comprehensive assertion functions for testing, including equality checks (assertEq, assertNotEq), comparisons (assertLt, assertGt, assertLe, assertGe), approximate equality (assertApproxEqAbs, assertApproxEqRel), and boolean assertions (assertTrue, assertFalse). All assertions support multiple data types and optional custom error messages. + +### StdConfig + +This is a contract that parses a TOML configuration file and loads its variables into storage, automatically casting them on deployment. It assumes a TOML structure where top-level keys represent chain IDs or aliases. Under each chain key, variables are organized by type in separate sub-tables like `[.]`, where type must be: `bool`, `address`, `bytes32`, `uint`, `int`, `string`, or `bytes`. + +#### Example usage + +```solidity + +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.13; + +import "forge-std/Script.sol"; +import "forge-std/StdConfig.sol"; + +contract MyScript is Script { + StdConfig config; + + function run() public { + // Load config (set writeToFile=true only in scripts to persist changes) + config = new StdConfig("config.toml", false); + + // Get values for the current chain + uint256 myNumber = config.get("important_number").toUint256(); + address weth = config.get("weth").toAddress(); + address[] memory admins = config.get("whitelisted_admins").toAddressArray(); + + // Get values for a specific chain + bool isLive = config.get(1, "is_live").toBool(); + + // Check if a key exists + if (config.exists("optional_param")) { + // ... + } + + // Get RPC URL for current or specific chain + string memory rpc = config.getRpcUrl(); + string memory mainnetRpc = config.getRpcUrl(1); + + // Get all configured chain IDs + uint256[] memory chainIds = config.getChainIds(); + } +} +``` + +See the contract itself for supported TOML format and all available methods. + +### `console.log` + +Usage follows the same format as [Hardhat](https://hardhat.org/hardhat-network/reference/#console-log). +It's recommended to use `console2.sol` as shown below, as this will show the decoded logs in Forge traces. + +```solidity +// import it indirectly via Test.sol +import "forge-std/Test.sol"; +// or directly import it +import "forge-std/console2.sol"; +... +console2.log(someValue); +``` + +If you need compatibility with Hardhat, you must use the standard `console.sol` instead. +Due to a bug in `console.sol`, logs that use `uint256` or `int256` types will not be properly decoded in Forge traces. + +```solidity +// import it indirectly via Test.sol +import "forge-std/Test.sol"; +// or directly import it +import "forge-std/console.sol"; +... +console.log(someValue); +``` + +## Contributing + +See our [contributing guidelines](./CONTRIBUTING.md). + +## Getting Help + +First, see if the answer to your question can be found in [book](https://getfoundry.sh/). + +If the answer is not there: + +- Join the [support Telegram](https://t.me/foundry_support) to get help, or +- Open a [discussion](https://github.com/foundry-rs/foundry/discussions/new/choose) with your question, or +- Open an issue with [the bug](https://github.com/foundry-rs/foundry/issues/new/choose) + +If you want to contribute, or follow along with contributor discussion, you can use our [main telegram](https://t.me/foundry_rs) to chat with us about the development of Foundry! + +## License + +Forge Standard Library is offered under either [MIT](LICENSE-MIT) or [Apache 2.0](LICENSE-APACHE) license. diff --git a/dependencies/forge-std-1.16.1/RELEASE_CHECKLIST.md b/dependencies/forge-std-1.16.1/RELEASE_CHECKLIST.md new file mode 100644 index 00000000..82b33c2c --- /dev/null +++ b/dependencies/forge-std-1.16.1/RELEASE_CHECKLIST.md @@ -0,0 +1,12 @@ +# Release checklist + +This checklist is meant to be used as a guide for the `forge-std` release process. + +## Steps + +- [ ] Update the version number in `package.json` +- [ ] Open and merge a PR with the version bump +- [ ] Tag the merged commit with the version number: `git tag v` +- [ ] Push the tag to the repository: `git push --tags` +- [ ] Create a new GitHub release with the automatically generated changelog and the name set to `v` +- [ ] Add `## Featured Changes` section to the top of the release notes diff --git a/dependencies/forge-std-1.16.1/scripts/vm.py b/dependencies/forge-std-1.16.1/scripts/vm.py new file mode 100644 index 00000000..3d37207e --- /dev/null +++ b/dependencies/forge-std-1.16.1/scripts/vm.py @@ -0,0 +1,636 @@ +#!/usr/bin/env python3 + +import argparse +import copy +import json +import re +import subprocess +from enum import Enum as PyEnum +from pathlib import Path +from typing import Callable, Optional, Union +from urllib import request + +VoidFn = Callable[[], None] + +CHEATCODES_JSON_URL = "https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json" +OUT_PATH = "src/Vm.sol" + +VM_SAFE_DOC = """\ +/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may +/// result in Script simulations differing from on-chain execution. It is recommended to only use +/// these cheats in scripts. +""" + +VM_DOC = """\ +/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used +/// in tests, but it is not recommended to use these cheats in scripts. +""" + + +def main(): + parser = argparse.ArgumentParser( + description="Generate Vm.sol based on the cheatcodes json created by Foundry") + parser.add_argument( + "--from", + metavar="PATH", + dest="path", + required=False, + help="path to a json file containing the Vm interface, as generated by Foundry") + args = parser.parse_args() + json_str = request.urlopen(CHEATCODES_JSON_URL).read().decode("utf-8") if args.path is None else Path(args.path).read_text() + contract = Cheatcodes.from_json(json_str) + + ccs = contract.cheatcodes + ccs = list(filter(lambda cc: cc.status not in ["experimental", "internal"], ccs)) + ccs.sort(key=lambda cc: cc.func.id) + + safe = list(filter(lambda cc: cc.safety == "safe", ccs)) + safe.sort(key=CmpCheatcode) + unsafe = list(filter(lambda cc: cc.safety == "unsafe", ccs)) + unsafe.sort(key=CmpCheatcode) + assert len(safe) + len(unsafe) == len(ccs) + + prefix_with_group_headers(safe) + prefix_with_group_headers(unsafe) + + out = "" + + out += "// Automatically @generated by scripts/vm.py. Do not modify manually.\n\n" + + pp = CheatcodesPrinter( + spdx_identifier="MIT OR Apache-2.0", + solidity_requirement=">=0.8.13 <0.9.0", + ) + pp.p_prelude() + pp.prelude = False + out += pp.finish() + + out += "\n\n" + out += VM_SAFE_DOC + vm_safe = Cheatcodes( + # TODO: Custom errors were introduced in 0.8.4 + errors=[], # contract.errors + events=contract.events, + enums=contract.enums, + structs=contract.structs, + cheatcodes=safe, + ) + pp.p_contract(vm_safe, "VmSafe") + out += pp.finish() + + out += "\n\n" + out += VM_DOC + vm_unsafe = Cheatcodes( + errors=[], + events=[], + enums=[], + structs=[], + cheatcodes=unsafe, + ) + pp.p_contract(vm_unsafe, "Vm", "VmSafe") + out += pp.finish() + + # Compatibility with <0.8.0 + def memory_to_calldata(m: re.Match) -> str: + return " calldata " + m.group(1) + + out = re.sub(r" memory (.*returns)", memory_to_calldata, out) + + with open(OUT_PATH, "w") as f: + f.write(out) + + forge_fmt = ["forge", "fmt", OUT_PATH] + res = subprocess.run(forge_fmt) + assert res.returncode == 0, f"command failed: {forge_fmt}" + + print(f"Wrote to {OUT_PATH}") + + +class CmpCheatcode: + cheatcode: "Cheatcode" + + def __init__(self, cheatcode: "Cheatcode"): + self.cheatcode = cheatcode + + def __lt__(self, other: "CmpCheatcode") -> bool: + return cmp_cheatcode(self.cheatcode, other.cheatcode) < 0 + + def __eq__(self, other: "CmpCheatcode") -> bool: + return cmp_cheatcode(self.cheatcode, other.cheatcode) == 0 + + def __gt__(self, other: "CmpCheatcode") -> bool: + return cmp_cheatcode(self.cheatcode, other.cheatcode) > 0 + + +def cmp_cheatcode(a: "Cheatcode", b: "Cheatcode") -> int: + if a.group != b.group: + return -1 if a.group < b.group else 1 + if a.status != b.status: + return -1 if a.status < b.status else 1 + if a.safety != b.safety: + return -1 if a.safety < b.safety else 1 + if a.func.id != b.func.id: + return -1 if a.func.id < b.func.id else 1 + return 0 + + +# HACK: A way to add group header comments without having to modify printer code +def prefix_with_group_headers(cheats: list["Cheatcode"]): + s = set() + for i, cheat in enumerate(cheats): + if cheat.group in s: + continue + + s.add(cheat.group) + + c = copy.deepcopy(cheat) + c.func.description = "" + c.func.declaration = f"// ======== {group(c.group)} ========" + cheats.insert(i, c) + return cheats + + +def group(s: str) -> str: + if s == "evm": + return "EVM" + if s == "json": + return "JSON" + return s[0].upper() + s[1:] + + +class Visibility(PyEnum): + EXTERNAL: str = "external" + PUBLIC: str = "public" + INTERNAL: str = "internal" + PRIVATE: str = "private" + + def __str__(self): + return self.value + + +class Mutability(PyEnum): + PURE: str = "pure" + VIEW: str = "view" + NONE: str = "" + + def __str__(self): + return self.value + + +class Function: + id: str + description: str + declaration: str + visibility: Visibility + mutability: Mutability + signature: str + selector: str + selector_bytes: bytes + + def __init__( + self, + id: str, + description: str, + declaration: str, + visibility: Visibility, + mutability: Mutability, + signature: str, + selector: str, + selector_bytes: bytes, + ): + self.id = id + self.description = description + self.declaration = declaration + self.visibility = visibility + self.mutability = mutability + self.signature = signature + self.selector = selector + self.selector_bytes = selector_bytes + + @staticmethod + def from_dict(d: dict) -> "Function": + return Function( + d["id"], + d["description"], + d["declaration"], + Visibility(d["visibility"]), + Mutability(d["mutability"]), + d["signature"], + d["selector"], + bytes(d["selectorBytes"]), + ) + + +class Cheatcode: + func: Function + group: str + status: str + safety: str + + def __init__(self, func: Function, group: str, status: str, safety: str): + self.func = func + self.group = group + self.status = status + self.safety = safety + + @staticmethod + def from_dict(d: dict) -> "Cheatcode": + return Cheatcode( + Function.from_dict(d["func"]), + str(d["group"]), + str(d["status"]), + str(d["safety"]), + ) + + +class Error: + name: str + description: str + declaration: str + + def __init__(self, name: str, description: str, declaration: str): + self.name = name + self.description = description + self.declaration = declaration + + @staticmethod + def from_dict(d: dict) -> "Error": + return Error(**d) + + +class Event: + name: str + description: str + declaration: str + + def __init__(self, name: str, description: str, declaration: str): + self.name = name + self.description = description + self.declaration = declaration + + @staticmethod + def from_dict(d: dict) -> "Event": + return Event(**d) + + +class EnumVariant: + name: str + description: str + + def __init__(self, name: str, description: str): + self.name = name + self.description = description + + +class Enum: + name: str + description: str + variants: list[EnumVariant] + + def __init__(self, name: str, description: str, variants: list[EnumVariant]): + self.name = name + self.description = description + self.variants = variants + + @staticmethod + def from_dict(d: dict) -> "Enum": + return Enum( + d["name"], + d["description"], + list(map(lambda v: EnumVariant(**v), d["variants"])), + ) + + +class StructField: + name: str + ty: str + description: str + + def __init__(self, name: str, ty: str, description: str): + self.name = name + self.ty = ty + self.description = description + + +class Struct: + name: str + description: str + fields: list[StructField] + + def __init__(self, name: str, description: str, fields: list[StructField]): + self.name = name + self.description = description + self.fields = fields + + @staticmethod + def from_dict(d: dict) -> "Struct": + return Struct( + d["name"], + d["description"], + list(map(lambda f: StructField(**f), d["fields"])), + ) + + +class Cheatcodes: + errors: list[Error] + events: list[Event] + enums: list[Enum] + structs: list[Struct] + cheatcodes: list[Cheatcode] + + def __init__( + self, + errors: list[Error], + events: list[Event], + enums: list[Enum], + structs: list[Struct], + cheatcodes: list[Cheatcode], + ): + self.errors = errors + self.events = events + self.enums = enums + self.structs = structs + self.cheatcodes = cheatcodes + + @staticmethod + def from_dict(d: dict) -> "Cheatcodes": + return Cheatcodes( + errors=[Error.from_dict(e) for e in d["errors"]], + events=[Event.from_dict(e) for e in d["events"]], + enums=[Enum.from_dict(e) for e in d["enums"]], + structs=[Struct.from_dict(e) for e in d["structs"]], + cheatcodes=[Cheatcode.from_dict(e) for e in d["cheatcodes"]], + ) + + @staticmethod + def from_json(s) -> "Cheatcodes": + return Cheatcodes.from_dict(json.loads(s)) + + @staticmethod + def from_json_file(file_path: str) -> "Cheatcodes": + with open(file_path, "r") as f: + return Cheatcodes.from_dict(json.load(f)) + + +class Item(PyEnum): + ERROR: str = "error" + EVENT: str = "event" + ENUM: str = "enum" + STRUCT: str = "struct" + FUNCTION: str = "function" + + +class ItemOrder: + _list: list[Item] + + def __init__(self, list: list[Item]) -> None: + assert len(list) <= len(Item), "list must not contain more items than Item" + assert len(list) == len(set(list)), "list must not contain duplicates" + self._list = list + pass + + def get_list(self) -> list[Item]: + return self._list + + @staticmethod + def default() -> "ItemOrder": + return ItemOrder( + [ + Item.ERROR, + Item.EVENT, + Item.ENUM, + Item.STRUCT, + Item.FUNCTION, + ] + ) + + +class CheatcodesPrinter: + buffer: str + + prelude: bool + spdx_identifier: str + solidity_requirement: str + + block_doc_style: bool + + indent_level: int + _indent_str: str + + nl_str: str + + items_order: ItemOrder + + def __init__( + self, + buffer: str = "", + prelude: bool = True, + spdx_identifier: str = "UNLICENSED", + solidity_requirement: str = "", + block_doc_style: bool = False, + indent_level: int = 0, + indent_with: Union[int, str] = 4, + nl_str: str = "\n", + items_order: ItemOrder = ItemOrder.default(), + ): + self.prelude = prelude + self.spdx_identifier = spdx_identifier + self.solidity_requirement = solidity_requirement + self.block_doc_style = block_doc_style + self.buffer = buffer + self.indent_level = indent_level + self.nl_str = nl_str + + if isinstance(indent_with, int): + assert indent_with >= 0 + self._indent_str = " " * indent_with + elif isinstance(indent_with, str): + self._indent_str = indent_with + else: + assert False, "indent_with must be int or str" + + self.items_order = items_order + + def finish(self) -> str: + ret = self.buffer.rstrip() + self.buffer = "" + return ret + + def p_contract(self, contract: Cheatcodes, name: str, inherits: str = ""): + if self.prelude: + self.p_prelude(contract) + + self._p_str("interface ") + name = name.strip() + if name != "": + self._p_str(name) + self._p_str(" ") + if inherits != "": + self._p_str("is ") + self._p_str(inherits) + self._p_str(" ") + self._p_str("{") + self._p_nl() + self._with_indent(lambda: self._p_items(contract)) + self._p_str("}") + self._p_nl() + + def _p_items(self, contract: Cheatcodes): + for item in self.items_order.get_list(): + if item == Item.ERROR: + self.p_errors(contract.errors) + elif item == Item.EVENT: + self.p_events(contract.events) + elif item == Item.ENUM: + self.p_enums(contract.enums) + elif item == Item.STRUCT: + self.p_structs(contract.structs) + elif item == Item.FUNCTION: + self.p_functions(contract.cheatcodes) + else: + assert False, f"unknown item {item}" + + def p_prelude(self, contract: Optional[Cheatcodes] = None): + self._p_str(f"// SPDX-License-Identifier: {self.spdx_identifier}") + self._p_nl() + + if self.solidity_requirement != "": + req = self.solidity_requirement + else: + req = ">=0.8.13 <0.9.0" + self._p_str(f"pragma solidity {req};") + self._p_nl() + + self._p_nl() + + def p_errors(self, errors: list[Error]): + for error in errors: + self._p_line(lambda: self.p_error(error)) + + def p_error(self, error: Error): + self._p_comment(error.description, doc=True) + self._p_line(lambda: self._p_str(error.declaration)) + + def p_events(self, events: list[Event]): + for event in events: + self._p_line(lambda: self.p_event(event)) + + def p_event(self, event: Event): + self._p_comment(event.description, doc=True) + self._p_line(lambda: self._p_str(event.declaration)) + + def p_enums(self, enums: list[Enum]): + for enum in enums: + self._p_line(lambda: self.p_enum(enum)) + + def p_enum(self, enum: Enum): + self._p_comment(enum.description, doc=True) + self._p_line(lambda: self._p_str(f"enum {enum.name} {{")) + self._with_indent(lambda: self.p_enum_variants(enum.variants)) + self._p_line(lambda: self._p_str("}")) + + def p_enum_variants(self, variants: list[EnumVariant]): + for i, variant in enumerate(variants): + self._p_indent() + self._p_comment(variant.description) + + self._p_indent() + self._p_str(variant.name) + if i < len(variants) - 1: + self._p_str(",") + self._p_nl() + + def p_structs(self, structs: list[Struct]): + for struct in structs: + self._p_line(lambda: self.p_struct(struct)) + + def p_struct(self, struct: Struct): + self._p_comment(struct.description, doc=True) + self._p_line(lambda: self._p_str(f"struct {struct.name} {{")) + self._with_indent(lambda: self.p_struct_fields(struct.fields)) + self._p_line(lambda: self._p_str("}")) + + def p_struct_fields(self, fields: list[StructField]): + for field in fields: + self._p_line(lambda: self.p_struct_field(field)) + + def p_struct_field(self, field: StructField): + self._p_comment(field.description) + self._p_indented(lambda: self._p_str(f"{field.ty} {field.name};")) + + def p_functions(self, cheatcodes: list[Cheatcode]): + for cheatcode in cheatcodes: + self._p_line(lambda: self.p_function(cheatcode.func)) + + def p_function(self, func: Function): + self._p_comment(func.description, doc=True) + self._p_line(lambda: self._p_str(func.declaration)) + + def _p_comment(self, s: str, doc: bool = False): + s = s.strip() + if s == "": + return + + s = map(lambda line: line.lstrip(), s.split("\n")) + if self.block_doc_style: + self._p_str("/*") + if doc: + self._p_str("*") + self._p_nl() + for line in s: + self._p_indent() + self._p_str(" ") + if doc: + self._p_str("* ") + self._p_str(line) + self._p_nl() + self._p_indent() + self._p_str(" */") + self._p_nl() + else: + first_line = True + for line in s: + if not first_line: + self._p_indent() + first_line = False + + if doc: + self._p_str("/// ") + else: + self._p_str("// ") + self._p_str(line) + self._p_nl() + + def _with_indent(self, f: VoidFn): + self._inc_indent() + f() + self._dec_indent() + + def _p_line(self, f: VoidFn): + self._p_indent() + f() + self._p_nl() + + def _p_indented(self, f: VoidFn): + self._p_indent() + f() + + def _p_indent(self): + for _ in range(self.indent_level): + self._p_str(self._indent_str) + + def _p_nl(self): + self._p_str(self.nl_str) + + def _p_str(self, txt: str): + self.buffer += txt + + def _inc_indent(self): + self.indent_level += 1 + + def _dec_indent(self): + self.indent_level -= 1 + + +if __name__ == "__main__": + main() diff --git a/dependencies/forge-std-1.16.1/src/Base.sol b/dependencies/forge-std-1.16.1/src/Base.sol new file mode 100644 index 00000000..d948010f --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/Base.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {StdStorage} from "./StdStorage.sol"; +import {Vm, VmSafe} from "./Vm.sol"; + +abstract contract CommonBase { + /// @dev Cheat code address. + /// Calculated as `address(uint160(uint256(keccak256("hevm cheat code"))))`. + address internal constant VM_ADDRESS = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D; + + /// @dev console.sol and console2.sol work by executing a staticcall to this address. + /// Calculated as `address(uint160(uint88(bytes11("console.log"))))`. + address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67; + + /// @dev Used when deploying with create2. + /// Taken from https://github.com/Arachnid/deterministic-deployment-proxy. + address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; + + /// @dev The default address for tx.origin and msg.sender. + /// Calculated as `address(uint160(uint256(keccak256("foundry default caller"))))`. + address internal constant DEFAULT_SENDER = 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38; + + /// @dev The address of the first contract `CREATE`d by a running test contract. + /// When running tests, each test contract is `CREATE`d by `DEFAULT_SENDER` with nonce 1. + /// Calculated as `VM.computeCreateAddress(VM.computeCreateAddress(DEFAULT_SENDER, 1), 1)`. + address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f; + + /// @dev Deterministic deployment address of the Multicall3 contract. + /// Taken from https://www.multicall3.com. + address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11; + + /// @dev The order of the secp256k1 curve. + uint256 internal constant SECP256K1_ORDER = + 115792089237316195423570985008687907852837564279074904382605163141518161494337; + + uint256 internal constant UINT256_MAX = + 115792089237316195423570985008687907853269984665640564039457584007913129639935; + + Vm internal constant vm = Vm(VM_ADDRESS); + StdStorage internal stdstore; +} + +abstract contract TestBase is CommonBase {} + +abstract contract ScriptBase is CommonBase { + VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS); +} diff --git a/dependencies/forge-std-1.16.1/src/Config.sol b/dependencies/forge-std-1.16.1/src/Config.sol new file mode 100644 index 00000000..3d35bb58 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/Config.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.13; + +import {console} from "./console.sol"; +import {StdConfig} from "./StdConfig.sol"; +import {CommonBase} from "./Base.sol"; + +/// @notice Boilerplate to streamline the setup of multi-chain environments. +abstract contract Config is CommonBase { + // -- STORAGE (CONFIG + CHAINS + FORKS) ------------------------------------ + + /// @dev Contract instance holding the data from the TOML config file. + StdConfig internal config; + + /// @dev Array of chain IDs for which forks have been created. + uint256[] internal chainIds; + + /// @dev A mapping from a chain ID to its initialized fork ID. + mapping(uint256 => uint256) internal forkOf; + + // -- HELPER FUNCTIONS ----------------------------------------------------- + + /// @notice Loads configuration from a file. + /// + /// @dev This function instantiates a `Config` contract, caching all its config variables. + /// + /// @param filePath: the path to the TOML configuration file. + /// @param writeToFile: whether updates are written back to the TOML file. + function _loadConfig(string memory filePath, bool writeToFile) internal { + console.log("----------"); + console.log(string.concat("Loading config from '", filePath, "'")); + config = new StdConfig(filePath, writeToFile); + vm.makePersistent(address(config)); + console.log("Config successfully loaded"); + console.log("----------"); + } + + /// @notice Loads configuration from a file and creates forks for each specified chain. + /// + /// @dev This function instantiates a `Config` contract, caching all its config variables, + /// reads the configured chain ids, and iterates through them to create a fork for each one. + /// It also creates a map `forkOf[chainId] -> forkId` to easily switch between forks. + /// + /// @param filePath: the path to the TOML configuration file. + /// @param writeToFile: whether updates are written back to the TOML file. + function _loadConfigAndForks(string memory filePath, bool writeToFile) internal { + _loadConfig(filePath, writeToFile); + + console.log("Setting up forks for the configured chains..."); + uint256[] memory chains = config.getChainIds(); + for (uint256 i = 0; i < chains.length; i++) { + uint256 chainId = chains[i]; + uint256 forkId = vm.createFork(config.getRpcUrl(chainId)); + forkOf[chainId] = forkId; + chainIds.push(chainId); + } + console.log("Forks successfully created"); + console.log("----------"); + } +} diff --git a/dependencies/forge-std-1.16.1/src/LibVariable.sol b/dependencies/forge-std-1.16.1/src/LibVariable.sol new file mode 100644 index 00000000..32fe5bfa --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/LibVariable.sol @@ -0,0 +1,477 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.13; + +// Enable globally. +using LibVariable for Variable global; + +struct Variable { + Type ty; + bytes data; +} + +struct Type { + TypeKind kind; + bool isArray; +} + +enum TypeKind { + None, + Bool, + Address, + Bytes32, + Uint256, + Int256, + String, + Bytes +} + +/// @notice Library for type-safe coercion of the `Variable` struct to concrete types. +/// +/// @dev Ensures that when a `Variable` is cast to a concrete Solidity type, the operation is safe and the +/// underlying type matches what is expected. +/// Provides functions to check types, convert them to strings, and coerce `Variable` instances into +/// both single values and arrays of various types. +/// +/// Usage example: +/// ```solidity +/// import {LibVariable} from "./LibVariable.sol"; +/// +/// contract MyContract { +/// using LibVariable for Variable; +/// StdConfig config; // Assume 'config' is an instance of `StdConfig` and has already been loaded. +/// +/// function readValues() public { +/// // Retrieve a 'uint256' value from the config. +/// uint256 myNumber = config.get("important_number").toUint256(); +/// +/// // Would revert with `TypeMismatch` as 'important_number' isn't a `uint256` in the config file. +/// // string memory notANumber = config.get("important_number").toString(); +/// +/// // Retrieve a address array from the config. +/// address[] memory admins = config.get("whitelisted_admins").toAddressArray(); +/// } +/// } +/// ``` +library LibVariable { + error NotInitialized(); + error TypeMismatch(string expected, string actual); + error UnsafeCast(string message); + + // -- TYPE HELPERS ---------------------------------------------------- + + /// @notice Compares two Type instances for equality. + function isEqual(Type memory self, Type memory other) internal pure returns (bool) { + return self.kind == other.kind && self.isArray == other.isArray; + } + + /// @notice Compares two Type instances for equality. Reverts if they are not equal. + function assertEq(Type memory self, Type memory other) internal pure { + if (!isEqual(self, other)) { + revert TypeMismatch(toString(other), toString(self)); + } + } + + /// @notice Converts a Type struct to its full string representation (i.e. "uint256[]"). + function toString(Type memory self) internal pure returns (string memory) { + string memory tyStr = toString(self.kind); + if (!self.isArray || self.kind == TypeKind.None) { + return tyStr; + } else { + return string.concat(tyStr, "[]"); + } + } + + /// @dev Converts a `TypeKind` enum to its base string representation. + function toString(TypeKind self) internal pure returns (string memory) { + if (self == TypeKind.Bool) return "bool"; + if (self == TypeKind.Address) return "address"; + if (self == TypeKind.Bytes32) return "bytes32"; + if (self == TypeKind.Uint256) return "uint256"; + if (self == TypeKind.Int256) return "int256"; + if (self == TypeKind.String) return "string"; + if (self == TypeKind.Bytes) return "bytes"; + return "none"; + } + + /// @dev Converts a `TypeKind` enum to its base string representation. + function toTomlKey(TypeKind self) internal pure returns (string memory) { + if (self == TypeKind.Bool) return "bool"; + if (self == TypeKind.Address) return "address"; + if (self == TypeKind.Bytes32) return "bytes32"; + if (self == TypeKind.Uint256) return "uint"; + if (self == TypeKind.Int256) return "int"; + if (self == TypeKind.String) return "string"; + if (self == TypeKind.Bytes) return "bytes"; + return "none"; + } + + // -- VARIABLE HELPERS ---------------------------------------------------- + + /// @dev Checks if a `Variable` has been initialized and matches the expected type reverting if not. + modifier check(Variable memory self, Type memory expected) { + assertExists(self); + assertEq(self.ty, expected); + _; + } + + /// @dev Checks if a `Variable` has been initialized, reverting if not. + function assertExists(Variable memory self) public pure { + if (self.ty.kind == TypeKind.None) { + revert NotInitialized(); + } + } + + // -- VARIABLE COERCION FUNCTIONS (SINGLE VALUES) -------------------------- + + /// @notice Coerces a `Variable` to a `bool` value. + function toBool(Variable memory self) internal pure check(self, Type(TypeKind.Bool, false)) returns (bool) { + return abi.decode(self.data, (bool)); + } + + /// @notice Coerces a `Variable` to an `address` value. + function toAddress(Variable memory self) + internal + pure + check(self, Type(TypeKind.Address, false)) + returns (address) + { + return abi.decode(self.data, (address)); + } + + /// @notice Coerces a `Variable` to a `bytes32` value. + function toBytes32(Variable memory self) + internal + pure + check(self, Type(TypeKind.Bytes32, false)) + returns (bytes32) + { + return abi.decode(self.data, (bytes32)); + } + + /// @notice Coerces a `Variable` to a `uint256` value. + function toUint256(Variable memory self) + internal + pure + check(self, Type(TypeKind.Uint256, false)) + returns (uint256) + { + return abi.decode(self.data, (uint256)); + } + + /// @notice Coerces a `Variable` to a `uint128` value, checking for overflow. + function toUint128(Variable memory self) internal pure returns (uint128) { + uint256 value = self.toUint256(); + if (value > type(uint128).max) { + revert UnsafeCast("value does not fit in 'uint128'"); + } + return uint128(value); + } + + /// @notice Coerces a `Variable` to a `uint64` value, checking for overflow. + function toUint64(Variable memory self) internal pure returns (uint64) { + uint256 value = self.toUint256(); + if (value > type(uint64).max) { + revert UnsafeCast("value does not fit in 'uint64'"); + } + return uint64(value); + } + + /// @notice Coerces a `Variable` to a `uint32` value, checking for overflow. + function toUint32(Variable memory self) internal pure returns (uint32) { + uint256 value = self.toUint256(); + if (value > type(uint32).max) { + revert UnsafeCast("value does not fit in 'uint32'"); + } + return uint32(value); + } + + /// @notice Coerces a `Variable` to a `uint16` value, checking for overflow. + function toUint16(Variable memory self) internal pure returns (uint16) { + uint256 value = self.toUint256(); + if (value > type(uint16).max) { + revert UnsafeCast("value does not fit in 'uint16'"); + } + return uint16(value); + } + + /// @notice Coerces a `Variable` to a `uint8` value, checking for overflow. + function toUint8(Variable memory self) internal pure returns (uint8) { + uint256 value = self.toUint256(); + if (value > type(uint8).max) { + revert UnsafeCast("value does not fit in 'uint8'"); + } + return uint8(value); + } + + /// @notice Coerces a `Variable` to an `int256` value. + function toInt256(Variable memory self) internal pure check(self, Type(TypeKind.Int256, false)) returns (int256) { + return abi.decode(self.data, (int256)); + } + + /// @notice Coerces a `Variable` to an `int128` value, checking for overflow/underflow. + function toInt128(Variable memory self) internal pure returns (int128) { + int256 value = self.toInt256(); + if (value > type(int128).max || value < type(int128).min) { + revert UnsafeCast("value does not fit in 'int128'"); + } + return int128(value); + } + + /// @notice Coerces a `Variable` to an `int64` value, checking for overflow/underflow. + function toInt64(Variable memory self) internal pure returns (int64) { + int256 value = self.toInt256(); + if (value > type(int64).max || value < type(int64).min) { + revert UnsafeCast("value does not fit in 'int64'"); + } + return int64(value); + } + + /// @notice Coerces a `Variable` to an `int32` value, checking for overflow/underflow. + function toInt32(Variable memory self) internal pure returns (int32) { + int256 value = self.toInt256(); + if (value > type(int32).max || value < type(int32).min) { + revert UnsafeCast("value does not fit in 'int32'"); + } + return int32(value); + } + + /// @notice Coerces a `Variable` to an `int16` value, checking for overflow/underflow. + function toInt16(Variable memory self) internal pure returns (int16) { + int256 value = self.toInt256(); + if (value > type(int16).max || value < type(int16).min) { + revert UnsafeCast("value does not fit in 'int16'"); + } + return int16(value); + } + + /// @notice Coerces a `Variable` to an `int8` value, checking for overflow/underflow. + function toInt8(Variable memory self) internal pure returns (int8) { + int256 value = self.toInt256(); + if (value > type(int8).max || value < type(int8).min) { + revert UnsafeCast("value does not fit in 'int8'"); + } + return int8(value); + } + + /// @notice Coerces a `Variable` to a `string` value. + function toString(Variable memory self) + internal + pure + check(self, Type(TypeKind.String, false)) + returns (string memory) + { + return abi.decode(self.data, (string)); + } + + /// @notice Coerces a `Variable` to a `bytes` value. + function toBytes(Variable memory self) + internal + pure + check(self, Type(TypeKind.Bytes, false)) + returns (bytes memory) + { + return abi.decode(self.data, (bytes)); + } + + // -- VARIABLE COERCION FUNCTIONS (ARRAYS) --------------------------------- + + /// @notice Coerces a `Variable` to a `bool` array. + function toBoolArray(Variable memory self) + internal + pure + check(self, Type(TypeKind.Bool, true)) + returns (bool[] memory) + { + return abi.decode(self.data, (bool[])); + } + + /// @notice Coerces a `Variable` to an `address` array. + function toAddressArray(Variable memory self) + internal + pure + check(self, Type(TypeKind.Address, true)) + returns (address[] memory) + { + return abi.decode(self.data, (address[])); + } + + /// @notice Coerces a `Variable` to a `bytes32` array. + function toBytes32Array(Variable memory self) + internal + pure + check(self, Type(TypeKind.Bytes32, true)) + returns (bytes32[] memory) + { + return abi.decode(self.data, (bytes32[])); + } + + /// @notice Coerces a `Variable` to a `uint256` array. + function toUint256Array(Variable memory self) + internal + pure + check(self, Type(TypeKind.Uint256, true)) + returns (uint256[] memory) + { + return abi.decode(self.data, (uint256[])); + } + + /// @notice Coerces a `Variable` to a `uint128` array, checking for overflow. + function toUint128Array(Variable memory self) internal pure returns (uint128[] memory) { + uint256[] memory values = self.toUint256Array(); + uint128[] memory result = new uint128[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(uint128).max) { + revert UnsafeCast("value in array does not fit in 'uint128'"); + } + result[i] = uint128(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `uint64` array, checking for overflow. + function toUint64Array(Variable memory self) internal pure returns (uint64[] memory) { + uint256[] memory values = self.toUint256Array(); + uint64[] memory result = new uint64[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(uint64).max) { + revert UnsafeCast("value in array does not fit in 'uint64'"); + } + result[i] = uint64(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `uint32` array, checking for overflow. + function toUint32Array(Variable memory self) internal pure returns (uint32[] memory) { + uint256[] memory values = self.toUint256Array(); + uint32[] memory result = new uint32[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(uint32).max) { + revert UnsafeCast("value in array does not fit in 'uint32'"); + } + result[i] = uint32(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `uint16` array, checking for overflow. + function toUint16Array(Variable memory self) internal pure returns (uint16[] memory) { + uint256[] memory values = self.toUint256Array(); + uint16[] memory result = new uint16[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(uint16).max) { + revert UnsafeCast("value in array does not fit in 'uint16'"); + } + result[i] = uint16(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `uint8` array, checking for overflow. + function toUint8Array(Variable memory self) internal pure returns (uint8[] memory) { + uint256[] memory values = self.toUint256Array(); + uint8[] memory result = new uint8[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(uint8).max) { + revert UnsafeCast("value in array does not fit in 'uint8'"); + } + result[i] = uint8(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to an `int256` array. + function toInt256Array(Variable memory self) + internal + pure + check(self, Type(TypeKind.Int256, true)) + returns (int256[] memory) + { + return abi.decode(self.data, (int256[])); + } + + /// @notice Coerces a `Variable` to a `int128` array, checking for overflow/underflow. + function toInt128Array(Variable memory self) internal pure returns (int128[] memory) { + int256[] memory values = self.toInt256Array(); + int128[] memory result = new int128[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(int128).max || values[i] < type(int128).min) { + revert UnsafeCast("value in array does not fit in 'int128'"); + } + result[i] = int128(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `int64` array, checking for overflow/underflow. + function toInt64Array(Variable memory self) internal pure returns (int64[] memory) { + int256[] memory values = self.toInt256Array(); + int64[] memory result = new int64[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(int64).max || values[i] < type(int64).min) { + revert UnsafeCast("value in array does not fit in 'int64'"); + } + result[i] = int64(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `int32` array, checking for overflow/underflow. + function toInt32Array(Variable memory self) internal pure returns (int32[] memory) { + int256[] memory values = self.toInt256Array(); + int32[] memory result = new int32[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(int32).max || values[i] < type(int32).min) { + revert UnsafeCast("value in array does not fit in 'int32'"); + } + result[i] = int32(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `int16` array, checking for overflow/underflow. + function toInt16Array(Variable memory self) internal pure returns (int16[] memory) { + int256[] memory values = self.toInt256Array(); + int16[] memory result = new int16[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(int16).max || values[i] < type(int16).min) { + revert UnsafeCast("value in array does not fit in 'int16'"); + } + result[i] = int16(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `int8` array, checking for overflow/underflow. + function toInt8Array(Variable memory self) internal pure returns (int8[] memory) { + int256[] memory values = self.toInt256Array(); + int8[] memory result = new int8[](values.length); + for (uint256 i = 0; i < values.length; i++) { + if (values[i] > type(int8).max || values[i] < type(int8).min) { + revert UnsafeCast("value in array does not fit in 'int8'"); + } + result[i] = int8(values[i]); + } + return result; + } + + /// @notice Coerces a `Variable` to a `string` array. + function toStringArray(Variable memory self) + internal + pure + check(self, Type(TypeKind.String, true)) + returns (string[] memory) + { + return abi.decode(self.data, (string[])); + } + + /// @notice Coerces a `Variable` to a `bytes` array. + function toBytesArray(Variable memory self) + internal + pure + check(self, Type(TypeKind.Bytes, true)) + returns (bytes[] memory) + { + return abi.decode(self.data, (bytes[])); + } +} diff --git a/dependencies/forge-std-1.16.1/src/Script.sol b/dependencies/forge-std-1.16.1/src/Script.sol new file mode 100644 index 00000000..d43fa8a7 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/Script.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +// 💬 ABOUT +// Forge Std's default Script. + +// 🧩 MODULES +import {console} from "./console.sol"; +import {console2} from "./console2.sol"; +import {safeconsole} from "./safeconsole.sol"; +import {StdChains} from "./StdChains.sol"; +import {StdCheatsSafe} from "./StdCheats.sol"; +import {StdConstants} from "./StdConstants.sol"; +import {stdJson} from "./StdJson.sol"; +import {stdMath} from "./StdMath.sol"; +import {StdStorage, stdStorageSafe} from "./StdStorage.sol"; +import {StdStyle} from "./StdStyle.sol"; +import {StdUtils} from "./StdUtils.sol"; +import {VmSafe} from "./Vm.sol"; + +// 📦 BOILERPLATE +import {ScriptBase} from "./Base.sol"; + +// ⭐️ SCRIPT +abstract contract Script is ScriptBase, StdChains, StdCheatsSafe, StdUtils { + // Note: IS_SCRIPT() must return true. + bool public IS_SCRIPT = true; +} diff --git a/dependencies/forge-std-1.16.1/src/StdAssertions.sol b/dependencies/forge-std-1.16.1/src/StdAssertions.sol new file mode 100644 index 00000000..a3ffc3e1 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdAssertions.sol @@ -0,0 +1,1300 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Vm} from "./Vm.sol"; + +/// @notice Abstract contract providing assertion utilities for Forge tests. +abstract contract StdAssertions { + Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); + + event log(string); + event logs(bytes); + + event log_address(address); + event log_bytes32(bytes32); + event log_int(int256); + event log_uint(uint256); + event log_bytes(bytes); + event log_string(string); + + event log_named_address(string key, address val); + event log_named_bytes32(string key, bytes32 val); + event log_named_decimal_int(string key, int256 val, uint256 decimals); + event log_named_decimal_uint(string key, uint256 val, uint256 decimals); + event log_named_int(string key, int256 val); + event log_named_uint(string key, uint256 val); + event log_named_bytes(string key, bytes val); + event log_named_string(string key, string val); + + event log_array(uint256[] val); + event log_array(int256[] val); + event log_array(address[] val); + event log_named_array(string key, uint256[] val); + event log_named_array(string key, int256[] val); + event log_named_array(string key, address[] val); + + bytes32 private constant FAILED_SLOT = bytes32("failed"); + + bool private _failed; + + /// @notice Returns true if any test assertion has failed. + /// @return True if any assertion has failed, false otherwise. + function failed() public view returns (bool) { + if (_failed) { + return true; + } else { + return vm.load(address(vm), FAILED_SLOT) != bytes32(0); + } + } + + /// @notice Marks the test as failed and records the failure in storage. + function fail() internal virtual { + vm.store(address(vm), FAILED_SLOT, bytes32(uint256(1))); + _failed = true; + } + + /// @notice Marks the test as failed with a custom message. + /// @param message The failure message to display. + function fail(string memory message) internal virtual { + fail(); + vm.assertTrue(false, message); + } + + /// @notice Asserts that `data` is true. + /// @param data The boolean value to assert. + function assertTrue(bool data) internal pure virtual { + if (!data) { + vm.assertTrue(data); + } + } + + /// @notice Asserts that `data` is true with a custom error message. + /// @param data The boolean value to assert. + /// @param err The error message on failure. + function assertTrue(bool data, string memory err) internal pure virtual { + if (!data) { + vm.assertTrue(data, err); + } + } + + /// @notice Asserts that `data` is false. + /// @param data The boolean value to assert. + function assertFalse(bool data) internal pure virtual { + if (data) { + vm.assertFalse(data); + } + } + + /// @notice Asserts that `data` is false with a custom error message. + /// @param data The boolean value to assert. + /// @param err The error message on failure. + function assertFalse(bool data, string memory err) internal pure virtual { + if (data) { + vm.assertFalse(data, err); + } + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(bool left, bool right) internal pure virtual { + if (left != right) { + vm.assertEq(left, right); + } + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(bool left, bool right, string memory err) internal pure virtual { + if (left != right) { + vm.assertEq(left, right, err); + } + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(uint256 left, uint256 right) internal pure virtual { + if (left != right) { + vm.assertEq(left, right); + } + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(uint256 left, uint256 right, string memory err) internal pure virtual { + if (left != right) { + vm.assertEq(left, right, err); + } + } + + /// @notice Asserts that `left` is equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { + vm.assertEqDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertEqDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(int256 left, int256 right) internal pure virtual { + if (left != right) { + vm.assertEq(left, right); + } + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(int256 left, int256 right, string memory err) internal pure virtual { + if (left != right) { + vm.assertEq(left, right, err); + } + } + + /// @notice Asserts that `left` is equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { + vm.assertEqDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertEqDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(address left, address right) internal pure virtual { + if (left != right) { + vm.assertEq(left, right); + } + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(address left, address right, string memory err) internal pure virtual { + if (left != right) { + vm.assertEq(left, right, err); + } + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(bytes32 left, bytes32 right) internal pure virtual { + if (left != right) { + vm.assertEq(left, right); + } + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(bytes32 left, bytes32 right, string memory err) internal pure virtual { + if (left != right) { + vm.assertEq(left, right, err); + } + } + + /// @notice Asserts that `left` is equal to `right` (legacy bytes32 variant). + /// @dev Alias for assertEq(bytes32,bytes32) kept for backwards-compatibility. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq32(bytes32 left, bytes32 right) internal pure virtual { + if (left != right) { + vm.assertEq(left, right); + } + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message (legacy bytes32 variant). + /// @dev Alias for assertEq(bytes32,bytes32,string) kept for backwards-compatibility. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual { + if (left != right) { + vm.assertEq(left, right, err); + } + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(string memory left, string memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(string memory left, string memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(bytes memory left, bytes memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(bytes memory left, bytes memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(bool[] memory left, bool[] memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(uint256[] memory left, uint256[] memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(int256[] memory left, int256[] memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(address[] memory left, address[] memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(address[] memory left, address[] memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(string[] memory left, string[] memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(string[] memory left, string[] memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + /// @notice Asserts that `left` is equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEq(bytes[] memory left, bytes[] memory right) internal pure virtual { + vm.assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual { + vm.assertEq(left, right, err); + } + + // Legacy helper + /// @notice Asserts that `left` is equal to `right` (legacy uint256 variant). + /// @dev Legacy helper kept for backwards-compatibility. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertEqUint(uint256 left, uint256 right) internal pure virtual { + assertEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(bool left, bool right) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right); + } + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(bool left, bool right, string memory err) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right, err); + } + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(uint256 left, uint256 right) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right); + } + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(uint256 left, uint256 right, string memory err) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right, err); + } + } + + /// @notice Asserts that `left` is not equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { + vm.assertNotEqDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is not equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) + internal + pure + virtual + { + vm.assertNotEqDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(int256 left, int256 right) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right); + } + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(int256 left, int256 right, string memory err) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right, err); + } + } + + /// @notice Asserts that `left` is not equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { + vm.assertNotEqDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is not equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertNotEqDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(address left, address right) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right); + } + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(address left, address right, string memory err) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right, err); + } + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(bytes32 left, bytes32 right) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right); + } + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(bytes32 left, bytes32 right, string memory err) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right, err); + } + } + + /// @notice Asserts that `left` is not equal to `right` (legacy bytes32 variant). + /// @dev Alias for assertNotEq(bytes32,bytes32) kept for backwards-compatibility. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq32(bytes32 left, bytes32 right) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right); + } + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message (legacy bytes32 variant). + /// @dev Alias for assertNotEq(bytes32,bytes32,string) kept for backwards-compatibility. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual { + if (left == right) { + vm.assertNotEq(left, right, err); + } + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(string memory left, string memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(string memory left, string memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(bytes memory left, bytes memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(bytes memory left, bytes memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(bool[] memory left, bool[] memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(uint256[] memory left, uint256[] memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(int256[] memory left, int256[] memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(address[] memory left, address[] memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(address[] memory left, address[] memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(string[] memory left, string[] memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(string[] memory left, string[] memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertNotEq(bytes[] memory left, bytes[] memory right) internal pure virtual { + vm.assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertNotEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual { + vm.assertNotEq(left, right, err); + } + + /// @notice Asserts that `left` is strictly less than `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertLt(uint256 left, uint256 right) internal pure virtual { + if (left >= right) { + vm.assertLt(left, right); + } + } + + /// @notice Asserts that `left` is strictly less than `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertLt(uint256 left, uint256 right, string memory err) internal pure virtual { + if (left >= right) { + vm.assertLt(left, right, err); + } + } + + /// @notice Asserts that `left` is strictly less than `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { + vm.assertLtDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is strictly less than `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertLtDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is strictly less than `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertLt(int256 left, int256 right) internal pure virtual { + if (left >= right) { + vm.assertLt(left, right); + } + } + + /// @notice Asserts that `left` is strictly less than `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertLt(int256 left, int256 right, string memory err) internal pure virtual { + if (left >= right) { + vm.assertLt(left, right, err); + } + } + + /// @notice Asserts that `left` is strictly less than `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertLtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { + vm.assertLtDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is strictly less than `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertLtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertLtDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is strictly greater than `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertGt(uint256 left, uint256 right) internal pure virtual { + if (left <= right) { + vm.assertGt(left, right); + } + } + + /// @notice Asserts that `left` is strictly greater than `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertGt(uint256 left, uint256 right, string memory err) internal pure virtual { + if (left <= right) { + vm.assertGt(left, right, err); + } + } + + /// @notice Asserts that `left` is strictly greater than `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { + vm.assertGtDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is strictly greater than `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertGtDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is strictly greater than `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertGt(int256 left, int256 right) internal pure virtual { + if (left <= right) { + vm.assertGt(left, right); + } + } + + /// @notice Asserts that `left` is strictly greater than `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertGt(int256 left, int256 right, string memory err) internal pure virtual { + if (left <= right) { + vm.assertGt(left, right, err); + } + } + + /// @notice Asserts that `left` is strictly greater than `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertGtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { + vm.assertGtDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is strictly greater than `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertGtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertGtDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is less than or equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertLe(uint256 left, uint256 right) internal pure virtual { + if (left > right) { + vm.assertLe(left, right); + } + } + + /// @notice Asserts that `left` is less than or equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertLe(uint256 left, uint256 right, string memory err) internal pure virtual { + if (left > right) { + vm.assertLe(left, right, err); + } + } + + /// @notice Asserts that `left` is less than or equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { + vm.assertLeDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is less than or equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertLeDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is less than or equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertLe(int256 left, int256 right) internal pure virtual { + if (left > right) { + vm.assertLe(left, right); + } + } + + /// @notice Asserts that `left` is less than or equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertLe(int256 left, int256 right, string memory err) internal pure virtual { + if (left > right) { + vm.assertLe(left, right, err); + } + } + + /// @notice Asserts that `left` is less than or equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertLeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { + vm.assertLeDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is less than or equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertLeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertLeDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is greater than or equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertGe(uint256 left, uint256 right) internal pure virtual { + if (left < right) { + vm.assertGe(left, right); + } + } + + /// @notice Asserts that `left` is greater than or equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertGe(uint256 left, uint256 right, string memory err) internal pure virtual { + if (left < right) { + vm.assertGe(left, right, err); + } + } + + /// @notice Asserts that `left` is greater than or equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { + vm.assertGeDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is greater than or equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertGeDecimal(left, right, decimals, err); + } + + /// @notice Asserts that `left` is greater than or equal to `right`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + function assertGe(int256 left, int256 right) internal pure virtual { + if (left < right) { + vm.assertGe(left, right); + } + } + + /// @notice Asserts that `left` is greater than or equal to `right` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param err The error message on failure. + function assertGe(int256 left, int256 right, string memory err) internal pure virtual { + if (left < right) { + vm.assertGe(left, right, err); + } + } + + /// @notice Asserts that `left` is greater than or equal to `right`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + function assertGeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { + vm.assertGeDecimal(left, right, decimals); + } + + /// @notice Asserts that `left` is greater than or equal to `right`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertGeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { + vm.assertGeDecimal(left, right, decimals, err); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) internal pure virtual { + vm.assertApproxEqAbs(left, right, maxDelta); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + /// @param err The error message on failure. + function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string memory err) internal pure virtual { + vm.assertApproxEqAbs(left, right, maxDelta, err); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + /// @param decimals The number of decimals for formatting. + function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) + internal + pure + virtual + { + vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertApproxEqAbsDecimal( + uint256 left, + uint256 right, + uint256 maxDelta, + uint256 decimals, + string memory err + ) internal pure virtual { + vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) internal pure virtual { + vm.assertApproxEqAbs(left, right, maxDelta); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + /// @param err The error message on failure. + function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string memory err) internal pure virtual { + vm.assertApproxEqAbs(left, right, maxDelta, err); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + /// @param decimals The number of decimals for formatting. + function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) + internal + pure + virtual + { + vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); + } + + /// @notice Asserts that the absolute difference between `left` and `right` is at most `maxDelta`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxDelta The maximum absolute difference allowed. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals, string memory err) + internal + pure + virtual + { + vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + function assertApproxEqRel( + uint256 left, + uint256 right, + uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100% + ) + internal + pure + virtual + { + vm.assertApproxEqRel(left, right, maxPercentDelta); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + /// @param err The error message on failure. + function assertApproxEqRel( + uint256 left, + uint256 right, + uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% + string memory err + ) + internal + pure + virtual + { + vm.assertApproxEqRel(left, right, maxPercentDelta, err); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + /// @param decimals The number of decimals for formatting. + function assertApproxEqRelDecimal( + uint256 left, + uint256 right, + uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% + uint256 decimals + ) + internal + pure + virtual + { + vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertApproxEqRelDecimal( + uint256 left, + uint256 right, + uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% + uint256 decimals, + string memory err + ) internal pure virtual { + vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta`. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) internal pure virtual { + vm.assertApproxEqRel(left, right, maxPercentDelta); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta` with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + /// @param err The error message on failure. + function assertApproxEqRel( + int256 left, + int256 right, + uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% + string memory err + ) + internal + pure + virtual + { + vm.assertApproxEqRel(left, right, maxPercentDelta, err); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta`, formatting values with `decimals` decimal places on failure. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + /// @param decimals The number of decimals for formatting. + function assertApproxEqRelDecimal( + int256 left, + int256 right, + uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% + uint256 decimals + ) + internal + pure + virtual + { + vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); + } + + /// @notice Asserts that the relative difference between `left` and `right` is at most `maxPercentDelta`, formatting values with `decimals` decimal places on failure, with a custom error message. + /// @param left The left-hand side value. + /// @param right The right-hand side value. + /// @param maxPercentDelta The maximum relative delta allowed, as an 18 decimal fixed point number where 1e18 == 100%. + /// @param decimals The number of decimals for formatting. + /// @param err The error message on failure. + function assertApproxEqRelDecimal( + int256 left, + int256 right, + uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% + uint256 decimals, + string memory err + ) internal pure virtual { + vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); + } + + // Inherited from DSTest, not used but kept for backwards-compatibility + /// @notice Returns true if `left` and `right` have equal content. + /// @dev Inherited from DSTest, kept for backwards-compatibility. + /// @param left The left-hand side bytes. + /// @param right The right-hand side bytes. + /// @return True if the byte content is equal, false otherwise. + function checkEq0(bytes memory left, bytes memory right) internal pure returns (bool) { + return keccak256(left) == keccak256(right); + } + + /// @notice Asserts that `left` is equal to `right` (legacy bytes variant). + /// @dev Alias for assertEq(bytes,bytes) kept for backwards-compatibility. + /// @param left The left-hand side bytes. + /// @param right The right-hand side bytes. + function assertEq0(bytes memory left, bytes memory right) internal pure virtual { + assertEq(left, right); + } + + /// @notice Asserts that `left` is equal to `right` with a custom error message (legacy bytes variant). + /// @dev Alias for assertEq(bytes,bytes,string) kept for backwards-compatibility. + /// @param left The left-hand side bytes. + /// @param right The right-hand side bytes. + /// @param err The error message on failure. + function assertEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual { + assertEq(left, right, err); + } + + /// @notice Asserts that `left` is not equal to `right` (legacy bytes variant). + /// @dev Alias for assertNotEq(bytes,bytes) kept for backwards-compatibility. + /// @param left The left-hand side bytes. + /// @param right The right-hand side bytes. + function assertNotEq0(bytes memory left, bytes memory right) internal pure virtual { + assertNotEq(left, right); + } + + /// @notice Asserts that `left` is not equal to `right` with a custom error message (legacy bytes variant). + /// @dev Alias for assertNotEq(bytes,bytes,string) kept for backwards-compatibility. + /// @param left The left-hand side bytes. + /// @param right The right-hand side bytes. + /// @param err The error message on failure. + function assertNotEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual { + assertNotEq(left, right, err); + } + + /// @notice Asserts that two calls to the same target with different calldata produce equal return or revert data. + /// @param target The contract address to call. + /// @param callDataA The calldata for the first call. + /// @param callDataB The calldata for the second call. + function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual { + assertEqCall(target, callDataA, target, callDataB, true); + } + + /// @notice Asserts that calls to two different targets produce equal return or revert data. + /// @param targetA The first contract address. + /// @param callDataA The calldata for the first call. + /// @param targetB The second contract address. + /// @param callDataB The calldata for the second call. + function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB) + internal + virtual + { + assertEqCall(targetA, callDataA, targetB, callDataB, true); + } + + /// @notice Asserts that two calls to the same target with different calldata produce equal return or revert data. + /// @param target The contract address to call. + /// @param callDataA The calldata for the first call. + /// @param callDataB The calldata for the second call. + /// @param strictRevertData If true, also asserts that revert data matches when both calls revert. + function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData) + internal + virtual + { + assertEqCall(target, callDataA, target, callDataB, strictRevertData); + } + + /// @notice Asserts that calls to two targets produce equal return or revert data. + /// @param targetA The first contract address. + /// @param callDataA The calldata for the first call. + /// @param targetB The second contract address. + /// @param callDataB The calldata for the second call. + /// @param strictRevertData If true, also asserts that revert data matches when both calls revert. + function assertEqCall( + address targetA, + bytes memory callDataA, + address targetB, + bytes memory callDataB, + bool strictRevertData + ) internal virtual { + (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA); + (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB); + + if (successA && successB) { + assertEq(returnDataA, returnDataB, "Call return data does not match"); + } + + if (!successA && !successB && strictRevertData) { + assertEq(returnDataA, returnDataB, "Call revert data does not match"); + } + + if (!successA && successB) { + emit log("Error: Calls were not equal"); + emit log_named_bytes(" Left call revert data", returnDataA); + emit log_named_bytes(" Right call return data", returnDataB); + revert("assertion failed"); + } + + if (successA && !successB) { + emit log("Error: Calls were not equal"); + emit log_named_bytes(" Left call return data", returnDataA); + emit log_named_bytes(" Right call revert data", returnDataB); + revert("assertion failed"); + } + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdChains.sol b/dependencies/forge-std-1.16.1/src/StdChains.sol new file mode 100644 index 00000000..b77933e8 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdChains.sol @@ -0,0 +1,310 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {VmSafe} from "./Vm.sol"; + +/** + * StdChains provides information about EVM compatible chains that can be used in scripts/tests. + * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are + * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of + * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file matches the + * alias used in this contract, which can be found as the first argument to the + * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function. + * + * There are two main ways to use this contract: + * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or + * `setChain(string memory chainAlias, Chain memory chain)` + * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`. + * + * The first time either of those are used, chains are initialized with the default set of RPC URLs. + * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in + * `defaultRpcUrls`. + * + * The `setChain` function is straightforward, and it simply saves off the given chain data. + * + * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say + * we want to retrieve the RPC URL for `mainnet`: + * - If you have specified data with `setChain`, it will return that. + * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it + * is valid (e.g. a URL is specified, or an environment variable is given and exists). + * - If neither of the above conditions is met, the default data is returned. + * + * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults. + */ +abstract contract StdChains { + VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); + + bool private stdChainsInitialized; + + struct ChainData { + string name; + uint256 chainId; + string rpcUrl; + } + + struct Chain { + // The chain name. + string name; + // The chain's Chain ID. + uint256 chainId; + // The chain's alias. (i.e. what gets specified in `foundry.toml`). + string chainAlias; + // A default RPC endpoint for this chain. + // NOTE: This default RPC URL is included for convenience to facilitate quick tests and + // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy + // usage as you will be throttled and this is a disservice to others who need this endpoint. + string rpcUrl; + } + + // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data. + mapping(string => Chain) private chains; + // Maps from the chain's alias to its default RPC URL. + mapping(string => string) private defaultRpcUrls; + // Maps from a chain ID to its alias. + mapping(uint256 => string) private idToAlias; + + bool private fallbackToDefaultRpcUrls = true; + + // The RPC URL will be fetched from config or defaultRpcUrls if possible. + function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) { + require(bytes(chainAlias).length != 0, "StdChains getChain(string): Chain alias cannot be the empty string."); + + initializeStdChains(); + chain = chains[chainAlias]; + require( + chain.chainId != 0, + string(abi.encodePacked("StdChains getChain(string): Chain with alias \"", chainAlias, "\" not found.")) + ); + + chain = getChainWithUpdatedRpcUrl(chainAlias, chain); + } + + function getChain(uint256 chainId) internal virtual returns (Chain memory chain) { + require(chainId != 0, "StdChains getChain(uint256): Chain ID cannot be 0."); + initializeStdChains(); + string memory chainAlias = idToAlias[chainId]; + + chain = chains[chainAlias]; + + require( + chain.chainId != 0, + string(abi.encodePacked("StdChains getChain(uint256): Chain with ID ", vm.toString(chainId), " not found.")) + ); + + chain = getChainWithUpdatedRpcUrl(chainAlias, chain); + } + + // set chain info, with priority to argument's rpcUrl field. + function setChain(string memory chainAlias, ChainData memory chain) internal virtual { + require( + bytes(chainAlias).length != 0, + "StdChains setChain(string,ChainData): Chain alias cannot be the empty string." + ); + + require(chain.chainId != 0, "StdChains setChain(string,ChainData): Chain ID cannot be 0."); + + initializeStdChains(); + string memory foundAlias = idToAlias[chain.chainId]; + + require( + bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)), + string( + abi.encodePacked( + "StdChains setChain(string,ChainData): Chain ID ", + vm.toString(chain.chainId), + " already used by \"", + foundAlias, + "\"." + ) + ) + ); + + uint256 oldChainId = chains[chainAlias].chainId; + delete idToAlias[oldChainId]; + + chains[chainAlias] = + Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl}); + idToAlias[chain.chainId] = chainAlias; + } + + // set chain info, with priority to argument's rpcUrl field. + function setChain(string memory chainAlias, Chain memory chain) internal virtual { + setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl})); + } + + function _toUpper(string memory str) private pure returns (string memory) { + bytes memory strb = bytes(str); + bytes memory copy = new bytes(strb.length); + for (uint256 i = 0; i < strb.length; i++) { + bytes1 b = strb[i]; + if (b >= 0x61 && b <= 0x7A) { + copy[i] = bytes1(uint8(b) - 32); + } else { + copy[i] = b; + } + } + return string(copy); + } + + // lookup rpcUrl, in descending order of priority: + // current -> config (foundry.toml) -> environment variable -> default + function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) + private + view + returns (Chain memory) + { + if (bytes(chain.rpcUrl).length == 0) { + try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) { + chain.rpcUrl = configRpcUrl; + } catch (bytes memory err) { + string memory envName = string(abi.encodePacked(_toUpper(chainAlias), "_RPC_URL")); + if (fallbackToDefaultRpcUrls) { + chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]); + } else { + chain.rpcUrl = vm.envString(envName); + } + // Distinguish 'not found' from 'cannot read' + // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions + bytes memory oldNotFoundError = + abi.encodeWithSignature("CheatCodeError", string(abi.encodePacked("invalid rpc url ", chainAlias))); + bytes memory newNotFoundError = abi.encodeWithSignature( + "CheatcodeError(string)", string(abi.encodePacked("invalid rpc url: ", chainAlias)) + ); + bytes32 errHash = keccak256(err); + if ( + (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError)) + || bytes(chain.rpcUrl).length == 0 + ) { + assembly ("memory-safe") { + revert(add(32, err), mload(err)) + } + } + } + } + return chain; + } + + function setFallbackToDefaultRpcUrls(bool useDefault) internal { + fallbackToDefaultRpcUrls = useDefault; + } + + function initializeStdChains() private { + if (stdChainsInitialized) return; + + stdChainsInitialized = true; + + // If adding an RPC here, make sure to test the default RPC URL in `test_Rpcs` in `StdChains.t.sol` + setChainWithDefaultRpcUrl("anvil", ChainData("Anvil", 31337, "http://127.0.0.1:8545")); + setChainWithDefaultRpcUrl("mainnet", ChainData("Mainnet", 1, "https://eth.llamarpc.com")); + setChainWithDefaultRpcUrl( + "sepolia", ChainData("Sepolia", 11155111, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001") + ); + setChainWithDefaultRpcUrl("holesky", ChainData("Holesky", 17000, "https://rpc.holesky.ethpandaops.io")); + setChainWithDefaultRpcUrl("hoodi", ChainData("Hoodi", 560048, "https://rpc.hoodi.ethpandaops.io")); + setChainWithDefaultRpcUrl("optimism", ChainData("Optimism", 10, "https://mainnet.optimism.io")); + setChainWithDefaultRpcUrl( + "optimism_sepolia", ChainData("Optimism Sepolia", 11155420, "https://sepolia.optimism.io") + ); + setChainWithDefaultRpcUrl("arbitrum_one", ChainData("Arbitrum One", 42161, "https://arb1.arbitrum.io/rpc")); + setChainWithDefaultRpcUrl( + "arbitrum_one_sepolia", ChainData("Arbitrum One Sepolia", 421614, "https://sepolia-rollup.arbitrum.io/rpc") + ); + setChainWithDefaultRpcUrl("arbitrum_nova", ChainData("Arbitrum Nova", 42170, "https://nova.arbitrum.io/rpc")); + setChainWithDefaultRpcUrl("polygon", ChainData("Polygon", 137, "https://polygon-rpc.com")); + setChainWithDefaultRpcUrl( + "polygon_amoy", ChainData("Polygon Amoy", 80002, "https://rpc-amoy.polygon.technology") + ); + setChainWithDefaultRpcUrl("avalanche", ChainData("Avalanche", 43114, "https://api.avax.network/ext/bc/C/rpc")); + setChainWithDefaultRpcUrl( + "avalanche_fuji", ChainData("Avalanche Fuji", 43113, "https://api.avax-test.network/ext/bc/C/rpc") + ); + setChainWithDefaultRpcUrl( + "bnb_smart_chain", ChainData("BNB Smart Chain", 56, "https://bsc-dataseed1.binance.org") + ); + setChainWithDefaultRpcUrl( + "bnb_smart_chain_testnet", + ChainData("BNB Smart Chain Testnet", 97, "https://rpc.ankr.com/bsc_testnet_chapel") + ); + setChainWithDefaultRpcUrl("gnosis_chain", ChainData("Gnosis Chain", 100, "https://rpc.gnosischain.com")); + setChainWithDefaultRpcUrl("moonbeam", ChainData("Moonbeam", 1284, "https://rpc.api.moonbeam.network")); + setChainWithDefaultRpcUrl( + "moonriver", ChainData("Moonriver", 1285, "https://rpc.api.moonriver.moonbeam.network") + ); + setChainWithDefaultRpcUrl("moonbase", ChainData("Moonbase", 1287, "https://rpc.testnet.moonbeam.network")); + setChainWithDefaultRpcUrl("base_sepolia", ChainData("Base Sepolia", 84532, "https://sepolia.base.org")); + setChainWithDefaultRpcUrl("base", ChainData("Base", 8453, "https://mainnet.base.org")); + setChainWithDefaultRpcUrl("blast_sepolia", ChainData("Blast Sepolia", 168587773, "https://sepolia.blast.io")); + setChainWithDefaultRpcUrl("blast", ChainData("Blast", 81457, "https://rpc.blast.io")); + setChainWithDefaultRpcUrl("fantom_opera", ChainData("Fantom Opera", 250, "https://rpc.ankr.com/fantom/")); + setChainWithDefaultRpcUrl( + "fantom_opera_testnet", ChainData("Fantom Opera Testnet", 4002, "https://rpc.ankr.com/fantom_testnet/") + ); + setChainWithDefaultRpcUrl("fraxtal", ChainData("Fraxtal", 252, "https://rpc.frax.com")); + setChainWithDefaultRpcUrl("fraxtal_testnet", ChainData("Fraxtal Testnet", 2522, "https://rpc.testnet.frax.com")); + setChainWithDefaultRpcUrl( + "berachain_bartio_testnet", ChainData("Berachain bArtio Testnet", 80084, "https://bartio.rpc.berachain.com") + ); + setChainWithDefaultRpcUrl("flare", ChainData("Flare", 14, "https://flare-api.flare.network/ext/C/rpc")); + setChainWithDefaultRpcUrl( + "flare_coston2", ChainData("Flare Coston2", 114, "https://coston2-api.flare.network/ext/C/rpc") + ); + + setChainWithDefaultRpcUrl("ink", ChainData("Ink", 57073, "https://rpc-gel.inkonchain.com")); + setChainWithDefaultRpcUrl( + "ink_sepolia", ChainData("Ink Sepolia", 763373, "https://rpc-gel-sepolia.inkonchain.com") + ); + + setChainWithDefaultRpcUrl("mode", ChainData("Mode", 34443, "https://mode.drpc.org")); + setChainWithDefaultRpcUrl("mode_sepolia", ChainData("Mode Sepolia", 919, "https://sepolia.mode.network")); + + setChainWithDefaultRpcUrl("zora", ChainData("Zora", 7777777, "https://zora.drpc.org")); + setChainWithDefaultRpcUrl( + "zora_sepolia", ChainData("Zora Sepolia", 999999999, "https://sepolia.rpc.zora.energy") + ); + + setChainWithDefaultRpcUrl("race", ChainData("Race", 6805, "https://racemainnet.io")); + setChainWithDefaultRpcUrl("race_sepolia", ChainData("Race Sepolia", 6806, "https://racemainnet.io")); + + setChainWithDefaultRpcUrl("radius", ChainData("Radius", 723487, "https://rpc.radiustech.xyz")); + setChainWithDefaultRpcUrl( + "radius_testnet", ChainData("Radius Testnet", 72344, "https://rpc.testnet.radiustech.xyz") + ); + + setChainWithDefaultRpcUrl("metal", ChainData("Metal", 1750, "https://metall2.drpc.org")); + setChainWithDefaultRpcUrl("metal_sepolia", ChainData("Metal Sepolia", 1740, "https://testnet.rpc.metall2.com")); + + setChainWithDefaultRpcUrl("binary", ChainData("Binary", 624, "https://rpc.zero.thebinaryholdings.com")); + setChainWithDefaultRpcUrl( + "binary_sepolia", ChainData("Binary Sepolia", 625, "https://rpc.zero.thebinaryholdings.com") + ); + + setChainWithDefaultRpcUrl("orderly", ChainData("Orderly", 291, "https://rpc.orderly.network")); + setChainWithDefaultRpcUrl( + "orderly_sepolia", ChainData("Orderly Sepolia", 4460, "https://testnet-rpc.orderly.org") + ); + + setChainWithDefaultRpcUrl("unichain", ChainData("Unichain", 130, "https://mainnet.unichain.org")); + setChainWithDefaultRpcUrl( + "unichain_sepolia", ChainData("Unichain Sepolia", 1301, "https://sepolia.unichain.org") + ); + + setChainWithDefaultRpcUrl("tempo", ChainData("Tempo", 4217, "https://rpc.mainnet.tempo.xyz")); + setChainWithDefaultRpcUrl( + "tempo_moderato", ChainData("Tempo Moderato", 42431, "https://rpc.moderato.tempo.xyz") + ); + setChainWithDefaultRpcUrl( + "tempo_andantino", ChainData("Tempo Andantino", 42429, "https://rpc.testnet.tempo.xyz") + ); + + setChainWithDefaultRpcUrl("grav", ChainData("Gravity", 127001, "https://mainnet-rpc.gravity.xyz")); + } + + // set chain info, with priority to chainAlias' rpc url in foundry.toml + function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private { + string memory rpcUrl = chain.rpcUrl; + defaultRpcUrls[chainAlias] = rpcUrl; + chain.rpcUrl = ""; + setChain(chainAlias, chain); + chain.rpcUrl = rpcUrl; // restore argument + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdCheats.sol b/dependencies/forge-std-1.16.1/src/StdCheats.sol new file mode 100644 index 00000000..cfece45e --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdCheats.sol @@ -0,0 +1,877 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {StdStorage, stdStorage} from "./StdStorage.sol"; +import {console2} from "./console2.sol"; +import {Vm} from "./Vm.sol"; + +abstract contract StdCheatsSafe { + Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); + + uint256 private constant UINT256_MAX = + 115792089237316195423570985008687907853269984665640564039457584007913129639935; + + bool private gasMeteringOff; + + // Data structures to parse Transaction objects from the broadcast artifact + // that conform to EIP1559. The Raw structs are what are parsed from the JSON + // and then converted to the one that is used by the user for better UX. + + struct RawTx1559 { + string[] arguments; + address contractAddress; + string contractName; + // json value name = function + string functionSig; + bytes32 hash; + // json value name = tx + RawTx1559Detail txDetail; + // json value name = type + string opcode; + } + + struct RawTx1559Detail { + AccessList[] accessList; + bytes data; + address from; + bytes gas; + bytes nonce; + address to; + bytes txType; + bytes value; + } + + struct Tx1559 { + string[] arguments; + address contractAddress; + string contractName; + string functionSig; + bytes32 hash; + Tx1559Detail txDetail; + string opcode; + } + + struct Tx1559Detail { + AccessList[] accessList; + bytes data; + address from; + uint256 gas; + uint256 nonce; + address to; + uint256 txType; + uint256 value; + } + + // Data structures to parse Transaction objects from the broadcast artifact + // that DO NOT conform to EIP1559. The Raw structs are what are parsed from the JSON + // and then converted to the one that is used by the user for better UX. + + struct TxLegacy { + string[] arguments; + address contractAddress; + string contractName; + string functionSig; + string hash; + string opcode; + TxDetailLegacy transaction; + } + + struct TxDetailLegacy { + AccessList[] accessList; + uint256 chainId; + bytes data; + address from; + uint256 gas; + uint256 gasPrice; + bytes32 hash; + uint256 nonce; + bytes1 opcode; + bytes32 r; + bytes32 s; + uint256 txType; + address to; + uint8 v; + uint256 value; + } + + struct AccessList { + address accessAddress; + bytes32[] storageKeys; + } + + // Data structures to parse Receipt objects from the broadcast artifact. + // The Raw structs is what is parsed from the JSON + // and then converted to the one that is used by the user for better UX. + + struct RawReceipt { + bytes32 blockHash; + bytes blockNumber; + address contractAddress; + bytes cumulativeGasUsed; + bytes effectiveGasPrice; + address from; + bytes gasUsed; + RawReceiptLog[] logs; + bytes logsBloom; + bytes status; + address to; + bytes32 transactionHash; + bytes transactionIndex; + } + + struct Receipt { + bytes32 blockHash; + uint256 blockNumber; + address contractAddress; + uint256 cumulativeGasUsed; + uint256 effectiveGasPrice; + address from; + uint256 gasUsed; + ReceiptLog[] logs; + bytes logsBloom; + uint256 status; + address to; + bytes32 transactionHash; + uint256 transactionIndex; + } + + // Data structures to parse the entire broadcast artifact, assuming the + // transactions conform to EIP1559. + + struct EIP1559ScriptArtifact { + string[] libraries; + string path; + string[] pending; + Receipt[] receipts; + uint256 timestamp; + Tx1559[] transactions; + TxReturn[] txReturns; + } + + struct RawEIP1559ScriptArtifact { + string[] libraries; + string path; + string[] pending; + RawReceipt[] receipts; + TxReturn[] txReturns; + uint256 timestamp; + RawTx1559[] transactions; + } + + struct RawReceiptLog { + // json value = address + address logAddress; + bytes32 blockHash; + bytes blockNumber; + bytes data; + bytes logIndex; + bool removed; + bytes32[] topics; + bytes32 transactionHash; + bytes transactionIndex; + bytes transactionLogIndex; + } + + struct ReceiptLog { + // json value = address + address logAddress; + bytes32 blockHash; + uint256 blockNumber; + bytes data; + uint256 logIndex; + bytes32[] topics; + uint256 transactionIndex; + uint256 transactionLogIndex; + bool removed; + } + + struct TxReturn { + string internalType; + string value; + } + + struct Account { + address addr; + uint256 key; + } + + enum AddressType { + Payable, + NonPayable, + ZeroAddress, + Precompile, + ForgeAddress + } + + // Checks that `addr` is not blacklisted by token contracts that have a blacklist. + function assumeNotBlacklisted(address token, address addr) internal view virtual { + // Nothing to check if `token` is not a contract. + uint256 tokenCodeSize; + assembly { + tokenCodeSize := extcodesize(token) + } + require(tokenCodeSize > 0, "StdCheats assumeNotBlacklisted(address,address): Token address is not a contract."); + + bool success; + bytes memory returnData; + + // 4-byte selector for `isBlacklisted(address)`, used by USDC. + (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr)); + vm.assume(!success || abi.decode(returnData, (bool)) == false); + + // 4-byte selector for `isBlackListed(address)`, used by USDT. + (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr)); + vm.assume(!success || abi.decode(returnData, (bool)) == false); + } + + // Checks that `addr` is not blacklisted by token contracts that have a blacklist. + // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for + // backwards compatibility, since this name was used in the original PR which already has + // a release. This function can be removed in a future release once we want a breaking change. + function assumeNoBlacklisted(address token, address addr) internal view virtual { + assumeNotBlacklisted(token, addr); + } + + function assumeAddressIsNot(address addr, AddressType addressType) internal virtual { + if (addressType == AddressType.Payable) { + assumeNotPayable(addr); + } else if (addressType == AddressType.NonPayable) { + assumePayable(addr); + } else if (addressType == AddressType.ZeroAddress) { + assumeNotZeroAddress(addr); + } else if (addressType == AddressType.Precompile) { + assumeNotPrecompile(addr); + } else if (addressType == AddressType.ForgeAddress) { + assumeNotForgeAddress(addr); + } + } + + function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual { + assumeAddressIsNot(addr, addressType1); + assumeAddressIsNot(addr, addressType2); + } + + function assumeAddressIsNot( + address addr, + AddressType addressType1, + AddressType addressType2, + AddressType addressType3 + ) internal virtual { + assumeAddressIsNot(addr, addressType1); + assumeAddressIsNot(addr, addressType2); + assumeAddressIsNot(addr, addressType3); + } + + function assumeAddressIsNot( + address addr, + AddressType addressType1, + AddressType addressType2, + AddressType addressType3, + AddressType addressType4 + ) internal virtual { + assumeAddressIsNot(addr, addressType1); + assumeAddressIsNot(addr, addressType2); + assumeAddressIsNot(addr, addressType3); + assumeAddressIsNot(addr, addressType4); + } + + // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to + // `addr` and checking the `success` return value. + // NOTE: This function may result in state changes depending on the fallback/receive logic + // implemented by `addr`, which should be taken into account when this function is used. + function _isPayable(address addr) private returns (bool) { + require( + addr.balance < UINT256_MAX, + "StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds" + ); + uint256 origBalanceTest = address(this).balance; + uint256 origBalanceAddr = address(addr).balance; + + vm.deal(address(this), 1); + (bool success,) = payable(addr).call{value: 1}(""); + + // reset balances + vm.deal(address(this), origBalanceTest); + vm.deal(addr, origBalanceAddr); + + return success; + } + + // NOTE: This function may result in state changes depending on the fallback/receive logic + // implemented by `addr`, which should be taken into account when this function is used. See the + // `_isPayable` method for more information. + function assumePayable(address addr) internal virtual { + vm.assume(_isPayable(addr)); + } + + function assumeNotPayable(address addr) internal virtual { + vm.assume(!_isPayable(addr)); + } + + function assumeNotZeroAddress(address addr) internal pure virtual { + vm.assume(addr != address(0)); + } + + function assumeNotPrecompile(address addr) internal pure virtual { + assumeNotPrecompile(addr, _pureChainId()); + } + + function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual { + // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific + // address), but the same rationale for excluding them applies so we include those too. + + // These are reserved by Ethereum and may be on all EVM-compatible chains. + vm.assume(addr < address(0x1) || addr > address(0xff)); + + // forgefmt: disable-start + if (chainId == 10 || chainId == 420 || chainId == 11155420) { + // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21 + vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800)); + } else if (chainId == 42161 || chainId == 421613) { + // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains + vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068)); + } else if (chainId == 43114 || chainId == 43113) { + // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59 + vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff)); + vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF)); + vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff)); + } + // forgefmt: disable-end + } + + function assumeNotForgeAddress(address addr) internal pure virtual { + // vm, console, and Create2Deployer addresses + vm.assume( + addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67 + && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C + ); + } + + function assumeUnusedAddress(address addr) internal view virtual { + uint256 size; + assembly { + size := extcodesize(addr) + } + vm.assume(size == 0); + + assumeNotPrecompile(addr); + assumeNotZeroAddress(addr); + assumeNotForgeAddress(addr); + } + + function readEIP1559ScriptArtifact(string memory path) + internal + view + virtual + returns (EIP1559ScriptArtifact memory) + { + string memory data = vm.readFile(path); + bytes memory parsedData = vm.parseJson(data); + RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact)); + EIP1559ScriptArtifact memory artifact; + artifact.libraries = rawArtifact.libraries; + artifact.path = rawArtifact.path; + artifact.timestamp = rawArtifact.timestamp; + artifact.pending = rawArtifact.pending; + artifact.txReturns = rawArtifact.txReturns; + artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts); + artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions); + return artifact; + } + + function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) { + Tx1559[] memory txs = new Tx1559[](rawTxs.length); + for (uint256 i; i < rawTxs.length; i++) { + txs[i] = rawToConvertedEIPTx1559(rawTxs[i]); + } + return txs; + } + + function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) { + Tx1559 memory transaction; + transaction.arguments = rawTx.arguments; + transaction.contractAddress = rawTx.contractAddress; + transaction.contractName = rawTx.contractName; + transaction.functionSig = rawTx.functionSig; + transaction.hash = rawTx.hash; + transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail); + transaction.opcode = rawTx.opcode; + return transaction; + } + + function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail) + internal + pure + virtual + returns (Tx1559Detail memory) + { + Tx1559Detail memory txDetail; + txDetail.data = rawDetail.data; + txDetail.from = rawDetail.from; + txDetail.to = rawDetail.to; + txDetail.nonce = _bytesToUint(rawDetail.nonce); + txDetail.txType = _bytesToUint(rawDetail.txType); + txDetail.value = _bytesToUint(rawDetail.value); + txDetail.gas = _bytesToUint(rawDetail.gas); + txDetail.accessList = rawDetail.accessList; + return txDetail; + } + + function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) { + string memory deployData = vm.readFile(path); + bytes memory parsedDeployData = vm.parseJson(deployData, ".transactions"); + RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[])); + return rawToConvertedEIPTx1559s(rawTxs); + } + + function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) { + string memory deployData = vm.readFile(path); + string memory key = string(abi.encodePacked(".transactions[", vm.toString(index), "]")); + bytes memory parsedDeployData = vm.parseJson(deployData, key); + RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559)); + return rawToConvertedEIPTx1559(rawTx); + } + + // Analogous to readTransactions, but for receipts. + function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) { + string memory deployData = vm.readFile(path); + bytes memory parsedDeployData = vm.parseJson(deployData, ".receipts"); + RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[])); + return rawToConvertedReceipts(rawReceipts); + } + + function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) { + string memory deployData = vm.readFile(path); + string memory key = string(abi.encodePacked(".receipts[", vm.toString(index), "]")); + bytes memory parsedDeployData = vm.parseJson(deployData, key); + RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt)); + return rawToConvertedReceipt(rawReceipt); + } + + function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) { + Receipt[] memory receipts = new Receipt[](rawReceipts.length); + for (uint256 i; i < rawReceipts.length; i++) { + receipts[i] = rawToConvertedReceipt(rawReceipts[i]); + } + return receipts; + } + + function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) { + Receipt memory receipt; + receipt.blockHash = rawReceipt.blockHash; + receipt.to = rawReceipt.to; + receipt.from = rawReceipt.from; + receipt.contractAddress = rawReceipt.contractAddress; + receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice); + receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed); + receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed); + receipt.status = _bytesToUint(rawReceipt.status); + receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex); + receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber); + receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs); + receipt.logsBloom = rawReceipt.logsBloom; + receipt.transactionHash = rawReceipt.transactionHash; + return receipt; + } + + function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs) + internal + pure + virtual + returns (ReceiptLog[] memory) + { + ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length); + for (uint256 i; i < rawLogs.length; i++) { + logs[i].logAddress = rawLogs[i].logAddress; + logs[i].blockHash = rawLogs[i].blockHash; + logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber); + logs[i].data = rawLogs[i].data; + logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex); + logs[i].topics = rawLogs[i].topics; + logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex); + logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex); + logs[i].removed = rawLogs[i].removed; + } + return logs; + } + + // Deploy a contract by fetching the contract bytecode from + // the artifacts directory + // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))` + function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) { + bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); + assembly ("memory-safe") { + addr := create(0, add(bytecode, 0x20), mload(bytecode)) + } + + require(addr != address(0), "StdCheats deployCode(string,bytes): Deployment failed."); + } + + function deployCode(string memory what) internal virtual returns (address addr) { + bytes memory bytecode = vm.getCode(what); + assembly ("memory-safe") { + addr := create(0, add(bytecode, 0x20), mload(bytecode)) + } + + require(addr != address(0), "StdCheats deployCode(string): Deployment failed."); + } + + /// @dev deploy contract with value on construction + function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) { + bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); + assembly ("memory-safe") { + addr := create(val, add(bytecode, 0x20), mload(bytecode)) + } + + require(addr != address(0), "StdCheats deployCode(string,bytes,uint256): Deployment failed."); + } + + function deployCode(string memory what, uint256 val) internal virtual returns (address addr) { + bytes memory bytecode = vm.getCode(what); + assembly ("memory-safe") { + addr := create(val, add(bytecode, 0x20), mload(bytecode)) + } + + require(addr != address(0), "StdCheats deployCode(string,uint256): Deployment failed."); + } + + // creates a labeled address and the corresponding private key + function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) { + privateKey = uint256(keccak256(abi.encodePacked(name))); + addr = vm.addr(privateKey); + vm.label(addr, name); + } + + // creates a labeled address + function makeAddr(string memory name) internal virtual returns (address addr) { + (addr,) = makeAddrAndKey(name); + } + + // Destroys an account immediately, sending the balance to beneficiary. + // Destroying means: balance will be zero, code will be empty, and nonce will be 0 + // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce + // only after tx ends, this will run immediately. + function destroyAccount(address who, address beneficiary) internal virtual { + uint256 currBalance = who.balance; + vm.etch(who, abi.encode()); + vm.deal(who, 0); + vm.resetNonce(who); + + uint256 beneficiaryBalance = beneficiary.balance; + vm.deal(beneficiary, currBalance + beneficiaryBalance); + } + + // creates a struct containing both a labeled address and the corresponding private key + function makeAccount(string memory name) internal virtual returns (Account memory account) { + (account.addr, account.key) = makeAddrAndKey(name); + } + + function deriveRememberKey(string memory mnemonic, uint32 index) + internal + virtual + returns (address who, uint256 privateKey) + { + privateKey = vm.deriveKey(mnemonic, index); + who = vm.rememberKey(privateKey); + } + + function _bytesToUint(bytes memory b) private pure returns (uint256) { + require(b.length <= 32, "StdCheats _bytesToUint(bytes): Bytes length exceeds 32."); + return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); + } + + function isFork() internal view virtual returns (bool status) { + try vm.activeFork() { + status = true; + } catch (bytes memory) {} + } + + modifier skipWhenForking() { + if (!isFork()) { + _; + } + } + + modifier skipWhenNotForking() { + if (isFork()) { + _; + } + } + + modifier noGasMetering() { + vm.pauseGasMetering(); + // To prevent turning gas monitoring back on with nested functions that use this modifier, + // we check if gasMetering started in the off position. If it did, we don't want to turn + // it back on until we exit the top level function that used the modifier + // + // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well. + // funcA will have `gasStartedOff` as false, funcB will have it as true, + // so we only turn metering back on at the end of the funcA + bool gasStartedOff = gasMeteringOff; + gasMeteringOff = true; + + _; + + // if gas metering was on when this modifier was called, turn it back on at the end + if (!gasStartedOff) { + gasMeteringOff = false; + vm.resumeGasMetering(); + } + } + + // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no + // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We + // can't simply access the chain ID in a normal view or pure function because the solc View Pure + // Checker changed `chainid` from pure to view in 0.8.0. + function _viewChainId() private view returns (uint256 chainId) { + // Assembly required since `block.chainid` was introduced in 0.8.0. + assembly { + chainId := chainid() + } + + address(this); // Silence warnings in older Solc versions. + } + + function _pureChainId() private pure returns (uint256 chainId) { + function() internal view returns (uint256) fnIn = _viewChainId; + function() internal pure returns (uint256) pureChainId; + assembly { + pureChainId := fnIn + } + chainId = pureChainId(); + } +} + +// Wrappers around cheatcodes to avoid footguns +abstract contract StdCheats is StdCheatsSafe { + using stdStorage for StdStorage; + + StdStorage private stdstore; + Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); + address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; + + // Skip forward or rewind time by the specified number of seconds + function skip(uint256 time) internal virtual { + vm.warp(vm.getBlockTimestamp() + time); + } + + function rewind(uint256 time) internal virtual { + vm.warp(vm.getBlockTimestamp() - time); + } + + // Setup a prank from an address that has some ether + function hoax(address msgSender) internal virtual { + vm.deal(msgSender, 1 << 128); + vm.prank(msgSender); + } + + function hoax(address msgSender, uint256 give) internal virtual { + vm.deal(msgSender, give); + vm.prank(msgSender); + } + + function hoax(address msgSender, address origin) internal virtual { + vm.deal(msgSender, 1 << 128); + vm.prank(msgSender, origin); + } + + function hoax(address msgSender, address origin, uint256 give) internal virtual { + vm.deal(msgSender, give); + vm.prank(msgSender, origin); + } + + // Start perpetual prank from an address that has some ether + function startHoax(address msgSender) internal virtual { + vm.deal(msgSender, 1 << 128); + vm.startPrank(msgSender); + } + + function startHoax(address msgSender, uint256 give) internal virtual { + vm.deal(msgSender, give); + vm.startPrank(msgSender); + } + + // Start perpetual prank from an address that has some ether + // tx.origin is set to the origin parameter + function startHoax(address msgSender, address origin) internal virtual { + vm.deal(msgSender, 1 << 128); + vm.startPrank(msgSender, origin); + } + + function startHoax(address msgSender, address origin, uint256 give) internal virtual { + vm.deal(msgSender, give); + vm.startPrank(msgSender, origin); + } + + function changePrank(address msgSender) internal virtual { + console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead."); + vm.stopPrank(); + vm.startPrank(msgSender); + } + + function changePrank(address msgSender, address txOrigin) internal virtual { + console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead."); + vm.stopPrank(); + vm.startPrank(msgSender, txOrigin); + } + + function expectAndMockCall(address callee, bytes memory data, bytes memory returnData) internal virtual { + vm.expectCall(callee, data); + vm.mockCall(callee, data, returnData); + } + + function expectAndMockCall(address callee, bytes memory data, uint64 count, bytes memory returnData) + internal + virtual + { + vm.expectCall(callee, data, count); + vm.mockCall(callee, data, returnData); + } + + function expectAndMockCall(address callee, uint256 msgValue, bytes memory data, bytes memory returnData) + internal + virtual + { + vm.expectCall(callee, msgValue, data); + vm.mockCall(callee, msgValue, data, returnData); + } + + function expectAndMockCall( + address callee, + uint256 msgValue, + bytes memory data, + uint64 count, + bytes memory returnData + ) internal virtual { + vm.expectCall(callee, msgValue, data, count); + vm.mockCall(callee, msgValue, data, returnData); + } + + function expectAndMockCall(address callee, uint256 msgValue, uint64 gas, bytes memory data, bytes memory returnData) + internal + virtual + { + vm.expectCall(callee, msgValue, gas, data); + vm.mockCall(callee, msgValue, data, returnData); + } + + function expectAndMockCall( + address callee, + uint256 msgValue, + uint64 gas, + bytes memory data, + uint64 count, + bytes memory returnData + ) internal virtual { + vm.expectCall(callee, msgValue, gas, data, count); + vm.mockCall(callee, msgValue, data, returnData); + } + + // The same as Vm's `deal` + // Use the alternative signature for ERC20 tokens + function deal(address to, uint256 give) internal virtual { + vm.deal(to, give); + } + + // Set the balance of an account for any ERC20 token + // Use the alternative signature to update `totalSupply` + function deal(address token, address to, uint256 give) internal virtual { + deal(token, to, give, false); + } + + // Set the balance of an account for any ERC1155 token + // Use the alternative signature to update `totalSupply` + function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual { + dealERC1155(token, to, id, give, false); + } + + function deal(address token, address to, uint256 give, bool adjust) internal virtual { + // get current balance + (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); + uint256 prevBal = abi.decode(balData, (uint256)); + + // update balance + stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give); + + // update total supply + if (adjust) { + (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd)); + uint256 totSup = abi.decode(totSupData, (uint256)); + if (give < prevBal) { + totSup -= (prevBal - give); + } else { + totSup += (give - prevBal); + } + stdstore.target(token).sig(0x18160ddd).checked_write(totSup); + } + } + + function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual { + // get current balance + (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id)); + uint256 prevBal = abi.decode(balData, (uint256)); + + // update balance + stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give); + + // update total supply + if (adjust) { + (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id)); + require( + totSupData.length != 0, + "StdCheats dealERC1155(address,address,uint256,uint256,bool): target contract is not ERC1155Supply." + ); + uint256 totSup = abi.decode(totSupData, (uint256)); + if (give < prevBal) { + totSup -= (prevBal - give); + } else { + totSup += (give - prevBal); + } + stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup); + } + } + + function dealERC721(address token, address to, uint256 id) internal virtual { + // check if token id is already minted and the actual owner. + (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id)); + require(successMinted, "StdCheats dealERC721(address,address,uint256): id not minted."); + + // get owner current balance + (, bytes memory fromBalData) = + token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address)))); + uint256 fromPrevBal = abi.decode(fromBalData, (uint256)); + + // get new user current balance + (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); + uint256 toPrevBal = abi.decode(toBalData, (uint256)); + + // update balances + stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal); + stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal); + + // update owner + stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to); + } + + function deployCodeTo(string memory what, address where) internal virtual { + deployCodeTo(what, "", 0, where); + } + + function deployCodeTo(string memory what, bytes memory args, address where) internal virtual { + deployCodeTo(what, args, 0, where); + } + + function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual { + bytes memory creationCode = vm.getCode(what); + vm.etch(where, abi.encodePacked(creationCode, args)); + (bool success, bytes memory runtimeBytecode) = where.call{value: value}(""); + require(success, "StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode."); + vm.etch(where, runtimeBytecode); + } + + // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere. + function console2_log_StdCheats(string memory p0) private view { + (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string)", p0)); + status; + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdConfig.sol b/dependencies/forge-std-1.16.1/src/StdConfig.sol new file mode 100644 index 00000000..78ab0d82 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdConfig.sol @@ -0,0 +1,632 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.13; + +import {VmSafe} from "./Vm.sol"; +import {Variable, Type, TypeKind, LibVariable} from "./LibVariable.sol"; + +/// @notice A contract that parses a toml configuration file and loads its +/// variables into storage, automatically casting them, on deployment. +/// +/// @dev This contract assumes a toml structure where top-level keys +/// represent chain ids or aliases. Under each chain key, variables are +/// organized by type in separate sub-tables like `[.]`, where +/// type must be: `bool`, `address`, `bytes32`, `uint`, `int`, `string`, or `bytes`. +/// +/// Supported format: +/// ``` +/// [mainnet] +/// endpoint_url = "${MAINNET_RPC}" +/// +/// [mainnet.bool] +/// is_live = true +/// +/// [mainnet.address] +/// weth = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" +/// whitelisted_admins = [ +/// "${MAINNET_ADMIN}", +/// "0x00000000000000000000000000000000deadbeef", +/// "0x000000000000000000000000000000c0ffeebabe" +/// ] +/// +/// [mainnet.uint] +/// important_number = 123 +/// ``` +contract StdConfig { + using LibVariable for Type; + using LibVariable for TypeKind; + + VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); + + /// @dev Types: `bool`, `address`, `bytes32`, `uint`, `int`, `string`, `bytes`. + uint8 private constant NUM_TYPES = 7; + + // -- ERRORS --------------------------------------------------------------- + + error AlreadyInitialized(string key); + error InvalidChainKey(string aliasOrId); + error ChainNotInitialized(uint256 chainId); + error UnableToParseVariable(string key); + error WriteToFileInForbiddenCtxt(); + + // -- STORAGE (CACHE FROM CONFIG FILE) ------------------------------------ + + /// @dev Path to the loaded TOML configuration file. + string private _filePath; + + /// @dev List of top-level keys found in the TOML file, assumed to be chain names/aliases. + string[] private _chainKeys; + + /// @dev Storage for the configured RPC URL for each chain. + mapping(uint256 => string) private _rpcOf; + + /// @dev Storage for values, organized by chain ID and variable key. + mapping(uint256 => mapping(string => bytes)) private _dataOf; + + /// @dev Type cache for runtime checking when casting. + mapping(uint256 => mapping(string => Type)) private _typeOf; + + /// @dev When enabled, `set` will always write updates back to the configuration file. + /// Can only be enabled in a scripting context to prevent file corruption from + /// concurrent I/O access, as tests run in parallel. + bool private _writeToFile; + + // -- CONSTRUCTOR ---------------------------------------------------------- + + /// @notice Reads the TOML file and iterates through each top-level key, which is + /// assumed to be a chain name or ID. For each chain, it caches its RPC + /// endpoint and all variables defined in typed sub-tables like `[.]`, + /// where type must be: `bool`, `address`, `bytes32`, `uint`, `int`, `string`, or `bytes`. + /// + /// The constructor attempts to parse each variable first as a single value, + /// and if that fails, as an array of that type. If a variable cannot be + /// parsed as either, the constructor will revert with an error. + /// + /// @param configFilePath: The local path to the TOML configuration file. + /// @param writeToFile: Whether to write updates back to the TOML file. Only for scripts. + constructor(string memory configFilePath, bool writeToFile) { + if (writeToFile && !vm.isContext(VmSafe.ForgeContext.ScriptGroup)) { + revert WriteToFileInForbiddenCtxt(); + } + + _filePath = configFilePath; + _writeToFile = writeToFile; + string memory content = vm.resolveEnv(vm.readFile(configFilePath)); + string[] memory chain_keys = vm.parseTomlKeys(content, "$"); + + // Cache the entire configuration to storage + for (uint256 i = 0; i < chain_keys.length; i++) { + string memory chain_key = chain_keys[i]; + // Ignore top-level keys that are not tables + if (vm.parseTomlKeys(content, string.concat("$.", chain_key)).length == 0) { + continue; + } + uint256 chainId = resolveChainId(chain_key); + _chainKeys.push(chain_key); + + // Cache the configured RPC endpoint for that chain. + // Falls back to `[rpc_endpoints]`. Panics if no rpc endpoint is configured. + try vm.parseTomlString(content, string.concat("$.", chain_key, ".endpoint_url")) returns ( + string memory url + ) { + _rpcOf[chainId] = vm.resolveEnv(url); + } catch { + _rpcOf[chainId] = vm.resolveEnv(vm.rpcUrl(chain_key)); + } + + // Iterate through all the available `TypeKind`s (except `None`) to create the sub-section paths + for (uint8 t = 1; t <= NUM_TYPES; t++) { + TypeKind ty = TypeKind(t); + string memory typePath = string.concat("$.", chain_key, ".", ty.toTomlKey()); + + try vm.parseTomlKeys(content, typePath) returns (string[] memory keys) { + for (uint256 j = 0; j < keys.length; j++) { + string memory key = keys[j]; + if (_typeOf[chainId][key].kind == TypeKind.None) { + _loadAndCacheValue(content, string.concat(typePath, ".", key), chainId, key, ty); + } else { + revert AlreadyInitialized(key); + } + } + } catch {} + } + } + } + + function _loadAndCacheValue( + string memory content, + string memory path, + uint256 chainId, + string memory key, + TypeKind ty + ) private { + bool success = false; + if (ty == TypeKind.Bool) { + try vm.parseTomlBool(content, path) returns (bool val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Bool, false); + success = true; + } catch { + try vm.parseTomlBoolArray(content, path) returns (bool[] memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Bool, true); + success = true; + } catch {} + } + } else if (ty == TypeKind.Address) { + try vm.parseTomlAddress(content, path) returns (address val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Address, false); + success = true; + } catch { + try vm.parseTomlAddressArray(content, path) returns (address[] memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Address, true); + success = true; + } catch {} + } + } else if (ty == TypeKind.Bytes32) { + try vm.parseTomlBytes32(content, path) returns (bytes32 val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Bytes32, false); + success = true; + } catch { + try vm.parseTomlBytes32Array(content, path) returns (bytes32[] memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Bytes32, true); + success = true; + } catch {} + } + } else if (ty == TypeKind.Uint256) { + try vm.parseTomlUint(content, path) returns (uint256 val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Uint256, false); + success = true; + } catch { + try vm.parseTomlUintArray(content, path) returns (uint256[] memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Uint256, true); + success = true; + } catch {} + } + } else if (ty == TypeKind.Int256) { + try vm.parseTomlInt(content, path) returns (int256 val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Int256, false); + success = true; + } catch { + try vm.parseTomlIntArray(content, path) returns (int256[] memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Int256, true); + success = true; + } catch {} + } + } else if (ty == TypeKind.Bytes) { + try vm.parseTomlBytes(content, path) returns (bytes memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Bytes, false); + success = true; + } catch { + try vm.parseTomlBytesArray(content, path) returns (bytes[] memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.Bytes, true); + success = true; + } catch {} + } + } else if (ty == TypeKind.String) { + try vm.parseTomlString(content, path) returns (string memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.String, false); + success = true; + } catch { + try vm.parseTomlStringArray(content, path) returns (string[] memory val) { + _dataOf[chainId][key] = abi.encode(val); + _typeOf[chainId][key] = Type(TypeKind.String, true); + success = true; + } catch {} + } + } + + if (!success) { + revert UnableToParseVariable(key); + } + } + + // -- HELPER FUNCTIONS ----------------------------------------------------- + + /// @notice Enable or disable automatic writing to the TOML file on `set`. + /// Can only be enabled when scripting. + function writeUpdatesBackToFile(bool enabled) public { + if (enabled && !vm.isContext(VmSafe.ForgeContext.ScriptGroup)) { + revert WriteToFileInForbiddenCtxt(); + } + + _writeToFile = enabled; + } + + /// @notice Resolves a chain alias or a chain id string to its numerical chain id. + /// @param aliasOrId The string representing the chain alias (i.e. "mainnet") or a numerical ID (i.e. "1"). + /// @return The numerical chain ID. + /// @dev It first attempts to parse the input as a number. If that fails, it uses `vm.getChain` to resolve a named alias. + /// Reverts if the alias is not valid or not a number. + function resolveChainId(string memory aliasOrId) public view returns (uint256) { + try vm.parseUint(aliasOrId) returns (uint256 chainId) { + return chainId; + } catch { + try vm.getChain(aliasOrId) returns (VmSafe.Chain memory chainInfo) { + return chainInfo.chainId; + } catch { + revert InvalidChainKey(aliasOrId); + } + } + } + + /// @dev Retrieves the chain key/alias from the configuration based on the chain ID. + function _getChainKeyFromId(uint256 chainId) private view returns (string memory) { + for (uint256 i = 0; i < _chainKeys.length; i++) { + if (resolveChainId(_chainKeys[i]) == chainId) { + return _chainKeys[i]; + } + } + revert ChainNotInitialized(chainId); + } + + /// @dev Ensures type consistency when setting a value - prevents changing types unless uninitialized. + /// Updates type only when the previous type was `None`. + function _ensureTypeConsistency(uint256 chainId, string memory key, Type memory ty) private { + Type memory current = _typeOf[chainId][key]; + + if (current.kind == TypeKind.None) { + _typeOf[chainId][key] = ty; + } else { + current.assertEq(ty); + } + } + + /// @dev Wraps a string in double quotes for JSON compatibility. + function _quote(string memory s) private pure returns (string memory) { + return string.concat('"', s, '"'); + } + + /// @dev Writes a JSON-formatted value to a specific key in the TOML file. + /// @param chainId The chain id to write under. + /// @param ty The type category ('bool', 'address', 'uint', 'bytes32', 'string', or 'bytes'). + /// @param key The variable key name. + /// @param jsonValue The JSON-formatted value to write. + function _writeToToml(uint256 chainId, string memory ty, string memory key, string memory jsonValue) private { + string memory chainKey = _getChainKeyFromId(chainId); + string memory valueKey = string.concat("$.", chainKey, ".", ty, ".", key); + vm.writeToml(jsonValue, _filePath, valueKey); + } + + // -- GETTER FUNCTIONS ----------------------------------------------------- + + /// @dev Reads a variable for a given chain id and key, and returns it in a generic container. + /// The caller should use `LibVariable` to safely coerce the type. + /// Example: `uint256 myVar = config.get("my_key").toUint256();` + /// + /// @param chain_id The chain ID to read from. + /// @param key The key of the variable to retrieve. + /// @return `Variable` struct containing the type and the ABI-encoded value. + function get(uint256 chain_id, string memory key) public view returns (Variable memory) { + return Variable(_typeOf[chain_id][key], _dataOf[chain_id][key]); + } + + /// @dev Reads a variable for the current chain and a given key, and returns it in a generic container. + /// The caller should use `LibVariable` to safely coerce the type. + /// Example: `uint256 myVar = config.get("my_key").toUint256();` + /// + /// @param key The key of the variable to retrieve. + /// @return `Variable` struct containing the type and the ABI-encoded value. + function get(string memory key) public view returns (Variable memory) { + return get(vm.getChainId(), key); + } + + /// @dev Checks the existence of a variable for a given chain ID and key, and returns a boolean. + /// Example: `bool hasKey = config.exists(1, "my_key");` + /// + /// @param chain_id The chain ID to check. + /// @param key The variable key name. + /// @return `bool` indicating whether a variable with the given key exists. + function exists(uint256 chain_id, string memory key) public view returns (bool) { + return _dataOf[chain_id][key].length > 0; + } + + /// @dev Checks the existence of a variable for the current chain id and a given key, and returns a boolean. + /// Example: `bool hasKey = config.exists("my_key");` + /// + /// @param key The variable key name. + /// @return `bool` indicating whether a variable with the given key exists. + function exists(string memory key) public view returns (bool) { + return exists(vm.getChainId(), key); + } + + /// @notice Returns the numerical chain ids for all configured chains. + function getChainIds() public view returns (uint256[] memory) { + string[] memory keys = _chainKeys; + + uint256[] memory ids = new uint256[](keys.length); + for (uint256 i = 0; i < keys.length; i++) { + ids[i] = resolveChainId(keys[i]); + } + + return ids; + } + + /// @notice Reads the RPC URL for a specific chain id. + function getRpcUrl(uint256 chainId) public view returns (string memory) { + return _rpcOf[chainId]; + } + + /// @notice Reads the RPC URL for the current chain. + function getRpcUrl() public view returns (string memory) { + return _rpcOf[vm.getChainId()]; + } + + // -- SETTER FUNCTIONS (SINGLE VALUES) ------------------------------------- + + /// @notice Sets a boolean value for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, bool value) public { + Type memory ty = Type(TypeKind.Bool, false); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, vm.toString(value)); + } + + /// @notice Sets a boolean value for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, bool value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets an address value for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, address value) public { + Type memory ty = Type(TypeKind.Address, false); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(vm.toString(value))); + } + + /// @notice Sets an address value for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, address value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a bytes32 value for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, bytes32 value) public { + Type memory ty = Type(TypeKind.Bytes32, false); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(vm.toString(value))); + } + + /// @notice Sets a bytes32 value for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, bytes32 value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a uint256 value for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, uint256 value) public { + Type memory ty = Type(TypeKind.Uint256, false); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, vm.toString(value)); + } + + /// @notice Sets a uint256 value for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, uint256 value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets an int256 value for a given key and chain ID. + function set(uint256 chainId, string memory key, int256 value) public { + Type memory ty = Type(TypeKind.Int256, false); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, vm.toString(value)); + } + + /// @notice Sets an int256 value for a given key on the current chain. + function set(string memory key, int256 value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a string value for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, string memory value) public { + Type memory ty = Type(TypeKind.String, false); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(value)); + } + + /// @notice Sets a string value for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, string memory value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a bytes value for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, bytes memory value) public { + Type memory ty = Type(TypeKind.Bytes, false); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) _writeToToml(chainId, ty.kind.toTomlKey(), key, _quote(vm.toString(value))); + } + + /// @notice Sets a bytes value for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, bytes memory value) public { + set(vm.getChainId(), key, value); + } + + // -- SETTER FUNCTIONS (ARRAYS) -------------------------------------------- + + /// @notice Sets a boolean array for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, bool[] memory value) public { + Type memory ty = Type(TypeKind.Bool, true); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) { + string memory json = "["; + for (uint256 i = 0; i < value.length; i++) { + json = string.concat(json, vm.toString(value[i])); + if (i < value.length - 1) json = string.concat(json, ","); + } + json = string.concat(json, "]"); + _writeToToml(chainId, ty.kind.toTomlKey(), key, json); + } + } + + /// @notice Sets a boolean array for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, bool[] memory value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets an address array for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, address[] memory value) public { + Type memory ty = Type(TypeKind.Address, true); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) { + string memory json = "["; + for (uint256 i = 0; i < value.length; i++) { + json = string.concat(json, _quote(vm.toString(value[i]))); + if (i < value.length - 1) json = string.concat(json, ","); + } + json = string.concat(json, "]"); + _writeToToml(chainId, ty.kind.toTomlKey(), key, json); + } + } + + /// @notice Sets an address array for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, address[] memory value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a bytes32 array for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, bytes32[] memory value) public { + Type memory ty = Type(TypeKind.Bytes32, true); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) { + string memory json = "["; + for (uint256 i = 0; i < value.length; i++) { + json = string.concat(json, _quote(vm.toString(value[i]))); + if (i < value.length - 1) json = string.concat(json, ","); + } + json = string.concat(json, "]"); + _writeToToml(chainId, ty.kind.toTomlKey(), key, json); + } + } + + /// @notice Sets a bytes32 array for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, bytes32[] memory value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a uint256 array for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, uint256[] memory value) public { + Type memory ty = Type(TypeKind.Uint256, true); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) { + string memory json = "["; + for (uint256 i = 0; i < value.length; i++) { + json = string.concat(json, vm.toString(value[i])); + if (i < value.length - 1) json = string.concat(json, ","); + } + json = string.concat(json, "]"); + _writeToToml(chainId, ty.kind.toTomlKey(), key, json); + } + } + + /// @notice Sets a uint256 array for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, uint256[] memory value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a int256 array for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, int256[] memory value) public { + Type memory ty = Type(TypeKind.Int256, true); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) { + string memory json = "["; + for (uint256 i = 0; i < value.length; i++) { + json = string.concat(json, vm.toString(value[i])); + if (i < value.length - 1) json = string.concat(json, ","); + } + json = string.concat(json, "]"); + _writeToToml(chainId, ty.kind.toTomlKey(), key, json); + } + } + + /// @notice Sets a int256 array for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, int256[] memory value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a string array for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, string[] memory value) public { + Type memory ty = Type(TypeKind.String, true); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) { + string memory json = "["; + for (uint256 i = 0; i < value.length; i++) { + json = string.concat(json, _quote(value[i])); + if (i < value.length - 1) json = string.concat(json, ","); + } + json = string.concat(json, "]"); + _writeToToml(chainId, ty.kind.toTomlKey(), key, json); + } + } + + /// @notice Sets a string array for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, string[] memory value) public { + set(vm.getChainId(), key, value); + } + + /// @notice Sets a bytes array for a given key and chain ID. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(uint256 chainId, string memory key, bytes[] memory value) public { + Type memory ty = Type(TypeKind.Bytes, true); + _ensureTypeConsistency(chainId, key, ty); + _dataOf[chainId][key] = abi.encode(value); + if (_writeToFile) { + string memory json = "["; + for (uint256 i = 0; i < value.length; i++) { + json = string.concat(json, _quote(vm.toString(value[i]))); + if (i < value.length - 1) json = string.concat(json, ","); + } + json = string.concat(json, "]"); + _writeToToml(chainId, ty.kind.toTomlKey(), key, json); + } + } + + /// @notice Sets a bytes array for a given key on the current chain. + /// @dev Sets the cached value in storage and writes the change back to the TOML file if `autoWrite` is enabled. + function set(string memory key, bytes[] memory value) public { + set(vm.getChainId(), key, value); + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdConstants.sol b/dependencies/forge-std-1.16.1/src/StdConstants.sol new file mode 100644 index 00000000..9f069ef8 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdConstants.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IMulticall3} from "./interfaces/IMulticall3.sol"; +import {Vm} from "./Vm.sol"; + +library StdConstants { + /// @dev Cheat code address. + /// Calculated as `address(uint160(uint256(keccak256("hevm cheat code"))))`. + Vm internal constant VM = Vm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); + /// @dev console.sol and console2.sol work by executing a staticcall to this address. + /// Calculated as `address(uint160(uint88(bytes11("console.log"))))`. + address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67; + /// @dev Used when deploying with create2. + /// Taken from https://github.com/Arachnid/deterministic-deployment-proxy. + address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; + /// @dev The default address for tx.origin and msg.sender. + /// Calculated as `address(uint160(uint256(keccak256("foundry default caller"))))`. + address internal constant DEFAULT_SENDER = 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38; + /// @dev The address of the first contract `CREATE`d by a running test contract. + /// When running tests, each test contract is `CREATE`d by `DEFAULT_SENDER` with nonce 1. + /// Calculated as `VM.computeCreateAddress(VM.computeCreateAddress(DEFAULT_SENDER, 1), 1)`. + address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f; + /// @dev Deterministic deployment address of the Multicall3 contract. + /// Taken from https://www.multicall3.com. + IMulticall3 internal constant MULTICALL3_ADDRESS = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11); + /// @dev The order of the secp256k1 curve. + uint256 internal constant SECP256K1_ORDER = + 115792089237316195423570985008687907852837564279074904382605163141518161494337; +} diff --git a/dependencies/forge-std-1.16.1/src/StdError.sol b/dependencies/forge-std-1.16.1/src/StdError.sol new file mode 100644 index 00000000..94df1594 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdError.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test +pragma solidity >=0.8.13 <0.9.0; + +/// @notice Pre-encoded Solidity panic error selectors for use in test assertions. +library stdError { + /// @notice Panic caused by `assert(false)` or an assertion failure (0x01). + bytes public constant assertionError = abi.encodeWithSignature("Panic(uint256)", 0x01); + + /// @notice Panic caused by arithmetic overflow or underflow (0x11). + bytes public constant arithmeticError = abi.encodeWithSignature("Panic(uint256)", 0x11); + + /// @notice Panic caused by division or modulo by zero (0x12). + bytes public constant divisionError = abi.encodeWithSignature("Panic(uint256)", 0x12); + + /// @notice Panic caused by converting a value that is too large or negative into an enum type (0x21). + bytes public constant enumConversionError = abi.encodeWithSignature("Panic(uint256)", 0x21); + + /// @notice Panic caused by accessing incorrectly encoded storage data (0x22). + bytes public constant encodeStorageError = abi.encodeWithSignature("Panic(uint256)", 0x22); + + /// @notice Panic caused by calling `.pop()` on an empty array (0x31). + bytes public constant popError = abi.encodeWithSignature("Panic(uint256)", 0x31); + + /// @notice Panic caused by accessing an array, bytesN, or slice at an out-of-bounds index (0x32). + bytes public constant indexOOBError = abi.encodeWithSignature("Panic(uint256)", 0x32); + + /// @notice Panic caused by allocating too much memory or creating an array that is too large (0x41). + bytes public constant memOverflowError = abi.encodeWithSignature("Panic(uint256)", 0x41); + + /// @notice Panic caused by calling a zero-initialized variable of internal function type (0x51). + bytes public constant zeroVarError = abi.encodeWithSignature("Panic(uint256)", 0x51); +} diff --git a/dependencies/forge-std-1.16.1/src/StdInvariant.sol b/dependencies/forge-std-1.16.1/src/StdInvariant.sol new file mode 100644 index 00000000..2c79b6e2 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdInvariant.sol @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +/// @notice Abstract contract providing configuration utilities for Forge invariant tests. +abstract contract StdInvariant { + struct FuzzSelector { + address addr; + bytes4[] selectors; + } + + struct FuzzArtifactSelector { + string artifact; + bytes4[] selectors; + } + + struct FuzzInterface { + address addr; + string[] artifacts; + } + + address[] private _excludedContracts; + address[] private _excludedSenders; + address[] private _targetedContracts; + address[] private _targetedSenders; + + string[] private _excludedArtifacts; + string[] private _targetedArtifacts; + + FuzzArtifactSelector[] private _targetedArtifactSelectors; + + FuzzSelector[] private _excludedSelectors; + FuzzSelector[] private _targetedSelectors; + + FuzzInterface[] private _targetedInterfaces; + + // Functions for users: + // These are intended to be called in tests. + + /// @notice Excludes a contract address from invariant target selection. + /// @param newExcludedContract_ The contract address to exclude. + function excludeContract(address newExcludedContract_) internal { + _excludedContracts.push(newExcludedContract_); + } + + /// @notice Excludes specific selectors on a contract from invariant fuzzing. + /// @param newExcludedSelector_ The selector configuration to exclude. + function excludeSelector(FuzzSelector memory newExcludedSelector_) internal { + _excludedSelectors.push(newExcludedSelector_); + } + + /// @notice Excludes a sender from invariant fuzzing; exclusion takes precedence over targeted senders. + /// @param newExcludedSender_ The sender address to exclude. + function excludeSender(address newExcludedSender_) internal { + _excludedSenders.push(newExcludedSender_); + } + + /// @notice Excludes an artifact identifier from invariant target selection. + /// @param newExcludedArtifact_ The artifact identifier to exclude. + function excludeArtifact(string memory newExcludedArtifact_) internal { + _excludedArtifacts.push(newExcludedArtifact_); + } + + /// @notice Targets an artifact identifier for invariant fuzzing. + /// @param newTargetedArtifact_ The artifact identifier to target. + function targetArtifact(string memory newTargetedArtifact_) internal { + _targetedArtifacts.push(newTargetedArtifact_); + } + + /// @notice Targets specific selectors for an artifact identifier during invariant fuzzing. + /// @param newTargetedArtifactSelector_ The artifact-selector configuration to target. + function targetArtifactSelector(FuzzArtifactSelector memory newTargetedArtifactSelector_) internal { + _targetedArtifactSelectors.push(newTargetedArtifactSelector_); + } + + /// @notice Targets a contract address for invariant fuzzing. + /// @param newTargetedContract_ The contract address to target. + function targetContract(address newTargetedContract_) internal { + _targetedContracts.push(newTargetedContract_); + } + + /// @notice Targets specific selectors on a contract for invariant fuzzing. + /// @param newTargetedSelector_ The selector configuration to target. + function targetSelector(FuzzSelector memory newTargetedSelector_) internal { + _targetedSelectors.push(newTargetedSelector_); + } + + /// @notice Adds a sender to the invariant sender allowlist; when non-empty, fuzzing uses only targeted non-excluded senders. + /// @param newTargetedSender_ The sender address to target. + function targetSender(address newTargetedSender_) internal { + _targetedSenders.push(newTargetedSender_); + } + + /// @notice Targets an address plus artifact interfaces for invariant fuzzing. + /// @param newTargetedInterface_ The address-interface configuration to target. + function targetInterface(FuzzInterface memory newTargetedInterface_) internal { + _targetedInterfaces.push(newTargetedInterface_); + } + + // Functions for forge: + // These are called by forge to run invariant tests and don't need to be called in tests. + + /// @notice Returns artifact identifiers configured via `excludeArtifact`. + /// @return excludedArtifacts_ The list of excluded artifact identifiers. + function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) { + excludedArtifacts_ = _excludedArtifacts; + } + + /// @notice Returns contract addresses configured via `excludeContract`. + /// @return excludedContracts_ The list of excluded contract addresses. + function excludeContracts() public view returns (address[] memory excludedContracts_) { + excludedContracts_ = _excludedContracts; + } + + /// @notice Returns selector exclusions configured via `excludeSelector`. + /// @return excludedSelectors_ The list of excluded selector configurations. + function excludeSelectors() public view returns (FuzzSelector[] memory excludedSelectors_) { + excludedSelectors_ = _excludedSelectors; + } + + /// @notice Returns senders configured via `excludeSender`. + /// @return excludedSenders_ The list of excluded sender addresses. + function excludeSenders() public view returns (address[] memory excludedSenders_) { + excludedSenders_ = _excludedSenders; + } + + /// @notice Returns artifact identifiers configured via `targetArtifact`. + /// @return targetedArtifacts_ The list of targeted artifact identifiers. + function targetArtifacts() public view returns (string[] memory targetedArtifacts_) { + targetedArtifacts_ = _targetedArtifacts; + } + + /// @notice Returns artifact-selector targets configured via `targetArtifactSelector`. + /// @return targetedArtifactSelectors_ The list of targeted artifact-selector configurations. + function targetArtifactSelectors() public view returns (FuzzArtifactSelector[] memory targetedArtifactSelectors_) { + targetedArtifactSelectors_ = _targetedArtifactSelectors; + } + + /// @notice Returns contract addresses configured via `targetContract`. + /// @return targetedContracts_ The list of targeted contract addresses. + function targetContracts() public view returns (address[] memory targetedContracts_) { + targetedContracts_ = _targetedContracts; + } + + /// @notice Returns selector targets configured via `targetSelector`. + /// @return targetedSelectors_ The list of targeted selector configurations. + function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) { + targetedSelectors_ = _targetedSelectors; + } + + /// @notice Returns sender allowlist configured via `targetSender` (empty means no sender allowlist). + /// @return targetedSenders_ The list of targeted sender addresses. + function targetSenders() public view returns (address[] memory targetedSenders_) { + targetedSenders_ = _targetedSenders; + } + + /// @notice Returns address-interface targets configured via `targetInterface`. + /// @return targetedInterfaces_ The list of targeted address-interface configurations. + function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) { + targetedInterfaces_ = _targetedInterfaces; + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdJson.sol b/dependencies/forge-std-1.16.1/src/StdJson.sol new file mode 100644 index 00000000..1c9b92e4 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdJson.sol @@ -0,0 +1,275 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {VmSafe} from "./Vm.sol"; + +// Helpers for parsing and writing JSON files +// To parse: +// ``` +// using stdJson for string; +// string memory json = vm.readFile(""); +// json.readUint(""); +// ``` +// To write: +// ``` +// using stdJson for string; +// string memory json = "json"; +// json.serialize("a", uint256(123)); +// string memory semiFinal = json.serialize("b", string("test")); +// string memory finalJson = json.serialize("c", semiFinal); +// finalJson.write(""); +// ``` + +library stdJson { + VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); + + function keyExists(string memory json, string memory key) internal view returns (bool) { + return vm.keyExistsJson(json, key); + } + + function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) { + return vm.parseJson(json, key); + } + + function readUint(string memory json, string memory key) internal pure returns (uint256) { + return vm.parseJsonUint(json, key); + } + + function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) { + return vm.parseJsonUintArray(json, key); + } + + function readInt(string memory json, string memory key) internal pure returns (int256) { + return vm.parseJsonInt(json, key); + } + + function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) { + return vm.parseJsonIntArray(json, key); + } + + function readBytes32(string memory json, string memory key) internal pure returns (bytes32) { + return vm.parseJsonBytes32(json, key); + } + + function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) { + return vm.parseJsonBytes32Array(json, key); + } + + function readString(string memory json, string memory key) internal pure returns (string memory) { + return vm.parseJsonString(json, key); + } + + function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) { + return vm.parseJsonStringArray(json, key); + } + + function readAddress(string memory json, string memory key) internal pure returns (address) { + return vm.parseJsonAddress(json, key); + } + + function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) { + return vm.parseJsonAddressArray(json, key); + } + + function readBool(string memory json, string memory key) internal pure returns (bool) { + return vm.parseJsonBool(json, key); + } + + function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) { + return vm.parseJsonBoolArray(json, key); + } + + function readBytes(string memory json, string memory key) internal pure returns (bytes memory) { + return vm.parseJsonBytes(json, key); + } + + function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) { + return vm.parseJsonBytesArray(json, key); + } + + function readUintOr(string memory json, string memory key, uint256 defaultValue) internal view returns (uint256) { + return keyExists(json, key) ? readUint(json, key) : defaultValue; + } + + function readUintArrayOr(string memory json, string memory key, uint256[] memory defaultValue) + internal + view + returns (uint256[] memory) + { + return keyExists(json, key) ? readUintArray(json, key) : defaultValue; + } + + function readIntOr(string memory json, string memory key, int256 defaultValue) internal view returns (int256) { + return keyExists(json, key) ? readInt(json, key) : defaultValue; + } + + function readIntArrayOr(string memory json, string memory key, int256[] memory defaultValue) + internal + view + returns (int256[] memory) + { + return keyExists(json, key) ? readIntArray(json, key) : defaultValue; + } + + function readBytes32Or(string memory json, string memory key, bytes32 defaultValue) + internal + view + returns (bytes32) + { + return keyExists(json, key) ? readBytes32(json, key) : defaultValue; + } + + function readBytes32ArrayOr(string memory json, string memory key, bytes32[] memory defaultValue) + internal + view + returns (bytes32[] memory) + { + return keyExists(json, key) ? readBytes32Array(json, key) : defaultValue; + } + + function readStringOr(string memory json, string memory key, string memory defaultValue) + internal + view + returns (string memory) + { + return keyExists(json, key) ? readString(json, key) : defaultValue; + } + + function readStringArrayOr(string memory json, string memory key, string[] memory defaultValue) + internal + view + returns (string[] memory) + { + return keyExists(json, key) ? readStringArray(json, key) : defaultValue; + } + + function readAddressOr(string memory json, string memory key, address defaultValue) + internal + view + returns (address) + { + return keyExists(json, key) ? readAddress(json, key) : defaultValue; + } + + function readAddressArrayOr(string memory json, string memory key, address[] memory defaultValue) + internal + view + returns (address[] memory) + { + return keyExists(json, key) ? readAddressArray(json, key) : defaultValue; + } + + function readBoolOr(string memory json, string memory key, bool defaultValue) internal view returns (bool) { + return keyExists(json, key) ? readBool(json, key) : defaultValue; + } + + function readBoolArrayOr(string memory json, string memory key, bool[] memory defaultValue) + internal + view + returns (bool[] memory) + { + return keyExists(json, key) ? readBoolArray(json, key) : defaultValue; + } + + function readBytesOr(string memory json, string memory key, bytes memory defaultValue) + internal + view + returns (bytes memory) + { + return keyExists(json, key) ? readBytes(json, key) : defaultValue; + } + + function readBytesArrayOr(string memory json, string memory key, bytes[] memory defaultValue) + internal + view + returns (bytes[] memory) + { + return keyExists(json, key) ? readBytesArray(json, key) : defaultValue; + } + + function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) { + return vm.serializeJson(jsonKey, rootObject); + } + + function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) { + return vm.serializeBool(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bool[] memory value) internal returns (string memory) { + return vm.serializeBool(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) { + return vm.serializeUint(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, uint256[] memory value) + internal + returns (string memory) + { + return vm.serializeUint(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) { + return vm.serializeInt(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, int256[] memory value) + internal + returns (string memory) + { + return vm.serializeInt(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) { + return vm.serializeAddress(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, address[] memory value) + internal + returns (string memory) + { + return vm.serializeAddress(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) { + return vm.serializeBytes32(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes32[] memory value) + internal + returns (string memory) + { + return vm.serializeBytes32(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) { + return vm.serializeBytes(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes[] memory value) + internal + returns (string memory) + { + return vm.serializeBytes(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, string memory value) internal returns (string memory) { + return vm.serializeString(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, string[] memory value) + internal + returns (string memory) + { + return vm.serializeString(jsonKey, key, value); + } + + function write(string memory jsonKey, string memory path) internal { + vm.writeJson(jsonKey, path); + } + + function write(string memory jsonKey, string memory path, string memory valueKey) internal { + vm.writeJson(jsonKey, path, valueKey); + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdMath.sol b/dependencies/forge-std-1.16.1/src/StdMath.sol new file mode 100644 index 00000000..3982afdc --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdMath.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +/// @notice Mathematical utility functions for unsigned and signed integers. +library stdMath { + int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968; + + /// @notice Computes the absolute value of a signed integer. + /// @param a The signed integer to compute the absolute value of. + /// @return The absolute value as an unsigned integer. + function abs(int256 a) internal pure returns (uint256) { + // Required or it will fail when `a = type(int256).min` + if (a == INT256_MIN) { + return 57896044618658097711785492504343953926634992332820282019728792003956564819968; + } + + return uint256(a > 0 ? a : -a); + } + + /// @notice Computes the absolute difference between two unsigned integers. + /// @param a The first unsigned integer. + /// @param b The second unsigned integer. + /// @return The absolute difference between `a` and `b`. + function delta(uint256 a, uint256 b) internal pure returns (uint256) { + return a > b ? a - b : b - a; + } + + /// @notice Computes the absolute difference between two signed integers. + /// @param a The first signed integer. + /// @param b The second signed integer. + /// @return The absolute difference between `a` and `b`. + function delta(int256 a, int256 b) internal pure returns (uint256) { + // a and b are of the same sign + // this works thanks to two's complement, the left-most bit is the sign bit + if ((a ^ b) > -1) { + return delta(abs(a), abs(b)); + } + + // a and b are of opposite signs + return abs(a) + abs(b); + } + + /// @notice Computes the percentage difference between two unsigned integers, scaled by 1e18. + /// @param a The value to compare. + /// @param b The reference value (divisor). Must not be zero. + /// @return The percentage difference scaled by 1e18 (1e18 represents 100%). + function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) { + // Prevent division by zero + require(b != 0, "stdMath percentDelta(uint256,uint256): Divisor is zero"); + uint256 absDelta = delta(a, b); + + return absDelta * 1e18 / b; + } + + /// @notice Computes the percentage difference between two signed integers, scaled by 1e18. + /// @param a The value to compare. + /// @param b The reference value (divisor). Its absolute value must not be zero. + /// @return The percentage difference scaled by 1e18 (1e18 represents 100%). + function percentDelta(int256 a, int256 b) internal pure returns (uint256) { + uint256 absDelta = delta(a, b); + uint256 absB = abs(b); + // Prevent division by zero + require(absB != 0, "stdMath percentDelta(int256,int256): Divisor is zero"); + + return absDelta * 1e18 / absB; + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdStorage.sol b/dependencies/forge-std-1.16.1/src/StdStorage.sol new file mode 100644 index 00000000..9d496ca1 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdStorage.sol @@ -0,0 +1,476 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Vm} from "./Vm.sol"; + +struct FindData { + uint256 slot; + uint256 offsetLeft; + uint256 offsetRight; + bool found; +} + +struct StdStorage { + mapping(address => mapping(bytes4 => mapping(bytes32 => FindData))) finds; + bytes32[] _keys; + bytes4 _sig; + uint256 _depth; + address _target; + bytes32 _set; + bool _enable_packed_slots; + bytes _calldata; +} + +library stdStorageSafe { + event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot); + event WARNING_UninitedSlot(address who, uint256 slot); + + Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); + uint256 constant UINT256_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; + + function sigs(string memory sigStr) internal pure returns (bytes4) { + return bytes4(keccak256(bytes(sigStr))); + } + + function getCallParams(StdStorage storage self) internal view returns (bytes memory) { + if (self._calldata.length == 0) { + return flatten(self._keys); + } else { + return self._calldata; + } + } + + // Calls target contract with configured parameters + function callTarget(StdStorage storage self) internal view returns (bool, bytes32) { + bytes memory cd = abi.encodePacked(self._sig, getCallParams(self)); + (bool success, bytes memory rdat) = self._target.staticcall(cd); + bytes32 result = bytesToBytes32(rdat, 32 * self._depth); + + return (success, result); + } + + // Tries mutating slot value to determine if the targeted value is stored in it. + // If current value is 0, then we are setting slot value to type(uint256).max + // Otherwise, we set it to 0. That way, return value should always be affected. + function checkSlotMutatesCall(StdStorage storage self, bytes32 slot) internal returns (bool) { + bytes32 prevSlotValue = vm.load(self._target, slot); + (bool success, bytes32 prevReturnValue) = callTarget(self); + + bytes32 testVal = prevReturnValue == bytes32(0) ? bytes32(UINT256_MAX) : bytes32(0); + vm.store(self._target, slot, testVal); + + (, bytes32 newReturnValue) = callTarget(self); + + vm.store(self._target, slot, prevSlotValue); + + return (success && (prevReturnValue != newReturnValue)); + } + + // Tries setting one of the bits in slot to 1 until return value changes. + // Index of resulted bit is an offset packed slot has from left/right side + function findOffset(StdStorage storage self, bytes32 slot, bool left) internal returns (bool, uint256) { + for (uint256 offset = 0; offset < 256; offset++) { + uint256 valueToPut = left ? (1 << (255 - offset)) : (1 << offset); + vm.store(self._target, slot, bytes32(valueToPut)); + + (bool success, bytes32 data) = callTarget(self); + + if (success && (uint256(data) > 0)) { + return (true, offset); + } + } + return (false, 0); + } + + function findOffsets(StdStorage storage self, bytes32 slot) internal returns (bool, uint256, uint256) { + bytes32 prevSlotValue = vm.load(self._target, slot); + + (bool foundLeft, uint256 offsetLeft) = findOffset(self, slot, true); + (bool foundRight, uint256 offsetRight) = findOffset(self, slot, false); + + // `findOffset` may mutate slot value, so we are setting it to initial value + vm.store(self._target, slot, prevSlotValue); + return (foundLeft && foundRight, offsetLeft, offsetRight); + } + + function find(StdStorage storage self) internal returns (FindData storage) { + return find(self, true); + } + + /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against + // slot complexity: + // if flat, will be bytes32(uint256(uint)); + // if map, will be keccak256(abi.encode(key, uint(slot))); + // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot))))); + // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth); + function find(StdStorage storage self, bool _clear) internal returns (FindData storage) { + address who = self._target; + bytes4 fsig = self._sig; + uint256 field_depth = self._depth; + bytes memory params = getCallParams(self); + + // calldata to test against + if (self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) { + if (_clear) { + clear(self); + } + return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; + } + vm.record(); + (, bytes32 callResult) = callTarget(self); + (bytes32[] memory reads,) = vm.accesses(address(who)); + + if (reads.length == 0) { + revert("stdStorage find(StdStorage): No storage use detected for target."); + } else { + for (uint256 i = reads.length; i > 0;) { + --i; + bytes32 prev = vm.load(who, reads[i]); + if (prev == bytes32(0)) { + emit WARNING_UninitedSlot(who, uint256(reads[i])); + } + + if (!checkSlotMutatesCall(self, reads[i])) { + continue; + } + + (uint256 offsetLeft, uint256 offsetRight) = (0, 0); + + if (self._enable_packed_slots) { + bool found; + (found, offsetLeft, offsetRight) = findOffsets(self, reads[i]); + if (!found) { + continue; + } + } + + // Check that value between found offsets is equal to the current call result + uint256 curVal = (uint256(prev) & getMaskByOffsets(offsetLeft, offsetRight)) >> offsetRight; + + if (uint256(callResult) != curVal) { + continue; + } + + emit SlotFound(who, fsig, keccak256(abi.encodePacked(params, field_depth)), uint256(reads[i])); + self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))] = + FindData(uint256(reads[i]), offsetLeft, offsetRight, true); + break; + } + } + + require( + self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found, + "stdStorage find(StdStorage): Slot(s) not found." + ); + + if (_clear) { + clear(self); + } + return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; + } + + function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { + self._target = _target; + return self; + } + + function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { + self._sig = _sig; + return self; + } + + function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { + self._sig = sigs(_sig); + return self; + } + + function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) { + self._calldata = _calldata; + return self; + } + + function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { + self._keys.push(bytes32(uint256(uint160(who)))); + return self; + } + + function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { + self._keys.push(bytes32(amt)); + return self; + } + + function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { + self._keys.push(key); + return self; + } + + function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) { + self._enable_packed_slots = true; + return self; + } + + function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { + self._depth = _depth; + return self; + } + + function read(StdStorage storage self) private returns (bytes memory) { + FindData storage data = find(self, false); + uint256 mask = getMaskByOffsets(data.offsetLeft, data.offsetRight); + uint256 value = (uint256(vm.load(self._target, bytes32(data.slot))) & mask) >> data.offsetRight; + clear(self); + return abi.encode(value); + } + + function read_bytes32(StdStorage storage self) internal returns (bytes32) { + return abi.decode(read(self), (bytes32)); + } + + function read_bool(StdStorage storage self) internal returns (bool) { + int256 v = read_int(self); + if (v == 0) return false; + if (v == 1) return true; + revert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool."); + } + + function read_address(StdStorage storage self) internal returns (address) { + return abi.decode(read(self), (address)); + } + + function read_uint(StdStorage storage self) internal returns (uint256) { + return abi.decode(read(self), (uint256)); + } + + function read_int(StdStorage storage self) internal returns (int256) { + return abi.decode(read(self), (int256)); + } + + function parent(StdStorage storage self) internal returns (uint256, bytes32) { + address who = self._target; + uint256 field_depth = self._depth; + vm.startMappingRecording(); + uint256 child = find(self, true).slot - field_depth; + (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); + if (!found) { + revert( + "stdStorage parent(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." + ); + } + return (uint256(parent_slot), key); + } + + function root(StdStorage storage self) internal returns (uint256) { + address who = self._target; + uint256 field_depth = self._depth; + vm.startMappingRecording(); + uint256 child = find(self, true).slot - field_depth; + bool found; + bytes32 root_slot; + bytes32 parent_slot; + (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); + if (!found) { + revert( + "stdStorage root(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." + ); + } + while (found) { + root_slot = parent_slot; + (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot)); + } + return uint256(root_slot); + } + + function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) { + bytes32 out; + + // Cap read length by remaining bytes from `offset`, and at most 32 bytes to avoid out-of-bounds + uint256 max = b.length > offset ? b.length - offset : 0; + if (max > 32) { + max = 32; + } + for (uint256 i = 0; i < max; i++) { + out |= bytes32(b[offset + i] & 0xFF) >> (i * 8); + } + return out; + } + + function flatten(bytes32[] memory b) private pure returns (bytes memory) { + bytes memory result = new bytes(b.length * 32); + for (uint256 i = 0; i < b.length; i++) { + bytes32 k = b[i]; + assembly ("memory-safe") { + mstore(add(result, add(32, mul(32, i))), k) + } + } + + return result; + } + + function clear(StdStorage storage self) internal { + delete self._target; + delete self._sig; + delete self._keys; + delete self._depth; + delete self._enable_packed_slots; + delete self._calldata; + } + + // Returns mask which contains non-zero bits for values between `offsetLeft` and `offsetRight` + // (slotValue & mask) >> offsetRight will be the value of the given packed variable + function getMaskByOffsets(uint256 offsetLeft, uint256 offsetRight) internal pure returns (uint256 mask) { + // mask = ((1 << (256 - (offsetRight + offsetLeft))) - 1) << offsetRight; + // using assembly because (1 << 256) causes overflow + assembly { + mask := shl(offsetRight, sub(shl(sub(256, add(offsetRight, offsetLeft)), 1), 1)) + } + } + + // Returns slot value with updated packed variable. + function getUpdatedSlotValue(bytes32 curValue, uint256 varValue, uint256 offsetLeft, uint256 offsetRight) + internal + pure + returns (bytes32 newValue) + { + return bytes32((uint256(curValue) & ~getMaskByOffsets(offsetLeft, offsetRight)) | (varValue << offsetRight)); + } +} + +library stdStorage { + Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); + + function sigs(string memory sigStr) internal pure returns (bytes4) { + return stdStorageSafe.sigs(sigStr); + } + + function find(StdStorage storage self) internal returns (uint256) { + return find(self, true); + } + + function find(StdStorage storage self, bool _clear) internal returns (uint256) { + return stdStorageSafe.find(self, _clear).slot; + } + + function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { + return stdStorageSafe.target(self, _target); + } + + function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { + return stdStorageSafe.sig(self, _sig); + } + + function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { + return stdStorageSafe.sig(self, _sig); + } + + function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { + return stdStorageSafe.with_key(self, who); + } + + function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { + return stdStorageSafe.with_key(self, amt); + } + + function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { + return stdStorageSafe.with_key(self, key); + } + + function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) { + return stdStorageSafe.with_calldata(self, _calldata); + } + + function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) { + return stdStorageSafe.enable_packed_slots(self); + } + + function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { + return stdStorageSafe.depth(self, _depth); + } + + function clear(StdStorage storage self) internal { + stdStorageSafe.clear(self); + } + + function checked_write(StdStorage storage self, address who) internal { + checked_write(self, bytes32(uint256(uint160(who)))); + } + + function checked_write(StdStorage storage self, uint256 amt) internal { + checked_write(self, bytes32(amt)); + } + + function checked_write_int(StdStorage storage self, int256 val) internal { + checked_write(self, bytes32(uint256(val))); + } + + function checked_write(StdStorage storage self, bool write) internal { + bytes32 t; + assembly ("memory-safe") { + t := write + } + checked_write(self, t); + } + + function checked_write(StdStorage storage self, bytes32 set) internal { + address who = self._target; + bytes4 fsig = self._sig; + uint256 field_depth = self._depth; + bytes memory params = stdStorageSafe.getCallParams(self); + + if (!self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) { + find(self, false); + } + FindData storage data = self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; + if ((data.offsetLeft + data.offsetRight) > 0) { + uint256 maxVal = 2 ** (256 - (data.offsetLeft + data.offsetRight)); + require( + uint256(set) < maxVal, + string( + abi.encodePacked( + "stdStorage checked_write(StdStorage): Packed slot. We can't fit value greater than ", + vm.toString(maxVal) + ) + ) + ); + } + bytes32 curVal = vm.load(who, bytes32(data.slot)); + bytes32 valToSet = stdStorageSafe.getUpdatedSlotValue(curVal, uint256(set), data.offsetLeft, data.offsetRight); + + vm.store(who, bytes32(data.slot), valToSet); + + (bool success, bytes32 callResult) = stdStorageSafe.callTarget(self); + + if (!success || callResult != set) { + vm.store(who, bytes32(data.slot), curVal); + revert("stdStorage checked_write(StdStorage): Failed to write value."); + } + clear(self); + } + + function read_bytes32(StdStorage storage self) internal returns (bytes32) { + return stdStorageSafe.read_bytes32(self); + } + + function read_bool(StdStorage storage self) internal returns (bool) { + return stdStorageSafe.read_bool(self); + } + + function read_address(StdStorage storage self) internal returns (address) { + return stdStorageSafe.read_address(self); + } + + function read_uint(StdStorage storage self) internal returns (uint256) { + return stdStorageSafe.read_uint(self); + } + + function read_int(StdStorage storage self) internal returns (int256) { + return stdStorageSafe.read_int(self); + } + + function parent(StdStorage storage self) internal returns (uint256, bytes32) { + return stdStorageSafe.parent(self); + } + + function root(StdStorage storage self) internal returns (uint256) { + return stdStorageSafe.root(self); + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdStyle.sol b/dependencies/forge-std-1.16.1/src/StdStyle.sol new file mode 100644 index 00000000..ad63400f --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdStyle.sol @@ -0,0 +1,333 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {VmSafe} from "./Vm.sol"; + +library StdStyle { + VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); + + string constant RED = "\u001b[91m"; + string constant GREEN = "\u001b[92m"; + string constant YELLOW = "\u001b[93m"; + string constant BLUE = "\u001b[94m"; + string constant MAGENTA = "\u001b[95m"; + string constant CYAN = "\u001b[96m"; + string constant BOLD = "\u001b[1m"; + string constant DIM = "\u001b[2m"; + string constant ITALIC = "\u001b[3m"; + string constant UNDERLINE = "\u001b[4m"; + string constant INVERSE = "\u001b[7m"; + string constant RESET = "\u001b[0m"; + + function styleConcat(string memory style, string memory self) private pure returns (string memory) { + return string(abi.encodePacked(style, self, RESET)); + } + + function red(string memory self) internal pure returns (string memory) { + return styleConcat(RED, self); + } + + function red(uint256 self) internal pure returns (string memory) { + return red(vm.toString(self)); + } + + function red(int256 self) internal pure returns (string memory) { + return red(vm.toString(self)); + } + + function red(address self) internal pure returns (string memory) { + return red(vm.toString(self)); + } + + function red(bool self) internal pure returns (string memory) { + return red(vm.toString(self)); + } + + function redBytes(bytes memory self) internal pure returns (string memory) { + return red(vm.toString(self)); + } + + function redBytes32(bytes32 self) internal pure returns (string memory) { + return red(vm.toString(self)); + } + + function green(string memory self) internal pure returns (string memory) { + return styleConcat(GREEN, self); + } + + function green(uint256 self) internal pure returns (string memory) { + return green(vm.toString(self)); + } + + function green(int256 self) internal pure returns (string memory) { + return green(vm.toString(self)); + } + + function green(address self) internal pure returns (string memory) { + return green(vm.toString(self)); + } + + function green(bool self) internal pure returns (string memory) { + return green(vm.toString(self)); + } + + function greenBytes(bytes memory self) internal pure returns (string memory) { + return green(vm.toString(self)); + } + + function greenBytes32(bytes32 self) internal pure returns (string memory) { + return green(vm.toString(self)); + } + + function yellow(string memory self) internal pure returns (string memory) { + return styleConcat(YELLOW, self); + } + + function yellow(uint256 self) internal pure returns (string memory) { + return yellow(vm.toString(self)); + } + + function yellow(int256 self) internal pure returns (string memory) { + return yellow(vm.toString(self)); + } + + function yellow(address self) internal pure returns (string memory) { + return yellow(vm.toString(self)); + } + + function yellow(bool self) internal pure returns (string memory) { + return yellow(vm.toString(self)); + } + + function yellowBytes(bytes memory self) internal pure returns (string memory) { + return yellow(vm.toString(self)); + } + + function yellowBytes32(bytes32 self) internal pure returns (string memory) { + return yellow(vm.toString(self)); + } + + function blue(string memory self) internal pure returns (string memory) { + return styleConcat(BLUE, self); + } + + function blue(uint256 self) internal pure returns (string memory) { + return blue(vm.toString(self)); + } + + function blue(int256 self) internal pure returns (string memory) { + return blue(vm.toString(self)); + } + + function blue(address self) internal pure returns (string memory) { + return blue(vm.toString(self)); + } + + function blue(bool self) internal pure returns (string memory) { + return blue(vm.toString(self)); + } + + function blueBytes(bytes memory self) internal pure returns (string memory) { + return blue(vm.toString(self)); + } + + function blueBytes32(bytes32 self) internal pure returns (string memory) { + return blue(vm.toString(self)); + } + + function magenta(string memory self) internal pure returns (string memory) { + return styleConcat(MAGENTA, self); + } + + function magenta(uint256 self) internal pure returns (string memory) { + return magenta(vm.toString(self)); + } + + function magenta(int256 self) internal pure returns (string memory) { + return magenta(vm.toString(self)); + } + + function magenta(address self) internal pure returns (string memory) { + return magenta(vm.toString(self)); + } + + function magenta(bool self) internal pure returns (string memory) { + return magenta(vm.toString(self)); + } + + function magentaBytes(bytes memory self) internal pure returns (string memory) { + return magenta(vm.toString(self)); + } + + function magentaBytes32(bytes32 self) internal pure returns (string memory) { + return magenta(vm.toString(self)); + } + + function cyan(string memory self) internal pure returns (string memory) { + return styleConcat(CYAN, self); + } + + function cyan(uint256 self) internal pure returns (string memory) { + return cyan(vm.toString(self)); + } + + function cyan(int256 self) internal pure returns (string memory) { + return cyan(vm.toString(self)); + } + + function cyan(address self) internal pure returns (string memory) { + return cyan(vm.toString(self)); + } + + function cyan(bool self) internal pure returns (string memory) { + return cyan(vm.toString(self)); + } + + function cyanBytes(bytes memory self) internal pure returns (string memory) { + return cyan(vm.toString(self)); + } + + function cyanBytes32(bytes32 self) internal pure returns (string memory) { + return cyan(vm.toString(self)); + } + + function bold(string memory self) internal pure returns (string memory) { + return styleConcat(BOLD, self); + } + + function bold(uint256 self) internal pure returns (string memory) { + return bold(vm.toString(self)); + } + + function bold(int256 self) internal pure returns (string memory) { + return bold(vm.toString(self)); + } + + function bold(address self) internal pure returns (string memory) { + return bold(vm.toString(self)); + } + + function bold(bool self) internal pure returns (string memory) { + return bold(vm.toString(self)); + } + + function boldBytes(bytes memory self) internal pure returns (string memory) { + return bold(vm.toString(self)); + } + + function boldBytes32(bytes32 self) internal pure returns (string memory) { + return bold(vm.toString(self)); + } + + function dim(string memory self) internal pure returns (string memory) { + return styleConcat(DIM, self); + } + + function dim(uint256 self) internal pure returns (string memory) { + return dim(vm.toString(self)); + } + + function dim(int256 self) internal pure returns (string memory) { + return dim(vm.toString(self)); + } + + function dim(address self) internal pure returns (string memory) { + return dim(vm.toString(self)); + } + + function dim(bool self) internal pure returns (string memory) { + return dim(vm.toString(self)); + } + + function dimBytes(bytes memory self) internal pure returns (string memory) { + return dim(vm.toString(self)); + } + + function dimBytes32(bytes32 self) internal pure returns (string memory) { + return dim(vm.toString(self)); + } + + function italic(string memory self) internal pure returns (string memory) { + return styleConcat(ITALIC, self); + } + + function italic(uint256 self) internal pure returns (string memory) { + return italic(vm.toString(self)); + } + + function italic(int256 self) internal pure returns (string memory) { + return italic(vm.toString(self)); + } + + function italic(address self) internal pure returns (string memory) { + return italic(vm.toString(self)); + } + + function italic(bool self) internal pure returns (string memory) { + return italic(vm.toString(self)); + } + + function italicBytes(bytes memory self) internal pure returns (string memory) { + return italic(vm.toString(self)); + } + + function italicBytes32(bytes32 self) internal pure returns (string memory) { + return italic(vm.toString(self)); + } + + function underline(string memory self) internal pure returns (string memory) { + return styleConcat(UNDERLINE, self); + } + + function underline(uint256 self) internal pure returns (string memory) { + return underline(vm.toString(self)); + } + + function underline(int256 self) internal pure returns (string memory) { + return underline(vm.toString(self)); + } + + function underline(address self) internal pure returns (string memory) { + return underline(vm.toString(self)); + } + + function underline(bool self) internal pure returns (string memory) { + return underline(vm.toString(self)); + } + + function underlineBytes(bytes memory self) internal pure returns (string memory) { + return underline(vm.toString(self)); + } + + function underlineBytes32(bytes32 self) internal pure returns (string memory) { + return underline(vm.toString(self)); + } + + function inverse(string memory self) internal pure returns (string memory) { + return styleConcat(INVERSE, self); + } + + function inverse(uint256 self) internal pure returns (string memory) { + return inverse(vm.toString(self)); + } + + function inverse(int256 self) internal pure returns (string memory) { + return inverse(vm.toString(self)); + } + + function inverse(address self) internal pure returns (string memory) { + return inverse(vm.toString(self)); + } + + function inverse(bool self) internal pure returns (string memory) { + return inverse(vm.toString(self)); + } + + function inverseBytes(bytes memory self) internal pure returns (string memory) { + return inverse(vm.toString(self)); + } + + function inverseBytes32(bytes32 self) internal pure returns (string memory) { + return inverse(vm.toString(self)); + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdToml.sol b/dependencies/forge-std-1.16.1/src/StdToml.sol new file mode 100644 index 00000000..71ee6607 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdToml.sol @@ -0,0 +1,275 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {VmSafe} from "./Vm.sol"; + +// Helpers for parsing and writing TOML files +// To parse: +// ``` +// using stdToml for string; +// string memory toml = vm.readFile(""); +// toml.readUint(""); +// ``` +// To write: +// ``` +// using stdToml for string; +// string memory toml = "toml"; +// toml.serialize("a", uint256(123)); +// string memory semiFinal = toml.serialize("b", string("test")); +// string memory finalToml = toml.serialize("c", semiFinal); +// finalToml.write(""); +// ``` + +library stdToml { + VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); + + function keyExists(string memory toml, string memory key) internal view returns (bool) { + return vm.keyExistsToml(toml, key); + } + + function parseRaw(string memory toml, string memory key) internal pure returns (bytes memory) { + return vm.parseToml(toml, key); + } + + function readUint(string memory toml, string memory key) internal pure returns (uint256) { + return vm.parseTomlUint(toml, key); + } + + function readUintArray(string memory toml, string memory key) internal pure returns (uint256[] memory) { + return vm.parseTomlUintArray(toml, key); + } + + function readInt(string memory toml, string memory key) internal pure returns (int256) { + return vm.parseTomlInt(toml, key); + } + + function readIntArray(string memory toml, string memory key) internal pure returns (int256[] memory) { + return vm.parseTomlIntArray(toml, key); + } + + function readBytes32(string memory toml, string memory key) internal pure returns (bytes32) { + return vm.parseTomlBytes32(toml, key); + } + + function readBytes32Array(string memory toml, string memory key) internal pure returns (bytes32[] memory) { + return vm.parseTomlBytes32Array(toml, key); + } + + function readString(string memory toml, string memory key) internal pure returns (string memory) { + return vm.parseTomlString(toml, key); + } + + function readStringArray(string memory toml, string memory key) internal pure returns (string[] memory) { + return vm.parseTomlStringArray(toml, key); + } + + function readAddress(string memory toml, string memory key) internal pure returns (address) { + return vm.parseTomlAddress(toml, key); + } + + function readAddressArray(string memory toml, string memory key) internal pure returns (address[] memory) { + return vm.parseTomlAddressArray(toml, key); + } + + function readBool(string memory toml, string memory key) internal pure returns (bool) { + return vm.parseTomlBool(toml, key); + } + + function readBoolArray(string memory toml, string memory key) internal pure returns (bool[] memory) { + return vm.parseTomlBoolArray(toml, key); + } + + function readBytes(string memory toml, string memory key) internal pure returns (bytes memory) { + return vm.parseTomlBytes(toml, key); + } + + function readBytesArray(string memory toml, string memory key) internal pure returns (bytes[] memory) { + return vm.parseTomlBytesArray(toml, key); + } + + function readUintOr(string memory toml, string memory key, uint256 defaultValue) internal view returns (uint256) { + return keyExists(toml, key) ? readUint(toml, key) : defaultValue; + } + + function readUintArrayOr(string memory toml, string memory key, uint256[] memory defaultValue) + internal + view + returns (uint256[] memory) + { + return keyExists(toml, key) ? readUintArray(toml, key) : defaultValue; + } + + function readIntOr(string memory toml, string memory key, int256 defaultValue) internal view returns (int256) { + return keyExists(toml, key) ? readInt(toml, key) : defaultValue; + } + + function readIntArrayOr(string memory toml, string memory key, int256[] memory defaultValue) + internal + view + returns (int256[] memory) + { + return keyExists(toml, key) ? readIntArray(toml, key) : defaultValue; + } + + function readBytes32Or(string memory toml, string memory key, bytes32 defaultValue) + internal + view + returns (bytes32) + { + return keyExists(toml, key) ? readBytes32(toml, key) : defaultValue; + } + + function readBytes32ArrayOr(string memory toml, string memory key, bytes32[] memory defaultValue) + internal + view + returns (bytes32[] memory) + { + return keyExists(toml, key) ? readBytes32Array(toml, key) : defaultValue; + } + + function readStringOr(string memory toml, string memory key, string memory defaultValue) + internal + view + returns (string memory) + { + return keyExists(toml, key) ? readString(toml, key) : defaultValue; + } + + function readStringArrayOr(string memory toml, string memory key, string[] memory defaultValue) + internal + view + returns (string[] memory) + { + return keyExists(toml, key) ? readStringArray(toml, key) : defaultValue; + } + + function readAddressOr(string memory toml, string memory key, address defaultValue) + internal + view + returns (address) + { + return keyExists(toml, key) ? readAddress(toml, key) : defaultValue; + } + + function readAddressArrayOr(string memory toml, string memory key, address[] memory defaultValue) + internal + view + returns (address[] memory) + { + return keyExists(toml, key) ? readAddressArray(toml, key) : defaultValue; + } + + function readBoolOr(string memory toml, string memory key, bool defaultValue) internal view returns (bool) { + return keyExists(toml, key) ? readBool(toml, key) : defaultValue; + } + + function readBoolArrayOr(string memory toml, string memory key, bool[] memory defaultValue) + internal + view + returns (bool[] memory) + { + return keyExists(toml, key) ? readBoolArray(toml, key) : defaultValue; + } + + function readBytesOr(string memory toml, string memory key, bytes memory defaultValue) + internal + view + returns (bytes memory) + { + return keyExists(toml, key) ? readBytes(toml, key) : defaultValue; + } + + function readBytesArrayOr(string memory toml, string memory key, bytes[] memory defaultValue) + internal + view + returns (bytes[] memory) + { + return keyExists(toml, key) ? readBytesArray(toml, key) : defaultValue; + } + + function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) { + return vm.serializeJson(jsonKey, rootObject); + } + + function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) { + return vm.serializeBool(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bool[] memory value) internal returns (string memory) { + return vm.serializeBool(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) { + return vm.serializeUint(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, uint256[] memory value) + internal + returns (string memory) + { + return vm.serializeUint(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) { + return vm.serializeInt(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, int256[] memory value) + internal + returns (string memory) + { + return vm.serializeInt(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) { + return vm.serializeAddress(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, address[] memory value) + internal + returns (string memory) + { + return vm.serializeAddress(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) { + return vm.serializeBytes32(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes32[] memory value) + internal + returns (string memory) + { + return vm.serializeBytes32(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) { + return vm.serializeBytes(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, bytes[] memory value) + internal + returns (string memory) + { + return vm.serializeBytes(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, string memory value) internal returns (string memory) { + return vm.serializeString(jsonKey, key, value); + } + + function serialize(string memory jsonKey, string memory key, string[] memory value) + internal + returns (string memory) + { + return vm.serializeString(jsonKey, key, value); + } + + function write(string memory jsonKey, string memory path) internal { + vm.writeToml(jsonKey, path); + } + + function write(string memory jsonKey, string memory path, string memory valueKey) internal { + vm.writeToml(jsonKey, path, valueKey); + } +} diff --git a/dependencies/forge-std-1.16.1/src/StdUtils.sol b/dependencies/forge-std-1.16.1/src/StdUtils.sol new file mode 100644 index 00000000..5cdc1e1a --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/StdUtils.sol @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IMulticall3} from "./interfaces/IMulticall3.sol"; +import {StdConstants} from "./StdConstants.sol"; +import {VmSafe} from "./Vm.sol"; + +abstract contract StdUtils { + /*////////////////////////////////////////////////////////////////////////// + CONSTANTS + //////////////////////////////////////////////////////////////////////////*/ + + VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); + address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; + uint256 private constant INT256_MIN_ABS = + 57896044618658097711785492504343953926634992332820282019728792003956564819968; + uint256 private constant SECP256K1_ORDER = + 115792089237316195423570985008687907852837564279074904382605163141518161494337; + uint256 private constant UINT256_MAX = + 115792089237316195423570985008687907853269984665640564039457584007913129639935; + + /*////////////////////////////////////////////////////////////////////////// + INTERNAL FUNCTIONS + //////////////////////////////////////////////////////////////////////////*/ + + function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) { + require(min <= max, "StdUtils bound(uint256,uint256,uint256): Max is less than min."); + // If x is between min and max, return x directly. This is to ensure that dictionary values + // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188 + if (x >= min && x <= max) return x; + + uint256 size = max - min + 1; + + // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side. + // This helps ensure coverage of the min/max values. + if (x <= 3 && size > x) return min + x; + if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x); + + // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive. + if (x > max) { + uint256 diff = x - max; + uint256 rem = diff % size; + if (rem == 0) return max; + result = min + rem - 1; + } else if (x < min) { + uint256 diff = min - x; + uint256 rem = diff % size; + if (rem == 0) return min; + result = max - rem + 1; + } + } + + function bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) { + result = _bound(x, min, max); + } + + function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) { + require(min <= max, "StdUtils bound(int256,int256,int256): Max is less than min."); + + // Shifting all int256 values to uint256 to use _bound function. The range of two types are: + // int256 : -(2**255) ~ (2**255 - 1) + // uint256: 0 ~ (2**256 - 1) + // So, add 2**255, INT256_MIN_ABS to the integer values. + // + // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow. + // So, use `~uint256(x) + 1` instead. + uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS); + uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS); + uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS); + + uint256 y = _bound(_x, _min, _max); + + // To move it back to int256 value, subtract INT256_MIN_ABS at here. + result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS); + } + + function bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) { + result = _bound(x, min, max); + } + + function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) { + result = _bound(privateKey, 1, SECP256K1_ORDER - 1); + } + + function bytesToUint(bytes memory b) internal pure virtual returns (uint256) { + require(b.length <= 32, "StdUtils bytesToUint(bytes): Bytes length exceeds 32."); + return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); + } + + /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce + function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) { + console2_log_StdUtils("computeCreateAddress is deprecated. Please use vm.computeCreateAddress instead."); + return vm.computeCreateAddress(deployer, nonce); + } + + function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer) + internal + pure + virtual + returns (address) + { + console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead."); + return vm.computeCreate2Address(salt, initcodeHash, deployer); + } + + /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer + function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) { + console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead."); + return vm.computeCreate2Address(salt, initCodeHash); + } + + /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments + /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode + function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) { + return hashInitCode(creationCode, ""); + } + + /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2 + /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode + /// @param args the ABI-encoded arguments to the constructor of C + function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) { + return keccak256(abi.encodePacked(creationCode, args)); + } + + // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses. + function getTokenBalances(address token, address[] memory addresses) + internal + virtual + returns (uint256[] memory balances) + { + uint256 tokenCodeSize; + assembly { + tokenCodeSize := extcodesize(token) + } + require(tokenCodeSize > 0, "StdUtils getTokenBalances(address,address[]): Token address is not a contract."); + + // ABI encode the aggregate call to Multicall3. + uint256 length = addresses.length; + IMulticall3.Call[] memory calls = new IMulticall3.Call[](length); + for (uint256 i = 0; i < length; ++i) { + // 0x70a08231 = bytes4(keccak256("balanceOf(address)")) + calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))}); + } + + // Make the aggregate call. + (, bytes[] memory returnData) = StdConstants.MULTICALL3_ADDRESS.aggregate(calls); + + // ABI decode the return data and return the balances. + balances = new uint256[](length); + for (uint256 i = 0; i < length; ++i) { + balances[i] = abi.decode(returnData[i], (uint256)); + } + } + + /*////////////////////////////////////////////////////////////////////////// + PRIVATE FUNCTIONS + //////////////////////////////////////////////////////////////////////////*/ + + function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) { + return address(uint160(uint256(bytesValue))); + } + + // This section is used to prevent the compilation of console, which shortens the compilation time when console is + // not used elsewhere. We also trick the compiler into letting us make the console log methods as `pure` to avoid + // any breaking changes to function signatures. + function _castLogPayloadViewToPure(function(bytes memory) internal view fnIn) + internal + pure + returns (function(bytes memory) internal pure fnOut) + { + assembly { + fnOut := fnIn + } + } + + function _sendLogPayload(bytes memory payload) internal pure { + _castLogPayloadViewToPure(_sendLogPayloadView)(payload); + } + + function _sendLogPayloadView(bytes memory payload) private view { + uint256 payloadLength = payload.length; + address consoleAddress = CONSOLE2_ADDRESS; + assembly ("memory-safe") { + let payloadStart := add(payload, 32) + let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) + } + } + + function console2_log_StdUtils(string memory p0) private pure { + _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); + } + + function console2_log_StdUtils(string memory p0, uint256 p1) private pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); + } + + function console2_log_StdUtils(string memory p0, string memory p1) private pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); + } +} diff --git a/dependencies/forge-std-1.16.1/src/Test.sol b/dependencies/forge-std-1.16.1/src/Test.sol new file mode 100644 index 00000000..af91dd81 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/Test.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +// 💬 ABOUT +// Forge Std's default Test. + +// 🧩 MODULES +import {console} from "./console.sol"; +import {console2} from "./console2.sol"; +import {safeconsole} from "./safeconsole.sol"; +import {StdAssertions} from "./StdAssertions.sol"; +import {StdChains} from "./StdChains.sol"; +import {StdCheats} from "./StdCheats.sol"; +import {StdConstants} from "./StdConstants.sol"; +import {stdError} from "./StdError.sol"; +import {StdInvariant} from "./StdInvariant.sol"; +import {stdJson} from "./StdJson.sol"; +import {stdMath} from "./StdMath.sol"; +import {StdStorage, stdStorage} from "./StdStorage.sol"; +import {StdStyle} from "./StdStyle.sol"; +import {stdToml} from "./StdToml.sol"; +import {StdUtils} from "./StdUtils.sol"; +import {Vm} from "./Vm.sol"; + +// 📦 BOILERPLATE +import {TestBase} from "./Base.sol"; + +// ⭐️ TEST +abstract contract Test is TestBase, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils { + // Note: IS_TEST() must return true. + bool public IS_TEST = true; +} diff --git a/dependencies/forge-std-1.16.1/src/Vm.sol b/dependencies/forge-std-1.16.1/src/Vm.sol new file mode 100644 index 00000000..e4123312 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/Vm.sol @@ -0,0 +1,2535 @@ +// Automatically @generated by scripts/vm.py. Do not modify manually. + +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may +/// result in Script simulations differing from on-chain execution. It is recommended to only use +/// these cheats in scripts. +interface VmSafe { + /// A modification applied to either `msg.sender` or `tx.origin`. Returned by `readCallers`. + enum CallerMode { + // No caller modification is currently active. + None, + // A one time broadcast triggered by a `vm.broadcast()` call is currently active. + Broadcast, + // A recurrent broadcast triggered by a `vm.startBroadcast()` call is currently active. + RecurrentBroadcast, + // A one time prank triggered by a `vm.prank()` call is currently active. + Prank, + // A recurrent prank triggered by a `vm.startPrank()` call is currently active. + RecurrentPrank + } + + /// The kind of account access that occurred. + enum AccountAccessKind { + // The account was called. + Call, + // The account was called via delegatecall. + DelegateCall, + // The account was called via callcode. + CallCode, + // The account was called via staticcall. + StaticCall, + // The account was created. + Create, + // The account was selfdestructed. + SelfDestruct, + // Synthetic access indicating the current context has resumed after a previous sub-context (AccountAccess). + Resume, + // The account's balance was read. + Balance, + // The account's codesize was read. + Extcodesize, + // The account's codehash was read. + Extcodehash, + // The account's code was copied. + Extcodecopy + } + + /// Forge execution contexts. + enum ForgeContext { + // Test group execution context (test, coverage or snapshot). + TestGroup, + // `forge test` execution context. + Test, + // `forge coverage` execution context. + Coverage, + // `forge snapshot` execution context. + Snapshot, + // Script group execution context (dry run, broadcast or resume). + ScriptGroup, + // `forge script` execution context. + ScriptDryRun, + // `forge script --broadcast` execution context. + ScriptBroadcast, + // `forge script --resume` execution context. + ScriptResume, + // Unknown `forge` execution context. + Unknown + } + + /// The transaction type (`txType`) of the broadcast. + enum BroadcastTxType { + // Represents a CALL broadcast tx. + Call, + // Represents a CREATE broadcast tx. + Create, + // Represents a CREATE2 broadcast tx. + Create2 + } + + /// An Ethereum log. Returned by `getRecordedLogs`. + struct Log { + // The topics of the log, including the signature, if any. + bytes32[] topics; + // The raw data of the log. + bytes data; + // The address of the log's emitter. + address emitter; + } + + /// An RPC URL and its alias. Returned by `rpcUrlStructs`. + struct Rpc { + // The alias of the RPC URL. + string key; + // The RPC URL. + string url; + } + + /// An RPC log object. Returned by `eth_getLogs`. + struct EthGetLogs { + // The address of the log's emitter. + address emitter; + // The topics of the log, including the signature, if any. + bytes32[] topics; + // The raw data of the log. + bytes data; + // The block hash. + bytes32 blockHash; + // The block number. + uint64 blockNumber; + // The transaction hash. + bytes32 transactionHash; + // The transaction index in the block. + uint64 transactionIndex; + // The log index. + uint256 logIndex; + // Whether the log was removed. + bool removed; + } + + /// A single entry in a directory listing. Returned by `readDir`. + struct DirEntry { + // The error message, if any. + string errorMessage; + // The path of the entry. + string path; + // The depth of the entry. + uint64 depth; + // Whether the entry is a directory. + bool isDir; + // Whether the entry is a symlink. + bool isSymlink; + } + + /// Metadata information about a file. + /// This structure is returned from the `fsMetadata` function and represents known + /// metadata about a file such as its permissions, size, modification + /// times, etc. + struct FsMetadata { + // True if this metadata is for a directory. + bool isDir; + // True if this metadata is for a symlink. + bool isSymlink; + // The size of the file, in bytes, this metadata is for. + uint256 length; + // True if this metadata is for a readonly (unwritable) file. + bool readOnly; + // The last modification time listed in this metadata. + uint256 modified; + // The last access time of this metadata. + uint256 accessed; + // The creation time listed in this metadata. + uint256 created; + } + + /// A wallet with a public and private key. + struct Wallet { + // The wallet's address. + address addr; + // The wallet's public key `X`. + uint256 publicKeyX; + // The wallet's public key `Y`. + uint256 publicKeyY; + // The wallet's private key. + uint256 privateKey; + } + + /// The result of a `tryFfi` call. + struct FfiResult { + // The exit code of the call. + int32 exitCode; + // The optionally hex-decoded `stdout` data. + bytes stdout; + // The `stderr` data. + bytes stderr; + } + + /// Information on the chain and fork. + struct ChainInfo { + // The fork identifier. Set to zero if no fork is active. + uint256 forkId; + // The chain ID of the current fork. + uint256 chainId; + } + + /// Information about a blockchain. + struct Chain { + // The chain name. + string name; + // The chain's Chain ID. + uint256 chainId; + // The chain's alias. (i.e. what gets specified in `foundry.toml`). + string chainAlias; + // A default RPC endpoint for this chain. + string rpcUrl; + } + + /// The result of a `stopAndReturnStateDiff` call. + struct AccountAccess { + // The chain and fork the access occurred. + ChainInfo chainInfo; + // The kind of account access that determines what the account is. + // If kind is Call, DelegateCall, StaticCall or CallCode, then the account is the callee. + // If kind is Create, then the account is the newly created account. + // If kind is SelfDestruct, then the account is the selfdestruct recipient. + // If kind is a Resume, then account represents a account context that has resumed. + AccountAccessKind kind; + // The account that was accessed. + // It's either the account created, callee or a selfdestruct recipient for CREATE, CALL or SELFDESTRUCT. + address account; + // What accessed the account. + address accessor; + // If the account was initialized or empty prior to the access. + // An account is considered initialized if it has code, a + // non-zero nonce, or a non-zero balance. + bool initialized; + // The previous balance of the accessed account. + uint256 oldBalance; + // The potential new balance of the accessed account. + // That is, all balance changes are recorded here, even if reverts occurred. + uint256 newBalance; + // Code of the account deployed by CREATE. + bytes deployedCode; + // Value passed along with the account access + uint256 value; + // Input data provided to the CREATE or CALL + bytes data; + // If this access reverted in either the current or parent context. + bool reverted; + // An ordered list of storage accesses made during an account access operation. + StorageAccess[] storageAccesses; + // Call depth traversed during the recording of state differences + uint64 depth; + // The previous nonce of the accessed account. + uint64 oldNonce; + // The new nonce of the accessed account. + uint64 newNonce; + } + + /// The storage accessed during an `AccountAccess`. + struct StorageAccess { + // The account whose storage was accessed. + address account; + // The slot that was accessed. + bytes32 slot; + // If the access was a write. + bool isWrite; + // The previous value of the slot. + bytes32 previousValue; + // The new value of the slot. + bytes32 newValue; + // If the access was reverted. + bool reverted; + } + + /// Gas used. Returned by `lastCallGas`. + struct Gas { + // The gas limit of the call. + uint64 gasLimit; + // The total gas used. + uint64 gasTotalUsed; + // DEPRECATED: The amount of gas used for memory expansion. Ref: + uint64 gasMemoryUsed; + // The amount of gas refunded. + int64 gasRefunded; + // The amount of gas remaining. + uint64 gasRemaining; + } + + /// The result of the `stopDebugTraceRecording` call + struct DebugStep { + // The stack before executing the step of the run. + // stack\[0\] represents the top of the stack. + // and only stack data relevant to the opcode execution is contained. + uint256[] stack; + // The memory input data before executing the step of the run. + // only input data relevant to the opcode execution is contained. + // e.g. for MLOAD, it will have memory\[offset:offset+32\] copied here. + // the offset value can be get by the stack data. + bytes memoryInput; + // The opcode that was accessed. + uint8 opcode; + // The call depth of the step. + uint64 depth; + // Whether the call end up with out of gas error. + bool isOutOfGas; + // The contract address where the opcode is running + address contractAddr; + } + + /// Represents a transaction's broadcast details. + struct BroadcastTxSummary { + // The hash of the transaction that was broadcasted + bytes32 txHash; + // Represent the type of transaction among CALL, CREATE, CREATE2 + BroadcastTxType txType; + // The address of the contract that was called or created. + // This is address of the contract that is created if the txType is CREATE or CREATE2. + address contractAddress; + // The block number the transaction landed in. + uint64 blockNumber; + // Status of the transaction, retrieved from the transaction receipt. + bool success; + } + + /// Holds a signed EIP-7702 authorization for an authority account to delegate to an implementation. + struct SignedDelegation { + // The y-parity of the recovered secp256k1 signature (0 or 1). + uint8 v; + // First 32 bytes of the signature. + bytes32 r; + // Second 32 bytes of the signature. + bytes32 s; + // The current nonce of the authority account at signing time. + // Used to ensure signature can't be replayed after account nonce changes. + uint64 nonce; + // Address of the contract implementation that will be delegated to. + // Gets encoded into delegation code: 0xef0100 || implementation. + address implementation; + } + + /// Represents a "potential" revert reason from a single subsequent call when using `vm.assumeNoReverts`. + /// Reverts that match will result in a FOUNDRY::ASSUME rejection, whereas unmatched reverts will be surfaced + /// as normal. + struct PotentialRevert { + // The allowed origin of the revert opcode; address(0) allows reverts from any address + address reverter; + // When true, only matches on the beginning of the revert data, otherwise, matches on entire revert data + bool partialMatch; + // The data to use to match encountered reverts + bytes revertData; + } + + /// An EIP-2930 access list item. + struct AccessListItem { + // The address to be added in access list. + address target; + // The storage keys to be added in access list. + bytes32[] storageKeys; + } + + // ======== Crypto ======== + + /// Generates an Ed25519 key pair from a deterministic salt. + /// Returns (publicKey, privateKey) as 32-byte values. + function createEd25519Key(bytes32 salt) external pure returns (bytes32 publicKey, bytes32 privateKey); + + /// Derives a private key from the name, labels the account with that name, and returns the wallet. + function createWallet(string calldata walletLabel) external returns (Wallet memory wallet); + + /// Generates a wallet from the private key and returns the wallet. + function createWallet(uint256 privateKey) external returns (Wallet memory wallet); + + /// Generates a wallet from the private key, labels the account with that name, and returns the wallet. + function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet); + + /// Derive a private key from a provided mnemonic string (or mnemonic file path) + /// at the derivation path `m/44'/60'/0'/0/{index}`. + function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey); + + /// Derive a private key from a provided mnemonic string (or mnemonic file path) + /// at `{derivationPath}{index}`. + function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) + external + pure + returns (uint256 privateKey); + + /// Derive a private key from a provided mnemonic string (or mnemonic file path) in the specified language + /// at the derivation path `m/44'/60'/0'/0/{index}`. + function deriveKey(string calldata mnemonic, uint32 index, string calldata language) + external + pure + returns (uint256 privateKey); + + /// Derive a private key from a provided mnemonic string (or mnemonic file path) in the specified language + /// at `{derivationPath}{index}`. + function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language) + external + pure + returns (uint256 privateKey); + + /// Derives the Ed25519 public key from a private key. + function publicKeyEd25519(bytes32 privateKey) external pure returns (bytes32 publicKey); + + /// Derives secp256r1 public key from the provided `privateKey`. + function publicKeyP256(uint256 privateKey) external pure returns (uint256 publicKeyX, uint256 publicKeyY); + + /// Adds a private key to the local forge wallet and returns the address. + function rememberKey(uint256 privateKey) external returns (address keyAddr); + + /// Derive a set number of wallets from a mnemonic at the derivation path `m/44'/60'/0'/0/{0..count}`. + /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned. + function rememberKeys(string calldata mnemonic, string calldata derivationPath, uint32 count) + external + returns (address[] memory keyAddrs); + + /// Derive a set number of wallets from a mnemonic in the specified language at the derivation path `m/44'/60'/0'/0/{0..count}`. + /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned. + function rememberKeys( + string calldata mnemonic, + string calldata derivationPath, + string calldata language, + uint32 count + ) external returns (address[] memory keyAddrs); + + /// Signs data with a `Wallet`. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + function signCompact(Wallet calldata wallet, bytes32 digest) external pure returns (bytes32 r, bytes32 vs); + + /// Signs `digest` with `privateKey` using the secp256k1 curve. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + function signCompact(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 vs); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + /// If `--sender` is provided, the signer with provided address is used, otherwise, + /// if exactly one signer is provided to the script, that signer is used. + /// Raises error if signer passed through `--sender` does not match any unlocked signers or + /// if `--sender` is not provided and not exactly one signer is passed to the script. + function signCompact(bytes32 digest) external pure returns (bytes32 r, bytes32 vs); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + /// Raises error if none of the signers passed into the script have provided address. + function signCompact(address signer, bytes32 digest) external pure returns (bytes32 r, bytes32 vs); + + /// Signs a message with namespace using Ed25519. + /// The signature covers namespace || message for domain separation. + /// Returns a 64-byte Ed25519 signature. + function signEd25519(bytes calldata namespace, bytes calldata message, bytes32 privateKey) + external + pure + returns (bytes memory signature); + + /// Signs `digest` with `privateKey` using the secp256r1 curve. + function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s); + + /// Signs `digest` with `privateKey` on the secp256k1 curve, using the given `nonce` + /// as the raw ephemeral k value in ECDSA (instead of deriving it deterministically). + function signWithNonceUnsafe(uint256 privateKey, bytes32 digest, uint256 nonce) + external + pure + returns (uint8 v, bytes32 r, bytes32 s); + + /// Signs data with a `Wallet`. + function sign(Wallet calldata wallet, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + + /// Signs `digest` with `privateKey` using the secp256k1 curve. + function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// If `--sender` is provided, the signer with provided address is used, otherwise, + /// if exactly one signer is provided to the script, that signer is used. + /// Raises error if signer passed through `--sender` does not match any unlocked signers or + /// if `--sender` is not provided and not exactly one signer is passed to the script. + function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// Raises error if none of the signers passed into the script have provided address. + function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + + /// Verifies an Ed25519 signature over namespace || message. + /// Returns true if signature is valid, false otherwise. + function verifyEd25519( + bytes calldata signature, + bytes calldata namespace, + bytes calldata message, + bytes32 publicKey + ) external pure returns (bool valid); + + // ======== Environment ======== + + /// Gets the environment variable `name` and parses it as `address`. + /// Reverts if the variable was not found or could not be parsed. + function envAddress(string calldata name) external view returns (address value); + + /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. + /// Reverts if the variable was not found or could not be parsed. + function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value); + + /// Gets the environment variable `name` and parses it as `bool`. + /// Reverts if the variable was not found or could not be parsed. + function envBool(string calldata name) external view returns (bool value); + + /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. + /// Reverts if the variable was not found or could not be parsed. + function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value); + + /// Gets the environment variable `name` and parses it as `bytes32`. + /// Reverts if the variable was not found or could not be parsed. + function envBytes32(string calldata name) external view returns (bytes32 value); + + /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. + /// Reverts if the variable was not found or could not be parsed. + function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value); + + /// Gets the environment variable `name` and parses it as `bytes`. + /// Reverts if the variable was not found or could not be parsed. + function envBytes(string calldata name) external view returns (bytes memory value); + + /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. + /// Reverts if the variable was not found or could not be parsed. + function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value); + + /// Gets the environment variable `name` and returns true if it exists, else returns false. + function envExists(string calldata name) external view returns (bool result); + + /// Gets the environment variable `name` and parses it as `int256`. + /// Reverts if the variable was not found or could not be parsed. + function envInt(string calldata name) external view returns (int256 value); + + /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. + /// Reverts if the variable was not found or could not be parsed. + function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value); + + /// Gets the environment variable `name` and parses it as `bool`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, bool defaultValue) external view returns (bool value); + + /// Gets the environment variable `name` and parses it as `uint256`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value); + + /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata delim, address[] calldata defaultValue) + external + view + returns (address[] memory value); + + /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue) + external + view + returns (bytes32[] memory value); + + /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata delim, string[] calldata defaultValue) + external + view + returns (string[] memory value); + + /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue) + external + view + returns (bytes[] memory value); + + /// Gets the environment variable `name` and parses it as `int256`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, int256 defaultValue) external view returns (int256 value); + + /// Gets the environment variable `name` and parses it as `address`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, address defaultValue) external view returns (address value); + + /// Gets the environment variable `name` and parses it as `bytes32`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value); + + /// Gets the environment variable `name` and parses it as `string`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value); + + /// Gets the environment variable `name` and parses it as `bytes`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value); + + /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue) + external + view + returns (bool[] memory value); + + /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue) + external + view + returns (uint256[] memory value); + + /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. + /// Reverts if the variable could not be parsed. + /// Returns `defaultValue` if the variable was not found. + function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue) + external + view + returns (int256[] memory value); + + /// Gets the environment variable `name` and parses it as `string`. + /// Reverts if the variable was not found or could not be parsed. + function envString(string calldata name) external view returns (string memory value); + + /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. + /// Reverts if the variable was not found or could not be parsed. + function envString(string calldata name, string calldata delim) external view returns (string[] memory value); + + /// Gets the environment variable `name` and parses it as `uint256`. + /// Reverts if the variable was not found or could not be parsed. + function envUint(string calldata name) external view returns (uint256 value); + + /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. + /// Reverts if the variable was not found or could not be parsed. + function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value); + + /// Returns true if `forge` command was executed in given context. + function isContext(ForgeContext context) external view returns (bool result); + + /// Resolves the env variable placeholders of a given input string. + function resolveEnv(string calldata input) external returns (string memory); + + /// Sets environment variables. + function setEnv(string calldata name, string calldata value) external; + + // ======== EVM ======== + + /// Gets all accessed reads and write slot from a `vm.record` session, for a given address. + function accesses(address target) external view returns (bytes32[] memory readSlots, bytes32[] memory writeSlots); + + /// Gets the address for a given private key. + function addr(uint256 privateKey) external pure returns (address keyAddr); + + /// Gets all the logs according to specified filter. + function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics) + external + view + returns (EthGetLogs[] memory logs); + + /// Gets the current `block.blobbasefee`. + /// You should use this instead of `block.blobbasefee` if you use `vm.blobBaseFee`, as `block.blobbasefee` is assumed to be constant across a transaction, + /// and as a result will get optimized out by the compiler. + /// See https://github.com/foundry-rs/foundry/issues/6180 + function getBlobBaseFee() external view returns (uint256 blobBaseFee); + + /// Gets the current `block.number`. + /// You should use this instead of `block.number` if you use `vm.roll`, as `block.number` is assumed to be constant across a transaction, + /// and as a result will get optimized out by the compiler. + /// See https://github.com/foundry-rs/foundry/issues/6180 + function getBlockNumber() external view returns (uint256 height); + + /// Gets the current `block.timestamp`. + /// You should use this instead of `block.timestamp` if you use `vm.warp`, as `block.timestamp` is assumed to be constant across a transaction, + /// and as a result will get optimized out by the compiler. + /// See https://github.com/foundry-rs/foundry/issues/6180 + function getBlockTimestamp() external view returns (uint256 timestamp); + + /// Gets the current `block.chainid` of the currently selected environment. + /// You should use this instead of `block.chainid` if you use `vm.selectFork` or `vm.createSelectFork`, as `block.chainid` could be assumed + /// to be constant across a transaction, and as a result will get optimized out by the compiler. + /// See https://github.com/foundry-rs/foundry/issues/6180 + function getChainId() external view returns (uint256 blockChainId); + + /// Returns the test or script execution evm version. + /// **Note:** The execution evm version is not the same as the compilation one. + function getEvmVersion() external pure returns (string memory evm); + + /// Gets the map key and parent of a mapping at a given slot, for a given address. + function getMappingKeyAndParentOf(address target, bytes32 elementSlot) + external + view + returns (bool found, bytes32 key, bytes32 parent); + + /// Gets the number of elements in the mapping at the given slot, for a given address. + function getMappingLength(address target, bytes32 mappingSlot) external view returns (uint256 length); + + /// Gets the elements at index idx of the mapping at the given slot, for a given address. The + /// index must be less than the length of the mapping (i.e. the number of keys in the mapping). + function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external view returns (bytes32 value); + + /// Gets the nonce of an account. + function getNonce(address account) external view returns (uint64 nonce); + + /// Get the nonce of a `Wallet`. + function getNonce(Wallet calldata wallet) external view returns (uint64 nonce); + + /// Gets the RLP encoded block header for a given block number. + /// Returns the block header in the same format as `cast block --raw`. + function getRawBlockHeader(uint256 blockNumber) external view returns (bytes memory rlpHeader); + + /// Gets all the recorded logs. + function getRecordedLogs() external view returns (Log[] memory logs); + + /// Gets all the recorded logs, in JSON format. + function getRecordedLogsJson() external view returns (string memory logsJson); + + /// Returns state diffs from current `vm.startStateDiffRecording` session. + function getStateDiff() external view returns (string memory diff); + + /// Returns state diffs from current `vm.startStateDiffRecording` session, in json format. + function getStateDiffJson() external view returns (string memory diff); + + /// Returns an array of `StorageAccess` from current `vm.stateStateDiffRecording` session + function getStorageAccesses() external view returns (StorageAccess[] memory storageAccesses); + + /// Returns an array of storage slots occupied by the specified variable. + function getStorageSlots(address target, string calldata variableName) + external + view + returns (uint256[] memory slots); + + /// Gets the gas used in the last call from the callee perspective. + function lastCallGas() external view returns (Gas memory gas); + + /// Loads a storage slot from an address. + function load(address target, bytes32 slot) external view returns (bytes32 data); + + /// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused. + function pauseGasMetering() external; + + /// Records all storage reads and writes. Use `accesses` to get the recorded data. + /// Subsequent calls to `record` will clear the previous data. + function record() external; + + /// Record all the transaction logs. + function recordLogs() external; + + /// Reset gas metering (i.e. gas usage is set to gas limit). + function resetGasMetering() external; + + /// Resumes gas metering (i.e. gas usage is counted again). Noop if already on. + function resumeGasMetering() external; + + /// Performs an Ethereum JSON-RPC request to the current fork URL. + function rpc(string calldata method, string calldata params) external returns (bytes memory data); + + /// Performs an Ethereum JSON-RPC request to the given endpoint. + function rpc(string calldata urlOrAlias, string calldata method, string calldata params) + external + returns (bytes memory data); + + /// Set the exact test or script execution evm version, e.g. `berlin`, `cancun`. + /// **Note:** The execution evm version is not the same as the compilation one. + function setEvmVersion(string calldata evm) external; + + /// Records the debug trace during the run. + function startDebugTraceRecording() external; + + /// Starts recording all map SSTOREs for later retrieval. + function startMappingRecording() external; + + /// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order, + /// along with the context of the calls + function startStateDiffRecording() external; + + /// Stop debug trace recording and returns the recorded debug trace. + function stopAndReturnDebugTraceRecording() external returns (DebugStep[] memory step); + + /// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session. + function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses); + + /// Stops recording all map SSTOREs for later retrieval and clears the recorded data. + function stopMappingRecording() external; + + /// Stops recording storage reads and writes. + function stopRecord() external; + + // ======== Filesystem ======== + + /// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine. + /// `path` is relative to the project root. + function closeFile(string calldata path) external; + + /// Copies the contents of one file to another. This function will **overwrite** the contents of `to`. + /// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`. + /// Both `from` and `to` are relative to the project root. + function copyFile(string calldata from, string calldata to) external returns (uint64 copied); + + /// Creates a new, empty directory at the provided path. + /// This cheatcode will revert in the following situations, but is not limited to just these cases: + /// - User lacks permissions to modify `path`. + /// - A parent of the given path doesn't exist and `recursive` is false. + /// - `path` already exists and `recursive` is false. + /// `path` is relative to the project root. + function createDir(string calldata path, bool recursive) external; + + /// Get the source file path of the currently running test or script contract, + /// relative to the project root. + function currentFilePath() external view returns (string memory path); + + /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + function deployCode(string calldata artifactPath) external returns (address deployedAddress); + + /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + /// Additionally accepts abi-encoded constructor arguments. + function deployCode(string calldata artifactPath, bytes calldata constructorArgs) + external + returns (address deployedAddress); + + /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + /// Additionally accepts `msg.value`. + function deployCode(string calldata artifactPath, uint256 value) external returns (address deployedAddress); + + /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + /// Additionally accepts abi-encoded constructor arguments and `msg.value`. + function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value) + external + returns (address deployedAddress); + + /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + function deployCode(string calldata artifactPath, bytes32 salt) external returns (address deployedAddress); + + /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + /// Additionally accepts abi-encoded constructor arguments. + function deployCode(string calldata artifactPath, bytes calldata constructorArgs, bytes32 salt) + external + returns (address deployedAddress); + + /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + /// Additionally accepts `msg.value`. + function deployCode(string calldata artifactPath, uint256 value, bytes32 salt) + external + returns (address deployedAddress); + + /// Deploys a contract from an artifact file, using the CREATE2 salt. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Reverts if the target artifact contains unlinked library placeholders. + /// Additionally accepts abi-encoded constructor arguments and `msg.value`. + function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value, bytes32 salt) + external + returns (address deployedAddress); + + /// Returns true if the given path points to an existing entity, else returns false. + function exists(string calldata path) external view returns (bool result); + + /// Performs a foreign function call via the terminal. + function ffi(string[] calldata commandInput) external returns (bytes memory result); + + /// Given a path, query the file system to get information about a file, directory, etc. + function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata); + + /// Gets the artifact path from code (aka. creation code). + function getArtifactPathByCode(bytes calldata code) external view returns (string memory path); + + /// Gets the artifact path from deployed code (aka. runtime code). + function getArtifactPathByDeployedCode(bytes calldata deployedCode) external view returns (string memory path); + + /// Returns the most recent broadcast for the given contract on `chainId` matching `txType`. + /// For example: + /// The most recent deployment can be fetched by passing `txType` as `CREATE` or `CREATE2`. + /// The most recent call can be fetched by passing `txType` as `CALL`. + function getBroadcast(string calldata contractName, uint64 chainId, BroadcastTxType txType) + external + view + returns (BroadcastTxSummary memory); + + /// Returns all broadcasts for the given contract on `chainId` with the specified `txType`. + /// Sorted such that the most recent broadcast is the first element, and the oldest is the last. i.e descending order of BroadcastTxSummary.blockNumber. + function getBroadcasts(string calldata contractName, uint64 chainId, BroadcastTxType txType) + external + view + returns (BroadcastTxSummary[] memory); + + /// Returns all broadcasts for the given contract on `chainId`. + /// Sorted such that the most recent broadcast is the first element, and the oldest is the last. i.e descending order of BroadcastTxSummary.blockNumber. + function getBroadcasts(string calldata contractName, uint64 chainId) + external + view + returns (BroadcastTxSummary[] memory); + + /// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode); + + /// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode); + + /// Returns the most recent deployment for the current `chainId`. + function getDeployment(string calldata contractName) external view returns (address deployedAddress); + + /// Returns the most recent deployment for the given contract on `chainId` + function getDeployment(string calldata contractName, uint64 chainId) external view returns (address deployedAddress); + + /// Returns all deployments for the given contract on `chainId` + /// Sorted in descending order of deployment time i.e descending order of BroadcastTxSummary.blockNumber. + /// The most recent deployment is the first element, and the oldest is the last. + function getDeployments(string calldata contractName, uint64 chainId) + external + view + returns (address[] memory deployedAddresses); + + /// Returns true if the path exists on disk and is pointing at a directory, else returns false. + function isDir(string calldata path) external view returns (bool result); + + /// Returns true if the path exists on disk and is pointing at a regular file, else returns false. + function isFile(string calldata path) external view returns (bool result); + + /// Get the path of the current project root. + function projectRoot() external view returns (string memory path); + + /// Prompts the user for a string value in the terminal. + function prompt(string calldata promptText) external returns (string memory input); + + /// Prompts the user for an address in the terminal. + function promptAddress(string calldata promptText) external returns (address); + + /// Prompts the user for a hidden string value in the terminal. + function promptSecret(string calldata promptText) external returns (string memory input); + + /// Prompts the user for hidden uint256 in the terminal (usually pk). + function promptSecretUint(string calldata promptText) external returns (uint256); + + /// Prompts the user for uint256 in the terminal. + function promptUint(string calldata promptText) external returns (uint256); + + /// Reads the directory at the given path recursively, up to `maxDepth`. + /// `maxDepth` defaults to 1, meaning only the direct children of the given directory will be returned. + /// Follows symbolic links if `followLinks` is true. + function readDir(string calldata path) external view returns (DirEntry[] memory entries); + + /// See `readDir(string)`. + function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries); + + /// See `readDir(string)`. + function readDir(string calldata path, uint64 maxDepth, bool followLinks) + external + view + returns (DirEntry[] memory entries); + + /// Reads the entire content of file to string. `path` is relative to the project root. + function readFile(string calldata path) external view returns (string memory data); + + /// Reads the entire content of file as binary. `path` is relative to the project root. + function readFileBinary(string calldata path) external view returns (bytes memory data); + + /// Reads next line of file to string. + function readLine(string calldata path) external view returns (string memory line); + + /// Reads a symbolic link, returning the path that the link points to. + /// This cheatcode will revert in the following situations, but is not limited to just these cases: + /// - `path` is not a symbolic link. + /// - `path` does not exist. + function readLink(string calldata linkPath) external view returns (string memory targetPath); + + /// Removes a directory at the provided path. + /// This cheatcode will revert in the following situations, but is not limited to just these cases: + /// - `path` doesn't exist. + /// - `path` isn't a directory. + /// - User lacks permissions to modify `path`. + /// - The directory is not empty and `recursive` is false. + /// `path` is relative to the project root. + function removeDir(string calldata path, bool recursive) external; + + /// Removes a file from the filesystem. + /// This cheatcode will revert in the following situations, but is not limited to just these cases: + /// - `path` points to a directory. + /// - The file doesn't exist. + /// - The user lacks permissions to remove the file. + /// `path` is relative to the project root. + function removeFile(string calldata path) external; + + /// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr. + function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result); + + /// Returns the time since unix epoch in milliseconds. + function unixTime() external view returns (uint256 milliseconds); + + /// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does. + /// `path` is relative to the project root. + function writeFile(string calldata path, string calldata data) external; + + /// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does. + /// `path` is relative to the project root. + function writeFileBinary(string calldata path, bytes calldata data) external; + + /// Writes line to file, creating a file if it does not exist. + /// `path` is relative to the project root. + function writeLine(string calldata path, string calldata data) external; + + // ======== JSON ======== + + /// Checks if `key` exists in a JSON object. + function keyExistsJson(string calldata json, string calldata key) external view returns (bool); + + /// Parses a string of JSON data at `key` and coerces it to `address`. + function parseJsonAddress(string calldata json, string calldata key) external pure returns (address); + + /// Parses a string of JSON data at `key` and coerces it to `address[]`. + function parseJsonAddressArray(string calldata json, string calldata key) external pure returns (address[] memory); + + /// Parses a string of JSON data at `key` and coerces it to `bool`. + function parseJsonBool(string calldata json, string calldata key) external pure returns (bool); + + /// Parses a string of JSON data at `key` and coerces it to `bool[]`. + function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory); + + /// Parses a string of JSON data at `key` and coerces it to `bytes`. + function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory); + + /// Parses a string of JSON data at `key` and coerces it to `bytes32`. + function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32); + + /// Parses a string of JSON data at `key` and coerces it to `bytes32[]`. + function parseJsonBytes32Array(string calldata json, string calldata key) external pure returns (bytes32[] memory); + + /// Parses a string of JSON data at `key` and coerces it to `bytes[]`. + function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory); + + /// Parses a string of JSON data at `key` and coerces it to `int256`. + function parseJsonInt(string calldata json, string calldata key) external pure returns (int256); + + /// Parses a string of JSON data at `key` and coerces it to `int256[]`. + function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory); + + /// Returns an array of all the keys in a JSON object. + function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys); + + /// Parses a string of JSON data at `key` and coerces it to `string`. + function parseJsonString(string calldata json, string calldata key) external pure returns (string memory); + + /// Parses a string of JSON data at `key` and coerces it to `string[]`. + function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory); + + /// Parses a string of JSON data at `key` and coerces it to type array corresponding to `typeDescription`. + function parseJsonTypeArray(string calldata json, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of JSON data and coerces it to type corresponding to `typeDescription`. + function parseJsonType(string calldata json, string calldata typeDescription) external pure returns (bytes memory); + + /// Parses a string of JSON data at `key` and coerces it to type corresponding to `typeDescription`. + function parseJsonType(string calldata json, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of JSON data at `key` and coerces it to `uint256`. + function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256); + + /// Parses a string of JSON data at `key` and coerces it to `uint256[]`. + function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory); + + /// ABI-encodes a JSON object. + function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData); + + /// ABI-encodes a JSON object at `key`. + function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData); + + /// See `serializeJson`. + function serializeAddress(string calldata objectKey, string calldata valueKey, address value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeBool(string calldata objectKey, string calldata valueKey, bool value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeInt(string calldata objectKey, string calldata valueKey, int256 value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values) + external + returns (string memory json); + + /// Serializes a key and value to a JSON object stored in-memory that can be later written to a file. + /// Returns the stringified version of the specific JSON file up to that moment. + function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json); + + /// See `serializeJson`. + function serializeJsonType(string calldata typeDescription, bytes calldata value) + external + pure + returns (string memory json); + + /// See `serializeJson`. + function serializeJsonType( + string calldata objectKey, + string calldata valueKey, + string calldata typeDescription, + bytes calldata value + ) external returns (string memory json); + + /// See `serializeJson`. + function serializeString(string calldata objectKey, string calldata valueKey, string calldata value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeUintToHex(string calldata objectKey, string calldata valueKey, uint256 value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value) + external + returns (string memory json); + + /// See `serializeJson`. + function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values) + external + returns (string memory json); + + /// Write a serialized JSON object to a file. If the file exists, it will be overwritten. + function writeJson(string calldata json, string calldata path) external; + + /// Write a serialized JSON object to an **existing** JSON file, replacing a value with key = + /// This is useful to replace a specific value of a JSON file, without having to parse the entire thing. + /// This cheatcode will create new keys if they didn't previously exist. + function writeJson(string calldata json, string calldata path, string calldata valueKey) external; + + /// Checks if `key` exists in a JSON object + /// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions. + function keyExists(string calldata json, string calldata key) external view returns (bool); + + // ======== Scripting ======== + + /// Attach an EIP-4844 blob to the next call + function attachBlob(bytes calldata blob) external; + + /// Designate the next call as an EIP-7702 transaction + function attachDelegation(SignedDelegation calldata signedDelegation) external; + + /// Designate the next call as an EIP-7702 transaction, with optional cross-chain validity. + function attachDelegation(SignedDelegation calldata signedDelegation, bool crossChain) external; + + /// Takes a signed transaction and broadcasts it to the network. + function broadcastRawTransaction(bytes calldata data) external; + + /// Has the next call (at this call depth only) create transactions that can later be signed and sent onchain. + /// Broadcasting address is determined by checking the following in order: + /// 1. If `--sender` argument was provided, that address is used. + /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used. + /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used. + function broadcast() external; + + /// Has the next call (at this call depth only) create a transaction with the address provided + /// as the sender that can later be signed and sent onchain. + function broadcast(address signer) external; + + /// Has the next call (at this call depth only) create a transaction with the private key + /// provided as the sender that can later be signed and sent onchain. + function broadcast(uint256 privateKey) external; + + /// Returns addresses of available unlocked wallets in the script environment. + function getWallets() external view returns (address[] memory wallets); + + /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction + function signAndAttachDelegation(address implementation, uint256 privateKey) + external + returns (SignedDelegation memory signedDelegation); + + /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction for specific nonce + function signAndAttachDelegation(address implementation, uint256 privateKey, uint64 nonce) + external + returns (SignedDelegation memory signedDelegation); + + /// Sign an EIP-7702 authorization and designate the next call as an EIP-7702 transaction, with optional cross-chain validity. + function signAndAttachDelegation(address implementation, uint256 privateKey, bool crossChain) + external + returns (SignedDelegation memory signedDelegation); + + /// Sign an EIP-7702 authorization for delegation + function signDelegation(address implementation, uint256 privateKey) + external + returns (SignedDelegation memory signedDelegation); + + /// Sign an EIP-7702 authorization for delegation for specific nonce + function signDelegation(address implementation, uint256 privateKey, uint64 nonce) + external + returns (SignedDelegation memory signedDelegation); + + /// Sign an EIP-7702 authorization for delegation, with optional cross-chain validity. + function signDelegation(address implementation, uint256 privateKey, bool crossChain) + external + returns (SignedDelegation memory signedDelegation); + + /// Has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain. + /// Broadcasting address is determined by checking the following in order: + /// 1. If `--sender` argument was provided, that address is used. + /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used. + /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used. + function startBroadcast() external; + + /// Has all subsequent calls (at this call depth only) create transactions with the address + /// provided that can later be signed and sent onchain. + function startBroadcast(address signer) external; + + /// Has all subsequent calls (at this call depth only) create transactions with the private key + /// provided that can later be signed and sent onchain. + function startBroadcast(uint256 privateKey) external; + + /// Stops collecting onchain transactions. + function stopBroadcast() external; + + // ======== String ======== + + /// Returns true if `search` is found in `subject`, false otherwise. + function contains(string calldata subject, string calldata search) external pure returns (bool result); + + /// Returns the index of the first occurrence of a `key` in an `input` string. + /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `key` is not found. + /// Returns 0 in case of an empty `key`. + function indexOf(string calldata input, string calldata key) external pure returns (uint256); + + /// Parses the given `string` into an `address`. + function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue); + + /// Parses the given `string` into a `bool`. + function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue); + + /// Parses the given `string` into `bytes`. + function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue); + + /// Parses the given `string` into a `bytes32`. + function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue); + + /// Parses the given `string` into a `int256`. + function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue); + + /// Parses the given `string` into a `uint256`. + function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue); + + /// Replaces occurrences of `from` in the given `string` with `to`. + function replace(string calldata input, string calldata from, string calldata to) + external + pure + returns (string memory output); + + /// Splits the given `string` into an array of strings divided by the `delimiter`. + function split(string calldata input, string calldata delimiter) external pure returns (string[] memory outputs); + + /// Converts the given `string` value to Lowercase. + function toLowercase(string calldata input) external pure returns (string memory output); + + /// Converts the given value to a `string`. + function toString(address value) external pure returns (string memory stringifiedValue); + + /// Converts the given value to a `string`. + function toString(bytes calldata value) external pure returns (string memory stringifiedValue); + + /// Converts the given value to a `string`. + function toString(bytes32 value) external pure returns (string memory stringifiedValue); + + /// Converts the given value to a `string`. + function toString(bool value) external pure returns (string memory stringifiedValue); + + /// Converts the given value to a `string`. + function toString(uint256 value) external pure returns (string memory stringifiedValue); + + /// Converts the given value to a `string`. + function toString(int256 value) external pure returns (string memory stringifiedValue); + + /// Converts the given `string` value to Uppercase. + function toUppercase(string calldata input) external pure returns (string memory output); + + /// Trims leading and trailing whitespace from the given `string` value. + function trim(string calldata input) external pure returns (string memory output); + + // ======== Testing ======== + + /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. + /// Formats values with decimals in failure message. + function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) external pure; + + /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertApproxEqAbsDecimal( + uint256 left, + uint256 right, + uint256 maxDelta, + uint256 decimals, + string calldata err + ) external pure; + + /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. + /// Formats values with decimals in failure message. + function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) external pure; + + /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertApproxEqAbsDecimal( + int256 left, + int256 right, + uint256 maxDelta, + uint256 decimals, + string calldata err + ) external pure; + + /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. + function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) external pure; + + /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. + /// Includes error message into revert string on failure. + function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string calldata err) external pure; + + /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. + function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) external pure; + + /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. + /// Includes error message into revert string on failure. + function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string calldata err) external pure; + + /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + /// Formats values with decimals in failure message. + function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals) + external + pure; + + /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertApproxEqRelDecimal( + uint256 left, + uint256 right, + uint256 maxPercentDelta, + uint256 decimals, + string calldata err + ) external pure; + + /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + /// Formats values with decimals in failure message. + function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals) + external + pure; + + /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertApproxEqRelDecimal( + int256 left, + int256 right, + uint256 maxPercentDelta, + uint256 decimals, + string calldata err + ) external pure; + + /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta) external pure; + + /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + /// Includes error message into revert string on failure. + function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta, string calldata err) external pure; + + /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) external pure; + + /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. + /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% + /// Includes error message into revert string on failure. + function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta, string calldata err) external pure; + + /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. + function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; + + /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. + /// Includes error message into revert string on failure. + function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata err) external pure; + + /// Asserts that two `int256` values are equal, formatting them with decimals in failure message. + function assertEqDecimal(int256 left, int256 right, uint256 decimals) external pure; + + /// Asserts that two `int256` values are equal, formatting them with decimals in failure message. + /// Includes error message into revert string on failure. + function assertEqDecimal(int256 left, int256 right, uint256 decimals, string calldata err) external pure; + + /// Asserts that two `bool` values are equal. + function assertEq(bool left, bool right) external pure; + + /// Asserts that two `bool` values are equal and includes error message into revert string on failure. + function assertEq(bool left, bool right, string calldata err) external pure; + + /// Asserts that two `string` values are equal. + function assertEq(string calldata left, string calldata right) external pure; + + /// Asserts that two `string` values are equal and includes error message into revert string on failure. + function assertEq(string calldata left, string calldata right, string calldata err) external pure; + + /// Asserts that two `bytes` values are equal. + function assertEq(bytes calldata left, bytes calldata right) external pure; + + /// Asserts that two `bytes` values are equal and includes error message into revert string on failure. + function assertEq(bytes calldata left, bytes calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `bool` values are equal. + function assertEq(bool[] calldata left, bool[] calldata right) external pure; + + /// Asserts that two arrays of `bool` values are equal and includes error message into revert string on failure. + function assertEq(bool[] calldata left, bool[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `uint256 values are equal. + function assertEq(uint256[] calldata left, uint256[] calldata right) external pure; + + /// Asserts that two arrays of `uint256` values are equal and includes error message into revert string on failure. + function assertEq(uint256[] calldata left, uint256[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `int256` values are equal. + function assertEq(int256[] calldata left, int256[] calldata right) external pure; + + /// Asserts that two arrays of `int256` values are equal and includes error message into revert string on failure. + function assertEq(int256[] calldata left, int256[] calldata right, string calldata err) external pure; + + /// Asserts that two `uint256` values are equal. + function assertEq(uint256 left, uint256 right) external pure; + + /// Asserts that two arrays of `address` values are equal. + function assertEq(address[] calldata left, address[] calldata right) external pure; + + /// Asserts that two arrays of `address` values are equal and includes error message into revert string on failure. + function assertEq(address[] calldata left, address[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `bytes32` values are equal. + function assertEq(bytes32[] calldata left, bytes32[] calldata right) external pure; + + /// Asserts that two arrays of `bytes32` values are equal and includes error message into revert string on failure. + function assertEq(bytes32[] calldata left, bytes32[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `string` values are equal. + function assertEq(string[] calldata left, string[] calldata right) external pure; + + /// Asserts that two arrays of `string` values are equal and includes error message into revert string on failure. + function assertEq(string[] calldata left, string[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `bytes` values are equal. + function assertEq(bytes[] calldata left, bytes[] calldata right) external pure; + + /// Asserts that two arrays of `bytes` values are equal and includes error message into revert string on failure. + function assertEq(bytes[] calldata left, bytes[] calldata right, string calldata err) external pure; + + /// Asserts that two `uint256` values are equal and includes error message into revert string on failure. + function assertEq(uint256 left, uint256 right, string calldata err) external pure; + + /// Asserts that two `int256` values are equal. + function assertEq(int256 left, int256 right) external pure; + + /// Asserts that two `int256` values are equal and includes error message into revert string on failure. + function assertEq(int256 left, int256 right, string calldata err) external pure; + + /// Asserts that two `address` values are equal. + function assertEq(address left, address right) external pure; + + /// Asserts that two `address` values are equal and includes error message into revert string on failure. + function assertEq(address left, address right, string calldata err) external pure; + + /// Asserts that two `bytes32` values are equal. + function assertEq(bytes32 left, bytes32 right) external pure; + + /// Asserts that two `bytes32` values are equal and includes error message into revert string on failure. + function assertEq(bytes32 left, bytes32 right, string calldata err) external pure; + + /// Asserts that the given condition is false. + function assertFalse(bool condition) external pure; + + /// Asserts that the given condition is false and includes error message into revert string on failure. + function assertFalse(bool condition, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than or equal to second. + /// Formats values with decimals in failure message. + function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than or equal to second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be greater than or equal to second. + /// Formats values with decimals in failure message. + function assertGeDecimal(int256 left, int256 right, uint256 decimals) external pure; + + /// Compares two `int256` values. Expects first value to be greater than or equal to second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertGeDecimal(int256 left, int256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than or equal to second. + function assertGe(uint256 left, uint256 right) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than or equal to second. + /// Includes error message into revert string on failure. + function assertGe(uint256 left, uint256 right, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be greater than or equal to second. + function assertGe(int256 left, int256 right) external pure; + + /// Compares two `int256` values. Expects first value to be greater than or equal to second. + /// Includes error message into revert string on failure. + function assertGe(int256 left, int256 right, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than second. + /// Formats values with decimals in failure message. + function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be greater than second. + /// Formats values with decimals in failure message. + function assertGtDecimal(int256 left, int256 right, uint256 decimals) external pure; + + /// Compares two `int256` values. Expects first value to be greater than second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertGtDecimal(int256 left, int256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than second. + function assertGt(uint256 left, uint256 right) external pure; + + /// Compares two `uint256` values. Expects first value to be greater than second. + /// Includes error message into revert string on failure. + function assertGt(uint256 left, uint256 right, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be greater than second. + function assertGt(int256 left, int256 right) external pure; + + /// Compares two `int256` values. Expects first value to be greater than second. + /// Includes error message into revert string on failure. + function assertGt(int256 left, int256 right, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be less than or equal to second. + /// Formats values with decimals in failure message. + function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; + + /// Compares two `uint256` values. Expects first value to be less than or equal to second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be less than or equal to second. + /// Formats values with decimals in failure message. + function assertLeDecimal(int256 left, int256 right, uint256 decimals) external pure; + + /// Compares two `int256` values. Expects first value to be less than or equal to second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertLeDecimal(int256 left, int256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be less than or equal to second. + function assertLe(uint256 left, uint256 right) external pure; + + /// Compares two `uint256` values. Expects first value to be less than or equal to second. + /// Includes error message into revert string on failure. + function assertLe(uint256 left, uint256 right, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be less than or equal to second. + function assertLe(int256 left, int256 right) external pure; + + /// Compares two `int256` values. Expects first value to be less than or equal to second. + /// Includes error message into revert string on failure. + function assertLe(int256 left, int256 right, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be less than second. + /// Formats values with decimals in failure message. + function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; + + /// Compares two `uint256` values. Expects first value to be less than second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be less than second. + /// Formats values with decimals in failure message. + function assertLtDecimal(int256 left, int256 right, uint256 decimals) external pure; + + /// Compares two `int256` values. Expects first value to be less than second. + /// Formats values with decimals in failure message. Includes error message into revert string on failure. + function assertLtDecimal(int256 left, int256 right, uint256 decimals, string calldata err) external pure; + + /// Compares two `uint256` values. Expects first value to be less than second. + function assertLt(uint256 left, uint256 right) external pure; + + /// Compares two `uint256` values. Expects first value to be less than second. + /// Includes error message into revert string on failure. + function assertLt(uint256 left, uint256 right, string calldata err) external pure; + + /// Compares two `int256` values. Expects first value to be less than second. + function assertLt(int256 left, int256 right) external pure; + + /// Compares two `int256` values. Expects first value to be less than second. + /// Includes error message into revert string on failure. + function assertLt(int256 left, int256 right, string calldata err) external pure; + + /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. + function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; + + /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. + /// Includes error message into revert string on failure. + function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata err) external pure; + + /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. + function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) external pure; + + /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. + /// Includes error message into revert string on failure. + function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string calldata err) external pure; + + /// Asserts that two `bool` values are not equal. + function assertNotEq(bool left, bool right) external pure; + + /// Asserts that two `bool` values are not equal and includes error message into revert string on failure. + function assertNotEq(bool left, bool right, string calldata err) external pure; + + /// Asserts that two `string` values are not equal. + function assertNotEq(string calldata left, string calldata right) external pure; + + /// Asserts that two `string` values are not equal and includes error message into revert string on failure. + function assertNotEq(string calldata left, string calldata right, string calldata err) external pure; + + /// Asserts that two `bytes` values are not equal. + function assertNotEq(bytes calldata left, bytes calldata right) external pure; + + /// Asserts that two `bytes` values are not equal and includes error message into revert string on failure. + function assertNotEq(bytes calldata left, bytes calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `bool` values are not equal. + function assertNotEq(bool[] calldata left, bool[] calldata right) external pure; + + /// Asserts that two arrays of `bool` values are not equal and includes error message into revert string on failure. + function assertNotEq(bool[] calldata left, bool[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `uint256` values are not equal. + function assertNotEq(uint256[] calldata left, uint256[] calldata right) external pure; + + /// Asserts that two arrays of `uint256` values are not equal and includes error message into revert string on failure. + function assertNotEq(uint256[] calldata left, uint256[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `int256` values are not equal. + function assertNotEq(int256[] calldata left, int256[] calldata right) external pure; + + /// Asserts that two arrays of `int256` values are not equal and includes error message into revert string on failure. + function assertNotEq(int256[] calldata left, int256[] calldata right, string calldata err) external pure; + + /// Asserts that two `uint256` values are not equal. + function assertNotEq(uint256 left, uint256 right) external pure; + + /// Asserts that two arrays of `address` values are not equal. + function assertNotEq(address[] calldata left, address[] calldata right) external pure; + + /// Asserts that two arrays of `address` values are not equal and includes error message into revert string on failure. + function assertNotEq(address[] calldata left, address[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `bytes32` values are not equal. + function assertNotEq(bytes32[] calldata left, bytes32[] calldata right) external pure; + + /// Asserts that two arrays of `bytes32` values are not equal and includes error message into revert string on failure. + function assertNotEq(bytes32[] calldata left, bytes32[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `string` values are not equal. + function assertNotEq(string[] calldata left, string[] calldata right) external pure; + + /// Asserts that two arrays of `string` values are not equal and includes error message into revert string on failure. + function assertNotEq(string[] calldata left, string[] calldata right, string calldata err) external pure; + + /// Asserts that two arrays of `bytes` values are not equal. + function assertNotEq(bytes[] calldata left, bytes[] calldata right) external pure; + + /// Asserts that two arrays of `bytes` values are not equal and includes error message into revert string on failure. + function assertNotEq(bytes[] calldata left, bytes[] calldata right, string calldata err) external pure; + + /// Asserts that two `uint256` values are not equal and includes error message into revert string on failure. + function assertNotEq(uint256 left, uint256 right, string calldata err) external pure; + + /// Asserts that two `int256` values are not equal. + function assertNotEq(int256 left, int256 right) external pure; + + /// Asserts that two `int256` values are not equal and includes error message into revert string on failure. + function assertNotEq(int256 left, int256 right, string calldata err) external pure; + + /// Asserts that two `address` values are not equal. + function assertNotEq(address left, address right) external pure; + + /// Asserts that two `address` values are not equal and includes error message into revert string on failure. + function assertNotEq(address left, address right, string calldata err) external pure; + + /// Asserts that two `bytes32` values are not equal. + function assertNotEq(bytes32 left, bytes32 right) external pure; + + /// Asserts that two `bytes32` values are not equal and includes error message into revert string on failure. + function assertNotEq(bytes32 left, bytes32 right, string calldata err) external pure; + + /// Asserts that the given condition is true. + function assertTrue(bool condition) external pure; + + /// Asserts that the given condition is true and includes error message into revert string on failure. + function assertTrue(bool condition, string calldata err) external pure; + + /// If the condition is false, discard this run's fuzz inputs and generate new ones. + function assume(bool condition) external pure; + + /// Discard this run's fuzz inputs and generate new ones if next call reverted. + function assumeNoRevert() external pure; + + /// Discard this run's fuzz inputs and generate new ones if next call reverts with the potential revert parameters. + function assumeNoRevert(PotentialRevert calldata potentialRevert) external pure; + + /// Discard this run's fuzz inputs and generate new ones if next call reverts with the any of the potential revert parameters. + function assumeNoRevert(PotentialRevert[] calldata potentialReverts) external pure; + + /// Writes a breakpoint to jump to in the debugger. + function breakpoint(string calldata char) external pure; + + /// Writes a conditional breakpoint to jump to in the debugger. + function breakpoint(string calldata char, bool value) external pure; + + /// Returns true if the current Foundry version is greater than or equal to the given version. + /// The given version string must be in the format `major.minor.patch`. + /// This is equivalent to `foundryVersionCmp(version) >= 0`. + function foundryVersionAtLeast(string calldata version) external view returns (bool); + + /// Compares the current Foundry version with the given version string. + /// The given version string must be in the format `major.minor.patch`. + /// Returns: + /// -1 if current Foundry version is less than the given version + /// 0 if current Foundry version equals the given version + /// 1 if current Foundry version is greater than the given version + /// This result can then be used with a comparison operator against `0`. + /// For example, to check if the current Foundry version is greater than or equal to `1.0.0`: + /// `if (foundryVersionCmp("1.0.0") >= 0) { ... }` + function foundryVersionCmp(string calldata version) external view returns (int256); + + /// Returns a Chain struct for specific alias + function getChain(string calldata chainAlias) external view returns (Chain memory chain); + + /// Returns a Chain struct for specific chainId + function getChain(uint256 chainId) external view returns (Chain memory chain); + + /// Returns the Foundry version. + /// Format: -+.. + /// Sample output: 0.3.0-nightly+3cb96bde9b.1737036656.debug + /// Note: Build timestamps may vary slightly across platforms due to separate CI jobs. + /// For reliable version comparisons, use UNIX format (e.g., >= 1700000000) + /// to compare timestamps while ignoring minor time differences. + function getFoundryVersion() external view returns (string memory version); + + /// Returns the RPC url for the given alias. + function rpcUrl(string calldata rpcAlias) external view returns (string memory json); + + /// Returns all rpc urls and their aliases as structs. + function rpcUrlStructs() external view returns (Rpc[] memory urls); + + /// Returns all rpc urls and their aliases `[alias, url][]`. + function rpcUrls() external view returns (string[2][] memory urls); + + /// Suspends execution of the main thread for `duration` milliseconds. + function sleep(uint256 duration) external; + + // ======== Toml ======== + + /// Checks if `key` exists in a TOML table. + function keyExistsToml(string calldata toml, string calldata key) external view returns (bool); + + /// Parses a string of TOML data at `key` and coerces it to `address`. + function parseTomlAddress(string calldata toml, string calldata key) external pure returns (address); + + /// Parses a string of TOML data at `key` and coerces it to `address[]`. + function parseTomlAddressArray(string calldata toml, string calldata key) external pure returns (address[] memory); + + /// Parses a string of TOML data at `key` and coerces it to `bool`. + function parseTomlBool(string calldata toml, string calldata key) external pure returns (bool); + + /// Parses a string of TOML data at `key` and coerces it to `bool[]`. + function parseTomlBoolArray(string calldata toml, string calldata key) external pure returns (bool[] memory); + + /// Parses a string of TOML data at `key` and coerces it to `bytes`. + function parseTomlBytes(string calldata toml, string calldata key) external pure returns (bytes memory); + + /// Parses a string of TOML data at `key` and coerces it to `bytes32`. + function parseTomlBytes32(string calldata toml, string calldata key) external pure returns (bytes32); + + /// Parses a string of TOML data at `key` and coerces it to `bytes32[]`. + function parseTomlBytes32Array(string calldata toml, string calldata key) external pure returns (bytes32[] memory); + + /// Parses a string of TOML data at `key` and coerces it to `bytes[]`. + function parseTomlBytesArray(string calldata toml, string calldata key) external pure returns (bytes[] memory); + + /// Parses a string of TOML data at `key` and coerces it to `int256`. + function parseTomlInt(string calldata toml, string calldata key) external pure returns (int256); + + /// Parses a string of TOML data at `key` and coerces it to `int256[]`. + function parseTomlIntArray(string calldata toml, string calldata key) external pure returns (int256[] memory); + + /// Returns an array of all the keys in a TOML table. + function parseTomlKeys(string calldata toml, string calldata key) external pure returns (string[] memory keys); + + /// Parses a string of TOML data at `key` and coerces it to `string`. + function parseTomlString(string calldata toml, string calldata key) external pure returns (string memory); + + /// Parses a string of TOML data at `key` and coerces it to `string[]`. + function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory); + + /// Parses a string of TOML data at `key` and coerces it to type array corresponding to `typeDescription`. + function parseTomlTypeArray(string calldata toml, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of TOML data and coerces it to type corresponding to `typeDescription`. + function parseTomlType(string calldata toml, string calldata typeDescription) external pure returns (bytes memory); + + /// Parses a string of TOML data at `key` and coerces it to type corresponding to `typeDescription`. + function parseTomlType(string calldata toml, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of TOML data at `key` and coerces it to `uint256`. + function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256); + + /// Parses a string of TOML data at `key` and coerces it to `uint256[]`. + function parseTomlUintArray(string calldata toml, string calldata key) external pure returns (uint256[] memory); + + /// ABI-encodes a TOML table. + function parseToml(string calldata toml) external pure returns (bytes memory abiEncodedData); + + /// ABI-encodes a TOML table at `key`. + function parseToml(string calldata toml, string calldata key) external pure returns (bytes memory abiEncodedData); + + /// Takes serialized JSON, converts to TOML and write a serialized TOML to a file. + function writeToml(string calldata json, string calldata path) external; + + /// Takes serialized JSON, converts to TOML and write a serialized TOML table to an **existing** TOML file, replacing a value with key = + /// This is useful to replace a specific value of a TOML file, without having to parse the entire thing. + /// This cheatcode will create new keys if they didn't previously exist. + function writeToml(string calldata json, string calldata path, string calldata valueKey) external; + + // ======== Utilities ======== + + /// Returns an uint256 value bounded in given range and different from the current one. + function bound(uint256 current, uint256 min, uint256 max) external view returns (uint256); + + /// Returns an int256 value bounded in given range and different from the current one. + function bound(int256 current, int256 min, int256 max) external view returns (int256); + + /// Compute the address of a contract created with CREATE2 using the given CREATE2 deployer. + function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer) external pure returns (address); + + /// Compute the address of a contract created with CREATE2 using the default CREATE2 deployer. + function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address); + + /// Compute the address a contract will be deployed at for a given deployer address and nonce. + function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address); + + /// Generates the struct hash of the canonical EIP-712 type representation and its abi-encoded data. + /// Supports 2 different inputs: + /// 1. Name of the type (i.e. "PermitSingle"): + /// * requires previous binding generation with `forge bind-json`. + /// * bindings will be retrieved from the path configured in `foundry.toml`. + /// 2. String representation of the type (i.e. "Foo(Bar bar) Bar(uint256 baz)"). + /// * Note: the cheatcode will use the canonical type even if the input is malformated + /// with the wrong order of elements or with extra whitespaces. + function eip712HashStruct(string calldata typeNameOrDefinition, bytes calldata abiEncodedData) + external + pure + returns (bytes32 typeHash); + + /// Generates the struct hash of the canonical EIP-712 type representation and its abi-encoded data. + /// Requires previous binding generation with `forge bind-json`. + /// Params: + /// * `bindingsPath`: path where the output of `forge bind-json` is stored. + /// * `typeName`: Name of the type (i.e. "PermitSingle"). + /// * `abiEncodedData`: ABI-encoded data for the struct that is being hashed. + function eip712HashStruct(string calldata bindingsPath, string calldata typeName, bytes calldata abiEncodedData) + external + pure + returns (bytes32 typeHash); + + /// Generates the hash of the canonical EIP-712 type representation. + /// Supports 2 different inputs: + /// 1. Name of the type (i.e. "Transaction"): + /// * requires previous binding generation with `forge bind-json`. + /// * bindings will be retrieved from the path configured in `foundry.toml`. + /// 2. String representation of the type (i.e. "Foo(Bar bar) Bar(uint256 baz)"). + /// * Note: the cheatcode will output the canonical type even if the input is malformated + /// with the wrong order of elements or with extra whitespaces. + function eip712HashType(string calldata typeNameOrDefinition) external pure returns (bytes32 typeHash); + + /// Generates the hash of the canonical EIP-712 type representation. + /// Requires previous binding generation with `forge bind-json`. + /// Params: + /// * `bindingsPath`: path where the output of `forge bind-json` is stored. + /// * `typeName`: Name of the type (i.e. "Transaction"). + function eip712HashType(string calldata bindingsPath, string calldata typeName) + external + pure + returns (bytes32 typeHash); + + /// Generates a ready-to-sign digest of human-readable typed data following the EIP-712 standard. + function eip712HashTypedData(string calldata jsonData) external pure returns (bytes32 digest); + + /// Returns ENS namehash for provided string. + function ensNamehash(string calldata name) external pure returns (bytes32); + + /// RLP decodes an RLP payload into a list of bytes. + function fromRlp(bytes calldata rlp) external pure returns (bytes[] memory data); + + /// Gets the label for the specified address. + function getLabel(address account) external view returns (string memory currentLabel); + + /// Labels an address in call traces. + function label(address account, string calldata newLabel) external; + + /// Pauses collection of call traces. Useful in cases when you want to skip tracing of + /// complex calls which are not useful for debugging. + function pauseTracing() external view; + + /// Returns a random `address`. + function randomAddress() external view returns (address); + + /// Returns a random `bool`. + function randomBool() external view returns (bool); + + /// Returns a random byte array value of the given length. + function randomBytes(uint256 len) external view returns (bytes memory); + + /// Returns a random fixed-size byte array of length 4. + function randomBytes4() external view returns (bytes4); + + /// Returns a random fixed-size byte array of length 8. + function randomBytes8() external view returns (bytes8); + + /// Returns a random `int256` value. + function randomInt() external view returns (int256); + + /// Returns a random `int256` value of given bits. + function randomInt(uint256 bits) external view returns (int256); + + /// Returns a random uint256 value. + function randomUint() external view returns (uint256); + + /// Returns random uint256 value between the provided range (=min..=max). + function randomUint(uint256 min, uint256 max) external view returns (uint256); + + /// Returns a random `uint256` value of given bits. + function randomUint(uint256 bits) external view returns (uint256); + + /// Unpauses collection of call traces. + function resumeTracing() external view; + + /// Set RNG seed. + function setSeed(uint256 seed) external; + + /// Randomly shuffles an array. + function shuffle(uint256[] calldata array) external returns (uint256[] memory); + + /// Sorts an array in ascending order. + function sort(uint256[] calldata array) external returns (uint256[] memory); + + /// Encodes a `bytes` value to a base64url string. + function toBase64URL(bytes calldata data) external pure returns (string memory); + + /// Encodes a `string` value to a base64url string. + function toBase64URL(string calldata data) external pure returns (string memory); + + /// Encodes a `bytes` value to a base64 string. + function toBase64(bytes calldata data) external pure returns (string memory); + + /// Encodes a `string` value to a base64 string. + function toBase64(string calldata data) external pure returns (string memory); + + /// RLP encodes a list of bytes into an RLP payload. + function toRlp(bytes[] calldata data) external pure returns (bytes memory); +} + +/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used +/// in tests, but it is not recommended to use these cheats in scripts. +interface Vm is VmSafe { + // ======== EVM ======== + + /// Utility cheatcode to set an EIP-2930 access list for all subsequent transactions. + function accessList(AccessListItem[] calldata access) external; + + /// Returns the identifier of the currently active fork. Reverts if no fork is currently active. + function activeFork() external view returns (uint256 forkId); + + /// In forking mode, explicitly grant the given address cheatcode access. + function allowCheatcodes(address account) external; + + /// Sets `block.blobbasefee` + function blobBaseFee(uint256 newBlobBaseFee) external; + + /// Sets the blobhashes in the transaction. + /// Not available on EVM versions before Cancun. + /// If used on unsupported EVM versions it will revert. + function blobhashes(bytes32[] calldata hashes) external; + + /// Sets `block.chainid`. + function chainId(uint256 newChainId) external; + + /// Clears all mocked calls. + function clearMockedCalls() external; + + /// Clones a source account code, state, balance and nonce to a target account and updates in-memory EVM state. + function cloneAccount(address source, address target) external; + + /// Sets `block.coinbase`. + function coinbase(address newCoinbase) external; + + /// Marks the slots of an account and the account address as cold. + function cool(address target) external; + + /// Utility cheatcode to mark specific storage slot as cold, simulating no prior read. + function coolSlot(address target, bytes32 slot) external; + + /// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork. + function createFork(string calldata urlOrAlias) external returns (uint256 forkId); + + /// Creates a new fork with the given endpoint and block and returns the identifier of the fork. + function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); + + /// Creates a new fork with the given endpoint and at the block the given transaction was mined in, + /// replays all transaction mined in the block before the transaction, and returns the identifier of the fork. + function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); + + /// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork. + function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId); + + /// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork. + function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); + + /// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, + /// replays all transaction mined in the block before the transaction, returns the identifier of the fork. + function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); + + /// Sets an address' balance. + function deal(address account, uint256 newBalance) external; + + /// Removes the snapshot with the given ID created by `snapshot`. + /// Takes the snapshot ID to delete. + /// Returns `true` if the snapshot was successfully deleted. + /// Returns `false` if the snapshot does not exist. + function deleteStateSnapshot(uint256 snapshotId) external returns (bool success); + + /// Removes _all_ snapshots previously created by `snapshot`. + function deleteStateSnapshots() external; + + /// Sets `block.difficulty`. + /// Not available on EVM versions from Paris onwards. Use `prevrandao` instead. + /// Reverts if used on unsupported EVM versions. + function difficulty(uint256 newDifficulty) external; + + /// Dump a genesis JSON file's `allocs` to disk. + function dumpState(string calldata pathToStateJson) external; + + /// Sets an address' code. + function etch(address target, bytes calldata newRuntimeBytecode) external; + + /// Executes an RLP-encoded signed transaction with full EVM semantics (like `--isolate` mode). + /// The transaction is decoded from EIP-2718 format (type byte prefix + RLP payload) or legacy RLP. + /// Returns the execution output bytes. + /// This cheatcode is not allowed in `forge script` contexts. + function executeTransaction(bytes calldata rawTx) external returns (bytes memory); + + /// Sets `block.basefee`. + function fee(uint256 newBasefee) external; + + /// Gets the blockhashes from the current transaction. + /// Not available on EVM versions before Cancun. + /// If used on unsupported EVM versions it will revert. + function getBlobhashes() external view returns (bytes32[] memory hashes); + + /// Returns true if the account is marked as persistent. + function isPersistent(address account) external view returns (bool persistent); + + /// Load a genesis JSON file's `allocs` into the in-memory EVM state. + function loadAllocs(string calldata pathToAllocsJson) external; + + /// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup + /// Meaning, changes made to the state of this account will be kept when switching forks. + function makePersistent(address account) external; + + /// See `makePersistent(address)`. + function makePersistent(address account0, address account1) external; + + /// See `makePersistent(address)`. + function makePersistent(address account0, address account1, address account2) external; + + /// See `makePersistent(address)`. + function makePersistent(address[] calldata accounts) external; + + /// Reverts a call to an address with specified revert data. + function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external; + + /// Reverts a call to an address with a specific `msg.value`, with specified revert data. + function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData) external; + + /// Reverts a call to an address with specified revert data. + /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. + function mockCallRevert(address callee, bytes4 data, bytes calldata revertData) external; + + /// Reverts a call to an address with a specific `msg.value`, with specified revert data. + /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. + function mockCallRevert(address callee, uint256 msgValue, bytes4 data, bytes calldata revertData) external; + + /// Mocks a call to an address, returning specified data. + /// Calldata can either be strict or a partial match, e.g. if you only + /// pass a Solidity selector to the expected calldata, then the entire Solidity + /// function will be mocked. + function mockCall(address callee, bytes calldata data, bytes calldata returnData) external; + + /// Mocks a call to an address with a specific `msg.value`, returning specified data. + /// Calldata match takes precedence over `msg.value` in case of ambiguity. + function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external; + + /// Mocks a call to an address, returning specified data. + /// Calldata can either be strict or a partial match, e.g. if you only + /// pass a Solidity selector to the expected calldata, then the entire Solidity + /// function will be mocked. + /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. + function mockCall(address callee, bytes4 data, bytes calldata returnData) external; + + /// Mocks a call to an address with a specific `msg.value`, returning specified data. + /// Calldata match takes precedence over `msg.value` in case of ambiguity. + /// Overload to pass the function selector directly `token.approve.selector` instead of `abi.encodeWithSelector(token.approve.selector)`. + function mockCall(address callee, uint256 msgValue, bytes4 data, bytes calldata returnData) external; + + /// Mocks multiple calls to an address, returning specified data for each call. + function mockCalls(address callee, bytes calldata data, bytes[] calldata returnData) external; + + /// Mocks multiple calls to an address with a specific `msg.value`, returning specified data for each call. + function mockCalls(address callee, uint256 msgValue, bytes calldata data, bytes[] calldata returnData) external; + + /// Whenever a call is made to `callee` with calldata `data`, this cheatcode instead calls + /// `target` with the same calldata. This functionality is similar to a delegate call made to + /// `target` contract from `callee`. + /// Can be used to substitute a call to a function with another implementation that captures + /// the primary logic of the original function but is easier to reason about. + /// If calldata is not a strict match then partial match by selector is attempted. + function mockFunction(address callee, address target, bytes calldata data) external; + + /// Utility cheatcode to remove any EIP-2930 access list set by `accessList` cheatcode. + function noAccessList() external; + + /// Sets the *next* call's `msg.sender` to be the input address. + function prank(address msgSender) external; + + /// Sets the *next* call's `msg.sender` to be the input address, and the `tx.origin` to be the second input. + function prank(address msgSender, address txOrigin) external; + + /// Sets the *next* delegate call's `msg.sender` to be the input address. + function prank(address msgSender, bool delegateCall) external; + + /// Sets the *next* delegate call's `msg.sender` to be the input address, and the `tx.origin` to be the second input. + function prank(address msgSender, address txOrigin, bool delegateCall) external; + + /// Sets `block.prevrandao`. + /// Not available on EVM versions before Paris. Use `difficulty` instead. + /// If used on unsupported EVM versions it will revert. + function prevrandao(bytes32 newPrevrandao) external; + + /// Sets `block.prevrandao`. + /// Not available on EVM versions before Paris. Use `difficulty` instead. + /// If used on unsupported EVM versions it will revert. + function prevrandao(uint256 newPrevrandao) external; + + /// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification. + function readCallers() external view returns (CallerMode callerMode, address msgSender, address txOrigin); + + /// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts. + function resetNonce(address account) external; + + /// Revert the state of the EVM to a previous snapshot + /// Takes the snapshot ID to revert to. + /// Returns `true` if the snapshot was successfully reverted. + /// Returns `false` if the snapshot does not exist. + /// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteStateSnapshot`. + function revertToState(uint256 snapshotId) external returns (bool success); + + /// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots + /// Takes the snapshot ID to revert to. + /// Returns `true` if the snapshot was successfully reverted and deleted. + /// Returns `false` if the snapshot does not exist. + function revertToStateAndDelete(uint256 snapshotId) external returns (bool success); + + /// Revokes persistent status from the address, previously added via `makePersistent`. + function revokePersistent(address account) external; + + /// See `revokePersistent(address)`. + function revokePersistent(address[] calldata accounts) external; + + /// Sets `block.height`. + function roll(uint256 newHeight) external; + + /// Updates the currently active fork to given block number + /// This is similar to `roll` but for the currently active fork. + function rollFork(uint256 blockNumber) external; + + /// Updates the currently active fork to given transaction. This will `rollFork` with the number + /// of the block the transaction was mined in and replays all transaction mined before it in the block. + function rollFork(bytes32 txHash) external; + + /// Updates the given fork to given block number. + function rollFork(uint256 forkId, uint256 blockNumber) external; + + /// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block. + function rollFork(uint256 forkId, bytes32 txHash) external; + + /// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active. + function selectFork(uint256 forkId) external; + + /// Set blockhash for the current block. + /// It only sets the blockhash for blocks where `block.number - 256 <= number < block.number`. + function setBlockhash(uint256 blockNumber, bytes32 blockHash) external; + + /// Sets the nonce of an account. Must be higher than the current nonce of the account. + function setNonce(address account, uint64 newNonce) external; + + /// Sets the nonce of an account to an arbitrary value. + function setNonceUnsafe(address account, uint64 newNonce) external; + + /// Snapshot capture the gas usage of the last call by name from the callee perspective. + function snapshotGasLastCall(string calldata name) external returns (uint256 gasUsed); + + /// Snapshot capture the gas usage of the last call by name in a group from the callee perspective. + function snapshotGasLastCall(string calldata group, string calldata name) external returns (uint256 gasUsed); + + /// Snapshot the current state of the evm. + /// Returns the ID of the snapshot that was created. + /// To revert a snapshot use `revertToState`. + function snapshotState() external returns (uint256 snapshotId); + + /// Snapshot capture an arbitrary numerical value by name. + /// The group name is derived from the contract name. + function snapshotValue(string calldata name, uint256 value) external; + + /// Snapshot capture an arbitrary numerical value by name in a group. + function snapshotValue(string calldata group, string calldata name, uint256 value) external; + + /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called. + function startPrank(address msgSender) external; + + /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input. + function startPrank(address msgSender, address txOrigin) external; + + /// Sets all subsequent delegate calls' `msg.sender` to be the input address until `stopPrank` is called. + function startPrank(address msgSender, bool delegateCall) external; + + /// Sets all subsequent delegate calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input. + function startPrank(address msgSender, address txOrigin, bool delegateCall) external; + + /// Start a snapshot capture of the current gas usage by name. + /// The group name is derived from the contract name. + function startSnapshotGas(string calldata name) external; + + /// Start a snapshot capture of the current gas usage by name in a group. + function startSnapshotGas(string calldata group, string calldata name) external; + + /// Resets subsequent calls' `msg.sender` to be `address(this)`. + function stopPrank() external; + + /// Stop the snapshot capture of the current gas by latest snapshot name, capturing the gas used since the start. + function stopSnapshotGas() external returns (uint256 gasUsed); + + /// Stop the snapshot capture of the current gas usage by name, capturing the gas used since the start. + /// The group name is derived from the contract name. + function stopSnapshotGas(string calldata name) external returns (uint256 gasUsed); + + /// Stop the snapshot capture of the current gas usage by name in a group, capturing the gas used since the start. + function stopSnapshotGas(string calldata group, string calldata name) external returns (uint256 gasUsed); + + /// Stores a value to an address' storage slot. + function store(address target, bytes32 slot, bytes32 value) external; + + /// Fetches the given transaction from the active fork and executes it on the current state. + function transact(bytes32 txHash) external; + + /// Fetches the given transaction from the given fork and executes it on the current state. + function transact(uint256 forkId, bytes32 txHash) external; + + /// Sets `tx.gasprice`. + function txGasPrice(uint256 newGasPrice) external; + + /// Utility cheatcode to mark specific storage slot as warm, simulating a prior read. + function warmSlot(address target, bytes32 slot) external; + + /// Sets `block.timestamp`. + function warp(uint256 newTimestamp) external; + + /// `deleteSnapshot` is being deprecated in favor of `deleteStateSnapshot`. It will be removed in future versions. + function deleteSnapshot(uint256 snapshotId) external returns (bool success); + + /// `deleteSnapshots` is being deprecated in favor of `deleteStateSnapshots`. It will be removed in future versions. + function deleteSnapshots() external; + + /// `revertToAndDelete` is being deprecated in favor of `revertToStateAndDelete`. It will be removed in future versions. + function revertToAndDelete(uint256 snapshotId) external returns (bool success); + + /// `revertTo` is being deprecated in favor of `revertToState`. It will be removed in future versions. + function revertTo(uint256 snapshotId) external returns (bool success); + + /// `snapshot` is being deprecated in favor of `snapshotState`. It will be removed in future versions. + function snapshot() external returns (uint256 snapshotId); + + // ======== Testing ======== + + /// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. + function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external; + + /// Expect given number of calls to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. + function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count) + external; + + /// Expects a call to an address with the specified calldata. + /// Calldata can either be a strict or a partial match. + function expectCall(address callee, bytes calldata data) external; + + /// Expects given number of calls to an address with the specified calldata. + function expectCall(address callee, bytes calldata data, uint64 count) external; + + /// Expects a call to an address with the specified `msg.value` and calldata. + function expectCall(address callee, uint256 msgValue, bytes calldata data) external; + + /// Expects given number of calls to an address with the specified `msg.value` and calldata. + function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external; + + /// Expect a call to an address with the specified `msg.value`, gas, and calldata. + function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external; + + /// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata. + function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external; + + /// Expects the deployment of the specified bytecode by the specified address using the CREATE opcode + function expectCreate(bytes calldata bytecode, address deployer) external; + + /// Expects the deployment of the specified bytecode by the specified address using the CREATE2 opcode + function expectCreate2(bytes calldata bytecode, address deployer) external; + + /// Prepare an expected anonymous log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). + /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if + /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). + function expectEmitAnonymous(bool checkTopic0, bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) + external; + + /// Same as the previous method, but also checks supplied address against emitting contract. + function expectEmitAnonymous( + bool checkTopic0, + bool checkTopic1, + bool checkTopic2, + bool checkTopic3, + bool checkData, + address emitter + ) external; + + /// Prepare an expected anonymous log with all topic and data checks enabled. + /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if + /// logs were emitted in the expected order with the expected topics and data. + function expectEmitAnonymous() external; + + /// Same as the previous method, but also checks supplied address against emitting contract. + function expectEmitAnonymous(address emitter) external; + + /// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). + /// Call this function, then emit an event, then call a function. Internally after the call, we check if + /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). + function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external; + + /// Same as the previous method, but also checks supplied address against emitting contract. + function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) external; + + /// Prepare an expected log with all topic and data checks enabled. + /// Call this function, then emit an event, then call a function. Internally after the call, we check if + /// logs were emitted in the expected order with the expected topics and data. + function expectEmit() external; + + /// Same as the previous method, but also checks supplied address against emitting contract. + function expectEmit(address emitter) external; + + /// Expect a given number of logs with the provided topics. + function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, uint64 count) external; + + /// Expect a given number of logs from a specific emitter with the provided topics. + function expectEmit( + bool checkTopic1, + bool checkTopic2, + bool checkTopic3, + bool checkData, + address emitter, + uint64 count + ) external; + + /// Expect a given number of logs with all topic and data checks enabled. + function expectEmit(uint64 count) external; + + /// Expect a given number of logs from a specific emitter with all topic and data checks enabled. + function expectEmit(address emitter, uint64 count) external; + + /// Expects an error on next call that starts with the revert data. + function expectPartialRevert(bytes4 revertData) external; + + /// Expects an error on next call to reverter address, that starts with the revert data. + function expectPartialRevert(bytes4 revertData, address reverter) external; + + /// Expects an error on next call with any revert data. + function expectRevert() external; + + /// Expects an error on next call that exactly matches the revert data. + function expectRevert(bytes4 revertData) external; + + /// Expects a `count` number of reverts from the upcoming calls from the reverter address that match the revert data. + function expectRevert(bytes4 revertData, address reverter, uint64 count) external; + + /// Expects a `count` number of reverts from the upcoming calls from the reverter address that exactly match the revert data. + function expectRevert(bytes calldata revertData, address reverter, uint64 count) external; + + /// Expects an error on next call that exactly matches the revert data. + function expectRevert(bytes calldata revertData) external; + + /// Expects an error with any revert data on next call to reverter address. + function expectRevert(address reverter) external; + + /// Expects an error from reverter address on next call, with any revert data. + function expectRevert(bytes4 revertData, address reverter) external; + + /// Expects an error from reverter address on next call, that exactly matches the revert data. + function expectRevert(bytes calldata revertData, address reverter) external; + + /// Expects a `count` number of reverts from the upcoming calls with any revert data or reverter. + function expectRevert(uint64 count) external; + + /// Expects a `count` number of reverts from the upcoming calls that match the revert data. + function expectRevert(bytes4 revertData, uint64 count) external; + + /// Expects a `count` number of reverts from the upcoming calls that exactly match the revert data. + function expectRevert(bytes calldata revertData, uint64 count) external; + + /// Expects a `count` number of reverts from the upcoming calls from the reverter address. + function expectRevert(address reverter, uint64 count) external; + + /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other + /// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set. + function expectSafeMemory(uint64 min, uint64 max) external; + + /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext. + /// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges + /// to the set. + function expectSafeMemoryCall(uint64 min, uint64 max) external; + + /// Marks a test as skipped. Must be called at the top level of a test. + function skip(bool skipTest) external; + + /// Marks a test as skipped with a reason. Must be called at the top level of a test. + function skip(bool skipTest, string calldata reason) external; + + /// Stops all safe memory expectation in the current subcontext. + function stopExpectSafeMemory() external; + + // ======== Utilities ======== + + /// Utility cheatcode to copy storage of `from` contract to another `to` contract. + function copyStorage(address from, address to) external; + + /// Causes the next contract creation (via new) to fail and return its initcode in the returndata buffer. + /// This allows type-safe access to the initcode payload that would be used for contract creation. + /// Example usage: + /// vm.interceptInitcode(); + /// bytes memory initcode; + /// try new MyContract(param1, param2) { assert(false); } + /// catch (bytes memory interceptedInitcode) { initcode = interceptedInitcode; } + function interceptInitcode() external; + + /// Utility cheatcode to set arbitrary storage for given target address. + function setArbitraryStorage(address target) external; + + /// Utility cheatcode to set arbitrary storage for given target address and overwrite + /// any storage slots that have been previously set. + function setArbitraryStorage(address target, bool overwrite) external; +} diff --git a/dependencies/forge-std-1.16.1/src/console.sol b/dependencies/forge-std-1.16.1/src/console.sol new file mode 100644 index 00000000..0ac1b691 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/console.sol @@ -0,0 +1,1599 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +library console { + address constant CONSOLE_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; + + function _sendLogPayloadImplementation(bytes memory payload) internal view { + address consoleAddress = CONSOLE_ADDRESS; + assembly ("memory-safe") { + pop(staticcall(gas(), consoleAddress, add(payload, 32), mload(payload), 0, 0)) + } + } + + function _castToPure(function(bytes memory) internal view fnIn) + internal + pure + returns (function(bytes memory) pure fnOut) + { + assembly { + fnOut := fnIn + } + } + + function _sendLogPayload(bytes memory payload) internal pure { + _castToPure(_sendLogPayloadImplementation)(payload); + } + + function log() internal pure { + _sendLogPayload(abi.encodeWithSignature("log()")); + } + + function logInt(int256 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); + } + + function logUint(uint256 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); + } + + function logString(string memory p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); + } + + function logBool(bool p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); + } + + function logAddress(address p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); + } + + function logBytes(bytes memory p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); + } + + function logBytes1(bytes1 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); + } + + function logBytes2(bytes2 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); + } + + function logBytes3(bytes3 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); + } + + function logBytes4(bytes4 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); + } + + function logBytes5(bytes5 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); + } + + function logBytes6(bytes6 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); + } + + function logBytes7(bytes7 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); + } + + function logBytes8(bytes8 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); + } + + function logBytes9(bytes9 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); + } + + function logBytes10(bytes10 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); + } + + function logBytes11(bytes11 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); + } + + function logBytes12(bytes12 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); + } + + function logBytes13(bytes13 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); + } + + function logBytes14(bytes14 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); + } + + function logBytes15(bytes15 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); + } + + function logBytes16(bytes16 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); + } + + function logBytes17(bytes17 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); + } + + function logBytes18(bytes18 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); + } + + function logBytes19(bytes19 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); + } + + function logBytes20(bytes20 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); + } + + function logBytes21(bytes21 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); + } + + function logBytes22(bytes22 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); + } + + function logBytes23(bytes23 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); + } + + function logBytes24(bytes24 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); + } + + function logBytes25(bytes25 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); + } + + function logBytes26(bytes26 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); + } + + function logBytes27(bytes27 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); + } + + function logBytes28(bytes28 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); + } + + function logBytes29(bytes29 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); + } + + function logBytes30(bytes30 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); + } + + function logBytes31(bytes31 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); + } + + function logBytes32(bytes32 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); + } + + function log(uint256 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); + } + + function log(int256 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); + } + + function log(string memory p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); + } + + function log(bool p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); + } + + function log(address p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); + } + + function log(uint256 p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); + } + + function log(uint256 p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); + } + + function log(uint256 p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); + } + + function log(uint256 p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); + } + + function log(string memory p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); + } + + function log(string memory p0, int256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,int256)", p0, p1)); + } + + function log(string memory p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); + } + + function log(string memory p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); + } + + function log(string memory p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); + } + + function log(bool p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); + } + + function log(bool p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); + } + + function log(bool p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); + } + + function log(bool p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); + } + + function log(address p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); + } + + function log(address p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); + } + + function log(address p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); + } + + function log(address p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); + } + + function log(uint256 p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); + } + + function log(string memory p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); + } + + function log(string memory p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); + } + + function log(string memory p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); + } + + function log(string memory p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); + } + + function log(bool p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); + } + + function log(bool p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); + } + + function log(bool p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); + } + + function log(bool p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); + } + + function log(bool p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); + } + + function log(bool p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); + } + + function log(bool p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); + } + + function log(bool p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); + } + + function log(address p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); + } + + function log(address p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); + } + + function log(address p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); + } + + function log(address p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); + } + + function log(address p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); + } + + function log(address p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); + } + + function log(address p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); + } + + function log(address p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); + } + + function log(address p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); + } + + function log(address p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); + } + + function log(address p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); + } + + function log(address p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); + } + + function table(uint256[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(uint256[])", values)); + } + + function table(int256[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(int256[])", values)); + } + + function table(address[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(address[])", values)); + } + + function table(bytes32[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(bytes32[])", values)); + } + + function table(string[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(string[])", values)); + } + + function table(bool[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(bool[])", values)); + } + + function table(string[] memory keys, uint256[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(string[],uint256[])", keys, values)); + } + + function table(string[] memory keys, int256[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(string[],int256[])", keys, values)); + } + + function table(string[] memory keys, address[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(string[],address[])", keys, values)); + } + + function table(string[] memory keys, bytes32[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(string[],bytes32[])", keys, values)); + } + + function table(string[] memory keys, string[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(string[],string[])", keys, values)); + } + + function table(string[] memory keys, bool[] memory values) internal pure { + _sendLogPayload(abi.encodeWithSignature("table(string[],bool[])", keys, values)); + } +} diff --git a/dependencies/forge-std-1.16.1/src/console2.sol b/dependencies/forge-std-1.16.1/src/console2.sol new file mode 100644 index 00000000..1ecdbbf7 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/console2.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {console as console2} from "./console.sol"; diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC1155.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC1155.sol new file mode 100644 index 00000000..9bf979dc --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC1155.sol @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IERC165} from "./IERC165.sol"; + +/// @title ERC-1155 Multi Token Standard +/// @dev See https://eips.ethereum.org/EIPS/eip-1155 +/// Note: The ERC-165 identifier for this interface is 0xd9b67a26. +interface IERC1155 is IERC165 { + /// @dev + /// - Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). + /// - The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender). + /// - The `_from` argument MUST be the address of the holder whose balance is decreased. + /// - The `_to` argument MUST be the address of the recipient whose balance is increased. + /// - The `_id` argument MUST be the token type being transferred. + /// - The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by. + /// - When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). + /// - When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). + event TransferSingle( + address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value + ); + + /// @dev + /// - Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). + /// - The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender). + /// - The `_from` argument MUST be the address of the holder whose balance is decreased. + /// - The `_to` argument MUST be the address of the recipient whose balance is increased. + /// - The `_ids` argument MUST be the list of tokens being transferred. + /// - The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by. + /// - When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). + /// - When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). + event TransferBatch( + address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values + ); + + /// @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled). + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + + /// @dev MUST emit when the URI is updated for a token ID. URIs are defined in RFC 3986. + /// The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema". + event URI(string _value, uint256 indexed _id); + + /// @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call). + /// @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). + /// - MUST revert if `_to` is the zero address. + /// - MUST revert if balance of holder for token `_id` is lower than the `_value` sent. + /// - MUST revert on any other error. + /// - MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard). + /// - After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). + /// @param _from Source address + /// @param _to Target address + /// @param _id ID of the token type + /// @param _value Transfer amount + /// @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to` + function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external; + + /// @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call). + /// @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). + /// - MUST revert if `_to` is the zero address. + /// - MUST revert if length of `_ids` is not the same as length of `_values`. + /// - MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient. + /// - MUST revert on any other error. + /// - MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard). + /// - Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc). + /// - After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). + /// @param _from Source address + /// @param _to Target address + /// @param _ids IDs of each token type (order and length must match _values array) + /// @param _values Transfer amounts per token type (order and length must match _ids array) + /// @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to` + function safeBatchTransferFrom( + address _from, + address _to, + uint256[] calldata _ids, + uint256[] calldata _values, + bytes calldata _data + ) external; + + /// @notice Get the balance of an account's tokens. + /// @param _owner The address of the token holder + /// @param _id ID of the token + /// @return The _owner's balance of the token type requested + function balanceOf(address _owner, uint256 _id) external view returns (uint256); + + /// @notice Get the balance of multiple account/token pairs + /// @param _owners The addresses of the token holders + /// @param _ids ID of the tokens + /// @return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair) + function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) + external + view + returns (uint256[] memory); + + /// @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. + /// @dev MUST emit the ApprovalForAll event on success. + /// @param _operator Address to add to the set of authorized operators + /// @param _approved True if the operator is approved, false to revoke approval + function setApprovalForAll(address _operator, bool _approved) external; + + /// @notice Queries the approval status of an operator for a given owner. + /// @param _owner The owner of the tokens + /// @param _operator Address of authorized operator + /// @return True if the operator is approved, false if not + function isApprovedForAll(address _owner, address _operator) external view returns (bool); +} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC165.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC165.sol new file mode 100644 index 00000000..fced1822 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC165.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +interface IERC165 { + /// @notice Query if a contract implements an interface + /// @param interfaceID The interface identifier, as specified in ERC-165 + /// @dev Interface identification is specified in ERC-165. This function + /// uses less than 30,000 gas. + /// @return `true` if the contract implements `interfaceID` and + /// `interfaceID` is not 0xffffffff, `false` otherwise + function supportsInterface(bytes4 interfaceID) external view returns (bool); +} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC20.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC20.sol new file mode 100644 index 00000000..1a17fe13 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC20.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +/// @dev Interface of the ERC20 standard as defined in the EIP. +/// @dev This includes the optional name, symbol, and decimals metadata. +interface IERC20 { + /// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`). + event Transfer(address indexed from, address indexed to, uint256 value); + + /// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value` + /// is the new allowance. + event Approval(address indexed owner, address indexed spender, uint256 value); + + /// @notice Returns the amount of tokens in existence. + function totalSupply() external view returns (uint256); + + /// @notice Returns the amount of tokens owned by `account`. + function balanceOf(address account) external view returns (uint256); + + /// @notice Moves `amount` tokens from the caller's account to `to`. + function transfer(address to, uint256 amount) external returns (bool); + + /// @notice Returns the remaining number of tokens that `spender` is allowed + /// to spend on behalf of `owner` + function allowance(address owner, address spender) external view returns (uint256); + + /// @notice Sets `amount` as the allowance of `spender` over the caller's tokens. + /// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + function approve(address spender, uint256 amount) external returns (bool); + + /// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism. + /// `amount` is then deducted from the caller's allowance. + function transferFrom(address from, address to, uint256 amount) external returns (bool); + + /// @notice Returns the name of the token. + function name() external view returns (string memory); + + /// @notice Returns the symbol of the token. + function symbol() external view returns (string memory); + + /// @notice Returns the decimals places of the token. + function decimals() external view returns (uint8); +} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC4626.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC4626.sol new file mode 100644 index 00000000..e63fce43 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC4626.sol @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IERC20} from "./IERC20.sol"; + +/// @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in +/// https://eips.ethereum.org/EIPS/eip-4626 +interface IERC4626 is IERC20 { + event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); + + event Withdraw( + address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares + ); + + /// @notice Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. + /// @dev + /// - MUST be an ERC-20 token contract. + /// - MUST NOT revert. + function asset() external view returns (address assetTokenAddress); + + /// @notice Returns the total amount of the underlying asset that is “managed” by Vault. + /// @dev + /// - SHOULD include any compounding that occurs from yield. + /// - MUST be inclusive of any fees that are charged against assets in the Vault. + /// - MUST NOT revert. + function totalAssets() external view returns (uint256 totalManagedAssets); + + /// @notice Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal + /// scenario where all the conditions are met. + /// @dev + /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + /// - MUST NOT show any variations depending on the caller. + /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + /// - MUST NOT revert. + /// + /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + /// from. + function convertToShares(uint256 assets) external view returns (uint256 shares); + + /// @notice Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal + /// scenario where all the conditions are met. + /// @dev + /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + /// - MUST NOT show any variations depending on the caller. + /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + /// - MUST NOT revert. + /// + /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + /// from. + function convertToAssets(uint256 shares) external view returns (uint256 assets); + + /// @notice Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, + /// through a deposit call. + /// @dev + /// - MUST return a limited value if receiver is subject to some deposit limit. + /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. + /// - MUST NOT revert. + function maxDeposit(address receiver) external view returns (uint256 maxAssets); + + /// @notice Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given + /// current on-chain conditions. + /// @dev + /// - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit + /// call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called + /// in the same transaction. + /// - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the + /// deposit would be accepted, regardless if the user has enough tokens approved, etc. + /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + /// - MUST NOT revert. + /// + /// NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in + /// share price or some other type of condition, meaning the depositor will lose assets by depositing. + function previewDeposit(uint256 assets) external view returns (uint256 shares); + + /// @notice Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. + /// @dev + /// - MUST emit the Deposit event. + /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + /// deposit execution, and are accounted for during deposit. + /// - MUST revert if all assets cannot be deposited (due to deposit limit being reached, slippage, the user not + /// approving enough underlying tokens to the Vault contract, etc). + /// + /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + function deposit(uint256 assets, address receiver) external returns (uint256 shares); + + /// @notice Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. + /// @dev + /// - MUST return a limited value if receiver is subject to some mint limit. + /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. + /// - MUST NOT revert. + function maxMint(address receiver) external view returns (uint256 maxShares); + + /// @notice Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given + /// current on-chain conditions. + /// @dev + /// - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call + /// in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the + /// same transaction. + /// - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint + /// would be accepted, regardless if the user has enough tokens approved, etc. + /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + /// - MUST NOT revert. + /// + /// NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in + /// share price or some other type of condition, meaning the depositor will lose assets by minting. + function previewMint(uint256 shares) external view returns (uint256 assets); + + /// @notice Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. + /// @dev + /// - MUST emit the Deposit event. + /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint + /// execution, and are accounted for during mint. + /// - MUST revert if all shares cannot be minted (due to deposit limit being reached, slippage, the user not + /// approving enough underlying tokens to the Vault contract, etc). + /// + /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + function mint(uint256 shares, address receiver) external returns (uint256 assets); + + /// @notice Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the + /// Vault, through a withdrawal call. + /// @dev + /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + /// - MUST NOT revert. + function maxWithdraw(address owner) external view returns (uint256 maxAssets); + + /// @notice Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, + /// given current on-chain conditions. + /// @dev + /// - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw + /// call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if + /// called + /// in the same transaction. + /// - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though + /// the withdrawal would be accepted, regardless if the user has enough shares, etc. + /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + /// - MUST NOT revert. + /// + /// NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in + /// share price or some other type of condition, meaning the owner will lose assets by withdrawing. + function previewWithdraw(uint256 assets) external view returns (uint256 shares); + + /// @notice Burns shares from owner and sends exactly assets of underlying tokens to receiver. + /// @dev + /// - MUST emit the Withdraw event. + /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + /// withdraw execution, and are accounted for during withdrawal. + /// - MUST revert if all assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner + /// not having enough shares, etc). + /// + /// Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + /// Those methods should be performed separately. + function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); + + /// @notice Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, + /// through a redeem call. + /// @dev + /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + /// - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. + /// - MUST NOT revert. + function maxRedeem(address owner) external view returns (uint256 maxShares); + + /// @notice Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block, + /// given current on-chain conditions. + /// @dev + /// - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call + /// in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the + /// same transaction. + /// - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the + /// redemption would be accepted, regardless if the user has enough shares, etc. + /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + /// - MUST NOT revert. + /// + /// NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in + /// share price or some other type of condition, meaning the owner will lose assets by redeeming. + function previewRedeem(uint256 shares) external view returns (uint256 assets); + + /// @notice Burns exactly shares from owner and sends assets of underlying tokens to receiver. + /// @dev + /// - MUST emit the Withdraw event. + /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + /// redeem execution, and are accounted for during redeem. + /// - MUST revert if all shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner + /// not having enough shares, etc). + /// + /// NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + /// Those methods should be performed separately. + function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); +} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC6909.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC6909.sol new file mode 100644 index 00000000..d448b0fa --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC6909.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IERC165} from "./IERC165.sol"; + +/// @dev Required interface of an ERC-6909 compliant contract, as defined in +/// https://eips.ethereum.org/EIPS/eip-6909 +interface IERC6909 is IERC165 { + /// @dev Emitted when the allowance of a `spender` for an `owner` is set for a token of type `id`. + event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount); + + /// @dev Emitted when `owner` grants or revokes operator status for a `spender`. + event OperatorSet(address indexed owner, address indexed spender, bool approved); + + /// @dev Emitted when `amount` tokens of type `id` are moved from `sender` to `receiver` initiated by `caller`. + event Transfer( + address caller, address indexed sender, address indexed receiver, uint256 indexed id, uint256 amount + ); + + ///@dev Returns the amount of tokens of type `id` owned by `owner`. + function balanceOf(address owner, uint256 id) external view returns (uint256); + + /// @dev Returns the amount of tokens of type `id` that `spender` is allowed to spend on behalf of `owner`. + /// NOTE: Does not include operator allowances. + function allowance(address owner, address spender, uint256 id) external view returns (uint256); + + /// @dev Returns true if `spender` is set as an operator for `owner`. + function isOperator(address owner, address spender) external view returns (bool); + + /// @dev Sets an approval to `spender` for `amount` tokens of type `id` from the caller's tokens. + /// Must return true. + function approve(address spender, uint256 id, uint256 amount) external returns (bool); + + /// @dev Grants or revokes unlimited transfer permission of any token id to `spender` for the caller's tokens. + /// Must return true. + function setOperator(address spender, bool approved) external returns (bool); + + /// @dev Transfers `amount` of token type `id` from the caller's account to `receiver`. + /// Must return true. + function transfer(address receiver, uint256 id, uint256 amount) external returns (bool); + + /// @dev Transfers `amount` of token type `id` from `sender` to `receiver`. + /// Must return true. + function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool); +} + +/// @dev Optional extension of {IERC6909} that adds metadata functions. +interface IERC6909Metadata is IERC6909 { + /// @dev Returns the name of the token of type `id`. + function name(uint256 id) external view returns (string memory); + + /// @dev Returns the ticker symbol of the token of type `id`. + function symbol(uint256 id) external view returns (string memory); + + /// @dev Returns the number of decimals for the token of type `id`. + function decimals(uint256 id) external view returns (uint8); +} + +/// @dev Optional extension of {IERC6909} that adds content URI functions. +interface IERC6909ContentURI is IERC6909 { + /// @dev Returns URI for the contract. + function contractURI() external view returns (string memory); + + /// @dev Returns the URI for the token of type `id`. + function tokenURI(uint256 id) external view returns (string memory); +} + +/// @dev Optional extension of {IERC6909} that adds a token supply function. +interface IERC6909TokenSupply is IERC6909 { + /// @dev Returns the total supply of the token of type `id`. + function totalSupply(uint256 id) external view returns (uint256); +} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC721.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC721.sol new file mode 100644 index 00000000..9a03145a --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC721.sol @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IERC165} from "./IERC165.sol"; + +/// @title ERC-721 Non-Fungible Token Standard +/// @dev See https://eips.ethereum.org/EIPS/eip-721 +/// Note: the ERC-165 identifier for this interface is 0x80ac58cd. +interface IERC721 is IERC165 { + /// @dev This emits when ownership of any NFT changes by any mechanism. + /// This event emits when NFTs are created (`from` == 0) and destroyed + /// (`to` == 0). Exception: during contract creation, any number of NFTs + /// may be created and assigned without emitting Transfer. At the time of + /// any transfer, the approved address for that NFT (if any) is reset to none. + event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); + + /// @dev This emits when the approved address for an NFT is changed or + /// reaffirmed. The zero address indicates there is no approved address. + /// When a Transfer event emits, this also indicates that the approved + /// address for that NFT (if any) is reset to none. + event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); + + /// @dev This emits when an operator is enabled or disabled for an owner. + /// The operator can manage all NFTs of the owner. + event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); + + /// @notice Count all NFTs assigned to an owner + /// @dev NFTs assigned to the zero address are considered invalid, and this + /// function throws for queries about the zero address. + /// @param _owner An address for whom to query the balance + /// @return The number of NFTs owned by `_owner`, possibly zero + function balanceOf(address _owner) external view returns (uint256); + + /// @notice Find the owner of an NFT + /// @dev NFTs assigned to zero address are considered invalid, and queries + /// about them do throw. + /// @param _tokenId The identifier for an NFT + /// @return The address of the owner of the NFT + function ownerOf(uint256 _tokenId) external view returns (address); + + /// @notice Transfers the ownership of an NFT from one address to another address + /// @dev Throws unless `msg.sender` is the current owner, an authorized + /// operator, or the approved address for this NFT. Throws if `_from` is + /// not the current owner. Throws if `_to` is the zero address. Throws if + /// `_tokenId` is not a valid NFT. When transfer is complete, this function + /// checks if `_to` is a smart contract (code size > 0). If so, it calls + /// `onERC721Received` on `_to` and throws if the return value is not + /// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`. + /// @param _from The current owner of the NFT + /// @param _to The new owner + /// @param _tokenId The NFT to transfer + /// @param data Additional data with no specified format, sent in call to `_to` + function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable; + + /// @notice Transfers the ownership of an NFT from one address to another address + /// @dev This works identically to the other function with an extra data parameter, + /// except this function just sets data to "". + /// @param _from The current owner of the NFT + /// @param _to The new owner + /// @param _tokenId The NFT to transfer + function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; + + /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE + /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE + /// THEY MAY BE PERMANENTLY LOST + /// @dev Throws unless `msg.sender` is the current owner, an authorized + /// operator, or the approved address for this NFT. Throws if `_from` is + /// not the current owner. Throws if `_to` is the zero address. Throws if + /// `_tokenId` is not a valid NFT. + /// @param _from The current owner of the NFT + /// @param _to The new owner + /// @param _tokenId The NFT to transfer + function transferFrom(address _from, address _to, uint256 _tokenId) external payable; + + /// @notice Change or reaffirm the approved address for an NFT + /// @dev The zero address indicates there is no approved address. + /// Throws unless `msg.sender` is the current NFT owner, or an authorized + /// operator of the current owner. + /// @param _approved The new approved NFT controller + /// @param _tokenId The NFT to approve + function approve(address _approved, uint256 _tokenId) external payable; + + /// @notice Enable or disable approval for a third party ("operator") to manage + /// all of `msg.sender`'s assets + /// @dev Emits the ApprovalForAll event. The contract MUST allow + /// multiple operators per owner. + /// @param _operator Address to add to the set of authorized operators + /// @param _approved True if the operator is approved, false to revoke approval + function setApprovalForAll(address _operator, bool _approved) external; + + /// @notice Get the approved address for a single NFT + /// @dev Throws if `_tokenId` is not a valid NFT. + /// @param _tokenId The NFT to find the approved address for + /// @return The approved address for this NFT, or the zero address if there is none + function getApproved(uint256 _tokenId) external view returns (address); + + /// @notice Query if an address is an authorized operator for another address + /// @param _owner The address that owns the NFTs + /// @param _operator The address that acts on behalf of the owner + /// @return True if `_operator` is an approved operator for `_owner`, false otherwise + function isApprovedForAll(address _owner, address _operator) external view returns (bool); +} + +/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02. +interface IERC721TokenReceiver { + /// @notice Handle the receipt of an NFT + /// @dev The ERC721 smart contract calls this function on the recipient + /// after a `transfer`. This function MAY throw to revert and reject the + /// transfer. Return of other than the magic value MUST result in the + /// transaction being reverted. + /// Note: the contract address is always the message sender. + /// @param _operator The address which called `safeTransferFrom` function + /// @param _from The address which previously owned the token + /// @param _tokenId The NFT identifier which is being transferred + /// @param _data Additional data with no specified format + /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` + /// unless throwing + function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) + external + returns (bytes4); +} + +/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension +/// @dev See https://eips.ethereum.org/EIPS/eip-721 +/// Note: the ERC-165 identifier for this interface is 0x5b5e139f. +interface IERC721Metadata is IERC721 { + /// @notice A descriptive name for a collection of NFTs in this contract + function name() external view returns (string memory _name); + + /// @notice An abbreviated name for NFTs in this contract + function symbol() external view returns (string memory _symbol); + + /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. + /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC + /// 3986. The URI may point to a JSON file that conforms to the "ERC721 + /// Metadata JSON Schema". + function tokenURI(uint256 _tokenId) external view returns (string memory); +} + +/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension +/// @dev See https://eips.ethereum.org/EIPS/eip-721 +/// Note: the ERC-165 identifier for this interface is 0x780e9d63. +interface IERC721Enumerable is IERC721 { + /// @notice Count NFTs tracked by this contract + /// @return A count of valid NFTs tracked by this contract, where each one of + /// them has an assigned and queryable owner not equal to the zero address + function totalSupply() external view returns (uint256); + + /// @notice Enumerate valid NFTs + /// @dev Throws if `_index` >= `totalSupply()`. + /// @param _index A counter less than `totalSupply()` + /// @return The token identifier for the `_index`th NFT, + /// (sort order not specified) + function tokenByIndex(uint256 _index) external view returns (uint256); + + /// @notice Enumerate NFTs assigned to an owner + /// @dev Throws if `_index` >= `balanceOf(_owner)` or if + /// `_owner` is the zero address, representing invalid NFTs. + /// @param _owner An address where we are interested in NFTs owned by them + /// @param _index A counter less than `balanceOf(_owner)` + /// @return The token identifier for the `_index`th NFT assigned to `_owner`, + /// (sort order not specified) + function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); +} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC7540.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC7540.sol new file mode 100644 index 00000000..3082c518 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC7540.sol @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IERC7575} from "./IERC7575.sol"; + +/// @dev Interface of the base operator logic of ERC7540, as defined in +/// https://eips.ethereum.org/EIPS/eip-7540 +interface IERC7540Operator { + /** + * @dev The event emitted when an operator is set. + * + * @param controller The address of the controller. + * @param operator The address of the operator. + * @param approved The approval status. + */ + event OperatorSet(address indexed controller, address indexed operator, bool approved); + + /** + * @dev Sets or removes an operator for the caller. + * + * @param operator The address of the operator. + * @param approved The approval status. + * @return Whether the call was executed successfully or not + */ + function setOperator(address operator, bool approved) external returns (bool); + + /** + * @dev Returns `true` if the `operator` is approved as an operator for an `controller`. + * + * @param controller The address of the controller. + * @param operator The address of the operator. + * @return status The approval status + */ + function isOperator(address controller, address operator) external view returns (bool status); +} + +/// @dev Interface of the asynchronous deposit Vault interface of ERC7540, as defined in +/// https://eips.ethereum.org/EIPS/eip-7540 +interface IERC7540Deposit is IERC7540Operator { + event DepositRequest( + address indexed controller, address indexed owner, uint256 indexed requestId, address sender, uint256 assets + ); + /** + * @dev Transfers assets from sender into the Vault and submits a Request for asynchronous deposit. + * + * - MUST support ERC-20 approve / transferFrom on asset as a deposit Request flow. + * - MUST revert if all assets cannot be requested for deposit. + * - owner MUST be msg.sender unless some unspecified explicit approval is given by the caller, + * approval of ERC-20 tokens from owner to sender is NOT enough. + * + * @param assets the amount of deposit assets to transfer from owner + * @param controller the controller of the request who will be able to operate the request + * @param owner the source of the deposit assets + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault's underlying asset token. + */ + + function requestDeposit(uint256 assets, address controller, address owner) external returns (uint256 requestId); + + /** + * @dev Returns the amount of requested assets in Pending state. + * + * - MUST NOT include any assets in Claimable state for deposit or mint. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input. + */ + function pendingDepositRequest(uint256 requestId, address controller) external view returns (uint256 pendingAssets); + + /** + * @dev Returns the amount of requested assets in Claimable state for the controller to deposit or mint. + * + * - MUST NOT include any assets in Pending state. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input. + */ + function claimableDepositRequest(uint256 requestId, address controller) + external + view + returns (uint256 claimableAssets); + + /** + * @dev Mints shares Vault shares to receiver by claiming the Request of the controller. + * + * - MUST emit the Deposit event. + * - controller MUST equal msg.sender unless the controller has approved the msg.sender as an operator. + */ + function deposit(uint256 assets, address receiver, address controller) external returns (uint256 shares); + + /** + * @dev Mints exactly shares Vault shares to receiver by claiming the Request of the controller. + * + * - MUST emit the Deposit event. + * - controller MUST equal msg.sender unless the controller has approved the msg.sender as an operator. + */ + function mint(uint256 shares, address receiver, address controller) external returns (uint256 assets); +} + +/// @dev Interface of the asynchronous redeem Vault interface of ERC7540, as defined in +/// https://eips.ethereum.org/EIPS/eip-7540 +interface IERC7540Redeem is IERC7540Operator { + event RedeemRequest( + address indexed controller, address indexed owner, uint256 indexed requestId, address sender, uint256 shares + ); + + /** + * @dev Assumes control of shares from owner and submits a Request for asynchronous redeem. + * + * - MUST support a redeem Request flow where the control of shares is taken from owner directly. + * - Redeem Request approval of shares for a msg.sender not equal to owner MAY come either from ERC-20 approval + * over the shares of owner or if the owner has approved the msg.sender as an operator. + * - MUST revert if all shares cannot be requested for redeem or withdraw. + * + * @param shares the amount of shares to be redeemed to transfer from owner + * @param controller the controller of the request who will be able to operate the request + * @param owner the source of the shares to be redeemed + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault's share token. + */ + function requestRedeem(uint256 shares, address controller, address owner) external returns (uint256 requestId); + + /** + * @dev Returns the amount of requested shares in Pending state. + * + * - MUST NOT include any shares in Claimable state for redeem or withdraw. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input. + */ + function pendingRedeemRequest(uint256 requestId, address controller) external view returns (uint256 pendingShares); + + /** + * @dev Returns the amount of requested shares in Claimable state for the controller to redeem or withdraw. + * + * - MUST NOT include any shares in Pending state for redeem or withdraw. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT revert unless due to integer overflow caused by an unreasonably large input. + */ + function claimableRedeemRequest(uint256 requestId, address controller) + external + view + returns (uint256 claimableShares); +} + +/// @dev Interface of the fully asynchronous Vault interface of ERC7540, as defined in +/// https://eips.ethereum.org/EIPS/eip-7540 +interface IERC7540 is IERC7540Deposit, IERC7540Redeem, IERC7575 {} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IERC7575.sol b/dependencies/forge-std-1.16.1/src/interfaces/IERC7575.sol new file mode 100644 index 00000000..980f766a --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IERC7575.sol @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {IERC165} from "./IERC165.sol"; + +/// @dev Interface of the ERC7575 "Multi-Asset ERC-4626 Vaults", as defined in +/// https://eips.ethereum.org/EIPS/eip-7575 +interface IERC7575 is IERC165 { + event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); + event Withdraw( + address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares + ); + + /** + * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. + * + * - MUST be an ERC-20 token contract. + * - MUST NOT revert. + */ + function asset() external view returns (address assetTokenAddress); + + /** + * @dev Returns the address of the share token + * + * - MUST be an ERC-20 token contract. + * - MUST NOT revert. + */ + function share() external view returns (address shareTokenAddress); + + /** + * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal + * scenario where all the conditions are met. + * + * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + * - MUST NOT revert. + * + * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + * from. + */ + function convertToShares(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal + * scenario where all the conditions are met. + * + * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT show any variations depending on the caller. + * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. + * - MUST NOT revert. + * + * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the + * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and + * from. + */ + function convertToAssets(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Returns the total amount of the underlying asset that is “managed” by Vault. + * + * - SHOULD include any compounding that occurs from yield. + * - MUST be inclusive of any fees that are charged against assets in the Vault. + * - MUST NOT revert. + */ + function totalAssets() external view returns (uint256 totalManagedAssets); + + /** + * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, + * through a deposit call. + * + * - MUST return a limited value if receiver is subject to some deposit limit. + * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. + * - MUST NOT revert. + */ + function maxDeposit(address receiver) external view returns (uint256 maxAssets); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given + * current on-chain conditions. + * + * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit + * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called + * in the same transaction. + * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the + * deposit would be accepted, regardless if the user has enough tokens approved, etc. + * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by depositing. + */ + function previewDeposit(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. + * + * - MUST emit the Deposit event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * deposit execution, and are accounted for during deposit. + * - MUST revert if all assets cannot be deposited (due to deposit limit being reached, slippage, the user not + * approving enough underlying tokens to the Vault contract, etc). + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + */ + function deposit(uint256 assets, address receiver) external returns (uint256 shares); + + /** + * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. + * - MUST return a limited value if receiver is subject to some mint limit. + * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. + * - MUST NOT revert. + */ + function maxMint(address receiver) external view returns (uint256 maxShares); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given + * current on-chain conditions. + * + * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call + * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the + * same transaction. + * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint + * would be accepted, regardless if the user has enough tokens approved, etc. + * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in + * share price or some other type of condition, meaning the depositor will lose assets by minting. + */ + function previewMint(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. + * + * - MUST emit the Deposit event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint + * execution, and are accounted for during mint. + * - MUST revert if all shares cannot be minted (due to deposit limit being reached, slippage, the user not + * approving enough underlying tokens to the Vault contract, etc). + * + * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. + */ + function mint(uint256 shares, address receiver) external returns (uint256 assets); + + /** + * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the + * Vault, through a withdraw call. + * + * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + * - MUST NOT revert. + */ + function maxWithdraw(address owner) external view returns (uint256 maxAssets); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, + * given current on-chain conditions. + * + * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw + * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if + * called + * in the same transaction. + * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though + * the withdrawal would be accepted, regardless if the user has enough shares, etc. + * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in + * share price or some other type of condition, meaning the owner will lose assets by withdrawing. + */ + function previewWithdraw(uint256 assets) external view returns (uint256 shares); + + /** + * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. + * + * - MUST emit the Withdraw event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * withdraw execution, and are accounted for during withdraw. + * - MUST revert if all assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner + * not having enough shares, etc). + * + * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + * Those methods should be performed separately. + */ + function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); + + /** + * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, + * through a redeem call. + * + * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. + * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. + * - MUST NOT revert. + */ + function maxRedeem(address owner) external view returns (uint256 maxShares); + + /** + * @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block, + * given current on-chain conditions. + * + * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call + * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the + * same transaction. + * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the + * redemption would be accepted, regardless if the user has enough shares, etc. + * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. + * - MUST NOT revert. + * + * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in + * share price or some other type of condition, meaning the owner will lose assets by redeeming. + */ + function previewRedeem(uint256 shares) external view returns (uint256 assets); + + /** + * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. + * + * - MUST emit the Withdraw event. + * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the + * redeem execution, and are accounted for during redeem. + * - MUST revert if all shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner + * not having enough shares, etc). + * + * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. + * Those methods should be performed separately. + */ + function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); +} + +/// @dev Interface of the ERC20 share token, as defined in +/// https://eips.ethereum.org/EIPS/eip-7575 +interface IERC7575Share is IERC165 { + event VaultUpdate(address indexed asset, address vault); + + /** + * @dev Returns the address of the Vault for the given asset. + * + * @param asset the ERC-20 token to deposit with into the Vault + */ + function vault(address asset) external view returns (address); +} diff --git a/dependencies/forge-std-1.16.1/src/interfaces/IMulticall3.sol b/dependencies/forge-std-1.16.1/src/interfaces/IMulticall3.sol new file mode 100644 index 00000000..6a94133e --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/interfaces/IMulticall3.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +interface IMulticall3 { + struct Call { + address target; + bytes callData; + } + + struct Call3 { + address target; + bool allowFailure; + bytes callData; + } + + struct Call3Value { + address target; + bool allowFailure; + uint256 value; + bytes callData; + } + + struct Result { + bool success; + bytes returnData; + } + + function aggregate(Call[] calldata calls) external payable returns (uint256 blockNumber, bytes[] memory returnData); + + function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData); + + function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData); + + function blockAndAggregate(Call[] calldata calls) + external + payable + returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); + + function getBasefee() external view returns (uint256 basefee); + + function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash); + + function getBlockNumber() external view returns (uint256 blockNumber); + + function getChainId() external view returns (uint256 chainid); + + function getCurrentBlockCoinbase() external view returns (address coinbase); + + function getCurrentBlockDifficulty() external view returns (uint256 difficulty); + + function getCurrentBlockGasLimit() external view returns (uint256 gaslimit); + + function getCurrentBlockTimestamp() external view returns (uint256 timestamp); + + function getEthBalance(address addr) external view returns (uint256 balance); + + function getLastBlockHash() external view returns (bytes32 blockHash); + + function tryAggregate(bool requireSuccess, Call[] calldata calls) + external + payable + returns (Result[] memory returnData); + + function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls) + external + payable + returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); +} diff --git a/dependencies/forge-std-1.16.1/src/safeconsole.sol b/dependencies/forge-std-1.16.1/src/safeconsole.sol new file mode 100644 index 00000000..e12d0600 --- /dev/null +++ b/dependencies/forge-std-1.16.1/src/safeconsole.sol @@ -0,0 +1,13248 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +/// @author philogy +/// @dev Code generated automatically by script. +library safeconsole { + uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67; + + // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374) + // for the view-to-pure log trick. + function _sendLogPayload(uint256 offset, uint256 size) private pure { + function(uint256, uint256) internal view fnIn = _sendLogPayloadView; + function(uint256, uint256) internal pure pureSendLogPayload; + assembly ("memory-safe") { + pureSendLogPayload := fnIn + } + pureSendLogPayload(offset, size); + } + + function _sendLogPayloadView(uint256 offset, uint256 size) private view { + assembly ("memory-safe") { + pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0)) + } + } + + function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure { + function(uint256, uint256, uint256) internal view fnIn = _memcopyView; + function(uint256, uint256, uint256) internal pure pureMemcopy; + assembly ("memory-safe") { + pureMemcopy := fnIn + } + pureMemcopy(fromOffset, toOffset, length); + } + + function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view { + assembly ("memory-safe") { + pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length)) + } + } + + function logMemory(uint256 offset, uint256 length) internal pure { + if (offset >= 0x60) { + // Sufficient memory before slice to prepare call header. + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(sub(offset, 0x60)) + m1 := mload(sub(offset, 0x40)) + m2 := mload(sub(offset, 0x20)) + // Selector of `log(bytes)`. + mstore(sub(offset, 0x60), 0x0be77f56) + mstore(sub(offset, 0x40), 0x20) + mstore(sub(offset, 0x20), length) + } + _sendLogPayload(offset - 0x44, length + 0x44); + assembly ("memory-safe") { + mstore(sub(offset, 0x60), m0) + mstore(sub(offset, 0x40), m1) + mstore(sub(offset, 0x20), m2) + } + } else { + // Insufficient space, so copy slice forward, add header and reverse. + bytes32 m0; + bytes32 m1; + bytes32 m2; + uint256 endOffset = offset + length; + assembly ("memory-safe") { + m0 := mload(add(endOffset, 0x00)) + m1 := mload(add(endOffset, 0x20)) + m2 := mload(add(endOffset, 0x40)) + } + _memcopy(offset, offset + 0x60, length); + assembly ("memory-safe") { + // Selector of `log(bytes)`. + mstore(add(offset, 0x00), 0x0be77f56) + mstore(add(offset, 0x20), 0x20) + mstore(add(offset, 0x40), length) + } + _sendLogPayload(offset + 0x1c, length + 0x44); + _memcopy(offset + 0x60, offset, length); + assembly ("memory-safe") { + mstore(add(endOffset, 0x00), m0) + mstore(add(endOffset, 0x20), m1) + mstore(add(endOffset, 0x40), m2) + } + } + } + + function log(address p0) internal pure { + bytes32 m0; + bytes32 m1; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + // Selector of `log(address)`. + mstore(0x00, 0x2c2ecbc2) + mstore(0x20, p0) + } + _sendLogPayload(0x1c, 0x24); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + } + } + + function log(bool p0) internal pure { + bytes32 m0; + bytes32 m1; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + // Selector of `log(bool)`. + mstore(0x00, 0x32458eed) + mstore(0x20, p0) + } + _sendLogPayload(0x1c, 0x24); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + } + } + + function log(uint256 p0) internal pure { + bytes32 m0; + bytes32 m1; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + // Selector of `log(uint256)`. + mstore(0x00, 0xf82c50f1) + mstore(0x20, p0) + } + _sendLogPayload(0x1c, 0x24); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + } + } + + function log(bytes32 p0) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(string)`. + mstore(0x00, 0x41304fac) + mstore(0x20, 0x20) + writeString(0x40, p0) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, address p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(address,address)`. + mstore(0x00, 0xdaf0d4aa) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(address p0, bool p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(address,bool)`. + mstore(0x00, 0x75b605d3) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(address p0, uint256 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(address,uint256)`. + mstore(0x00, 0x8309e8a8) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(address p0, bytes32 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,string)`. + mstore(0x00, 0x759f86bb) + mstore(0x20, p0) + mstore(0x40, 0x40) + writeString(0x60, p1) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(bool,address)`. + mstore(0x00, 0x853c4849) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(bool p0, bool p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(bool,bool)`. + mstore(0x00, 0x2a110e83) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(bool p0, uint256 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(bool,uint256)`. + mstore(0x00, 0x399174d3) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(bool p0, bytes32 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,string)`. + mstore(0x00, 0x8feac525) + mstore(0x20, p0) + mstore(0x40, 0x40) + writeString(0x60, p1) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(uint256,address)`. + mstore(0x00, 0x69276c86) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(uint256 p0, bool p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(uint256,bool)`. + mstore(0x00, 0x1c9d7eb3) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(uint256 p0, uint256 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + // Selector of `log(uint256,uint256)`. + mstore(0x00, 0xf666715a) + mstore(0x20, p0) + mstore(0x40, p1) + } + _sendLogPayload(0x1c, 0x44); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + } + } + + function log(uint256 p0, bytes32 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,string)`. + mstore(0x00, 0x643fd0df) + mstore(0x20, p0) + mstore(0x40, 0x40) + writeString(0x60, p1) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bytes32 p0, address p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(string,address)`. + mstore(0x00, 0x319af333) + mstore(0x20, 0x40) + mstore(0x40, p1) + writeString(0x60, p0) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bytes32 p0, bool p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(string,bool)`. + mstore(0x00, 0xc3b55635) + mstore(0x20, 0x40) + mstore(0x40, p1) + writeString(0x60, p0) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bytes32 p0, uint256 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(string,uint256)`. + mstore(0x00, 0xb60e72cc) + mstore(0x20, 0x40) + mstore(0x40, p1) + writeString(0x60, p0) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bytes32 p0, bytes32 p1) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,string)`. + mstore(0x00, 0x4b5c4277) + mstore(0x20, 0x40) + mstore(0x40, 0x80) + writeString(0x60, p0) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, address p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,address,address)`. + mstore(0x00, 0x018c84c2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, address p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,address,bool)`. + mstore(0x00, 0xf2a66286) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, address p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,address,uint256)`. + mstore(0x00, 0x17fe6185) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, address p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(address,address,string)`. + mstore(0x00, 0x007150be) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(address p0, bool p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,bool,address)`. + mstore(0x00, 0xf11699ed) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, bool p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,bool,bool)`. + mstore(0x00, 0xeb830c92) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, bool p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,bool,uint256)`. + mstore(0x00, 0x9c4f99fb) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, bool p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(address,bool,string)`. + mstore(0x00, 0x212255cc) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(address p0, uint256 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,uint256,address)`. + mstore(0x00, 0x7bc0d848) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, uint256 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,uint256,bool)`. + mstore(0x00, 0x678209a8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, uint256 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(address,uint256,uint256)`. + mstore(0x00, 0xb69bcaf6) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(address p0, uint256 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(address,uint256,string)`. + mstore(0x00, 0xa1f2e8aa) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(address p0, bytes32 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(address,string,address)`. + mstore(0x00, 0xf08744e8) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(address p0, bytes32 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(address,string,bool)`. + mstore(0x00, 0xcf020fb1) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(address p0, bytes32 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(address,string,uint256)`. + mstore(0x00, 0x67dd6ff1) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(address p0, bytes32 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(address,string,string)`. + mstore(0x00, 0xfb772265) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, 0xa0) + writeString(0x80, p1) + writeString(0xc0, p2) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bool p0, address p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,address,address)`. + mstore(0x00, 0xd2763667) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, address p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,address,bool)`. + mstore(0x00, 0x18c9c746) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, address p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,address,uint256)`. + mstore(0x00, 0x5f7b9afb) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, address p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(bool,address,string)`. + mstore(0x00, 0xde9a9270) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bool p0, bool p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,bool,address)`. + mstore(0x00, 0x1078f68d) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, bool p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,bool,bool)`. + mstore(0x00, 0x50709698) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, bool p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,bool,uint256)`. + mstore(0x00, 0x12f21602) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, bool p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(bool,bool,string)`. + mstore(0x00, 0x2555fa46) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bool p0, uint256 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,uint256,address)`. + mstore(0x00, 0x088ef9d2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, uint256 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,uint256,bool)`. + mstore(0x00, 0xe8defba9) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, uint256 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(bool,uint256,uint256)`. + mstore(0x00, 0x37103367) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(bool p0, uint256 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(bool,uint256,string)`. + mstore(0x00, 0xc3fc3970) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bool p0, bytes32 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(bool,string,address)`. + mstore(0x00, 0x9591b953) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bool p0, bytes32 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(bool,string,bool)`. + mstore(0x00, 0xdbb4c247) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bool p0, bytes32 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(bool,string,uint256)`. + mstore(0x00, 0x1093ee11) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bool p0, bytes32 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(bool,string,string)`. + mstore(0x00, 0xb076847f) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, 0xa0) + writeString(0x80, p1) + writeString(0xc0, p2) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(uint256 p0, address p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,address,address)`. + mstore(0x00, 0xbcfd9be0) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, address p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,address,bool)`. + mstore(0x00, 0x9b6ec042) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, address p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,address,uint256)`. + mstore(0x00, 0x5a9b5ed5) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, address p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(uint256,address,string)`. + mstore(0x00, 0x63cb41f9) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(uint256 p0, bool p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,bool,address)`. + mstore(0x00, 0x35085f7b) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, bool p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,bool,bool)`. + mstore(0x00, 0x20718650) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, bool p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,bool,uint256)`. + mstore(0x00, 0x20098014) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, bool p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(uint256,bool,string)`. + mstore(0x00, 0x85775021) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(uint256 p0, uint256 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,uint256,address)`. + mstore(0x00, 0x5c96b331) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, uint256 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,uint256,bool)`. + mstore(0x00, 0x4766da72) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, uint256 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + // Selector of `log(uint256,uint256,uint256)`. + mstore(0x00, 0xd1ed7a3c) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + } + _sendLogPayload(0x1c, 0x64); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + } + } + + function log(uint256 p0, uint256 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(uint256,uint256,string)`. + mstore(0x00, 0x71d04af2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x60) + writeString(0x80, p2) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(uint256 p0, bytes32 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(uint256,string,address)`. + mstore(0x00, 0x7afac959) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(uint256 p0, bytes32 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(uint256,string,bool)`. + mstore(0x00, 0x4ceda75a) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(uint256 p0, bytes32 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(uint256,string,uint256)`. + mstore(0x00, 0x37aa7d4c) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, p2) + writeString(0x80, p1) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(uint256,string,string)`. + mstore(0x00, 0xb115611f) + mstore(0x20, p0) + mstore(0x40, 0x60) + mstore(0x60, 0xa0) + writeString(0x80, p1) + writeString(0xc0, p2) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bytes32 p0, address p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,address,address)`. + mstore(0x00, 0xfcec75e0) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, address p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,address,bool)`. + mstore(0x00, 0xc91d5ed4) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, address p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,address,uint256)`. + mstore(0x00, 0x0d26b925) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, address p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(string,address,string)`. + mstore(0x00, 0xe0e9ad4f) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, 0xa0) + writeString(0x80, p0) + writeString(0xc0, p2) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bytes32 p0, bool p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,bool,address)`. + mstore(0x00, 0x932bbb38) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, bool p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,bool,bool)`. + mstore(0x00, 0x850b7ad6) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, bool p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,bool,uint256)`. + mstore(0x00, 0xc95958d6) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, bool p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(string,bool,string)`. + mstore(0x00, 0xe298f47d) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, 0xa0) + writeString(0x80, p0) + writeString(0xc0, p2) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bytes32 p0, uint256 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,uint256,address)`. + mstore(0x00, 0x1c7ec448) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, uint256 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,uint256,bool)`. + mstore(0x00, 0xca7733b1) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, uint256 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + // Selector of `log(string,uint256,uint256)`. + mstore(0x00, 0xca47c4eb) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, p2) + writeString(0x80, p0) + } + _sendLogPayload(0x1c, 0xa4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + } + } + + function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(string,uint256,string)`. + mstore(0x00, 0x5970e089) + mstore(0x20, 0x60) + mstore(0x40, p1) + mstore(0x60, 0xa0) + writeString(0x80, p0) + writeString(0xc0, p2) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bytes32 p0, bytes32 p1, address p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(string,string,address)`. + mstore(0x00, 0x95ed0195) + mstore(0x20, 0x60) + mstore(0x40, 0xa0) + mstore(0x60, p2) + writeString(0x80, p0) + writeString(0xc0, p1) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bytes32 p0, bytes32 p1, bool p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(string,string,bool)`. + mstore(0x00, 0xb0e0f9b5) + mstore(0x20, 0x60) + mstore(0x40, 0xa0) + mstore(0x60, p2) + writeString(0x80, p0) + writeString(0xc0, p1) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + // Selector of `log(string,string,uint256)`. + mstore(0x00, 0x5821efa1) + mstore(0x20, 0x60) + mstore(0x40, 0xa0) + mstore(0x60, p2) + writeString(0x80, p0) + writeString(0xc0, p1) + } + _sendLogPayload(0x1c, 0xe4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + } + } + + function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + // Selector of `log(string,string,string)`. + mstore(0x00, 0x2ced7cef) + mstore(0x20, 0x60) + mstore(0x40, 0xa0) + mstore(0x60, 0xe0) + writeString(0x80, p0) + writeString(0xc0, p1) + writeString(0x100, p2) + } + _sendLogPayload(0x1c, 0x124); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + } + } + + function log(address p0, address p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,address,address)`. + mstore(0x00, 0x665bf134) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,address,bool)`. + mstore(0x00, 0x0e378994) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,address,uint256)`. + mstore(0x00, 0x94250d77) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,address,address,string)`. + mstore(0x00, 0xf808da20) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, address p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,bool,address)`. + mstore(0x00, 0x9f1bc36e) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,bool,bool)`. + mstore(0x00, 0x2cd4134a) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,bool,uint256)`. + mstore(0x00, 0x3971e78c) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,address,bool,string)`. + mstore(0x00, 0xaa6540c8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, address p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,uint256,address)`. + mstore(0x00, 0x8da6def5) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,uint256,bool)`. + mstore(0x00, 0x9b4254e2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,address,uint256,uint256)`. + mstore(0x00, 0xbe553481) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,address,uint256,string)`. + mstore(0x00, 0xfdb4f990) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, address p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,address,string,address)`. + mstore(0x00, 0x8f736d16) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, address p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,address,string,bool)`. + mstore(0x00, 0x6f1a594e) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,address,string,uint256)`. + mstore(0x00, 0xef1cefe7) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,address,string,string)`. + mstore(0x00, 0x21bdaf25) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bool p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,address,address)`. + mstore(0x00, 0x660375dd) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,address,bool)`. + mstore(0x00, 0xa6f50b0f) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,address,uint256)`. + mstore(0x00, 0xa75c59de) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,bool,address,string)`. + mstore(0x00, 0x2dd778e6) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bool p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,bool,address)`. + mstore(0x00, 0xcf394485) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,bool,bool)`. + mstore(0x00, 0xcac43479) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,bool,uint256)`. + mstore(0x00, 0x8c4e5de6) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,bool,bool,string)`. + mstore(0x00, 0xdfc4a2e8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bool p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,uint256,address)`. + mstore(0x00, 0xccf790a1) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,uint256,bool)`. + mstore(0x00, 0xc4643e20) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,bool,uint256,uint256)`. + mstore(0x00, 0x386ff5f4) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,bool,uint256,string)`. + mstore(0x00, 0x0aa6cfad) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bool p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,bool,string,address)`. + mstore(0x00, 0x19fd4956) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bool p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,bool,string,bool)`. + mstore(0x00, 0x50ad461d) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,bool,string,uint256)`. + mstore(0x00, 0x80e6a20b) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,bool,string,string)`. + mstore(0x00, 0x475c5c33) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, uint256 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,address,address)`. + mstore(0x00, 0x478d1c62) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,address,bool)`. + mstore(0x00, 0xa1bcc9b3) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,address,uint256)`. + mstore(0x00, 0x100f650e) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,uint256,address,string)`. + mstore(0x00, 0x1da986ea) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, uint256 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,bool,address)`. + mstore(0x00, 0xa31bfdcc) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,bool,bool)`. + mstore(0x00, 0x3bf5e537) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,bool,uint256)`. + mstore(0x00, 0x22f6b999) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,uint256,bool,string)`. + mstore(0x00, 0xc5ad85f9) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,uint256,address)`. + mstore(0x00, 0x20e3984d) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,uint256,bool)`. + mstore(0x00, 0x66f1bc67) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(address,uint256,uint256,uint256)`. + mstore(0x00, 0x34f0e636) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,uint256,uint256,string)`. + mstore(0x00, 0x4a28c017) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,uint256,string,address)`. + mstore(0x00, 0x5c430d47) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,uint256,string,bool)`. + mstore(0x00, 0xcf18105c) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,uint256,string,uint256)`. + mstore(0x00, 0xbf01f891) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,uint256,string,string)`. + mstore(0x00, 0x88a8c406) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bytes32 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,address,address)`. + mstore(0x00, 0x0d36fa20) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,address,bool)`. + mstore(0x00, 0x0df12b76) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,address,uint256)`. + mstore(0x00, 0x457fe3cf) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,string,address,string)`. + mstore(0x00, 0xf7e36245) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bytes32 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,bool,address)`. + mstore(0x00, 0x205871c2) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,bool,bool)`. + mstore(0x00, 0x5f1d5c9f) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,bool,uint256)`. + mstore(0x00, 0x515e38b6) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,string,bool,string)`. + mstore(0x00, 0xbc0b61fe) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,uint256,address)`. + mstore(0x00, 0x63183678) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,uint256,bool)`. + mstore(0x00, 0x0ef7e050) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(address,string,uint256,uint256)`. + mstore(0x00, 0x1dc8e1b8) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,string,uint256,string)`. + mstore(0x00, 0x448830a8) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,string,string,address)`. + mstore(0x00, 0xa04e2f87) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,string,string,bool)`. + mstore(0x00, 0x35a5071f) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(address,string,string,uint256)`. + mstore(0x00, 0x159f8927) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(address,string,string,string)`. + mstore(0x00, 0x5d02c50b) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, 0x100) + writeString(0xa0, p1) + writeString(0xe0, p2) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bool p0, address p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,address,address)`. + mstore(0x00, 0x1d14d001) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,address,bool)`. + mstore(0x00, 0x46600be0) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,address,uint256)`. + mstore(0x00, 0x0c66d1be) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,address,address,string)`. + mstore(0x00, 0xd812a167) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, address p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,bool,address)`. + mstore(0x00, 0x1c41a336) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,bool,bool)`. + mstore(0x00, 0x6a9c478b) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,bool,uint256)`. + mstore(0x00, 0x07831502) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,address,bool,string)`. + mstore(0x00, 0x4a66cb34) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, address p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,uint256,address)`. + mstore(0x00, 0x136b05dd) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,uint256,bool)`. + mstore(0x00, 0xd6019f1c) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,address,uint256,uint256)`. + mstore(0x00, 0x7bf181a1) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,address,uint256,string)`. + mstore(0x00, 0x51f09ff8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, address p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,address,string,address)`. + mstore(0x00, 0x6f7c603e) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, address p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,address,string,bool)`. + mstore(0x00, 0xe2bfd60b) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,address,string,uint256)`. + mstore(0x00, 0xc21f64c7) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,address,string,string)`. + mstore(0x00, 0xa73c1db6) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bool p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,address,address)`. + mstore(0x00, 0xf4880ea4) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,address,bool)`. + mstore(0x00, 0xc0a302d8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,address,uint256)`. + mstore(0x00, 0x4c123d57) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,bool,address,string)`. + mstore(0x00, 0xa0a47963) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bool p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,bool,address)`. + mstore(0x00, 0x8c329b1a) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,bool,bool)`. + mstore(0x00, 0x3b2a5ce0) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,bool,uint256)`. + mstore(0x00, 0x6d7045c1) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,bool,bool,string)`. + mstore(0x00, 0x2ae408d4) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bool p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,uint256,address)`. + mstore(0x00, 0x54a7a9a0) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,uint256,bool)`. + mstore(0x00, 0x619e4d0e) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,bool,uint256,uint256)`. + mstore(0x00, 0x0bb00eab) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,bool,uint256,string)`. + mstore(0x00, 0x7dd4d0e0) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bool p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,bool,string,address)`. + mstore(0x00, 0xf9ad2b89) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,bool,string,bool)`. + mstore(0x00, 0xb857163a) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,bool,string,uint256)`. + mstore(0x00, 0xe3a9ca2f) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,bool,string,string)`. + mstore(0x00, 0x6d1e8751) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, uint256 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,address,address)`. + mstore(0x00, 0x26f560a8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,address,bool)`. + mstore(0x00, 0xb4c314ff) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,address,uint256)`. + mstore(0x00, 0x1537dc87) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,uint256,address,string)`. + mstore(0x00, 0x1bb3b09a) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, uint256 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,bool,address)`. + mstore(0x00, 0x9acd3616) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,bool,bool)`. + mstore(0x00, 0xceb5f4d7) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,bool,uint256)`. + mstore(0x00, 0x7f9bbca2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,uint256,bool,string)`. + mstore(0x00, 0x9143dbb1) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,uint256,address)`. + mstore(0x00, 0x00dd87b9) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,uint256,bool)`. + mstore(0x00, 0xbe984353) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(bool,uint256,uint256,uint256)`. + mstore(0x00, 0x374bb4b2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,uint256,uint256,string)`. + mstore(0x00, 0x8e69fb5d) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,uint256,string,address)`. + mstore(0x00, 0xfedd1fff) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,uint256,string,bool)`. + mstore(0x00, 0xe5e70b2b) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,uint256,string,uint256)`. + mstore(0x00, 0x6a1199e2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,uint256,string,string)`. + mstore(0x00, 0xf5bc2249) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bytes32 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,address,address)`. + mstore(0x00, 0x2b2b18dc) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,address,bool)`. + mstore(0x00, 0x6dd434ca) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,address,uint256)`. + mstore(0x00, 0xa5cada94) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,string,address,string)`. + mstore(0x00, 0x12d6c788) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bytes32 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,bool,address)`. + mstore(0x00, 0x538e06ab) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,bool,bool)`. + mstore(0x00, 0xdc5e935b) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,bool,uint256)`. + mstore(0x00, 0x1606a393) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,string,bool,string)`. + mstore(0x00, 0x483d0416) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,uint256,address)`. + mstore(0x00, 0x1596a1ce) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,uint256,bool)`. + mstore(0x00, 0x6b0e5d53) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(bool,string,uint256,uint256)`. + mstore(0x00, 0x28863fcb) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,string,uint256,string)`. + mstore(0x00, 0x1ad96de6) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,string,string,address)`. + mstore(0x00, 0x97d394d8) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,string,string,bool)`. + mstore(0x00, 0x1e4b87e5) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(bool,string,string,uint256)`. + mstore(0x00, 0x7be0c3eb) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(bool,string,string,string)`. + mstore(0x00, 0x1762e32a) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, 0x100) + writeString(0xa0, p1) + writeString(0xe0, p2) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(uint256 p0, address p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,address,address)`. + mstore(0x00, 0x2488b414) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,address,bool)`. + mstore(0x00, 0x091ffaf5) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,address,uint256)`. + mstore(0x00, 0x736efbb6) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,address,address,string)`. + mstore(0x00, 0x031c6f73) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, address p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,bool,address)`. + mstore(0x00, 0xef72c513) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,bool,bool)`. + mstore(0x00, 0xe351140f) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,bool,uint256)`. + mstore(0x00, 0x5abd992a) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,address,bool,string)`. + mstore(0x00, 0x90fb06aa) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,uint256,address)`. + mstore(0x00, 0x15c127b5) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,uint256,bool)`. + mstore(0x00, 0x5f743a7c) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,address,uint256,uint256)`. + mstore(0x00, 0x0c9cd9c1) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,address,uint256,string)`. + mstore(0x00, 0xddb06521) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,address,string,address)`. + mstore(0x00, 0x9cba8fff) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,address,string,bool)`. + mstore(0x00, 0xcc32ab07) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,address,string,uint256)`. + mstore(0x00, 0x46826b5d) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,address,string,string)`. + mstore(0x00, 0x3e128ca3) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bool p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,address,address)`. + mstore(0x00, 0xa1ef4cbb) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,address,bool)`. + mstore(0x00, 0x454d54a5) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,address,uint256)`. + mstore(0x00, 0x078287f5) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,bool,address,string)`. + mstore(0x00, 0xade052c7) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bool p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,bool,address)`. + mstore(0x00, 0x69640b59) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,bool,bool)`. + mstore(0x00, 0xb6f577a1) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,bool,uint256)`. + mstore(0x00, 0x7464ce23) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,bool,bool,string)`. + mstore(0x00, 0xdddb9561) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,uint256,address)`. + mstore(0x00, 0x88cb6041) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,uint256,bool)`. + mstore(0x00, 0x91a02e2a) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,bool,uint256,uint256)`. + mstore(0x00, 0xc6acc7a8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,bool,uint256,string)`. + mstore(0x00, 0xde03e774) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,bool,string,address)`. + mstore(0x00, 0xef529018) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,bool,string,bool)`. + mstore(0x00, 0xeb928d7f) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,bool,string,uint256)`. + mstore(0x00, 0x2c1d0746) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,bool,string,string)`. + mstore(0x00, 0x68c8b8bd) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,address,address)`. + mstore(0x00, 0x56a5d1b1) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,address,bool)`. + mstore(0x00, 0x15cac476) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,address,uint256)`. + mstore(0x00, 0x88f6e4b2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,uint256,address,string)`. + mstore(0x00, 0x6cde40b8) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,bool,address)`. + mstore(0x00, 0x9a816a83) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,bool,bool)`. + mstore(0x00, 0xab085ae6) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,bool,uint256)`. + mstore(0x00, 0xeb7f6fd2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,uint256,bool,string)`. + mstore(0x00, 0xa5b4fc99) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,uint256,address)`. + mstore(0x00, 0xfa8185af) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,uint256,bool)`. + mstore(0x00, 0xc598d185) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + assembly ("memory-safe") { + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + // Selector of `log(uint256,uint256,uint256,uint256)`. + mstore(0x00, 0x193fb800) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + } + _sendLogPayload(0x1c, 0x84); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + } + } + + function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,uint256,uint256,string)`. + mstore(0x00, 0x59cfcbe3) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0x80) + writeString(0xa0, p3) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,uint256,string,address)`. + mstore(0x00, 0x42d21db7) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,uint256,string,bool)`. + mstore(0x00, 0x7af6ab25) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,uint256,string,uint256)`. + mstore(0x00, 0x5da297eb) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, p3) + writeString(0xa0, p2) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,uint256,string,string)`. + mstore(0x00, 0x27d8afd2) + mstore(0x20, p0) + mstore(0x40, p1) + mstore(0x60, 0x80) + mstore(0x80, 0xc0) + writeString(0xa0, p2) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,address,address)`. + mstore(0x00, 0x6168ed61) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,address,bool)`. + mstore(0x00, 0x90c30a56) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,address,uint256)`. + mstore(0x00, 0xe8d3018d) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,string,address,string)`. + mstore(0x00, 0x9c3adfa1) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,bool,address)`. + mstore(0x00, 0xae2ec581) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,bool,bool)`. + mstore(0x00, 0xba535d9c) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,bool,uint256)`. + mstore(0x00, 0xcf009880) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,string,bool,string)`. + mstore(0x00, 0xd2d423cd) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,uint256,address)`. + mstore(0x00, 0x3b2279b4) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,uint256,bool)`. + mstore(0x00, 0x691a8f74) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(uint256,string,uint256,uint256)`. + mstore(0x00, 0x82c25b74) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p1) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,string,uint256,string)`. + mstore(0x00, 0xb7b914ca) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p1) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,string,string,address)`. + mstore(0x00, 0xd583c602) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,string,string,bool)`. + mstore(0x00, 0xb3a6b6bd) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(uint256,string,string,uint256)`. + mstore(0x00, 0xb028c9bd) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p1) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(uint256,string,string,string)`. + mstore(0x00, 0x21ad0683) + mstore(0x20, p0) + mstore(0x40, 0x80) + mstore(0x60, 0xc0) + mstore(0x80, 0x100) + writeString(0xa0, p1) + writeString(0xe0, p2) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, address p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,address,address)`. + mstore(0x00, 0xed8f28f6) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,address,bool)`. + mstore(0x00, 0xb59dbd60) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,address,uint256)`. + mstore(0x00, 0x8ef3f399) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,address,address,string)`. + mstore(0x00, 0x800a1c67) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, address p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,bool,address)`. + mstore(0x00, 0x223603bd) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,bool,bool)`. + mstore(0x00, 0x79884c2b) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,bool,uint256)`. + mstore(0x00, 0x3e9f866a) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,address,bool,string)`. + mstore(0x00, 0x0454c079) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,uint256,address)`. + mstore(0x00, 0x63fb8bc5) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,uint256,bool)`. + mstore(0x00, 0xfc4845f0) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,address,uint256,uint256)`. + mstore(0x00, 0xf8f51b1e) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,address,uint256,string)`. + mstore(0x00, 0x5a477632) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,address,string,address)`. + mstore(0x00, 0xaabc9a31) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,address,string,bool)`. + mstore(0x00, 0x5f15d28c) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,address,string,uint256)`. + mstore(0x00, 0x91d1112e) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,address,string,string)`. + mstore(0x00, 0x245986f2) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, 0x100) + writeString(0xa0, p0) + writeString(0xe0, p2) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bool p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,address,address)`. + mstore(0x00, 0x33e9dd1d) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,address,bool)`. + mstore(0x00, 0x958c28c6) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,address,uint256)`. + mstore(0x00, 0x5d08bb05) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,bool,address,string)`. + mstore(0x00, 0x2d8e33a4) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bool p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,bool,address)`. + mstore(0x00, 0x7190a529) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,bool,bool)`. + mstore(0x00, 0x895af8c5) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,bool,uint256)`. + mstore(0x00, 0x8e3f78a9) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,bool,bool,string)`. + mstore(0x00, 0x9d22d5dd) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,uint256,address)`. + mstore(0x00, 0x935e09bf) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,uint256,bool)`. + mstore(0x00, 0x8af7cf8a) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,bool,uint256,uint256)`. + mstore(0x00, 0x64b5bb67) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,bool,uint256,string)`. + mstore(0x00, 0x742d6ee7) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,bool,string,address)`. + mstore(0x00, 0xe0625b29) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,bool,string,bool)`. + mstore(0x00, 0x3f8a701d) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,bool,string,uint256)`. + mstore(0x00, 0x24f91465) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,bool,string,string)`. + mstore(0x00, 0xa826caeb) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, 0x100) + writeString(0xa0, p0) + writeString(0xe0, p2) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,address,address)`. + mstore(0x00, 0x5ea2b7ae) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,address,bool)`. + mstore(0x00, 0x82112a42) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,address,uint256)`. + mstore(0x00, 0x4f04fdc6) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,uint256,address,string)`. + mstore(0x00, 0x9ffb2f93) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,bool,address)`. + mstore(0x00, 0xe0e95b98) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,bool,bool)`. + mstore(0x00, 0x354c36d6) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,bool,uint256)`. + mstore(0x00, 0xe41b6f6f) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,uint256,bool,string)`. + mstore(0x00, 0xabf73a98) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,uint256,address)`. + mstore(0x00, 0xe21de278) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,uint256,bool)`. + mstore(0x00, 0x7626db92) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + // Selector of `log(string,uint256,uint256,uint256)`. + mstore(0x00, 0xa7a87853) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + } + _sendLogPayload(0x1c, 0xc4); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + } + } + + function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,uint256,uint256,string)`. + mstore(0x00, 0x854b3496) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, p2) + mstore(0x80, 0xc0) + writeString(0xa0, p0) + writeString(0xe0, p3) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,uint256,string,address)`. + mstore(0x00, 0x7c4632a4) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,uint256,string,bool)`. + mstore(0x00, 0x7d24491d) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,uint256,string,uint256)`. + mstore(0x00, 0xc67ea9d1) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p2) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,uint256,string,string)`. + mstore(0x00, 0x5ab84e1f) + mstore(0x20, 0x80) + mstore(0x40, p1) + mstore(0x60, 0xc0) + mstore(0x80, 0x100) + writeString(0xa0, p0) + writeString(0xe0, p2) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,address,address)`. + mstore(0x00, 0x439c7bef) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,address,bool)`. + mstore(0x00, 0x5ccd4e37) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,address,uint256)`. + mstore(0x00, 0x7cc3c607) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,string,address,string)`. + mstore(0x00, 0xeb1bff80) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, 0x100) + writeString(0xa0, p0) + writeString(0xe0, p1) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,bool,address)`. + mstore(0x00, 0xc371c7db) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,bool,bool)`. + mstore(0x00, 0x40785869) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,bool,uint256)`. + mstore(0x00, 0xd6aefad2) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,string,bool,string)`. + mstore(0x00, 0x5e84b0ea) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, 0x100) + writeString(0xa0, p0) + writeString(0xe0, p1) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,uint256,address)`. + mstore(0x00, 0x1023f7b2) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,uint256,bool)`. + mstore(0x00, 0xc3a8a654) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + // Selector of `log(string,string,uint256,uint256)`. + mstore(0x00, 0xf45d7d2c) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + } + _sendLogPayload(0x1c, 0x104); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + } + } + + function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,string,uint256,string)`. + mstore(0x00, 0x5d1a971a) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, p2) + mstore(0x80, 0x100) + writeString(0xa0, p0) + writeString(0xe0, p1) + writeString(0x120, p3) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,string,string,address)`. + mstore(0x00, 0x6d572f44) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, 0x100) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + writeString(0x120, p2) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,string,string,bool)`. + mstore(0x00, 0x2c1754ed) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, 0x100) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + writeString(0x120, p2) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + // Selector of `log(string,string,string,uint256)`. + mstore(0x00, 0x8eafb02b) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, 0x100) + mstore(0x80, p3) + writeString(0xa0, p0) + writeString(0xe0, p1) + writeString(0x120, p2) + } + _sendLogPayload(0x1c, 0x144); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + } + } + + function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { + bytes32 m0; + bytes32 m1; + bytes32 m2; + bytes32 m3; + bytes32 m4; + bytes32 m5; + bytes32 m6; + bytes32 m7; + bytes32 m8; + bytes32 m9; + bytes32 m10; + bytes32 m11; + bytes32 m12; + assembly ("memory-safe") { + function writeString(pos, w) { + let length := 0 + for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } + mstore(pos, length) + let shift := sub(256, shl(3, length)) + mstore(add(pos, 0x20), shl(shift, shr(shift, w))) + } + m0 := mload(0x00) + m1 := mload(0x20) + m2 := mload(0x40) + m3 := mload(0x60) + m4 := mload(0x80) + m5 := mload(0xa0) + m6 := mload(0xc0) + m7 := mload(0xe0) + m8 := mload(0x100) + m9 := mload(0x120) + m10 := mload(0x140) + m11 := mload(0x160) + m12 := mload(0x180) + // Selector of `log(string,string,string,string)`. + mstore(0x00, 0xde68f20a) + mstore(0x20, 0x80) + mstore(0x40, 0xc0) + mstore(0x60, 0x100) + mstore(0x80, 0x140) + writeString(0xa0, p0) + writeString(0xe0, p1) + writeString(0x120, p2) + writeString(0x160, p3) + } + _sendLogPayload(0x1c, 0x184); + assembly ("memory-safe") { + mstore(0x00, m0) + mstore(0x20, m1) + mstore(0x40, m2) + mstore(0x60, m3) + mstore(0x80, m4) + mstore(0xa0, m5) + mstore(0xc0, m6) + mstore(0xe0, m7) + mstore(0x100, m8) + mstore(0x120, m9) + mstore(0x140, m10) + mstore(0x160, m11) + mstore(0x180, m12) + } + } +} diff --git a/dependencies/forge-std-1.16.1/test/CommonBase.t.sol b/dependencies/forge-std-1.16.1/test/CommonBase.t.sol new file mode 100644 index 00000000..28c91a91 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/CommonBase.t.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {CommonBase} from "../src/Base.sol"; +import {StdConstants} from "../src/StdConstants.sol"; +import {Test} from "../src/Test.sol"; + +contract CommonBaseTest is Test { + function testVmAddressValue() public pure { + assertEq(VM_ADDRESS, address(StdConstants.VM)); + } + + function testConsoleValue() public pure { + assertEq(CONSOLE, StdConstants.CONSOLE); + } + + function testCreate2FactoryValue() public pure { + assertEq(CREATE2_FACTORY, StdConstants.CREATE2_FACTORY); + } + + function testDefaultSenderValue() public pure { + assertEq(DEFAULT_SENDER, StdConstants.DEFAULT_SENDER); + } + + function testDefaultTestContractValue() public pure { + assertEq(DEFAULT_TEST_CONTRACT, StdConstants.DEFAULT_TEST_CONTRACT); + } + + function testMulticall3AddressValue() public pure { + assertEq(MULTICALL3_ADDRESS, address(StdConstants.MULTICALL3_ADDRESS)); + } + + function testSecp256k1OrderValue() public pure { + assertEq(SECP256K1_ORDER, StdConstants.SECP256K1_ORDER); + } + + function testUint256MaxValue() public pure { + assertEq(UINT256_MAX, type(uint256).max); + } + + function testVmValue() public pure { + assertEq(address(vm), address(StdConstants.VM)); + } +} diff --git a/dependencies/forge-std-1.16.1/test/Config.t.sol b/dependencies/forge-std-1.16.1/test/Config.t.sol new file mode 100644 index 00000000..00af7550 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/Config.t.sol @@ -0,0 +1,381 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.13; + +import {Test} from "../src/Test.sol"; +import {Config} from "../src/Config.sol"; +import {StdConfig} from "../src/StdConfig.sol"; + +contract ConfigTest is Test, Config { + function setUp() public { + vm.setEnv("MAINNET_RPC", "https://ethereum.reth.rs/rpc"); + vm.setEnv("WETH_MAINNET", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"); + vm.setEnv("OPTIMISM_RPC", "https://mainnet.optimism.io"); + vm.setEnv("WETH_OPTIMISM", "0x4200000000000000000000000000000000000006"); + } + + function test_loadConfig() public { + // Deploy the config contract with the test fixture. + _loadConfig("./test/fixtures/config.toml", false); + + // -- MAINNET -------------------------------------------------------------- + + // Read and assert RPC URL for Mainnet (chain ID 1) + assertEq(config.getRpcUrl(1), "https://ethereum.reth.rs/rpc"); + + // Read and assert boolean values + assertTrue(config.get(1, "is_live").toBool()); + bool[] memory bool_array = config.get(1, "bool_array").toBoolArray(); + assertTrue(bool_array[0]); + assertFalse(bool_array[1]); + + // Read and assert address values + assertEq(config.get(1, "weth").toAddress(), 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); + address[] memory address_array = config.get(1, "deps").toAddressArray(); + assertEq(address_array[0], 0x0000000000000000000000000000000000000000); + assertEq(address_array[1], 0x1111111111111111111111111111111111111111); + + // Read and assert bytes32 values + assertEq(config.get(1, "word").toBytes32(), bytes32(uint256(1234))); + bytes32[] memory bytes32_array = config.get(1, "word_array").toBytes32Array(); + assertEq(bytes32_array[0], bytes32(uint256(5678))); + assertEq(bytes32_array[1], bytes32(uint256(9999))); + + // Read and assert uint values + assertEq(config.get(1, "number").toUint256(), 1234); + uint256[] memory uint_array = config.get(1, "number_array").toUint256Array(); + assertEq(uint_array[0], 5678); + assertEq(uint_array[1], 9999); + + // Read and assert int values + assertEq(config.get(1, "signed_number").toInt256(), -1234); + int256[] memory int_array = config.get(1, "signed_number_array").toInt256Array(); + assertEq(int_array[0], -5678); + assertEq(int_array[1], 9999); + + // Read and assert bytes values + assertEq(config.get(1, "b").toBytes(), hex"abcd"); + bytes[] memory bytes_array = config.get(1, "b_array").toBytesArray(); + assertEq(bytes_array[0], hex"dead"); + assertEq(bytes_array[1], hex"beef"); + + // Read and assert string values + assertEq(config.get(1, "str").toString(), "foo"); + string[] memory string_array = config.get(1, "str_array").toStringArray(); + assertEq(string_array[0], "bar"); + assertEq(string_array[1], "baz"); + + // -- OPTIMISM ------------------------------------------------------------ + + // Read and assert RPC URL for Optimism (chain ID 10) + assertEq(config.getRpcUrl(10), "https://mainnet.optimism.io"); + + // Read and assert boolean values + assertFalse(config.get(10, "is_live").toBool()); + bool_array = config.get(10, "bool_array").toBoolArray(); + assertFalse(bool_array[0]); + assertTrue(bool_array[1]); + + // Read and assert address values + assertEq(config.get(10, "weth").toAddress(), 0x4200000000000000000000000000000000000006); + address_array = config.get(10, "deps").toAddressArray(); + assertEq(address_array[0], 0x2222222222222222222222222222222222222222); + assertEq(address_array[1], 0x3333333333333333333333333333333333333333); + + // Read and assert bytes32 values + assertEq(config.get(10, "word").toBytes32(), bytes32(uint256(9999))); + bytes32_array = config.get(10, "word_array").toBytes32Array(); + assertEq(bytes32_array[0], bytes32(uint256(1234))); + assertEq(bytes32_array[1], bytes32(uint256(5678))); + + // Read and assert uint values + assertEq(config.get(10, "number").toUint256(), 9999); + uint_array = config.get(10, "number_array").toUint256Array(); + assertEq(uint_array[0], 1234); + assertEq(uint_array[1], 5678); + + // Read and assert int values + assertEq(config.get(10, "signed_number").toInt256(), 9999); + int_array = config.get(10, "signed_number_array").toInt256Array(); + assertEq(int_array[0], -1234); + assertEq(int_array[1], -5678); + + // Read and assert bytes values + assertEq(config.get(10, "b").toBytes(), hex"dcba"); + bytes_array = config.get(10, "b_array").toBytesArray(); + assertEq(bytes_array[0], hex"c0ffee"); + assertEq(bytes_array[1], hex"babe"); + + // Read and assert string values + assertEq(config.get(10, "str").toString(), "alice"); + string_array = config.get(10, "str_array").toStringArray(); + assertEq(string_array[0], "bob"); + assertEq(string_array[1], "charlie"); + } + + function test_loadConfigAndForks() public { + _loadConfigAndForks("./test/fixtures/config.toml", false); + + // assert that the map of chain id and fork ids is created and that the chain ids actually match + assertEq(forkOf[1], 0); + vm.selectFork(forkOf[1]); + assertEq(vm.getChainId(), 1); + + assertEq(forkOf[10], 1); + vm.selectFork(forkOf[10]); + assertEq(vm.getChainId(), 10); + } + + function test_configExists() public { + _loadConfig("./test/fixtures/config.toml", false); + + string[] memory keys = new string[](7); + keys[0] = "is_live"; + keys[1] = "weth"; + keys[2] = "word"; + keys[3] = "number"; + keys[4] = "signed_number"; + keys[5] = "b"; + keys[6] = "str"; + + // Read and assert RPC URL for Mainnet (chain ID 1) + assertEq(config.getRpcUrl(1), "https://ethereum.reth.rs/rpc"); + + for (uint256 i = 0; i < keys.length; ++i) { + assertTrue(config.exists(1, keys[i])); + assertFalse(config.exists(1, string.concat(keys[i], "_"))); + } + + // Assert RPC URL for Optimism (chain ID 10) + assertEq(config.getRpcUrl(10), "https://mainnet.optimism.io"); + + for (uint256 i = 0; i < keys.length; ++i) { + assertTrue(config.exists(10, keys[i])); + assertFalse(config.exists(10, string.concat(keys[i], "_"))); + } + } + + function test_writeConfig() public { + // Create a temporary copy of the config file to avoid modifying the original. + string memory originalConfig = "./test/fixtures/config.toml"; + string memory testConfig = "./test/fixtures/config.t.toml"; + vm.copyFile(originalConfig, testConfig); + + // Deploy the config contract with the temporary fixture. + _loadConfig(testConfig, false); + + // Enable writing to file bypassing the context check. + vm.store(address(config), bytes32(uint256(5)), bytes32(uint256(1))); + + { + // Update a single boolean value and verify the change. + config.set(1, "is_live", false); + + assertFalse(config.get(1, "is_live").toBool()); + + string memory content = vm.readFile(testConfig); + assertFalse(vm.parseTomlBool(content, "$.mainnet.bool.is_live")); + + // Update a single address value and verify the change. + address new_addr = 0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF; + config.set(1, "weth", new_addr); + + assertEq(config.get(1, "weth").toAddress(), new_addr); + + content = vm.readFile(testConfig); + assertEq(vm.parseTomlAddress(content, "$.mainnet.address.weth"), new_addr); + + // Update a uint array and verify the change. + uint256[] memory new_numbers = new uint256[](3); + new_numbers[0] = 1; + new_numbers[1] = 2; + new_numbers[2] = 3; + config.set(10, "number_array", new_numbers); + + uint256[] memory updated_numbers_mem = config.get(10, "number_array").toUint256Array(); + assertEq(updated_numbers_mem.length, 3); + assertEq(updated_numbers_mem[0], 1); + assertEq(updated_numbers_mem[1], 2); + assertEq(updated_numbers_mem[2], 3); + + content = vm.readFile(testConfig); + uint256[] memory updated_numbers_disk = vm.parseTomlUintArray(content, "$.optimism.uint.number_array"); + assertEq(updated_numbers_disk.length, 3); + assertEq(updated_numbers_disk[0], 1); + assertEq(updated_numbers_disk[1], 2); + assertEq(updated_numbers_disk[2], 3); + + // Update a string array and verify the change. + string[] memory new_strings = new string[](2); + new_strings[0] = "hello"; + new_strings[1] = "world"; + config.set(1, "str_array", new_strings); + + string[] memory updated_strings_mem = config.get(1, "str_array").toStringArray(); + assertEq(updated_strings_mem.length, 2); + assertEq(updated_strings_mem[0], "hello"); + assertEq(updated_strings_mem[1], "world"); + + content = vm.readFile(testConfig); + string[] memory updated_strings_disk = vm.parseTomlStringArray(content, "$.mainnet.string.str_array"); + assertEq(updated_strings_disk.length, 2); + assertEq(updated_strings_disk[0], "hello"); + assertEq(updated_strings_disk[1], "world"); + + // Create a new uint variable and verify the change. + config.set(1, "new_uint", uint256(42)); + + assertEq(config.get(1, "new_uint").toUint256(), 42); + + content = vm.readFile(testConfig); + assertEq(vm.parseTomlUint(content, "$.mainnet.uint.new_uint"), 42); + + // Create a new int variable and verify the change. + config.set(1, "new_int", int256(-42)); + + assertEq(config.get(1, "new_int").toInt256(), -42); + + content = vm.readFile(testConfig); + assertEq(vm.parseTomlInt(content, "$.mainnet.int.new_int"), -42); + + // Create a new int array and verify the change. + int256[] memory new_ints = new int256[](2); + new_ints[0] = -100; + new_ints[1] = 200; + config.set(10, "new_ints", new_ints); + + int256[] memory updated_ints_mem = config.get(10, "new_ints").toInt256Array(); + assertEq(updated_ints_mem.length, 2); + assertEq(updated_ints_mem[0], -100); + assertEq(updated_ints_mem[1], 200); + + content = vm.readFile(testConfig); + int256[] memory updated_ints_disk = vm.parseTomlIntArray(content, "$.optimism.int.new_ints"); + assertEq(updated_ints_disk.length, 2); + assertEq(updated_ints_disk[0], -100); + assertEq(updated_ints_disk[1], 200); + + // Create a new bytes32 array and verify the change. + bytes32[] memory new_words = new bytes32[](2); + new_words[0] = bytes32(uint256(0xDEAD)); + new_words[1] = bytes32(uint256(0xBEEF)); + config.set(10, "new_words", new_words); + + bytes32[] memory updated_words_mem = config.get(10, "new_words").toBytes32Array(); + assertEq(updated_words_mem.length, 2); + assertEq(updated_words_mem[0], new_words[0]); + assertEq(updated_words_mem[1], new_words[1]); + + content = vm.readFile(testConfig); + bytes32[] memory updated_words_disk = vm.parseTomlBytes32Array(content, "$.optimism.bytes32.new_words"); + assertEq(updated_words_disk.length, 2); + assertEq(vm.toString(updated_words_disk[0]), vm.toString(new_words[0])); + assertEq(vm.toString(updated_words_disk[1]), vm.toString(new_words[1])); + } + + // Clean up the temporary file. + vm.removeFile(testConfig); + } + + function test_writeUpdatesBackToFile() public { + // Create a temporary copy of the config file to avoid modifying the original. + string memory originalConfig = "./test/fixtures/config.toml"; + string memory testConfig = "./test/fixtures/write_config.t.toml"; + vm.copyFile(originalConfig, testConfig); + + // Deploy the config contract with `writeToFile = false` (disabled). + _loadConfig(testConfig, false); + + // Update a single boolean value and verify the file is NOT changed. + config.set(1, "is_live", false); + string memory content = vm.readFile(testConfig); + assertTrue(vm.parseTomlBool(content, "$.mainnet.bool.is_live"), "File should not be updated yet"); + + // Enable writing to file bypassing the context check. + vm.store(address(config), bytes32(uint256(5)), bytes32(uint256(1))); + + // Update the value again and verify the file IS changed. + config.set(1, "is_live", false); + content = vm.readFile(testConfig); + assertFalse(vm.parseTomlBool(content, "$.mainnet.bool.is_live"), "File should be updated now"); + + // Disable writing to file. + config.writeUpdatesBackToFile(false); + + // Update the value again and verify the file is NOT changed. + config.set(1, "is_live", true); + content = vm.readFile(testConfig); + assertFalse(vm.parseTomlBool(content, "$.mainnet.bool.is_live"), "File should not be updated again"); + + // Clean up the temporary file. + vm.removeFile(testConfig); + } + + function testRevert_WriteToFileInForbiddenCtxt() public { + // Cannot initialize enabling writing to file unless we are in SCRIPT mode. + vm.expectRevert(StdConfig.WriteToFileInForbiddenCtxt.selector); + _loadConfig("./test/fixtures/config.toml", true); + + // Initialize with `writeToFile = false`. + _loadConfig("./test/fixtures/config.toml", false); + + // Cannot enable writing to file unless we are in SCRIPT mode. + vm.expectRevert(StdConfig.WriteToFileInForbiddenCtxt.selector); + config.writeUpdatesBackToFile(true); + } + + function testRevert_InvalidChainKey() public { + // Create a fixture with an invalid chain key + string memory invalidChainConfig = "./test/fixtures/config_invalid_chain.toml"; + vm.writeFile( + invalidChainConfig, + string.concat( + "[mainnet]\n", + "endpoint_url = \"https://ethereum.reth.rs/rpc\"\n", + "\n", + "[mainnet.uint]\n", + "valid_number = 123\n", + "\n", + "# Invalid chain key (not a number and not a valid alias)\n", + "[invalid_chain]\n", + "endpoint_url = \"https://invalid.com\"\n", + "\n", + "[invalid_chain_9999.uint]\n", + "some_value = 456\n" + ) + ); + + vm.expectRevert(abi.encodeWithSelector(StdConfig.InvalidChainKey.selector, "invalid_chain")); + new StdConfig(invalidChainConfig, false); + vm.removeFile(invalidChainConfig); + } + + function testRevert_ChainNotInitialized() public { + _loadConfig("./test/fixtures/config.toml", false); + + // Enable writing to file bypassing the context check. + vm.store(address(config), bytes32(uint256(5)), bytes32(uint256(1))); + + // Try to write a value for a non-existent chain ID + vm.expectRevert(abi.encodeWithSelector(StdConfig.ChainNotInitialized.selector, uint256(999999))); + config.set(999999, "some_key", uint256(123)); + } + + function testRevert_UnableToParseVariable() public { + // Create a temporary fixture with an unparsable variable + string memory badParseConfig = "./test/fixtures/config_bad_parse.toml"; + vm.writeFile( + badParseConfig, + string.concat( + "[mainnet]\n", + "endpoint_url = \"https://ethereum.reth.rs/rpc\"\n", + "\n", + "[mainnet.uint]\n", + "bad_value = \"not_a_number\"\n" + ) + ); + + vm.expectRevert(abi.encodeWithSelector(StdConfig.UnableToParseVariable.selector, "bad_value")); + new StdConfig(badParseConfig, false); + vm.removeFile(badParseConfig); + } +} diff --git a/dependencies/forge-std-1.16.1/test/LibVariable.t.sol b/dependencies/forge-std-1.16.1/test/LibVariable.t.sol new file mode 100644 index 00000000..abd515cc --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/LibVariable.t.sol @@ -0,0 +1,452 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.13; + +import {Test} from "../src/Test.sol"; +import {Variable, Type, TypeKind, LibVariable} from "../src/LibVariable.sol"; + +contract LibVariableTest is Test { + using LibVariable for Type; + using LibVariable for TypeKind; + + LibVariableHelper internal helper; + + bytes internal expectedErr; + Variable internal uninitVar; + Variable internal boolVar; + Variable internal addressVar; + Variable internal bytes32Var; + Variable internal uintVar; + Variable internal intVar; + Variable internal stringVar; + Variable internal bytesVar; + Variable internal boolArrayVar; + Variable internal addressArrayVar; + Variable internal bytes32ArrayVar; + Variable internal uintArrayVar; + Variable internal intArrayVar; + Variable internal stringArrayVar; + Variable internal bytesArrayVar; + + function setUp() public { + helper = new LibVariableHelper(); + + // UNINITIALIZED + uninitVar = Variable(Type(TypeKind.None, false), ""); + + // SINGLE VALUES + boolVar = Variable(Type(TypeKind.Bool, false), abi.encode(true)); + addressVar = Variable(Type(TypeKind.Address, false), abi.encode(address(0xdeadbeef))); + bytes32Var = Variable(Type(TypeKind.Bytes32, false), abi.encode(bytes32(uint256(42)))); + uintVar = Variable(Type(TypeKind.Uint256, false), abi.encode(uint256(123))); + intVar = Variable(Type(TypeKind.Int256, false), abi.encode(int256(-123))); + stringVar = Variable(Type(TypeKind.String, false), abi.encode("hello world")); + bytesVar = Variable(Type(TypeKind.Bytes, false), abi.encode(hex"c0ffee")); + + // ARRAY VALUES + bool[] memory bools = new bool[](2); + bools[0] = true; + bools[1] = false; + boolArrayVar = Variable(Type(TypeKind.Bool, true), abi.encode(bools)); + + address[] memory addrs = new address[](2); + addrs[0] = address(0x1); + addrs[1] = address(0x2); + addressArrayVar = Variable(Type(TypeKind.Address, true), abi.encode(addrs)); + + bytes32[] memory b32s = new bytes32[](2); + b32s[0] = bytes32(uint256(1)); + b32s[1] = bytes32(uint256(2)); + bytes32ArrayVar = Variable(Type(TypeKind.Bytes32, true), abi.encode(b32s)); + + uint256[] memory uints = new uint256[](2); + uints[0] = 1; + uints[1] = 2; + uintArrayVar = Variable(Type(TypeKind.Uint256, true), abi.encode(uints)); + + int256[] memory ints = new int256[](2); + ints[0] = -1; + ints[1] = 2; + intArrayVar = Variable(Type(TypeKind.Int256, true), abi.encode(ints)); + + string[] memory strings = new string[](2); + strings[0] = "one"; + strings[1] = "two"; + stringArrayVar = Variable(Type(TypeKind.String, true), abi.encode(strings)); + + bytes[] memory b = new bytes[](2); + b[0] = hex"01"; + b[1] = hex"02"; + bytesArrayVar = Variable(Type(TypeKind.Bytes, true), abi.encode(b)); + } + + // -- SUCCESS CASES -------------------------------------------------------- + + function test_TypeHelpers() public view { + // TypeKind.toString() + assertEq(TypeKind.None.toString(), "none"); + assertEq(TypeKind.Bool.toString(), "bool"); + assertEq(TypeKind.Address.toString(), "address"); + assertEq(TypeKind.Bytes32.toString(), "bytes32"); + assertEq(TypeKind.Uint256.toString(), "uint256"); + assertEq(TypeKind.Int256.toString(), "int256"); + assertEq(TypeKind.String.toString(), "string"); + assertEq(TypeKind.Bytes.toString(), "bytes"); + + // TypeKind.toTomlKey() + assertEq(TypeKind.Uint256.toTomlKey(), "uint"); + assertEq(TypeKind.Int256.toTomlKey(), "int"); + assertEq(TypeKind.Bytes32.toTomlKey(), "bytes32"); + + // Type.toString() + assertEq(boolVar.ty.toString(), "bool"); + assertEq(boolArrayVar.ty.toString(), "bool[]"); + assertEq(uintVar.ty.toString(), "uint256"); + assertEq(uintArrayVar.ty.toString(), "uint256[]"); + assertEq(uninitVar.ty.toString(), "none"); + + // Type.isEqual() + assertTrue(boolVar.ty.isEqual(Type(TypeKind.Bool, false))); + assertFalse(boolVar.ty.isEqual(Type(TypeKind.Bool, true))); + assertFalse(boolVar.ty.isEqual(Type(TypeKind.Address, false))); + + // Type.assertEq() + boolVar.ty.assertEq(Type(TypeKind.Bool, false)); + uintArrayVar.ty.assertEq(Type(TypeKind.Uint256, true)); + } + + function test_Coercion() public view { + // Single values + assertTrue(helper.toBool(boolVar)); + assertEq(helper.toAddress(addressVar), address(0xdeadbeef)); + assertEq(helper.toBytes32(bytes32Var), bytes32(uint256(42))); + assertEq(helper.toUint256(uintVar), 123); + assertEq(helper.toInt256(intVar), -123); + assertEq(helper.toString(stringVar), "hello world"); + assertEq(helper.toBytes(bytesVar), hex"c0ffee"); + + // Bool array + bool[] memory bools = helper.toBoolArray(boolArrayVar); + assertEq(bools.length, 2); + assertTrue(bools[0]); + assertFalse(bools[1]); + + // Address array + address[] memory addrs = helper.toAddressArray(addressArrayVar); + assertEq(addrs.length, 2); + assertEq(addrs[0], address(0x1)); + assertEq(addrs[1], address(0x2)); + + // String array + string[] memory strings = helper.toStringArray(stringArrayVar); + assertEq(strings.length, 2); + assertEq(strings[0], "one"); + assertEq(strings[1], "two"); + + // Bytes32 array + bytes32[] memory b32s = helper.toBytes32Array(bytes32ArrayVar); + assertEq(b32s.length, 2); + assertEq(b32s[0], bytes32(uint256(1))); + assertEq(b32s[1], bytes32(uint256(2))); + + // Int array + int256[] memory ints = helper.toInt256Array(intArrayVar); + assertEq(ints.length, 2); + assertEq(ints[0], -1); + assertEq(ints[1], 2); + + // Bytes array + bytes[] memory b = helper.toBytesArray(bytesArrayVar); + assertEq(b.length, 2); + assertEq(b[0], hex"01"); + assertEq(b[1], hex"02"); + } + + function test_Downcasting() public view { + // Uint downcasting + Variable memory v_uint_small = Variable(Type(TypeKind.Uint256, false), abi.encode(uint256(100))); + assertEq(helper.toUint128(v_uint_small), 100); + assertEq(helper.toUint64(v_uint_small), 100); + assertEq(helper.toUint32(v_uint_small), 100); + assertEq(helper.toUint16(v_uint_small), 100); + assertEq(helper.toUint8(v_uint_small), 100); + + // Uint array downcasting + uint256[] memory small_uints = new uint256[](2); + small_uints[0] = 10; + small_uints[1] = 20; + Variable memory v_uint_array_small = Variable(Type(TypeKind.Uint256, true), abi.encode(small_uints)); + uint8[] memory u8_array = helper.toUint8Array(v_uint_array_small); + assertEq(u8_array[0], 10); + assertEq(u8_array[1], 20); + + // Int downcasting + Variable memory v_int_small_pos = Variable(Type(TypeKind.Int256, false), abi.encode(int256(100))); + Variable memory v_int_small_neg = Variable(Type(TypeKind.Int256, false), abi.encode(int256(-100))); + assertEq(helper.toInt128(v_int_small_pos), 100); + assertEq(helper.toInt64(v_int_small_neg), -100); + assertEq(helper.toInt32(v_int_small_pos), 100); + assertEq(helper.toInt16(v_int_small_neg), -100); + assertEq(helper.toInt8(v_int_small_pos), 100); + + // Int array downcasting + int256[] memory small_ints = new int256[](2); + small_ints[0] = -10; + small_ints[1] = 20; + Variable memory intArraySmall = Variable(Type(TypeKind.Int256, true), abi.encode(small_ints)); + int8[] memory i8_array = helper.toInt8Array(intArraySmall); + assertEq(i8_array[0], -10); + assertEq(i8_array[1], 20); + } + + // -- REVERT CASES --------------------------------------------------------- + + function testRevert_NotInitialized() public { + vm.expectRevert(LibVariable.NotInitialized.selector); + helper.toBool(uninitVar); + + vm.expectRevert(LibVariable.NotInitialized.selector); + helper.toAddressArray(uninitVar); + } + + function testRevert_assertExists() public { + vm.expectRevert(LibVariable.NotInitialized.selector); + helper.assertExists(uninitVar); + } + + function testRevert_TypeMismatch() public { + // Single values + vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "uint256", "bool")); + helper.toUint256(boolVar); + + vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "address", "string")); + helper.toAddress(stringVar); + + // Arrays + vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "uint256[]", "bool[]")); + helper.toUint256Array(boolArrayVar); + + vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "address[]", "string[]")); + helper.toAddressArray(stringArrayVar); + + // Single value to array + vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "bool[]", "bool")); + helper.toBoolArray(boolVar); + + // Array to single value + vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "bool", "bool[]")); + helper.toBool(boolArrayVar); + + // assertEq reverts + vm.expectRevert(abi.encodeWithSelector(LibVariable.TypeMismatch.selector, "uint256", "bool")); + helper.assertEq(boolVar.ty, Type(TypeKind.Uint256, false)); + } + + function testRevert_UnsafeCast() public { + // uint overflow + Variable memory uintLarge = Variable(Type(TypeKind.Uint256, false), abi.encode(uint256(type(uint128).max) + 1)); + expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value does not fit in 'uint128'"); + vm.expectRevert(expectedErr); + helper.toUint128(uintLarge); + + // int overflow + Variable memory intLarge = Variable(Type(TypeKind.Int256, false), abi.encode(int256(type(int128).max) + 1)); + expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value does not fit in 'int128'"); + + vm.expectRevert(expectedErr); + helper.toInt128(intLarge); + + // int underflow + Variable memory intSmall = Variable(Type(TypeKind.Int256, false), abi.encode(int256(type(int128).min) - 1)); + expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value does not fit in 'int128'"); + + vm.expectRevert(expectedErr); + helper.toInt128(intSmall); + + // uint array overflow + uint256[] memory uintArray = new uint256[](2); + uintArray[0] = 10; + uintArray[1] = uint256(type(uint64).max) + 1; + Variable memory uintArrayLarge = Variable(Type(TypeKind.Uint256, true), abi.encode(uintArray)); + expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value in array does not fit in 'uint64'"); + + vm.expectRevert(expectedErr); + helper.toUint64Array(uintArrayLarge); + + // int array overflow + int256[] memory intArray = new int256[](2); + intArray[0] = 10; + intArray[1] = int256(type(int64).max) + 1; + Variable memory intArrayLarge = Variable(Type(TypeKind.Int256, true), abi.encode(intArray)); + expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value in array does not fit in 'int64'"); + + vm.expectRevert(expectedErr); + helper.toInt64Array(intArrayLarge); + + // int array underflow + intArray[0] = 10; + intArray[1] = int256(type(int64).min) - 1; + Variable memory intArraySmall = Variable(Type(TypeKind.Int256, true), abi.encode(intArray)); + expectedErr = abi.encodeWithSelector(LibVariable.UnsafeCast.selector, "value in array does not fit in 'int64'"); + + vm.expectRevert(expectedErr); + helper.toInt64Array(intArraySmall); + } +} + +/// @dev We must use an external helper contract to ensure proper call depth for `vm.expectRevert`, +/// as direct library calls are inlined by the compiler, causing call depth issues. +contract LibVariableHelper { + using LibVariable for Type; + using LibVariable for TypeKind; + + // Assertions + function assertExists(Variable memory v) external pure { + v.assertExists(); + } + + function assertEq(Type memory t1, Type memory t2) external pure { + t1.assertEq(t2); + } + + // Single Value Coercion + function toBool(Variable memory v) external pure returns (bool) { + return v.toBool(); + } + + function toAddress(Variable memory v) external pure returns (address) { + return v.toAddress(); + } + + function toBytes32(Variable memory v) external pure returns (bytes32) { + return v.toBytes32(); + } + + function toUint256(Variable memory v) external pure returns (uint256) { + return v.toUint256(); + } + + function toInt256(Variable memory v) external pure returns (int256) { + return v.toInt256(); + } + + function toString(Variable memory v) external pure returns (string memory) { + return v.toString(); + } + + function toBytes(Variable memory v) external pure returns (bytes memory) { + return v.toBytes(); + } + + // Array Coercion + function toBoolArray(Variable memory v) external pure returns (bool[] memory) { + return v.toBoolArray(); + } + + function toAddressArray(Variable memory v) external pure returns (address[] memory) { + return v.toAddressArray(); + } + + function toBytes32Array(Variable memory v) external pure returns (bytes32[] memory) { + return v.toBytes32Array(); + } + + function toUint256Array(Variable memory v) external pure returns (uint256[] memory) { + return v.toUint256Array(); + } + + function toInt256Array(Variable memory v) external pure returns (int256[] memory) { + return v.toInt256Array(); + } + + function toStringArray(Variable memory v) external pure returns (string[] memory) { + return v.toStringArray(); + } + + function toBytesArray(Variable memory v) external pure returns (bytes[] memory) { + return v.toBytesArray(); + } + + // Uint Downcasting + function toUint128(Variable memory v) external pure returns (uint128) { + return v.toUint128(); + } + + function toUint64(Variable memory v) external pure returns (uint64) { + return v.toUint64(); + } + + function toUint32(Variable memory v) external pure returns (uint32) { + return v.toUint32(); + } + + function toUint16(Variable memory v) external pure returns (uint16) { + return v.toUint16(); + } + + function toUint8(Variable memory v) external pure returns (uint8) { + return v.toUint8(); + } + + // Int Downcasting + function toInt128(Variable memory v) external pure returns (int128) { + return v.toInt128(); + } + + function toInt64(Variable memory v) external pure returns (int64) { + return v.toInt64(); + } + + function toInt32(Variable memory v) external pure returns (int32) { + return v.toInt32(); + } + + function toInt16(Variable memory v) external pure returns (int16) { + return v.toInt16(); + } + + function toInt8(Variable memory v) external pure returns (int8) { + return v.toInt8(); + } + + // Uint Array Downcasting + function toUint128Array(Variable memory v) external pure returns (uint128[] memory) { + return v.toUint128Array(); + } + + function toUint64Array(Variable memory v) external pure returns (uint64[] memory) { + return v.toUint64Array(); + } + + function toUint32Array(Variable memory v) external pure returns (uint32[] memory) { + return v.toUint32Array(); + } + + function toUint16Array(Variable memory v) external pure returns (uint16[] memory) { + return v.toUint16Array(); + } + + function toUint8Array(Variable memory v) external pure returns (uint8[] memory) { + return v.toUint8Array(); + } + + // Int Array Downcasting + function toInt128Array(Variable memory v) external pure returns (int128[] memory) { + return v.toInt128Array(); + } + + function toInt64Array(Variable memory v) external pure returns (int64[] memory) { + return v.toInt64Array(); + } + + function toInt32Array(Variable memory v) external pure returns (int32[] memory) { + return v.toInt32Array(); + } + + function toInt16Array(Variable memory v) external pure returns (int16[] memory) { + return v.toInt16Array(); + } + + function toInt8Array(Variable memory v) external pure returns (int8[] memory) { + return v.toInt8Array(); + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdAssertions.t.sol b/dependencies/forge-std-1.16.1/test/StdAssertions.t.sol new file mode 100644 index 00000000..3d670cb7 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdAssertions.t.sol @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {StdAssertions} from "../src/StdAssertions.sol"; +import {Vm} from "../src/Vm.sol"; + +interface VmInternal is Vm { + function _expectCheatcodeRevert(bytes memory message) external; +} + +contract StdAssertionsTest is StdAssertions { + string constant errorMessage = "User provided message"; + uint256 constant maxDecimals = 77; + + bool constant SHOULD_REVERT = true; + bool constant SHOULD_RETURN = false; + + bool constant STRICT_REVERT_DATA = true; + bool constant NON_STRICT_REVERT_DATA = false; + + VmInternal constant vm = VmInternal(address(uint160(uint256(keccak256("hevm cheat code"))))); + + function testFuzz_AssertEqCall_Return_Pass( + bytes memory callDataA, + bytes memory callDataB, + bytes memory returnData, + bool strictRevertData + ) external { + address targetA = address(new TestMockCall(returnData, SHOULD_RETURN)); + address targetB = address(new TestMockCall(returnData, SHOULD_RETURN)); + + assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData); + } + + function testFuzz_RevertWhenCalled_AssertEqCall_Return_Fail( + bytes memory callDataA, + bytes memory callDataB, + bytes memory returnDataA, + bytes memory returnDataB, + bool strictRevertData + ) external { + vm.assume(keccak256(returnDataA) != keccak256(returnDataB)); + + address targetA = address(new TestMockCall(returnDataA, SHOULD_RETURN)); + address targetB = address(new TestMockCall(returnDataB, SHOULD_RETURN)); + + vm._expectCheatcodeRevert( + bytes( + string.concat( + "Call return data does not match: ", vm.toString(returnDataA), " != ", vm.toString(returnDataB) + ) + ) + ); + assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData); + } + + function testFuzz_AssertEqCall_Revert_Pass( + bytes memory callDataA, + bytes memory callDataB, + bytes memory revertDataA, + bytes memory revertDataB + ) external { + address targetA = address(new TestMockCall(revertDataA, SHOULD_REVERT)); + address targetB = address(new TestMockCall(revertDataB, SHOULD_REVERT)); + + assertEqCall(targetA, callDataA, targetB, callDataB, NON_STRICT_REVERT_DATA); + } + + function testFuzz_RevertWhenCalled_AssertEqCall_Revert_Fail( + bytes memory callDataA, + bytes memory callDataB, + bytes memory revertDataA, + bytes memory revertDataB + ) external { + vm.assume(keccak256(revertDataA) != keccak256(revertDataB)); + + address targetA = address(new TestMockCall(revertDataA, SHOULD_REVERT)); + address targetB = address(new TestMockCall(revertDataB, SHOULD_REVERT)); + + vm._expectCheatcodeRevert( + bytes( + string.concat( + "Call revert data does not match: ", vm.toString(revertDataA), " != ", vm.toString(revertDataB) + ) + ) + ); + assertEqCall(targetA, callDataA, targetB, callDataB, STRICT_REVERT_DATA); + } + + function testFuzz_RevertWhenCalled_AssertEqCall_Fail( + bytes memory callDataA, + bytes memory callDataB, + bytes memory returnDataA, + bytes memory returnDataB, + bool strictRevertData + ) external { + address targetA = address(new TestMockCall(returnDataA, SHOULD_RETURN)); + address targetB = address(new TestMockCall(returnDataB, SHOULD_REVERT)); + + vm.expectRevert(bytes("assertion failed")); + this.assertEqCallExternal(targetA, callDataA, targetB, callDataB, strictRevertData); + + vm.expectRevert(bytes("assertion failed")); + this.assertEqCallExternal(targetB, callDataB, targetA, callDataA, strictRevertData); + } + + // Helper function to test outcome of assertEqCall via `expect` cheatcodes + function assertEqCallExternal( + address targetA, + bytes memory callDataA, + address targetB, + bytes memory callDataB, + bool strictRevertData + ) public { + assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData); + } +} + +contract TestMockCall { + bytes returnData; + bool shouldRevert; + + constructor(bytes memory returnData_, bool shouldRevert_) { + returnData = returnData_; + shouldRevert = shouldRevert_; + } + + fallback() external payable { + bytes memory returnData_ = returnData; + + if (shouldRevert) { + assembly { + revert(add(returnData_, 0x20), mload(returnData_)) + } + } else { + assembly { + return(add(returnData_, 0x20), mload(returnData_)) + } + } + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdChains.t.sol b/dependencies/forge-std-1.16.1/test/StdChains.t.sol new file mode 100644 index 00000000..bee1f992 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdChains.t.sol @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Test} from "../src/Test.sol"; + +contract StdChainsMock is Test { + function exposedGetChain(string memory chainAlias) public returns (Chain memory) { + return getChain(chainAlias); + } + + function exposedGetChain(uint256 chainId) public returns (Chain memory) { + return getChain(chainId); + } + + function exposedSetChain(string memory chainAlias, ChainData memory chainData) public { + setChain(chainAlias, chainData); + } + + function exposedSetFallbackToDefaultRpcUrls(bool useDefault) public { + setFallbackToDefaultRpcUrls(useDefault); + } +} + +contract StdChainsTest is Test { + function test_ChainRpcInitialization() public { + // RPCs specified in `foundry.toml` should be updated. + assertEq(getChain(1).rpcUrl, "https://ethereum.reth.rs/rpc"); + assertEq(getChain("optimism_sepolia").rpcUrl, "https://sepolia.optimism.io/"); + assertEq(getChain("arbitrum_one_sepolia").rpcUrl, "https://sepolia-rollup.arbitrum.io/rpc/"); + + // Environment variables should be the next fallback + assertEq(getChain("arbitrum_nova").rpcUrl, "https://nova.arbitrum.io/rpc"); + vm.setEnv("ARBITRUM_NOVA_RPC_URL", "myoverride"); + assertEq(getChain("arbitrum_nova").rpcUrl, "myoverride"); + vm.setEnv("ARBITRUM_NOVA_RPC_URL", "https://nova.arbitrum.io/rpc"); + + // Cannot override RPCs defined in `foundry.toml` + vm.setEnv("MAINNET_RPC_URL", "myoverride2"); + assertEq(getChain("mainnet").rpcUrl, "https://ethereum.reth.rs/rpc"); + + // Other RPCs should remain unchanged. + assertEq(getChain(31337).rpcUrl, "http://127.0.0.1:8545"); + assertEq(getChain("sepolia").rpcUrl, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001"); + } + + // Named with a leading underscore to clarify this is not intended to be run as a normal test, + // and is intended to be used in the below `test_Rpcs` test. + function _testRpc(string memory rpcAlias) internal { + string memory rpcUrl = getChain(rpcAlias).rpcUrl; + vm.createSelectFork(rpcUrl); + } + + // Ensure we can connect to the default RPC URL for each chain. + // Currently commented out since this is slow and public RPCs are flaky, often resulting in failing CI. + // function test_Rpcs() public { + // _testRpc("mainnet"); + // _testRpc("sepolia"); + // _testRpc("holesky"); + // _testRpc("optimism"); + // _testRpc("optimism_sepolia"); + // _testRpc("arbitrum_one"); + // _testRpc("arbitrum_one_sepolia"); + // _testRpc("arbitrum_nova"); + // _testRpc("polygon"); + // _testRpc("polygon_amoy"); + // _testRpc("avalanche"); + // _testRpc("avalanche_fuji"); + // _testRpc("bnb_smart_chain"); + // _testRpc("bnb_smart_chain_testnet"); + // _testRpc("gnosis_chain"); + // _testRpc("moonbeam"); + // _testRpc("moonriver"); + // _testRpc("moonbase"); + // _testRpc("base_sepolia"); + // _testRpc("base"); + // _testRpc("blast_sepolia"); + // _testRpc("blast"); + // _testRpc("fantom_opera"); + // _testRpc("fantom_opera_testnet"); + // _testRpc("fraxtal"); + // _testRpc("fraxtal_testnet"); + // _testRpc("berachain_bartio_testnet"); + // _testRpc("flare"); + // _testRpc("flare_coston2"); + // } + + function test_RevertIf_ChainNotFound() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains getChain(string): Chain with alias \"does_not_exist\" not found."); + stdChainsMock.exposedGetChain("does_not_exist"); + } + + function test_RevertIf_SetChain_ChainIdExist_FirstTest() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains setChain(string,ChainData): Chain ID 31337 already used by \"anvil\"."); + stdChainsMock.exposedSetChain("anvil2", ChainData("Anvil", 31337, "URL")); + } + + function test_RevertIf_ChainBubbleUp() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + stdChainsMock.exposedSetChain("needs_undefined_env_var", ChainData("", 123456789, "")); + // Forge environment variable error. + vm.expectRevert(); + stdChainsMock.exposedGetChain("needs_undefined_env_var"); + } + + function test_RevertIf_SetChain_ChainIdExists_SecondTest() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + stdChainsMock.exposedSetChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/")); + + vm.expectRevert('StdChains setChain(string,ChainData): Chain ID 123456789 already used by "custom_chain".'); + + stdChainsMock.exposedSetChain("another_custom_chain", ChainData("", 123456789, "")); + } + + function test_SetChain() public { + setChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/")); + Chain memory customChain = getChain("custom_chain"); + assertEq(customChain.name, "Custom Chain"); + assertEq(customChain.chainId, 123456789); + assertEq(customChain.chainAlias, "custom_chain"); + assertEq(customChain.rpcUrl, "https://custom.chain/"); + Chain memory chainById = getChain(123456789); + assertEq(chainById.name, customChain.name); + assertEq(chainById.chainId, customChain.chainId); + assertEq(chainById.chainAlias, customChain.chainAlias); + assertEq(chainById.rpcUrl, customChain.rpcUrl); + customChain.name = "Another Custom Chain"; + customChain.chainId = 987654321; + setChain("another_custom_chain", customChain); + Chain memory anotherCustomChain = getChain("another_custom_chain"); + assertEq(anotherCustomChain.name, "Another Custom Chain"); + assertEq(anotherCustomChain.chainId, 987654321); + assertEq(anotherCustomChain.chainAlias, "another_custom_chain"); + assertEq(anotherCustomChain.rpcUrl, "https://custom.chain/"); + // Verify the first chain data was not overwritten + chainById = getChain(123456789); + assertEq(chainById.name, "Custom Chain"); + assertEq(chainById.chainId, 123456789); + } + + function test_RevertIf_SetEmptyAlias() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains setChain(string,ChainData): Chain alias cannot be the empty string."); + stdChainsMock.exposedSetChain("", ChainData("", 123456789, "")); + } + + function test_RevertIf_SetNoChainId0() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains setChain(string,ChainData): Chain ID cannot be 0."); + stdChainsMock.exposedSetChain("alias", ChainData("", 0, "")); + } + + function test_RevertIf_GetNoChainId0() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains getChain(uint256): Chain ID cannot be 0."); + stdChainsMock.exposedGetChain(0); + } + + function test_RevertIf_GetNoEmptyAlias() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains getChain(string): Chain alias cannot be the empty string."); + stdChainsMock.exposedGetChain(""); + } + + function test_RevertIf_ChainNotInitialized() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains getChain(string): Chain with alias \"no_such_alias\" not found."); + stdChainsMock.exposedGetChain("no_such_alias"); + } + + function test_RevertIf_ChainAliasNotFound() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + vm.expectRevert("StdChains getChain(uint256): Chain with ID 321 not found."); + + stdChainsMock.exposedGetChain(321); + } + + function test_SetChain_ExistingOne() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + setChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/")); + assertEq(getChain(123456789).chainId, 123456789); + + setChain("custom_chain", ChainData("Modified Chain", 9999999999999999999, "https://modified.chain/")); + vm.expectRevert("StdChains getChain(uint256): Chain with ID 123456789 not found."); + stdChainsMock.exposedGetChain(123456789); + + Chain memory modifiedChain = getChain(9999999999999999999); + assertEq(modifiedChain.name, "Modified Chain"); + assertEq(modifiedChain.chainId, 9999999999999999999); + assertEq(modifiedChain.rpcUrl, "https://modified.chain/"); + } + + function test_RevertIf_DontUseDefaultRpcUrl() public { + // We deploy a mock to properly test the revert. + StdChainsMock stdChainsMock = new StdChainsMock(); + + // Should error if default RPCs flag is set to false. + stdChainsMock.exposedSetFallbackToDefaultRpcUrls(false); + vm.expectRevert(); + stdChainsMock.exposedGetChain(31337); + vm.expectRevert(); + stdChainsMock.exposedGetChain("sepolia"); + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdCheats.t.sol b/dependencies/forge-std-1.16.1/test/StdCheats.t.sol new file mode 100644 index 00000000..868829dd --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdCheats.t.sol @@ -0,0 +1,695 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {StdCheats} from "../src/StdCheats.sol"; +import {Test} from "../src/Test.sol"; +import {stdJson} from "../src/StdJson.sol"; +import {stdToml} from "../src/StdToml.sol"; +import {IERC20} from "../src/interfaces/IERC20.sol"; + +contract StdCheatsTest is Test { + Bar test; + + using stdJson for string; + + function setUp() public { + test = new Bar(); + } + + function test_Skip() public { + vm.warp(100); + skip(25); + assertEq(block.timestamp, 125); + } + + function test_Rewind() public { + vm.warp(100); + rewind(25); + assertEq(block.timestamp, 75); + } + + function test_Hoax() public { + hoax(address(1337)); + test.bar{value: 100}(address(1337)); + } + + function test_HoaxOrigin() public { + hoax(address(1337), address(1337)); + test.origin{value: 100}(address(1337)); + } + + function test_HoaxDifferentAddresses() public { + hoax(address(1337), address(7331)); + test.origin{value: 100}(address(1337), address(7331)); + } + + function test_StartHoax() public { + startHoax(address(1337)); + test.bar{value: 100}(address(1337)); + test.bar{value: 100}(address(1337)); + vm.stopPrank(); + test.bar(address(this)); + } + + function test_StartHoaxOrigin() public { + startHoax(address(1337), address(1337)); + test.origin{value: 100}(address(1337)); + test.origin{value: 100}(address(1337)); + vm.stopPrank(); + test.bar(address(this)); + } + + function test_ChangePrankMsgSender() public { + vm.startPrank(address(1337)); + test.bar(address(1337)); + changePrank(address(0xdead)); + test.bar(address(0xdead)); + changePrank(address(1337)); + test.bar(address(1337)); + vm.stopPrank(); + } + + function test_ChangePrankMsgSenderAndTxOrigin() public { + vm.startPrank(address(1337), address(1338)); + test.origin(address(1337), address(1338)); + changePrank(address(0xdead), address(0xbeef)); + test.origin(address(0xdead), address(0xbeef)); + changePrank(address(1337), address(1338)); + test.origin(address(1337), address(1338)); + vm.stopPrank(); + } + + function test_MakeAccountEquivalence() public { + Account memory account = makeAccount("1337"); + (address addr, uint256 key) = makeAddrAndKey("1337"); + assertEq(account.addr, addr); + assertEq(account.key, key); + } + + function test_MakeAddrEquivalence() public { + (address addr,) = makeAddrAndKey("1337"); + assertEq(makeAddr("1337"), addr); + } + + function test_MakeAddrSigning() public { + (address addr, uint256 key) = makeAddrAndKey("1337"); + bytes32 hash = keccak256("some_message"); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(key, hash); + assertEq(ecrecover(hash, v, r, s), addr); + } + + function test_Deal() public { + deal(address(this), 1 ether); + assertEq(address(this).balance, 1 ether); + } + + function test_DealToken() public { + Bar barToken = new Bar(); + address bar = address(barToken); + deal(bar, address(this), 10000e18); + assertEq(barToken.balanceOf(address(this)), 10000e18); + } + + function test_DealTokenAdjustTotalSupply() public { + Bar barToken = new Bar(); + address bar = address(barToken); + deal(bar, address(this), 10000e18, true); + assertEq(barToken.balanceOf(address(this)), 10000e18); + assertEq(barToken.totalSupply(), 20000e18); + deal(bar, address(this), 0, true); + assertEq(barToken.balanceOf(address(this)), 0); + assertEq(barToken.totalSupply(), 10000e18); + } + + function test_DealERC1155Token() public { + BarERC1155 barToken = new BarERC1155(); + address bar = address(barToken); + dealERC1155(bar, address(this), 0, 10000e18, false); + assertEq(barToken.balanceOf(address(this), 0), 10000e18); + } + + function test_DealERC1155TokenAdjustTotalSupply() public { + BarERC1155 barToken = new BarERC1155(); + address bar = address(barToken); + dealERC1155(bar, address(this), 0, 10000e18, true); + assertEq(barToken.balanceOf(address(this), 0), 10000e18); + assertEq(barToken.totalSupply(0), 20000e18); + dealERC1155(bar, address(this), 0, 0, true); + assertEq(barToken.balanceOf(address(this), 0), 0); + assertEq(barToken.totalSupply(0), 10000e18); + } + + function test_DealERC721Token() public { + BarERC721 barToken = new BarERC721(); + address bar = address(barToken); + dealERC721(bar, address(2), 1); + assertEq(barToken.balanceOf(address(2)), 1); + assertEq(barToken.balanceOf(address(1)), 0); + dealERC721(bar, address(1), 2); + assertEq(barToken.balanceOf(address(1)), 1); + assertEq(barToken.balanceOf(bar), 1); + } + + function test_DeployCode() public { + address deployed = deployCode("StdCheats.t.sol:Bar", bytes("")); + assertEq(string(getCode(deployed)), string(getCode(address(test)))); + } + + function test_DestroyAccount() public { + // deploy something to destroy it + BarERC721 barToken = new BarERC721(); + address bar = address(barToken); + vm.setNonce(bar, 10); + deal(bar, 100); + + uint256 prevThisBalance = address(this).balance; + uint256 size; + assembly { + size := extcodesize(bar) + } + + assertGt(size, 0); + assertEq(bar.balance, 100); + assertEq(vm.getNonce(bar), 10); + + destroyAccount(bar, address(this)); + assembly { + size := extcodesize(bar) + } + assertEq(address(this).balance, prevThisBalance + 100); + assertEq(vm.getNonce(bar), 0); + assertEq(size, 0); + assertEq(bar.balance, 0); + } + + function test_DeployCodeNoArgs() public { + address deployed = deployCode("StdCheats.t.sol:Bar"); + assertEq(string(getCode(deployed)), string(getCode(address(test)))); + } + + function test_DeployCodeVal() public { + address deployed = deployCode("StdCheats.t.sol:Bar", bytes(""), 1 ether); + assertEq(string(getCode(deployed)), string(getCode(address(test)))); + assertEq(deployed.balance, 1 ether); + } + + function test_DeployCodeValNoArgs() public { + address deployed = deployCode("StdCheats.t.sol:Bar", 1 ether); + assertEq(string(getCode(deployed)), string(getCode(address(test)))); + assertEq(deployed.balance, 1 ether); + } + + // We need this so we can call "this.deployCode" rather than "deployCode" directly + function deployCodeHelper(string memory what) external { + deployCode(what); + } + + function test_RevertIf_DeployCodeFail() public { + vm.expectRevert(bytes("StdCheats deployCode(string): Deployment failed.")); + this.deployCodeHelper("StdCheats.t.sol:RevertingContract"); + } + + function getCode(address who) internal view returns (bytes memory o_code) { + assembly ("memory-safe") { + // retrieve the size of the code, this needs assembly + let size := extcodesize(who) + // allocate output byte array - this could also be done without assembly + // by using o_code = new bytes(size) + o_code := mload(0x40) + // new "memory end" including padding + mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f)))) + // store length in memory + mstore(o_code, size) + // actually retrieve the code, this needs assembly + extcodecopy(who, add(o_code, 0x20), 0, size) + } + } + + function test_DeriveRememberKey() public { + string memory mnemonic = "test test test test test test test test test test test junk"; + + (address deployer, uint256 privateKey) = deriveRememberKey(mnemonic, 0); + assertEq(deployer, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); + assertEq(privateKey, 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80); + } + + function test_BytesToUint() public pure { + assertEq(3, bytesToUint_test(hex"03")); + assertEq(2, bytesToUint_test(hex"02")); + assertEq(255, bytesToUint_test(hex"ff")); + assertEq(29625, bytesToUint_test(hex"73b9")); + } + + function test_ParseJsonTxDetail() public view { + string memory root = vm.projectRoot(); + string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); + string memory json = vm.readFile(path); + bytes memory transactionDetails = json.parseRaw(".transactions[0].tx"); + RawTx1559Detail memory rawTxDetail = abi.decode(transactionDetails, (RawTx1559Detail)); + Tx1559Detail memory txDetail = rawToConvertedEIP1559Detail(rawTxDetail); + assertEq(txDetail.from, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); + assertEq(txDetail.to, 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512); + assertEq( + txDetail.data, + hex"23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004" + ); + assertEq(txDetail.nonce, 3); + assertEq(txDetail.txType, 2); + assertEq(txDetail.gas, 29625); + assertEq(txDetail.value, 0); + } + + function test_ReadEIP1559Transaction() public view { + string memory root = vm.projectRoot(); + string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); + uint256 index = 0; + Tx1559 memory transaction = readTx1559(path, index); + transaction; + } + + function test_ReadEIP1559Transactions() public view { + string memory root = vm.projectRoot(); + string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); + Tx1559[] memory transactions = readTx1559s(path); + transactions; + } + + function test_ReadReceipt() public view { + string memory root = vm.projectRoot(); + string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); + uint256 index = 5; + Receipt memory receipt = readReceipt(path, index); + assertEq( + receipt.logsBloom, + hex"00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100" + ); + } + + function test_ReadReceipts() public view { + string memory root = vm.projectRoot(); + string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); + Receipt[] memory receipts = readReceipts(path); + receipts; + } + + function test_GasMeteringModifier() public { + uint256 gas_start_normal = gasleft(); + addInLoop(); + uint256 gas_used_normal = gas_start_normal - gasleft(); + + uint256 gas_start_single = gasleft(); + addInLoopNoGas(); + uint256 gas_used_single = gas_start_single - gasleft(); + + uint256 gas_start_double = gasleft(); + addInLoopNoGasNoGas(); + uint256 gas_used_double = gas_start_double - gasleft(); + + assertTrue(gas_used_double + gas_used_single < gas_used_normal); + } + + function addInLoop() internal pure returns (uint256) { + uint256 b; + for (uint256 i; i < 10000; i++) { + b += i; + } + return b; + } + + function addInLoopNoGas() internal noGasMetering returns (uint256) { + return addInLoop(); + } + + function addInLoopNoGasNoGas() internal noGasMetering returns (uint256) { + return addInLoopNoGas(); + } + + function bytesToUint_test(bytes memory b) private pure returns (uint256) { + uint256 number; + for (uint256 i = 0; i < b.length; i++) { + number = number + uint256(uint8(b[i])) * (2 ** (8 * (b.length - (i + 1)))); + } + return number; + } + + function testFuzz_AssumeAddressIsNot(address addr) external { + // skip over Payable and NonPayable enums + for (uint8 i = 2; i < uint8(type(AddressType).max); i++) { + assumeAddressIsNot(addr, AddressType(i)); + } + assertTrue(addr != address(0)); + assertTrue(addr < address(1) || addr > address(9)); + assertTrue(addr != address(vm) || addr != 0x000000000000000000636F6e736F6c652e6c6f67); + } + + function test_AssumePayable() external { + // We deploy a mock version so we can properly test the revert. + StdCheatsMock stdCheatsMock = new StdCheatsMock(); + + // all should revert since these addresses are not payable + + // VM address + vm.expectRevert(); + stdCheatsMock.exposedAssumePayable(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); + + // Console address + vm.expectRevert(); + stdCheatsMock.exposedAssumePayable(0x000000000000000000636F6e736F6c652e6c6f67); + + // Create2Deployer + vm.expectRevert(); + stdCheatsMock.exposedAssumePayable(0x4e59b44847b379578588920cA78FbF26c0B4956C); + + // all should pass since these addresses are payable + + // vitalik.eth + stdCheatsMock.exposedAssumePayable(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045); + + // mock payable contract + MockContractPayable cp = new MockContractPayable(); + stdCheatsMock.exposedAssumePayable(address(cp)); + } + + function test_AssumeNotPayable() external { + // We deploy a mock version so we can properly test the revert. + StdCheatsMock stdCheatsMock = new StdCheatsMock(); + + // all should pass since these addresses are not payable + + // VM address + stdCheatsMock.exposedAssumeNotPayable(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); + + // Console address + stdCheatsMock.exposedAssumeNotPayable(0x000000000000000000636F6e736F6c652e6c6f67); + + // Create2Deployer + stdCheatsMock.exposedAssumeNotPayable(0x4e59b44847b379578588920cA78FbF26c0B4956C); + + // all should revert since these addresses are payable + + // vitalik.eth + vm.expectRevert(); + stdCheatsMock.exposedAssumeNotPayable(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045); + + // mock payable contract + MockContractPayable cp = new MockContractPayable(); + vm.expectRevert(); + stdCheatsMock.exposedAssumeNotPayable(address(cp)); + } + + function testFuzz_AssumeNotPrecompile(address addr) external { + assumeNotPrecompile(addr, getChain("optimism_sepolia").chainId); + assertTrue( + addr < address(1) || (addr > address(9) && addr < address(0x4200000000000000000000000000000000000000)) + || addr > address(0x4200000000000000000000000000000000000800) + ); + } + + function testFuzz_AssumeNotForgeAddress(address addr) external pure { + assumeNotForgeAddress(addr); + assertTrue( + addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67 + && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C + ); + } + + function test_RevertIf_CannotDeployCodeTo() external { + vm.expectRevert("StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode."); + this._revertDeployCodeTo(); + } + + function _revertDeployCodeTo() external { + deployCodeTo("StdCheats.t.sol:RevertingContract", address(0)); + } + + function test_DeployCodeTo() external { + address arbitraryAddress = makeAddr("arbitraryAddress"); + + deployCodeTo( + "StdCheats.t.sol:MockContractWithConstructorArgs", + abi.encode(uint256(6), true, bytes20(arbitraryAddress)), + 1 ether, + arbitraryAddress + ); + + MockContractWithConstructorArgs ct = MockContractWithConstructorArgs(arbitraryAddress); + + assertEq(arbitraryAddress.balance, 1 ether); + assertEq(ct.x(), 6); + assertTrue(ct.y()); + assertEq(ct.z(), bytes20(arbitraryAddress)); + } + + function test_ExpectAndMockCall() public { + bytes memory data = abi.encodeWithSignature("balanceOf(address)", address(this)); + bytes memory returnData = abi.encode(uint256(100)); + expectAndMockCall(address(test), data, returnData); + + assertEq(test.balanceOf(address(this)), 100); + } + + function test_ExpectAndMockCall_Count() public { + bytes memory data = abi.encodeWithSignature("balanceOf(address)", address(this)); + bytes memory returnData = abi.encode(uint256(100)); + expectAndMockCall(address(test), data, 2, returnData); + + assertEq(test.balanceOf(address(this)), 100); + assertEq(test.balanceOf(address(this)), 100); + } + + function test_ExpectAndMockCall_MsgValue() public { + bytes memory data = abi.encodeWithSignature("payableBar()"); + bytes memory returnData = abi.encode(uint256(100)); + expectAndMockCall(address(test), 1 ether, data, returnData); + + assertEq(test.payableBar{value: 1 ether}(), 100); + } + + function test_ExpectAndMockCall_MsgValueAndCount() public { + bytes memory data = abi.encodeWithSignature("payableBar()"); + bytes memory returnData = abi.encode(uint256(100)); + expectAndMockCall(address(test), 1 ether, data, 2, returnData); + + assertEq(test.payableBar{value: 1 ether}(), 100); + assertEq(test.payableBar{value: 1 ether}(), 100); + } + + function test_ExpectAndMockCall_Gas() public { + bytes memory data = abi.encodeWithSignature("payableBar()"); + bytes memory returnData = abi.encode(uint256(100)); + uint64 gas = 30_000; + expectAndMockCall(address(test), 1 ether, gas, data, returnData); + + assertEq(test.payableBar{value: 1 ether, gas: gas}(), 100); + } + + function test_ExpectAndMockCall_GasAndCount() public { + bytes memory data = abi.encodeWithSignature("payableBar()"); + bytes memory returnData = abi.encode(uint256(100)); + uint64 gas = 30_000; + expectAndMockCall(address(test), 1 ether, gas, data, 2, returnData); + + assertEq(test.payableBar{value: 1 ether, gas: gas}(), 100); + assertEq(test.payableBar{value: 1 ether, gas: gas}(), 100); + } +} + +contract StdCheatsMock is StdCheats { + function exposedAssumePayable(address addr) external { + assumePayable(addr); + } + + function exposedAssumeNotPayable(address addr) external { + assumeNotPayable(addr); + } + + // We deploy a mock version so we can properly test expected reverts. + function exposedAssumeNotBlacklisted(address token, address addr) external view { + return assumeNotBlacklisted(token, addr); + } +} + +contract StdCheatsForkTest is Test { + address internal constant USDC_BLACKLISTED_USER = 0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD; + address internal constant USDT_BLACKLISTED_USER = 0x8f8a8F4B54a2aAC7799d7bc81368aC27b852822A; + + MockUSDT public USDT; + MockUSDC public USDC; + + function setUp() public { + USDT = new MockUSDT(); + USDC = new MockUSDC(); + + USDC.setBlacklisted(USDC_BLACKLISTED_USER, true); + USDT.setBlacklisted(USDT_BLACKLISTED_USER, true); + } + + function test_RevertIf_CannotAssumeNoBlacklisted_EOA() external { + // We deploy a mock version so we can properly test the revert. + StdCheatsMock stdCheatsMock = new StdCheatsMock(); + address eoa = vm.addr({privateKey: 1}); + vm.expectRevert("StdCheats assumeNotBlacklisted(address,address): Token address is not a contract."); + stdCheatsMock.exposedAssumeNotBlacklisted(eoa, address(0)); + } + + function testFuzz_AssumeNotBlacklisted_TokenWithoutBlacklist(address addr) external view { + assumeNotBlacklisted(address(USDC), addr); + assumeNotBlacklisted(address(USDT), addr); + assertTrue(true); + } + + function test_RevertIf_AssumeNoBlacklisted_USDC() external { + // We deploy a mock version so we can properly test the revert. + StdCheatsMock stdCheatsMock = new StdCheatsMock(); + vm.expectRevert(); + stdCheatsMock.exposedAssumeNotBlacklisted(address(USDC), USDC_BLACKLISTED_USER); + } + + function testFuzz_AssumeNotBlacklisted_USDC(address addr) external view { + assumeNotBlacklisted(address(USDC), addr); + assertFalse(USDCLike(USDC).isBlacklisted(addr)); + } + + function test_RevertIf_AssumeNoBlacklisted_USDT() external { + // We deploy a mock version so we can properly test the revert. + StdCheatsMock stdCheatsMock = new StdCheatsMock(); + vm.expectRevert(); + stdCheatsMock.exposedAssumeNotBlacklisted(address(USDT), USDT_BLACKLISTED_USER); + } + + function testFuzz_AssumeNotBlacklisted_USDT(address addr) external view { + assumeNotBlacklisted(address(USDT), addr); + assertFalse(USDTLike(USDT).isBlackListed(addr)); + } +} + +/// @dev https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48#readProxyContract +interface USDCLike { + function isBlacklisted(address) external view returns (bool); +} + +/// @dev https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7#readContract +interface USDTLike { + function isBlackListed(address) external view returns (bool); +} + +contract MockUSDT is USDTLike { + mapping(address => bool) private blacklist; + + function isBlackListed(address addr) external view returns (bool) { + return blacklist[addr]; + } + + function setBlacklisted(address addr, bool value) external { + blacklist[addr] = value; + } +} + +contract MockUSDC is USDCLike { + mapping(address => bool) private blacklist; + + function isBlacklisted(address addr) external view returns (bool) { + return blacklist[addr]; + } + + function setBlacklisted(address addr, bool value) external { + blacklist[addr] = value; + } +} + +contract Bar { + constructor() payable { + /// `DEAL` STDCHEAT + totalSupply = 10000e18; + balanceOf[address(this)] = totalSupply; + } + + /// `HOAX` and `CHANGEPRANK` STDCHEATS + function bar(address expectedSender) public payable { + require(msg.sender == expectedSender, "!prank"); + } + + function origin(address expectedSender) public payable { + require(msg.sender == expectedSender, "!prank"); + require(tx.origin == expectedSender, "!prank"); + } + + function origin(address expectedSender, address expectedOrigin) public payable { + require(msg.sender == expectedSender, "!prank"); + require(tx.origin == expectedOrigin, "!prank"); + } + + function payableBar() public payable returns (uint256) { + return 0; + } + + /// `DEAL` STDCHEAT + mapping(address => uint256) public balanceOf; + uint256 public totalSupply; +} + +contract BarERC1155 { + constructor() payable { + /// `DEALERC1155` STDCHEAT + _totalSupply[0] = 10000e18; + _balances[0][address(this)] = _totalSupply[0]; + } + + function balanceOf(address account, uint256 id) public view virtual returns (uint256) { + return _balances[id][account]; + } + + function totalSupply(uint256 id) public view virtual returns (uint256) { + return _totalSupply[id]; + } + + /// `DEALERC1155` STDCHEAT + mapping(uint256 => mapping(address => uint256)) private _balances; + mapping(uint256 => uint256) private _totalSupply; +} + +contract BarERC721 { + constructor() payable { + /// `DEALERC721` STDCHEAT + _owners[1] = address(1); + _balances[address(1)] = 1; + _owners[2] = address(this); + _owners[3] = address(this); + _balances[address(this)] = 2; + } + + function balanceOf(address owner) public view virtual returns (uint256) { + return _balances[owner]; + } + + function ownerOf(uint256 tokenId) public view virtual returns (address) { + address owner = _owners[tokenId]; + return owner; + } + + mapping(uint256 => address) private _owners; + mapping(address => uint256) private _balances; +} + +contract RevertingContract { + constructor() { + revert(); + } +} + +contract MockContractWithConstructorArgs { + uint256 public immutable x; + bool public y; + bytes20 public z; + + constructor(uint256 _x, bool _y, bytes20 _z) payable { + x = _x; + y = _y; + z = _z; + } +} + +contract MockContractPayable { + receive() external payable {} +} diff --git a/dependencies/forge-std-1.16.1/test/StdConstants.t.sol b/dependencies/forge-std-1.16.1/test/StdConstants.t.sol new file mode 100644 index 00000000..8ed524ec --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdConstants.t.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {StdConstants} from "../src/StdConstants.sol"; +import {Test} from "../src/Test.sol"; + +contract StdConstantsTest is Test { + function testVm() public view { + assertEq(StdConstants.VM.getBlockNumber(), 1); + } + + function testVmDerivation() public pure { + assertEq(address(StdConstants.VM), address(uint160(uint256(keccak256("hevm cheat code"))))); + } + + function testConsoleDerivation() public pure { + assertEq(StdConstants.CONSOLE, address(uint160(uint88(bytes11("console.log"))))); + } + + function testDefaultSender() public view { + assertEq(StdConstants.DEFAULT_SENDER, msg.sender); + } + + function testDefaultSenderDerivation() public pure { + assertEq(StdConstants.DEFAULT_SENDER, address(uint160(uint256(keccak256("foundry default caller"))))); + } + + function testDefaultTestContract() public { + assertEq(StdConstants.DEFAULT_TEST_CONTRACT, address(new Dummy())); + } + + function testDefaultTestContractDerivation() public view { + assertEq(address(this), StdConstants.VM.computeCreateAddress(StdConstants.DEFAULT_SENDER, 1)); + assertEq(StdConstants.DEFAULT_TEST_CONTRACT, StdConstants.VM.computeCreateAddress(address(this), 1)); + } +} + +contract Dummy {} diff --git a/dependencies/forge-std-1.16.1/test/StdError.t.sol b/dependencies/forge-std-1.16.1/test/StdError.t.sol new file mode 100644 index 00000000..7553ce4a --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdError.t.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {stdError} from "../src/StdError.sol"; +import {Test} from "../src/Test.sol"; + +contract StdErrorsTest is Test { + ErrorsTest test; + + function setUp() public { + test = new ErrorsTest(); + } + + function test_RevertIf_AssertionError() public { + vm.expectRevert(stdError.assertionError); + test.assertionError(); + } + + function test_RevertIf_ArithmeticError() public { + vm.expectRevert(stdError.arithmeticError); + test.arithmeticError(10); + } + + function test_RevertIf_DivisionError() public { + vm.expectRevert(stdError.divisionError); + test.divError(0); + } + + function test_RevertIf_ModError() public { + vm.expectRevert(stdError.divisionError); + test.modError(0); + } + + function test_RevertIf_EnumConversionError() public { + vm.expectRevert(stdError.enumConversionError); + test.enumConversion(1); + } + + function test_RevertIf_EncodeStgError() public { + vm.expectRevert(stdError.encodeStorageError); + test.encodeStgError(); + } + + function test_RevertIf_PopError() public { + vm.expectRevert(stdError.popError); + test.pop(); + } + + function test_RevertIf_IndexOOBError() public { + vm.expectRevert(stdError.indexOOBError); + test.indexOOBError(1); + } + + function test_RevertIf_MemOverflowError() public { + vm.expectRevert(stdError.memOverflowError); + test.mem(); + } + + function test_RevertIf_InternError() public { + vm.expectRevert(stdError.zeroVarError); + test.intern(); + } +} + +contract ErrorsTest { + enum T { + T1 + } + + uint256[] public someArr; + bytes someBytes; + + function assertionError() public pure { + assert(false); + } + + function arithmeticError(uint256 a) public pure { + a -= 100; + } + + function divError(uint256 a) public pure { + 100 / a; + } + + function modError(uint256 a) public pure { + 100 % a; + } + + function enumConversion(uint256 a) public pure { + T(a); + } + + function encodeStgError() public { + assembly ("memory-safe") { + sstore(someBytes.slot, 1) + } + keccak256(someBytes); + } + + function pop() public { + someArr.pop(); + } + + function indexOOBError(uint256 a) public pure { + uint256[] memory t = new uint256[](0); + t[a]; + } + + function mem() public pure { + uint256 l = 2 ** 256 / 32; + new uint256[](l); + } + + function intern() public returns (uint256) { + function(uint256) internal returns (uint256) x; + x(2); + return 7; + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdJson.t.sol b/dependencies/forge-std-1.16.1/test/StdJson.t.sol new file mode 100644 index 00000000..5594a54a --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdJson.t.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Test, stdJson} from "../src/Test.sol"; + +contract StdJsonTest is Test { + using stdJson for string; + + string root; + string path; + + function setUp() public { + root = vm.projectRoot(); + path = string.concat(root, "/test/fixtures/test.json"); + } + + struct SimpleJson { + uint256 a; + string b; + } + + struct NestedJson { + uint256 a; + string b; + SimpleJson c; + } + + function test_readJson() public view { + string memory json = vm.readFile(path); + assertEq(json.readUint(".a"), 123); + } + + function test_writeJson() public { + string memory json = "json"; + json.serialize("a", uint256(123)); + string memory semiFinal = json.serialize("b", string("test")); + string memory finalJson = json.serialize("c", semiFinal); + finalJson.write(path); + + string memory json_ = vm.readFile(path); + bytes memory data = json_.parseRaw("$"); + NestedJson memory decodedData = abi.decode(data, (NestedJson)); + + assertEq(decodedData.a, 123); + assertEq(decodedData.b, "test"); + assertEq(decodedData.c.a, 123); + assertEq(decodedData.c.b, "test"); + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdMath.t.sol b/dependencies/forge-std-1.16.1/test/StdMath.t.sol new file mode 100644 index 00000000..c7a36ed4 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdMath.t.sol @@ -0,0 +1,202 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {stdMath} from "../src/StdMath.sol"; +import {Test, stdError} from "../src/Test.sol"; + +contract StdMathMock is Test { + function exposedPercentDelta(uint256 a, uint256 b) public pure returns (uint256) { + return stdMath.percentDelta(a, b); + } + + function exposedPercentDelta(int256 a, int256 b) public pure returns (uint256) { + return stdMath.percentDelta(a, b); + } +} + +contract StdMathTest is Test { + function test_GetAbs() external pure { + assertEq(stdMath.abs(-50), 50); + assertEq(stdMath.abs(50), 50); + assertEq(stdMath.abs(-1337), 1337); + assertEq(stdMath.abs(0), 0); + + assertEq(stdMath.abs(type(int256).min), (type(uint256).max >> 1) + 1); + assertEq(stdMath.abs(type(int256).max), (type(uint256).max >> 1)); + } + + function testFuzz_GetAbs(int256 a) external pure { + uint256 manualAbs = getAbs(a); + + uint256 abs = stdMath.abs(a); + + assertEq(abs, manualAbs); + } + + function test_GetDelta_Uint() external pure { + assertEq(stdMath.delta(uint256(0), uint256(0)), 0); + assertEq(stdMath.delta(uint256(0), uint256(1337)), 1337); + assertEq(stdMath.delta(uint256(0), type(uint64).max), type(uint64).max); + assertEq(stdMath.delta(uint256(0), type(uint128).max), type(uint128).max); + assertEq(stdMath.delta(uint256(0), type(uint256).max), type(uint256).max); + + assertEq(stdMath.delta(0, uint256(0)), 0); + assertEq(stdMath.delta(1337, uint256(0)), 1337); + assertEq(stdMath.delta(type(uint64).max, uint256(0)), type(uint64).max); + assertEq(stdMath.delta(type(uint128).max, uint256(0)), type(uint128).max); + assertEq(stdMath.delta(type(uint256).max, uint256(0)), type(uint256).max); + + assertEq(stdMath.delta(1337, uint256(1337)), 0); + assertEq(stdMath.delta(type(uint256).max, type(uint256).max), 0); + assertEq(stdMath.delta(5000, uint256(1250)), 3750); + } + + function testFuzz_GetDelta_Uint(uint256 a, uint256 b) external pure { + uint256 manualDelta = a > b ? a - b : b - a; + + uint256 delta = stdMath.delta(a, b); + + assertEq(delta, manualDelta); + } + + function test_GetDelta_Int() external pure { + assertEq(stdMath.delta(int256(0), int256(0)), 0); + assertEq(stdMath.delta(int256(0), int256(1337)), 1337); + assertEq(stdMath.delta(int256(0), type(int64).max), type(uint64).max >> 1); + assertEq(stdMath.delta(int256(0), type(int128).max), type(uint128).max >> 1); + assertEq(stdMath.delta(int256(0), type(int256).max), type(uint256).max >> 1); + + assertEq(stdMath.delta(0, int256(0)), 0); + assertEq(stdMath.delta(1337, int256(0)), 1337); + assertEq(stdMath.delta(type(int64).max, int256(0)), type(uint64).max >> 1); + assertEq(stdMath.delta(type(int128).max, int256(0)), type(uint128).max >> 1); + assertEq(stdMath.delta(type(int256).max, int256(0)), type(uint256).max >> 1); + + assertEq(stdMath.delta(-0, int256(0)), 0); + assertEq(stdMath.delta(-1337, int256(0)), 1337); + assertEq(stdMath.delta(type(int64).min, int256(0)), (type(uint64).max >> 1) + 1); + assertEq(stdMath.delta(type(int128).min, int256(0)), (type(uint128).max >> 1) + 1); + assertEq(stdMath.delta(type(int256).min, int256(0)), (type(uint256).max >> 1) + 1); + + assertEq(stdMath.delta(int256(0), -0), 0); + assertEq(stdMath.delta(int256(0), -1337), 1337); + assertEq(stdMath.delta(int256(0), type(int64).min), (type(uint64).max >> 1) + 1); + assertEq(stdMath.delta(int256(0), type(int128).min), (type(uint128).max >> 1) + 1); + assertEq(stdMath.delta(int256(0), type(int256).min), (type(uint256).max >> 1) + 1); + + assertEq(stdMath.delta(1337, int256(1337)), 0); + assertEq(stdMath.delta(type(int256).max, type(int256).max), 0); + assertEq(stdMath.delta(type(int256).min, type(int256).min), 0); + assertEq(stdMath.delta(type(int256).min, type(int256).max), type(uint256).max); + assertEq(stdMath.delta(5000, int256(1250)), 3750); + } + + function testFuzz_GetDelta_Int(int256 a, int256 b) external pure { + uint256 absA = getAbs(a); + uint256 absB = getAbs(b); + uint256 absDelta = absA > absB ? absA - absB : absB - absA; + + uint256 manualDelta; + if ((a >= 0 && b >= 0) || (a < 0 && b < 0)) { + manualDelta = absDelta; + } + // (a < 0 && b >= 0) || (a >= 0 && b < 0) + else { + manualDelta = absA + absB; + } + + uint256 delta = stdMath.delta(a, b); + + assertEq(delta, manualDelta); + } + + function test_GetPercentDelta_Uint() external { + StdMathMock stdMathMock = new StdMathMock(); + + assertEq(stdMath.percentDelta(uint256(0), uint256(1337)), 1e18); + assertEq(stdMath.percentDelta(uint256(0), type(uint64).max), 1e18); + assertEq(stdMath.percentDelta(uint256(0), type(uint128).max), 1e18); + assertEq(stdMath.percentDelta(uint256(0), type(uint192).max), 1e18); + + assertEq(stdMath.percentDelta(1337, uint256(1337)), 0); + assertEq(stdMath.percentDelta(type(uint192).max, type(uint192).max), 0); + assertEq(stdMath.percentDelta(0, uint256(2500)), 1e18); + assertEq(stdMath.percentDelta(2500, uint256(2500)), 0); + assertEq(stdMath.percentDelta(5000, uint256(2500)), 1e18); + assertEq(stdMath.percentDelta(7500, uint256(2500)), 2e18); + + vm.expectRevert("stdMath percentDelta(uint256,uint256): Divisor is zero"); + stdMathMock.exposedPercentDelta(uint256(1), 0); + } + + function testFuzz_GetPercentDelta_Uint(uint192 a, uint192 b) external pure { + vm.assume(b != 0); + uint256 manualDelta = a > b ? a - b : b - a; + + uint256 manualPercentDelta = manualDelta * 1e18 / b; + uint256 percentDelta = stdMath.percentDelta(a, b); + + assertEq(percentDelta, manualPercentDelta); + } + + function test_GetPercentDelta_Int() external { + // We deploy a mock version so we can properly test the revert. + StdMathMock stdMathMock = new StdMathMock(); + + assertEq(stdMath.percentDelta(int256(0), int256(1337)), 1e18); + assertEq(stdMath.percentDelta(int256(0), -1337), 1e18); + assertEq(stdMath.percentDelta(int256(0), type(int64).min), 1e18); + assertEq(stdMath.percentDelta(int256(0), type(int128).min), 1e18); + assertEq(stdMath.percentDelta(int256(0), type(int192).min), 1e18); + assertEq(stdMath.percentDelta(int256(0), type(int64).max), 1e18); + assertEq(stdMath.percentDelta(int256(0), type(int128).max), 1e18); + assertEq(stdMath.percentDelta(int256(0), type(int192).max), 1e18); + + assertEq(stdMath.percentDelta(1337, int256(1337)), 0); + assertEq(stdMath.percentDelta(type(int192).max, type(int192).max), 0); + assertEq(stdMath.percentDelta(type(int192).min, type(int192).min), 0); + + assertEq(stdMath.percentDelta(type(int192).min, type(int192).max), 2e18); // rounds the 1 wei diff down + assertEq(stdMath.percentDelta(type(int192).max, type(int192).min), 2e18 - 1); // rounds the 1 wei diff down + assertEq(stdMath.percentDelta(0, int256(2500)), 1e18); + assertEq(stdMath.percentDelta(2500, int256(2500)), 0); + assertEq(stdMath.percentDelta(5000, int256(2500)), 1e18); + assertEq(stdMath.percentDelta(7500, int256(2500)), 2e18); + + vm.expectRevert("stdMath percentDelta(int256,int256): Divisor is zero"); + stdMathMock.exposedPercentDelta(int256(1), 0); + } + + function testFuzz_GetPercentDelta_Int(int192 a, int192 b) external pure { + vm.assume(b != 0); + uint256 absA = getAbs(a); + uint256 absB = getAbs(b); + uint256 absDelta = absA > absB ? absA - absB : absB - absA; + + uint256 manualDelta; + if ((a >= 0 && b >= 0) || (a < 0 && b < 0)) { + manualDelta = absDelta; + } + // (a < 0 && b >= 0) || (a >= 0 && b < 0) + else { + manualDelta = absA + absB; + } + + uint256 manualPercentDelta = manualDelta * 1e18 / absB; + uint256 percentDelta = stdMath.percentDelta(a, b); + + assertEq(percentDelta, manualPercentDelta); + } + + /*////////////////////////////////////////////////////////////////////////// + HELPERS + //////////////////////////////////////////////////////////////////////////*/ + + function getAbs(int256 a) private pure returns (uint256) { + if (a < 0) { + return a == type(int256).min ? uint256(type(int256).max) + 1 : uint256(-a); + } + + return uint256(a); + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdStorage.t.sol b/dependencies/forge-std-1.16.1/test/StdStorage.t.sol new file mode 100644 index 00000000..ab87da38 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdStorage.t.sol @@ -0,0 +1,532 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {stdStorage, StdStorage} from "../src/StdStorage.sol"; +import {Test} from "../src/Test.sol"; + +contract StdStorageTest is Test { + using stdStorage for StdStorage; + + StorageTest internal test; + + function setUp() public { + test = new StorageTest(); + } + + function test_StorageHidden() public { + assertEq(uint256(keccak256("my.random.var")), stdstore.target(address(test)).sig("hidden()").find()); + } + + function test_StorageObvious() public { + assertEq(uint256(0), stdstore.target(address(test)).sig("exists()").find()); + } + + function test_StorageExtraSload() public { + assertEq(16, stdstore.target(address(test)).sig(test.extra_sload.selector).find()); + } + + function test_StorageCheckedWriteHidden() public { + stdstore.target(address(test)).sig(test.hidden.selector).checked_write(100); + assertEq(uint256(test.hidden()), 100); + } + + function test_StorageCheckedWriteObvious() public { + stdstore.target(address(test)).sig(test.exists.selector).checked_write(100); + assertEq(test.exists(), 100); + } + + function test_StorageCheckedWriteSignedIntegerHidden() public { + stdstore.target(address(test)).sig(test.hidden.selector).checked_write_int(-100); + assertEq(int256(uint256(test.hidden())), -100); + } + + function test_StorageCheckedWriteSignedIntegerObvious() public { + stdstore.target(address(test)).sig(test.tG.selector).checked_write_int(-100); + assertEq(test.tG(), -100); + } + + function test_StorageMapStructA() public { + uint256 slot = + stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(0).find(); + assertEq(uint256(keccak256(abi.encode(address(this), 4))), slot); + } + + function test_StorageMapStructB() public { + uint256 slot = + stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(1).find(); + assertEq(uint256(keccak256(abi.encode(address(this), 4))) + 1, slot); + } + + function test_StorageDeepMap() public { + uint256 slot = stdstore.target(address(test)).sig(test.deep_map.selector).with_key(address(this)) + .with_key(address(this)).find(); + assertEq(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(5)))))), slot); + } + + function test_StorageCheckedWriteDeepMap() public { + stdstore.target(address(test)).sig(test.deep_map.selector).with_key(address(this)).with_key(address(this)) + .checked_write(100); + assertEq(100, test.deep_map(address(this), address(this))); + } + + function test_StorageDeepMapStructA() public { + uint256 slot = stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)) + .with_key(address(this)).depth(0).find(); + assertEq( + bytes32( + uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(6)))))) + 0 + ), + bytes32(slot) + ); + } + + function test_StorageDeepMapStructB() public { + uint256 slot = stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)) + .with_key(address(this)).depth(1).find(); + assertEq( + bytes32( + uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(6)))))) + 1 + ), + bytes32(slot) + ); + } + + function test_StorageCheckedWriteDeepMapStructA() public { + stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)) + .with_key(address(this)).depth(0).checked_write(100); + (uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this)); + assertEq(100, a); + assertEq(0, b); + } + + function test_StorageCheckedWriteDeepMapStructB() public { + stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)) + .with_key(address(this)).depth(1).checked_write(100); + (uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this)); + assertEq(0, a); + assertEq(100, b); + } + + function test_StorageCheckedWriteMapStructA() public { + stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(0).checked_write(100); + (uint256 a, uint256 b) = test.map_struct(address(this)); + assertEq(a, 100); + assertEq(b, 0); + } + + function test_StorageCheckedWriteMapStructB() public { + stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(1).checked_write(100); + (uint256 a, uint256 b) = test.map_struct(address(this)); + assertEq(a, 0); + assertEq(b, 100); + } + + function test_StorageStructA() public { + uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(0).find(); + assertEq(uint256(7), slot); + } + + function test_StorageStructB() public { + uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(1).find(); + assertEq(uint256(7) + 1, slot); + } + + function test_StorageCheckedWriteStructA() public { + stdstore.target(address(test)).sig(test.basic.selector).depth(0).checked_write(100); + (uint256 a, uint256 b) = test.basic(); + assertEq(a, 100); + assertEq(b, 1337); + } + + function test_StorageCheckedWriteStructB() public { + stdstore.target(address(test)).sig(test.basic.selector).depth(1).checked_write(100); + (uint256 a, uint256 b) = test.basic(); + assertEq(a, 1337); + assertEq(b, 100); + } + + function test_StorageMapAddrFound() public { + uint256 slot = stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).find(); + assertEq(uint256(keccak256(abi.encode(address(this), uint256(1)))), slot); + } + + function test_StorageMapAddrRoot() public { + (uint256 slot, bytes32 key) = + stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).parent(); + assertEq(address(uint160(uint256(key))), address(this)); + assertEq(uint256(1), slot); + slot = stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).root(); + assertEq(uint256(1), slot); + } + + function test_StorageMapUintFound() public { + uint256 slot = stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).find(); + assertEq(uint256(keccak256(abi.encode(100, uint256(2)))), slot); + } + + function test_StorageCheckedWriteMapUint() public { + stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).checked_write(100); + assertEq(100, test.map_uint(100)); + } + + function test_StorageCheckedWriteMapAddr() public { + stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).checked_write(100); + assertEq(100, test.map_addr(address(this))); + } + + function test_StorageCheckedWriteMapBool() public { + stdstore.target(address(test)).sig(test.map_bool.selector).with_key(address(this)).checked_write(true); + assertTrue(test.map_bool(address(this))); + } + + function testFuzz_StorageCheckedWriteMapPacked(address addr, uint128 value) public { + stdstore.enable_packed_slots().target(address(test)).sig(test.read_struct_lower.selector).with_key(addr) + .checked_write(value); + assertEq(test.read_struct_lower(addr), value); + + stdstore.enable_packed_slots().target(address(test)).sig(test.read_struct_upper.selector).with_key(addr) + .checked_write(value); + assertEq(test.read_struct_upper(addr), value); + } + + function test_StorageCheckedWriteMapPackedFullSuccess() public { + uint256 full = test.map_packed(address(1337)); + // keep upper 128, set lower 128 to 1337 + full = (full & (uint256((1 << 128) - 1) << 128)) | 1337; + stdstore.target(address(test)).sig(test.map_packed.selector).with_key(address(uint160(1337))) + .checked_write(full); + assertEq(1337, test.read_struct_lower(address(1337))); + } + + function test_RevertStorageConst() public { + StorageTestTarget target = new StorageTestTarget(test); + + vm.expectRevert("stdStorage find(StdStorage): No storage use detected for target."); + target.expectRevertStorageConst(); + } + + function testFuzz_StorageNativePack(uint248 val1, uint248 val2, bool boolVal1, bool boolVal2) public { + stdstore.enable_packed_slots().target(address(test)).sig(test.tA.selector).checked_write(val1); + stdstore.enable_packed_slots().target(address(test)).sig(test.tB.selector).checked_write(boolVal1); + stdstore.enable_packed_slots().target(address(test)).sig(test.tC.selector).checked_write(boolVal2); + stdstore.enable_packed_slots().target(address(test)).sig(test.tD.selector).checked_write(val2); + + assertEq(test.tA(), val1); + assertEq(test.tB(), boolVal1); + assertEq(test.tC(), boolVal2); + assertEq(test.tD(), val2); + } + + function test_StorageReadBytes32() public { + bytes32 val = stdstore.target(address(test)).sig(test.tE.selector).read_bytes32(); + assertEq(val, hex"1337"); + } + + function test_StorageReadBool_False() public { + bool val = stdstore.target(address(test)).sig(test.tB.selector).read_bool(); + assertEq(val, false); + } + + function test_StorageReadBool_True() public { + bool val = stdstore.target(address(test)).sig(test.tH.selector).read_bool(); + assertEq(val, true); + } + + function test_RevertIf_ReadingNonBoolValue() public { + vm.expectRevert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool."); + this.readNonBoolValue(); + } + + function readNonBoolValue() public { + stdstore.target(address(test)).sig(test.tE.selector).read_bool(); + } + + function test_StorageReadAddress() public { + address val = stdstore.target(address(test)).sig(test.tF.selector).read_address(); + assertEq(val, address(1337)); + } + + function test_StorageReadUint() public { + uint256 val = stdstore.target(address(test)).sig(test.exists.selector).read_uint(); + assertEq(val, 1); + } + + function test_StorageReadInt() public { + int256 val = stdstore.target(address(test)).sig(test.tG.selector).read_int(); + assertEq(val, type(int256).min); + } + + function testFuzz_Packed(uint256 val, uint8 elemToGet) public { + // This function tries an assortment of packed slots, shifts meaning number of elements + // that are packed. Shiftsizes are the size of each element, i.e. 8 means a data type that is 8 bits, 16 == 16 bits, etc. + // Combined, these determine how a slot is packed. Making it random is too hard to avoid global rejection limit + // and make it performant. + + // change the number of shifts + for (uint256 i = 1; i < 5; i++) { + uint256 shifts = i; + + elemToGet = uint8(bound(elemToGet, 0, shifts - 1)); + + uint256[] memory shiftSizes = new uint256[](shifts); + for (uint256 j; j < shifts; j++) { + shiftSizes[j] = 8 * (j + 1); + } + + test.setRandomPacking(val); + + uint256 leftBits; + uint256 rightBits; + for (uint256 j; j < shiftSizes.length; j++) { + if (j < elemToGet) { + leftBits += shiftSizes[j]; + } else if (elemToGet != j) { + rightBits += shiftSizes[j]; + } + } + + // we may have some right bits unaccounted for + leftBits += 256 - (leftBits + shiftSizes[elemToGet] + rightBits); + // clear left bits, then clear right bits and realign + uint256 expectedValToRead = (val << leftBits) >> (leftBits + rightBits); + + uint256 readVal = stdstore.target(address(test)).enable_packed_slots() + .sig("getRandomPacked(uint8,uint8[],uint8)").with_calldata(abi.encode(shifts, shiftSizes, elemToGet)) + .read_uint(); + + assertEq(readVal, expectedValToRead); + } + } + + function testFuzz_Packed2(uint256 nvars, uint256 seed) public { + // Number of random variables to generate. + nvars = bound(nvars, 1, 20); + + // This will decrease as we generate values in the below loop. + uint256 bitsRemaining = 256; + + // Generate a random value and size for each variable. + uint256[] memory vals = new uint256[](nvars); + uint256[] memory sizes = new uint256[](nvars); + uint256[] memory offsets = new uint256[](nvars); + + for (uint256 i = 0; i < nvars; i++) { + // Generate a random value and size. + offsets[i] = i == 0 ? 0 : offsets[i - 1] + sizes[i - 1]; + + uint256 nvarsRemaining = nvars - i; + uint256 maxVarSize = bitsRemaining - nvarsRemaining + 1; + sizes[i] = bound(uint256(keccak256(abi.encodePacked(seed, i + 256))), 1, maxVarSize); + bitsRemaining -= sizes[i]; + + uint256 maxVal; + uint256 varSize = sizes[i]; + assembly { + // mask = (1 << varSize) - 1 + maxVal := sub(shl(varSize, 1), 1) + } + vals[i] = bound(uint256(keccak256(abi.encodePacked(seed, i))), 0, maxVal); + } + + // Pack all values into the slot. + for (uint256 i = 0; i < nvars; i++) { + stdstore.enable_packed_slots().target(address(test)).sig("getRandomPacked(uint256,uint256)") + .with_key(sizes[i]).with_key(offsets[i]).checked_write(vals[i]); + } + + // Verify the read data matches. + for (uint256 i = 0; i < nvars; i++) { + uint256 readVal = stdstore.enable_packed_slots().target(address(test)) + .sig("getRandomPacked(uint256,uint256)").with_key(sizes[i]).with_key(offsets[i]).read_uint(); + + uint256 retVal = test.getRandomPacked(sizes[i], offsets[i]); + + assertEq(readVal, vals[i]); + assertEq(retVal, vals[i]); + } + } + + function testEdgeCaseArray() public { + stdstore.target(address(test)).sig("edgeCaseArray(uint256)").with_key(uint256(0)).checked_write(1); + assertEq(test.edgeCaseArray(0), 1); + } + + // Regression test for https://github.com/foundry-rs/forge-std/issues/740 + // `find()` used to infinite-loop on tokens whose `balanceOf` reads multiple + // storage slots and returns a derived value (reflection tokens). + function test_RevertFindOnReflectionToken() public { + MockReflectionToken token = new MockReflectionToken(); + ReflectionTokenTarget target = new ReflectionTokenTarget(token); + vm.expectRevert("stdStorage find(StdStorage): Slot(s) not found."); + target.findBalanceOf(address(this)); + } +} + +contract StorageTestTarget { + using stdStorage for StdStorage; + + StdStorage internal stdstore; + StorageTest internal test; + + constructor(StorageTest test_) { + test = test_; + } + + function expectRevertStorageConst() public { + stdstore.target(address(test)).sig("const()").find(); + } +} + +contract ReflectionTokenTarget { + using stdStorage for StdStorage; + + StdStorage internal stdstore; + MockReflectionToken internal token; + + constructor(MockReflectionToken token_) { + token = token_; + } + + function findBalanceOf(address who) public { + stdstore.target(address(token)).sig("balanceOf(address)").with_key(who).find(); + } +} + +contract StorageTest { + uint256 public exists = 1; + mapping(address => uint256) public map_addr; + mapping(uint256 => uint256) public map_uint; + mapping(address => uint256) public map_packed; + mapping(address => UnpackedStruct) public map_struct; + mapping(address => mapping(address => uint256)) public deep_map; + mapping(address => mapping(address => UnpackedStruct)) public deep_map_struct; + UnpackedStruct public basic; + + uint248 public tA; + bool public tB; + + bool public tC = false; + uint248 public tD = 1; + + struct UnpackedStruct { + uint256 a; + uint256 b; + } + + mapping(address => bool) public map_bool; + + bytes32 public tE = hex"1337"; + address public tF = address(1337); + int256 public tG = type(int256).min; + bool public tH = true; + bytes32 private tI = ~bytes32(hex"1337"); + + uint256 randomPacking; + + // Array with length matching values of elements. + uint256[] public edgeCaseArray = [3, 3, 3]; + + constructor() { + basic = UnpackedStruct({a: 1337, b: 1337}); + + uint256 two = (1 << 128) | 1; + map_packed[msg.sender] = two; + map_packed[address(uint160(1337))] = 1 << 128; + } + + function read_struct_upper(address who) public view returns (uint256) { + return map_packed[who] >> 128; + } + + function read_struct_lower(address who) public view returns (uint256) { + return map_packed[who] & ((1 << 128) - 1); + } + + function hidden() public view returns (bytes32 t) { + bytes32 slot = keccak256("my.random.var"); + assembly ("memory-safe") { + t := sload(slot) + } + } + + function const() public pure returns (bytes32 t) { + t = bytes32(hex"1337"); + } + + function extra_sload() public view returns (bytes32 t) { + // trigger read on slot `tE`, and make a staticcall to make sure compiler doesn't optimize this SLOAD away + assembly { + pop(staticcall(gas(), sload(tE.slot), 0, 0, 0, 0)) + } + t = tI; + } + + function setRandomPacking(uint256 val) public { + randomPacking = val; + } + + function _getMask(uint256 size) internal pure returns (uint256 mask) { + assembly { + // mask = (1 << size) - 1 + mask := sub(shl(size, 1), 1) + } + } + + function setRandomPacking(uint256 val, uint256 size, uint256 offset) public { + // Generate mask based on the size of the value + uint256 mask = _getMask(size); + // Zero out all bits for the word we're about to set + uint256 cleanedWord = randomPacking & ~(mask << offset); + // Place val in the correct spot of the cleaned word + randomPacking = cleanedWord | val << offset; + } + + function getRandomPacked(uint256 size, uint256 offset) public view returns (uint256) { + // Generate mask based on the size of the value + uint256 mask = _getMask(size); + // Shift to place the bits in the correct position, and use mask to zero out remaining bits + return (randomPacking >> offset) & mask; + } + + function getRandomPacked(uint8 shifts, uint8[] memory shiftSizes, uint8 elem) public view returns (uint256) { + require(elem < shifts, "!elem"); + uint256 leftBits; + uint256 rightBits; + + for (uint256 i; i < shiftSizes.length; i++) { + if (i < elem) { + leftBits += shiftSizes[i]; + } else if (elem != i) { + rightBits += shiftSizes[i]; + } + } + + // we may have some right bits unaccounted for + leftBits += 256 - (leftBits + shiftSizes[elem] + rightBits); + + // clear left bits, then clear right bits and realign + return (randomPacking << leftBits) >> (leftBits + rightBits); + } +} + +// Minimal mock of a reflection token: `balanceOf` reads many storage slots +// and always returns a constant, so no single slot mutation can change its +// return value and stdStorage can never find a matching slot. +contract MockReflectionToken { + uint256 internal _a = 1; + uint256 internal _b = 2; + uint256 internal _c = 3; + mapping(address => uint256) internal _balances; + + constructor() { + _balances[msg.sender] = 1000 ether; + } + + // Reads _a, _b, _c, and _balances[account] but always returns a constant. + // This means mutating any single slot won't change the return value. + function balanceOf(address account) public view returns (uint256) { + uint256 x = _a + _b + _c + _balances[account]; + x; // suppress unused warning + return 42; + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdStyle.t.sol b/dependencies/forge-std-1.16.1/test/StdStyle.t.sol new file mode 100644 index 00000000..1146a8df --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdStyle.t.sol @@ -0,0 +1,110 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Test, console2, StdStyle} from "../src/Test.sol"; + +contract StdStyleTest is Test { + function test_StyleColor() public pure { + console2.log(StdStyle.red("StdStyle.red String Test")); + console2.log(StdStyle.red(uint256(10e18))); + console2.log(StdStyle.red(int256(-10e18))); + console2.log(StdStyle.red(true)); + console2.log(StdStyle.red(address(0))); + console2.log(StdStyle.redBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.redBytes32("StdStyle.redBytes32")); + console2.log(StdStyle.green("StdStyle.green String Test")); + console2.log(StdStyle.green(uint256(10e18))); + console2.log(StdStyle.green(int256(-10e18))); + console2.log(StdStyle.green(true)); + console2.log(StdStyle.green(address(0))); + console2.log(StdStyle.greenBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.greenBytes32("StdStyle.greenBytes32")); + console2.log(StdStyle.yellow("StdStyle.yellow String Test")); + console2.log(StdStyle.yellow(uint256(10e18))); + console2.log(StdStyle.yellow(int256(-10e18))); + console2.log(StdStyle.yellow(true)); + console2.log(StdStyle.yellow(address(0))); + console2.log(StdStyle.yellowBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.yellowBytes32("StdStyle.yellowBytes32")); + console2.log(StdStyle.blue("StdStyle.blue String Test")); + console2.log(StdStyle.blue(uint256(10e18))); + console2.log(StdStyle.blue(int256(-10e18))); + console2.log(StdStyle.blue(true)); + console2.log(StdStyle.blue(address(0))); + console2.log(StdStyle.blueBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.blueBytes32("StdStyle.blueBytes32")); + console2.log(StdStyle.magenta("StdStyle.magenta String Test")); + console2.log(StdStyle.magenta(uint256(10e18))); + console2.log(StdStyle.magenta(int256(-10e18))); + console2.log(StdStyle.magenta(true)); + console2.log(StdStyle.magenta(address(0))); + console2.log(StdStyle.magentaBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.magentaBytes32("StdStyle.magentaBytes32")); + console2.log(StdStyle.cyan("StdStyle.cyan String Test")); + console2.log(StdStyle.cyan(uint256(10e18))); + console2.log(StdStyle.cyan(int256(-10e18))); + console2.log(StdStyle.cyan(true)); + console2.log(StdStyle.cyan(address(0))); + console2.log(StdStyle.cyanBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.cyanBytes32("StdStyle.cyanBytes32")); + } + + function test_StyleFontWeight() public pure { + console2.log(StdStyle.bold("StdStyle.bold String Test")); + console2.log(StdStyle.bold(uint256(10e18))); + console2.log(StdStyle.bold(int256(-10e18))); + console2.log(StdStyle.bold(address(0))); + console2.log(StdStyle.bold(true)); + console2.log(StdStyle.boldBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.boldBytes32("StdStyle.boldBytes32")); + console2.log(StdStyle.dim("StdStyle.dim String Test")); + console2.log(StdStyle.dim(uint256(10e18))); + console2.log(StdStyle.dim(int256(-10e18))); + console2.log(StdStyle.dim(address(0))); + console2.log(StdStyle.dim(true)); + console2.log(StdStyle.dimBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.dimBytes32("StdStyle.dimBytes32")); + console2.log(StdStyle.italic("StdStyle.italic String Test")); + console2.log(StdStyle.italic(uint256(10e18))); + console2.log(StdStyle.italic(int256(-10e18))); + console2.log(StdStyle.italic(address(0))); + console2.log(StdStyle.italic(true)); + console2.log(StdStyle.italicBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.italicBytes32("StdStyle.italicBytes32")); + console2.log(StdStyle.underline("StdStyle.underline String Test")); + console2.log(StdStyle.underline(uint256(10e18))); + console2.log(StdStyle.underline(int256(-10e18))); + console2.log(StdStyle.underline(address(0))); + console2.log(StdStyle.underline(true)); + console2.log(StdStyle.underlineBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.underlineBytes32("StdStyle.underlineBytes32")); + console2.log(StdStyle.inverse("StdStyle.inverse String Test")); + console2.log(StdStyle.inverse(uint256(10e18))); + console2.log(StdStyle.inverse(int256(-10e18))); + console2.log(StdStyle.inverse(address(0))); + console2.log(StdStyle.inverse(true)); + console2.log(StdStyle.inverseBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); + console2.log(StdStyle.inverseBytes32("StdStyle.inverseBytes32")); + } + + function test_StyleCombined() public pure { + console2.log(StdStyle.red(StdStyle.bold("Red Bold String Test"))); + console2.log(StdStyle.green(StdStyle.dim(uint256(10e18)))); + console2.log(StdStyle.yellow(StdStyle.italic(int256(-10e18)))); + console2.log(StdStyle.blue(StdStyle.underline(address(0)))); + console2.log(StdStyle.magenta(StdStyle.inverse(true))); + } + + function test_StyleCustom() public pure { + console2.log(h1("Custom Style 1")); + console2.log(h2("Custom Style 2")); + } + + function h1(string memory a) private pure returns (string memory) { + return StdStyle.cyan(StdStyle.inverse(StdStyle.bold(a))); + } + + function h2(string memory a) private pure returns (string memory) { + return StdStyle.magenta(StdStyle.bold(StdStyle.underline(a))); + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdToml.t.sol b/dependencies/forge-std-1.16.1/test/StdToml.t.sol new file mode 100644 index 00000000..306dda99 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdToml.t.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Test, stdToml} from "../src/Test.sol"; + +contract StdTomlTest is Test { + using stdToml for string; + + string root; + string path; + + function setUp() public { + root = vm.projectRoot(); + path = string.concat(root, "/test/fixtures/test.toml"); + } + + struct SimpleToml { + uint256 a; + string b; + } + + struct NestedToml { + uint256 a; + string b; + SimpleToml c; + } + + function test_readToml() public view { + string memory json = vm.readFile(path); + assertEq(json.readUint(".a"), 123); + } + + function test_writeToml() public { + string memory json = "json"; + json.serialize("a", uint256(123)); + string memory semiFinal = json.serialize("b", string("test")); + string memory finalJson = json.serialize("c", semiFinal); + finalJson.write(path); + + string memory toml = vm.readFile(path); + bytes memory data = toml.parseRaw("$"); + NestedToml memory decodedData = abi.decode(data, (NestedToml)); + + assertEq(decodedData.a, 123); + assertEq(decodedData.b, "test"); + assertEq(decodedData.c.a, 123); + assertEq(decodedData.c.b, "test"); + } +} diff --git a/dependencies/forge-std-1.16.1/test/StdUtils.t.sol b/dependencies/forge-std-1.16.1/test/StdUtils.t.sol new file mode 100644 index 00000000..c0a3d3ac --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/StdUtils.t.sol @@ -0,0 +1,342 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Test, StdUtils} from "../src/Test.sol"; + +contract StdUtilsMock is StdUtils { + // We deploy a mock version so we can properly test expected reverts. + function exposedGetTokenBalances(address token, address[] memory addresses) + external + returns (uint256[] memory balances) + { + return getTokenBalances(token, addresses); + } + + function exposedBound(int256 num, int256 min, int256 max) external pure returns (int256) { + return bound(num, min, max); + } + + function exposedBound(uint256 num, uint256 min, uint256 max) external pure returns (uint256) { + return bound(num, min, max); + } + + function exposedBytesToUint(bytes memory b) external pure returns (uint256) { + return bytesToUint(b); + } +} + +contract StdUtilsTest is Test { + /*////////////////////////////////////////////////////////////////////////// + BOUND UINT + //////////////////////////////////////////////////////////////////////////*/ + + function test_Bound() public pure { + assertEq(bound(uint256(5), 0, 4), 0); + assertEq(bound(uint256(0), 69, 69), 69); + assertEq(bound(uint256(0), 68, 69), 68); + assertEq(bound(uint256(10), 150, 190), 174); + assertEq(bound(uint256(300), 2800, 3200), 3107); + assertEq(bound(uint256(9999), 1337, 6666), 4669); + } + + function test_Bound_WithinRange() public pure { + assertEq(bound(uint256(51), 50, 150), 51); + assertEq(bound(uint256(51), 50, 150), bound(bound(uint256(51), 50, 150), 50, 150)); + assertEq(bound(uint256(149), 50, 150), 149); + assertEq(bound(uint256(149), 50, 150), bound(bound(uint256(149), 50, 150), 50, 150)); + } + + function test_Bound_EdgeCoverage() public pure { + assertEq(bound(uint256(0), 50, 150), 50); + assertEq(bound(uint256(1), 50, 150), 51); + assertEq(bound(uint256(2), 50, 150), 52); + assertEq(bound(uint256(3), 50, 150), 53); + assertEq(bound(type(uint256).max, 50, 150), 150); + assertEq(bound(type(uint256).max - 1, 50, 150), 149); + assertEq(bound(type(uint256).max - 2, 50, 150), 148); + assertEq(bound(type(uint256).max - 3, 50, 150), 147); + } + + function testFuzz_Bound_DistributionIsEven(uint256 min, uint256 size) public pure { + size = size % 100 + 1; + min = bound(min, UINT256_MAX / 2, UINT256_MAX / 2 + size); + uint256 max = min + size - 1; + uint256 result; + + for (uint256 i = 1; i <= size * 4; ++i) { + // x > max + result = bound(max + i, min, max); + assertEq(result, min + (i - 1) % size); + // x < min + result = bound(min - i, min, max); + assertEq(result, max - (i - 1) % size); + } + } + + function testFuzz_Bound(uint256 num, uint256 min, uint256 max) public pure { + if (min > max) (min, max) = (max, min); + + uint256 result = bound(num, min, max); + + assertGe(result, min); + assertLe(result, max); + assertEq(result, bound(result, min, max)); + if (num >= min && num <= max) assertEq(result, num); + } + + function test_BoundUint256Max() public pure { + assertEq(bound(0, type(uint256).max - 1, type(uint256).max), type(uint256).max - 1); + assertEq(bound(1, type(uint256).max - 1, type(uint256).max), type(uint256).max); + } + + function test_RevertIf_BoundMaxLessThanMin() public { + // We deploy a mock version so we can properly test the revert. + StdUtilsMock stdUtils = new StdUtilsMock(); + + vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min.")); + stdUtils.exposedBound(uint256(5), 100, 10); + } + + function testFuzz_RevertIf_BoundMaxLessThanMin(uint256 num, uint256 min, uint256 max) public { + // We deploy a mock version so we can properly test the revert. + StdUtilsMock stdUtils = new StdUtilsMock(); + + vm.assume(min > max); + vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min.")); + stdUtils.exposedBound(num, min, max); + } + + /*////////////////////////////////////////////////////////////////////////// + BOUND INT + //////////////////////////////////////////////////////////////////////////*/ + + function test_BoundInt() public pure { + assertEq(bound(-3, 0, 4), 2); + assertEq(bound(0, -69, -69), -69); + assertEq(bound(0, -69, -68), -68); + assertEq(bound(-10, 150, 190), 154); + assertEq(bound(-300, 2800, 3200), 2908); + assertEq(bound(9999, -1337, 6666), 1995); + } + + function test_BoundInt_WithinRange() public pure { + assertEq(bound(51, -50, 150), 51); + assertEq(bound(51, -50, 150), bound(bound(51, -50, 150), -50, 150)); + assertEq(bound(149, -50, 150), 149); + assertEq(bound(149, -50, 150), bound(bound(149, -50, 150), -50, 150)); + } + + function test_BoundInt_EdgeCoverage() public pure { + assertEq(bound(type(int256).min, -50, 150), -50); + assertEq(bound(type(int256).min + 1, -50, 150), -49); + assertEq(bound(type(int256).min + 2, -50, 150), -48); + assertEq(bound(type(int256).min + 3, -50, 150), -47); + assertEq(bound(type(int256).min, 10, 150), 10); + assertEq(bound(type(int256).min + 1, 10, 150), 11); + assertEq(bound(type(int256).min + 2, 10, 150), 12); + assertEq(bound(type(int256).min + 3, 10, 150), 13); + + assertEq(bound(type(int256).max, -50, 150), 150); + assertEq(bound(type(int256).max - 1, -50, 150), 149); + assertEq(bound(type(int256).max - 2, -50, 150), 148); + assertEq(bound(type(int256).max - 3, -50, 150), 147); + assertEq(bound(type(int256).max, -50, -10), -10); + assertEq(bound(type(int256).max - 1, -50, -10), -11); + assertEq(bound(type(int256).max - 2, -50, -10), -12); + assertEq(bound(type(int256).max - 3, -50, -10), -13); + } + + function testFuzz_BoundInt_DistributionIsEven(int256 min, uint256 size) public pure { + size = size % 100 + 1; + min = bound(min, -int256(size / 2), int256(size - size / 2)); + int256 max = min + int256(size) - 1; + int256 result; + + for (uint256 i = 1; i <= size * 4; ++i) { + // x > max + result = bound(max + int256(i), min, max); + assertEq(result, min + int256((i - 1) % size)); + // x < min + result = bound(min - int256(i), min, max); + assertEq(result, max - int256((i - 1) % size)); + } + } + + function testFuzz_BoundInt(int256 num, int256 min, int256 max) public pure { + if (min > max) (min, max) = (max, min); + + int256 result = bound(num, min, max); + + assertGe(result, min); + assertLe(result, max); + assertEq(result, bound(result, min, max)); + if (num >= min && num <= max) assertEq(result, num); + } + + function test_BoundIntInt256Max() public pure { + assertEq(bound(0, type(int256).max - 1, type(int256).max), type(int256).max - 1); + assertEq(bound(1, type(int256).max - 1, type(int256).max), type(int256).max); + } + + function test_BoundIntInt256Min() public pure { + assertEq(bound(0, type(int256).min, type(int256).min + 1), type(int256).min); + assertEq(bound(1, type(int256).min, type(int256).min + 1), type(int256).min + 1); + } + + function test_RevertIf_BoundIntMaxLessThanMin() public { + // We deploy a mock version so we can properly test the revert. + StdUtilsMock stdUtils = new StdUtilsMock(); + + vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min.")); + stdUtils.exposedBound(-5, 100, 10); + } + + function testFuzz_RevertIf_BoundIntMaxLessThanMin(int256 num, int256 min, int256 max) public { + // We deploy a mock version so we can properly test the revert. + StdUtilsMock stdUtils = new StdUtilsMock(); + + vm.assume(min > max); + vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min.")); + stdUtils.exposedBound(num, min, max); + } + + /*////////////////////////////////////////////////////////////////////////// + BOUND PRIVATE KEY + //////////////////////////////////////////////////////////////////////////*/ + + function test_BoundPrivateKey() public pure { + assertEq(boundPrivateKey(0), 1); + assertEq(boundPrivateKey(1), 1); + assertEq(boundPrivateKey(300), 300); + assertEq(boundPrivateKey(9999), 9999); + assertEq(boundPrivateKey(SECP256K1_ORDER - 1), SECP256K1_ORDER - 1); + assertEq(boundPrivateKey(SECP256K1_ORDER), 1); + assertEq(boundPrivateKey(SECP256K1_ORDER + 1), 2); + assertEq(boundPrivateKey(UINT256_MAX), UINT256_MAX & SECP256K1_ORDER - 1); // x&y is equivalent to x-x%y + } + + /*////////////////////////////////////////////////////////////////////////// + BYTES TO UINT + //////////////////////////////////////////////////////////////////////////*/ + + function test_BytesToUint() external pure { + bytes memory maxUint = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; + bytes memory two = hex"02"; + bytes memory millionEther = hex"d3c21bcecceda1000000"; + + assertEq(bytesToUint(maxUint), type(uint256).max); + assertEq(bytesToUint(two), 2); + assertEq(bytesToUint(millionEther), 1_000_000 ether); + } + + function test_RevertIf_BytesLengthExceeds32() external { + // We deploy a mock version so we can properly test the revert. + StdUtilsMock stdUtils = new StdUtilsMock(); + + bytes memory thirty3Bytes = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; + vm.expectRevert("StdUtils bytesToUint(bytes): Bytes length exceeds 32."); + stdUtils.exposedBytesToUint(thirty3Bytes); + } + + /*////////////////////////////////////////////////////////////////////////// + COMPUTE CREATE ADDRESS + //////////////////////////////////////////////////////////////////////////*/ + + function test_ComputeCreateAddress() external pure { + address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9; + uint256 nonce = 14; + address createAddress = computeCreateAddress(deployer, nonce); + assertEq(createAddress, 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45); + } + + /*////////////////////////////////////////////////////////////////////////// + COMPUTE CREATE2 ADDRESS + //////////////////////////////////////////////////////////////////////////*/ + + function test_ComputeCreate2Address() external pure { + bytes32 salt = bytes32(uint256(31415)); + bytes32 initcodeHash = keccak256(abi.encode(0x6080)); + address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9; + address create2Address = computeCreate2Address(salt, initcodeHash, deployer); + assertEq(create2Address, 0xB147a5d25748fda14b463EB04B111027C290f4d3); + } + + function test_ComputeCreate2AddressWithDefaultDeployer() external pure { + bytes32 salt = 0xc290c670fde54e5ef686f9132cbc8711e76a98f0333a438a92daa442c71403c0; + bytes32 initcodeHash = hashInitCode(hex"6080", ""); + assertEq(initcodeHash, 0x1a578b7a4b0b5755db6d121b4118d4bc68fe170dca840c59bc922f14175a76b0); + address create2Address = computeCreate2Address(salt, initcodeHash); + assertEq(create2Address, 0xc0ffEe2198a06235aAbFffe5Db0CacF1717f5Ac6); + } +} + +contract StdUtilsForkTest is Test { + /*////////////////////////////////////////////////////////////////////////// + GET TOKEN BALANCES + //////////////////////////////////////////////////////////////////////////*/ + + address internal SHIB = 0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE; + address internal SHIB_HOLDER_0 = 0x855F5981e831D83e6A4b4EBFCAdAa68D92333170; + address internal SHIB_HOLDER_1 = 0x8F509A90c2e47779cA408Fe00d7A72e359229AdA; + address internal SHIB_HOLDER_2 = 0x0e3bbc0D04fF62211F71f3e4C45d82ad76224385; + + address internal USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; + address internal USDC_HOLDER_0 = 0xDa9CE944a37d218c3302F6B82a094844C6ECEb17; + address internal USDC_HOLDER_1 = 0x3e67F4721E6d1c41a015f645eFa37BEd854fcf52; + + function setUp() public { + // All tests of the `getTokenBalances` method are fork tests using live contracts. + vm.createSelectFork({urlOrAlias: "mainnet", blockNumber: 16_428_900}); + } + + function test_RevertIf_CannotGetTokenBalances_NonTokenContract() external { + // We deploy a mock version so we can properly test the revert. + StdUtilsMock stdUtils = new StdUtilsMock(); + + // The UniswapV2Factory contract has neither a `balanceOf` function nor a fallback function, + // so the `balanceOf` call should revert. + address token = address(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f); + address[] memory addresses = new address[](1); + addresses[0] = USDC_HOLDER_0; + + vm.expectRevert("Multicall3: call failed"); + stdUtils.exposedGetTokenBalances(token, addresses); + } + + function test_RevertIf_CannotGetTokenBalances_EOA() external { + // We deploy a mock version so we can properly test the revert. + StdUtilsMock stdUtils = new StdUtilsMock(); + + address eoa = vm.addr({privateKey: 1}); + address[] memory addresses = new address[](1); + addresses[0] = USDC_HOLDER_0; + vm.expectRevert("StdUtils getTokenBalances(address,address[]): Token address is not a contract."); + stdUtils.exposedGetTokenBalances(eoa, addresses); + } + + function test_GetTokenBalances_Empty() external { + address[] memory addresses = new address[](0); + uint256[] memory balances = getTokenBalances(USDC, addresses); + assertEq(balances.length, 0); + } + + function test_GetTokenBalances_USDC() external { + address[] memory addresses = new address[](2); + addresses[0] = USDC_HOLDER_0; + addresses[1] = USDC_HOLDER_1; + uint256[] memory balances = getTokenBalances(USDC, addresses); + assertEq(balances[0], 159_000_000_000_000); + assertEq(balances[1], 131_350_000_000_000); + } + + function test_GetTokenBalances_SHIB() external { + address[] memory addresses = new address[](3); + addresses[0] = SHIB_HOLDER_0; + addresses[1] = SHIB_HOLDER_1; + addresses[2] = SHIB_HOLDER_2; + uint256[] memory balances = getTokenBalances(SHIB, addresses); + assertEq(balances[0], 3_323_256_285_484.42e18); + assertEq(balances[1], 1_271_702_771_149.99999928e18); + assertEq(balances[2], 606_357_106_247e18); + } +} diff --git a/dependencies/forge-std-1.16.1/test/Vm.t.sol b/dependencies/forge-std-1.16.1/test/Vm.t.sol new file mode 100644 index 00000000..bcb979c9 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/Vm.t.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Test} from "../src/Test.sol"; +import {Vm, VmSafe} from "../src/Vm.sol"; + +// These tests ensure that functions are never accidentally removed from a Vm interface, or +// inadvertently moved between Vm and VmSafe. These tests must be updated each time a function is +// added to or removed from Vm or VmSafe. +contract VmTest is Test { + function test_VmInterfaceId() public pure { + assertEq(type(Vm).interfaceId, bytes4(0x6eba6eb5), "Vm"); + } + + function test_VmSafeInterfaceId() public pure { + assertEq(type(VmSafe).interfaceId, bytes4(0xcb532963), "VmSafe"); + } +} diff --git a/dependencies/forge-std-1.16.1/test/compilation/CompilationScript.sol b/dependencies/forge-std-1.16.1/test/compilation/CompilationScript.sol new file mode 100644 index 00000000..6efbfa65 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/compilation/CompilationScript.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Script} from "../../src/Script.sol"; + +// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing +// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 +contract CompilationScript is Script {} diff --git a/dependencies/forge-std-1.16.1/test/compilation/CompilationScriptBase.sol b/dependencies/forge-std-1.16.1/test/compilation/CompilationScriptBase.sol new file mode 100644 index 00000000..75329739 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/compilation/CompilationScriptBase.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {ScriptBase} from "../../src/Script.sol"; + +// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing +// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 +contract CompilationScriptBase is ScriptBase {} diff --git a/dependencies/forge-std-1.16.1/test/compilation/CompilationTest.sol b/dependencies/forge-std-1.16.1/test/compilation/CompilationTest.sol new file mode 100644 index 00000000..5ba888e8 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/compilation/CompilationTest.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {Test} from "../../src/Test.sol"; + +// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing +// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 +contract CompilationTest is Test {} diff --git a/dependencies/forge-std-1.16.1/test/compilation/CompilationTestBase.sol b/dependencies/forge-std-1.16.1/test/compilation/CompilationTestBase.sol new file mode 100644 index 00000000..9c081f78 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/compilation/CompilationTestBase.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity >=0.8.13 <0.9.0; + +import {TestBase} from "../../src/Test.sol"; + +// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing +// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 +contract CompilationTestBase is TestBase {} diff --git a/dependencies/forge-std-1.16.1/test/fixtures/broadcast.log.json b/dependencies/forge-std-1.16.1/test/fixtures/broadcast.log.json new file mode 100644 index 00000000..0a0200bc --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/fixtures/broadcast.log.json @@ -0,0 +1,187 @@ +{ + "transactions": [ + { + "hash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f", + "type": "CALL", + "contractName": "Test", + "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "function": "multiple_arguments(uint256,address,uint256[]):(uint256)", + "arguments": ["1", "0000000000000000000000000000000000001337", "[3,4]"], + "tx": { + "type": "0x02", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "gas": "0x73b9", + "value": "0x0", + "data": "0x23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004", + "nonce": "0x3", + "accessList": [] + } + }, + { + "hash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298", + "type": "CALL", + "contractName": "Test", + "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "function": "inc():(uint256)", + "arguments": [], + "tx": { + "type": "0x02", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "gas": "0xdcb2", + "value": "0x0", + "data": "0x371303c0", + "nonce": "0x4", + "accessList": [] + } + }, + { + "hash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c", + "type": "CALL", + "contractName": "Test", + "contractAddress": "0x7c6b4bbe207d642d98d5c537142d85209e585087", + "function": "t(uint256):(uint256)", + "arguments": ["1"], + "tx": { + "type": "0x02", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087", + "gas": "0x8599", + "value": "0x0", + "data": "0xafe29f710000000000000000000000000000000000000000000000000000000000000001", + "nonce": "0x5", + "accessList": [] + } + } + ], + "receipts": [ + { + "transactionHash": "0x481dc86e40bba90403c76f8e144aa9ff04c1da2164299d0298573835f0991181", + "transactionIndex": "0x0", + "blockHash": "0xef0730448490304e5403be0fa8f8ce64f118e9adcca60c07a2ae1ab921d748af", + "blockNumber": "0x1", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "cumulativeGasUsed": "0x13f3a", + "gasUsed": "0x13f3a", + "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "effectiveGasPrice": "0xee6b2800" + }, + { + "transactionHash": "0x6a187183545b8a9e7f1790e847139379bf5622baff2cb43acf3f5c79470af782", + "transactionIndex": "0x0", + "blockHash": "0xf3acb96a90071640c2a8c067ae4e16aad87e634ea8d8bbbb5b352fba86ba0148", + "blockNumber": "0x2", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "cumulativeGasUsed": "0x45d80", + "gasUsed": "0x45d80", + "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "effectiveGasPrice": "0xee6b2800" + }, + { + "transactionHash": "0x064ad173b4867bdef2fb60060bbdaf01735fbf10414541ea857772974e74ea9d", + "transactionIndex": "0x0", + "blockHash": "0x8373d02109d3ee06a0225f23da4c161c656ccc48fe0fcee931d325508ae73e58", + "blockNumber": "0x3", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", + "cumulativeGasUsed": "0x45feb", + "gasUsed": "0x45feb", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "effectiveGasPrice": "0xee6b2800" + }, + { + "transactionHash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f", + "transactionIndex": "0x0", + "blockHash": "0x16712fae5c0e18f75045f84363fb6b4d9a9fe25e660c4ce286833a533c97f629", + "blockNumber": "0x4", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "cumulativeGasUsed": "0x5905", + "gasUsed": "0x5905", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "effectiveGasPrice": "0xee6b2800" + }, + { + "transactionHash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298", + "transactionIndex": "0x0", + "blockHash": "0x156b88c3eb9a1244ba00a1834f3f70de735b39e3e59006dd03af4fe7d5480c11", + "blockNumber": "0x5", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", + "cumulativeGasUsed": "0xa9c4", + "gasUsed": "0xa9c4", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "effectiveGasPrice": "0xee6b2800" + }, + { + "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c", + "transactionIndex": "0x0", + "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb", + "blockNumber": "0x6", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087", + "cumulativeGasUsed": "0x66c5", + "gasUsed": "0x66c5", + "contractAddress": null, + "logs": [ + { + "address": "0x7c6b4bbe207d642d98d5c537142d85209e585087", + "topics": [ + "0x0b2e13ff20ac7b474198655583edf70dedd2c1dc980e329c4fbb2fc0748b796b" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046865726500000000000000000000000000000000000000000000000000000000", + "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb", + "blockNumber": "0x6", + "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c", + "transactionIndex": "0x1", + "logIndex": "0x0", + "transactionLogIndex": "0x0", + "removed": false + } + ], + "status": "0x1", + "logsBloom": "0x00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100", + "effectiveGasPrice": "0xee6b2800" + }, + { + "transactionHash": "0x11fbb10230c168ca1e36a7e5c69a6dbcd04fd9e64ede39d10a83e36ee8065c16", + "transactionIndex": "0x0", + "blockHash": "0xf1e0ed2eda4e923626ec74621006ed50b3fc27580dc7b4cf68a07ca77420e29c", + "blockNumber": "0x7", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": "0x0000000000000000000000000000000000001337", + "cumulativeGasUsed": "0x5208", + "gasUsed": "0x5208", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "effectiveGasPrice": "0xee6b2800" + } + ], + "libraries": [ + "src/Broadcast.t.sol:F:0x5fbdb2315678afecb367f032d93f642f64180aa3" + ], + "pending": [], + "path": "broadcast/Broadcast.t.sol/31337/run-latest.json", + "returns": {}, + "timestamp": 1655140035 +} diff --git a/dependencies/forge-std-1.16.1/test/fixtures/config.toml b/dependencies/forge-std-1.16.1/test/fixtures/config.toml new file mode 100644 index 00000000..e6dcccca --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/fixtures/config.toml @@ -0,0 +1,81 @@ +# ------------------------------------------------ +# EXAMPLE DEPLOYMENT CONFIG +# ------------------------------------------------ + +# -- MAINNET ------------------------------------- + +[mainnet] +endpoint_url = "${MAINNET_RPC}" + +[mainnet.bool] +is_live = true +bool_array = [true, false] + +[mainnet.address] +weth = "${WETH_MAINNET}" +deps = [ + "0x0000000000000000000000000000000000000000", + "0x1111111111111111111111111111111111111111", +] + +[mainnet.uint] +number = 1234 +number_array = [5678, 9999] + +[mainnet.int] +signed_number = -1234 +signed_number_array = [-5678, 9999] + +[mainnet.bytes32] +word = "0x00000000000000000000000000000000000000000000000000000000000004d2" # 1234 +word_array = [ + "0x000000000000000000000000000000000000000000000000000000000000162e", # 5678 + "0x000000000000000000000000000000000000000000000000000000000000270f", # 9999 +] + +[mainnet.bytes] +b = "0xabcd" +b_array = ["0xdead", "0xbeef"] + +[mainnet.string] +str = "foo" +str_array = ["bar", "baz"] + +# -- OPTIMISM ------------------------------------ + +[optimism] +endpoint_url = "${OPTIMISM_RPC}" + +[optimism.bool] +is_live = false +bool_array = [false, true] + +[optimism.address] +weth = "${WETH_OPTIMISM}" +deps = [ + "0x2222222222222222222222222222222222222222", + "0x3333333333333333333333333333333333333333", +] + +[optimism.uint] +number = 9999 +number_array = [1234, 5678] + +[optimism.int] +signed_number = 9999 +signed_number_array = [-1234, -5678] + +[optimism.bytes32] +word = "0x000000000000000000000000000000000000000000000000000000000000270f" # 9999 +word_array = [ + "0x00000000000000000000000000000000000000000000000000000000000004d2", # 1234 + "0x000000000000000000000000000000000000000000000000000000000000162e", # 5678 +] + +[optimism.bytes] +b = "0xdcba" +b_array = ["0xc0ffee", "0xbabe"] + +[optimism.string] +str = "alice" +str_array = ["bob", "charlie"] diff --git a/dependencies/forge-std-1.16.1/test/fixtures/test.json b/dependencies/forge-std-1.16.1/test/fixtures/test.json new file mode 100644 index 00000000..caebf6d9 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/fixtures/test.json @@ -0,0 +1,8 @@ +{ + "a": 123, + "b": "test", + "c": { + "a": 123, + "b": "test" + } +} \ No newline at end of file diff --git a/dependencies/forge-std-1.16.1/test/fixtures/test.toml b/dependencies/forge-std-1.16.1/test/fixtures/test.toml new file mode 100644 index 00000000..60692bc7 --- /dev/null +++ b/dependencies/forge-std-1.16.1/test/fixtures/test.toml @@ -0,0 +1,6 @@ +a = 123 +b = "test" + +[c] +a = 123 +b = "test" diff --git a/dependencies/rain-factory-0.1.1/LICENSE b/dependencies/rain-factory-0.1.1/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-factory-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-factory-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-factory-0.1.1/README.md b/dependencies/rain-factory-0.1.1/README.md new file mode 100644 index 00000000..862a2288 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/README.md @@ -0,0 +1,64 @@ +# rain.factory + +Docs at https://rainprotocol.github.io/rain.factory + +## Concrete implementations + +`CloneFactory` implements `ICloneableFactoryV2` allowing any +compatible `ICloneableV2` contract to be cloned as an EIP1167 proxy and +initialized. + +## Interfaces + +Contains interfaces for working with Rain factories. + +Rain tooling/ecosystem generally tries to be as agnostic and low friction as +possible on the implementation side. + +The ideal would be that "any" contract can call an interpreter and magically be +supported but there's a lot that can go wrong, for example: + +- Contracts can self destruct or even [redeployed with new bytecode](https://0age.medium.com/the-promise-and-the-peril-of-metamorphic-contracts-9eb8b8413c5e) +- Proxies can point to new implementations and "upgrade" +- Discoverability of ABIs and other metadata subject to indexer limitations + +Falling short of the ideal, we want to support: + +- Ability to (dis)trust contracts at the bytecode level NOT the human/key level +- Support existing patterns such as EIP1167 for clones, etc. +- Avoid introducing Rain-isms as much as possible + +The onchain tooling for analysis is found at https://github.com/rainprotocol/rain.extrospection + +The current interfaces in this repository are for + +- `ICloneableFactoryV2` that is expected to clone proxies from a reference + implementation +- A small interface `ICloneableV2` designed for cloneable proxy contracts to + expose an `initialize` function that the factory can call to act like a + constructor + +### Legacy + +#### `ICloneableV1` + +This version of `ICloneable` did not have any explicit return value on success of +initialize. It is possible for contracts that do not implement `ICloneableV1` to +silently fail to initialize when cloned by an `ICloneableFactoryV1`. + +Newer versions of the interface include an explicit success value and check. + +#### `IFactory` + +The legacy factory model was much more restricted in that each factory +implementation was 1:1 with the thing it was deploying. If you needed a new +contract you also needed to implement a new factory. + +This was suboptimal for several reasons: + +- Increased surface area for things to go wrong +- More Rain-isms creeping in +- Redundant work to maintain a growing list of factories + +The legacy interface is available as `IFactory` but it is NOT RECOMMENDED for +new contracts. \ No newline at end of file diff --git a/dependencies/rain-factory-0.1.1/script/Deploy.sol b/dependencies/rain-factory-0.1.1/script/Deploy.sol new file mode 100644 index 00000000..427f49cf --- /dev/null +++ b/dependencies/rain-factory-0.1.1/script/Deploy.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Script} from "forge-std-1.16.1/src/Script.sol"; +import {CloneFactory} from "../src/concrete/CloneFactory.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; +import {LibCloneFactoryDeploy} from "../src/lib/LibCloneFactoryDeploy.sol"; + +/// @dev Hash of the "clone-factory" deployment suite string. +bytes32 constant DEPLOYMENT_SUITE_CLONE_FACTORY = keccak256("clone-factory"); + +/// @title Deploy +/// @notice A script that deploys a CloneFactory. +contract Deploy is Script { + mapping(string => mapping(address => bytes32)) internal sDepCodeHashes; + + function run() external { + uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); + + bytes32 suite = keccak256(bytes(vm.envOr("DEPLOYMENT_SUITE", string("clone-factory")))); + if (suite == DEPLOYMENT_SUITE_CLONE_FACTORY) { + LibRainDeploy.deployAndBroadcast( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + type(CloneFactory).creationCode, + "src/concrete/CloneFactory.sol:CloneFactory", + LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_ADDRESS, + LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_CODEHASH, + new address[](0), + sDepCodeHashes + ); + } else { + revert( + "Invalid deployment suite specified. Please set the DEPLOYMENT_SUITE environment variable to 'clone-factory'." + ); + } + } +} diff --git a/dependencies/rain-factory-0.1.1/src/concrete/CloneFactory.sol b/dependencies/rain-factory-0.1.1/src/concrete/CloneFactory.sol new file mode 100644 index 00000000..acbbcf7e --- /dev/null +++ b/dependencies/rain-factory-0.1.1/src/concrete/CloneFactory.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {ICloneableV2, ICLONEABLE_V2_SUCCESS} from "../interface/ICloneableV2.sol"; +import {ICloneableFactoryV2} from "../interface/ICloneableFactoryV2.sol"; +import {Clones} from "@openzeppelin-contracts-5.6.1/proxy/Clones.sol"; + +/// Thrown when an implementation has zero code size which is always a mistake. +error ZeroImplementationCodeSize(); + +/// Thrown when initialization fails. +error InitializationFailed(); + +/// @title CloneFactory +/// @notice A fairly minimal implementation of `ICloneableFactoryV2` +/// that uses Open Zeppelin `Clones` to create EIP1167 clones of a reference +/// bytecode. The reference bytecode MUST implement `ICloneableV2`. +contract CloneFactory is ICloneableFactoryV2 { + /// @inheritdoc ICloneableFactoryV2 + function clone(address implementation, bytes calldata data) external returns (address) { + // Explicitly check that the implementation has code. This is a common + // mistake that will cause the clone to fail. Notably this catches the + // case of address(0). This check is not strictly necessary as a zero + // sized implementation will fail to initialize the child, but it gives + // a better error message. + if (implementation.code.length == 0) { + revert ZeroImplementationCodeSize(); + } + // Standard Open Zeppelin clone here. + address child = Clones.clone(implementation); + // NewClone does NOT include the data passed to initialize. + // The implementation is responsible for emitting a data event if it + // wants. + emit NewClone(msg.sender, implementation, child); + // Checking the return value of initialize is mandatory as per + // ICloneableFactoryV2. + if (ICloneableV2(child).initialize(data) != ICLONEABLE_V2_SUCCESS) { + revert InitializationFailed(); + } + return child; + } +} diff --git a/dependencies/rain-factory-0.1.1/src/interface/ICloneableFactoryV2.sol b/dependencies/rain-factory-0.1.1/src/interface/ICloneableFactoryV2.sol new file mode 100644 index 00000000..188b8660 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/src/interface/ICloneableFactoryV2.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +/// @title ICloneableFactoryV2 +/// @notice A minimal interface to create proxy clones of a reference bytecode +/// and emit events so that indexers can discover it. `ICloneableFactoryV2` knows +/// nothing about the contracts that it clones, instead relying only on the +/// minimal `ICloneableV2` interface being implemented on the reference bytecode. +interface ICloneableFactoryV2 { + /// Emitted upon each `clone`. + /// @param sender The `msg.sender` that called `clone`. + /// @param implementation The reference bytecode to clone as a proxy. + /// @param clone The address of the new proxy contract. + event NewClone(address sender, address implementation, address clone); + + /// Clones an implementation using a proxy. EIP1167 proxy is recommended but + /// the exact cloning procedure is not specified by this interface. + /// + /// The factory MUST call `ICloneableV2.initialize` atomically with the + /// cloning process and MUST NOT call any other functions on the cloned proxy + /// before `initialize` completes successfully. The factory MUST ONLY + /// consider the clone to be successfully created if `initialize` returns the + /// keccak256 hash of the string "ICloneableV2.initialize". + /// + /// MUST emit `NewClone` with the implementation and clone address. + /// + /// @param implementation The contract to clone. + /// @param data As per `ICloneableV2`. + /// @return New child contract address. + function clone(address implementation, bytes calldata data) external returns (address); +} diff --git a/dependencies/rain-factory-0.1.1/src/interface/ICloneableV2.sol b/dependencies/rain-factory-0.1.1/src/interface/ICloneableV2.sol new file mode 100644 index 00000000..472123ee --- /dev/null +++ b/dependencies/rain-factory-0.1.1/src/interface/ICloneableV2.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +/// @dev This hash MUST be returned when an `ICloneableV2` is successfully +/// initialized. +bytes32 constant ICLONEABLE_V2_SUCCESS = keccak256("ICloneableV2.initialize"); + +/// @title ICloneableV2 +/// @notice Interface for cloneable contracts that support initialization. +interface ICloneableV2 { + /// Overloaded initialize function MUST revert with this error. + error InitializeSignatureFn(); + + /// Initialize is intended to work like constructors but for cloneable + /// proxies. The `ICloneableV2` contract MUST ensure that initialize can NOT + /// be called more than once. The `ICloneableV2` contract is designed to be + /// deployed by an `ICloneableFactoryV2` but MUST NOT assume that it will be. + /// It is possible for someone to directly deploy an `ICloneableV2` and fail + /// to call initialize before other functions are called, and end users MAY + /// NOT realise or know how to confirm a safe deployment state. The + /// `ICloneableV2` MUST take appropriate measures to ensure that functions + /// called before initialize are safe to do so, or revert. + /// + /// To be fully generic, `initilize` accepts `bytes` and so MUST ABI decode + /// within the initialize function. This allows a single factory to service + /// arbitrary cloneable proxies but also erases the type of the + /// initialization config from the ABI. As tooling will inevitably require + /// the ABI to be known, it is RECOMMENDED that the `ICloneableV2` contract + /// implements a typed `initialize` function that overloads the generic + /// `initialize(bytes)` function. This overloaded function MUST revert with + /// `InitializeSignatureFn` always, so that it is NEVER accidentally called. + /// This avoids complex and expensive delegate call style patterns where a + /// typed overload has to call back to itself and preserve the sender, + /// instead we force the caller to know the correct signature and call the + /// correct function directly with encoded bytes. + /// + /// If initialization is successful the `ICloneableV2` MUST return the + /// keccak256 hash of the string "ICloneableV2.initialize". This avoids false + /// positives where a contract building a proxy, such as an + /// `ICloneableFactoryV2`, may incorrectly believe that the clone has been + /// initialized but the implementation doesn't support `ICloneableV2`. + /// + /// @dev The `ICloneableV2` interface is identical to `ICloneableV1` except + /// that it returns a `bytes32` success hash. + /// @param data The initialization data. + /// @return success keccak256("ICloneableV2.initialize") if successful. + function initialize(bytes calldata data) external returns (bytes32 success); +} diff --git a/dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableFactoryV1.sol b/dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableFactoryV1.sol new file mode 100644 index 00000000..0c4f2214 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableFactoryV1.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +/// @title ICloneableFactoryV1 +/// @notice A minimal interface to create proxy clones of a reference bytecode +/// and emit events so that indexers can discover it. `ICloneableFactoryV1` knows +/// nothing about the contracts that it clones, instead relying only on the +/// minimal `ICloneableV1` interface being implemented on the reference bytecode. +interface ICloneableFactoryV1 { + /// Emitted upon each `clone`. + /// @param sender The `msg.sender` that called `clone`. + /// @param implementation The reference bytecode to clone as a proxy. + /// @param clone The address of the new proxy contract. + event NewClone(address sender, address implementation, address clone); + + /// Clones an implementation using a proxy. EIP1167 proxy as used by Open + /// Zeppelin is recommended but the exact cloning procedure is not specified + /// by this interface. The factory MUST call `ICloneableV1.initialize` + /// atomically with the cloning process and MUST NOT call any other functions + /// on the cloned proxy before initialize completes successfully. If the + /// initialize reverts then the `clone` MUST revert. + /// MUST emit `NewClone` with the implementation and clone address. + /// @param implementation The contract to clone. + /// @param data As per `ICloneableV1`. + /// @return New child contract address. + function clone(address implementation, bytes calldata data) external returns (address); +} diff --git a/dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableV1.sol b/dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableV1.sol new file mode 100644 index 00000000..b0162586 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/src/interface/deprecated/ICloneableV1.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +/// @title ICloneableV1 +/// @notice Minimal interface following the Open Zeppelin conventions for +/// initializing a cloned proxy. +interface ICloneableV1 { + /// Initialize is intended to work like constructors but for cloneable + /// proxies. The `ICloneableV1` contract MUST ensure that initialize can NOT + /// be called more than once. The `ICloneableV1` contract is designed to be + /// deployed by an `ICloneFactoryV1` but MUST NOT assume that it will be. It + /// is possible for someone to directly deploy an `ICloneableV1` and fail to + /// call initialize before other functions are called, and end users MAY NOT + /// realise or know how to confirm a safe deployment state. The + /// `ICloneableV1` MUST take appropriate measures to ensure that functions + /// called before initialize are safe to do so, or revert. + /// + /// To be fully generic `initilize` accepts `bytes` and so MUST ABI decode + /// within the initialize function. This allows the factory to service + /// arbitrary cloneable proxies but also erases the type of the + /// initialization config from the ABI. One workaround is to emit an event + /// containing the initialization config type, so that the type appears + /// within the event and therefore the ABI. + /// @param data The initialization data. + function initialize(bytes calldata data) external; +} diff --git a/dependencies/rain-factory-0.1.1/src/interface/deprecated/IFactory.sol b/dependencies/rain-factory-0.1.1/src/interface/deprecated/IFactory.sol new file mode 100644 index 00000000..feee2503 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/src/interface/deprecated/IFactory.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +interface IFactory { + /// Whenever a new child contract is deployed, a `NewChild` event + /// containing the new child contract address MUST be emitted. + /// @param sender `msg.sender` that deployed the contract (factory). + /// @param child address of the newly deployed child. + event NewChild(address sender, address child); + + /// Factories that clone a template contract MUST emit an event any time + /// they set the implementation being cloned. Factories that deploy new + /// contracts without cloning do NOT need to emit this. + /// @param sender `msg.sender` that deployed the implementation (factory). + /// @param implementation address of the implementation contract that will + /// be used for future clones if relevant. + event Implementation(address sender, address implementation); + + /// Creates a new child contract. + /// + /// @param data Domain specific data for the child contract constructor. + /// @return New child contract address. + function createChild(bytes calldata data) external returns (address); + + /// Checks if address is registered as a child contract of this factory. + /// + /// Addresses that were not deployed by `createChild` MUST NOT return + /// `true` from `isChild`. This is CRITICAL to the security guarantees for + /// any contract implementing `IFactory`. + /// + /// @param maybeChild Address to check registration for. + /// @return `true` if address was deployed by this contract factory, + /// otherwise `false`. + function isChild(address maybeChild) external view returns (bool); +} diff --git a/dependencies/rain-factory-0.1.1/src/lib/LibCloneFactoryDeploy.sol b/dependencies/rain-factory-0.1.1/src/lib/LibCloneFactoryDeploy.sol new file mode 100644 index 00000000..39ebbbed --- /dev/null +++ b/dependencies/rain-factory-0.1.1/src/lib/LibCloneFactoryDeploy.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @title LibCloneFactoryDeploy +/// A library containing the deployed address and code hash of the CloneFactory +/// contract when deployed with the rain standard zoltu deployer. This allows +/// idempotent deployments against precommitted addresses and hashes that can be +/// easily verified automatically in tests and scripts rather than relying on +/// registries or manual verification. +library LibCloneFactoryDeploy { + /// The address of the `CloneFactory` contract when deployed with the rain + /// standard zoltu deployer. + address constant CLONE_FACTORY_DEPLOYED_ADDRESS = address(0x444acC29d63fa643E8adCC35FD9aa6DE111dCb39); + + /// The code hash of the `CloneFactory` contract when deployed with the rain + /// standard zoltu deployer. This can be used to verify that the deployed + /// contract has the expected bytecode, which provides stronger guarantees + /// than just checking the address. + bytes32 constant CLONE_FACTORY_DEPLOYED_CODEHASH = + bytes32(0xf21b813c7075a1621285df3a8369d0652c31ea80cb807be1aaadafeecd134475); +} diff --git a/dependencies/rain-factory-0.1.1/test/src/concrete/CloneFactory.t.sol b/dependencies/rain-factory-0.1.1/test/src/concrete/CloneFactory.t.sol new file mode 100644 index 00000000..d54a3944 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/test/src/concrete/CloneFactory.t.sol @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test, Vm} from "forge-std-1.16.1/src/Test.sol"; + +import {LibExtrospectERC1167Proxy} from "rain-extrospection-0.1.0/src/lib/LibExtrospectERC1167Proxy.sol"; +import {ICloneableV2, ICLONEABLE_V2_SUCCESS} from "../../../src/interface/ICloneableV2.sol"; +import {CloneFactory, ZeroImplementationCodeSize, InitializationFailed} from "../../../src/concrete/CloneFactory.sol"; + +/// @title TestCloneable +/// @notice A cloneable contract that implements `ICloneableV2`. Initializes +/// whatever data is passed to `initialize` as `sData`. As `sData` is public, +/// we can easily test that it is set correctly. +contract TestCloneable is ICloneableV2 { + bytes public sData; + + /// @inheritdoc ICloneableV2 + function initialize(bytes memory data) external returns (bytes32) { + sData = data; + return ICLONEABLE_V2_SUCCESS; + } +} + +/// @title TestCloneableFailure +/// @notice A cloneable contract that implements `ICloneableV2` but always +/// fails initialization. Specifically, it returns whatever data is passed to +/// `initialize`, which is expected NOT to be `ICLONEABLE_V2_SUCCESS` for the +/// purposes of testing. +contract TestCloneableFailure is ICloneableV2 { + /// @inheritdoc ICloneableV2 + function initialize(bytes memory data) external pure returns (bytes32 notSuccess) { + (notSuccess) = abi.decode(data, (bytes32)); + } +} + +/// @title CloneFactoryCloneTest +/// @notice A test suite for `CloneFactory` that tests the `clone` function. +contract CloneFactoryCloneTest is Test { + /// The `CloneFactory` instance under test. As `CloneFactory` is + /// stateless, we can reuse the same instance for all tests. + CloneFactory internal immutable I_CLONE_FACTORY; + + /// Construct a new `CloneFactory` instance for testing. + constructor() { + I_CLONE_FACTORY = new CloneFactory(); + } + + /// The bytecode of the implementation contract is irrelevant to the child. + /// The child will always have the same bytecode, which is the EIP1167 proxy + /// standard, including the implementation address. + function testCloneBytecode(bytes memory data) external { + TestCloneable implementation = new TestCloneable(); + + address child = I_CLONE_FACTORY.clone(address(implementation), data); + + (bool result, address proxyImplementation) = LibExtrospectERC1167Proxy.isERC1167Proxy(child.code); + assertEq(result, true); + assertEq(proxyImplementation, address(implementation)); + } + + /// The child should be initialized with the data passed to `clone`. + function testCloneInitializeData(bytes memory data) external { + TestCloneable implementation = new TestCloneable(); + + address child = I_CLONE_FACTORY.clone(address(implementation), data); + assertEq(TestCloneable(child).sData(), data); + } + + /// The clone factory should emit a `NewClone` event including the address + /// of the newly cloned child. + function testCloneInitializeEvent(bytes memory data) external { + TestCloneable implementation = new TestCloneable(); + + vm.recordLogs(); + address child = I_CLONE_FACTORY.clone(address(implementation), data); + Vm.Log[] memory entries = vm.getRecordedLogs(); + + assertEq(entries.length, 1); + assertEq(entries[0].topics[0], bytes32(uint256(keccak256("NewClone(address,address,address)")))); + assertEq(entries[0].data, abi.encode(address(this), address(implementation), child)); + } + + /// If the implementation is uninitializable as a cloned child then this is + /// always an error. A bare `vm.expectRevert()` is used here intentionally + /// because the fuzzed implementation address could fail for several + /// different reasons (zero code size, missing initialize function, + /// initialize reverting, etc.) and we cannot predict which error will be + /// thrown. The purpose of this test is to confirm that cloning an arbitrary + /// address always reverts, regardless of the specific reason. More specific + /// error paths are tested individually by the other test functions. + function testCloneUninitializableFails(address implementation, bytes memory data) external { + vm.expectRevert(); + I_CLONE_FACTORY.clone(implementation, data); + } + + /// In the case an implementation is initialized but returns a failure code, + /// we should revert with `InitializationFailed`. + function testCloneInitializeFailureFails(bytes32 notSuccess) external { + vm.assume(notSuccess != ICLONEABLE_V2_SUCCESS); + TestCloneableFailure implementation = new TestCloneableFailure(); + + vm.expectRevert(abi.encodeWithSelector(InitializationFailed.selector)); + I_CLONE_FACTORY.clone(address(implementation), abi.encode(notSuccess)); + } + + /// If the implementation has zero code size then this is always an error. + function testZeroImplementationCodeSizeError(address implementation, bytes memory data) external { + vm.assume(implementation.code.length == 0); + vm.expectRevert(abi.encodeWithSelector(ZeroImplementationCodeSize.selector)); + I_CLONE_FACTORY.clone(implementation, data); + } +} diff --git a/dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeploy.t.sol b/dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeploy.t.sol new file mode 100644 index 00000000..f071a932 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeploy.t.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; +import {LibCloneFactoryDeploy} from "../../../src/lib/LibCloneFactoryDeploy.sol"; +import {CloneFactory} from "../../../src/concrete/CloneFactory.sol"; + +contract LibCloneFactoryDeployTest is Test { + function testDeployAddress() external { + LibRainDeploy.etchZoltuFactory(vm); + + address deployedAddress = LibRainDeploy.deployZoltu(type(CloneFactory).creationCode); + + assertEq(deployedAddress, LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_ADDRESS); + assertTrue(address(deployedAddress).code.length > 0, "Deployed address has no code"); + + assertEq(address(deployedAddress).codehash, LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_CODEHASH); + } + + function testExpectedCodeHash() external { + CloneFactory cloneFactory = new CloneFactory(); + + assertEq(address(cloneFactory).codehash, LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_CODEHASH); + } +} diff --git a/dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeployProd.t.sol b/dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeployProd.t.sol new file mode 100644 index 00000000..27858133 --- /dev/null +++ b/dependencies/rain-factory-0.1.1/test/src/lib/LibCloneFactoryDeployProd.t.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; +import {LibCloneFactoryDeploy} from "../../../src/lib/LibCloneFactoryDeploy.sol"; + +/// @title LibCloneFactoryDeployProdTest +/// @notice Forks each supported network and verifies that CloneFactory is +/// deployed at the expected address with the expected codehash. +contract LibCloneFactoryDeployProdTest is Test { + function _checkAllContracts() internal view { + assertTrue(LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_ADDRESS.code.length > 0, "CloneFactory not deployed"); + assertEq( + LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_ADDRESS.codehash, + LibCloneFactoryDeploy.CLONE_FACTORY_DEPLOYED_CODEHASH + ); + } + + /// CloneFactory MUST be deployed on Arbitrum. + function testProdDeployArbitrum() external { + vm.createSelectFork(LibRainDeploy.ARBITRUM_ONE); + _checkAllContracts(); + } + + /// CloneFactory MUST be deployed on Base. + function testProdDeployBase() external { + vm.createSelectFork(LibRainDeploy.BASE); + _checkAllContracts(); + } + + /// CloneFactory MUST be deployed on Base Sepolia. + function testProdDeployBaseSepolia() external { + vm.createSelectFork(LibRainDeploy.BASE_SEPOLIA); + _checkAllContracts(); + } + + /// CloneFactory MUST be deployed on Flare. + function testProdDeployFlare() external { + vm.createSelectFork(LibRainDeploy.FLARE); + _checkAllContracts(); + } + + /// CloneFactory MUST be deployed on Polygon. + function testProdDeployPolygon() external { + vm.createSelectFork(LibRainDeploy.POLYGON); + _checkAllContracts(); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/LICENSE b/dependencies/rain-interpreter-interface-0.1.0/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-interpreter-interface-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-interpreter-interface-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-interpreter-interface-0.1.0/README.md b/dependencies/rain-interpreter-interface-0.1.0/README.md new file mode 100644 index 00000000..31fbf316 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/README.md @@ -0,0 +1,50 @@ +# rain.interpreter.interface + +## High level + +Interfaces for the Rainlang interpreter and tooling for implementing these +interfaces. + +## Dev stuff + +### Local environment & CI + +Uses Nix. + +Install Nix - https://nixos.org/download.html. + +Run `nix develop` in this repo to drop into the shell. Please ONLY use the nix +version of `foundry` for development, to ensure versions are all compatible. + +Read the `flake.nix` file to find some additional commands included for dev and +CI usage. + +## Legal stuff + +Everything is under DecentraLicense 1.0 (DCL-1.0) which can be found in `LICENSES/`. + +This is basically `CAL-1.0` which is an open source license +https://opensource.org/license/cal-1-0 + +The non-legal summary of DCL-1.0 is that the source is open, as expected, but +also user data in the systems that this code runs on must also be made available +to those users as relevant, and that private keys remain private. + +Roughly it's "not your keys, not your coins" aware, as close as we could get in +legalese. + +This is the default situation on permissionless blockchains, so shouldn't require +any additional effort by dev-users to adhere to the license terms. + +This repo is REUSE 3.2 compliant https://reuse.software/spec-3.2/ and compatible +with `reuse` tooling (also available in the nix shell here). + +``` +nix develop -c rainix-sol-legal +``` + +## Contributions + +Contributions are welcome **under the same license** as above. + +Contributors agree and warrant that their contributions are compliant. \ No newline at end of file diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrBytecode.sol b/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrBytecode.sol new file mode 100644 index 00000000..08590de9 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrBytecode.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// Thrown when a bytecode source index is out of bounds. +/// @param sourceIndex The source index that was out of bounds. +/// @param bytecode The bytecode that was inspected. +error SourceIndexOutOfBounds(uint256 sourceIndex, bytes bytecode); + +/// Thrown when a bytecode reports itself as 0 sources but has more than 1 byte. +/// @param bytecode The bytecode that was inspected. +error UnexpectedSources(bytes bytecode); + +/// Thrown when bytes are discovered between the offsets and the sources. +/// @param bytecode The bytecode that was inspected. +error UnexpectedTrailingOffsetBytes(bytes bytecode); + +/// Thrown when the end of a source as self reported by its header doesnt match +/// the start of the next source or the end of the bytecode. +/// @param bytecode The bytecode that was inspected. +error TruncatedSource(bytes bytecode); + +/// Thrown when the offset to a source points to a location that cannot fit a +/// header before the start of the next source or the end of the bytecode. +/// @param bytecode The bytecode that was inspected. +error TruncatedHeader(bytes bytecode); + +/// Thrown when the bytecode is truncated before the end of the header offsets. +/// @param bytecode The bytecode that was inspected. +error TruncatedHeaderOffsets(bytes bytecode); + +/// Thrown when the stack sizings, allocation, inputs and outputs, are not +/// monotonically increasing. +/// @param bytecode The bytecode that was inspected. +/// @param relativeOffset The relative offset of the source that was inspected. +error StackSizingsNotMonotonic(bytes bytecode, uint256 relativeOffset); diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrExtern.sol b/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrExtern.sol new file mode 100644 index 00000000..698db973 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrExtern.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// Thrown when the extern interface is not supported. +/// @param extern The address that does not implement the extern interface. +error NotAnExternContract(address extern); + +/// Thrown by the extern contract at runtime when the inputs don't match the +/// expected inputs. +/// @param expected The expected number of inputs. +/// @param actual The actual number of inputs. +error BadInputs(uint256 expected, uint256 actual); diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrIntegrity.sol b/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrIntegrity.sol new file mode 100644 index 00000000..9c38980a --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/error/ErrIntegrity.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// The bytecode and integrity function disagree on number of inputs. +/// @param opIndex The index of the operation in question. +/// @param calculatedInputs The number of inputs calculated by the integrity function. +/// @param bytecodeInputs The number of inputs in the bytecode. +error BadOpInputsLength(uint256 opIndex, uint256 calculatedInputs, uint256 bytecodeInputs); + +/// The bytecode and integrity function disagree on number of outputs. +/// @param opIndex The index of the operation in question. +/// @param calculatedOutputs The number of outputs calculated by the integrity function. +/// @param bytecodeOutputs The number of outputs in the bytecode. +error BadOpOutputsLength(uint256 opIndex, uint256 calculatedOutputs, uint256 bytecodeOutputs); diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterCallerV4.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterCallerV4.sol new file mode 100644 index 00000000..7ba549f4 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterCallerV4.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {IParserV2} from "./IParserV2.sol"; +import {IInterpreterStoreV3} from "./IInterpreterStoreV3.sol"; +import {IInterpreterV4} from "./IInterpreterV4.sol"; +import { + + // Exported for convenience. + //forge-lint: disable-start(unused-import) + SignedContextV1, + SIGNED_CONTEXT_SIGNER_OFFSET, + SIGNED_CONTEXT_CONTEXT_OFFSET, + SIGNED_CONTEXT_SIGNATURE_OFFSET +} from "./deprecated/v2/IInterpreterCallerV3.sol"; + +//forge-lint: disable-end + +/// @param interpreter Will evaluate the expression. Callers MUST NOT use an +/// `EvaluableV4` with a zero or untrusted interpreter address. +/// @param store Will store state changes due to evaluation of the expression. +/// MAY be `address(0)` only if the expression never writes state. +/// @param bytecode Will be evaluated by the interpreter. +struct EvaluableV4 { + IInterpreterV4 interpreter; + IInterpreterStoreV3 store; + bytes bytecode; +} + +/// @title IInterpreterCallerV4 +/// @notice A contract that calls an `IInterpreterV4` via. `eval4`. There are +/// near zero requirements on a caller other than: +/// +/// - Provide the context, which can be built in a standard way by `LibContext` +/// - Handle the stack array returned from `eval4` +/// - OPTIONALLY emit the `Context` event +/// - OPTIONALLY set state on the associated `IInterpreterStoreV3`. +interface IInterpreterCallerV4 { + /// Calling contracts SHOULD emit `Context` before calling `eval4` if they + /// are able. Notably `eval4` MAY be called within a static call which means + /// that events cannot be emitted, in which case this does not apply. It MAY + /// NOT be useful to emit this multiple times for several eval calls if they + /// all share a common context, in which case a single emit is sufficient. + /// @param sender `msg.sender` building the context. + /// @param context The context that was built. + event ContextV2(address sender, bytes32[][] context); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterExternV4.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterExternV4.sol new file mode 100644 index 00000000..a637ac4b --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterExternV4.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {StackItem} from "./IInterpreterV4.sol"; + +type EncodedExternDispatchV2 is bytes32; + +type ExternDispatchV2 is bytes32; + +/// @title IInterpreterExternV4 +/// Handle a single dispatch from some calling contract with an array of +/// inputs and array of outputs. Ostensibly useful to build "word packs" for +/// `IInterpreterV4` so that less frequently used words can be provided in +/// a less efficient format, but without bloating the base interpreter in +/// terms of code size. Effectively allows unlimited words to exist as externs +/// alongside interpreters. +/// +/// The difference between V3 and V4 is that V4 uses the `bytes32` type rather +/// than `uint256` for better binary/numeric clarity. +interface IInterpreterExternV4 { + /// Checks the integrity of some extern call. Called during parsing/bytecode + /// building, NOT at eval runtime. + /// @param dispatch Encoded information about the extern to dispatch. + /// Analogous to the opcode/operand in the interpreter. + /// @param expectedInputs The number of inputs expected for the dispatched + /// logic. + /// @param expectedOutputs The number of outputs expected for the dispatched + /// logic. + /// @return actualInputs The actual number of inputs for the dispatched + /// logic. + /// @return actualOutputs The actual number of outputs for the dispatched + /// logic. + function externIntegrity(ExternDispatchV2 dispatch, uint256 expectedInputs, uint256 expectedOutputs) + external + view + returns (uint256 actualInputs, uint256 actualOutputs); + + /// Handles a single dispatch. + /// @param dispatch Encoded information about the extern to dispatch. + /// Analogous to the opcode/operand in the interpreter. + /// @param inputs The array of inputs for the dispatched logic. + /// @return outputs The result of the dispatched logic. + function extern(ExternDispatchV2 dispatch, StackItem[] calldata inputs) + external + view + returns (StackItem[] calldata outputs); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterStoreV3.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterStoreV3.sol new file mode 100644 index 00000000..fc568682 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterStoreV3.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {StateNamespace, FullyQualifiedNamespace, NO_STORE} from "./deprecated/v2/IInterpreterStoreV2.sol"; + +/// @title IInterpreterStoreV3 +/// @notice Tracks state changes on behalf of an interpreter. A single store can +/// handle state changes for many calling contracts, many interpreters and many +/// expressions. The store is responsible for ensuring that applying these state +/// changes is safe from key collisions with calls to `set` from different +/// `msg.sender` callers. I.e. it MUST NOT be possible for a caller to modify the +/// state changes associated with some other caller. +/// +/// The store defines the shape of its own state changes, which is opaque to the +/// calling contract. For example, some store may treat the list of state changes +/// as a pairwise key/value set, and some other store may treat it as a literal +/// list to be stored as-is. +/// +/// Each interpreter decides for itself which store to use based on the +/// compatibility of its own opcodes. +/// +/// The store MUST assume the state changes have been corrupted by the calling +/// contract due to bugs or malicious intent, and enforce state isolation between +/// callers despite arbitrarily invalid state changes. The store MUST revert if +/// it can detect invalid state changes, such as a key/value list having an odd +/// number of items, but this MAY NOT be possible if the corruption is +/// undetectable. +interface IInterpreterStoreV3 { + /// MUST be emitted by the store on `set` to its internal storage. + /// @param namespace The fully qualified namespace that the store is setting. + /// @param key The key that the store is setting. + /// @param value The value that the store is setting. + event Set(FullyQualifiedNamespace namespace, bytes32 key, bytes32 value); + + /// Mutates the interpreter store in bulk. The bulk values are provided in + /// the form of a `bytes32[]` which can be treated e.g. as pairwise keys and + /// values to be stored in a Solidity mapping. The `IInterpreterStoreV3` + /// defines the meaning of the `bytes32[]` for its own storage logic. + /// + /// @param namespace The unqualified namespace for the set that MUST be + /// fully qualified by the `IInterpreterStoreV3` to prevent key collisions + /// between callers. The fully qualified namespace forms a compound key with + /// the keys for each value to set. + /// @param kvs The list of changes to apply to the store's internal state. + function set(StateNamespace namespace, bytes32[] calldata kvs) external; + + /// Given a fully qualified namespace and key, return the associated value. + /// Ostensibly the interpreter can use this to implement opcodes that read + /// previously set values. The interpreter MUST apply the same qualification + /// logic as the store that it uses to guarantee consistent round tripping of + /// data and prevent malicious behaviours. Technically also allows onchain + /// reads of any set value from any contract, not just interpreters, but in + /// this case readers MUST be aware and handle inconsistencies between get + /// and set while the state changes are still in memory in the calling + /// context and haven't yet been persisted to the store. + /// + /// `IInterpreterStoreV3` uses the same fallback behaviour for unset keys as + /// Solidity. Specifically, any UNSET VALUES SILENTLY FALLBACK TO `0`. + /// @param namespace The fully qualified namespace to get a single value for. + /// @param key The key to get the value for within the namespace. + /// @return The value OR ZERO IF NOT SET. + function get(FullyQualifiedNamespace namespace, bytes32 key) external view returns (bytes32); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterV4.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterV4.sol new file mode 100644 index 00000000..adcb68de --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IInterpreterV4.sol @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import { + FullyQualifiedNamespace, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + StateNamespace, + SourceIndexV2, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + DEFAULT_STATE_NAMESPACE, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_CONSTANT, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_CONTEXT, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_EXTERN, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_UNKNOWN, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_STACK +} from "./deprecated/v2/IInterpreterV3.sol"; +import {IInterpreterStoreV3} from "./IInterpreterStoreV3.sol"; + +/// @dev Operand for an opcode in the interpreter. Encoded as `bytes32` to +/// allow opcode-specific interpretation of the full 32-byte value. +type OperandV2 is bytes32; + +/// @dev A single item on the interpreter stack. Encoded as `bytes32` to hold +/// arbitrary 32-byte values, including packed Rain decimal floats. +type StackItem is bytes32; + +/// @dev Parameters for a single evaluation of Rainlang bytecode. +/// @param store The store to read/write state from/to. +/// @param namespace The fully qualified namespace for state reads during eval. +/// The interpreter MUST qualify this namespace itself using +/// `LibNamespace.qualifyNamespace` with `msg.sender`. Implementations MUST NOT +/// trust caller-provided values as pre-qualified — the type name is descriptive +/// of the output, not an assertion about the input. +/// @param bytecode The Rainlang bytecode to evaluate. +/// @param sourceIndex The index of the source within the bytecode to evaluate. +/// @param context The context matrix available to the evaluated logic. +/// @param inputs Pre-populated stack items available to the evaluated logic. +/// @param stateOverlay State overrides applied before evaluation for "what if" +/// analysis. Format is implementation-defined (e.g. pairwise key/value). +/// WARNING: Callers that pass a non-empty overlay and then apply the resulting +/// `writes` to the store may produce unexpected state. +struct EvalV4 { + IInterpreterStoreV3 store; + FullyQualifiedNamespace namespace; + bytes bytecode; + SourceIndexV2 sourceIndex; + bytes32[][] context; + StackItem[] inputs; + bytes32[] stateOverlay; +} + +/// @title IInterpreterV4 +/// @notice Interface into a standard interpreter that supports: +/// +/// - evaluating Rainlang logic provided as rain bytecode in calldata +/// - receiving arbitrary `bytes32[][]` supporting context to be made available +/// to the evaluated logic via. context aware opcodes +/// - receiving arbitrary `bytes32[]` inputs to be made available to the +/// evaluated logic as prepoluated stack items +/// - receiving arbitrary `bytes32[]` stateOverlay to be applied to the +/// state before evaluation to facilitate "what if" analysis +/// - handling subsequent state changes in bulk in response to evaluated logic +/// - namespacing state changes according to the caller's preferences to avoid +/// unwanted key collisions +/// +/// The interface is designed to be stable across many versions and +/// implementations of an interpreter, balancing minimalism with features +/// required for a general purpose onchain interpreted compute environment. +/// +/// The security model of an interpreter is that it MUST be resilient to +/// malicious expressions even if they dispatch arbitrary internal function +/// pointers during an eval. The interpreter MAY return garbage or exhibit +/// undefined behaviour or error during an eval, _provided that no state changes +/// are persisted_ e.g. in storage, such that only the caller that specifies the +/// malicious expression can be negatively impacted by the result. In turn, the +/// caller must guard itself against arbitrarily corrupt/malicious reverts and +/// return values from any interpreter that it requests an expression from. And +/// so on and so forth up to the externally owned account (EOA) who signs the +/// transaction and agrees to a specific combination of contracts, expressions +/// and interpreters, who can presumably make an informed decision about which +/// to trust. +/// +/// The state of an interpreter is expected to be stored in a store that is +/// passed in as a parameter to the eval function. `eval4` will return the +/// writes that are to be applied to the store after the evaluation is complete. +/// The caller is responsible for applying these writes to the store, and is +/// expected to pass them as-is. +interface IInterpreterV4 { + /// Rainlang magic happens here. + /// + /// Pass Rainlang bytecode in calldata, and get back the stack and storage + /// writes. + /// + /// Implementations SHOULD validate bytecode structure (e.g. via + /// `LibBytecode.checkNoOOBPointers`) before execution. + /// + /// Key differences in `eval4`: + /// - Supports state overlays to facilitate "what if" analysis. Each item + /// of state in the overlay will override corresponding gets from the store + /// unless/until they are set to something else in the evaluated logic. + /// - Numbers are treated as packed Rain decimal floats, NOT fixed point + /// decimals. + /// @param eval The eval configuration specifying bytecode, store, namespace, + /// context, inputs, and state overlay. + /// @return stack The output stack items from evaluating the specified source. + /// @return writes Key-value pairs to be applied to the store by the caller. + function eval4(EvalV4 calldata eval) external view returns (StackItem[] calldata stack, bytes32[] calldata writes); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserPragmaV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserPragmaV1.sol new file mode 100644 index 00000000..bc2ee9fc --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserPragmaV1.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +/// @dev Pragma configuration for a parser. +/// @param usingWordsFrom Addresses of sub-parser contracts whose words should +/// be available during parsing. Implementations SHOULD validate entries +/// (reject zero addresses, handle duplicates). +struct PragmaV1 { + address[] usingWordsFrom; +} + +/// @title IParserPragmaV1 +/// @notice Interface for extracting pragma directives from Rainlang source. +interface IParserPragmaV1 { + /// Parses pragma directives from Rainlang source data. + /// @param data The Rainlang source to extract pragmas from. + /// @return The parsed pragma containing any `usingWordsFrom` addresses. + function parsePragma1(bytes calldata data) external view returns (PragmaV1 calldata); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserV2.sol new file mode 100644 index 00000000..690297d9 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/IParserV2.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Reexport AuthoringMetaV2 for downstream use. +//forge-lint: disable-next-line(unused-import) +import {AuthoringMetaV2} from "./deprecated/v1/IParserV1.sol"; + +/// @title IParserV2 +/// @notice Interface for parsing Rainlang source into interpreter bytecode. +interface IParserV2 { + /// Parses Rainlang source data into bytecode compatible with + /// `IInterpreterV4.eval4`. MUST revert if the input is not valid Rainlang. + /// @param data The Rainlang source to parse. + /// @return bytecode The compiled bytecode ready for evaluation. + function parse2(bytes calldata data) external view returns (bytes calldata bytecode); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/ISubParserV4.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/ISubParserV4.sol new file mode 100644 index 00000000..cea444cb --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/ISubParserV4.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Reexports for implementations to use. +//forge-lint: disable-next-line(unused-import) +import {AuthoringMetaV2} from "./deprecated/v2/ISubParserV3.sol"; +//forge-lint: disable-next-line(unused-import) +import {OperandV2} from "./IInterpreterV4.sol"; + +/// @title ISubParserV4 +/// Identical to `ISubParserV3` except the interface functions are versioned +/// rather than using compatibility versions. +/// +/// The data layout is identical to `COMPATIBILITY_V5` from `ISubParserV3`, +/// except that parsed values are `bytes32` to better represent that they are NOT +/// expected to be used as integers (most likely packed float values). +interface ISubParserV4 { + /// The sub parser is being asked to attempt to parse a literal that the main + /// parser has failed to parse. It is expected that the main parser will + /// attempt multiple sub parsers in order to parse a literal, so the sub + /// parser MUST NOT revert if it does not know how to parse the literal, as + /// some other sub parser may be able to parse it. The sub parser MUST return + /// false if it does not know how to parse the literal, and MUST return true + /// if it does know how to parse the literal, as well as the value of the + /// literal. + /// + /// If the sub parser knows how to parse some literal, but the data is + /// malformed, the sub parser MUST revert. + /// + /// Literal parsing is the process of taking a sequence of bytes and + /// converting it into a value that is known at compile time. + /// + /// @param data The data that represents the literal. The structure of this + /// is defined by the conventions for the compatibility version. + /// @return success Whether the sub parser knows how to parse the literal. + /// If the sub parser does know how to handle the literal but cannot due to + /// malformed data, or some other reason, it MUST revert. + /// @return value The value of the literal. + function subParseLiteral2(bytes calldata data) external view returns (bool success, bytes32 value); + + /// The sub parser is being asked to attempt to parse a word that the main + /// parser has failed to parse. It is expected that the main parser will + /// attempt multiple sub parsers in order to parse a word, so the sub parser + /// MUST NOT revert if it does not know how to parse the word, as some other + /// sub parser may be able to parse it. The sub parser MUST return false if + /// it does not know how to parse the word, and MUST return true if it does + /// know how to parse the word, as well as the bytecode and constants of the + /// word. + /// + /// If the sub parser knows how to parse some word, but the data is + /// malformed, the sub parser MUST revert. + /// + /// Word parsing is the process of taking a sequence of bytes and + /// converting it into a sequence of bytecode and constants that is known at + /// compile time, and will be executed at runtime. As the bytecode executes + /// on the interpreter, not the (sub)parser, the sub parser relies on + /// convention to ensure that it is producing valid bytecode and constants. + /// + /// @param data The data that represents the word. + /// @return success Whether the sub parser knows how to parse the word. + /// If the sub parser does know how to handle the word but cannot due to + /// malformed data, or some other reason, it MUST revert. + /// @return bytecode The bytecode of the word. + /// @return constants The constants of the word. This MAY be empty if the + /// bytecode does not require any new constants. These constants will be + /// merged into the constants of the main parser. + function subParseWord2(bytes calldata data) + external + view + returns (bool success, bytes memory bytecode, bytes32[] memory constants); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV1.sol new file mode 100644 index 00000000..f05681a5 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV1.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {FullyQualifiedNamespace} from "./IInterpreterStoreV1.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {IInterpreterV1, SourceIndex} from "./IInterpreterV1.sol"; + +interface IDebugExpressionDeployerV1 { + function offchainDebugEval( + bytes[] memory sources, + uint256[] memory constants, + FullyQualifiedNamespace namespace, + uint256[][] memory context, + SourceIndex sourceIndex, + uint256[] memory initialStack, + uint8 minOutputs + ) external view returns (uint256[] memory finalStack, uint256[] memory kvs); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV2.sol new file mode 100644 index 00000000..437c8441 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugExpressionDeployerV2.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +interface IDebugExpressionDeployerV2 { + /// Drives an integrity check of the provided bytecode and constants. + /// Unlike `IDebugExpressionDeployerV1` this version ONLY checks the + /// integrity of bytecode as produced by `IParserV1.parse`. There is an eval + /// debug method on `IDebugInterpreterV2` that can be used to check the + /// runtime outputs of bytecode that passes the integrity check. + /// Integrity check MUST revert with a descriptive error if the bytecode + /// fails the integrity check. + /// @param bytecode The bytecode to check. + /// @param constants The constants to check. + /// @param minOutputs The minimum number of outputs expected from each of + /// the sources. Only applies to sources that are entrypoints. Internal + /// sources have their integrity checked implicitly by the use of opcodes + /// such as `call` that have min/max outputs in their operand. + function integrityCheck(bytes calldata bytecode, uint256[] calldata constants, uint256[] calldata minOutputs) + external + view; +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV1.sol new file mode 100644 index 00000000..aec43662 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV1.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IInterpreterStoreV1, FullyQualifiedNamespace} from "./IInterpreterStoreV1.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {IInterpreterV1, SourceIndex} from "./IInterpreterV1.sol"; + +interface IDebugInterpreterV1 { + function offchainDebugEval( + IInterpreterStoreV1 store, + FullyQualifiedNamespace namespace, + bytes[] calldata compiledSources, + uint256[] calldata constants, + uint256[][] calldata context, + uint256[] calldata initialStack, + SourceIndex sourceIndex_ + ) external view returns (uint256[] calldata finalStack, uint256[] calldata kvs); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV2.sol new file mode 100644 index 00000000..f2a6c6b2 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IDebugInterpreterV2.sol @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IInterpreterStoreV1, FullyQualifiedNamespace} from "./IInterpreterStoreV1.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {IInterpreterV1, SourceIndex} from "./IInterpreterV1.sol"; + +interface IDebugInterpreterV2 { + /// A more explicit/open version of `eval` that is designed for offchain + /// debugging. It MUST function identically to `eval` so implementations + /// MAY call it directly internally for `eval` to ensure consistency at the + /// expense of a small amount of gas. + /// The affordances made for debugging are: + /// - A fully qualified namespace is passed in. This allows for storage reads + /// from the perspective of an arbitrary caller during `eval`. Note that it + /// does not allow for arbitrary writes, which are still gated by the store + /// contract itself, so this is safe to expose. + /// - The bytecode is passed in directly. This allows for debugging of + /// bytecode that has not been deployed to the chain yet. + /// - The components of the encoded dispatch other than the onchain + /// expression address are passed separately. This remove the need to + /// provide an address at all. + /// - Inputs to the entrypoint stack are passed in directly. This allows for + /// debugging/simulating logic that could normally only be accessed via. + /// some internal dispatch with a mid-flight state creating inputs for the + /// internal call. + function offchainDebugEval( + IInterpreterStoreV1 store, + FullyQualifiedNamespace namespace, + bytes calldata expressionData, + SourceIndex sourceIndex, + uint256 maxOutputs, + uint256[][] calldata context, + uint256[] calldata inputs + ) external view returns (uint256[] calldata finalStack, uint256[] calldata writes); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV1.sol new file mode 100644 index 00000000..3491a572 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV1.sol @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IInterpreterStoreV1} from "./IInterpreterStoreV1.sol"; +import {IInterpreterV1} from "./IInterpreterV1.sol"; + +string constant IERC1820_NAME_IEXPRESSION_DEPLOYER_V1 = "IExpressionDeployerV1"; + +/// @title IExpressionDeployerV1 +/// @notice Companion to `IInterpreterV1` responsible for onchain static code +/// analysis and deploying expressions. Each `IExpressionDeployerV1` is tightly +/// coupled at the bytecode level to some interpreter that it knows how to +/// analyse and deploy expressions for. The expression deployer can perform an +/// integrity check "dry run" of candidate source code for the intepreter. The +/// critical analysis/transformation includes: +/// +/// - Enforcement of no out of bounds memory reads/writes +/// - Calculation of memory required to eval the stack with a single allocation +/// - Replacing index based opcodes with absolute interpreter function pointers +/// - Enforcement that all opcodes and operands used exist and are valid +/// +/// This analysis is highly sensitive to the specific implementation and position +/// of all opcodes and function pointers as compiled into the interpreter. This +/// is what makes the coupling between an interpreter and expression deployer +/// so tight. Ideally all responsibilities would be handled by a single contract +/// but this introduces code size issues quickly by roughly doubling the compiled +/// logic of each opcode (half for the integrity check and half for evaluation). +/// +/// Interpreters MUST assume that expression deployers are malicious and fail +/// gracefully if the integrity check is corrupt/bypassed and/or function +/// pointers are incorrect, etc. i.e. the interpreter MUST always return a stack +/// from `eval` in a read only way or error. I.e. it is the expression deployer's +/// responsibility to do everything it can to prevent undefined behaviour in the +/// interpreter, and the interpreter's responsibility to handle the expression +/// deployer completely failing to do so. +interface IExpressionDeployerV1 { + /// This is the literal InterpreterOpMeta bytes to be used offchain to make + /// sense of the opcodes in this interpreter deployment, as a human. For + /// formats like json that make heavy use of boilerplate, repetition and + /// whitespace, some kind of compression is recommended. + /// @param sender The `msg.sender` providing the op meta. + /// @param opMeta The raw binary data of the op meta. Maybe compressed data + /// etc. and is intended for offchain consumption. + event DISpair(address sender, address deployer, address interpreter, address store, bytes opMeta); + + /// Expressions are expected to be deployed onchain as immutable contract + /// code with a first class address like any other contract or account. + /// Technically this is optional in the sense that all the tools required to + /// eval some expression and define all its opcodes are available as + /// libraries. + /// + /// In practise there are enough advantages to deploying the sources directly + /// onchain as contract data and loading them from the interpreter at eval: + /// + /// - Loading and storing binary data is gas efficient as immutable contract + /// data + /// - Expressions need to be immutable between their deploy time integrity + /// check and runtime evaluation + /// - Passing the address of an expression through calldata to an interpreter + /// is cheaper than passing an entire expression through calldata + /// - Conceptually a very simple approach, even if implementations like + /// SSTORE2 are subtle under the hood + /// + /// The expression deployer MUST perform an integrity check of the source + /// code before it puts the expression onchain at a known address. The + /// integrity check MUST at a minimum (it is free to do additional static + /// analysis) calculate the memory required to be allocated for the stack in + /// total, and that no out of bounds memory reads/writes occur within this + /// stack. A simple example of an invalid source would be one that pushes one + /// value to the stack then attempts to pops two values, clearly we cannot + /// remove more values than we added. The `IExpressionDeployerV1` MUST revert + /// in the case of any integrity failure, all integrity checks MUST pass in + /// order for the deployment to complete. + /// + /// Once the integrity check is complete the `IExpressionDeployerV1` MUST do + /// any additional processing required by its paired interpreter. + /// For example, the `IExpressionDeployerV1` MAY NEED to replace the indexed + /// opcodes in the `ExpressionConfig` sources with real function pointers + /// from the corresponding interpreter. + /// + /// @param sources Sources verbatim. These sources MUST be provided in their + /// sequential/index opcode form as the deployment process will need to index + /// into BOTH the integrity check and the final runtime function pointers. + /// This will be emitted in an event for offchain processing to use the + /// indexed opcode sources. The first N sources are considered entrypoints + /// and will be integrity checked by the expression deployer against a + /// starting stack height of 0. Non-entrypoint sources MAY be provided for + /// internal use such as the `call` opcode but will NOT be integrity checked + /// UNLESS entered by an opcode in an entrypoint. + /// @param constants Constants verbatim. Constants are provided alongside + /// sources rather than inline as it allows us to avoid variable length + /// opcodes and can be more memory efficient if the same constant is + /// referenced several times from the sources. + /// @param minOutputs The first N sources on the state config are entrypoints + /// to the expression where N is the length of the `minOutputs` array. Each + /// item in the `minOutputs` array specifies the number of outputs that MUST + /// be present on the final stack for an evaluation of each entrypoint. The + /// minimum output for some entrypoint MAY be zero if the expectation is that + /// the expression only applies checks and error logic. Non-entrypoint + /// sources MUST NOT have a minimum outputs length specified. + /// @return interpreter The interpreter the deployer believes it is qualified + /// to perform integrity checks on behalf of. + /// @return store The interpreter store the deployer believes is compatible + /// with the interpreter. + /// @return expression The address of the deployed onchain expression. MUST + /// be valid according to all integrity checks the deployer is aware of. + function deployExpression(bytes[] memory sources, uint256[] memory constants, uint256[] memory minOutputs) + external + returns (IInterpreterV1 interpreter, IInterpreterStoreV1 store, address expression); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV2.sol new file mode 100644 index 00000000..a8da2ef5 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV2.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IInterpreterStoreV1} from "./IInterpreterStoreV1.sol"; +import {IInterpreterV1} from "./IInterpreterV1.sol"; + +string constant IERC1820_NAME_IEXPRESSION_DEPLOYER_V2 = "IExpressionDeployerV2"; + +/// @title IExpressionDeployerV2 +/// @notice Companion to `IInterpreterV1` responsible for onchain static code +/// analysis and deploying expressions. Each `IExpressionDeployerV2` is tightly +/// coupled at the bytecode level to some interpreter that it knows how to +/// analyse and deploy expressions for. The expression deployer can perform an +/// integrity check "dry run" of candidate source code for the intepreter. The +/// critical analysis/transformation includes: +/// +/// - Enforcement of no out of bounds memory reads/writes +/// - Calculation of memory required to eval the stack with a single allocation +/// - Replacing index based opcodes with absolute interpreter function pointers +/// - Enforcement that all opcodes and operands used exist and are valid +/// +/// This analysis is highly sensitive to the specific implementation and position +/// of all opcodes and function pointers as compiled into the interpreter. This +/// is what makes the coupling between an interpreter and expression deployer +/// so tight. Ideally all responsibilities would be handled by a single contract +/// but this introduces code size issues quickly by roughly doubling the compiled +/// logic of each opcode (half for the integrity check and half for evaluation). +/// +/// Interpreters MUST assume that expression deployers are malicious and fail +/// gracefully if the integrity check is corrupt/bypassed and/or function +/// pointers are incorrect, etc. i.e. the interpreter MUST always return a stack +/// from `eval` in a read only way or error. I.e. it is the expression deployer's +/// responsibility to do everything it can to prevent undefined behaviour in the +/// interpreter, and the interpreter's responsibility to handle the expression +/// deployer completely failing to do so. +interface IExpressionDeployerV2 { + /// This is the literal InterpreterOpMeta bytes to be used offchain to make + /// sense of the opcodes in this interpreter deployment, as a human. For + /// formats like json that make heavy use of boilerplate, repetition and + /// whitespace, some kind of compression is recommended. + /// @param sender The `msg.sender` providing the op meta. + /// @param meta The raw binary data of the construction meta. Maybe + /// compressed data etc. and is intended for offchain consumption. + event DISpair(address sender, address deployer, address interpreter, address store, bytes meta); + + /// Expressions are expected to be deployed onchain as immutable contract + /// code with a first class address like any other contract or account. + /// Technically this is optional in the sense that all the tools required to + /// eval some expression and define all its opcodes are available as + /// libraries. + /// + /// In practise there are enough advantages to deploying the sources directly + /// onchain as contract data and loading them from the interpreter at eval: + /// + /// - Loading and storing binary data is gas efficient as immutable contract + /// data + /// - Expressions need to be immutable between their deploy time integrity + /// check and runtime evaluation + /// - Passing the address of an expression through calldata to an interpreter + /// is cheaper than passing an entire expression through calldata + /// - Conceptually a very simple approach, even if implementations like + /// SSTORE2 are subtle under the hood + /// + /// The expression deployer MUST perform an integrity check of the source + /// code before it puts the expression onchain at a known address. The + /// integrity check MUST at a minimum (it is free to do additional static + /// analysis) calculate the memory required to be allocated for the stack in + /// total, and that no out of bounds memory reads/writes occur within this + /// stack. A simple example of an invalid source would be one that pushes one + /// value to the stack then attempts to pops two values, clearly we cannot + /// remove more values than we added. The `IExpressionDeployerV2` MUST revert + /// in the case of any integrity failure, all integrity checks MUST pass in + /// order for the deployment to complete. + /// + /// Once the integrity check is complete the `IExpressionDeployerV2` MUST do + /// any additional processing required by its paired interpreter. + /// For example, the `IExpressionDeployerV2` MAY NEED to replace the indexed + /// opcodes in the `ExpressionConfig` sources with real function pointers + /// from the corresponding interpreter. + /// + /// @param bytecode Bytecode verbatim. Exactly how the bytecode is structured + /// is up to the deployer and interpreter. The deployer MUST NOT modify the + /// bytecode in any way. The interpreter MUST NOT assume anything about the + /// bytecode other than that it is valid according to the interpreter's + /// integrity checks. It is assumed that the bytecode will be produced from + /// a human friendly string via. `IParserV1.parse` but this is not required + /// if the caller has some other means to prooduce valid bytecode. + /// @param constants Constants verbatim. Constants are provided alongside + /// sources rather than inline as it allows us to avoid variable length + /// opcodes and can be more memory efficient if the same constant is + /// referenced several times from the sources. + /// @param minOutputs The first N sources on the state config are entrypoints + /// to the expression where N is the length of the `minOutputs` array. Each + /// item in the `minOutputs` array specifies the number of outputs that MUST + /// be present on the final stack for an evaluation of each entrypoint. The + /// minimum output for some entrypoint MAY be zero if the expectation is that + /// the expression only applies checks and error logic. Non-entrypoint + /// sources MUST NOT have a minimum outputs length specified. + /// @return interpreter The interpreter the deployer believes it is qualified + /// to perform integrity checks on behalf of. + /// @return store The interpreter store the deployer believes is compatible + /// with the interpreter. + /// @return expression The address of the deployed onchain expression. MUST + /// be valid according to all integrity checks the deployer is aware of. + function deployExpression(bytes calldata bytecode, uint256[] calldata constants, uint256[] calldata minOutputs) + external + returns (IInterpreterV1 interpreter, IInterpreterStoreV1 store, address expression); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV3.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV3.sol new file mode 100644 index 00000000..bb6f06ae --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV3.sol @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol"; +import {IInterpreterV2} from "./IInterpreterV2.sol"; + +string constant IERC1820_NAME_IEXPRESSION_DEPLOYER_V3 = "IExpressionDeployerV3"; + +/// @title IExpressionDeployerV3 +/// @notice Companion to `IInterpreterV2` responsible for onchain static code +/// analysis and deploying expressions. Each `IExpressionDeployerV3` is tightly +/// coupled at the bytecode level to some interpreter that it knows how to +/// analyse and deploy expressions for. The expression deployer can perform an +/// integrity check "dry run" of candidate source code for the intepreter. The +/// critical analysis/transformation includes: +/// +/// - Enforcement of no out of bounds memory reads/writes +/// - Calculation of memory required to eval the stack with a single allocation +/// - Replacing index based opcodes with absolute interpreter function pointers +/// - Enforcement that all opcodes and operands used exist and are valid +/// +/// This analysis is highly sensitive to the specific implementation and position +/// of all opcodes and function pointers as compiled into the interpreter. This +/// is what makes the coupling between an interpreter and expression deployer +/// so tight. Ideally all responsibilities would be handled by a single contract +/// but this introduces code size issues quickly by roughly doubling the compiled +/// logic of each opcode (half for the integrity check and half for evaluation). +/// +/// Interpreters MUST assume that expression deployers are malicious and fail +/// gracefully if the integrity check is corrupt/bypassed and/or function +/// pointers are incorrect, etc. i.e. the interpreter MUST always return a stack +/// from `eval` in a read only way or error. I.e. it is the expression deployer's +/// responsibility to do everything it can to prevent undefined behaviour in the +/// interpreter, and the interpreter's responsibility to handle the expression +/// deployer completely failing to do so. +interface IExpressionDeployerV3 { + /// The config of the deployed expression including uncompiled sources. MUST + /// be emitted after the config passes the integrity check. + /// @param sender The caller of `deployExpression2`. + /// @param bytecode As per `IExpressionDeployerV3.deployExpression2` inputs. + /// @param constants As per `IExpressionDeployerV3.deployExpression2` inputs. + event NewExpression(address sender, bytes bytecode, uint256[] constants); + + /// The address of the deployed expression. MUST be emitted once the + /// expression can be loaded and deserialized into an evaluable interpreter + /// state. + /// @param sender The caller of `deployExpression2`. + /// @param interpreter As per `IExpressionDeployerV3.deployExpression2` return. + /// @param store As per `IExpressionDeployerV3.deployExpression2` return. + /// @param expression As per `IExpressionDeployerV3.deployExpression2` return. + /// @param io As per `IExpressionDeployerV3.deployExpression2` return. + event DeployedExpression( + address sender, IInterpreterV2 interpreter, IInterpreterStoreV2 store, address expression, bytes io + ); + + /// This is the literal InterpreterOpMeta bytes to be used offchain to make + /// sense of the opcodes in this interpreter deployment, as a human. For + /// formats like json that make heavy use of boilerplate, repetition and + /// whitespace, some kind of compression is recommended. + /// The DISPair is a pairing of: + /// - Deployer (this contract) + /// - Interpreter + /// - Store + /// - Parser + /// + /// @param sender The `msg.sender` providing the op meta. + /// @param interpreter The interpreter the deployer believes it is qualified + /// to perform integrity checks on behalf of. + /// @param store The interpreter store the deployer believes is compatible + /// with the interpreter. + /// @param parser The parser the deployer believes is compatible with the + /// interpreter. + /// @param meta The raw binary data of the construction meta. Maybe + /// compressed data etc. and is intended for offchain consumption. + event DISPair(address sender, address interpreter, address store, address parser, bytes meta); + + /// Expressions are expected to be deployed onchain as immutable contract + /// code with a first class address like any other contract or account. + /// Technically this is optional in the sense that all the tools required to + /// eval some expression and define all its opcodes are available as + /// libraries. + /// + /// In practise there are enough advantages to deploying the sources directly + /// onchain as contract data and loading them from the interpreter at eval: + /// + /// - Loading and storing binary data is gas efficient as immutable contract + /// data + /// - Expressions need to be immutable between their deploy time integrity + /// check and runtime evaluation + /// - Passing the address of an expression through calldata to an interpreter + /// is cheaper than passing an entire expression through calldata + /// - Conceptually a very simple approach, even if implementations like + /// SSTORE2 are subtle under the hood + /// + /// The expression deployer MUST perform an integrity check of the source + /// code before it puts the expression onchain at a known address. The + /// integrity check MUST at a minimum (it is free to do additional static + /// analysis) calculate the memory required to be allocated for the stack in + /// total, and that no out of bounds memory reads/writes occur within this + /// stack. A simple example of an invalid source would be one that pushes one + /// value to the stack then attempts to pops two values, clearly we cannot + /// remove more values than we added. The `IExpressionDeployerV3` MUST revert + /// in the case of any integrity failure, all integrity checks MUST pass in + /// order for the deployment to complete. + /// + /// Once the integrity check is complete the `IExpressionDeployerV3` MUST do + /// any additional processing required by its paired interpreter. + /// For example, the `IExpressionDeployerV3` MAY NEED to replace the indexed + /// opcodes in the `ExpressionConfig` sources with real function pointers + /// from the corresponding interpreter. + /// + /// The caller MUST check the `io` returned by this function to determine + /// the number of inputs and outputs for each source are within the bounds + /// of the caller's expectations. + /// + /// @param bytecode Bytecode verbatim. Exactly how the bytecode is structured + /// is up to the deployer and interpreter. The deployer MUST NOT modify the + /// bytecode in any way. The interpreter MUST NOT assume anything about the + /// bytecode other than that it is valid according to the interpreter's + /// integrity checks. It is assumed that the bytecode will be produced from + /// a human friendly string via. `IParserV1.parse` but this is not required + /// if the caller has some other means to prooduce valid bytecode. + /// @param constants Constants verbatim. Constants are provided alongside + /// sources rather than inline as it allows us to avoid variable length + /// opcodes and can be more memory efficient if the same constant is + /// referenced several times from the sources. + /// @return interpreter The interpreter the deployer believes it is qualified + /// to perform integrity checks on behalf of. + /// @return store The interpreter store the deployer believes is compatible + /// with the interpreter. + /// @return expression The address of the deployed onchain expression. MUST + /// be valid according to all integrity checks the deployer is aware of. + /// @return io Binary data where each 2 bytes input and output counts for + /// each source of the bytecode. MAY simply be copied verbatim from the + /// relevant bytes in the bytecode if they exist and integrity checks + /// guarantee that the bytecode is valid. + function deployExpression2(bytes calldata bytecode, uint256[] calldata constants) + external + returns (IInterpreterV2 interpreter, IInterpreterStoreV2 store, address expression, bytes calldata io); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV4.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV4.sol new file mode 100644 index 00000000..bf2c864e --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IExpressionDeployerV4.sol @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol"; +import {IInterpreterV2} from "./IInterpreterV2.sol"; + +string constant IERC1820_NAME_IEXPRESSION_DEPLOYER_V4 = "IExpressionDeployerV4"; + +/// @title IExpressionDeployerV4 +/// @notice Companion to `IInterpreterV2` responsible for onchain static code +/// analysis and deploying expressions. Each `IExpressionDeployerV4` is tightly +/// coupled at the bytecode level to some interpreter that it knows how to +/// analyse and deploy expressions for. The expression deployer can perform an +/// integrity check "dry run" of candidate source code for the intepreter. The +/// critical analysis/transformation includes: +/// +/// - Enforcement of no out of bounds memory reads/writes +/// - Calculation of memory required to eval the stack with a single allocation +/// - Replacing index based opcodes with absolute interpreter function pointers +/// - Enforcement that all opcodes and operands used exist and are valid +/// +/// This analysis is highly sensitive to the specific implementation and position +/// of all opcodes and function pointers as compiled into the interpreter. This +/// is what makes the coupling between an interpreter and expression deployer +/// so tight. Ideally all responsibilities would be handled by a single contract +/// but this introduces code size issues quickly by roughly doubling the compiled +/// logic of each opcode (half for the integrity check and half for evaluation). +/// +/// Interpreters MUST assume that expression deployers are malicious and fail +/// gracefully if the integrity check is corrupt/bypassed and/or function +/// pointers are incorrect, etc. i.e. the interpreter MUST always return a stack +/// from `eval` in a read only way or error. I.e. it is the expression deployer's +/// responsibility to do everything it can to prevent undefined behaviour in the +/// interpreter, and the interpreter's responsibility to handle the expression +/// deployer completely failing to do so. +interface IExpressionDeployerV4 { + /// The config of the deployed expression including uncompiled sources. MUST + /// be emitted after the config passes the integrity check. + /// @param sender The caller of `deployExpression2`. + /// @param bytecode As per `IExpressionDeployerV4.deployExpression2` inputs. + /// @param constants As per `IExpressionDeployerV4.deployExpression2` inputs. + event NewExpression(address sender, bytes bytecode, uint256[] constants); + + /// The address of the deployed expression. MUST be emitted once the + /// expression can be loaded and deserialized into an evaluable interpreter + /// state. + /// @param sender The caller of `deployExpression2`. + /// @param interpreter As per `IExpressionDeployerV4.deployExpression2` return. + /// @param store As per `IExpressionDeployerV4.deployExpression2` return. + /// @param expression As per `IExpressionDeployerV4.deployExpression2` return. + /// @param io As per `IExpressionDeployerV4.deployExpression2` return. + event DeployedExpression( + address sender, IInterpreterV2 interpreter, IInterpreterStoreV2 store, address expression, bytes io + ); + + /// The DISPair is a pairing of: + /// - Deployer (this contract) + /// - Interpreter + /// - Store + /// - Parser + /// + /// @param sender The `msg.sender` deploying the DISPair. + /// @param interpreter The interpreter the deployer believes it is qualified + /// to perform integrity checks on behalf of. + /// @param store The interpreter store the deployer believes is compatible + /// with the interpreter. + /// @param parser The parser the deployer believes is compatible with the + /// interpreter. + event DISPairV2(address sender, address interpreter, address store, address parser); + + /// Expressions are expected to be deployed onchain as immutable contract + /// code with a first class address like any other contract or account. + /// Technically this is optional in the sense that all the tools required to + /// eval some expression and define all its opcodes are available as + /// libraries. + /// + /// In practise there are enough advantages to deploying the sources directly + /// onchain as contract data and loading them from the interpreter at eval: + /// + /// - Loading and storing binary data is gas efficient as immutable contract + /// data + /// - Expressions need to be immutable between their deploy time integrity + /// check and runtime evaluation + /// - Passing the address of an expression through calldata to an interpreter + /// is cheaper than passing an entire expression through calldata + /// - Conceptually a very simple approach, even if implementations like + /// SSTORE2 are subtle under the hood + /// + /// The expression deployer MUST perform an integrity check of the source + /// code before it puts the expression onchain at a known address. The + /// integrity check MUST at a minimum (it is free to do additional static + /// analysis) calculate the memory required to be allocated for the stack in + /// total, and that no out of bounds memory reads/writes occur within this + /// stack. A simple example of an invalid source would be one that pushes one + /// value to the stack then attempts to pops two values, clearly we cannot + /// remove more values than we added. The `IExpressionDeployerV4` MUST revert + /// in the case of any integrity failure, all integrity checks MUST pass in + /// order for the deployment to complete. + /// + /// Once the integrity check is complete the `IExpressionDeployerV4` MUST do + /// any additional processing required by its paired interpreter. + /// For example, the `IExpressionDeployerV4` MAY NEED to replace the indexed + /// opcodes in the `ExpressionConfig` sources with real function pointers + /// from the corresponding interpreter. + /// + /// The caller MUST check the `io` returned by this function to determine + /// the number of inputs and outputs for each source are within the bounds + /// of the caller's expectations. + /// + /// @param bytecode Bytecode verbatim. Exactly how the bytecode is structured + /// is up to the deployer and interpreter. The deployer MUST NOT modify the + /// bytecode in any way. The interpreter MUST NOT assume anything about the + /// bytecode other than that it is valid according to the interpreter's + /// integrity checks. It is assumed that the bytecode will be produced from + /// a human friendly string via. `IParserV1.parse` but this is not required + /// if the caller has some other means to prooduce valid bytecode. + /// @param constants Constants verbatim. Constants are provided alongside + /// sources rather than inline as it allows us to avoid variable length + /// opcodes and can be more memory efficient if the same constant is + /// referenced several times from the sources. + /// @return interpreter The interpreter the deployer believes it is qualified + /// to perform integrity checks on behalf of. + /// @return store The interpreter store the deployer believes is compatible + /// with the interpreter. + /// @return expression The address of the deployed onchain expression. MUST + /// be valid according to all integrity checks the deployer is aware of. + /// @return io Binary data where each 2 bytes input and output counts for + /// each source of the bytecode. MAY simply be copied verbatim from the + /// relevant bytes in the bytecode if they exist and integrity checks + /// guarantee that the bytecode is valid. + function deployExpression2(bytes calldata bytecode, uint256[] calldata constants) + external + returns (IInterpreterV2 interpreter, IInterpreterStoreV2 store, address expression, bytes calldata io); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV1.sol new file mode 100644 index 00000000..184cfca2 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV1.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IExpressionDeployerV1} from "./IExpressionDeployerV1.sol"; +import {IExpressionDeployerV2} from "./IExpressionDeployerV2.sol"; +import {IInterpreterV1} from "./IInterpreterV1.sol"; +import {IInterpreterStoreV1} from "./IInterpreterStoreV1.sol"; + +/// Standard struct that can be embedded in ABIs in a consistent format for +/// tooling to read/write. MAY be useful to bundle up the data required to call +/// `IExpressionDeployerV1` but is NOT mandatory. +/// @param deployer Will deploy the expression from sources and constants. +/// @param sources Will be deployed to an expression address for use in +/// `Evaluable`. +/// @param constants Will be available to the expression at runtime. +struct EvaluableConfig { + IExpressionDeployerV1 deployer; + bytes[] sources; + uint256[] constants; +} + +/// Standard struct that can be embedded in ABIs in a consistent format for +/// tooling to read/write. MAY be useful to bundle up the data required to call +/// `IExpressionDeployerV2` but is NOT mandatory. +/// @param deployer Will deploy the expression from sources and constants. +/// @param bytecode Will be deployed to an expression address for use in +/// `Evaluable`. +/// @param constants Will be available to the expression at runtime. +struct EvaluableConfigV2 { + IExpressionDeployerV2 deployer; + bytes bytecode; + uint256[] constants; +} + +/// Struct over the return of `IExpressionDeployerV1.deployExpression` +/// which MAY be more convenient to work with than raw addresses. +/// @param interpreter Will evaluate the expression. +/// @param store Will store state changes due to evaluation of the expression. +/// @param expression Will be evaluated by the interpreter. +struct Evaluable { + IInterpreterV1 interpreter; + IInterpreterStoreV1 store; + address expression; +} + +/// Typed embodiment of some context data with associated signer and signature. +/// The signature MUST be over the packed encoded bytes of the context array, +/// i.e. the context array concatenated as bytes without the length prefix, then +/// hashed, then handled as per EIP-191 to produce a final hash to be signed. +/// +/// The calling contract (likely with the help of `LibContext`) is responsible +/// for ensuring the authenticity of the signature, but not authorizing _who_ can +/// sign. IN ADDITION to authorisation of the signer to known-good entities the +/// expression is also responsible for: +/// +/// - Enforcing the context is the expected data (e.g. with a domain separator) +/// - Tracking and enforcing nonces if signed contexts are only usable one time +/// - Tracking and enforcing uniqueness of signed data if relevant +/// - Checking and enforcing expiry times if present and relevant in the context +/// - Many other potential constraints that expressions may want to enforce +/// +/// EIP-1271 smart contract signatures are supported in addition to EOA +/// signatures via. the Open Zeppelin `SignatureChecker` library, which is +/// wrapped by `LibContext.build`. As smart contract signatures are checked +/// onchain they CAN BE REVOKED AT ANY MOMENT as the smart contract can simply +/// return `false` when it previously returned `true`. +/// +/// @param signer The account that produced the signature for `context`. The +/// calling contract MUST authenticate that the signer produced the signature. +/// @param signature The cryptographic signature for `context`. The calling +/// contract MUST authenticate that the signature is valid for the `signer` and +/// `context`. +/// @param context The signed data in a format that can be merged into a +/// 2-dimensional context matrix as-is. +struct SignedContext { + // The ordering of these fields is important and used in assembly offset + // calculations and hashing. + address signer; + bytes signature; + uint256[] context; +} + +uint256 constant SIGNED_CONTEXT_SIGNER_OFFSET = 0; +uint256 constant SIGNED_CONTEXT_CONTEXT_OFFSET = 0x20; +uint256 constant SIGNED_CONTEXT_SIGNATURE_OFFSET = 0x40; + +/// @title IInterpreterCallerV1 +/// @notice A contract that calls an `IInterpreterV1` via. `eval`. There are near +/// zero requirements on a caller other than: +/// +/// - Emit some meta about itself upon construction so humans know what the +/// contract does +/// - Provide the context, which can be built in a standard way by `LibContext` +/// - Handle the stack array returned from `eval` +/// - OPTIONALLY emit the `Context` event +/// - OPTIONALLY set state on the `IInterpreterStoreV1` returned from eval. +interface IInterpreterCallerV1 { + /// Calling contracts SHOULD emit `Context` before calling `eval` if they + /// are able. Notably `eval` MAY be called within a static call which means + /// that events cannot be emitted, in which case this does not apply. It MAY + /// NOT be useful to emit this multiple times for several eval calls if they + /// all share a common context, in which case a single emit is sufficient. + /// @param sender `msg.sender` building the context. + /// @param context The context that was built. + event Context(address sender, uint256[][] context); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV2.sol new file mode 100644 index 00000000..50fae365 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterCallerV2.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IExpressionDeployerV3} from "./IExpressionDeployerV3.sol"; +import {IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol"; +import {IInterpreterV2} from "./IInterpreterV2.sol"; + +/// Standard struct that can be embedded in ABIs in a consistent format for +/// tooling to read/write. MAY be useful to bundle up the data required to call +/// `IExpressionDeployerV3` but is NOT mandatory. +/// @param deployer Will deploy the expression from sources and constants. +/// @param bytecode Will be deployed to an expression address for use in +/// `Evaluable`. +/// @param constants Will be available to the expression at runtime. +struct EvaluableConfigV3 { + IExpressionDeployerV3 deployer; + bytes bytecode; + uint256[] constants; +} + +/// Struct over the return of `IExpressionDeployerV3.deployExpression2` +/// which MAY be more convenient to work with than raw addresses. +/// @param interpreter Will evaluate the expression. +/// @param store Will store state changes due to evaluation of the expression. +/// @param expression Will be evaluated by the interpreter. +struct EvaluableV2 { + IInterpreterV2 interpreter; + IInterpreterStoreV2 store; + address expression; +} + +/// Typed embodiment of some context data with associated signer and signature. +/// The signature MUST be over the packed encoded bytes of the context array, +/// i.e. the context array concatenated as bytes without the length prefix, then +/// hashed, then handled as per EIP-191 to produce a final hash to be signed. +/// +/// The calling contract (likely with the help of `LibContext`) is responsible +/// for ensuring the authenticity of the signature, but not authorizing _who_ can +/// sign. IN ADDITION to authorisation of the signer to known-good entities the +/// expression is also responsible for: +/// +/// - Enforcing the context is the expected data (e.g. with a domain separator) +/// - Tracking and enforcing nonces if signed contexts are only usable one time +/// - Tracking and enforcing uniqueness of signed data if relevant +/// - Checking and enforcing expiry times if present and relevant in the context +/// - Many other potential constraints that expressions may want to enforce +/// +/// EIP-1271 smart contract signatures are supported in addition to EOA +/// signatures via. the Open Zeppelin `SignatureChecker` library, which is +/// wrapped by `LibContext.build`. As smart contract signatures are checked +/// onchain they CAN BE REVOKED AT ANY MOMENT as the smart contract can simply +/// return `false` when it previously returned `true`. +/// +/// @param signer The account that produced the signature for `context`. The +/// calling contract MUST authenticate that the signer produced the signature. +/// @param context The signed data in a format that can be merged into a +/// 2-dimensional context matrix as-is. +/// @param signature The cryptographic signature for `context`. The calling +/// contract MUST authenticate that the signature is valid for the `signer` and +/// `context`. +struct SignedContextV1 { + // The ordering of these fields is important and used in assembly offset + // calculations and hashing. + address signer; + bytes32[] context; + bytes signature; +} + +uint256 constant SIGNED_CONTEXT_SIGNER_OFFSET = 0; +uint256 constant SIGNED_CONTEXT_CONTEXT_OFFSET = 0x20; +uint256 constant SIGNED_CONTEXT_SIGNATURE_OFFSET = 0x40; + +/// @title IInterpreterCallerV2 +/// @notice A contract that calls an `IInterpreterV1` via. `eval`. There are near +/// zero requirements on a caller other than: +/// +/// - Emit some meta about itself upon construction so humans know what the +/// contract does +/// - Provide the context, which can be built in a standard way by `LibContext` +/// - Handle the stack array returned from `eval` +/// - OPTIONALLY emit the `Context` event +/// - OPTIONALLY set state on the `IInterpreterStoreV1` returned from eval. +interface IInterpreterCallerV2 { + /// Calling contracts SHOULD emit `Context` before calling `eval` if they + /// are able. Notably `eval` MAY be called within a static call which means + /// that events cannot be emitted, in which case this does not apply. It MAY + /// NOT be useful to emit this multiple times for several eval calls if they + /// all share a common context, in which case a single emit is sufficient. + /// @param sender `msg.sender` building the context. + /// @param context The context that was built. + event Context(address sender, uint256[][] context); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV1.sol new file mode 100644 index 00000000..41088944 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV1.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +type EncodedExternDispatch is uint256; + +type ExternDispatch is uint256; + +/// @title IInterpreterExternV1 +/// Handle a single dispatch from some calling contract with an array of +/// inputs and array of outputs. Ostensibly useful to build "word packs" for +/// `IInterpreterV1` so that less frequently used words can be provided in +/// a less efficient format, but without bloating the base interpreter in +/// terms of code size. Effectively allows unlimited words to exist as externs +/// alongside interpreters. +interface IInterpreterExternV1 { + /// Handles a single dispatch. + /// @param dispatch Encoded information about the extern to dispatch. + /// Analogous to the opcode/operand in the interpreter. + /// @param inputs The array of inputs for the dispatched logic. + /// @return outputs The result of the dispatched logic. + function extern(ExternDispatch dispatch, uint256[] memory inputs) external view returns (uint256[] memory outputs); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV2.sol new file mode 100644 index 00000000..032ea620 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterExternV2.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {EncodedExternDispatch, ExternDispatch} from "./IInterpreterExternV1.sol"; + +/// @title IInterpreterExternV2 +/// Handle a single dispatch from some calling contract with an array of +/// inputs and array of outputs. Ostensibly useful to build "word packs" for +/// `IInterpreterV1` so that less frequently used words can be provided in +/// a less efficient format, but without bloating the base interpreter in +/// terms of code size. Effectively allows unlimited words to exist as externs +/// alongside interpreters. +/// +/// The only difference between V2 and V1 is that V2 allows for the inputs and +/// outputs to be in calldata rather than memory. +interface IInterpreterExternV2 { + /// Handles a single dispatch. + /// @param dispatch Encoded information about the extern to dispatch. + /// Analogous to the opcode/operand in the interpreter. + /// @param inputs The array of inputs for the dispatched logic. + /// @return outputs The result of the dispatched logic. + function extern(ExternDispatch dispatch, uint256[] calldata inputs) + external + view + returns (uint256[] calldata outputs); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterStoreV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterStoreV1.sol new file mode 100644 index 00000000..f927419a --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterStoreV1.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {StateNamespace} from "./IInterpreterV1.sol"; + +/// A fully qualified namespace includes the interpreter's own namespacing logic +/// IN ADDITION to the calling contract's requested `StateNamespace`. Typically +/// this involves hashing the `msg.sender` into the `StateNamespace` so that each +/// caller operates within its own disjoint state universe. Intepreters MUST NOT +/// allow either the caller nor any expression/word to modify this directly on +/// pain of potential key collisions on writes to the interpreter's own storage. +type FullyQualifiedNamespace is uint256; + +IInterpreterStoreV1 constant NO_STORE = IInterpreterStoreV1(address(0)); + +/// @title IInterpreterStoreV1 +/// @notice Tracks state changes on behalf of an interpreter. A single store can +/// handle state changes for many calling contracts, many interpreters and many +/// expressions. The store is responsible for ensuring that applying these state +/// changes is safe from key collisions with calls to `set` from different +/// `msg.sender` callers. I.e. it MUST NOT be possible for a caller to modify the +/// state changes associated with some other caller. +/// +/// The store defines the shape of its own state changes, which is opaque to the +/// calling contract. For example, some store may treat the list of state changes +/// as a pairwise key/value set, and some other store may treat it as a literal +/// list to be stored as-is. +/// +/// Each interpreter decides for itself which store to use based on the +/// compatibility of its own opcodes. +/// +/// The store MUST assume the state changes have been corrupted by the calling +/// contract due to bugs or malicious intent, and enforce state isolation between +/// callers despite arbitrarily invalid state changes. The store MUST revert if +/// it can detect invalid state changes, such as a key/value list having an odd +/// number of items, but this MAY NOT be possible if the corruption is +/// undetectable. +interface IInterpreterStoreV1 { + /// Mutates the interpreter store in bulk. The bulk values are provided in + /// the form of a `uint256[]` which can be treated e.g. as pairwise keys and + /// values to be stored in a Solidity mapping. The `IInterpreterStoreV1` + /// defines the meaning of the `uint256[]` for its own storage logic. + /// + /// @param namespace The unqualified namespace for the set that MUST be + /// fully qualified by the `IInterpreterStoreV1` to prevent key collisions + /// between callers. The fully qualified namespace forms a compound key with + /// the keys for each value to set. + /// @param kvs The list of changes to apply to the store's internal state. + function set(StateNamespace namespace, uint256[] calldata kvs) external; + + /// Given a fully qualified namespace and key, return the associated value. + /// Ostensibly the interpreter can use this to implement opcodes that read + /// previously set values. The interpreter MUST apply the same qualification + /// logic as the store that it uses to guarantee consistent round tripping of + /// data and prevent malicious behaviours. Technically also allows onchain + /// reads of any set value from any contract, not just interpreters, but in + /// this case readers MUST be aware and handle inconsistencies between get + /// and set while the state changes are still in memory in the calling + /// context and haven't yet been persisted to the store. + /// + /// `IInterpreterStoreV1` uses the same fallback behaviour for unset keys as + /// Solidity. Specifically, any UNSET VALUES SILENTLY FALLBACK TO `0`. + /// @param namespace The fully qualified namespace to get a single value for. + /// @param key The key to get the value for within the namespace. + /// @return The value OR ZERO IF NOT SET. + function get(FullyQualifiedNamespace namespace, uint256 key) external view returns (uint256); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV1.sol new file mode 100644 index 00000000..6667c223 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV1.sol @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import {IInterpreterStoreV1} from "./IInterpreterStoreV1.sol"; + +/// @dev The index of a source within a deployed expression that can be evaluated +/// by an `IInterpreterV1`. MAY be an entrypoint or the index of a source called +/// internally such as by the `call` opcode. +type SourceIndex is uint16; + +/// @dev Encoded information about a specific evaluation including the expression +/// address onchain, entrypoint and expected return values. +type EncodedDispatch is uint256; + +/// @dev The namespace for state changes as requested by the calling contract. +/// The interpreter MUST apply this namespace IN ADDITION to namespacing by +/// caller etc. +type StateNamespace is uint256; + +/// @dev Additional bytes that can be used to configure a single opcode dispatch. +/// Commonly used to specify the number of inputs to a variadic function such +/// as addition or multiplication. +type Operand is uint256; + +/// @dev The default state namespace MUST be used when a calling contract has no +/// particular opinion on or need for dynamic namespaces. +StateNamespace constant DEFAULT_STATE_NAMESPACE = StateNamespace.wrap(0); + +/// @title IInterpreterV1 +/// Interface into a standard interpreter that supports: +/// +/// - evaluating `view` logic deployed onchain by an `IExpressionDeployerV1` +/// - receiving arbitrary `uint256[][]` supporting context to be made available +/// to the evaluated logic +/// - handling subsequent state changes in bulk in response to evaluated logic +/// - namespacing state changes according to the caller's preferences to avoid +/// unwanted key collisions +/// - exposing its internal function pointers to support external precompilation +/// of logic for more gas efficient runtime evaluation by the interpreter +/// +/// The interface is designed to be stable across many versions and +/// implementations of an interpreter, balancing minimalism with features +/// required for a general purpose onchain interpreted compute environment. +/// +/// The security model of an interpreter is that it MUST be resilient to +/// malicious expressions even if they dispatch arbitrary internal function +/// pointers during an eval. The interpreter MAY return garbage or exhibit +/// undefined behaviour or error during an eval, _provided that no state changes +/// are persisted_ e.g. in storage, such that only the caller that specifies the +/// malicious expression can be negatively impacted by the result. In turn, the +/// caller must guard itself against arbitrarily corrupt/malicious reverts and +/// return values from any interpreter that it requests an expression from. And +/// so on and so forth up to the externally owned account (EOA) who signs the +/// transaction and agrees to a specific combination of contracts, expressions +/// and interpreters, who can presumably make an informed decision about which +/// ones to trust to get the job done. +/// +/// The state changes for an interpreter are expected to be produces by an `eval` +/// and passed to the `IInterpreterStoreV1` returned by the eval, as-is by the +/// caller, after the caller has had an opportunity to apply their own +/// intermediate logic such as reentrancy defenses against malicious +/// interpreters. The interpreter is free to structure the state changes however +/// it wants but MUST guard against the calling contract corrupting the changes +/// between `eval` and `set`. For example a store could sandbox storage writes +/// per-caller so that a malicious caller can only damage their own state +/// changes, while honest callers respect, benefit from and are protected by the +/// interpreter store's state change handling. +/// +/// The two step eval-state model allows eval to be read-only which provides +/// security guarantees for the caller such as no stateful reentrancy, either +/// from the interpreter or some contract interface used by some word, while +/// still allowing for storage writes. As the storage writes happen on the +/// interpreter rather than the caller (c.f. delegate call) the caller DOES NOT +/// need to trust the interpreter, which allows for permissionless selection of +/// interpreters by end users. Delegate call always implies an admin key on the +/// caller because the delegatee contract can write arbitrarily to the state of +/// the delegator, which severely limits the generality of contract composition. +interface IInterpreterV1 { + /// Exposes the function pointers as `uint16` values packed into a single + /// `bytes` in the same order as they would be indexed into by opcodes. For + /// example, if opcode `2` should dispatch function at position `0x1234` then + /// the start of the returned bytes would be `0xXXXXXXXX1234` where `X` is + /// a placeholder for the function pointers of opcodes `0` and `1`. + /// + /// `IExpressionDeployerV1` contracts use these function pointers to + /// "compile" the expression into something that an interpreter can dispatch + /// directly without paying gas to lookup the same at runtime. As the + /// validity of any integrity check and subsequent dispatch is highly + /// sensitive to both the function pointers and overall bytecode of the + /// interpreter, `IExpressionDeployerV1` contracts SHOULD implement guards + /// against accidentally being deployed onchain paired against an unknown + /// interpreter. It is very easy for an apparent compatible pairing to be + /// subtly and critically incompatible due to addition/removal/reordering of + /// opcodes and compiler optimisations on the interpreter bytecode. + /// + /// This MAY return different values during construction vs. all other times + /// after the interpreter has been successfully deployed onchain. DO NOT rely + /// on function pointers reported during contract construction. + function functionPointers() external view returns (bytes memory); + + /// The raison d'etre for an interpreter. Given some expression and per-call + /// additional contextual data, produce a stack of results and a set of state + /// changes that the caller MAY OPTIONALLY pass back to be persisted by a + /// call to `IInterpreterStoreV1.set`. + /// @param store The storage contract that the returned key/value pairs + /// MUST be passed to IF the calling contract is in a non-static calling + /// context. Static calling contexts MUST pass `address(0)`. + /// @param namespace The state namespace that will be fully qualified by the + /// interpreter at runtime in order to perform gets on the underlying store. + /// MUST be the same namespace passed to the store by the calling contract + /// when sending the resulting key/value items to storage. + /// @param dispatch All the information required for the interpreter to load + /// an expression, select an entrypoint and return the values expected by the + /// caller. The interpreter MAY encode dispatches differently to + /// `LibEncodedDispatch` but this WILL negatively impact compatibility for + /// calling contracts that hardcode the encoding logic. + /// @param context A 2-dimensional array of data that can be indexed into at + /// runtime by the interpreter. The calling contract is responsible for + /// ensuring the authenticity and completeness of context data. The + /// interpreter MUST revert at runtime if an expression attempts to index + /// into some context value that is not provided by the caller. This implies + /// that context reads cannot be checked for out of bounds reads at deploy + /// time, as the runtime context MAY be provided in a different shape to what + /// the expression is expecting. + /// Same as `eval` but allowing the caller to specify a namespace under which + /// the state changes will be applied. The interpeter MUST ensure that keys + /// will never collide across namespaces, even if, for example: + /// + /// - The calling contract is malicious and attempts to craft a collision + /// with state changes from another contract + /// - The expression is malicious and attempts to craft a collision with + /// other expressions evaluated by the same calling contract + /// + /// A malicious entity MAY have access to significant offchain resources to + /// attempt to precompute key collisions through brute force. The collision + /// resistance of namespaces should be comparable or equivalent to the + /// collision resistance of the hashing algorithms employed by the blockchain + /// itself, such as the design of `mapping` in Solidity that hashes each + /// nested key to produce a collision resistant compound key. + /// @return stack The list of values produced by evaluating the expression. + /// MUST NOT be longer than the maximum length specified by `dispatch`, if + /// applicable. + /// @return kvs A list of pairwise key/value items to be saved in the store. + function eval( + IInterpreterStoreV1 store, + StateNamespace namespace, + EncodedDispatch dispatch, + uint256[][] calldata context + ) external view returns (uint256[] memory stack, uint256[] memory kvs); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV2.sol new file mode 100644 index 00000000..d0c1992e --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IInterpreterV2.sol @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {EncodedDispatch, StateNamespace, Operand, DEFAULT_STATE_NAMESPACE} from "./IInterpreterV1.sol"; +import {FullyQualifiedNamespace, IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol"; + +/// @dev For maximum compatibility with external contracts, the `IInterpreterV2` +/// should implement an opcode that reads from the stack by index as opcode `0`. +uint256 constant OPCODE_STACK = 0; + +/// @dev For maximum compatibility with external contracts, the `IInterpreterV2` +/// should implement an opcode that reads constants by index as opcode `1`. +uint256 constant OPCODE_CONSTANT = 1; + +/// @dev For maximum compatibility with external contracts, the `IInterpreterV2` +/// should implement an opcode that calls externs by index as opcode `2`. +uint256 constant OPCODE_EXTERN = 2; + +/// @dev For maximum compatibility with external contracts, the `IInterpreterV2` +/// should implement an opcode that reads from the context grid as +/// as opcode `3`. +uint256 constant OPCODE_CONTEXT = 3; + +/// @dev For maximum compatibility with opcode lists, the `IInterpreterV2` +/// should implement the opcode for locally unknown words that need sub parsing +/// as opcode `255`. +uint256 constant OPCODE_UNKNOWN = 0xFF; + +/// @dev The index of a source within a deployed expression that can be evaluated +/// by an `IInterpreterV2`. MAY be an entrypoint or the index of a source called +/// internally such as by the `call` opcode. +type SourceIndexV2 is uint256; + +/// @title IInterpreterV2 +/// Interface into a standard interpreter that supports: +/// +/// - evaluating `view` logic deployed onchain by an `IExpressionDeployerV1` +/// - receiving arbitrary `uint256[][]` supporting context to be made available +/// to the evaluated logic +/// - handling subsequent state changes in bulk in response to evaluated logic +/// - namespacing state changes according to the caller's preferences to avoid +/// unwanted key collisions +/// - exposing its internal function pointers to support external precompilation +/// of logic for more gas efficient runtime evaluation by the interpreter +/// +/// The interface is designed to be stable across many versions and +/// implementations of an interpreter, balancing minimalism with features +/// required for a general purpose onchain interpreted compute environment. +/// +/// The security model of an interpreter is that it MUST be resilient to +/// malicious expressions even if they dispatch arbitrary internal function +/// pointers during an eval. The interpreter MAY return garbage or exhibit +/// undefined behaviour or error during an eval, _provided that no state changes +/// are persisted_ e.g. in storage, such that only the caller that specifies the +/// malicious expression can be negatively impacted by the result. In turn, the +/// caller must guard itself against arbitrarily corrupt/malicious reverts and +/// return values from any interpreter that it requests an expression from. And +/// so on and so forth up to the externally owned account (EOA) who signs the +/// transaction and agrees to a specific combination of contracts, expressions +/// and interpreters, who can presumably make an informed decision about which +/// ones to trust to get the job done. +/// +/// The state changes for an interpreter are expected to be produced by an +/// `eval2` and passed to the `IInterpreterStoreV1` returned by the eval, as-is +/// by the caller, after the caller has had an opportunity to apply their own +/// intermediate logic such as reentrancy defenses against malicious +/// interpreters. The interpreter is free to structure the state changes however +/// it wants but MUST guard against the calling contract corrupting the changes +/// between `eval2` and `set`. For example a store could sandbox storage writes +/// per-caller so that a malicious caller can only damage their own state +/// changes, while honest callers respect, benefit from and are protected by the +/// interpreter store's state change handling. +/// +/// The two step eval-state model allows evaluation to be read-only which +/// provides security guarantees for the caller such as no stateful reentrancy, +/// either from the interpreter or some contract interface used by some word, +/// while still allowing for storage writes. As the storage writes happen on the +/// interpreter rather than the caller (c.f. delegate call) the caller DOES NOT +/// need to trust the interpreter, which allows for permissionless selection of +/// interpreters by end users. Delegate call always implies an admin key on the +/// caller because the delegatee contract can write arbitrarily to the state of +/// the delegator, which severely limits the generality of contract composition. +interface IInterpreterV2 { + /// Exposes the function pointers as `uint16` values packed into a single + /// `bytes` in the same order as they would be indexed into by opcodes. For + /// example, if opcode `2` should dispatch function at position `0x1234` then + /// the start of the returned bytes would be `0xXXXXXXXX1234` where `X` is + /// a placeholder for the function pointers of opcodes `0` and `1`. + /// + /// `IExpressionDeployerV3` contracts use these function pointers to + /// "compile" the expression into something that an interpreter can dispatch + /// directly without paying gas to lookup the same at runtime. As the + /// validity of any integrity check and subsequent dispatch is highly + /// sensitive to both the function pointers and overall bytecode of the + /// interpreter, `IExpressionDeployerV3` contracts SHOULD implement guards + /// against accidentally being deployed onchain paired against an unknown + /// interpreter. It is very easy for an apparent compatible pairing to be + /// subtly and critically incompatible due to addition/removal/reordering of + /// opcodes and compiler optimisations on the interpreter bytecode. + /// + /// This MAY return different values during construction vs. all other times + /// after the interpreter has been successfully deployed onchain. DO NOT rely + /// on function pointers reported during contract construction. + function functionPointers() external view returns (bytes calldata); + + /// The raison d'etre for an interpreter. Given some expression and per-call + /// additional contextual data, produce a stack of results and a set of state + /// changes that the caller MAY OPTIONALLY pass back to be persisted by a + /// call to `IInterpreterStoreV1.set`. + /// + /// There are two key differences between `eval` and `eval2`: + /// - `eval` was ambiguous about whether the top value of the final stack is + /// the first or last item of the array. `eval2` is unambiguous in that the + /// top of the stack MUST be the first item in the array. + /// - `eval2` allows the caller to specify inputs to the entrypoint stack of + /// the expression. This allows the `eval` and `offchainDebugEval` functions + /// to be merged into a single function that can be used for both onchain and + /// offchain evaluation. For example, the caller can simulate "internal" + /// calls by specifying the inputs to the entrypoint stack of the expression + /// as the outputs of some other expression. Legacy behaviour can be achieved + /// by passing an empty array for `inputs`. + /// + /// @param store The storage contract that the returned key/value pairs + /// MUST be passed to IF the calling contract is in a non-static calling + /// context. Static calling contexts MUST pass `address(0)`. + /// @param namespace The fully qualified namespace that will be used by the + /// interpreter at runtime in order to perform gets on the underlying store. + /// @param dispatch All the information required for the interpreter to load + /// an expression, select an entrypoint and return the values expected by the + /// caller. The interpreter MAY encode dispatches differently to + /// `LibEncodedDispatch` but this WILL negatively impact compatibility for + /// calling contracts that hardcode the encoding logic. + /// @param context A 2-dimensional array of data that can be indexed into at + /// runtime by the interpreter. The calling contract is responsible for + /// ensuring the authenticity and completeness of context data. The + /// interpreter MUST revert at runtime if an expression attempts to index + /// into some context value that is not provided by the caller. This implies + /// that context reads cannot be checked for out of bounds reads at deploy + /// time, as the runtime context MAY be provided in a different shape to what + /// the expression is expecting. + /// @param inputs The inputs to the entrypoint stack of the expression. MAY + /// be empty if the caller prefers to specify all inputs via. context. + /// @return stack The list of values produced by evaluating the expression. + /// MUST NOT be longer than the maximum length specified by `dispatch`, if + /// applicable. MUST be ordered such that the top of the stack is the FIRST + /// item in the array. + /// @return writes A list of values to be processed by a store. Most likely + /// will be pairwise key/value items but this is not strictly required if + /// some store expects some other format. + function eval2( + IInterpreterStoreV2 store, + FullyQualifiedNamespace namespace, + EncodedDispatch dispatch, + uint256[][] calldata context, + uint256[] calldata inputs + ) external view returns (uint256[] calldata stack, uint256[] calldata writes); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1.sol new file mode 100644 index 00000000..7239015c --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +struct AuthoringMeta { + // `word` is referenced directly in assembly so don't move the field. + bytes32 word; + uint8 operandParserOffset; + string description; +} + +/// Identical to AuthoringMeta but without operandParserOffset. +struct AuthoringMetaV2 { + // `word` is referenced directly in assembly so don't move the field. It MUST + // be the first item. + bytes32 word; + string description; +} + +interface IParserV1 { + /// Parses a Rainlang string into an evaluable expression. MUST be + /// deterministic and MUST NOT have side effects. The only inputs are the + /// Rainlang string and the parse meta. MAY revert if the Rainlang string + /// is invalid. This function takes `bytes` instead of `string` to allow + /// for definitions of "string" other than UTF-8. + /// @param data The Rainlang bytes to parse. + /// @return bytecode The expressions that can be evaluated. + /// @return constants The constants that can be referenced by sources. + function parse(bytes calldata data) external pure returns (bytes calldata bytecode, uint256[] calldata constants); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1View.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1View.sol new file mode 100644 index 00000000..ea05b524 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/IParserV1View.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {AuthoringMeta, AuthoringMetaV2} from "./IParserV1.sol"; + +/// @title IParserV1View +/// Identical to `IParserV1` except the interface is `view` instead of `pure`. +interface IParserV1View { + /// Parses a Rainlang string into an evaluable expression. MUST be + /// deterministic and MUST NOT have side effects. The only inputs are the + /// Rainlang string and the parse meta. MAY revert if the Rainlang string + /// is invalid. This function takes `bytes` instead of `string` to allow + /// for definitions of "string" other than UTF-8. + /// @param data The Rainlang bytes to parse. + /// @return bytecode The expressions that can be evaluated. + /// @return constants The constants that can be referenced by sources. + function parse(bytes calldata data) external view returns (bytes calldata bytecode, uint256[] calldata constants); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV1.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV1.sol new file mode 100644 index 00000000..59fc4632 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV1.sol @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +/// @dev This is the first compatibility version of the subparser interface. +/// Likely it won't survive long, but it's here to demonstrate the concept. +/// The structure of data for this version is: +/// - bytes [0,1]: The current height of the constants array on the main parser. +/// - bytes [2,2]: The IO byte, that at the time of writing represents the +/// number of inputs to the word. +/// - bytes [3, .. ]: A string slice that the parser could not parse. For well +/// formed rainlang it will be a word and any associated operands, from the +/// first word char to the char before the opening `(` paren. +bytes32 constant COMPATIBLITY_V0 = keccak256("2023.12.17 Rainlang Parser v0"); + +/// @dev This is the second compatibility version of the subparser interface. +/// Likely it won't survive long, but it's here to demonstrate the concept. +/// The structure of data for this version is: +/// - bytes [0,1]: The current height of the constants array on the main parser. +/// - bytes [2,2]: The IO byte, that at the time of writing represents the +/// number of inputs to the word. +/// - bytes [3,4]; Two bytes that encodes N where N is the length in bytes of the +/// rainlang word that could not be parsed in bytes. +/// - bytes [5, N+5]: A string slice that the parser could not parse. For well +/// formed rainlang it will be a word WITHOUT any associated operands. The +/// parsing of operands is handled by the main parser, and the subparser is +/// only expected to parse the word itself and handle the pre-parsed operand +/// values. +/// - bytes [N+5,...]: The operands that the main parser has already parsed as +/// a standard `uint256[]` array. The subparser is expected to handle these +/// operands as-is, and return bytecode that is compatible with the operand +/// values. The first word of the array is the array length. +bytes32 constant COMPATIBLITY_V1 = keccak256("2023.12.26 Rainlang Parser v1"); + +interface ISubParserV1 { + /// Handle parsing some data on behalf of a parser. The structure and meaning + /// of the data is entirely up to the parser, the compatibility version + /// indicates a unique ID for a particular parseble data convention. + /// + /// @param compatibility The compatibility version of the data to parse. The + /// sub parser is free to handle this however it likes, but it MUST revert if + /// it is unsure how to handle the data. E.g. the sub parser MAY revert any + /// compatibility version that is not an exact match to a singular known + /// constant, or it may attempt to support several versions. + /// + /// @param data The data to parse. The main parser will provide arbitrary + /// data that is expected to match the conventions implied by the + /// compatibility version. As sub parsing is a read only operation, any + /// corrupt data could only possibly harm the main parser, which in turn + /// should be parsing as a read only operation to protect itself from + /// malicious inputs. + /// + /// @return success The first return value is a success flag, yet the sub + /// parser MAY REVERT under certain conditions. It is important to know when + /// to revert and when to return false. The general rule is that if the + /// inputs are understood by the subparser, and look wrong to the subparser, + /// then the subparser MUST revert. If the inputs are not understood by the + /// subparser, it MUST NOT revert, as it is not in a position to know if the + /// inputs are wrong or not, and there is very likely some other subparser + /// known to the main parser that can handle the data as a fallback. + /// + /// For example, the following situations are expected to revert: + /// - The compatibility ID is not supported by the sub parser. Every sub + /// parser knows what it is compatible with, so it is safe to revert + /// anything incompatible. + /// - The data parses to something the sub parser knows how to handle, but + /// the data is malformed in some way. For example, the sub parser knows + /// the word it is parsing, but perhaps some associated data such as the + /// constants height is out of a valid range. + /// + /// Similarly, the following situations are expected to return false and not + /// revert: + /// - The compatibility ID is supported by the sub parser, and the data + /// appears to have the correct structure, but there are no recognized + /// words in the data. This MUST NOT revert, as some other sub parser MAY + /// recognize the word and handle it as a fallback. + /// + /// @return bytecode If successful, the second return value is the bytecode + /// that the subparser has generated. The main parser is expected to merge + /// this into the main bytecode as-is, so it MUST match main parser + /// behaviour as per the compatibility conventions. If unsuccessful, a zero + /// length byte array. + /// + /// @return constants If successful, and the generated bytecode implies + /// additions to the constants array, the third return value is the + /// constants that the subparser has generated. The main parser is expected + /// to merge this into the main constants array as-is. If the parsing is + /// unsuccessful, or the generated bytecode does not require any new + /// constants, a zero length array. + function subParse(bytes32 compatibility, bytes calldata data) + external + pure + returns (bool success, bytes calldata bytecode, uint256[] calldata constants); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV2.sol new file mode 100644 index 00000000..7d0f5f00 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v1/ISubParserV2.sol @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Reexports for implementations to use. +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {AuthoringMetaV2} from "./IParserV1.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {Operand} from "./IInterpreterV2.sol"; + +/// @dev A compatibility version for the subparser interface. +/// +/// ## Literal parsing +/// +/// The structure of data for this version is: +/// - bytes [0,1]: The length of the dispatch data as 2 bytes. +/// - bytes [2,N-1+2]: The dispatch data, where N is the length of the dispatch +/// data as defined by the first 2 bytes. This is used by the sub parser to +/// decide which literal parser to use. If there are no matches the sub parser +/// MUST return false and MUST NOT revert. +/// - bytes [N+2,...]: The literal data that the sub parser is being asked to +/// parse. The sub parser MUST revert if it cannot parse the literal, once it +/// has determined that it is the correct sub parser to handle the literal. +/// +/// ## Word parsing +/// +/// The structure of data for this version is: +/// - bytes [0,1]: The current height of the constants array on the main parser. +/// - bytes [2,2]: The IO byte, that at the time of writing represents the +/// number of inputs to the word. +/// - bytes [3,4]; Two bytes that encodes N where N is the length in bytes of the +/// rainlang word that could not be parsed in bytes. +/// - bytes [5, N+5]: A string slice that the parser could not parse. For well +/// formed rainlang it will be a word WITHOUT any associated operands. The +/// parsing of operands is handled by the main parser, and the subparser is +/// only expected to parse the word itself and handle the pre-parsed operand +/// values. +/// - bytes [N+5,...]: The operands that the main parser has already parsed as +/// a standard `uint256[]` array. The subparser is expected to handle these +/// operands as-is, and return bytecode that is compatible with the operand +/// values. The first word of the array is the array length. +bytes32 constant COMPATIBILITY_V2 = keccak256("2023.12.28 Rainlang ISubParserV2"); + +/// @dev A compatibility version for the subparser interface. +/// +/// Identical to COMPATIBILITY_V2, except the IO byte in word parsing now encodes +/// both the inputs and outputs. The IO byte is [2,2] in the word parsing data. +/// The high/leftmost 4 bits of the IO byte encode the number of outputs, and the +/// low/rightmost 4 bits of the IO byte encode the number of inputs. This implies +/// that the number of inputs and outputs must each be less than 16. +bytes32 constant COMPATIBILITY_V3 = keccak256("2024.02.15 Rainlang ISubParserV3"); + +/// @dev A compatibility version for the subparser interface. +/// +/// Identical to COMPATIBLITY_V3, except the main parser now scales decimal +/// literals to 18 fixed point decimals unconditionally. Other literals such as +/// hex are unmodified by this change. +/// +/// Values that are intended to be used as fixed point decimals are unaffected +/// because the main parser is now simply better at parsing them. +/// +/// Values that are intended to be used as integers, such as `1`, need to +/// consider that the original literal may have parsed to +/// e.g. either `1` or `1e18` as the user may have written `1` or `0x01` into the +/// parsed source respectively. +/// +/// Subparsers should be aware of this change and treat exact multiples of +/// `1e18` as integers if and when it makes sense to. +bytes32 constant COMPATIBILITY_V4 = keccak256("2024.05.9 Rainlang ISubParserV2"); + +interface ISubParserV2 { + /// The sub parser is being asked to attempt to parse a literal that the main + /// parser has failed to parse. The sub parser MUST ONLY attempt to parse a + /// literal that matches both the compatibility version and that the data + /// represents a literal that the sub parser is capable of parsing. It is + /// expected that the main parser will attempt multiple sub parsers in order + /// to parse a literal, so the sub parser MUST NOT revert if it does not know + /// how to parse the literal, as some other sub parser may be able to parse + /// it. The sub parser MUST return false if it does not know how to parse the + /// literal, and MUST return true if it does know how to parse the literal, + /// as well as the value of the literal. + /// If the sub parser knows how to parse some literal, but the data is + /// malformed, the sub parser MUST revert. + /// If the compatibility version is not supported, the sub parser MUST + /// revert. + /// + /// Literal parsing is the process of taking a sequence of bytes and + /// converting it into a value that is known at compile time. + /// + /// @param compatibility The compatibility version of the parser that the + /// sub parser must support in order to parse the literal. + /// @param data The data that represents the literal. The structure of this + /// is defined by the conventions for the compatibility version. + /// @return success Whether the sub parser knows how to parse the literal. + /// If the sub parser does know how to handle the literal but cannot due to + /// malformed data, or some other reason, it MUST revert. + /// @return value The value of the literal. + function subParseLiteral(bytes32 compatibility, bytes calldata data) + external + pure + returns (bool success, uint256 value); + + /// The sub parser is being asked to attempt to parse a word that the main + /// parser has failed to parse. The sub parser MUST ONLY attempt to parse a + /// word that matches both the compatibility version and that the data + /// represents a word that the sub parser is capable of parsing. It is + /// expected that the main parser will attempt multiple sub parsers in order + /// to parse a word, so the sub parser MUST NOT revert if it does not know + /// how to parse the word, as some other sub parser may be able to parse + /// it. The sub parser MUST return false if it does not know how to parse the + /// word, and MUST return true if it does know how to parse the word, + /// as well as the bytecode and constants of the word. + /// If the sub parser knows how to parse some word, but the data is + /// malformed, the sub parser MUST revert. + /// + /// Word parsing is the process of taking a sequence of bytes and + /// converting it into a sequence of bytecode and constants that is known at + /// compile time, and will be executed at runtime. As the bytecode executes + /// on the interpreter, not the (sub)parser, the sub parser relies on + /// convention to ensure that it is producing valid bytecode and constants. + /// These conventions are defined by the compatibility versions. + /// + /// @param compatibility The compatibility version of the parser that the + /// sub parser must support in order to parse the word. + /// @param data The data that represents the word. + /// @return success Whether the sub parser knows how to parse the word. + /// If the sub parser does know how to handle the word but cannot due to + /// malformed data, or some other reason, it MUST revert. + /// @return bytecode The bytecode of the word. + /// @return constants The constants of the word. This MAY be empty if the + /// bytecode does not require any new constants. These constants will be + /// merged into the constants of the main parser. + function subParseWord(bytes32 compatibility, bytes calldata data) + external + pure + returns (bool success, bytes memory bytecode, uint256[] memory constants); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterCallerV3.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterCallerV3.sol new file mode 100644 index 00000000..8d3c98f9 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterCallerV3.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {IParserV2} from "../../IParserV2.sol"; +import {IInterpreterStoreV2} from "./IInterpreterStoreV2.sol"; +import {IInterpreterV3} from "./IInterpreterV3.sol"; +import { + + // Exported for convenience. + //forge-lint: disable-start(unused-import) + SignedContextV1, + SIGNED_CONTEXT_SIGNER_OFFSET, + SIGNED_CONTEXT_CONTEXT_OFFSET, + SIGNED_CONTEXT_SIGNATURE_OFFSET +} from "../v1/IInterpreterCallerV2.sol"; + +//forge-lint: disable-end + +/// Struct over the return of `IParserV2.parse2` which MAY be more convenient to +/// work with than raw addresses. +/// @param interpreter Will evaluate the expression. +/// @param store Will store state changes due to evaluation of the expression. +/// @param expression Will be evaluated by the interpreter. +struct EvaluableV3 { + IInterpreterV3 interpreter; + IInterpreterStoreV2 store; + bytes bytecode; +} + +/// @title IInterpreterCallerV3 +/// @notice A contract that calls an `IInterpreterV3` via. `eval3`. There are +/// near zero requirements on a caller other than: +/// +/// - Provide the context, which can be built in a standard way by `LibContext` +/// - Handle the stack array returned from `eval3` +/// - OPTIONALLY emit the `Context` event +/// - OPTIONALLY set state on the `IInterpreterStoreV2` returned from `eval3`. +interface IInterpreterCallerV3 { + /// Calling contracts SHOULD emit `Context` before calling `eval3` if they + /// are able. Notably `eval3` MAY be called within a static call which means + /// that events cannot be emitted, in which case this does not apply. It MAY + /// NOT be useful to emit this multiple times for several eval calls if they + /// all share a common context, in which case a single emit is sufficient. + /// @param sender `msg.sender` building the context. + /// @param context The context that was built. + event Context(address sender, uint256[][] context); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterExternV3.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterExternV3.sol new file mode 100644 index 00000000..0c4cb481 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterExternV3.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {EncodedExternDispatch, ExternDispatch} from "../v1/IInterpreterExternV2.sol"; + +/// @title IInterpreterExternV3 +/// Handle a single dispatch from some calling contract with an array of +/// inputs and array of outputs. Ostensibly useful to build "word packs" for +/// `IInterpreterV2` so that less frequently used words can be provided in +/// a less efficient format, but without bloating the base interpreter in +/// terms of code size. Effectively allows unlimited words to exist as externs +/// alongside interpreters. +/// +/// The difference between V2 and V3 is that V3 integrates with integrity checks. +interface IInterpreterExternV3 { + /// Checks the integrity of some extern call. + /// @param dispatch Encoded information about the extern to dispatch. + /// Analogous to the opcode/operand in the interpreter. + /// @param expectedInputs The number of inputs expected for the dispatched + /// logic. + /// @param expectedOutputs The number of outputs expected for the dispatched + /// logic. + /// @return actualInputs The actual number of inputs for the dispatched + /// logic. + /// @return actualOutputs The actual number of outputs for the dispatched + /// logic. + function externIntegrity(ExternDispatch dispatch, uint256 expectedInputs, uint256 expectedOutputs) + external + view + returns (uint256 actualInputs, uint256 actualOutputs); + + /// Handles a single dispatch. + /// @param dispatch Encoded information about the extern to dispatch. + /// Analogous to the opcode/operand in the interpreter. + /// @param inputs The array of inputs for the dispatched logic. + /// @return outputs The result of the dispatched logic. + function extern(ExternDispatch dispatch, uint256[] calldata inputs) + external + view + returns (uint256[] calldata outputs); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterStoreV2.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterStoreV2.sol new file mode 100644 index 00000000..2798c1f5 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterStoreV2.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {StateNamespace, FullyQualifiedNamespace, NO_STORE} from "../v1/IInterpreterStoreV1.sol"; + +/// @title IInterpreterStoreV2 +/// @notice Tracks state changes on behalf of an interpreter. A single store can +/// handle state changes for many calling contracts, many interpreters and many +/// expressions. The store is responsible for ensuring that applying these state +/// changes is safe from key collisions with calls to `set` from different +/// `msg.sender` callers. I.e. it MUST NOT be possible for a caller to modify the +/// state changes associated with some other caller. +/// +/// The store defines the shape of its own state changes, which is opaque to the +/// calling contract. For example, some store may treat the list of state changes +/// as a pairwise key/value set, and some other store may treat it as a literal +/// list to be stored as-is. +/// +/// Each interpreter decides for itself which store to use based on the +/// compatibility of its own opcodes. +/// +/// The store MUST assume the state changes have been corrupted by the calling +/// contract due to bugs or malicious intent, and enforce state isolation between +/// callers despite arbitrarily invalid state changes. The store MUST revert if +/// it can detect invalid state changes, such as a key/value list having an odd +/// number of items, but this MAY NOT be possible if the corruption is +/// undetectable. +interface IInterpreterStoreV2 { + /// MUST be emitted by the store on `set` to its internal storage. + /// @param namespace The fully qualified namespace that the store is setting. + /// @param key The key that the store is setting. + /// @param value The value that the store is setting. + event Set(FullyQualifiedNamespace namespace, uint256 key, uint256 value); + + /// Mutates the interpreter store in bulk. The bulk values are provided in + /// the form of a `uint256[]` which can be treated e.g. as pairwise keys and + /// values to be stored in a Solidity mapping. The `IInterpreterStoreV2` + /// defines the meaning of the `uint256[]` for its own storage logic. + /// + /// @param namespace The unqualified namespace for the set that MUST be + /// fully qualified by the `IInterpreterStoreV2` to prevent key collisions + /// between callers. The fully qualified namespace forms a compound key with + /// the keys for each value to set. + /// @param kvs The list of changes to apply to the store's internal state. + function set(StateNamespace namespace, uint256[] calldata kvs) external; + + /// Given a fully qualified namespace and key, return the associated value. + /// Ostensibly the interpreter can use this to implement opcodes that read + /// previously set values. The interpreter MUST apply the same qualification + /// logic as the store that it uses to guarantee consistent round tripping of + /// data and prevent malicious behaviours. Technically also allows onchain + /// reads of any set value from any contract, not just interpreters, but in + /// this case readers MUST be aware and handle inconsistencies between get + /// and set while the state changes are still in memory in the calling + /// context and haven't yet been persisted to the store. + /// + /// `IInterpreterStoreV2` uses the same fallback behaviour for unset keys as + /// Solidity. Specifically, any UNSET VALUES SILENTLY FALLBACK TO `0`. + /// @param namespace The fully qualified namespace to get a single value for. + /// @param key The key to get the value for within the namespace. + /// @return The value OR ZERO IF NOT SET. + function get(FullyQualifiedNamespace namespace, uint256 key) external view returns (uint256); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterV3.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterV3.sol new file mode 100644 index 00000000..4308e93a --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/IInterpreterV3.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +import { + IInterpreterStoreV2, + FullyQualifiedNamespace, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + StateNamespace, + SourceIndexV2, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + DEFAULT_STATE_NAMESPACE, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + Operand, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_CONSTANT, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_CONTEXT, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_EXTERN, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_UNKNOWN, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + OPCODE_STACK +} from "../v1/IInterpreterV2.sol"; + +interface IInterpreterV3 { + function functionPointers() external view returns (bytes calldata); + + function eval3( + IInterpreterStoreV2 store, + FullyQualifiedNamespace namespace, + bytes calldata bytecode, + SourceIndexV2 sourceIndex, + uint256[][] calldata context, + uint256[] calldata inputs + ) external view returns (uint256[] calldata stack, uint256[] calldata writes); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/ISubParserV3.sol b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/ISubParserV3.sol new file mode 100644 index 00000000..7a65fae3 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/interface/deprecated/v2/ISubParserV3.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.18; + +// Reexports for implementations to use. +//forge-lint: disable-next-line(unused-import) +import {AuthoringMetaV2} from "../v1/IParserV1.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {Operand} from "../v1/IInterpreterV2.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {COMPATIBILITY_V2, COMPATIBILITY_V3, COMPATIBILITY_V4} from "../v1/ISubParserV2.sol"; + +/// @dev A compatibility version for the subparser interface. +/// +/// Identical to COMPATIBILITY_V4, except that instead of all decimal values +/// being scaled to an 18 decimal fixed point, decimal values are now all +/// packed floating point values as per the canonical Rain implementation. +/// +/// This implies that only hex literals can represent binary integer values. +/// +/// This also implies that negative numbers are valid, and values that are far +/// out of range of fixed point representations. +bytes32 constant COMPATIBILITY_V5 = keccak256("2024.08.25 Rainlang ISubParserV3"); + +/// @title ISubParserV3 +/// Identical to `ISubParserV2` except the interface is `view` instead of `pure`. +interface ISubParserV3 { + /// The sub parser is being asked to attempt to parse a literal that the main + /// parser has failed to parse. The sub parser MUST ONLY attempt to parse a + /// literal that matches both the compatibility version and that the data + /// represents a literal that the sub parser is capable of parsing. It is + /// expected that the main parser will attempt multiple sub parsers in order + /// to parse a literal, so the sub parser MUST NOT revert if it does not know + /// how to parse the literal, as some other sub parser may be able to parse + /// it. The sub parser MUST return false if it does not know how to parse the + /// literal, and MUST return true if it does know how to parse the literal, + /// as well as the value of the literal. + /// If the sub parser knows how to parse some literal, but the data is + /// malformed, the sub parser MUST revert. + /// If the compatibility version is not supported, the sub parser MUST + /// revert. + /// + /// Literal parsing is the process of taking a sequence of bytes and + /// converting it into a value that is known at compile time. + /// + /// @param compatibility The compatibility version of the parser that the + /// sub parser must support in order to parse the literal. + /// @param data The data that represents the literal. The structure of this + /// is defined by the conventions for the compatibility version. + /// @return success Whether the sub parser knows how to parse the literal. + /// If the sub parser does know how to handle the literal but cannot due to + /// malformed data, or some other reason, it MUST revert. + /// @return value The value of the literal. + function subParseLiteral(bytes32 compatibility, bytes calldata data) + external + view + returns (bool success, uint256 value); + + /// The sub parser is being asked to attempt to parse a word that the main + /// parser has failed to parse. The sub parser MUST ONLY attempt to parse a + /// word that matches both the compatibility version and that the data + /// represents a word that the sub parser is capable of parsing. It is + /// expected that the main parser will attempt multiple sub parsers in order + /// to parse a word, so the sub parser MUST NOT revert if it does not know + /// how to parse the word, as some other sub parser may be able to parse + /// it. The sub parser MUST return false if it does not know how to parse the + /// word, and MUST return true if it does know how to parse the word, + /// as well as the bytecode and constants of the word. + /// If the sub parser knows how to parse some word, but the data is + /// malformed, the sub parser MUST revert. + /// + /// Word parsing is the process of taking a sequence of bytes and + /// converting it into a sequence of bytecode and constants that is known at + /// compile time, and will be executed at runtime. As the bytecode executes + /// on the interpreter, not the (sub)parser, the sub parser relies on + /// convention to ensure that it is producing valid bytecode and constants. + /// These conventions are defined by the compatibility versions. + /// + /// @param compatibility The compatibility version of the parser that the + /// sub parser must support in order to parse the word. + /// @param data The data that represents the word. + /// @return success Whether the sub parser knows how to parse the word. + /// If the sub parser does know how to handle the word but cannot due to + /// malformed data, or some other reason, it MUST revert. + /// @return bytecode The bytecode of the word. + /// @return constants The constants of the word. This MAY be empty if the + /// bytecode does not require any new constants. These constants will be + /// merged into the constants of the main parser. + function subParseWord(bytes32 compatibility, bytes calldata data) + external + view + returns (bool success, bytes memory bytecode, uint256[] memory constants); +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/lib/bytecode/LibBytecode.sol b/dependencies/rain-interpreter-interface-0.1.0/src/lib/bytecode/LibBytecode.sol new file mode 100644 index 00000000..46973a26 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/lib/bytecode/LibBytecode.sol @@ -0,0 +1,324 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {LibPointer, Pointer} from "rain-solmem-0.1.3/src/lib/LibPointer.sol"; +import {LibBytes} from "rain-solmem-0.1.3/src/lib/LibBytes.sol"; +import {LibMemCpy} from "rain-solmem-0.1.3/src/lib/LibMemCpy.sol"; +import { + StackSizingsNotMonotonic, + TruncatedSource, + UnexpectedTrailingOffsetBytes, + TruncatedHeader, + TruncatedHeaderOffsets, + UnexpectedSources, + SourceIndexOutOfBounds +} from "../../error/ErrBytecode.sol"; + +/// @title LibBytecode +/// @notice A library for inspecting the bytecode of an expression. Largely +/// focused on reading the source headers rather than the opcodes themselves. +/// Designed to be efficient enough to be used in the interpreter directly. +/// As such, it is not particularly safe, notably it always assumes that the +/// headers are not lying about the structure and runtime behaviour of the +/// bytecode. This is by design as it allows much more simple, efficient and +/// decoupled implementation of authoring/parsing logic, which makes the author +/// of an expression responsible for producing well formed bytecode, such as +/// balanced LHS/RHS stacks. The deployment integrity checks are responsible for +/// checking that the headers match the structure and behaviour of the bytecode. +library LibBytecode { + using LibPointer for Pointer; + using LibBytes for bytes; + using LibMemCpy for Pointer; + + /// The number of sources in the bytecode. + /// If the bytecode is empty, returns 0. + /// Otherwise, returns the first byte of the bytecode, which is the number + /// of sources. + /// Implies that 0x and 0x00 are equivalent, both having 0 sources. For this + /// reason, contracts that handle bytecode MUST NOT rely on simple data + /// length checks to determine if the bytecode is empty or not. + /// DOES NOT check the integrity or even existence of the sources. + /// @param bytecode The bytecode to inspect. + /// @return count The number of sources in the bytecode. + function sourceCount(bytes memory bytecode) internal pure returns (uint256 count) { + if (bytecode.length == 0) { + return 0; + } + assembly ("memory-safe") { + // The first byte of rain bytecode is the count of how many sources + // there are. + count := byte(0, mload(add(bytecode, 0x20))) + } + } + + /// Checks the structural integrity of the bytecode from the perspective of + /// potential out of bounds reads. Will revert if the bytecode is not + /// well-formed. This check MUST be done BEFORE any attempts at per-opcode + /// integrity checks, as the per-opcode checks assume that the headers define + /// valid regions in memory to iterate over. + /// + /// Checks: + /// - The offsets are populated according to the source count. + /// - The offsets point to positions within the bytecode `bytes`. + /// - There exists at least the 4 byte header for each source at the offset, + /// within the bounds of the bytecode `bytes`. + /// - The number of opcodes specified in the header of each source locates + /// the end of the source exactly at either the offset of the next source + /// or the end of the bytecode `bytes`. + /// Monotonically increasing offsets are implicitly enforced by contiguity: + /// each source must end exactly where the next begins. + /// @param bytecode The bytecode to validate. + //forge-lint: disable-next-line(mixed-case-function) + function checkNoOOBPointers(bytes memory bytecode) internal pure { + unchecked { + uint256 count = sourceCount(bytecode); + // The common case is that there are more than 0 sources. + if (count > 0) { + uint256 sourcesRelativeStart = 1 + count * 2; + if (sourcesRelativeStart > bytecode.length) { + revert TruncatedHeaderOffsets(bytecode); + } + uint256 sourcesStart; + assembly ("memory-safe") { + sourcesStart := add(bytecode, add(0x20, sourcesRelativeStart)) + } + + // Start at the end of the bytecode and work backwards. Find the + // last unchecked relative offset, follow it, read the opcode + // count from the header, and check that ends at the end cursor. + // Set the end cursor to the relative offset then repeat until + // there are no more unchecked relative offsets. The endCursor + // as a relative offset must be 0 at the end of this process + // (i.e. the first relative offset is always 0). + uint256 endCursor; + assembly ("memory-safe") { + endCursor := add(bytecode, add(0x20, mload(bytecode))) + } + // This cursor points at the 2 byte relative offset that we need + // to check next. + uint256 uncheckedOffsetCursor; + uint256 end; + assembly ("memory-safe") { + uncheckedOffsetCursor := add(bytecode, add(0x21, mul(sub(count, 1), 2))) + end := add(bytecode, 0x21) + } + + while (uncheckedOffsetCursor >= end) { + // Read the relative offset from the bytecode. + uint256 relativeOffset; + assembly ("memory-safe") { + relativeOffset := shr(0xF0, mload(uncheckedOffsetCursor)) + } + uint256 absoluteOffset = sourcesStart + relativeOffset; + + // Check that the 4 byte header is within the upper bound + // established by the end cursor before attempting to read + // from it. + uint256 headerEnd = absoluteOffset + 4; + if (headerEnd > endCursor) { + revert TruncatedHeader(bytecode); + } + + // The ops count is the first byte of the header. + uint256 opsCount; + { + // The stack allocation, inputs, and outputs are the next + // 3 bytes of the header. We can't know exactly what they + // need to be according to the opcodes without checking + // every opcode implementation, but we can check that + // they satisfy the invariant + // `inputs <= outputs <= stackAllocation`. + // Note that the outputs may include the inputs, as the + // outputs is merely the final stack size. + uint256 stackAllocation; + uint256 inputs; + uint256 outputs; + assembly ("memory-safe") { + let data := mload(absoluteOffset) + opsCount := byte(0, data) + stackAllocation := byte(1, data) + inputs := byte(2, data) + outputs := byte(3, data) + } + + if (inputs > outputs || outputs > stackAllocation) { + revert StackSizingsNotMonotonic(bytecode, relativeOffset); + } + } + + // The ops count is the number of 4 byte opcodes in the + // source. Check that the end of the source is at the end + // cursor. + uint256 sourceEnd = headerEnd + opsCount * 4; + if (sourceEnd != endCursor) { + revert TruncatedSource(bytecode); + } + + // Move the end cursor to the start of the header. + endCursor = absoluteOffset; + // Move the unchecked offset cursor to the previous offset. + uncheckedOffsetCursor -= 2; + } + + // If the end cursor is not pointing at the absolute start of the + // sources, then somehow the bytecode has malformed data between + // the offsets and the sources. + if (endCursor != sourcesStart) { + revert UnexpectedTrailingOffsetBytes(bytecode); + } + } else { + // If there are no sources the bytecode is either 0 length or a + // single 0 byte, which we already implicity checked by reaching + // this code path. Ensure the bytecode has no trailing bytes. + if (bytecode.length > 1) { + revert UnexpectedSources(bytecode); + } + } + } + } + + /// The relative byte offset of a source in the bytecode. + /// This is the offset from the start of the first source header, which is + /// after the source count byte and the source offsets. + /// This function DOES NOT check that the relative offset is within the + /// bounds of the bytecode. Callers MUST `checkNoOOBPointers` BEFORE + /// attempting to traverse the bytecode, otherwise the relative offset MAY + /// point to memory outside the bytecode `bytes`. + /// @param bytecode The bytecode to inspect. + /// @param sourceIndex The index of the source to inspect. + /// @return offset The relative byte offset of the source in the bytecode. + function sourceRelativeOffset(bytes memory bytecode, uint256 sourceIndex) internal pure returns (uint256 offset) { + // If the source index requested is out of bounds, revert. + if (sourceIndex >= sourceCount(bytecode)) { + revert SourceIndexOutOfBounds(sourceIndex, bytecode); + } + assembly ("memory-safe") { + // After the first byte, all the relative offset pointers are + // stored sequentially as 16 bit values. + offset := and(mload(add(add(bytecode, 3), mul(sourceIndex, 2))), 0xFFFF) + } + } + + /// The absolute byte pointer of a source in the bytecode. Points to the + /// header of the source, NOT the first opcode. + /// This function DOES NOT check that the source index is within the bounds + /// of the bytecode. Callers MUST `checkNoOOBPointers` BEFORE attempting to + /// traverse the bytecode, otherwise the relative offset MAY point to memory + /// outside the bytecode `bytes`. + /// @param bytecode The bytecode to inspect. + /// @param sourceIndex The index of the source to inspect. + /// @return pointer The absolute byte pointer of the source in the bytecode. + function sourcePointer(bytes memory bytecode, uint256 sourceIndex) internal pure returns (Pointer pointer) { + unchecked { + uint256 sourcesStartOffset = 1 + sourceCount(bytecode) * 2; + uint256 offset = sourceRelativeOffset(bytecode, sourceIndex); + assembly ("memory-safe") { + pointer := add(add(add(bytecode, 0x20), sourcesStartOffset), offset) + } + } + } + + /// The number of opcodes in a source. + /// This function DOES NOT check that the source index is within the bounds + /// of the bytecode. Callers MUST `checkNoOOBPointers` BEFORE attempting to + /// traverse the bytecode, otherwise the relative offset MAY point to memory + /// outside the bytecode `bytes`. + /// @param bytecode The bytecode to inspect. + /// @param sourceIndex The index of the source to inspect. + /// @return opsCount The number of opcodes in the source. + function sourceOpsCount(bytes memory bytecode, uint256 sourceIndex) internal pure returns (uint256 opsCount) { + unchecked { + Pointer pointer = sourcePointer(bytecode, sourceIndex); + assembly ("memory-safe") { + opsCount := byte(0, mload(pointer)) + } + } + } + + /// The number of stack slots allocated by a source. This is the number of + /// 32 byte words that MUST be allocated for the stack for the given source + /// index to avoid memory corruption when executing the source. + /// This function DOES NOT check that the source index is within the bounds + /// of the bytecode. Callers MUST `checkNoOOBPointers` BEFORE attempting to + /// traverse the bytecode, otherwise the relative offset MAY point to memory + /// outside the bytecode `bytes`. + /// @param bytecode The bytecode to inspect. + /// @param sourceIndex The index of the source to inspect. + /// @return allocation The number of stack slots allocated by the source. + function sourceStackAllocation(bytes memory bytecode, uint256 sourceIndex) + internal + pure + returns (uint256 allocation) + { + unchecked { + Pointer pointer = sourcePointer(bytecode, sourceIndex); + assembly ("memory-safe") { + allocation := byte(1, mload(pointer)) + } + } + } + + /// The number of inputs and outputs of a source. + /// This function DOES NOT check that the source index is within the bounds + /// of the bytecode. Callers MUST `checkNoOOBPointers` BEFORE attempting to + /// traverse the bytecode, otherwise the relative offset MAY point to memory + /// outside the bytecode `bytes`. + /// Note that both the inputs and outputs are always returned togther, this + /// is because the caller SHOULD be checking both together whenever using + /// some bytecode. Returning two values is more efficient than two separate + /// function calls. + /// @param bytecode The bytecode to inspect. + /// @param sourceIndex The index of the source to inspect. + /// @return inputs The number of inputs of the source. + /// @return outputs The number of outputs of the source. + function sourceInputsOutputsLength(bytes memory bytecode, uint256 sourceIndex) + internal + pure + returns (uint256 inputs, uint256 outputs) + { + unchecked { + Pointer pointer = sourcePointer(bytecode, sourceIndex); + assembly ("memory-safe") { + let data := mload(pointer) + inputs := byte(2, data) + outputs := byte(3, data) + } + } + } + + /// Backwards compatibility with the old way of representing sources. + /// Requires allocation and copying so it isn't particularly efficient, but + /// allows us to use the new bytecode format with old interpreter code. Not + /// recommended for production code but useful for testing. + /// Callers MUST `checkNoOOBPointers` BEFORE calling this function, + /// otherwise memory outside the bytecode `bytes` MAY be read. + /// @param bytecode The bytecode to convert to legacy source format. + /// @return The individual source arrays in legacy format. + function bytecodeToSources(bytes memory bytecode) internal pure returns (bytes[] memory) { + unchecked { + uint256 count = sourceCount(bytecode); + bytes[] memory sources = new bytes[](count); + for (uint256 i = 0; i < count; i++) { + // Skip over the prefix 4 bytes. + Pointer pointer = sourcePointer(bytecode, i).unsafeAddBytes(4); + uint256 length = sourceOpsCount(bytecode, i) * 4; + bytes memory source = new bytes(length); + pointer.unsafeCopyBytesTo(source.dataPointer(), length); + // Move the opcode index one byte for each opcode, into the input + // position, as legacly sources did not have input bytes. + assembly ("memory-safe") { + for { + let cursor := add(source, 0x20) + let end := add(cursor, length) + } lt(cursor, end) { cursor := add(cursor, 4) } { + mstore8(add(cursor, 1), byte(0, mload(cursor))) + mstore8(cursor, 0) + } + } + sources[i] = source; + } + return sources; + } + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibContext.sol b/dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibContext.sol new file mode 100644 index 00000000..bbb3a125 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibContext.sol @@ -0,0 +1,224 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {LibHashNoAlloc, HASH_NIL} from "rain-lib-hash-0.1.0/src/LibHashNoAlloc.sol"; + +import {SignatureChecker} from "@openzeppelin-contracts-5.6.1/utils/cryptography/SignatureChecker.sol"; +import {MessageHashUtils} from "@openzeppelin-contracts-5.6.1/utils/cryptography/MessageHashUtils.sol"; + +import { + SignedContextV1, + SIGNED_CONTEXT_SIGNER_OFFSET, + SIGNED_CONTEXT_SIGNATURE_OFFSET, + SIGNED_CONTEXT_CONTEXT_OFFSET +} from "../../interface/IInterpreterCallerV4.sol"; + +/// Thrown when the ith signature from a list of signed contexts is invalid. +/// @param i The index of the invalid signature in the list of signed contexts. +error InvalidSignature(uint256 i); + +/// @dev CONTEXT_BASE_COLUMN and CONTEXT_BASE_ROWS are the dimensions of the base +/// context provided by `LibContext.base()`. These constants are not required to +/// use the base context but are provided for convenience when working with it. +uint256 constant CONTEXT_BASE_COLUMN = 0; +/// @dev CONTEXT_BASE_ROWS is the number of rows in the base context, which is +/// always 2 for the `msg.sender` and address of the calling contract. +uint256 constant CONTEXT_BASE_ROWS = 2; + +/// @dev The row index of the `msg.sender` in the base context. +uint256 constant CONTEXT_BASE_ROW_SENDER = 0; +/// @dev The row index of the address of the calling contract in the base +/// context. +uint256 constant CONTEXT_BASE_ROW_CALLING_CONTRACT = 1; + +/// @title LibContext +/// @notice Conventions for working with context as a calling contract. All of +/// this functionality is OPTIONAL but probably useful for the majority of use +/// cases. By building and authenticating onchain, caller provided and signed +/// contexts all in a standard way the overall usability of context is greatly +/// improved for expression authors and readers. Any calling contract that can +/// match the context expectations of an existing expression is one large step +/// closer to compatibility and portability, inheriting network effects of what +/// has already been authored elsewhere. +library LibContext { + /// The base context is the `msg.sender` and address of the calling contract. + /// As the interpreter itself is called via an external interface and may be + /// statically calling itself, it MAY NOT have any ability to inspect either + /// of these values. Even if this were not the case the calling contract + /// cannot assume the existence of some opcode(s) in the interpreter that + /// inspect the caller, so providing these two values as context is + /// sufficient to decouple the calling contract from the interpreter. It is + /// STRONGLY RECOMMENDED that even if the calling contract has "no context" + /// that it still provides this base to every `eval`. + /// + /// Calling contracts DO NOT need to call this directly. It is built and + /// merged automatically into the standard context built by `build`. + /// + /// @return baseArray The `msg.sender` and address of the calling contract using this + /// library, as a context-compatible array. + function base() internal view returns (bytes32[] memory baseArray) { + assembly ("memory-safe") { + baseArray := mload(0x40) + mstore(baseArray, 2) + mstore(add(baseArray, 0x20), caller()) + mstore(add(baseArray, 0x40), address()) + mstore(0x40, add(baseArray, 0x60)) + } + } + + /// Standard hashing process over a single `SignedContextV1`. Notably used + /// to hash a list as `SignedContextV1[]` but could also be used to hash a + /// single `SignedContextV1` in isolation. Avoids allocating memory by + /// hashing each struct field in sequence within the memory scratch space. + /// @param signedContext The signed context to hash. + /// @return hashed The hashed signed context. + function hash(SignedContextV1 memory signedContext) internal pure returns (bytes32 hashed) { + uint256 signerOffset = SIGNED_CONTEXT_SIGNER_OFFSET; + uint256 contextOffset = SIGNED_CONTEXT_CONTEXT_OFFSET; + uint256 signatureOffset = SIGNED_CONTEXT_SIGNATURE_OFFSET; + + assembly ("memory-safe") { + mstore(0, keccak256(add(signedContext, signerOffset), 0x20)) + + let context_ := mload(add(signedContext, contextOffset)) + mstore(0x20, keccak256(add(context_, 0x20), mul(mload(context_), 0x20))) + + mstore(0, keccak256(0, 0x40)) + + let signature_ := mload(add(signedContext, signatureOffset)) + mstore(0x20, keccak256(add(signature_, 0x20), mload(signature_))) + + hashed := keccak256(0, 0x40) + } + } + + /// Standard hashing process over a list of signed contexts. Situationally + /// useful if the calling contract wants to record that it has seen a set of + /// signed data then later compare it against some input (e.g. to ensure that + /// many calls of some function all share the same input values). Note that + /// unlike the internals of `build`, this hashes over the signer and the + /// signature, to ensure that some data cannot be re-signed and used under + /// a different provenance later. + /// @param signedContexts The list of signed contexts to hash over. + /// @return hashed The hash of the signed contexts. + function hash(SignedContextV1[] memory signedContexts) internal pure returns (bytes32 hashed) { + uint256 cursor; + uint256 end; + bytes32 hashNil = HASH_NIL; + assembly ("memory-safe") { + cursor := add(signedContexts, 0x20) + end := add(cursor, mul(mload(signedContexts), 0x20)) + mstore(0, hashNil) + } + + SignedContextV1 memory signedContext; + bytes32 mem0; + while (cursor < end) { + assembly ("memory-safe") { + signedContext := mload(cursor) + // Subhash will write to 0 for its own hashing so keep a copy + // before it gets overwritten. + mem0 := mload(0) + } + bytes32 subHash = hash(signedContext); + assembly ("memory-safe") { + mstore(0, mem0) + mstore(0x20, subHash) + mstore(0, keccak256(0, 0x40)) + cursor := add(cursor, 0x20) + } + } + assembly ("memory-safe") { + hashed := mload(0) + } + } + + /// Builds a standard 2-dimensional context array from base, calling and + /// signed contexts. Note that "columns" of a context array refer to each + /// `uint256[]` and each item within a `uint256[]` is a "row". + /// + /// @param baseContext Anything the calling contract can provide which MAY + /// include input from the `msg.sender` of the calling contract. The default + /// base context from `LibContext.base()` DOES NOT need to be provided by the + /// caller, this matrix MAY be empty and will be simply merged into the final + /// context. The base context matrix MUST contain a consistent number of + /// columns from the calling contract so that the expression can always + /// predict how many unsigned columns there will be when it runs. + /// @param signedContexts Signed contexts are provided by the `msg.sender` + /// but signed by a third party. The expression (author) defines _who_ may + /// sign and the calling contract authenticates the signature over the + /// signed data. Technically `build` handles all the authentication inline + /// for the calling contract so if some context builds it can be treated as + /// authentic. The builder WILL REVERT if any of the signatures are invalid. + /// Note two things about the structure of the final built context re: signed + /// contexts: + /// - The first signed column is a list of the signers in order of what they signed + /// - The `msg.sender` can provide an arbitrary number of signed contexts so + /// expressions DO NOT know exactly how many columns there are. + /// The expression is responsible for defining e.g. a domain separator in a + /// position that would force signed context to be provided in the "correct" + /// order, rather than relying on the `msg.sender` to honestly present data + /// in any particular structure/order. + /// @return The fully assembled context matrix. Column 0 is the base context + /// from `LibContext.base()`. Subsequent columns are from `baseContext`. + /// If signed contexts are provided, those are followed by a signers column + /// (each signer address cast to `bytes32`) and then each signed context's + /// data as individual columns. + function build(bytes32[][] memory baseContext, SignedContextV1[] memory signedContexts) + internal + view + returns (bytes32[][] memory) + { + unchecked { + bytes32[] memory signers = new bytes32[](signedContexts.length); + + // - LibContext.base() + whatever we are provided. + // - signed contexts + signers if they exist else nothing. + uint256 contextLength = 1 + baseContext.length + (signedContexts.length > 0 ? signedContexts.length + 1 : 0); + + bytes32[][] memory context = new bytes32[][](contextLength); + uint256 offset = 0; + context[offset] = LibContext.base(); + + for (uint256 i = 0; i < baseContext.length; i++) { + offset++; + context[offset] = baseContext[i]; + } + + if (signedContexts.length > 0) { + offset++; + context[offset] = signers; + + for (uint256 i = 0; i < signedContexts.length; i++) { + if ( + // Unlike `LibContext.hash` we can only hash over + // the context as it's impossible for a signature + // to sign itself. + // Note the use of encodePacked here over a + // single array, not including the length. This + // would be a security issue if multiple dynamic + // length values were hashed over together as + // then many possible inputs could collide with + // a single encoded output. + !SignatureChecker.isValidSignatureNow( + signedContexts[i].signer, + MessageHashUtils.toEthSignedMessageHash( + LibHashNoAlloc.hashWords(signedContexts[i].context) + ), + signedContexts[i].signature + ) + ) { + revert InvalidSignature(i); + } + + signers[i] = bytes32(uint256(uint160(signedContexts[i].signer))); + offset++; + context[offset] = signedContexts[i].context; + } + } + + return context; + } + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibEvaluable.sol b/dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibEvaluable.sol new file mode 100644 index 00000000..f2b7859c --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/lib/caller/LibEvaluable.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// Export dispair interfaces for convenience downstream. +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {IInterpreterStoreV3} from "../../interface/IInterpreterStoreV3.sol"; + +import {EvaluableV4} from "../../interface/IInterpreterCallerV4.sol"; + +// Number of fixed-size fields (interpreter, store) in `EvaluableV4` before +// the dynamic `bytecode` pointer. 2 fields * 0x20 bytes each = 0x40. +uint256 constant EVALUABLE_V4_FIXED_FIELDS_SIZE = 0x40; + +/// @title LibEvaluable +/// @notice Common logic to provide consistent implementations of common tasks +/// that could be arbitrarily/ambiguously implemented, but work much better if +/// consistently implemented. +library LibEvaluable { + /// Hashes an `EvaluableV4`, ostensibly so that only the hash need be stored, + /// thus only storing a single `bytes32` instead of 2x `address` and an + /// arbitrary length `bytes`. + /// https://github.com/rainlanguage/rain.lib.hash?tab=readme-ov-file#the-pattern + /// @param evaluable The evaluable to hash. + /// @return evaluableHash Standard hash of the evaluable. + function hash(EvaluableV4 memory evaluable) internal pure returns (bytes32) { + bytes memory bytecode = evaluable.bytecode; + bytes32 evaluableHash; + assembly ("memory-safe") { + // Hash first fields of evaluable (interpreter + store). + mstore(0, keccak256(evaluable, EVALUABLE_V4_FIXED_FIELDS_SIZE)) + // Hash bytecode. + mstore(0x20, keccak256(add(bytecode, 0x20), mload(bytecode))) + + // Hash the two hashes. + evaluableHash := keccak256(0, 0x40) + } + return evaluableHash; + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/lib/codegen/LibGenParseMeta.sol b/dependencies/rain-interpreter-interface-0.1.0/src/lib/codegen/LibGenParseMeta.sol new file mode 100644 index 00000000..7f713462 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/lib/codegen/LibGenParseMeta.sol @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {AuthoringMetaV2} from "../../interface/IParserV2.sol"; +import { + META_ITEM_SIZE, + FINGERPRINT_MASK, + META_EXPANSION_SIZE, + META_PREFIX_SIZE, + LibParseMeta +} from "../parse/LibParseMeta.sol"; +import {LibCtPop} from "rain-math-binary-0.1.1/src/lib/LibCtPop.sol"; +import {Vm} from "forge-std-1.16.1/src/Vm.sol"; +import {LibCodeGen} from "rain-sol-codegen-0.1.0/src/lib/LibCodeGen.sol"; + +uint256 constant META_ITEM_MASK = type(uint32).max; + +/// @dev For metadata builder. +error DuplicateFingerprint(); + +/// @dev Thrown when the authoring meta exceeds 256 words. Opcode indices are +/// stored in a single byte, so more than 256 words cannot be represented. +error AuthoringMetaTooLarge(uint256 length); + +/// @dev Thrown when the authoring meta cannot be compressed within the +/// provided maxDepth bloom filter layers. +error MaxDepthExceeded(uint8 maxDepth); + +/// @title LibGenParseMeta +/// @notice Library for building parse meta from authoring meta, and generating +/// constant strings for the parse meta to be used in generated code. The parse +/// meta is a bytes array that is used to lookup word definitions. The parse meta +/// is built from the authoring meta, which is an array of `AuthoringMetaV2` that +/// contains the word and its corresponding opcode index. The parse meta is +/// structured in a way that allows for efficient lookups of word definitions +/// using bloom filters and fingerprints. The library provides functions to find +/// the best expander for a given set of authoring meta, build the parse meta +/// from the authoring meta and build depth, and generate a constant string for +/// the parse meta with a comment describing its structure. The main purpose of +/// this library is to optimize the size of the parse meta while maintaining +/// efficient lookups, which is important for the performance of the interpreter. +library LibGenParseMeta { + /// @dev Finds the best expander for a given set of authoring meta. The best + /// expander is the one that produces the densest bloom filter at each depth, + /// which minimizes the number of items that need to be checked for each + /// lookup. The function returns the best seed, the corresponding expansion, + /// and the remaining authoring meta that could not be expanded with this + /// seed. The remaining authoring meta can then be used to find the next best + /// expander until all authoring meta has been expanded. + /// @param metas The authoring meta to find the best expander for. + /// @return bestSeed The best seed for the given authoring meta. + /// @return bestExpansion The corresponding expansion for the best seed. + /// @return remaining The remaining authoring meta that could not be expanded + /// with the best seed. + function findBestExpander(AuthoringMetaV2[] memory metas) + internal + pure + returns (uint8 bestSeed, uint256 bestExpansion, AuthoringMetaV2[] memory remaining) + { + unchecked { + { + uint256 bestCt = 0; + for (uint256 seed = 0; seed <= type(uint8).max; seed++) { + uint256 expansion = 0; + for (uint256 i = 0; i < metas.length; i++) { + //slither-disable-next-line unused-return + (uint256 shifted,) = LibParseMeta.wordBitmapped(seed, metas[i].word); + expansion = shifted | expansion; + } + uint256 ct = LibCtPop.ctpop(expansion); + if (ct > bestCt) { + bestCt = ct; + // Seed is within 1 byte. + //forge-lint: disable-next-line(unsafe-typecast) + bestSeed = uint8(seed); + bestExpansion = expansion; + } + // perfect expansion. + if (ct == metas.length) { + break; + } + } + + uint256 remainingLength = metas.length - bestCt; + assembly ("memory-safe") { + remaining := mload(0x40) + mstore(remaining, remainingLength) + mstore(0x40, add(remaining, mul(0x20, add(1, remainingLength)))) + } + } + uint256 usedExpansion = 0; + uint256 j = 0; + for (uint256 i = 0; i < metas.length; i++) { + //slither-disable-next-line unused-return + (uint256 shifted,) = LibParseMeta.wordBitmapped(bestSeed, metas[i].word); + if ((shifted & usedExpansion) == 0) { + usedExpansion = shifted | usedExpansion; + } else { + remaining[j] = metas[i]; + j++; + } + } + } + } + + /// @dev Builds the parse meta from the authoring meta and build depth. The + /// parse meta is a bytes array with the following structure: + /// - 1 byte: The depth of the bloom filters + /// - 1 byte: The hashing seed + /// - The bloom filters, each is 32 bytes long, one for each build depth + /// - All the items for each word, each is 4 bytes long. Each item's first + /// byte is its opcode index, the remaining 3 bytes are the word + /// fingerprint. + /// The parse meta is used to lookup word definitions. To do a lookup, the + /// word is hashed with the seed, then the first byte of the hash selects a + /// bit in the bloom filter. If the bit is not set, the word is not in the + /// set — return immediately. If the bit is set, we count the number of 1 + /// bits in the bloom filter below this item's bit. We then treat this as + /// the index of the item in the items array. We then compare the word + /// fingerprint against the fingerprint of the item at this index. If the + /// fingerprints equal then we have a match, else we increment the seed and + /// try again with the next bloom filter, offsetting all the indexes by the + /// total bit count of the previous bloom filter. If we reach the end of the + /// bloom filters then we have a miss. + /// The output is validated via `LibParseMeta.checkParseMetaStructure` + /// before returning. Reverts with `MaxDepthExceeded` if the words cannot + /// be compressed within `maxDepth` layers, or `AuthoringMetaTooLarge` if + /// there are more than 256 words. + /// @param authoringMeta The authoring meta to build the parse meta from. + /// @param maxDepth The maximum depth of the bloom filters to use. This is a + /// tradeoff between the size of the parse meta and the speed of lookups. The + /// main reason to increase the depth is during generation there may be an + /// unresolvable collision at a certain depth, so we need to increase the + /// depth to resolve it. + /// @return parseMeta The parse meta built from the authoring meta and build + /// depth. + function buildParseMetaV2(AuthoringMetaV2[] memory authoringMeta, uint8 maxDepth) + internal + pure + returns (bytes memory parseMeta) + { + unchecked { + // Opcode index is stored in a single byte, so we cannot handle + // more than 256 words. + if (authoringMeta.length > 256) { + revert AuthoringMetaTooLarge(authoringMeta.length); + } + // Write out expansions. + uint8[] memory seeds; + uint256[] memory expansions; + uint256 dataStart; + { + uint256 depth = 0; + seeds = new uint8[](maxDepth); + expansions = new uint256[](maxDepth); + { + AuthoringMetaV2[] memory remainingAuthoringMeta = authoringMeta; + while (remainingAuthoringMeta.length > 0) { + if (depth >= maxDepth) { + revert MaxDepthExceeded(maxDepth); + } + uint8 seed; + uint256 expansion; + (seed, expansion, remainingAuthoringMeta) = findBestExpander(remainingAuthoringMeta); + seeds[depth] = seed; + expansions[depth] = expansion; + depth++; + } + } + + uint256 parseMetaLength = + META_PREFIX_SIZE + depth * META_EXPANSION_SIZE + authoringMeta.length * META_ITEM_SIZE; + parseMeta = new bytes(parseMetaLength); + assembly ("memory-safe") { + mstore8(add(parseMeta, 0x20), depth) + } + for (uint256 j = 0; j < depth; j++) { + assembly ("memory-safe") { + // Write each seed immediately before its expansion. + let seedWriteAt := add(add(parseMeta, 0x21), mul(0x21, j)) + mstore8(seedWriteAt, mload(add(seeds, add(0x20, mul(0x20, j))))) + mstore(add(seedWriteAt, 1), mload(add(expansions, add(0x20, mul(0x20, j))))) + } + } + + { + // dataStart is set so that mload(dataStart + pos * META_ITEM_SIZE) + // places the 4-byte item at bytes 28–31 of the loaded word, + // matching the byte(28, ...) extraction in lookupWord. + // This works because the offset omits the 0x20 bytes-length + // prefix and adds META_ITEM_SIZE instead, creating a 28-byte + // backset (0x20 - META_ITEM_SIZE = 28) from the first item's + // actual memory address. + uint256 dataOffset = META_PREFIX_SIZE + META_ITEM_SIZE + depth * META_EXPANSION_SIZE; + assembly ("memory-safe") { + dataStart := add(parseMeta, dataOffset) + } + } + } + + // Write words. + for (uint256 k = 0; k < authoringMeta.length; k++) { + uint256 s = 0; + uint256 cumulativePos = 0; + while (true) { + uint256 toWrite; + uint256 writeAt; + + // Need some careful scoping here to avoid stack too deep. + { + uint256 expansion = expansions[s]; + + uint256 hashed; + { + uint256 shifted; + (shifted, hashed) = LibParseMeta.wordBitmapped(seeds[s], authoringMeta[k].word); + + uint256 metaItemSize = META_ITEM_SIZE; + uint256 pos = LibCtPop.ctpop(expansion & (shifted - 1)) + cumulativePos; + assembly ("memory-safe") { + writeAt := add(dataStart, mul(pos, metaItemSize)) + } + } + + { + uint256 wordFingerprint = hashed & FINGERPRINT_MASK; + uint256 posFingerprint; + assembly ("memory-safe") { + posFingerprint := mload(writeAt) + } + posFingerprint &= FINGERPRINT_MASK; + if (posFingerprint != 0) { + if (posFingerprint == wordFingerprint) { + revert DuplicateFingerprint(); + } + // Collision, try next expansion. + s++; + cumulativePos = cumulativePos + LibCtPop.ctpop(expansion); + continue; + } + // Not collision, prepare the write with the + // fingerprint and index. + toWrite = wordFingerprint | (k << 0x18); + } + } + + uint256 mask = ~META_ITEM_MASK; + assembly ("memory-safe") { + mstore(writeAt, or(and(mload(writeAt), mask), toWrite)) + } + // We're done with this word. + break; + } + } + + LibParseMeta.checkParseMetaStructure(parseMeta); + } + } + + /// @dev Builds a constant string containing the parse meta, which can be + /// used in generated code. The string also includes a comment describing the + /// structure of the parse meta for future reference. + /// @param vm The Vm instance to use for generating the constant string. + /// @param authoringMetaBytes The abi-encoded authoring meta to build the + /// parse meta from. + /// @param buildDepth The build depth to use for the parse meta. + /// @return A constant string containing the parse meta, with a comment + /// describing its structure. + function parseMetaConstantString(Vm vm, bytes memory authoringMetaBytes, uint8 buildDepth) + internal + pure + returns (string memory) + { + AuthoringMetaV2[] memory authoringMeta = abi.decode(authoringMetaBytes, (AuthoringMetaV2[])); + return string.concat( + LibCodeGen.bytesConstantString( + vm, + string.concat( + "/// @dev The parse meta that is used to lookup word definitions.\n", + "/// The structure of the parse meta is:\n", + "/// - 1 byte: The depth of the bloom filters\n", + "/// - 1 byte: The hashing seed\n", + "/// - The bloom filters, each is 32 bytes long, one for each build depth.\n", + "/// - All the items for each word, each is 4 bytes long. Each item's first byte\n", + "/// is its opcode index, the remaining 3 bytes are the word fingerprint.\n", + "/// To do a lookup, the word is hashed with the seed, then the first byte of the\n", + "/// hash is compared against the bloom filter. If there is a hit then we count\n", + "/// the number of 1 bits in the bloom filter up to this item's 1 bit. We then\n", + "/// treat this a the index of the item in the items array. We then compare the\n", + "/// word fingerprint against the fingerprint of the item at this index. If the\n", + "/// fingerprints equal then we have a match, else we increment the seed and try\n", + "/// again with the next bloom filter, offsetting all the indexes by the total\n", + "/// bit count of the previous bloom filter. If we reach the end of the bloom\n", + "/// filters then we have a miss." + ), + "PARSE_META", + LibGenParseMeta.buildParseMetaV2(authoringMeta, buildDepth) + ), + LibCodeGen.uint8ConstantString( + vm, "/// @dev The build depth of the parser meta.\n", "PARSE_META_BUILD_DEPTH", buildDepth + ) + ); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/lib/ns/LibNamespace.sol b/dependencies/rain-interpreter-interface-0.1.0/src/lib/ns/LibNamespace.sol new file mode 100644 index 00000000..3d139ff9 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/lib/ns/LibNamespace.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {StateNamespace, FullyQualifiedNamespace} from "../../interface/IInterpreterV4.sol"; + +/// @title LibNamespace +/// @notice Conventions for working with namespaces as a calling contract. All of +/// this functionality is OPTIONAL but probably useful for the majority of +/// contracts as it enables safe (scoped) mutations in Rainlang. +library LibNamespace { + /// Standard way to elevate a caller-provided state namespace to a universal + /// namespace that is disjoint from all other caller-provided namespaces. + /// Essentially just hashes the `msg.sender` into the state namespace as-is. + /// + /// This is deterministic such that the same combination of state namespace + /// and caller will produce the same fully qualified namespace, even across + /// multiple transactions/blocks. + /// + /// @param stateNamespace The state namespace as specified by the caller. + /// @param sender The caller this namespace is bound to. + /// @return qualifiedNamespace A fully qualified namespace that cannot + /// collide with any other state namespace specified by any other caller. + function qualifyNamespace(StateNamespace stateNamespace, address sender) + internal + pure + returns (FullyQualifiedNamespace qualifiedNamespace) + { + assembly ("memory-safe") { + mstore(0, stateNamespace) + mstore(0x20, sender) + qualifiedNamespace := keccak256(0, 0x40) + } + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/src/lib/parse/LibParseMeta.sol b/dependencies/rain-interpreter-interface-0.1.0/src/lib/parse/LibParseMeta.sol new file mode 100644 index 00000000..ea593966 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/src/lib/parse/LibParseMeta.sol @@ -0,0 +1,187 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {LibCtPop} from "rain-math-binary-0.1.1/src/lib/LibCtPop.sol"; + +/// @dev 4 = 1 byte opcode index + 3 byte fingerprint +uint256 constant META_ITEM_SIZE = 4; + +/// @dev 1 = 1 byte for depth +uint256 constant META_PREFIX_SIZE = 1; + +/// @dev 0xFFFFFF = 3 byte fingerprint +/// The fingerprint is 3 bytes because we're targetting the same collision +/// resistance on words as solidity functions. As we already use a fully byte to +/// map words across the expander, we only need 3 bytes for the fingerprint to +/// achieve 4 bytes of collision resistance, which is the same as a solidity +/// selector. This assumes that the byte selected to expand is uncorrelated with +/// the fingerprint bytes, which is a reasonable assumption as long as we use +/// different bytes from a keccak256 hash for each. +/// This assumes a single expander, if there are multiple expanders, then the +/// collision resistance only improves, so this is still safe. +uint256 constant FINGERPRINT_MASK = 0xFFFFFF; + +/// @dev 33 = 32 bytes for expansion + 1 byte for seed +uint256 constant META_EXPANSION_SIZE = 0x21; + +/// @dev Thrown by `checkParseMetaStructure` when the meta bytes do not match +/// the expected length derived from its depth and expansion data. +/// @param expected The expected byte length. +/// @param actual The actual byte length. +error InvalidParseMeta(uint256 expected, uint256 actual); + +/// @title LibParseMeta +/// @notice Common logic for working with parse meta, which is the data structure +/// used to store information about the words in a parser. The parse meta is +/// designed to be compact and efficient to lookup. +library LibParseMeta { + /// Validates that the parse meta has a structurally consistent length. + /// Reads the depth and all expansions to compute the expected total byte + /// count, then reverts if `meta.length` does not match. Intended to be + /// called once at build time so that `lookupWord` can trust the meta + /// without per-call bounds checks. + /// @param meta The parse meta bytes to validate. + function checkParseMetaStructure(bytes memory meta) internal pure { + unchecked { + uint256 depth; + uint256 totalItems = 0; + assembly ("memory-safe") { + depth := and(mload(add(meta, 1)), 0xFF) + } + uint256 cursor; + assembly ("memory-safe") { + cursor := add(meta, 1) + } + for (uint256 i = 0; i < depth; i++) { + uint256 expansion; + assembly ("memory-safe") { + cursor := add(cursor, 0x21) + expansion := mload(cursor) + } + totalItems += LibCtPop.ctpop(expansion); + } + uint256 expected = META_PREFIX_SIZE + depth * META_EXPANSION_SIZE + totalItems * META_ITEM_SIZE; + if (meta.length != expected) { + revert InvalidParseMeta(expected, meta.length); + } + } + } + + /// @dev Given a word and a seed, return the bitmap and fingerprint for the + /// word. The bitmap is a uint256 with a single bit set, which can be used + /// to check if the word is present in an expansion. The fingerprint is a + /// uint256 with the low 3 bytes set, which can be used to check for + /// collisions when a word is found in an expansion. The fingerprint is + /// guaranteed to be non-zero (fingerprint 0 is remapped to 1) because + /// zero is used as the empty-slot sentinel in `buildParseMetaV2`. + /// @param seed The seed to use for the bitmap, which should be a byte value + /// between 0 and 255. + /// @param word The word to generate the bitmap and fingerprint for. + /// @return bitmap A uint256 with a single bit set, which can be used to + /// check if the word is present in an expansion. + /// @return hashed A uint256 with the low 3 bytes guaranteed non-zero, + /// which can be used to check for collisions when a word is found in an + /// expansion. + function wordBitmapped(uint256 seed, bytes32 word) internal pure returns (uint256 bitmap, uint256 hashed) { + assembly ("memory-safe") { + mstore(0, word) + mstore8(0x20, seed) + hashed := keccak256(0, 0x21) + // We have to be careful here to avoid using the same byte for both + // the expansion and the fingerprint. This is because we are relying + // on the combined effect of both for collision resistance. We do + // this by using the high byte of the hash for the bitmap, and the + // low 3 bytes for the fingerprint. + //slither-disable-next-line incorrect-shift + bitmap := shl(byte(0, hashed), 1) + // Fingerprint 0 is reserved as the empty-slot sentinel in + // buildParseMetaV2. If the low 3 bytes are 0, set to 1. + // This introduces a small bias on fingerprint 1 (2 in 2^24 + // instead of 1 in 2^24) which is negligible. Overall collision + // probability changes from 1/2^24 to (2^24 + 2)/2^48 which is + // effectively identical. The only concrete effect is that two + // words which both independently hash to fingerprint 0 (~1 in + // 16.7M each) would both map to 1 and appear as a + // DuplicateFingerprint during generation — a ~1 in 2^46 event. + // bitmap is already computed so the high bytes don't matter. + if iszero(and(hashed, 0xFFFFFF)) { hashed := 1 } + } + } + + /// Given the parse meta and a word, return whether the word exists and its + /// index. If the word is not found, then `exists` will be false. The caller + /// MUST check `exists` before using the other return values. + /// The `meta` parameter MUST be well-formed as produced by + /// `LibGenParseMeta.buildParseMetaV2`. Behavior is undefined for malformed + /// meta — no bounds checking is performed on the meta structure. Use + /// `checkParseMetaStructure` to validate meta at build time. + /// @param meta The parser meta. + /// @param word The word to lookup. + /// @return True if the word exists in the parse meta. + /// @return The index of the word in the parse meta. + function lookupWord(bytes memory meta, bytes32 word) internal pure returns (bool, uint256) { + unchecked { + uint256 dataStart; + uint256 cursor; + uint256 end; + { + uint256 metaExpansionSize = META_EXPANSION_SIZE; + uint256 metaItemSize = META_ITEM_SIZE; + assembly ("memory-safe") { + // Read depth from first meta byte. + cursor := add(meta, 1) + let depth := and(mload(cursor), 0xFF) + // 33 bytes per depth + end := add(cursor, mul(depth, metaExpansionSize)) + dataStart := add(end, metaItemSize) + } + } + + uint256 cumulativeCt = 0; + while (cursor < end) { + uint256 expansion; + uint256 posData; + uint256 wordFingerprint; + // Lookup the data at pos. + { + uint256 seed; + assembly ("memory-safe") { + cursor := add(cursor, 1) + seed := and(mload(cursor), 0xFF) + cursor := add(cursor, 0x20) + expansion := mload(cursor) + } + + (uint256 shifted, uint256 hashed) = wordBitmapped(seed, word); + + // If the word's bit is not set in the expansion, the word + // is not in the set. No word was mapped to this bit, so + // there is nothing to collide with at any depth. + if (expansion & shifted == 0) { + return (false, 0); + } + + uint256 pos = LibCtPop.ctpop(expansion & (shifted - 1)) + cumulativeCt; + wordFingerprint = hashed & FINGERPRINT_MASK; + uint256 metaItemSize = META_ITEM_SIZE; + assembly ("memory-safe") { + posData := mload(add(dataStart, mul(pos, metaItemSize))) + } + } + + // Match + if (wordFingerprint == posData & FINGERPRINT_MASK) { + uint256 index; + assembly ("memory-safe") { + index := byte(28, posData) + } + return (true, index); + } else { + cumulativeCt += LibCtPop.ctpop(expansion); + } + } + return (false, 0); + } + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/abstract/BytecodeTest.sol b/dependencies/rain-interpreter-interface-0.1.0/test/abstract/BytecodeTest.sol new file mode 100644 index 00000000..813167bc --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/abstract/BytecodeTest.sol @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; + +abstract contract BytecodeTest is Test { + function conformBytecode(bytes memory bytecode, uint256 sourceCount, bytes32 seed) internal pure { + unchecked { + if (bytecode.length > 0) { + // Max source count would be treating all the bytecode as empty sources. + // ignore source count byte. + // each source needs a 2 byte offset pointer and 4 byte header. + uint256 maxSourceCount = (bytecode.length - 1) / 6; + // Max source count can't exceed 256. + maxSourceCount = bound(maxSourceCount, 0, 0xFF); + + // Source count is bounded by the max source count. + sourceCount = bound(sourceCount, 0, maxSourceCount); + + // If source count is zero then return early with zero bytecode. + if (sourceCount == 0) { + assembly ("memory-safe") { + mstore(bytecode, 1) + mstore8(add(bytecode, 0x20), 0) + } + return; + } + + // Sourcecount is bound to max source count which is bound so + // this typecast is safe. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[0] = bytes1(uint8(sourceCount)); + + uint256 sourcesRelativeStart = 1 + sourceCount * 2; + + // Truncate the bytecode to be a multiple of 4 bytes after the + // relative start. + { + uint256 sourcesLengthMod4 = (bytecode.length - sourcesRelativeStart) % 4; + if (sourcesLengthMod4 != 0) { + assembly ("memory-safe") { + mstore(bytecode, sub(mload(bytecode), sourcesLengthMod4)) + } + } + // Sanity check. + require((bytecode.length - sourcesRelativeStart) % 4 == 0, "bytecode length not multiple of 4"); + } + + // Randomly allocate ops to sources. + uint256 sourceHeadersSize = sourceCount * 4; + uint256 totalOpsCount = (bytecode.length - sourcesRelativeStart - sourceHeadersSize) / 4; + uint256[] memory opsPerSource = new uint256[](sourceCount); + seed = keccak256(abi.encodePacked(seed)); + for (uint256 i = 0; i < totalOpsCount; i++) { + uint256 sourceIndex = uint256(seed) % sourceCount; + opsPerSource[sourceIndex]++; + seed = keccak256(abi.encodePacked(seed)); + } + + // Set all the offset pointers. + uint256 offset = 0; + uint256 cursor = 1; + for (uint256 i = 0; i < sourceCount; i++) { + // Offset being set one byte at a time so tyecast truncation + // is intentional. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[cursor] = bytes1(uint8(offset >> 8)); + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[cursor + 1] = bytes1(uint8(offset)); + cursor += 2; + + // Set the ops count for the source in the header. + uint256 headerPosition = sourcesRelativeStart + offset; + bytecode[headerPosition] = bytes1(uint8(opsPerSource[i])); + // allocation is the 2nd header byte. + uint256 allocation = uint8(bytecode[headerPosition + 1]); + // inputs is the 3rd header byte. + uint256 inputs = uint8(bytecode[headerPosition + 2]); + // outputs is the 4th header byte. + uint256 outputs = uint8(bytecode[headerPosition + 3]); + + // inputs can't exceed outputs. + inputs = bound(inputs, 0, outputs); + // inputs is bound to outputs, which is a single byte, so + // this is a safe cast. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[headerPosition + 2] = bytes1(uint8(inputs)); + // allocation can't be less than outputs. + allocation = bound(allocation, outputs, type(uint8).max); + // Allocation is bound so safe to typecast. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[headerPosition + 1] = bytes1(uint8(allocation)); + + offset += opsPerSource[i] * 4 + 4; + } + // Sanity check. + require(offset == bytecode.length - sourcesRelativeStart, "offsets don't match bytecode length"); + } + } + } + + function randomSourceIndex(bytes memory bytecode, bytes32 seed) internal pure returns (uint256 sourceIndex) { + // The case of empty sources means we can't select a source. + vm.assume(bytecode.length > 1); + uint256 sourceCount = uint8(bytecode[0]); + + // Pick a random source. Salt the seed to ensure we don't correlate with + // usages of the seed elsewhere. + seed = keccak256(abi.encodePacked(seed, "sourceIndex")); + sourceIndex = uint256(seed) % sourceCount; + } + + function randomSourcePosition(bytes memory bytecode, bytes32 seed) internal pure returns (uint256 sourcePosition) { + uint256 sourceIndex = randomSourceIndex(bytecode, seed); + uint256 sourceCount = uint8(bytecode[0]); + uint256 sourceRelativeStart = 1 + sourceCount * 2; + uint256 offsetPosition = sourceIndex * 2 + 1; + uint256 offset = (uint256(uint8(bytecode[offsetPosition])) << 8) | uint256(uint8(bytecode[offsetPosition + 1])); + + sourcePosition = sourceRelativeStart + offset; + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.sol b/dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.sol new file mode 100644 index 00000000..33038525 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.sol @@ -0,0 +1,64 @@ +//// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +library LibBloom { + /// Returns true if any of the words are duplicates according to a bloom filter. + /// The bloom filter is 1024 bits. + function bloomFindsDupes(bytes32[] memory words) internal pure returns (bool dupes) { + assembly ("memory-safe") { + let bloom0 := 0 + let bloom1 := 0 + let bloom2 := 0 + let bloom3 := 0 + let shifted0 := 0 + let shifted1 := 0 + let shifted2 := 0 + let shifted3 := 0 + let cursor := add(words, 0x20) + let end := add(cursor, mul(mload(words), 0x20)) + + for {} lt(cursor, end) { cursor := add(cursor, 0x20) } { + { + mstore(0, mload(cursor)) + let hashed0 := keccak256(0, 0x20) + shifted0 := shl(and(hashed0, 0xFF), 1) + mstore(0, hashed0) + let hashed1 := keccak256(0, 0x20) + shifted1 := shl(and(hashed1, 0xFF), 1) + mstore(0, hashed1) + let hashed2 := keccak256(0, 0x20) + shifted2 := shl(and(hashed2, 0xFF), 1) + mstore(0, hashed2) + let hashed3 := keccak256(0, 0x20) + shifted3 := shl(and(hashed3, 0xFF), 1) + } + + let match := + and( + and(iszero(iszero(and(bloom0, shifted0))), iszero(iszero(and(bloom1, shifted1)))), + and(iszero(iszero(and(bloom2, shifted2))), iszero(iszero(and(bloom3, shifted3)))) + ) + + if iszero(iszero(match)) { + dupes := 1 + break + } + + bloom0 := or(bloom0, shifted0) + bloom1 := or(bloom1, shifted1) + bloom2 := or(bloom2, shifted2) + bloom3 := or(bloom3, shifted3) + } + } + } + + /// Overloaded version of bloomFindsDupes that takes `uint256[]`. + function bloomFindsDupes(uint256[] memory us) internal pure returns (bool) { + bytes32[] memory kvs; + assembly ("memory-safe") { + kvs := us + } + return bloomFindsDupes(kvs); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.t.sol new file mode 100644 index 00000000..826a1c09 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/lib/bloom/LibBloom.t.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; + +import {LibBloom} from "test/lib/bloom/LibBloom.sol"; + +/// @title LibBloomTest +/// @notice This is a test contract for LibBloom. LibBloom itself is only used +/// for testing currently, but if it is buggy it undermines a lot of the rest +/// of the test suite. +contract LibBloomTest is Test { + /// A bloom filter should never return false negatives, even though it + /// typically has a high false positive rate. + function testLibBloomNoFalseNegatives(bytes32[] memory words, uint256 a, uint256 b) external pure { + vm.assume(words.length > 1); + /// Copy a random work to another random word to force a dupe. + uint256 j = a % words.length; + uint256 k = b % words.length; + vm.assume(j != k); + words[k] = words[j]; + + assertTrue(LibBloom.bloomFindsDupes(words)); + } + + /// With random words the chance of false positives is much higher. Described + /// by the birthday paradox. + function testLibBloomVaguelyAvoidsFalsePositives(uint256 start, uint8 len) external pure { + start = bound(start, 0, type(uint256).max - len - 1); + // The ability for the bloom filter to avoid saturation starts to max out + // around 180 words. This is a very loose bound. + len = uint8(bound(len, 0, 180)); + bool offsetFound = false; + while (!offsetFound) { + start++; + bytes32[] memory words = new bytes32[](len); + for (uint256 i = 0; i < len; i++) { + // Do a keccak256 here to avoid the trivial case of the bloom filter + // just mapping every sequential value to a bit in the filter. + words[i] = keccak256(abi.encodePacked(bytes32(start + i))); + } + offsetFound = !LibBloom.bloomFindsDupes(words); + } + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/lib/meta/LibAuthoringMeta.sol b/dependencies/rain-interpreter-interface-0.1.0/test/lib/meta/LibAuthoringMeta.sol new file mode 100644 index 00000000..01d240a8 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/lib/meta/LibAuthoringMeta.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {AuthoringMetaV2} from "src/interface/IParserV2.sol"; + +library LibAuthoringMeta { + function copyWordsFromAuthoringMeta(AuthoringMetaV2[] memory authoringMeta) + internal + pure + returns (bytes32[] memory) + { + bytes32[] memory words = new bytes32[](authoringMeta.length); + for (uint256 i = 0; i < authoringMeta.length; i++) { + words[i] = authoringMeta[i].word; + } + return words; + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.bytecodeToSources.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.bytecodeToSources.t.sol new file mode 100644 index 00000000..8c3dd0b7 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.bytecodeToSources.t.sol @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {BytecodeTest} from "test/abstract/BytecodeTest.sol"; +import {LibBytecode} from "src/lib/bytecode/LibBytecode.sol"; + +contract LibBytecodeBytecodeToSourcesTest is BytecodeTest { + /// Zero sources should return an empty array. + function testBytecodeToSourcesZeroSources() external pure { + bytes[] memory sources = LibBytecode.bytecodeToSources(hex"00"); + assertEq(sources.length, 0); + } + + /// Empty bytecode should return an empty array. + function testBytecodeToSourcesEmpty() external pure { + bytes[] memory sources = LibBytecode.bytecodeToSources(hex""); + assertEq(sources.length, 0); + } + + /// Single source with zero opcodes should return one empty bytes. + function testBytecodeToSourcesOneSourceZeroOps() external pure { + // 1 source, offset 0, header: 0 ops, 0 alloc, 0 inputs, 0 outputs + bytes[] memory sources = LibBytecode.bytecodeToSources(hex"01000000000000"); + assertEq(sources.length, 1); + assertEq(sources[0].length, 0); + } + + /// Single source with one opcode. Verify the byte-shuffling: + /// new format byte 0 (opcode index) moves to byte 1, byte 0 becomes 0. + function testBytecodeToSourcesOneSourceOneOp() external pure { + // 1 source, offset 0, header: 1 op, 1 alloc, 0 inputs, 1 output + // opcode: [0xAB, 0xCD, 0xEF, 0x12] + bytes[] memory sources = LibBytecode.bytecodeToSources(hex"01000001010001ABCDEF12"); + assertEq(sources.length, 1); + assertEq(sources[0].length, 4); + // After shuffle: byte 0 (0xAB) moves to byte 1, byte 0 becomes 0 + assertEq(uint8(sources[0][0]), 0x00); + assertEq(uint8(sources[0][1]), 0xAB); + assertEq(uint8(sources[0][2]), 0xEF); + assertEq(uint8(sources[0][3]), 0x12); + } + + /// Single source with multiple opcodes. Verify every opcode is shuffled. + function testBytecodeToSourcesOneSourceMultipleOps() external pure { + // 1 source, offset 0, header: 3 ops, 3 alloc, 0 inputs, 3 outputs + // opcodes: [AA,BB,CC,DD] [11,22,33,44] [FF,EE,DD,CC] + bytes[] memory sources = LibBytecode.bytecodeToSources(hex"01000003030003AABBCCDD11223344FFEEDDCC"); + assertEq(sources.length, 1); + assertEq(sources[0].length, 12); + // Op 0: 0xAA moves to byte 1, byte 0 becomes 0. + assertEq(uint8(sources[0][0]), 0x00); + assertEq(uint8(sources[0][1]), 0xAA); + assertEq(uint8(sources[0][2]), 0xCC); + assertEq(uint8(sources[0][3]), 0xDD); + // Op 1: 0x11 moves to byte 1, byte 0 becomes 0. + assertEq(uint8(sources[0][4]), 0x00); + assertEq(uint8(sources[0][5]), 0x11); + assertEq(uint8(sources[0][6]), 0x33); + assertEq(uint8(sources[0][7]), 0x44); + // Op 2: 0xFF moves to byte 1, byte 0 becomes 0. + assertEq(uint8(sources[0][8]), 0x00); + assertEq(uint8(sources[0][9]), 0xFF); + assertEq(uint8(sources[0][10]), 0xDD); + assertEq(uint8(sources[0][11]), 0xCC); + } + + /// Multiple sources with varying op counts. + function testBytecodeToSourcesMultipleSources() external pure { + // 2 sources + // source 0: offset 0, 1 op, header [01, 01, 00, 01], opcode [AA, BB, CC, DD] + // source 1: offset 8, 0 ops, header [00, 00, 00, 00] + bytes[] memory sources = LibBytecode.bytecodeToSources(hex"020000000801010001AABBCCDD00000000"); + assertEq(sources.length, 2); + assertEq(sources[0].length, 4); + assertEq(sources[1].length, 0); + // Verify byte-shuffling on source 0 + assertEq(uint8(sources[0][0]), 0x00); + assertEq(uint8(sources[0][1]), 0xAA); + } + + /// Fuzz: bytecodeToSources should produce one source per sourceCount, + /// and each source length should equal opsCount * 4. + function testBytecodeToSourcesFuzz(bytes memory bytecode, uint256 sourceCount, bytes32 seed) external pure { + conformBytecode(bytecode, sourceCount, seed); + LibBytecode.checkNoOOBPointers(bytecode); + sourceCount = LibBytecode.sourceCount(bytecode); + + bytes[] memory sources = LibBytecode.bytecodeToSources(bytecode); + assertEq(sources.length, sourceCount); + + for (uint256 i = 0; i < sourceCount; i++) { + assertEq(sources[i].length, LibBytecode.sourceOpsCount(bytecode, i) * 4); + } + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.checkNoOOBPointers.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.checkNoOOBPointers.t.sol new file mode 100644 index 00000000..61a7d3b0 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.checkNoOOBPointers.t.sol @@ -0,0 +1,388 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {BytecodeTest} from "test/abstract/BytecodeTest.sol"; +import { + LibBytecode, + UnexpectedSources, + TruncatedHeaderOffsets, + TruncatedHeader, + UnexpectedTrailingOffsetBytes, + TruncatedSource, + StackSizingsNotMonotonic +} from "src/lib/bytecode/LibBytecode.sol"; + +contract LibBytecodeCheckNoOOBPointersTest is BytecodeTest { + /// Test that all conforming bytecodes pass. + function testCheckNoOOBPointersConforming(bytes memory bytecode, uint256 sourceCount, bytes32 seed) external pure { + conformBytecode(bytecode, sourceCount, seed); + LibBytecode.checkNoOOBPointers(bytecode); + } + + /// Expose the library function externally so we can expect reverts against + /// it. + //forge-lint: disable-next-line(mixed-case-function) + function checkNoOOBPointersExternal(bytes memory bytecode) external pure { + LibBytecode.checkNoOOBPointers(bytecode); + } + + /// Test that a zero length bytecode passes. + function testCheckNoOOBPointers0() external pure { + LibBytecode.checkNoOOBPointers(""); + } + + /// Test that a zero count bytecode length 1 passes. + function testCheckNoOOBPointers1() external pure { + LibBytecode.checkNoOOBPointers(hex"00"); + } + + /// Test that a zero count bytecode length > 1 fails as `UnexpectedSources`. + function testCheckNoOOBPointers1Fail(bytes memory bytecode) external { + vm.assume(bytecode.length > 1); + bytecode[0] = 0; + + vm.expectRevert(abi.encodeWithSelector(UnexpectedSources.selector, bytecode)); + this.checkNoOOBPointersExternal(bytecode); + } + + /// If the relative offsets are truncated the bytecode fails as + /// `TruncatedHeaderOffsets`. + function testCheckNoOOBPointersOffsetsTruncated(bytes memory bytecode, uint8 sourceCount, uint256 length) external { + vm.assume(sourceCount > 0); + vm.assume(bytecode.length > 0); + bytecode[0] = bytes1(sourceCount); + + // Length anywhere from 1 to preserve the count up to 1 less than the + // offsets allocation should throw. + length = bound(length, 1, uint256(sourceCount) * 2); + + // Truncate the bytecode to the length if needed. + if (bytecode.length > length) { + assembly ("memory-safe") { + mstore(bytecode, length) + } + } + + vm.expectRevert(abi.encodeWithSelector(TruncatedHeaderOffsets.selector, bytecode)); + this.checkNoOOBPointersExternal(bytecode); + } + + /// If any of the relative offsets point to a space that doesn't fit a header + /// the bytecode fails as `TruncatedHeader`. + function testCheckNoOOBPointersHeaderTruncated( + bytes memory bytecode, + uint8 sourceCount, + bytes32 seed, + uint256 corruptOffset + ) external { + conformBytecode(bytecode, sourceCount, seed); + // The case of empty sources is not relevant. + vm.assume(bytecode.length > 1); + sourceCount = uint8(bytecode[0]); + + // Randomly corrupt an offset pointer. + uint256 sourceRelativeStart = 1 + sourceCount * 2; + seed = keccak256(abi.encodePacked(seed, uint256(0))); + uint256 offsetIndex = uint256(seed) % sourceCount; + uint256 nextOffset; + if (offsetIndex == sourceCount - 1) { + nextOffset = bytecode.length - sourceRelativeStart; + } else { + uint256 nextOffsetPosition = (offsetIndex + 1) * 2 + 1; + nextOffset = + (uint256(uint8(bytecode[nextOffsetPosition])) << 8) | uint256(uint8(bytecode[nextOffsetPosition + 1])); + } + corruptOffset = bound(corruptOffset, nextOffset - 3, type(uint16).max); + uint256 offsetPosition = offsetIndex * 2 + 1; + // Taking the corrupt offset one byte at a time, so a shift and truncate + // is expected. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[offsetPosition] = bytes1(uint8(corruptOffset >> 8)); + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[offsetPosition + 1] = bytes1(uint8(corruptOffset)); + + vm.expectRevert(abi.encodeWithSelector(TruncatedHeader.selector, bytecode)); + this.checkNoOOBPointersExternal(bytecode); + } + + /// Any corruption of the ops count for a given source header fails as + /// `TruncatedSource`. + function testCheckNoOOBPointersSourceTruncated( + bytes memory bytecode, + uint8 sourceCount, + bytes32 seed, + uint8 corruptOpCount + ) external { + conformBytecode(bytecode, sourceCount, seed); + // The case of empty sources is not relevant. + vm.assume(bytecode.length > 1); + sourceCount = uint8(bytecode[0]); + + // Randomly corrupt an ops count. + uint256 sourceRelativeStart = 1 + uint256(sourceCount) * 2; + seed = keccak256(abi.encodePacked(seed, uint256(0))); + uint256 offsetIndex = uint256(seed) % sourceCount; + uint256 offsetPosition = offsetIndex * 2 + 1; + uint256 offset = (uint256(uint8(bytecode[offsetPosition])) << 8) | uint256(uint8(bytecode[offsetPosition + 1])); + uint256 opsCount = uint256(uint8(bytecode[sourceRelativeStart + offset])); + vm.assume(opsCount != uint8(corruptOpCount)); + bytecode[sourceRelativeStart + offset] = bytes1(corruptOpCount); + + vm.expectRevert(abi.encodeWithSelector(TruncatedSource.selector, bytecode)); + this.checkNoOOBPointersExternal(bytecode); + } + + /// If the initial offset is anything other than 0 the bytecode fails as + /// `UnexpectedTrailingOffsetBytes`. + function testCheckNoOOBPointersTrailingOffsetBytes( + bytes memory bytecode, + bytes memory garbage, + uint8 sourceCount, + bytes32 seed + ) external { + vm.assume(garbage.length > 0); + conformBytecode(bytecode, sourceCount, seed); + // The case of empty sources is not relevant. + vm.assume(bytecode.length > 1); + sourceCount = uint8(bytecode[0]); + + // Split the bytecode into two parts at the end of the offset pointers. + uint256 sourceRelativeStart = 1 + sourceCount * 2; + uint256 sourceAbsoluteStart; + assembly ("memory-safe") { + sourceAbsoluteStart := add(bytecode, add(0x20, sourceRelativeStart)) + } + + uint256 originalLength = bytecode.length; + + // Truncate the bytecode down to the source relative start. + assembly ("memory-safe") { + mstore(bytecode, sourceRelativeStart) + } + + bytes memory bytecodeCorrupted = abi.encodePacked(bytecode, garbage); + + // Need to add the garbage length to every offset. + for (uint256 i = 0; i < sourceCount; i++) { + uint256 offsetPosition = i * 2 + 1; + uint256 offset = (uint256(uint8(bytecodeCorrupted[offsetPosition])) << 8) + | uint256(uint8(bytecodeCorrupted[offsetPosition + 1])); + offset += garbage.length; + // Deliberately writing offset as two bytes so the truncation per + // byte is intentional. + //forge-lint: disable-next-line(unsafe-typecast) + bytecodeCorrupted[offsetPosition] = bytes1(uint8(offset >> 8)); + //forge-lint: disable-next-line(unsafe-typecast) + bytecodeCorrupted[offsetPosition + 1] = bytes1(uint8(offset)); + } + + // Restore the suffix of the bytecode. + uint256 suffixLength = originalLength - sourceRelativeStart; + assembly ("memory-safe") { + bytecode := add(bytecode, sourceRelativeStart) + mstore(bytecode, suffixLength) + } + bytecodeCorrupted = abi.encodePacked(bytecodeCorrupted, bytecode); + + vm.expectRevert(abi.encodeWithSelector(UnexpectedTrailingOffsetBytes.selector, bytecodeCorrupted)); + this.checkNoOOBPointersExternal(bytecodeCorrupted); + } + + /// Randomly corrupting the sources count MUST error. + function testCheckNoOOBPointersCorruptSourcesCount( + bytes memory bytecode, + uint8 sourceCount, + bytes32 seed, + uint8 corruptSourceCount + ) external { + conformBytecode(bytecode, sourceCount, seed); + vm.assume(bytecode.length > 0); + sourceCount = uint8(bytecode[0]); + + // Randomly corrupt the sources count. + vm.assume(corruptSourceCount != sourceCount); + bytecode[0] = bytes1(corruptSourceCount); + + // Any kind of error is fine. We have more specific tests to check each + // error type. + vm.expectRevert(); + this.checkNoOOBPointersExternal(bytecode); + } + + /// Randomly corrupting any byte in the offset pointers MUST error. + function testCheckNoOOBPointersCorruptOffsetPointer( + bytes memory bytecode, + uint8 sourceCount, + bytes32 seed, + uint8 corruptOffsetByte + ) external { + conformBytecode(bytecode, sourceCount, seed); + vm.assume(bytecode.length > 0); + sourceCount = uint8(bytecode[0]); + vm.assume(sourceCount > 0); + + uint256 pointerRegionSize = sourceCount * 2; + uint256 corruptIndex = (uint256(seed) % pointerRegionSize) + 1; + vm.assume(bytecode[corruptIndex] != bytes1(corruptOffsetByte)); + bytecode[corruptIndex] = bytes1(corruptOffsetByte); + + // Any kind of error is fine. We have more specific tests to check each + // error type. + vm.expectRevert(); + this.checkNoOOBPointersExternal(bytecode); + } + + /// Randomly corrupting any ops count MUST error. + function testCheckNoOOBPointersCorruptOpsCount( + bytes memory bytecode, + uint8 sourceCount, + bytes32 seed, + uint8 corruptOpsCount + ) external { + conformBytecode(bytecode, sourceCount, seed); + vm.assume(bytecode.length > 0); + sourceCount = uint8(bytecode[0]); + vm.assume(sourceCount > 0); + + uint256 sourceRelativeStart = 1 + sourceCount * 2; + + // Pick an offset pointer. + seed = keccak256(abi.encodePacked(seed, uint256(0))); + uint256 offsetIndex = uint256(seed) % sourceCount; + uint256 offsetPosition = offsetIndex * 2 + 1; + uint256 offset = (uint256(uint8(bytecode[offsetPosition])) << 8) | uint256(uint8(bytecode[offsetPosition + 1])); + + // Corrupt the ops count. This is the first byte of the header. + uint256 headerPosition = sourceRelativeStart + offset; + vm.assume(bytecode[headerPosition] != bytes1(corruptOpsCount)); + bytecode[headerPosition] = bytes1(corruptOpsCount); + + vm.expectRevert(); + this.checkNoOOBPointersExternal(bytecode); + } + + /// Adding garbage to the end of the bytecode MUST error. + function testCheckNoOOBPointersEndGarbage(bytes memory bytecode, bytes memory garbage) external { + vm.assume(garbage.length > 0); + conformBytecode(bytecode, 1, bytes32(0)); + vm.assume(bytecode.length > 0); + bytecode = abi.encodePacked(bytecode, garbage); + + vm.expectRevert(); + this.checkNoOOBPointersExternal(bytecode); + } + + /// If the inputs count is greater than the outputs count for some source + /// the bytecode MUST error as `StackSizingsNotMonotonic`. + function testCheckNoOOBPointersInputsNotMonotonic( + bytes memory bytecode, + uint8 sourceCount, + bytes32 seed, + uint256 corruptInputs, + uint256 corruptOutputs + ) external { + conformBytecode(bytecode, sourceCount, seed); + vm.assume(bytecode.length > 0); + sourceCount = uint8(bytecode[0]); + vm.assume(sourceCount > 0); + + uint256 sourceRelativeStart = 1 + sourceCount * 2; + + // Pick an offset pointer. + seed = keccak256(abi.encodePacked(seed, uint256(0))); + uint256 offsetIndex = uint256(seed) % sourceCount; + uint256 offsetPosition = offsetIndex * 2 + 1; + uint256 offset = (uint256(uint8(bytecode[offsetPosition])) << 8) | uint256(uint8(bytecode[offsetPosition + 1])); + + { + // Corrupt the inputs count. This is the third byte of the header. + uint256 headerPosition = sourceRelativeStart + offset; + uint256 inputsPosition = headerPosition + 2; + uint256 outputsPosition = headerPosition + 3; + + uint256 inputs = uint256(uint8(bytecode[inputsPosition])); + uint256 outputs = uint256(uint8(bytecode[outputsPosition])); + if (outputs < type(uint8).max) { + inputs = bound(corruptInputs, outputs + 1, type(uint8).max); + } else { + inputs = bound(corruptInputs, 1, type(uint8).max); + outputs = bound(corruptOutputs, 0, inputs - 1); + } + // Inputs is either a single byte or bound so safe to cast like this. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[inputsPosition] = bytes1(uint8(inputs)); + // Outputs is a single byte or bound so safe to cast like this. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[outputsPosition] = bytes1(uint8(outputs)); + + // Ensure the allocation is valid so we don't get false positives. + uint256 allocation = uint256(uint8(bytecode[headerPosition + 1])); + allocation = bound(allocation, outputs, type(uint8).max); + // Allocation is bound so safe to cast. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[headerPosition + 1] = bytes1(uint8(allocation)); + } + + vm.expectRevert(abi.encodeWithSelector(StackSizingsNotMonotonic.selector, bytecode, offset)); + this.checkNoOOBPointersExternal(bytecode); + } + + /// If the outputs count is greater than the allocation for some source + /// the bytecode MUST error as `StackSizingsNotMonotonic`. + function testCheckNoOOBPointersOutputsNotMonotonic( + bytes memory bytecode, + uint8 sourceCount, + bytes32 seed, + uint256 corruptOutputs, + uint256 corruptAllocation + ) external { + conformBytecode(bytecode, sourceCount, seed); + vm.assume(bytecode.length > 0); + sourceCount = uint8(bytecode[0]); + vm.assume(sourceCount > 0); + + uint256 sourceRelativeStart = 1 + sourceCount * 2; + + // Pick an offset pointer. + seed = keccak256(abi.encodePacked(seed, uint256(0))); + uint256 offsetIndex = uint256(seed) % sourceCount; + uint256 offsetPosition = offsetIndex * 2 + 1; + uint256 offset = (uint256(uint8(bytecode[offsetPosition])) << 8) | uint256(uint8(bytecode[offsetPosition + 1])); + + { + // Corrupt the outputs count. This is the fourth byte of the header. + uint256 headerPosition = sourceRelativeStart + offset; + uint256 allocationPosition = headerPosition + 1; + uint256 outputsPosition = headerPosition + 3; + + uint256 outputs = uint256(uint8(bytecode[outputsPosition])); + uint256 allocation = uint256(uint8(bytecode[allocationPosition])); + if (allocation < type(uint8).max) { + outputs = bound(corruptOutputs, allocation + 1, type(uint8).max); + } else { + outputs = bound(corruptOutputs, 1, type(uint8).max); + allocation = bound(corruptAllocation, 0, outputs - 1); + } + // Outputs is either a single byte or bound above so it is safe to + // cast like this. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[outputsPosition] = bytes1(uint8(outputs)); + // Allocation is either a single byte or bound above so it is safe + // to cast like this. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[allocationPosition] = bytes1(uint8(allocation)); + + // Ensure the inputs is valid so we don't get false positives. + uint256 inputs = uint256(uint8(bytecode[headerPosition + 2])); + inputs = bound(inputs, 0, outputs); + // Outputs bound to type(uint8).max so this can't overflow due to + // the inputs bound. + //forge-lint: disable-next-line(unsafe-typecast) + bytecode[headerPosition + 2] = bytes1(uint8(inputs)); + } + + vm.expectRevert(abi.encodeWithSelector(StackSizingsNotMonotonic.selector, bytecode, offset)); + this.checkNoOOBPointersExternal(bytecode); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceCount.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceCount.t.sol new file mode 100644 index 00000000..bd66f6e3 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceCount.t.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibBytecode} from "src/lib/bytecode/LibBytecode.sol"; +import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol"; + +contract LibBytecodeSourceCountTest is Test { + /// Test that a zero length bytecode returns zero sources. + function testSourceCount0() external pure { + assertEq(LibBytecode.sourceCount(""), 0); + } + + /// Test that a non-zero length bytecode returns the first byte as the + /// source count. + function testSourceCount1(bytes memory bytecode) external pure { + vm.assume(bytecode.length > 0); + assertEq(LibBytecode.sourceCount(bytecode), uint256(uint8(bytecode[0]))); + } + + /// Test against a reference implementation. + function testSourceCountReference(bytes memory bytecode) external pure { + assertEq(LibBytecode.sourceCount(bytecode), LibBytecodeSlow.sourceCountSlow(bytecode)); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceInputsOutputs.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceInputsOutputs.t.sol new file mode 100644 index 00000000..72ad710f --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceInputsOutputs.t.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {BytecodeTest} from "test/abstract/BytecodeTest.sol"; +import {LibBytecode, SourceIndexOutOfBounds} from "src/lib/bytecode/LibBytecode.sol"; +import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol"; + +contract LibBytecodeSourceInputsOutputsTest is BytecodeTest { + /// Concrete value-pinning tests for sourceInputsOutputsLength. + function testSourceInputsOutputsConcrete() external pure { + // 1 source, 0 ops, alloc=0, inputs=0, outputs=0. + (uint256 i0, uint256 o0) = LibBytecode.sourceInputsOutputsLength(hex"01000000000000", 0); + assertEq(i0, 0); + assertEq(o0, 0); + // 1 source, 0 ops, alloc=5, inputs=2, outputs=3. + (uint256 i1, uint256 o1) = LibBytecode.sourceInputsOutputsLength(hex"01000000050203", 0); + assertEq(i1, 2); + assertEq(o1, 3); + // 1 source, 0 ops, alloc=0xFF, inputs=0xFF, outputs=0xFF. + (uint256 i2, uint256 o2) = LibBytecode.sourceInputsOutputsLength(hex"01000000ffffff", 0); + assertEq(i2, 0xFF); + assertEq(o2, 0xFF); + // 2 sources: source 0 inputs=1,outputs=2; source 1 inputs=3,outputs=4. + (uint256 i3, uint256 o3) = LibBytecode.sourceInputsOutputsLength(hex"02000000040003010200070304", 0); + assertEq(i3, 1); + assertEq(o3, 2); + (uint256 i4, uint256 o4) = LibBytecode.sourceInputsOutputsLength(hex"02000000040003010200070304", 1); + assertEq(i4, 3); + assertEq(o4, 4); + } + + function sourceInputsOutputsExternal(bytes memory bytecode, uint256 sourceIndex) + external + pure + returns (uint256 inputs, uint256 outputs) + { + return LibBytecode.sourceInputsOutputsLength(bytecode, sourceIndex); + } + + /// Getting source inputs and outputs for an index beyond the sources should + /// fail. + function testSourceInputsOutputsIndexOutOfBounds( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + sourceIndex = bound(sourceIndex, sourceCount, type(uint256).max); + vm.expectRevert(abi.encodeWithSelector(SourceIndexOutOfBounds.selector, sourceIndex, bytecode)); + this.sourceInputsOutputsExternal(bytecode, sourceIndex); + } + + /// Test against a reference implementation. + function testSourceInputsOutputsAgainstSlow( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external pure { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + vm.assume(sourceCount > 0); + sourceIndex = bound(sourceIndex, 0, sourceCount - 1); + (uint256 inputs, uint256 outputs) = LibBytecode.sourceInputsOutputsLength(bytecode, sourceIndex); + (uint256 slowInputs, uint256 slowOutputs) = LibBytecodeSlow.sourceInputsOutputsLengthSlow(bytecode, sourceIndex); + assertEq(inputs, slowInputs); + assertEq(outputs, slowOutputs); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceOpsCount.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceOpsCount.t.sol new file mode 100644 index 00000000..294f034a --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceOpsCount.t.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {BytecodeTest} from "test/abstract/BytecodeTest.sol"; +import {LibBytecode, SourceIndexOutOfBounds} from "src/lib/bytecode/LibBytecode.sol"; +import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol"; + +contract LibBytecodeSourceOpsCountTest is BytecodeTest { + function sourceOpsCountExternal(bytes memory bytecode, uint256 sourceIndex) external pure returns (uint256 count) { + return LibBytecode.sourceOpsCount(bytecode, sourceIndex); + } + + function testSourceOpsCount() external pure { + // 1 source 0 offset 0 header + assertEq(LibBytecode.sourceOpsCount(hex"01000000000000", 0), 0); + // 1 source 0 offset some header (should be 1) + assertEq(LibBytecode.sourceOpsCount(hex"01000001020304", 0), 1); + // 1 source 2 offset some header + assertEq(LibBytecode.sourceOpsCount(hex"010002ffff01020304", 0), 1); + // 2 source 8 offset some header index 1 + assertEq(LibBytecode.sourceOpsCount(hex"020000000801000000ffffffff01020304ffffffff", 1), 1); + } + + /// Getting the source ops count for an index beyond the sources should fail. + function testSourceOpsCountIndexOutOfBounds( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + sourceIndex = bound(sourceIndex, sourceCount, type(uint256).max); + vm.expectRevert(abi.encodeWithSelector(SourceIndexOutOfBounds.selector, sourceIndex, bytecode)); + this.sourceOpsCountExternal(bytecode, sourceIndex); + } + + /// Test against a reference implementation. + function testSourceOpsCountAgainstSlow( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external pure { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + vm.assume(sourceCount > 0); + sourceIndex = bound(sourceIndex, 0, sourceCount - 1); + assertEq( + LibBytecode.sourceOpsCount(bytecode, sourceIndex), LibBytecodeSlow.sourceOpsCountSlow(bytecode, sourceIndex) + ); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourcePointer.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourcePointer.t.sol new file mode 100644 index 00000000..fab6c109 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourcePointer.t.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {BytecodeTest} from "test/abstract/BytecodeTest.sol"; +import {LibBytecode, SourceIndexOutOfBounds} from "src/lib/bytecode/LibBytecode.sol"; +import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol"; +import {Pointer} from "rain-solmem-0.1.3/src/lib/LibPointer.sol"; + +contract LibBytecodeSourcePointerTest is BytecodeTest { + function sourcePointerExternal(bytes memory bytecode, uint256 sourceIndex) external pure returns (Pointer pointer) { + return LibBytecode.sourcePointer(bytecode, sourceIndex); + } + + /// Getting the source pointer for an empty bytecode should fail. Tests empty + /// bytes. + function testSourcePointerEmpty0(uint256 sourceIndex) external { + bytes memory bytecode = hex""; + vm.expectRevert(abi.encodeWithSelector(SourceIndexOutOfBounds.selector, sourceIndex, bytecode)); + this.sourcePointerExternal(bytecode, sourceIndex); + } + + /// Getting the source pointer for an empty bytecode should fail. Tests + /// non-empty bytes but with no source. + function testSourcePointerEmpty1(uint256 sourceIndex) external { + bytes memory bytecode = hex"00"; + vm.expectRevert(abi.encodeWithSelector(SourceIndexOutOfBounds.selector, sourceIndex, bytecode)); + this.sourcePointerExternal(bytecode, sourceIndex); + } + + /// Getting a source pointer for an index beyond the sources should fail. + function testSourcePointerIndexOutOfBounds( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + sourceIndex = bound(sourceIndex, sourceCount, type(uint256).max); + vm.expectRevert(abi.encodeWithSelector(SourceIndexOutOfBounds.selector, sourceIndex, bytecode)); + this.sourcePointerExternal(bytecode, sourceIndex); + } + + /// Test against a reference implementation. + function testSourcePointerAgainstSlow(bytes memory bytecode, uint256 sourceCount, uint256 sourceIndex, bytes32 seed) + external + pure + { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + vm.assume(sourceCount > 0); + sourceIndex = bound(sourceIndex, 0, sourceCount - 1); + assertEq( + Pointer.unwrap(LibBytecode.sourcePointer(bytecode, sourceIndex)), + Pointer.unwrap(LibBytecodeSlow.sourcePointerSlow(bytecode, sourceIndex)) + ); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceRelativeOffset.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceRelativeOffset.t.sol new file mode 100644 index 00000000..85b9e69c --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceRelativeOffset.t.sol @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {BytecodeTest} from "test/abstract/BytecodeTest.sol"; +import {LibBytecode, SourceIndexOutOfBounds} from "src/lib/bytecode/LibBytecode.sol"; +import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol"; + +contract LibBytecodeSourceRelativeOffsetTest is BytecodeTest { + /// Test some examples of source relative offsets. + function testSourceRelativeOffsetHappy() external pure { + // 1 source 0 offset 0 header + assertEq(LibBytecode.sourceRelativeOffset(hex"01000000000000", 0), 0); + // 1 source 0 offset some header + assertEq(LibBytecode.sourceRelativeOffset(hex"01000001020304", 0), 0); + // 1 source 2 offset some header + assertEq(LibBytecode.sourceRelativeOffset(hex"010002ffff01020304", 0), 2); + // 2 source 8 offset some header index 1 + assertEq(LibBytecode.sourceRelativeOffset(hex"0200000008ffffffff01020304ffffffff", 1), 8); + } + + function sourceRelativeOffsetExternal(bytes memory bytecode, uint256 sourceIndex) + external + pure + returns (uint256 offset) + { + return LibBytecode.sourceRelativeOffset(bytecode, sourceIndex); + } + + function checkSourceRelativeOffsetIndexOutOfBounds(bytes memory bytecode, uint256 sourceIndex) internal { + vm.expectRevert(abi.encodeWithSelector(SourceIndexOutOfBounds.selector, sourceIndex, bytecode)); + this.sourceRelativeOffsetExternal(bytecode, sourceIndex); + } + + /// Test some examples of source relative offset errors. + function testSourceRelativeOffsetIndexError() external { + // 0 source 0 offset 0 header + // index 0 + checkSourceRelativeOffsetIndexOutOfBounds("", 0); + checkSourceRelativeOffsetIndexOutOfBounds(hex"00", 0); + checkSourceRelativeOffsetIndexOutOfBounds(hex"0000", 0); + checkSourceRelativeOffsetIndexOutOfBounds(hex"000000", 0); + // index 1 + checkSourceRelativeOffsetIndexOutOfBounds(hex"", 1); + checkSourceRelativeOffsetIndexOutOfBounds(hex"00", 1); + checkSourceRelativeOffsetIndexOutOfBounds(hex"0000", 1); + checkSourceRelativeOffsetIndexOutOfBounds(hex"000000", 1); + // index 2 + checkSourceRelativeOffsetIndexOutOfBounds(hex"", 2); + checkSourceRelativeOffsetIndexOutOfBounds(hex"00", 2); + checkSourceRelativeOffsetIndexOutOfBounds(hex"0000", 2); + checkSourceRelativeOffsetIndexOutOfBounds(hex"000000", 2); + + // 1 source 0 offset 0 header + // index 1 + checkSourceRelativeOffsetIndexOutOfBounds(hex"01", 1); + checkSourceRelativeOffsetIndexOutOfBounds(hex"0100", 1); + // has offset but not header + checkSourceRelativeOffsetIndexOutOfBounds(hex"010000", 1); + // with header + checkSourceRelativeOffsetIndexOutOfBounds(hex"01000000000000", 1); + } + + /// Test against a reference implementation. + function testSourceRelativeOffsetReference( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external pure { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + vm.assume(sourceCount > 0); + sourceIndex = bound(sourceIndex, 0, sourceCount - 1); + assertEq( + LibBytecode.sourceRelativeOffset(bytecode, sourceIndex), + LibBytecodeSlow.sourceRelativeOffsetSlow(bytecode, sourceIndex) + ); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceStackAllocation.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceStackAllocation.t.sol new file mode 100644 index 00000000..e07fd115 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecode.sourceStackAllocation.t.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {BytecodeTest} from "test/abstract/BytecodeTest.sol"; +import {LibBytecode, SourceIndexOutOfBounds} from "src/lib/bytecode/LibBytecode.sol"; +import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol"; + +contract LibBytecodeSourceStackAllocationTest is BytecodeTest { + /// Concrete value-pinning tests for sourceStackAllocation. + function testSourceStackAllocationConcrete() external pure { + // 1 source, 0 ops, allocation=0, inputs=0, outputs=0. + assertEq(LibBytecode.sourceStackAllocation(hex"01000000000000", 0), 0); + // 1 source, 0 ops, allocation=5, inputs=0, outputs=0. + assertEq(LibBytecode.sourceStackAllocation(hex"01000000050000", 0), 5); + // 1 source, 0 ops, allocation=0xFF, inputs=0, outputs=0. + assertEq(LibBytecode.sourceStackAllocation(hex"01000000ff0000", 0), 0xFF); + // 1 source, 2 ops, allocation=10, inputs=2, outputs=5. + assertEq(LibBytecode.sourceStackAllocation(hex"010000020a02050000000000000000", 0), 10); + // 2 sources: source 0 alloc=3, source 1 alloc=7. + assertEq(LibBytecode.sourceStackAllocation(hex"02000000040003000000070000", 0), 3); + assertEq(LibBytecode.sourceStackAllocation(hex"02000000040003000000070000", 1), 7); + } + + function sourceStackAllocationExternal(bytes memory bytecode, uint256 sourceIndex) + external + pure + returns (uint256 allocation) + { + return LibBytecode.sourceStackAllocation(bytecode, sourceIndex); + } + + /// Getting the source stack allocation for an index beyond the sources + /// should fail. + function testSourceStackAllocationIndexOutOfBounds( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + sourceIndex = bound(sourceIndex, sourceCount, type(uint256).max); + vm.expectRevert(abi.encodeWithSelector(SourceIndexOutOfBounds.selector, sourceIndex, bytecode)); + this.sourceStackAllocationExternal(bytecode, sourceIndex); + } + + /// Test against a reference implementation. + function testSourceStackAllocationAgainstSlow( + bytes memory bytecode, + uint256 sourceCount, + uint256 sourceIndex, + bytes32 seed + ) external pure { + conformBytecode(bytecode, sourceCount, seed); + sourceCount = LibBytecode.sourceCount(bytecode); + vm.assume(sourceCount > 0); + sourceIndex = bound(sourceIndex, 0, sourceCount - 1); + assertEq( + LibBytecode.sourceStackAllocation(bytecode, sourceIndex), + LibBytecodeSlow.sourceStackAllocationSlow(bytecode, sourceIndex) + ); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecodeSlow.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecodeSlow.sol new file mode 100644 index 00000000..92c1510d --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/bytecode/LibBytecodeSlow.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {SourceIndexOutOfBounds} from "src/lib/bytecode/LibBytecode.sol"; +import {Pointer, LibPointer} from "rain-solmem-0.1.3/src/lib/LibPointer.sol"; +import {LibBytes} from "rain-solmem-0.1.3/src/lib/LibBytes.sol"; + +library LibBytecodeSlow { + using LibBytes for bytes; + using LibPointer for Pointer; + + function sourceCountSlow(bytes memory bytecode) internal pure returns (uint256) { + if (bytecode.length == 0) { + return 0; + } else { + return uint8(bytecode[0]); + } + } + + function sourceRelativeOffsetSlow(bytes memory bytecode, uint256 sourceIndex) internal pure returns (uint256) { + uint256 sourceCount = sourceCountSlow(bytecode); + if (sourceIndex >= sourceCount) { + revert SourceIndexOutOfBounds(sourceIndex, bytecode); + } else { + uint256 offsetPosition = 1 + sourceIndex * 2; + return uint256(uint8(bytecode[offsetPosition])) << 8 | uint256(uint8(bytecode[offsetPosition + 1])); + } + } + + function sourcePointerSlow(bytes memory bytecode, uint256 sourceIndex) internal pure returns (Pointer) { + return bytecode.dataPointer() + .unsafeAddBytes(sourceRelativeOffsetSlow(bytecode, sourceIndex) + 1 + sourceCountSlow(bytecode) * 2); + } + + /// source count is the top byte of the first word of the source header. + function sourceOpsCountSlow(bytes memory bytecode, uint256 sourceIndex) internal pure returns (uint256) { + Pointer pointer = sourcePointerSlow(bytecode, sourceIndex); + bytes32 word = pointer.unsafeReadWord(); + return uint256(word >> 0xF8); + } + + /// stack allocation is the second byte from the top of the first word of the + /// source header. + function sourceStackAllocationSlow(bytes memory bytecode, uint256 sourceIndex) internal pure returns (uint256) { + Pointer pointer = sourcePointerSlow(bytecode, sourceIndex); + bytes32 word = pointer.unsafeReadWord(); + return uint256((word >> 0xF0) & bytes32(uint256(0xFF))); + } + + /// source inputs and outputs are the third and fourth bytes from the top of + /// the first word of the source header. + function sourceInputsOutputsLengthSlow(bytes memory bytecode, uint256 sourceIndex) + internal + pure + returns (uint256 inputs, uint256 outputs) + { + Pointer pointer = sourcePointerSlow(bytecode, sourceIndex); + bytes32 word = pointer.unsafeReadWord(); + inputs = uint256((word >> 0xE8) & bytes32(uint256(0xFF))); + outputs = uint256((word >> 0xE0) & bytes32(uint256(0xFF))); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.hash.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.hash.t.sol new file mode 100644 index 00000000..921cb710 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.hash.t.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {SignedContextV1, LibContext} from "src/lib/caller/LibContext.sol"; +import {LibContextSlow} from "./LibContextSlow.sol"; + +contract LibContextHashTest is Test { + function testFuzzHash0() public pure { + SignedContextV1[] memory signedContexts = new SignedContextV1[](3); + signedContexts[0] = SignedContextV1(address(0), new bytes32[](5), new bytes(65)); + signedContexts[1] = SignedContextV1(address(0), new bytes32[](5), new bytes(65)); + signedContexts[2] = SignedContextV1(address(0), new bytes32[](5), new bytes(65)); + + LibContext.hash(signedContexts); + } + + function testHash(uint256 foo) public pure { + assembly ("memory-safe") { + mstore(0x00, foo) + pop(keccak256(0x00, 0x20)) + } + } + + function testHashGas0() public pure { + assembly ("memory-safe") { + mstore(0, 0) + pop(keccak256(0, 0x20)) + } + } + + /// Concrete test: hash of SignedContextV1 with empty context and signature + /// matches reference implementation. + function testSignedContextHashEmpty() public pure { + SignedContextV1 memory ctx = SignedContextV1(address(0), new bytes32[](0), ""); + assertEq(LibContext.hash(ctx), LibContextSlow.hashSlow(ctx)); + } + + /// forge-config: default.fuzz.runs = 100 + function testSignedContextHashReferenceImplementation(SignedContextV1 memory signedContext) public pure { + assertEq(LibContext.hash(signedContext), LibContextSlow.hashSlow(signedContext)); + } + + function testSignedContextArrayHashReferenceImplementation0() public pure { + SignedContextV1[] memory signedContexts = new SignedContextV1[](1); + signedContexts[0] = SignedContextV1(address(0), new bytes32[](0), ""); + assertEq(LibContext.hash(signedContexts), LibContextSlow.hashSlow(signedContexts)); + } + + function testSignedContextHashGas0() public pure { + SignedContextV1 memory context = SignedContextV1(address(0), new bytes32[](5), new bytes(65)); + LibContext.hash(context); + // 1199 gas + // bytes memory bytes = abi.encode(context); + // keccak256(bytes); + } + + function testSignedContextHashEncodeGas0() public pure { + SignedContextV1 memory context = SignedContextV1(address(0), new bytes32[](5), new bytes(65)); + // 1199 gas + bytes memory data = abi.encode(context); + keccak256(data); + } + + /// forge-config: default.fuzz.runs = 100 + function testSignedContextArrayHashReferenceImplementation(SignedContextV1[] memory signedContexts) public pure { + assertEq(LibContext.hash(signedContexts), LibContextSlow.hashSlow(signedContexts)); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.t.sol new file mode 100644 index 00000000..f5fff5ba --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContext.t.sol @@ -0,0 +1,188 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import { + LibContext, + MessageHashUtils, + LibHashNoAlloc, + SignedContextV1, + InvalidSignature +} from "src/lib/caller/LibContext.sol"; +import {LibContextSlow} from "./LibContextSlow.sol"; + +contract LibContextTest is Test { + function buildExternal(bytes32[][] memory baseContext, SignedContextV1[] memory signedContexts) + external + view + returns (bytes32[][] memory) + { + return LibContext.build(baseContext, signedContexts); + } + + function testBase() public view { + bytes32[] memory baseContext = LibContext.base(); + + assertEq(baseContext.length, 2); + assertEq(baseContext[0], bytes32(uint256(uint160(msg.sender)))); + assertEq(baseContext[1], bytes32(uint256(uint160(address(this))))); + assertTrue(msg.sender != address(this)); + } + + /// forge-config: default.fuzz.runs = 100 + function testBuildStructureReferenceImplementation(bytes32[][] memory base) public view { + bytes32[] memory unsignedContext = new bytes32[](3); + unsignedContext[0] = bytes32(uint256(1)); + unsignedContext[1] = bytes32(uint256(2)); + unsignedContext[2] = bytes32(uint256(3)); + + // This was generated as a new wallet by cast. + address signer = 0xc9A34471D83253B148C821886278ae22EbaB23E4; + bytes32 signerPrivateKey = bytes32(0x61b952d0c26214380daf3ca0a8ec9316682d63673db12d723c30417c86dbfca2); + (signerPrivateKey); + + bytes32 toSign = MessageHashUtils.toEthSignedMessageHash(LibHashNoAlloc.hashWords(unsignedContext)); + (toSign); + + SignedContextV1[] memory signedContexts = new SignedContextV1[](1); + signedContexts[0] = SignedContextV1({ + signer: signer, + context: unsignedContext, + // Signature generated by cast. + signature: hex"8e95799bf4f8967b8dfd02a57c4b0d5294149ad47bd8f657e63efb04e205160a176dc000ba8b240a4e8e5e6a31b3939d4ac0efdeb790f95d84dd1296b22abc561b" + }); + + bytes32[][] memory expected = LibContextSlow.buildStructureSlow(base, signedContexts); + bytes32[][] memory actual = LibContext.build(base, signedContexts); + assertEq(expected.length, actual.length); + + for (uint256 i = 0; i < expected.length; i++) { + assertEq(expected[i], actual[i]); + } + } + + /// Zero signed contexts with empty base: reference must match production. + function testBuildStructureZeroSignedEmptyBase() public view { + bytes32[][] memory base = new bytes32[][](0); + SignedContextV1[] memory signedContexts = new SignedContextV1[](0); + + bytes32[][] memory expected = LibContextSlow.buildStructureSlow(base, signedContexts); + bytes32[][] memory actual = LibContext.build(base, signedContexts); + assertEq(expected.length, actual.length, "length mismatch"); + + for (uint256 i = 0; i < expected.length; i++) { + assertEq(expected[i], actual[i]); + } + } + + /// Zero signed contexts with non-empty base: reference must match + /// production. The result should have 1 (base context) + base.length + /// columns and no signers column. + /// forge-config: default.fuzz.runs = 100 + function testBuildStructureZeroSignedNonEmptyBase(bytes32[][] memory base) public view { + SignedContextV1[] memory signedContexts = new SignedContextV1[](0); + + bytes32[][] memory expected = LibContextSlow.buildStructureSlow(base, signedContexts); + bytes32[][] memory actual = LibContext.build(base, signedContexts); + assertEq(expected.length, actual.length, "length mismatch"); + assertEq(actual.length, 1 + base.length, "should be base context + base columns only"); + + for (uint256 i = 0; i < expected.length; i++) { + assertEq(expected[i], actual[i]); + } + } + + /// A completely invalid signature should revert with InvalidSignature(0). + function testBuildInvalidSignatureReverts() public { + bytes32[] memory ctx = new bytes32[](1); + ctx[0] = bytes32(uint256(42)); + + SignedContextV1[] memory signedContexts = new SignedContextV1[](1); + signedContexts[0] = SignedContextV1({ + signer: address(0xdead), + context: ctx, + signature: hex"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }); + + vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, uint256(0))); + this.buildExternal(new bytes32[][](0), signedContexts); + } + + /// First signature valid, second invalid — should revert with + /// InvalidSignature(1), not InvalidSignature(0). + function testBuildInvalidSignatureSecondIndex() public { + // Use vm.sign for a proper first signature. + uint256 signerPk = 0xA11CE; + address signer = vm.addr(signerPk); + + bytes32[] memory ctx = new bytes32[](1); + ctx[0] = bytes32(uint256(1)); + + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(LibHashNoAlloc.hashWords(ctx)); + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, digest); + bytes memory validSig = abi.encodePacked(r, s, v); + + SignedContextV1[] memory signedContexts = new SignedContextV1[](2); + signedContexts[0] = SignedContextV1({signer: signer, context: ctx, signature: validSig}); + signedContexts[1] = SignedContextV1({ + signer: address(0xdead), + context: ctx, + signature: hex"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }); + + vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, uint256(1))); + this.buildExternal(new bytes32[][](0), signedContexts); + } + + /// Valid signature but for wrong context data — signer signed different + /// data than what is presented. + function testBuildInvalidSignatureWrongContext() public { + uint256 signerPk = 0xB0B; + address signer = vm.addr(signerPk); + + bytes32[] memory signedCtx = new bytes32[](1); + signedCtx[0] = bytes32(uint256(1)); + + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(LibHashNoAlloc.hashWords(signedCtx)); + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, digest); + bytes memory sig = abi.encodePacked(r, s, v); + + // Present different context than what was signed. + bytes32[] memory differentCtx = new bytes32[](1); + differentCtx[0] = bytes32(uint256(999)); + + SignedContextV1[] memory signedContexts = new SignedContextV1[](1); + signedContexts[0] = SignedContextV1({signer: signer, context: differentCtx, signature: sig}); + + vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, uint256(0))); + this.buildExternal(new bytes32[][](0), signedContexts); + } + + /// Empty signature bytes should revert. + function testBuildInvalidSignatureEmpty() public { + bytes32[] memory ctx = new bytes32[](1); + ctx[0] = bytes32(uint256(1)); + + SignedContextV1[] memory signedContexts = new SignedContextV1[](1); + signedContexts[0] = SignedContextV1({signer: address(0xdead), context: ctx, signature: ""}); + + vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, uint256(0))); + this.buildExternal(new bytes32[][](0), signedContexts); + } + + function testBuild0() public view { + bytes32[][] memory expected = new bytes32[][](1); + expected[0] = LibContext.base(); + bytes32[][] memory built = LibContext.build(new bytes32[][](0), new SignedContextV1[](0)); + assertEq(expected.length, built.length); + + for (uint256 i = 0; i < expected.length; i++) { + assertEq(expected[i], built[i]); + } + } + + function testBuildGas0() public view { + LibContext.build(new bytes32[][](0), new SignedContextV1[](0)); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContextSlow.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContextSlow.sol new file mode 100644 index 00000000..89d53785 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibContextSlow.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {LibHashNoAlloc, HASH_NIL} from "rain-lib-hash-0.1.0/src/LibHashNoAlloc.sol"; +import {LibCast} from "rain-lib-typecast-0.1.0/src/LibCast.sol"; +import {LibUint256Array} from "rain-solmem-0.1.3/src/lib/LibUint256Array.sol"; + +import {SignedContextV1} from "src/interface/IInterpreterCallerV4.sol"; + +library LibContextSlow { + using LibUint256Array for uint256; + using LibCast for uint256[]; + + function hashSlow(SignedContextV1 memory signedContext) internal pure returns (bytes32) { + bytes32 a = LibHashNoAlloc.hashWords(uint256(uint160(signedContext.signer)).arrayFrom().asBytes32Array()); + bytes32 b = LibHashNoAlloc.hashWords(signedContext.context); + bytes32 c = LibHashNoAlloc.combineHashes(a, b); + bytes32 d = LibHashNoAlloc.hashBytes(signedContext.signature); + bytes32 e = LibHashNoAlloc.combineHashes(c, d); + return e; + } + + function hashSlow(SignedContextV1[] memory signedContexts) internal pure returns (bytes32) { + bytes32 hashed = HASH_NIL; + + for (uint256 i = 0; i < signedContexts.length; i++) { + hashed = LibHashNoAlloc.combineHashes(hashed, hashSlow(signedContexts[i])); + } + + return hashed; + } + + function buildStructureSlow(bytes32[][] memory baseContext, SignedContextV1[] memory signedContexts) + internal + view + returns (bytes32[][] memory) + { + uint256 signedLen = signedContexts.length > 0 ? signedContexts.length + 1 : 0; + bytes32[][] memory context = new bytes32[][](1 + baseContext.length + signedLen); + context[0] = new bytes32[](2); + context[0][0] = bytes32(uint256(uint160(address(msg.sender)))); + context[0][1] = bytes32(uint256(uint160(address(this)))); + + uint256 offset = 1; + uint256 i = 0; + for (; i < baseContext.length; i++) { + context[i + offset] = baseContext[i]; + } + offset = offset + i; + + if (signedContexts.length > 0) { + bytes32[] memory signers = new bytes32[](signedContexts.length); + for (i = 0; i < signedContexts.length; i++) { + signers[i] = bytes32(uint256(uint160(signedContexts[i].signer))); + } + context[offset] = signers; + offset = offset + 1; + + i = 0; + for (; i < signedContexts.length; i++) { + context[i + offset] = signedContexts[i].context; + } + } + + return context; + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluable.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluable.t.sol new file mode 100644 index 00000000..4b25e5bd --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluable.t.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibEvaluable} from "src/lib/caller/LibEvaluable.sol"; +import {LibEvaluableSlow} from "./LibEvaluableSlow.sol"; +import {IInterpreterStoreV3} from "src/interface/IInterpreterStoreV3.sol"; + +import {EvaluableV4} from "src/interface/IInterpreterCallerV4.sol"; +import {IInterpreterV4} from "src/interface/IInterpreterV4.sol"; + +contract LibEvaluableTest is Test { + using LibEvaluable for EvaluableV4; + + /// Test a known hash so that if the hash function changes, we know. + function testEvaluableV4KnownHash() external pure { + EvaluableV4 memory evaluable = + EvaluableV4(IInterpreterV4(address(1)), IInterpreterStoreV3(address(2)), hex"030405"); + assertEq(evaluable.hash(), bytes32(0x389371bb1206fa55c5ce170f501ebbe5aacd211e163a6076a349c8bc6437aaa9)); + } + + function testEvaluableV4HashDifferent(EvaluableV4 memory a, EvaluableV4 memory b) public pure { + vm.assume( + a.interpreter != b.interpreter || a.store != b.store || keccak256(a.bytecode) != keccak256(b.bytecode) + ); + assertTrue(a.hash() != b.hash()); + } + + function testEvaluableV4HashSame(EvaluableV4 memory a) public pure { + EvaluableV4 memory b = EvaluableV4(a.interpreter, a.store, a.bytecode); + assertEq(a.hash(), b.hash()); + } + + function testEvaluableV4HashSensitivity(EvaluableV4 memory a, EvaluableV4 memory b) public pure { + vm.assume( + a.interpreter != b.interpreter && a.store != b.store && keccak256(a.bytecode) != keccak256(b.bytecode) + ); + + EvaluableV4 memory c; + + assertTrue(a.hash() != b.hash()); + + // Check interpreter changes hash. + c = EvaluableV4(b.interpreter, a.store, a.bytecode); + assertTrue(a.hash() != c.hash()); + + // Check store changes hash. + c = EvaluableV4(a.interpreter, b.store, a.bytecode); + assertTrue(a.hash() != c.hash()); + + // Check bytecode changes hash. + c = EvaluableV4(a.interpreter, a.store, b.bytecode); + assertTrue(a.hash() != c.hash()); + + // Check match. + c = EvaluableV4(a.interpreter, a.store, a.bytecode); + assertEq(a.hash(), c.hash()); + + // Check hash doesn't include extraneous data + uint256 v0 = type(uint256).max; + uint256 v1 = 0; + EvaluableV4 memory d = EvaluableV4(IInterpreterV4(address(0)), IInterpreterStoreV3(address(0)), hex""); + assembly ("memory-safe") { + mstore(mload(0x40), v0) + } + bytes32 hash0 = d.hash(); + assembly ("memory-safe") { + mstore(mload(0x40), v1) + } + bytes32 hash1 = d.hash(); + assertEq(hash0, hash1); + } + + function testEvaluableV4HashGas0() public pure { + EvaluableV4(IInterpreterV4(address(0)), IInterpreterStoreV3(address(0)), hex"").hash(); + } + + function testEvaluableV4BytecodeLengthSensitivity() public pure { + EvaluableV4 memory a = EvaluableV4(IInterpreterV4(address(0)), IInterpreterStoreV3(address(0)), hex"01"); + // `b` is identical to `a` except for the bytecode length. + // Note the trailing `00` in the bytecode would be the same in memory as + // the `00` padding that the allocator would add to `a`'s bytecode. + EvaluableV4 memory b = EvaluableV4(IInterpreterV4(address(0)), IInterpreterStoreV3(address(0)), hex"0100"); + assertTrue(a.hash() != b.hash()); + } + + function testEvaluableV4HashGasSlow0() public pure { + LibEvaluableSlow.hashSlow(EvaluableV4(IInterpreterV4(address(0)), IInterpreterStoreV3(address(0)), hex"")); + } + + function testEvaluableV4ReferenceImplementation(EvaluableV4 memory evaluable) public pure { + assertEq(LibEvaluable.hash(evaluable), LibEvaluableSlow.hashSlow(evaluable)); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluableSlow.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluableSlow.sol new file mode 100644 index 00000000..ff13b0ef --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/caller/LibEvaluableSlow.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {EvaluableV2} from "src/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import {EvaluableV4} from "src/interface/IInterpreterCallerV4.sol"; + +library LibEvaluableSlow { + function hashSlow(EvaluableV2 memory evaluable) internal pure returns (bytes32) { + return keccak256( + abi.encodePacked( + uint256(uint160(address(evaluable.interpreter))), + uint256(uint160(address(evaluable.store))), + uint256(uint160(evaluable.expression)) + ) + ); + } + + function hashSlow(EvaluableV4 memory evaluable) internal pure returns (bytes32) { + return keccak256( + abi.encodePacked( + keccak256( + abi.encodePacked( + uint256(uint160(address(evaluable.interpreter))), uint256(uint160(address(evaluable.store))) + ) + ), + keccak256(evaluable.bytecode) + ) + ); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.buildMeta.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.buildMeta.t.sol new file mode 100644 index 00000000..b6d5f2ab --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.buildMeta.t.sol @@ -0,0 +1,254 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; + +import {LibParseMeta} from "src/lib/parse/LibParseMeta.sol"; +import {LibAuthoringMeta, AuthoringMetaV2} from "test/lib/meta/LibAuthoringMeta.sol"; +import { + LibGenParseMeta, + DuplicateFingerprint, + AuthoringMetaTooLarge, + MaxDepthExceeded, + META_ITEM_MASK +} from "src/lib/codegen/LibGenParseMeta.sol"; +import {META_ITEM_SIZE} from "src/lib/parse/LibParseMeta.sol"; +import {LibBloom} from "test/lib/bloom/LibBloom.sol"; + +contract LibGenParseMetaBuildMetaTest is Test { + /// META_ITEM_MASK must be a full META_ITEM_SIZE-byte mask (32 bits for + /// 4-byte items). Previously the constant was (1 << 4) - 1 = 0xF which + /// is only 4 bits. + function testMetaItemMask() external pure { + assertEq(META_ITEM_MASK, (1 << (META_ITEM_SIZE * 8)) - 1); + assertEq(META_ITEM_MASK, type(uint32).max); + } + + /// Zero words should produce a 1-byte meta (just the depth prefix = 0). + function testBuildParseMetaV2ZeroWords() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](0); + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 8); + assertEq(meta.length, 1); + assertEq(uint8(meta[0]), 0); + } + + function buildParseMetaV2External(AuthoringMetaV2[] memory authoringMeta, uint8 maxDepth) + external + pure + returns (bytes memory) + { + return LibGenParseMeta.buildParseMetaV2(authoringMeta, maxDepth); + } + + /// This is super loose from limited empirical testing. + function expanderDepth(uint256 n) internal pure returns (uint8) { + // Number of fully saturated expanders + // + 1 for solidity flooring everything + // + 1 for a non-fully saturated but still quite full expander + // + 1 for a potentially nearly empty expander + // This is NOT a safe typecast, but in normal useage we are unlikely to + // get anywhere near the limit as that would imply ~256^2 words. + //forge-lint: disable-next-line(unsafe-typecast) + return uint8(n / type(uint8).max + 3); + } + + function testBuildMeta(AuthoringMetaV2[] memory authoringMeta) external pure { + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + bytes memory meta = LibGenParseMeta.buildParseMetaV2(authoringMeta, expanderDepth(authoringMeta.length)); + (meta); + } + + function testRoundMetaExpanderShallow(AuthoringMetaV2[] memory authoringMeta, uint8 j, bytes32 notFound) + external + pure + { + vm.assume(authoringMeta.length > 0); + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + for (uint256 i = 0; i < authoringMeta.length; i++) { + vm.assume(authoringMeta[i].word != notFound); + } + j = uint8(bound(j, uint8(0), uint8(authoringMeta.length) - 1)); + + bytes memory meta = LibGenParseMeta.buildParseMetaV2(authoringMeta, expanderDepth(authoringMeta.length)); + (bool exists, uint256 k) = LibParseMeta.lookupWord(meta, authoringMeta[j].word); + assertTrue(exists, "exists"); + assertEq(j, k, "k"); + + (bool notExists, uint256 l) = LibParseMeta.lookupWord(meta, notFound); + assertTrue(!notExists, "notExists"); + assertEq(0, l, "l"); + } + + function testRoundMetaExpanderDeeper(AuthoringMetaV2[] memory authoringMeta, uint8 j, bytes32 notFound) + external + pure + { + vm.assume(authoringMeta.length > 50); + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + for (uint256 i = 0; i < authoringMeta.length; i++) { + vm.assume(authoringMeta[i].word != notFound); + } + j = uint8(bound(j, uint8(0), uint8(authoringMeta.length) - 1)); + + bytes memory meta = LibGenParseMeta.buildParseMetaV2(authoringMeta, expanderDepth(authoringMeta.length)); + + (bool exists, uint256 k) = LibParseMeta.lookupWord(meta, authoringMeta[j].word); + assertTrue(exists, "exists"); + assertEq(j, k, "k"); + + (bool notExists, uint256 l) = LibParseMeta.lookupWord(meta, notFound); + assertTrue(!notExists, "notExists"); + assertEq(0, l, "l"); + } + + function testBuildMetaDuplicateFingerprint() external { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](2); + metas[0] = AuthoringMetaV2({word: bytes32(uint256(1)), description: "a"}); + metas[1] = AuthoringMetaV2({word: bytes32(uint256(1)), description: "b"}); + + vm.expectRevert(abi.encodeWithSelector(DuplicateFingerprint.selector)); + this.buildParseMetaV2External(metas, 3); + } + + /// 257 words should revert with AuthoringMetaTooLarge. + function testBuildMetaTooLarge257() external { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](257); + for (uint256 i = 0; i < 257; i++) { + metas[i] = AuthoringMetaV2({word: bytes32(i), description: ""}); + } + vm.expectRevert(abi.encodeWithSelector(AuthoringMetaTooLarge.selector, 257)); + this.buildParseMetaV2External(metas, 8); + } + + /// Fuzz: any length above 256 should revert with AuthoringMetaTooLarge. + function testBuildMetaTooLargeFuzz(uint256 length) external { + length = bound(length, 257, 512); + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](length); + for (uint256 i = 0; i < length; i++) { + metas[i] = AuthoringMetaV2({word: bytes32(i), description: ""}); + } + vm.expectRevert(abi.encodeWithSelector(AuthoringMetaTooLarge.selector, length)); + this.buildParseMetaV2External(metas, 8); + } + + /// maxDepth=1 with enough words to force multiple bloom layers should + /// revert with MaxDepthExceeded. + function testBuildMetaMaxDepthExceeded() external { + // 256 unique words will need more than 1 bloom layer. + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](256); + for (uint256 i = 0; i < 256; i++) { + metas[i] = AuthoringMetaV2({word: bytes32(i), description: ""}); + } + vm.expectRevert(abi.encodeWithSelector(MaxDepthExceeded.selector, 1)); + this.buildParseMetaV2External(metas, 1); + } + + /// Fuzz: maxDepth=1 with more than 1 word that collides should revert. + /// Even 2 words can collide at depth 1 if they share a bit position for + /// every seed — but with 256+ words, collision is guaranteed. + function testBuildMetaMaxDepthExceededFuzz(uint8 maxDepth) external { + // Use enough words that the required depth exceeds maxDepth. + // 256 words need at least 2 layers; bound maxDepth to 1. + vm.assume(maxDepth < 2); + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](256); + for (uint256 i = 0; i < 256; i++) { + metas[i] = AuthoringMetaV2({word: bytes32(i), description: ""}); + } + vm.expectRevert(abi.encodeWithSelector(MaxDepthExceeded.selector, maxDepth)); + this.buildParseMetaV2External(metas, maxDepth); + } + + /// Exactly 256 words should succeed (boundary). + function testBuildMeta256Words() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](256); + for (uint256 i = 0; i < 256; i++) { + metas[i] = AuthoringMetaV2({word: bytes32(i), description: ""}); + } + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 8); + assertTrue(meta.length > 0); + } + + /// The generated parse meta from parseMetaConstantString should be + /// functionally equivalent to calling buildParseMetaV2 directly. Verify + /// by building both ways and checking all words can be looked up with + /// correct indices. + function testParseMetaConstantStringRoundtrip() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](3); + metas[0] = AuthoringMetaV2({word: bytes32("add"), description: "Add two numbers"}); + metas[1] = AuthoringMetaV2({word: bytes32("sub"), description: "Subtract"}); + metas[2] = AuthoringMetaV2({word: bytes32("mul"), description: "Multiply"}); + + bytes memory encoded = abi.encode(metas); + string memory result = LibGenParseMeta.parseMetaConstantString(vm, encoded, 3); + + // The function should produce non-empty output. + assertTrue(bytes(result).length > 0); + + // Verify the underlying parse meta is functional by building it + // directly and checking all words resolve. + bytes memory parseMeta = LibGenParseMeta.buildParseMetaV2(metas, 3); + for (uint256 i = 0; i < metas.length; i++) { + (bool exists, uint256 index) = LibParseMeta.lookupWord(parseMeta, metas[i].word); + assertTrue(exists, "word should exist"); + assertEq(index, i, "word index mismatch"); + } + } + + /// Empty authoring meta should produce a valid (non-empty) constant string. + function testParseMetaConstantStringEmpty() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](0); + bytes memory encoded = abi.encode(metas); + string memory result = LibGenParseMeta.parseMetaConstantString(vm, encoded, 1); + + assertTrue(bytes(result).length > 0); + } + + /// Single word should produce a valid constant string and the parse meta + /// built internally should correctly look up that word. + function testParseMetaConstantStringSingleWord() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](1); + metas[0] = AuthoringMetaV2({word: bytes32("only"), description: "The only word"}); + + bytes memory encoded = abi.encode(metas); + string memory result = LibGenParseMeta.parseMetaConstantString(vm, encoded, 1); + + assertTrue(bytes(result).length > 0); + + bytes memory parseMeta = LibGenParseMeta.buildParseMetaV2(metas, 1); + (bool exists, uint256 index) = LibParseMeta.lookupWord(parseMeta, bytes32("only")); + assertTrue(exists); + assertEq(index, 0); + } + + /// Different build depths should all produce valid output for the same + /// input, and the underlying parse meta should remain functional. + function testParseMetaConstantStringBuildDepths() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](2); + metas[0] = AuthoringMetaV2({word: bytes32("foo"), description: ""}); + metas[1] = AuthoringMetaV2({word: bytes32("bar"), description: ""}); + + bytes memory encoded = abi.encode(metas); + + for (uint8 depth = 1; depth <= 5; depth++) { + string memory result = LibGenParseMeta.parseMetaConstantString(vm, encoded, depth); + assertTrue(bytes(result).length > 0); + + bytes memory parseMeta = LibGenParseMeta.buildParseMetaV2(metas, depth); + for (uint256 i = 0; i < metas.length; i++) { + (bool exists, uint256 index) = LibParseMeta.lookupWord(parseMeta, metas[i].word); + assertTrue(exists); + assertEq(index, i); + } + } + } + + /// Fuzz: parseMetaConstantString should not revert for any valid + /// (no duplicate words) authoring meta. + function testParseMetaConstantStringFuzz(AuthoringMetaV2[] memory authoringMeta) external pure { + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + bytes memory encoded = abi.encode(authoringMeta); + string memory result = LibGenParseMeta.parseMetaConstantString(vm, encoded, expanderDepth(authoringMeta.length)); + assertTrue(bytes(result).length > 0); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.findExpander.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.findExpander.t.sol new file mode 100644 index 00000000..41cf58c3 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMeta.findExpander.t.sol @@ -0,0 +1,89 @@ +//// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; + +import {LibBloom} from "test/lib/bloom/LibBloom.sol"; +import {LibCtPop} from "rain-math-binary-0.1.1/src/lib/LibCtPop.sol"; +import {LibAuthoringMeta, AuthoringMetaV2} from "test/lib/meta/LibAuthoringMeta.sol"; +import {LibGenParseMeta} from "src/lib/codegen/LibGenParseMeta.sol"; +import {LibGenParseMetaSlow} from "test/src/lib/codegen/LibGenParseMetaSlow.sol"; + +/// @title LibGenParseMetaFindExpanderTest +/// Test that we can find reasonable expansions in a reasonable number of +/// iterations for a reasonable number of words. +contract LibGenParseMetaFindExpanderTest is Test { + /// Test that we can find an expansion for a small number of words in a + /// single iteration. + /// Birthday paradox says we should expect to find a collision in 256 slots + /// and 32 words 86.76% of the time. + /// https://www.wolframalpha.com/input?i=birthday+problem+calculator&assumption=%7B%22F%22%2C+%22BirthdayProblem%22%2C+%22pbds%22%7D+-%3E%22256%22&assumption=%7B%22F%22%2C+%22BirthdayProblem%22%2C+%22n%22%7D+-%3E%2232%22&assumption=%22FSelect%22+-%3E+%7B%7B%22BirthdayProblem%22%7D%7D + /// The probability of finding a collision in EVERY iteration is 0.8676^256 + /// which is 1.621075e-16. I.e. we shoud expect the fuzz test to basically + /// never fail for ~1000 runs. + function testFindExpanderSmall(AuthoringMetaV2[] memory authoringMeta) external pure { + vm.assume(authoringMeta.length <= 0x20); + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + + (uint8 seed, uint256 expansion, AuthoringMetaV2[] memory remaining) = + LibGenParseMeta.findBestExpander(authoringMeta); + (seed); + assertEq(LibCtPop.ctpop(expansion), authoringMeta.length); + assertEq(remaining.length, 0); + } + + /// Empty input should return bestSeed 0, empty expansion, empty remaining. + function testFindExpanderEmpty() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](0); + (uint8 bestSeed, uint256 bestExpansion, AuthoringMetaV2[] memory remaining) = + LibGenParseMeta.findBestExpander(metas); + assertEq(bestSeed, 0); + assertEq(bestExpansion, 0); + assertEq(remaining.length, 0); + } + + /// Large input (64 elements) forces non-empty remaining array due to + /// bloom filter collisions. + function testFindExpanderLarge() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](64); + for (uint256 i = 0; i < 64; i++) { + metas[i] = AuthoringMetaV2({word: bytes32(i), description: ""}); + } + (, uint256 bestExpansion, AuthoringMetaV2[] memory remaining) = LibGenParseMeta.findBestExpander(metas); + uint256 expandedCount = LibCtPop.ctpop(bestExpansion); + assertEq(remaining.length, 64 - expandedCount); + } + + /// Single word should always get a perfect expansion with no remaining. + function testFindExpanderSingleWord(bytes32 word) external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](1); + metas[0] = AuthoringMetaV2({word: word, description: ""}); + (, uint256 bestExpansion, AuthoringMetaV2[] memory remaining) = LibGenParseMeta.findBestExpander(metas); + assertEq(LibCtPop.ctpop(bestExpansion), 1); + assertEq(remaining.length, 0); + } + + /// Fuzz: the invariant expandedCount + remaining.length == metas.length + /// must always hold. + function testFindExpanderInvariant(AuthoringMetaV2[] memory authoringMeta) external pure { + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + (, uint256 bestExpansion, AuthoringMetaV2[] memory remaining) = LibGenParseMeta.findBestExpander(authoringMeta); + uint256 expandedCount = LibCtPop.ctpop(bestExpansion); + assertEq(expandedCount + remaining.length, authoringMeta.length); + } + + /// Fuzz: findBestExpander must agree with the reference implementation + /// that searches all 256 seeds. + function testFindExpanderMatchesReference(AuthoringMetaV2[] memory authoringMeta) external pure { + vm.assume(authoringMeta.length > 0); + vm.assume(authoringMeta.length <= 0x20); + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + + (uint8 refBestSeed, uint256 refBestCt) = LibGenParseMetaSlow.findBestExpanderSlow(authoringMeta); + + (uint8 bestSeed, uint256 bestExpansion,) = LibGenParseMeta.findBestExpander(authoringMeta); + assertEq(bestSeed, refBestSeed, "seed mismatch"); + assertEq(LibCtPop.ctpop(bestExpansion), refBestCt, "expansion count mismatch"); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMetaSlow.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMetaSlow.sol new file mode 100644 index 00000000..214c3d4a --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/codegen/LibGenParseMetaSlow.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {LibParseMeta} from "src/lib/parse/LibParseMeta.sol"; +import {LibCtPop} from "rain-math-binary-0.1.1/src/lib/LibCtPop.sol"; +import {AuthoringMetaV2} from "src/interface/IParserV2.sol"; + +library LibGenParseMetaSlow { + /// Reference implementation of findBestExpander that searches all 256 seeds + /// (0 through 255 inclusive). Returns only the best seed and its popcount + /// so tests can compare against the optimised implementation. + function findBestExpanderSlow(AuthoringMetaV2[] memory metas) + internal + pure + returns (uint8 bestSeed, uint256 bestCt) + { + for (uint256 seed = 0; seed <= type(uint8).max; seed++) { + uint256 expansion = 0; + for (uint256 i = 0; i < metas.length; i++) { + (uint256 shifted,) = LibParseMeta.wordBitmapped(seed, metas[i].word); + expansion = shifted | expansion; + } + uint256 ct = LibCtPop.ctpop(expansion); + if (ct > bestCt) { + bestCt = ct; + //forge-lint: disable-next-line(unsafe-typecast) + bestSeed = uint8(seed); + } + // Perfect expansion — no need to keep searching. + if (ct == metas.length) { + break; + } + } + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespace.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespace.t.sol new file mode 100644 index 00000000..7cbd5f73 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespace.t.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; + +import {LibNamespace, StateNamespace, FullyQualifiedNamespace} from "src/lib/ns/LibNamespace.sol"; +import {LibNamespaceSlow} from "test/src/lib/ns/LibNamespaceSlow.sol"; + +contract LibNamespaceTest is Test { + /// Concrete pinned-value test for qualifyNamespace. + function testQualifyNamespaceConcrete() public pure { + // qualifyNamespace(0, address(0)) == keccak256(abi.encode(0, 0)). + assertEq( + FullyQualifiedNamespace.unwrap(LibNamespace.qualifyNamespace(StateNamespace.wrap(0), address(0))), + uint256(keccak256(abi.encode(uint256(0), uint256(0)))) + ); + // Non-zero inputs. + assertEq( + FullyQualifiedNamespace.unwrap(LibNamespace.qualifyNamespace(StateNamespace.wrap(1), address(0xdead))), + uint256(keccak256(abi.encode(uint256(1), uint256(uint160(address(0xdead)))))) + ); + } + + function testQualifyNamespaceReferenceImplementation(StateNamespace stateNamespace, address sender) public pure { + assertEq( + FullyQualifiedNamespace.unwrap(LibNamespace.qualifyNamespace(stateNamespace, sender)), + FullyQualifiedNamespace.unwrap(LibNamespaceSlow.qualifyNamespaceSlow(stateNamespace, sender)) + ); + } + + function testQualifyNamespaceGas0(StateNamespace stateNamespace, address sender) public pure { + LibNamespace.qualifyNamespace(stateNamespace, sender); + } + + function testQualifyNamespaceGasSlow0(StateNamespace stateNamespace, address sender) public pure { + LibNamespaceSlow.qualifyNamespaceSlow(stateNamespace, sender); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespaceSlow.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespaceSlow.sol new file mode 100644 index 00000000..8323e83f --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/ns/LibNamespaceSlow.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {StateNamespace, FullyQualifiedNamespace} from "src/interface/IInterpreterV4.sol"; + +library LibNamespaceSlow { + /// Implements an abi encoding based version of `qualifyNamespace` that is + /// slower than the version in `LibNamespace` because the abi encoding + /// requires additional logic and memory allocations. + function qualifyNamespaceSlow(StateNamespace stateNamespace, address sender) + internal + pure + returns (FullyQualifiedNamespace) + { + return + FullyQualifiedNamespace.wrap(uint256(keccak256(abi.encode(StateNamespace.unwrap(stateNamespace), sender)))); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.lookupWord.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.lookupWord.t.sol new file mode 100644 index 00000000..93cb4e3f --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.lookupWord.t.sol @@ -0,0 +1,267 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibParseMeta} from "src/lib/parse/LibParseMeta.sol"; +import {LibGenParseMeta} from "src/lib/codegen/LibGenParseMeta.sol"; +import {LibAuthoringMeta, AuthoringMetaV2} from "test/lib/meta/LibAuthoringMeta.sol"; +import {LibBloom} from "test/lib/bloom/LibBloom.sol"; +import { + META_ITEM_SIZE, + FINGERPRINT_MASK, + META_EXPANSION_SIZE, + META_PREFIX_SIZE, + InvalidParseMeta +} from "src/lib/parse/LibParseMeta.sol"; + +contract LibParseMetaLookupWordTest is Test { + function checkParseMetaStructureExternal(bytes memory meta) external pure { + LibParseMeta.checkParseMetaStructure(meta); + } + + /// buildParseMetaV2 output must always pass structural validation. + function testCheckParseMetaStructureBuildOutput() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](3); + metas[0] = AuthoringMetaV2({word: bytes32("add"), description: ""}); + metas[1] = AuthoringMetaV2({word: bytes32("sub"), description: ""}); + metas[2] = AuthoringMetaV2({word: bytes32("mul"), description: ""}); + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 8); + LibParseMeta.checkParseMetaStructure(meta); + } + + /// Fuzz: any well-formed buildParseMetaV2 output passes validation. + function testCheckParseMetaStructureFuzz(AuthoringMetaV2[] memory authoringMeta) external pure { + vm.assume(authoringMeta.length > 0); + vm.assume(authoringMeta.length <= 64); + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + uint8 depth = uint8(authoringMeta.length / type(uint8).max + 3); + bytes memory meta = LibGenParseMeta.buildParseMetaV2(authoringMeta, depth); + LibParseMeta.checkParseMetaStructure(meta); + } + + /// Truncated meta should fail validation. + function testCheckParseMetaStructureTruncated() external { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](1); + metas[0] = AuthoringMetaV2({word: bytes32("add"), description: ""}); + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 8); + + // Truncate by 1 byte. + bytes memory truncated = new bytes(meta.length - 1); + for (uint256 i = 0; i < truncated.length; i++) { + truncated[i] = meta[i]; + } + vm.expectRevert(abi.encodeWithSelector(InvalidParseMeta.selector, meta.length, truncated.length)); + this.checkParseMetaStructureExternal(truncated); + } + + /// Extra trailing bytes should fail validation. + function testCheckParseMetaStructureExtraBytes() external { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](1); + metas[0] = AuthoringMetaV2({word: bytes32("add"), description: ""}); + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 8); + + // Append 1 extra byte. + bytes memory extended = new bytes(meta.length + 1); + for (uint256 i = 0; i < meta.length; i++) { + extended[i] = meta[i]; + } + vm.expectRevert(abi.encodeWithSelector(InvalidParseMeta.selector, meta.length, extended.length)); + this.checkParseMetaStructureExternal(extended); + } + + /// Empty meta (zero length) should fail validation. + function testCheckParseMetaStructureEmpty() external { + bytes memory meta = new bytes(0); + // depth=0, 0 expansions, 0 items → expected length = 1. + vm.expectRevert(abi.encodeWithSelector(InvalidParseMeta.selector, META_PREFIX_SIZE, 0)); + this.checkParseMetaStructureExternal(meta); + } + + /// Demonstrates M01: lookupWord does not check whether the word's bit is + /// actually set in the bloom filter expansion before comparing fingerprints. + /// We construct raw meta bytes where: + /// - The expansion has a single bit set (NOT the lookup word's bit) + /// - The item at position 0 has a fingerprint matching the lookup word + /// This should return (false, 0) but currently returns (true, fakeIndex) + /// because the bit-set check is missing. + function testLookupWordMissingBitCheck() external pure { + bytes32 word = bytes32("notinmeta"); + uint8 seed = 0; + + // Compute word's bitmap and fingerprint, then build crafted meta. + bytes memory meta = _buildM01Meta(word, seed); + + // lookupWord should return (false, 0) because the word's bit is NOT + // set in the expansion. But due to M01, it returns (true, 42). + (bool exists, uint256 index) = LibParseMeta.lookupWord(meta, word); + assertFalse(exists, "M01: word bit not set in expansion, should not match"); + assertEq(index, 0, "M01: index should be 0 for not-found"); + } + + /// Fuzz variant of M01: any word should fail to match when its bit is not + /// set in the expansion, regardless of fingerprint. + function testLookupWordMissingBitCheckFuzz(bytes32 word, uint8 seed) external pure { + bytes memory meta = _buildM01Meta(word, seed); + + (bool exists, uint256 index) = LibParseMeta.lookupWord(meta, word); + assertFalse(exists, "M01 fuzz: word bit not set, should not match"); + assertEq(index, 0, "M01 fuzz: index should be 0 for not-found"); + } + + /// Constructs a crafted meta that triggers M01. The meta has one bloom + /// layer with a single bit set that is NOT the lookup word's bit. The item + /// at the position lookupWord will compute has a fingerprint matching the + /// word. Without the bit-set check, lookupWord returns a false positive. + function _buildM01Meta(bytes32 word, uint8 seed) internal pure returns (bytes memory meta) { + (uint256 shifted, uint256 hashed) = LibParseMeta.wordBitmapped(seed, word); + uint256 wordFingerprint = hashed & FINGERPRINT_MASK; + + // Find the word's bit position. + uint256 bitPos; + for (uint256 i = 0; i < 256; i++) { + if (shifted == (1 << i)) { + bitPos = i; + break; + } + } + + // Pick a different bit ABOVE the word's bit so ctpop gives pos = 0. + // Wrap around if needed — the key requirement is the bit differs. + uint256 fakeBitPos = (bitPos + 128) % 256; + uint256 fakeExpansion = 1 << fakeBitPos; + + // Determine what pos lookupWord will compute: + // pos = ctpop(expansion & (shifted - 1)) + uint256 expectedPos = (fakeBitPos < bitPos) ? uint256(1) : uint256(0); + + uint256 numItems = expectedPos + 1; + meta = new bytes(META_PREFIX_SIZE + META_EXPANSION_SIZE + numItems * META_ITEM_SIZE); + + // Write depth, seed, expansion. + meta[0] = bytes1(uint8(1)); + meta[1] = bytes1(seed); + for (uint256 i = 0; i < 32; i++) { + meta[2 + i] = bytes1(uint8((fakeExpansion >> (8 * (31 - i))) & 0xFF)); + } + + // Write item at expectedPos with the word's fingerprint and a fake + // opcode index of 42. + uint256 itemOffset = META_PREFIX_SIZE + META_EXPANSION_SIZE + expectedPos * META_ITEM_SIZE; + meta[itemOffset] = bytes1(uint8(42)); + meta[itemOffset + 1] = bytes1(uint8((wordFingerprint >> 16) & 0xFF)); + meta[itemOffset + 2] = bytes1(uint8((wordFingerprint >> 8) & 0xFF)); + meta[itemOffset + 3] = bytes1(uint8(wordFingerprint & 0xFF)); + } + + /// Build meta from known words, look them all up, verify indices. + function testLookupWordKnown() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](3); + metas[0] = AuthoringMetaV2({word: bytes32("add"), description: ""}); + metas[1] = AuthoringMetaV2({word: bytes32("sub"), description: ""}); + metas[2] = AuthoringMetaV2({word: bytes32("mul"), description: ""}); + + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 8); + + for (uint256 i = 0; i < metas.length; i++) { + (bool exists, uint256 index) = LibParseMeta.lookupWord(meta, metas[i].word); + assertTrue(exists, "word should exist"); + assertEq(index, i, "word index mismatch"); + } + } + + /// Looking up a word not in meta should return false with index 0. + function testLookupWordNotFound() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](1); + metas[0] = AuthoringMetaV2({word: bytes32("add"), description: ""}); + + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 8); + + (bool exists, uint256 index) = LibParseMeta.lookupWord(meta, bytes32("notaword")); + assertFalse(exists); + assertEq(index, 0); + } + + /// Single-depth meta with a single word. + function testLookupWordSingleDepth() external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](1); + metas[0] = AuthoringMetaV2({word: bytes32("only"), description: ""}); + + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 1); + + (bool exists, uint256 index) = LibParseMeta.lookupWord(meta, bytes32("only")); + assertTrue(exists); + assertEq(index, 0); + + // Not-found on single-depth meta. + (bool notExists,) = LibParseMeta.lookupWord(meta, bytes32("other")); + assertFalse(notExists); + } + + /// Multiple not-found lookups should all return false. + function testLookupWordMultipleNotFound(bytes32 a, bytes32 b, bytes32 c) external pure { + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](1); + metas[0] = AuthoringMetaV2({word: bytes32("known"), description: ""}); + + // Ensure fuzzed words differ from the known word. + vm.assume(a != bytes32("known")); + vm.assume(b != bytes32("known")); + vm.assume(c != bytes32("known")); + + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 3); + + (bool existsA,) = LibParseMeta.lookupWord(meta, a); + assertFalse(existsA); + (bool existsB,) = LibParseMeta.lookupWord(meta, b); + assertFalse(existsB); + (bool existsC,) = LibParseMeta.lookupWord(meta, c); + assertFalse(existsC); + } + + /// Fuzz: every word in the authoring meta should be found at its correct + /// index, and a random word not in the meta should not be found. + function testLookupWordRoundtripFuzz(AuthoringMetaV2[] memory authoringMeta, bytes32 notFound) external pure { + vm.assume(authoringMeta.length > 0); + vm.assume(authoringMeta.length <= 64); + vm.assume(!LibBloom.bloomFindsDupes(LibAuthoringMeta.copyWordsFromAuthoringMeta(authoringMeta))); + for (uint256 i = 0; i < authoringMeta.length; i++) { + vm.assume(authoringMeta[i].word != notFound); + } + + uint8 depth = uint8(authoringMeta.length / type(uint8).max + 3); + bytes memory meta = LibGenParseMeta.buildParseMetaV2(authoringMeta, depth); + + // Every word should be found at its index. + for (uint256 i = 0; i < authoringMeta.length; i++) { + (bool exists, uint256 index) = LibParseMeta.lookupWord(meta, authoringMeta[i].word); + assertTrue(exists, "word should exist"); + assertEq(index, i, "index mismatch"); + } + + // A word not in meta should not be found. + (bool notExists,) = LibParseMeta.lookupWord(meta, notFound); + assertFalse(notExists, "unknown word should not exist"); + } + + /// Larger word set forcing multi-depth bloom — verify all words still + /// resolve correctly. + function testLookupWordLargeSet() external pure { + uint256 count = 50; + AuthoringMetaV2[] memory metas = new AuthoringMetaV2[](count); + for (uint256 i = 0; i < count; i++) { + metas[i] = AuthoringMetaV2({word: bytes32(i + 1), description: ""}); + } + + bytes memory meta = LibGenParseMeta.buildParseMetaV2(metas, 5); + + for (uint256 i = 0; i < count; i++) { + (bool exists, uint256 index) = LibParseMeta.lookupWord(meta, bytes32(i + 1)); + assertTrue(exists, "word should exist"); + assertEq(index, i, "index mismatch"); + } + + // Zero was not added. + (bool notExists,) = LibParseMeta.lookupWord(meta, bytes32(uint256(0))); + assertFalse(notExists); + } +} diff --git a/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.wordBitmapped.t.sol b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.wordBitmapped.t.sol new file mode 100644 index 00000000..cabf75c6 --- /dev/null +++ b/dependencies/rain-interpreter-interface-0.1.0/test/src/lib/parse/LibParseMeta.wordBitmapped.t.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; + +import {LibParseMeta, FINGERPRINT_MASK} from "src/lib/parse/LibParseMeta.sol"; + +contract LitParseMetaTest is Test { + function referenceWordBitmapped(uint256 seed, bytes32 word) public pure returns (uint256 bitmap, uint256 hashed) { + // taking the low byte of the seed is intentional. + //forge-lint: disable-next-line(unsafe-typecast) + hashed = uint256(keccak256(abi.encodePacked(word, uint8(seed)))); + // Taking the type byte of hashed only. + //forge-lint: disable-next-line(unsafe-typecast, incorrect-shift) + bitmap = 1 << uint256(uint8(uint256(hashed) >> 0xF8)); + // Fingerprint 0 is reserved as the empty-slot sentinel, so force + // it to 1 when the low 3 bytes are zero. + if (hashed & FINGERPRINT_MASK == 0) { + hashed = 1; + } + } + + function testWordBitmapped(uint256 seed, bytes32 word) public pure { + (uint256 bitmap, uint256 hashed) = LibParseMeta.wordBitmapped(seed, word); + (uint256 refBitmap, uint256 refHashed) = referenceWordBitmapped(seed, word); + assertEq(bitmap, refBitmap, "bitmap"); + assertEq(hashed, refHashed, "hashed"); + } + + /// The fingerprint (low 3 bytes of hashed) must never be zero, because + /// zero is the empty-slot sentinel in buildParseMetaV2. + function testWordBitmappedFingerprintNonZero(uint256 seed, bytes32 word) public pure { + (, uint256 hashed) = LibParseMeta.wordBitmapped(seed, word); + assertTrue(hashed & FINGERPRINT_MASK != 0, "fingerprint must not be zero"); + } +} diff --git a/dependencies/rain-math-fixedpoint-0.2.0/LICENSE b/dependencies/rain-math-fixedpoint-0.2.0/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-math-fixedpoint-0.2.0/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-math-fixedpoint-0.2.0/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-math-fixedpoint-0.2.0/README.md b/dependencies/rain-math-fixedpoint-0.2.0/README.md new file mode 100644 index 00000000..e43d99f6 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/README.md @@ -0,0 +1,118 @@ +# rain.math.fixedpoint + +Docs at https://rainprotocol.github.io/rain.math.fixedpoint + +## Goals + +Ideally we'd not need this library as math primitives are probably best handled +in some upstream library. + +What we need: + +- 18 decimal fixed point math +- handle rounding directions explicitly +- rescale non-18 decimal fixed point values (e.g. ERC20 token amounts) to/from + 18 decimals so that we can do math on them +- avoid code bloat in an interpreter due to importing several libs with heavily + overlapping scope +- open source license, but not forcing ppl to jump on the GPL crusade +- minimal surface area so we can gracefully deprecate this lib if all the above + is provided elsewhere someday +- works on simple `uint256` values + +Upstream candidates: + +- Open Zeppelin + - Has implementations that include rounding direction 👍 + - Audited code due to recent ERC4626 implementation 👍 + - Only includes math needed by the specs implemented, not general purpose 👎 +- PRB math + - General purpose fixed point math 👍 + - Where the scope overlaps OZ the logic is similar or identical 👍 + - No ability to specify rounding or to rescale outside 18 decimals 👎 + - Never audited 👎 +- Others + - Either wrong license or issues as pointed out on PRB math repo + +Since we need math that isn't provided by Open Zeppelin, and we aren't going to +write it ourselves, PRB math seems to be the most reasonable foundation. At the +same time, Open Zeppelin may already be a dependency for other reasons, such as +some token implementation, so including both OZ and PRB in a single contract can +bloat code. + +## Non-goals + +None of this is supported/needed: + +- Signed math +- Non-18 decimal fixed point math (other than rescaling) +- One size fits all solution + +## Approach + +- Provide a base repo (this one) that has zero dependencies, to focus on the + logic required to rescale between decimals, that are lib agnostic. +- Provide supporting repos to normalise Open Zeppelin and PRB math + - OZ includes `muldiv` but doesn't have an opinion on decimals, so caller is + forced to provide "one" at every step and mentally balance multiplication + and division + - PRB is opinionated with sane defaults for 18 decimal math but provides no + rounding or rescaling support + +Downstream consumers are advised to select _one_ of either OZ or PRB to compile +into their contracts, using the relevant supporting libs only, to minimise +dependencies and potential code bloat, or even inconsistent behaviours between +libs. + +## Install + +Via [soldeer](https://soldeer.xyz): + +```sh +forge soldeer install rain-math-fixedpoint~ +``` + +## Develop + +This repo uses [nix](https://nixos.org/download.html). The default shell is the +slim `sol-shell` from [rainix](https://github.com/rainlanguage/rainix). + +```sh +nix develop # enter the shell +forge soldeer install # install deps declared in foundry.toml +forge test +``` + +Tasks: + +- `rainix-sol-test` — `forge test` +- `rainix-sol-static` — slither +- `rainix-sol-legal` — `reuse lint` + +Use the nix-pinned `forge` for all development. + +## Publish + +Tag `v` on `main`. The +[`Publish to Soldeer`](.github/workflows/publish-soldeer.yaml) wrapper delegates +to rainix's reusable workflow, which derives the package name from the repo name +(`rain.math.fixedpoint` → `rain-math-fixedpoint`). + +## License + +DecentraLicense 1.0 (DCL-1.0) — full text in +[`LICENSES/`](LICENSES/LicenseRef-DCL-1.0.txt). Roughly `CAL-1.0` +([opensource.org](https://opensource.org/license/cal-1-0)) plus user-data +disclosure obligations consistent with permissionless-blockchain assumptions. + +This repo is [REUSE 3.2](https://reuse.software/spec-3.2/) compliant. Verify +locally: + +```sh +nix develop -c rainix-sol-legal +``` + +## Contributions + +Welcome under the same license. Contributors warrant that their contributions +are compliant. diff --git a/dependencies/rain-math-fixedpoint-0.2.0/REUSE.toml b/dependencies/rain-math-fixedpoint-0.2.0/REUSE.toml new file mode 100644 index 00000000..93674669 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/REUSE.toml @@ -0,0 +1,23 @@ +version = 1 + +[[annotations]] +path = [ + ".gas-snapshot", + ".github/workflows/**/", + ".vscode/**/", + ".gitignore", + ".gitmodules", + ".soldeerignore", + "audit/**/", + "README.md", + "flake.lock", + "flake.nix", + "foundry.toml", + "remappings.txt", + "slither.config.json", + "REUSE.toml", + "foundry.lock", + "soldeer.lock", +] +SPDX-FileCopyrightText = "Copyright (c) 2020 Rain Open Source Software Ltd" +SPDX-License-Identifier = "LicenseRef-DCL-1.0" diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrParse.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrParse.sol new file mode 100644 index 00000000..cc05c905 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrParse.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @dev Thrown when parsing a string that has more precision than can be +/// represented in a fixed point decimal. +/// @param position The position in the string where the precision loss occurs. +error ParseDecimalPrecisionLoss(uint256 position); + +/// Thrown when a string is parsed that is not a valid fixed point decimal. +/// @param position The position in the string where the error occurred. +error ParseDecimalInvalidString(uint256 position); diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrScale.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrScale.sol new file mode 100644 index 00000000..efa692bb --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/error/ErrScale.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @dev Thrown when downscaling would result in precision loss in a lossless +/// conversion. +/// @param a The value that would lose precision. +error ErrScaleDownPrecisionLoss(uint256 a); + +/// Thrown when an integer is too large to fit in the range allowed for it. +/// @param integer The integer that is too large. +/// @param max The maximum value that the integer can be. +error IntegerOverflow(uint256 integer, uint256 max); diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/lib/FixedPointDecimalConstants.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/FixedPointDecimalConstants.sol new file mode 100644 index 00000000..d9bce132 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/FixedPointDecimalConstants.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @dev The scale of all fixed point math. This is adopting the conventions of +/// both ETH (wei) and most ERC20 tokens, so is hopefully uncontroversial. +uint256 constant FIXED_POINT_DECIMALS = 18; + +/// @dev Value of "one" for fixed point math. +uint256 constant FIXED_POINT_ONE = 1e18; + +/// @dev Calculations MUST round up. +uint256 constant FLAG_ROUND_UP = 1; + +/// @dev Calculations MUST saturate NOT overflow. +uint256 constant FLAG_SATURATE = 1 << 1; + +/// @dev Flags MUST NOT exceed this value. +uint256 constant FLAG_MAX_INT = FLAG_SATURATE | FLAG_ROUND_UP; + +/// @dev Can't represent this many OOMs of decimals in `uint256`. +uint256 constant OVERFLOW_RESCALE_OOMS = 78; + +/// @dev The maximum value that an integer can be without being misinterpreted +/// as a fixed point decimal, for the purposes of `decimalOrIntToInt`. +uint256 constant DECIMAL_MAX_SAFE_INT = 1e18 - 1; + +/// @dev The mathematical constant e, scaled to `FIXED_POINT_DECIMALS` decimals. +/// https://en.wikipedia.org/wiki/E_(mathematical_constant) +uint256 constant FIXED_POINT_E = 2.718281828459045235e18; diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalArithmeticOpenZeppelin.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalArithmeticOpenZeppelin.sol new file mode 100644 index 00000000..2ddb1ddc --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalArithmeticOpenZeppelin.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Math} from "@openzeppelin-contracts-5.6.1/utils/math/Math.sol"; + +import {FIXED_POINT_ONE} from "./FixedPointDecimalConstants.sol"; + +library LibFixedPointDecimalArithmeticOpenZeppelin { + using Math for uint256; + + /// Fixed point multiplication in 18 decimal fixed point. + /// Both `a` and `b` MUST be 18 decimal fixed point values. + /// Implemented in terms of Open Zeppelin `Math` library. + /// @param a First term. + /// @param b Second term. + /// @param rounding Rounding direction as per Open Zeppelin `Math`. + /// @return `a` multiplied by `b` in 18 fixed point decimals. + function fixedPointMul(uint256 a, uint256 b, Math.Rounding rounding) internal pure returns (uint256) { + return a.mulDiv(b, FIXED_POINT_ONE, rounding); + } + + /// Fixed point division in 18 decimal fixed point. + /// Both `a` and `b` MUST be 18 decimal fixed point values. + /// Implemented in terms of Open Zeppelin `Math` library. + /// @param a First term. + /// @param b Second term. + /// @param rounding Rounding direction as per Open Zeppelin `Math`. + /// @return `a` divided by `b` in 18 fixed point decimals. + function fixedPointDiv(uint256 a, uint256 b, Math.Rounding rounding) internal pure returns (uint256) { + return a.mulDiv(FIXED_POINT_ONE, b, rounding); + } +} diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalScale.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalScale.sol new file mode 100644 index 00000000..afc25b04 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalScale.sol @@ -0,0 +1,263 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import { + FIXED_POINT_ONE, + FLAG_SATURATE, + FLAG_ROUND_UP, + FIXED_POINT_DECIMALS, + OVERFLOW_RESCALE_OOMS +} from "./FixedPointDecimalConstants.sol"; +import {ErrScaleDownPrecisionLoss, IntegerOverflow} from "../error/ErrScale.sol"; + +/// @title FixedPointDecimalScale +/// @notice Tools to scale unsigned values to/from 18 decimal fixed point +/// representation. +/// +/// Overflows error and underflows are rounded up or down explicitly. +/// +/// The max uint256 as decimal is roughly 1e77 so scaling values comparable to +/// 1e18 is unlikely to ever overflow in most contexts. For a typical use case +/// involving tokens, the entire supply of a token rescaled up a full 18 decimals +/// would still put it "only" in the region of ~1e40 which has a full 30 orders +/// of magnitude buffer before running into saturation issues. However, there's +/// no theoretical reason that a token or any other use case couldn't use large +/// numbers or extremely precise decimals that would push this library to +/// overflow point, so it MUST be treated with caution around the edge cases. +/// +/// Scaling down ANY fixed point decimal also reduces the precision which can +/// lead to dust or in the worst case trapped funds if subsequent subtraction +/// overflows a rounded-down number. Consider using saturating subtraction for +/// safety against previously downscaled values, and whether trapped dust is a +/// significant issue. If you need to retain full/arbitrary precision in the case +/// of downscaling DO NOT use this library. +/// +/// All rescaling and/or division operations in this library require a rounding +/// flag. This allows and forces the caller to specify where dust sits due to +/// rounding. For example the caller could round up when taking tokens from +/// `msg.sender` and round down when returning them, ensuring that any dust in +/// the round trip accumulates in the contract rather than opening an exploit or +/// reverting and trapping all funds. This is exactly how the ERC4626 vault spec +/// handles dust and is a good reference point in general. Typically the contract +/// holding tokens and non-interactive participants should be favoured by +/// rounding calculations rather than active participants. This is because we +/// assume that an active participant, e.g. `msg.sender`, knowns something we +/// don't and is carefully crafting an attack, so we are most conservative and +/// suspicious of their inputs and actions. +library LibFixedPointDecimalScale { + /// Scales `a` up by a specified number of decimals. + /// @param a The number to scale up. + /// @param scaleUpBy Number of orders of magnitude to scale `b_` up by. + /// Errors if overflows. + /// @return b `a` scaled up by `scaleUpBy`. + function scaleUp(uint256 a, uint256 scaleUpBy) internal pure returns (uint256 b) { + // Checked power is expensive so don't do that. + unchecked { + b = 10 ** scaleUpBy; + } + b = a * b; + + // We know exactly when 10 ** X overflows so replay the checked version + // to get the standard Solidity overflow behaviour. The branching logic + // here is still ~230 gas cheaper than unconditionally running the + // overflow checks. We're optimising for standardisation rather than gas + // in the unhappy revert case. + if (scaleUpBy >= OVERFLOW_RESCALE_OOMS) { + b = a == 0 ? 0 : 10 ** scaleUpBy; + } + } + + /// Identical to `scaleUp` but saturates instead of reverting on overflow. + /// @param a As per `scaleUp`. + /// @param scaleUpBy As per `scaleUp`. + /// @return c As per `scaleUp` but saturates as `type(uint256).max` on + /// overflow. + function scaleUpSaturating(uint256 a, uint256 scaleUpBy) internal pure returns (uint256 c) { + unchecked { + if (scaleUpBy >= OVERFLOW_RESCALE_OOMS) { + c = a == 0 ? 0 : type(uint256).max; + } else { + // Adapted from saturatingMath. + // Inlining everything here saves ~250-300+ gas relative to slow. + uint256 b_ = 10 ** scaleUpBy; + c = a * b_; + // Checking b_ here allows us to skip an "is zero" check because even + // 10 ** 0 = 1, so we have a positive lower bound on b_. + c = c / b_ == a ? c : type(uint256).max; + } + } + } + + /// Scales `a` down by a specified number of decimals, rounding down. + /// Used internally by several other functions in this lib. + /// @param a The number to scale down. + /// @param scaleDownBy Number of orders of magnitude to scale `a` down by. + /// Overflows if greater than 77. + /// @return c `a` scaled down by `scaleDownBy` and rounded down. + function scaleDown(uint256 a, uint256 scaleDownBy) internal pure returns (uint256) { + unchecked { + return scaleDownBy >= OVERFLOW_RESCALE_OOMS ? 0 : a / (10 ** scaleDownBy); + } + } + + /// Scales `a` down by a specified number of decimals, rounding up. + /// Used internally by several other functions in this lib. + /// @param a The number to scale down. + /// @param scaleDownBy Number of orders of magnitude to scale `a` down by. + /// Overflows if greater than 77. + /// @return c `a` scaled down by `scaleDownBy` and rounded up. + function scaleDownRoundUp(uint256 a, uint256 scaleDownBy) internal pure returns (uint256 c) { + unchecked { + if (scaleDownBy >= OVERFLOW_RESCALE_OOMS) { + c = a == 0 ? 0 : 1; + } else { + uint256 b = 10 ** scaleDownBy; + c = a / b; + + // Intentionally doing a divide before multiply here to detect + // the need to round up. + //slither-disable-next-line divide-before-multiply + if (a != c * b) { + c += 1; + } + } + } + } + + /// Scale a fixed point decimal of some scale factor to 18 decimals. + /// @param a Some fixed point decimal value. + /// @param decimals The number of fixed decimals of `a`. + /// @param flags Controls rounding and saturation. + /// @return `a` scaled to 18 decimals. + function scale18(uint256 a, uint256 decimals, uint256 flags) internal pure returns (uint256) { + unchecked { + if (FIXED_POINT_DECIMALS > decimals) { + uint256 scaleUpBy = FIXED_POINT_DECIMALS - decimals; + if (flags & FLAG_SATURATE > 0) { + return scaleUpSaturating(a, scaleUpBy); + } else { + return scaleUp(a, scaleUpBy); + } + } else if (decimals > FIXED_POINT_DECIMALS) { + uint256 scaleDownBy = decimals - FIXED_POINT_DECIMALS; + if (flags & FLAG_ROUND_UP > 0) { + return scaleDownRoundUp(a, scaleDownBy); + } else { + return scaleDown(a, scaleDownBy); + } + } else { + return a; + } + } + } + + /// Scale an 18 decimal fixed point value to some other scale. + /// Exactly the inverse behaviour of `scale18`. Where `scale18` would scale + /// up, `scaleN` scales down, and vice versa. + /// @param a An 18 decimal fixed point number. + /// @param targetDecimals The new scale of `a`. + /// @param flags Controls rounding and saturation. + /// @return `a` rescaled from 18 to `targetDecimals`. + function scaleN(uint256 a, uint256 targetDecimals, uint256 flags) internal pure returns (uint256) { + unchecked { + if (FIXED_POINT_DECIMALS > targetDecimals) { + uint256 scaleDownBy = FIXED_POINT_DECIMALS - targetDecimals; + if (flags & FLAG_ROUND_UP > 0) { + return scaleDownRoundUp(a, scaleDownBy); + } else { + return scaleDown(a, scaleDownBy); + } + } else if (targetDecimals > FIXED_POINT_DECIMALS) { + uint256 scaleUpBy = targetDecimals - FIXED_POINT_DECIMALS; + if (flags & FLAG_SATURATE > 0) { + return scaleUpSaturating(a, scaleUpBy); + } else { + return scaleUp(a, scaleUpBy); + } + } else { + return a; + } + } + } + + /// Scale a fixed point up or down by `ooms` orders of magnitude. + /// Notably `scaleBy` is a SIGNED integer so scaling down by negative OOMS + /// IS supported. + /// @param a Some integer of any scale. + /// @param ooms OOMs to scale `a` up or down by. This is a SIGNED int8 + /// which means it can be negative, and also means that sign extension MUST + /// be considered if changing it to another type. + /// @param flags Controls rounding and saturating. + /// @return `a` rescaled according to `ooms`. + function scaleBy(uint256 a, int8 ooms, uint256 flags) internal pure returns (uint256) { + unchecked { + if (ooms > 0) { + if (flags & FLAG_SATURATE > 0) { + // Positive ooms fits in unsigned space. + //forge-lint: disable-next-line(unsafe-typecast) + return scaleUpSaturating(a, uint8(ooms)); + } else { + // Positive ooms fits in unsigned space. + //forge-lint: disable-next-line(unsafe-typecast) + return scaleUp(a, uint8(ooms)); + } + } else if (ooms < 0) { + // We know that ooms is negative here, so we can convert it + // to an absolute value with bitwise NOT + 1. + // This is slightly less gas than multiplying by negative 1 and + // casting it, and handles the case of -128 without overflow. + //forge-lint: disable-next-line(unsafe-typecast) + uint8 scaleDownBy = uint8(~ooms) + 1; + if (flags & FLAG_ROUND_UP > 0) { + return scaleDownRoundUp(a, scaleDownBy); + } else { + return scaleDown(a, scaleDownBy); + } + } else { + return a; + } + } + } + + /// Scale an 18 decimal fixed point number to scale 0 (i.e. an integer) + /// losslessly. + /// Reverts if the conversion would be lossy. + /// @param a An 18 decimal fixed point number. + /// @return `a` scaled to 0 decimals. + function scaleToIntegerLossless(uint256 a) internal pure returns (uint256) { + unchecked { + if (a % FIXED_POINT_ONE != 0) { + revert ErrScaleDownPrecisionLoss(a); + } + return a / FIXED_POINT_ONE; + } + } + + /// Detect whether some value is a fixed point decimal or an integer and + /// convert it to an integer if it is a decimal. + /// + /// The detection process assumes that anything greater than or equal to + /// `FIXED_POINT_ONE` is a fixed point decimal and NOT some large integer. + /// + /// The caller is responsible for ensuring that the range of valid integers + /// never overlaps with the range of valid fixed point decimals that could + /// be interpreted as integers. I.e. `max` should be less than `1e18`. + /// + /// Uses lossless conversion to integer for fixed point decimals, so will + /// error if decimals are not a multiple of `FIXED_POINT_ONE`. + /// + /// @param a The value to convert to an integer. + /// @param max The maximum value that `a` can be. MUST be less than `1e18`. + function decimalOrIntToInt(uint256 a, uint256 max) internal pure returns (uint256) { + if (a >= FIXED_POINT_ONE) { + a = scaleToIntegerLossless(a); + } + + if (a > max) { + revert IntegerOverflow(a, max); + } + + return a; + } +} diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalStrings.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalStrings.sol new file mode 100644 index 00000000..a9511fee --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibFixedPointDecimalStrings.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {FIXED_POINT_ONE} from "./FixedPointDecimalConstants.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {Strings} from "@openzeppelin-contracts-5.6.1/utils/Strings.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {LibParseChar} from "rain-string-0.1.0/src/lib/parse/LibParseChar.sol"; +// Exported for convenience. +//forge-lint: disable-next-line(unused-import) +import {CMASK_NUMERIC_0_9, CMASK_DECIMAL_POINT} from "rain-string-0.1.0/src/lib/parse/LibParseCMask.sol"; + +library LibFixedPointDecimalStrings {} diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibWillOverflow.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibWillOverflow.sol new file mode 100644 index 00000000..eab28b58 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/LibWillOverflow.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import { + FLAG_SATURATE, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + FLAG_MAX_INT, + + // Exported for convenience. + //forge-lint: disable-next-line(unused-import) + FLAG_ROUND_UP, + OVERFLOW_RESCALE_OOMS, + FIXED_POINT_DECIMALS +} from "./FixedPointDecimalConstants.sol"; + +/// @title LibWillOverflow +/// @notice Often we want to know if some calculation is expected to overflow. +/// Notably this is important for fuzzing as we have to be able to set +/// expectations for arbitrary inputs over as broad a range of values as +/// possible. +library LibWillOverflow { + /// Relevant logic taken direct from Open Zeppelin. + /// @param x As per Open Zeppelin. + /// @param y As per Open Zeppelin. + /// @param denominator As per Open Zeppelin. + /// @return True if mulDiv will overflow. + function mulDivWillOverflow(uint256 x, uint256 y, uint256 denominator) internal pure returns (bool) { + // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use + // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 + // variables such that product = prod1 * 2^256 + prod0. + uint256 prod0; // Least significant 256 bits of the product + uint256 prod1; // Most significant 256 bits of the product + assembly ("memory-safe") { + let mm := mulmod(x, y, not(0)) + prod0 := mul(x, y) + prod1 := sub(sub(mm, prod0), lt(mm, prod0)) + } + return !(denominator > prod1); + } + + /// True if `scaleUp` will overflow. + /// @param a The number to scale up. + /// @param scaleBy The number of orders of magnitude to scale up by. + /// @return True if `scaleUp` will overflow. + function scaleUpWillOverflow(uint256 a, uint256 scaleBy) internal pure returns (bool) { + unchecked { + if (a == 0) { + return false; + } + if (scaleBy >= OVERFLOW_RESCALE_OOMS) { + return true; + } + uint256 b = 10 ** scaleBy; + uint256 c = a * b; + return c / b != a; + } + } + + /// True if `scaleDown` will round. + /// @param a The number to scale down. + /// @param scaleDownBy The number of orders of magnitude to scale down by. + /// @return True if `scaleDown` will round. + function scaleDownWillRound(uint256 a, uint256 scaleDownBy) internal pure returns (bool) { + if (scaleDownBy >= OVERFLOW_RESCALE_OOMS) { + return a != 0; + } + uint256 b = 10 ** scaleDownBy; + uint256 c = a / b; + // Discovering precision loss is the whole point of this check so the + // thing slither is complaining about is exactly what we're measuring. + //slither-disable-next-line divide-before-multiply + return c * b != a; + } + + /// True if `scale18` will overflow. + /// @param a The number to scale. + /// @param decimals The current number of decimals of `a`. + /// @param flags The flags to use. + /// @return True if `scale18` will overflow. + function scale18WillOverflow(uint256 a, uint256 decimals, uint256 flags) internal pure returns (bool) { + if (decimals < FIXED_POINT_DECIMALS && (FLAG_SATURATE & flags == 0)) { + return scaleUpWillOverflow(a, FIXED_POINT_DECIMALS - decimals); + } else { + return false; + } + } + + /// True if `scaleN` will overflow. + /// @param a The number to scale. + /// @param decimals The current number of decimals of `a`. + /// @param flags The flags to use. + /// @return True if `scaleN` will overflow. + function scaleNWillOverflow(uint256 a, uint256 decimals, uint256 flags) internal pure returns (bool) { + if (decimals > FIXED_POINT_DECIMALS && (FLAG_SATURATE & flags == 0)) { + return scaleUpWillOverflow(a, decimals - FIXED_POINT_DECIMALS); + } else { + return false; + } + } + + /// True if `scaleBy` will overflow. + /// @param a The number to scale. + /// @param scaleBy The number of orders of magnitude to scale by. + /// @param flags The flags to use. + /// @return True if `scaleBy` will overflow. + function scaleByWillOverflow(uint256 a, int8 scaleBy, uint256 flags) internal pure returns (bool) { + // If we're scaling up and not saturating check the overflow. + if (scaleBy > 0 && (FLAG_SATURATE & flags == 0)) { + // positive scale by fits in unsigned space. + //forge-lint: disable-next-line(unsafe-typecast) + return scaleUpWillOverflow(a, uint8(scaleBy)); + } else { + return false; + } + } +} diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/lib/format/LibFixedPointDecimalFormat.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/format/LibFixedPointDecimalFormat.sol new file mode 100644 index 00000000..5bf761fa --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/format/LibFixedPointDecimalFormat.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {FIXED_POINT_ONE} from "../FixedPointDecimalConstants.sol"; +import {Strings} from "@openzeppelin-contracts-5.6.1/utils/Strings.sol"; + +library LibFixedPointDecimalFormat { + /// @notice Convert a fixed point decimal to a string representation. + /// Trailing zeros are removed and decimals are only included if the value is + /// non-integer as fixed point decimals. + /// e.g. `1e18` -> "1", `1.1e18` -> "1.1", `0.1e18` -> "0.1" + /// @param value The fixed point decimal to convert. + function fixedPointToDecimalString(uint256 value) internal pure returns (string memory) { + unchecked { + uint256 integral = value / FIXED_POINT_ONE; + uint256 frac = value % FIXED_POINT_ONE; + + string memory integralString = Strings.toString(integral); + + if (frac == 0) { + return integralString; + } + + // Can't overflow because frac is less than FIXED_POINT_ONE. + uint256 fracPlusOne = frac + FIXED_POINT_ONE; + + // Stringifying fracPlusOne preserves the leading zeros in our frac + // as a string decimal, but also introduces trailing zeros. We need + // to slice out the leading "1" digit and trailing zeros manually. + string memory fracString = Strings.toString(fracPlusOne); + + uint256 trailingZeros = 0; + uint256 divisor = 10; + // Divide first to try to discover imprecision due to a suspected + // trailing zero being non-zero. Also means we cannot overflow. + //slither-disable-start divide-before-multiply + //forge-lint: disable-next-line(divide-before-multiply) + while (fracPlusOne == (fracPlusOne / divisor) * divisor) { + trailingZeros += 1; + divisor *= 10; + } + //slither-disable-end + + assembly ("memory-safe") { + // This can't underflow because we're always guaranteed at least + // one non-zero digit in fracString due to the +FIXED_POINT_ONE. + // If it underflows that implies we miscalculated trailingZeros. + let newLength := sub(mload(fracString), add(1, trailingZeros)) + // We can write newlength directly over the old length and + // leading "1" digit in fracString. This saves us having to + // allocate and copy memory. + fracString := add(fracString, 1) + mstore(fracString, newLength) + } + + return string(abi.encodePacked(integralString, ".", fracString)); + } + } +} diff --git a/dependencies/rain-math-fixedpoint-0.2.0/src/lib/parse/LibFixedPointDecimalParse.sol b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/parse/LibFixedPointDecimalParse.sol new file mode 100644 index 00000000..93143918 --- /dev/null +++ b/dependencies/rain-math-fixedpoint-0.2.0/src/lib/parse/LibFixedPointDecimalParse.sol @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {FIXED_POINT_ONE} from "../FixedPointDecimalConstants.sol"; +import {ParseDecimalPrecisionLoss, ParseDecimalInvalidString} from "../../error/ErrParse.sol"; +import {LibParseDecimal} from "rain-string-0.1.0/src/lib/parse/LibParseDecimal.sol"; +import {CMASK_NUMERIC_0_9, CMASK_DECIMAL_POINT, CMASK_ZERO} from "rain-string-0.1.0/src/lib/parse/LibParseCMask.sol"; +import {LibParseChar} from "rain-string-0.1.0/src/lib/parse/LibParseChar.sol"; +import {ParseDecimalOverflow} from "rain-string-0.1.0/src/error/ErrParse.sol"; + +library LibFixedPointDecimalParse { + /// Converts a decimal string to a fixed point decimal. Returns error + /// selector if the string is not a valid fixed point decimal string. Fails + /// on overflow and precision loss, as well as invalid characters in any + /// position. DOES NOT support scientific notation. + /// Caller MUST check the error selector is 0 before using the value. + /// @param str The string to convert. + /// @return errorSelector 0 if successful, otherwise the error selector. + /// @return value The fixed point decimal value. + function decimalStringTofixedPoint(string memory str) internal pure returns (bytes4, uint256) { + unchecked { + uint256 start; + uint256 end; + assembly ("memory-safe") { + start := add(str, 0x20) + end := add(start, mload(str)) + } + uint256 cursor = start; + + cursor = LibParseChar.skipMask(start, end, CMASK_NUMERIC_0_9); + (bytes4 integerErrorSelector, uint256 integer) = LibParseDecimal.unsafeDecimalStringToInt(start, cursor); + if (integerErrorSelector != 0) { + return (integerErrorSelector, 0); + } + + uint256 value = integer * FIXED_POINT_ONE; + if (value / FIXED_POINT_ONE != integer) { + return (ParseDecimalOverflow.selector, 0); + } + + if (cursor < end) { + // Skip the decimal point or bail if there isn't one. + if (LibParseChar.isMask(cursor, end, CMASK_DECIMAL_POINT) == 0) { + return (ParseDecimalInvalidString.selector, 0); + } + + cursor++; + uint256 fracStart = cursor; + cursor = LibParseChar.skipMask(cursor, end, CMASK_NUMERIC_0_9); + + // Ensure there's no unprocessed garbage. + if (cursor < end) { + return (ParseDecimalInvalidString.selector, 0); + } + + { + uint256 trailingZeroCursor = cursor - 1; + while ( + trailingZeroCursor >= fracStart + && LibParseChar.isMask(trailingZeroCursor, cursor, CMASK_ZERO) == 1 + ) { + trailingZeroCursor--; + } + cursor = trailingZeroCursor + 1; + } + + if (cursor > fracStart) { + (bytes4 errorSelector, uint256 frac) = LibParseDecimal.unsafeDecimalStringToInt(fracStart, cursor); + if (errorSelector != 0) { + return (errorSelector, 0); + } + + uint256 digits = cursor - fracStart; + + if (digits > 18) { + return (ParseDecimalPrecisionLoss.selector, 0); + } + + uint256 ooms = 18 - digits; + uint256 scaledFrac = frac * 10 ** ooms; + uint256 preValue = value; + value += scaledFrac; + if (value < preValue) { + return (ParseDecimalOverflow.selector, 0); + } + } + } + return (0, value); + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/LICENSE b/dependencies/rain-solmem-0.1.3/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-solmem-0.1.3/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-solmem-0.1.3/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-solmem-0.1.3/README.md b/dependencies/rain-solmem-0.1.3/README.md new file mode 100644 index 00000000..56a8cdeb --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/README.md @@ -0,0 +1,80 @@ +# rain.solmem + +Solidity memory libraries — pointer arithmetic, byte-level copying, and dynamic +arrays/matrices that don't go through Solidity's safety-checked allocator. + +## Libraries + +| Library | What it does | +| ------------------ | ------------------------------------------------------------------------- | +| `LibPointer` | Raw memory pointer arithmetic, with explicit `Pointer` user-defined type. | +| `LibMemCpy` | Word-aligned and byte-aligned `memcpy` between memory pointers. | +| `LibBytes` | In-place mutation, slicing, and pointer-level access for `bytes`. | +| `LibUint256Array` | Dynamic `uint256[]` operations: extend, copy, dedup-sort, truncate. | +| `LibBytes32Array` | Dynamic `bytes32[]` mirror of `LibUint256Array`. | +| `LibUint256Matrix` | `uint256[][]` operations. | +| `LibBytes32Matrix` | `bytes32[][]` operations. | +| `LibStackPointer` | Stack-style push/pop on a memory region accessed via `Pointer`. | +| `LibStackSentinel` | Sentinel-terminated stack walks for unknown-length data. | + +These libraries assume the caller knows what they're doing with memory. Out-of- +bounds access, double-frees, and aliasing are the caller's responsibility. + +## Install + +Via [soldeer](https://soldeer.xyz) (in your foundry project's root): + +```sh +forge soldeer install rain-solmem~ +``` + +Versioned remappings end up in `dependencies/rain-solmem-/`. Add the +remapping to `remappings.txt` or `foundry.toml`. + +## Develop + +This repo uses [nix](https://nixos.org/download.html) for its dev shell. The +default shell is the slim Solidity-only `sol-shell` from +[rainix](https://github.com/rainlanguage/rainix) — no rust, node, or chromium. + +```sh +nix develop # enter the shell +forge soldeer install # install dependencies declared in foundry.toml +forge test +``` + +Tasks exposed via the shell (delegate to rainix): + +- `rainix-sol-test` — `forge test` +- `rainix-sol-static` — slither +- `rainix-sol-legal` — `reuse lint` +- `rainix-sol-artifacts` — `forge build` + +Use the nix-pinned `forge` for all development to keep versions consistent. + +## Publish + +Tag `v` on `main`. The +[`Publish to Soldeer`](.github/workflows/publish-soldeer.yaml) workflow runs +`forge soldeer push rain-solmem~` on every `v*` tag. The package name is +derived from the repo name with `.` substituted for `-`. + +## License + +DecentraLicense 1.0 (DCL-1.0) — full text in +[`LICENSES/`](LICENSES/LicenseRef-DCL-1.0.txt). Roughly `CAL-1.0` +([opensource.org](https://opensource.org/license/cal-1-0)) plus user-data +disclosure obligations consistent with permissionless-blockchain assumptions. +"Not your keys, not your coins" aware, in legalese. + +This repo is [REUSE 3.2](https://reuse.software/spec-3.2/) compliant. Verify +locally: + +```sh +nix develop -c rainix-sol-legal +``` + +## Contributions + +Welcome under the same license. Contributors warrant that their contributions +are compliant. diff --git a/dependencies/rain-solmem-0.1.3/REUSE.toml b/dependencies/rain-solmem-0.1.3/REUSE.toml new file mode 100644 index 00000000..ed1bae14 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/REUSE.toml @@ -0,0 +1,23 @@ +version = 1 + +[[annotations]] +path = [ + ".gas-snapshot", + ".github/workflows/**/", + ".vscode/**/", + "audit/**/", + ".gitignore", + ".gitmodules", + "README.md", + "flake.lock", + "flake.nix", + "foundry.toml", + "slither.config.json", + "REUSE.toml", + "foundry.lock", + ".soldeerignore", + "remappings.txt", + "soldeer.lock", +] +SPDX-FileCopyrightText = "Copyright (c) 2020 Rain Open Source Software Ltd" +SPDX-License-Identifier = "LicenseRef-DCL-1.0" diff --git a/dependencies/rain-solmem-0.1.3/src/error/ErrBytes.sol b/dependencies/rain-solmem-0.1.3/src/error/ErrBytes.sol new file mode 100644 index 00000000..a5ea9f3a --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/error/ErrBytes.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// Thrown when asked to truncate data to a longer length. +/// @param length Actual bytes length. +/// @param truncate Attempted truncation length. +error TruncateError(uint256 length, uint256 truncate); diff --git a/dependencies/rain-solmem-0.1.3/src/error/ErrStackPointer.sol b/dependencies/rain-solmem-0.1.3/src/error/ErrStackPointer.sol new file mode 100644 index 00000000..607aa037 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/error/ErrStackPointer.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Pointer} from "../lib/LibMemCpy.sol"; + +/// Throws if two stack pointers are unaligned with each other (32 bytes). +/// @param lower The lower stack pointer. +/// @param upper The upper stack pointer. +error UnalignedStackPointer(Pointer lower, Pointer upper); diff --git a/dependencies/rain-solmem-0.1.3/src/error/ErrUint256Array.sol b/dependencies/rain-solmem-0.1.3/src/error/ErrUint256Array.sol new file mode 100644 index 00000000..c494c125 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/error/ErrUint256Array.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// Thrown if a truncated length is longer than the array being truncated. It is +/// not possible to truncate something and increase its length as the memory +/// region after the array MAY be allocated for something else already. +error OutOfBoundsTruncate(uint256 arrayLength, uint256 truncatedLength); diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibBytes.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibBytes.sol new file mode 100644 index 00000000..dc2fbe48 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibBytes.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Pointer} from "./LibPointer.sol"; +import {TruncateError} from "../error/ErrBytes.sol"; + +/// @title LibBytes +/// @notice Tools for working directly with memory in a Solidity compatible way. +library LibBytes { + /// Truncates bytes of data by mutating its length directly. + /// Any excess bytes are leaked + function truncate(bytes memory data, uint256 length) internal pure { + if (data.length < length) { + revert TruncateError(data.length, length); + } + assembly ("memory-safe") { + mstore(data, length) + } + } + + /// Pointer to the data of a bytes array NOT the length prefix. + /// @param data Bytes to get the data pointer for. + /// @return pointer Pointer to the data of the bytes in memory. + function dataPointer(bytes memory data) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(data, 0x20) + } + } + + /// Pointer to the start of a bytes array (the length prefix). + /// @param data Bytes to get the pointer to. + /// @return pointer Pointer to the start of the bytes data structure. + function startPointer(bytes memory data) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := data + } + } + + /// Pointer to the end of some bytes. + /// + /// Note that this pointer MAY NOT BE ALIGNED, i.e. it MAY NOT point to the + /// start of a multiple of 32, UNLIKE the free memory pointer at 0x40. + /// + /// @param data Bytes to get the pointer to the end of. + /// @return pointer Pointer to the end of the bytes data structure. + function endDataPointer(bytes memory data) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(data, add(0x20, mload(data))) + } + } + + /// Pointer to the end of the memory allocated for bytes. + /// + /// The allocator is ALWAYS aligned to whole words, i.e. 32 byte multiples, + /// for data structures allocated by Solidity. This includes `bytes` which + /// means that any time the length of some `bytes` is NOT a multiple of 32 + /// the alloation will point past the end of the `bytes` data. + /// + /// There is no guarantee that the memory region between `endDataPointer` + /// and `endAllocatedPointer` is zeroed out. It is best to think of that + /// space as leaked garbage. + /// + /// Almost always, e.g. for the purpose of copying data between regions, you + /// will want `endDataPointer` rather than this function. + /// @param data Bytes to get the end of the allocated data region for. + /// @return pointer Pointer to the end of the allocated data region. + function endAllocatedPointer(bytes memory data) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(data, and(add(add(mload(data), 0x20), 0x1f), not(0x1f))) + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Array.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Array.sol new file mode 100644 index 00000000..fadbb918 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Array.sol @@ -0,0 +1,382 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Pointer} from "./LibPointer.sol"; +import {OutOfBoundsTruncate} from "../error/ErrUint256Array.sol"; + +/// @title Bytes32Array +/// @notice Things we want to do carefully and efficiently with bytes32 arrays +/// that Solidity doesn't give us native tools for. +library LibBytes32Array { + using LibBytes32Array for bytes32[]; + + /// Pointer to the start (length prefix) of a `bytes32[]`. + /// @param array The array to get the start pointer of. + /// @return pointer The pointer to the start of `array`. + function startPointer(bytes32[] memory array) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := array + } + } + + /// Pointer to the data of a `bytes32[]` NOT the length prefix. + /// @param array The array to get the data pointer of. + /// @return pointer The pointer to the data of `array`. + function dataPointer(bytes32[] memory array) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(array, 0x20) + } + } + + /// Pointer to the end of the allocated memory of an array. + /// @param array The array to get the end pointer of. + /// @return pointer The pointer to the end of `array`. + function endPointer(bytes32[] memory array) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(array, add(0x20, mul(0x20, mload(array)))) + } + } + + /// Cast a `Pointer` to `bytes32[]` without modification or safety checks. + /// The caller MUST ensure the pointer is to a valid region of memory for + /// some `bytes32[]`. + /// @param pointer The pointer to cast to `bytes32[]`. + /// @return array The cast `bytes32[]`. + function unsafeAsBytes32Array(Pointer pointer) internal pure returns (bytes32[] memory array) { + assembly ("memory-safe") { + array := pointer + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a A single integer to build an array around. + /// @return array The newly allocated array including `a` as a single item. + function arrayFrom(bytes32 a) internal pure returns (bytes32[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 1) + mstore(add(array, 0x20), a) + mstore(0x40, add(array, 0x40)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @return array The newly allocated array including `a` and `b` as the only + /// items. + function arrayFrom(bytes32 a, bytes32 b) internal pure returns (bytes32[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 2) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(0x40, add(array, 0x60)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @return array The newly allocated array including `a`, `b` and `c` as the + /// only items. + function arrayFrom(bytes32 a, bytes32 b, bytes32 c) internal pure returns (bytes32[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 3) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(0x40, add(array, 0x80)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c` and `d` as the + /// only items. + function arrayFrom(bytes32 a, bytes32 b, bytes32 c, bytes32 d) internal pure returns (bytes32[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 4) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(0x40, add(array, 0xA0)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d` and + /// `e` as the only items. + function arrayFrom(bytes32 a, bytes32 b, bytes32 c, bytes32 d, bytes32 e) + internal + pure + returns (bytes32[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 5) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(0x40, add(array, 0xC0)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @param f The sixth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d`, `e` + /// and `f` as the only items. + function arrayFrom(bytes32 a, bytes32 b, bytes32 c, bytes32 d, bytes32 e, bytes32 f) + internal + pure + returns (bytes32[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 6) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(add(array, 0xC0), f) + mstore(0x40, add(array, 0xE0)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @param f The sixth integer to build an array around. + /// @param g The seventh integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d`, `e`, + /// `f` and `g` as the only items. + function arrayFrom(bytes32 a, bytes32 b, bytes32 c, bytes32 d, bytes32 e, bytes32 f, bytes32 g) + internal + pure + returns (bytes32[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 7) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(add(array, 0xC0), f) + mstore(add(array, 0xE0), g) + mstore(0x40, add(array, 0x100)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @param f The sixth integer to build an array around. + /// @param g The seventh integer to build an array around. + /// @param h The eighth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d`, `e`, + /// `f`, `g` and `h` as the only items. + function arrayFrom(bytes32 a, bytes32 b, bytes32 c, bytes32 d, bytes32 e, bytes32 f, bytes32 g, bytes32 h) + internal + pure + returns (bytes32[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 8) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(add(array, 0xC0), f) + mstore(add(array, 0xE0), g) + mstore(add(array, 0x100), h) + mstore(0x40, add(array, 0x120)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The head of the new array. + /// @param tail The tail of the new array. + /// @return array The new array. + function arrayFrom(bytes32 a, bytes32[] memory tail) internal pure returns (bytes32[] memory array) { + assembly ("memory-safe") { + let length := add(mload(tail), 1) + let outputCursor := mload(0x40) + array := outputCursor + let outputEnd := add(outputCursor, add(0x20, mul(length, 0x20))) + mstore(0x40, outputEnd) + + mstore(outputCursor, length) + mstore(add(outputCursor, 0x20), a) + + mcopy(add(outputCursor, 0x40), add(tail, 0x20), mul(mload(tail), 0x20)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first item of the new array. + /// @param b The second item of the new array. + /// @param tail The tail of the new array. + /// @return array The new array. + function arrayFrom(bytes32 a, bytes32 b, bytes32[] memory tail) internal pure returns (bytes32[] memory array) { + assembly ("memory-safe") { + let length := add(mload(tail), 2) + let outputCursor := mload(0x40) + array := outputCursor + let outputEnd := add(outputCursor, add(0x20, mul(length, 0x20))) + mstore(0x40, outputEnd) + + mstore(outputCursor, length) + mstore(add(outputCursor, 0x20), a) + mstore(add(outputCursor, 0x40), b) + + mcopy(add(outputCursor, 0x60), add(tail, 0x20), mul(mload(tail), 0x20)) + } + } + + /// Solidity provides no way to change the length of in-memory arrays but + /// it also does not deallocate memory ever. It is always safe to shrink an + /// array that has already been allocated, with the caveat that the + /// truncated items will effectively become inaccessible regions of memory. + /// That is to say, we deliberately "leak" the truncated items, but that is + /// no worse than Solidity's native behaviour of leaking everything always. + /// The array is MUTATED in place so there is no return value and there is + /// no new allocation or copying of data either. + /// @param array The array to truncate. + /// @param newLength The new length of the array after truncation. + function truncate(bytes32[] memory array, uint256 newLength) internal pure { + if (newLength > array.length) { + revert OutOfBoundsTruncate(array.length, newLength); + } + assembly ("memory-safe") { + mstore(array, newLength) + } + } + + /// Extends `base_` with `extend_` by allocating only an additional + /// `extend_.length` words onto `base_` and copying only `extend_` if + /// possible. If `base_` is large this MAY be significantly more efficient + /// than allocating `base_.length + extend_.length` for an entirely new array + /// and copying both `base_` and `extend_` into the new array one item at a + /// time in Solidity. + /// + /// The efficient version of extension is only possible if the free memory + /// pointer sits at the end of the base array at the moment of extension. If + /// there is allocated memory after the end of base then extension will + /// require copying both the base and extend arays to a new region of memory. + /// The caller is responsible for optimising code paths to avoid additional + /// allocations. + /// + /// This function is UNSAFE because the base array IS MUTATED DIRECTLY by + /// some code paths AND THE FINAL RETURN ARRAY MAY POINT TO THE SAME REGION + /// OF MEMORY. It is NOT POSSIBLE to reliably see this behaviour from the + /// caller in all cases as the Solidity compiler optimisations may switch the + /// caller between the allocating and non-allocating logic due to subtle + /// optimisation reasons. To use this function safely THE CALLER MUST NOT USE + /// THE BASE ARRAY AND MUST USE THE RETURNED ARRAY ONLY. It is safe to use + /// the extend array after calling this function as it is never mutated, it + /// is only copied from. + /// + /// @param b The base integer array that will be extended by `e`. + /// @param e The extend integer array that extends `b`. + /// @return extended The extended array of `b` extended by `e`. + function unsafeExtend(bytes32[] memory b, bytes32[] memory e) internal pure returns (bytes32[] memory extended) { + assembly ("memory-safe") { + // Slither doesn't recognise assembly function names as mixed case + // even if they are. + // https://github.com/crytic/slither/issues/1815 + //slither-disable-next-line naming-convention + function extendInline(base, extend) -> baseAfter { + let outputCursor := mload(0x40) + let baseLength := mload(base) + let baseEnd := add(base, add(0x20, mul(baseLength, 0x20))) + + // If base is NOT the last thing in allocated memory, allocate, + // copy and recurse. + switch eq(outputCursor, baseEnd) + case 0 { + let newBase := outputCursor + // Base size includes the length word and is in bytes. + let newBaseSize := sub(baseEnd, base) + let newBaseEnd := add(newBase, newBaseSize) + mstore(0x40, newBaseEnd) + mcopy(newBase, base, newBaseSize) + + baseAfter := extendInline(newBase, extend) + } + case 1 { + let totalLength := add(baseLength, mload(extend)) + let outputEnd := add(base, add(0x20, mul(totalLength, 0x20))) + mstore(base, totalLength) + mstore(0x40, outputEnd) + mcopy(baseEnd, add(extend, 0x20), mul(mload(extend), 0x20)) + + baseAfter := base + } + } + + extended := extendInline(b, e) + } + } + + /// Reverse an array in place. This is a destructive operation that MUTATES + /// the array in place. There is no return value. + /// @param array The array to reverse. + function reverse(bytes32[] memory array) internal pure { + assembly ("memory-safe") { + for { + let left := add(array, 0x20) + // Right points at the last item in the array. Which is the + // length number of items from the length. + let right := add(array, mul(mload(array), 0x20)) + } lt(left, right) { + left := add(left, 0x20) + right := sub(right, 0x20) + } { + let leftValue := mload(left) + mstore(left, mload(right)) + mstore(right, leftValue) + } + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Matrix.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Matrix.sol new file mode 100644 index 00000000..4d6c9511 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibBytes32Matrix.sol @@ -0,0 +1,147 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +// keeping this import here so downstream code can get LibPointer easily. +// forge-lint: disable-next-line(unused-import) +import {Pointer, LibPointer} from "./LibPointer.sol"; + +library LibBytes32Matrix { + /// Pointer to the start (length prefix) of a `bytes32[][]`. + /// @param matrix The matrix to get the start pointer of. + /// @return pointer The pointer to the start of `matrix`. + function startPointer(bytes32[][] memory matrix) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := matrix + } + } + + /// Pointer to the data of a `bytes32[][]` NOT the length prefix. + /// Note that the data of a `bytes32[][]` is _references_ to the `bytes32[]` + /// start pointers and does NOT include the arrays themselves. + /// @param matrix The matrix to get the data pointer of. + /// @return pointer The pointer to the data of `matrix`. + function dataPointer(bytes32[][] memory matrix) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(matrix, 0x20) + } + } + + /// Pointer to the end of the allocated memory of a matrix. + /// Note that the data of a `bytes32[][]` is _references_ to the `bytes32[]` + /// start pointers and does NOT include the arrays themselves. + /// @param matrix The matrix to get the end pointer of. + /// @return pointer The pointer to the end of `matrix`. + function endPointer(bytes32[][] memory matrix) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(matrix, add(0x20, mul(0x20, mload(matrix)))) + } + } + + /// Cast a `Pointer` to `bytes32[][]` without modification or safety checks. + /// The caller MUST ensure the pointer is to a valid region of memory for + /// some `bytes32[][]`. + /// @param pointer The pointer to cast to `bytes32[][]`. + /// @return matrix The cast `bytes32[][]`. + function unsafeAsBytes32Matrix(Pointer pointer) internal pure returns (bytes32[][] memory matrix) { + assembly ("memory-safe") { + matrix := pointer + } + } + + /// 2-dimensional analogue of `arrayFrom`. Takes a 1-dimensional array and + /// coerces it to a 2-dimensional matrix where the first and only item in the + /// matrix is the 1-dimensional array. + /// @param a The 1-dimensional array to include in the matrix. + /// @return matrix The 2-dimensional matrix containing `a`. + function matrixFrom(bytes32[] memory a) internal pure returns (bytes32[][] memory matrix) { + assembly ("memory-safe") { + matrix := mload(0x40) + mstore(matrix, 1) + mstore(add(matrix, 0x20), a) + mstore(0x40, add(matrix, 0x40)) + } + } + + /// 2-dimensional analogue of `arrayFrom`. Takes 1-dimensional arrays and + /// coerces them to a 2-dimensional matrix where items in the matrix are the + /// 1-dimensional arrays. + /// @param a The 1-dimensional array to include in the matrix. + /// @param b Second 1-dimensional array to include in the matrix. + /// @return matrix The 2-dimensional matrix containing `a` and `b`. + function matrixFrom(bytes32[] memory a, bytes32[] memory b) internal pure returns (bytes32[][] memory matrix) { + assembly ("memory-safe") { + matrix := mload(0x40) + mstore(matrix, 2) + mstore(add(matrix, 0x20), a) + mstore(add(matrix, 0x40), b) + mstore(0x40, add(matrix, 0x60)) + } + } + + /// 2-dimensional analogue of `arrayFrom`. Takes 1-dimensional arrays and + /// coerces them to a 2-dimensional matrix where items in the matrix are the + /// 1-dimensional arrays. + /// @param a The 1-dimensional array to include in the matrix. + /// @param b Second 1-dimensional array to include in the matrix. + /// @param c Third 1-dimensional array to include in the matrix. + /// @return matrix The 2-dimensional matrix containing `a`, `b` and `c`. + function matrixFrom(bytes32[] memory a, bytes32[] memory b, bytes32[] memory c) + internal + pure + returns (bytes32[][] memory matrix) + { + assembly ("memory-safe") { + matrix := mload(0x40) + mstore(matrix, 3) + mstore(add(matrix, 0x20), a) + mstore(add(matrix, 0x40), b) + mstore(add(matrix, 0x60), c) + mstore(0x40, add(matrix, 0x80)) + } + } + + /// Counts the total number of items in the matrix across all internal + /// arrays. Normally `matrix.length` only returns the number of internal + /// arrays, not the total number of items in the matrix. + function itemCount(bytes32[][] memory matrix) internal pure returns (uint256 count) { + assembly ("memory-safe") { + let cursor := add(matrix, 0x20) + let end := add(cursor, mul(mload(matrix), 0x20)) + + for {} lt(cursor, end) {} { + count := add(count, mload(mload(cursor))) + cursor := add(cursor, 0x20) + } + } + } + + /// Allocates and builds a new `bytes32[]` from a `bytes32[][]`. This is + /// potentially memory intensive and expensive, but there's no way around + /// the allocation if a flat array is needed. This is because 2-dimensional + /// arrays are stored as a length-prefixed array of pointers to 1-dimensional + /// arrays, not as a contiguous block of memory. + /// @param matrix The matrix to flatten. + /// @return array The flattened array. + function flatten(bytes32[][] memory matrix) internal pure returns (bytes32[] memory) { + uint256 length = itemCount(matrix); + bytes32[] memory array; + assembly ("memory-safe") { + array := mload(0x40) + mstore(0x40, add(array, add(0x20, mul(length, 0x20)))) + mstore(array, length) + + let cursor := add(matrix, 0x20) + let end := add(cursor, mul(mload(matrix), 0x20)) + + let arrayCursor := add(array, 0x20) + for {} lt(cursor, end) {} { + let size := mul(mload(mload(cursor)), 0x20) + mcopy(arrayCursor, add(mload(cursor), 0x20), size) + arrayCursor := add(arrayCursor, size) + cursor := add(cursor, 0x20) + } + } + return array; + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibMemCpy.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibMemCpy.sol new file mode 100644 index 00000000..5c4c0cb8 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibMemCpy.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +// keeping this import here so downstream code can get LibPointer easily. +// forge-lint: disable-next-line(unused-import) +import {Pointer, LibPointer} from "./LibPointer.sol"; + +library LibMemCpy { + /// Copy an arbitrary number of bytes from one location in memory to another. + /// As of cancun this is a convenience wrapper for the `mcopy` opcode. The + /// writes are completely unsafe, the caller MUST ensure that sufficient + /// memory is allocated and reading/writing the requested number of bytes + /// from/to the requested locations WILL NOT corrupt memory in the + /// opinion of solidity or other subsequent read/write operations. + /// @param sourceCursor The starting pointer to read from. + /// @param targetCursor The starting pointer to write to. + /// @param length The number of bytes to read/write. + function unsafeCopyBytesTo(Pointer sourceCursor, Pointer targetCursor, uint256 length) internal pure { + assembly ("memory-safe") { + mcopy(targetCursor, sourceCursor, length) + } + } + + /// Copies `length` `uint256` values starting from `source` to `target` + /// with NO attempt to check that this is safe to do so. The caller MUST + /// ensure that there exists allocated memory at `target` in which it is + /// safe and appropriate to copy `length * 32` bytes to. Anything that was + /// already written to memory at `[target:target+(length * 32 bytes)]` + /// will be overwritten. + /// There is no return value as memory is modified directly. + /// @param source The starting position in memory that data will be copied + /// from. + /// @param target The starting position in memory that data will be copied + /// to. + /// @param length The number of 32 byte (i.e. `uint256`) words that will + /// be copied. + function unsafeCopyWordsTo(Pointer source, Pointer target, uint256 length) internal pure { + assembly ("memory-safe") { + mcopy(target, source, mul(length, 0x20)) + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibPointer.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibPointer.sol new file mode 100644 index 00000000..051cb3f5 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibPointer.sol @@ -0,0 +1,155 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// A pointer to a location in memory. This is a `uint256` to save gas on low +/// level operations on the evm stack. These same low level operations typically +/// WILL NOT check for overflow or underflow, so all pointer logic MUST ensure +/// that reads, writes and movements are not out of bounds. +type Pointer is uint256; + +/// @title LibPointer +/// Ergonomic wrappers around common pointer movements, reading and writing. As +/// wrappers on such low level operations often introduce too much jump gas +/// overhead, these functions MAY find themselves used in reference +/// implementations that more optimised code can be fuzzed against. MAY also be +/// situationally useful on cooler performance paths. +library LibPointer { + /// Cast a `Pointer` to `bytes` without modification or any safety checks. + /// The caller MUST ensure the pointer is to a valid region of memory for + /// some `bytes`. + /// @param pointer The pointer to cast to `bytes`. + /// @return data The cast `bytes`. + function unsafeAsBytes(Pointer pointer) internal pure returns (bytes memory data) { + assembly ("memory-safe") { + data := pointer + } + } + + /// Increase some pointer by a number of bytes. + /// + /// This is UNSAFE because it can silently overflow or point beyond some + /// data structure. The caller MUST ensure that this is a safe operation. + /// + /// Note that moving a pointer by some bytes offset is likely to unalign it + /// with the 32 byte increments of the Solidity allocator. + /// + /// @param pointer The pointer to increase by `length`. + /// @param length The number of bytes to increase the pointer by. + /// @return The increased pointer. + function unsafeAddBytes(Pointer pointer, uint256 length) internal pure returns (Pointer) { + assembly ("memory-safe") { + pointer := add(pointer, length) + } + return pointer; + } + + /// Increase some pointer by a single 32 byte word. + /// + /// This is UNSAFE because it can silently overflow or point beyond some + /// data structure. The caller MUST ensure that this is a safe operation. + /// + /// If the original pointer is aligned to the Solidity allocator it will be + /// aligned after the movement. + /// + /// @param pointer The pointer to increase by a single word. + /// @return The increased pointer. + function unsafeAddWord(Pointer pointer) internal pure returns (Pointer) { + assembly ("memory-safe") { + pointer := add(pointer, 0x20) + } + return pointer; + } + + /// Increase some pointer by multiple 32 byte words. + /// + /// This is UNSAFE because it can silently overflow or point beyond some + /// data structure. The caller MUST ensure that this is a safe operation. + /// + /// If the original pointer is aligned to the Solidity allocator it will be + /// aligned after the movement. + /// + /// @param pointer The pointer to increase. + /// @param words The number of words to increase the pointer by. + /// @return The increased pointer. + function unsafeAddWords(Pointer pointer, uint256 words) internal pure returns (Pointer) { + assembly ("memory-safe") { + pointer := add(pointer, mul(0x20, words)) + } + return pointer; + } + + /// Decrease some pointer by a single 32 byte word. + /// + /// This is UNSAFE because it can silently underflow or point below some + /// data structure. The caller MUST ensure that this is a safe operation. + /// + /// If the original pointer is aligned to the Solidity allocator it will be + /// aligned after the movement. + /// + /// @param pointer The pointer to decrease by a single word. + /// @return The decreased pointer. + function unsafeSubWord(Pointer pointer) internal pure returns (Pointer) { + assembly ("memory-safe") { + pointer := sub(pointer, 0x20) + } + return pointer; + } + + /// Decrease some pointer by multiple 32 byte words. + /// + /// This is UNSAFE because it can silently underflow or point below some + /// data structure. The caller MUST ensure that this is a safe operation. + /// + /// If the original pointer is aligned to the Solidity allocator it will be + /// aligned after the movement. + /// + /// @param pointer The pointer to decrease. + /// @param words The number of words to decrease the pointer by. + /// @return The decreased pointer. + function unsafeSubWords(Pointer pointer, uint256 words) internal pure returns (Pointer) { + assembly ("memory-safe") { + pointer := sub(pointer, mul(0x20, words)) + } + return pointer; + } + + /// Read the word at the pointer. + /// + /// This is UNSAFE because it can read outside any particular data stucture + /// or even beyond allocated memory. The caller MUST ensure that this is a + /// safe operation. + /// + /// @param pointer Pointer to read the word at. + /// @return word The word read from the pointer. + function unsafeReadWord(Pointer pointer) internal pure returns (bytes32 word) { + assembly ("memory-safe") { + word := mload(pointer) + } + } + + /// Write a word at the pointer. + /// + /// This is UNSAFE because it can write outside any particular data stucture + /// or even beyond allocated memory. The caller MUST ensure that this is a + /// safe operation. + /// + /// @param pointer Pointer to write the word at. + /// @param word The word to write. + function unsafeWriteWord(Pointer pointer, bytes32 word) internal pure { + assembly ("memory-safe") { + mstore(pointer, word) + } + } + + /// Get the pointer to the end of all allocated memory. + /// As per Solidity docs, there is no guarantee that the region of memory + /// beyond this pointer is zeroed out, as assembly MAY write beyond allocated + /// memory for temporary use if the scratch space is insufficient. + /// @return pointer The pointer to the end of all allocated memory. + function allocatedMemoryPointer() internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := mload(0x40) + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibStackPointer.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibStackPointer.sol new file mode 100644 index 00000000..942ea030 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibStackPointer.sol @@ -0,0 +1,167 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {LibUint256Array} from "./LibUint256Array.sol"; +import {Pointer} from "./LibMemCpy.sol"; +import {UnalignedStackPointer} from "../error/ErrStackPointer.sol"; + +/// @title LibStackPointer +/// @notice A stack `Pointer` is still just a pointer to some memory, but we are +/// going to treat it like it is pointing to a stack data structure. That means +/// it can move "up" and "down" (increment and decrement) by `uint256` (32 bytes) +/// increments. Structurally a stack is a `uint256[]` but we can save a lot of +/// gas vs. default Solidity handling of array indexes by using assembly to +/// bypass runtime bounds checks on every read and write. Of course, this means +/// the caller is responsible for ensuring the stack reads and write are not out +/// of bounds. +/// +/// The pointer to the bottom of a stack points at the 0th item, NOT the length +/// of the implied `uint256[]` and the top of a stack points AFTER the last item. +/// e.g. consider a `uint256[]` in memory with values `3 A B C` and assume this +/// starts at position `0` in memory, i.e. `0` points to value `3` for the +/// array length. In this case the stack bottom would be `Pointer.wrap(0x20)` +/// (32 bytes above 0, past the length) and the stack top would be +/// `StackPointer.wrap(0x80)` (96 bytes above the stack bottom). +/// +/// Most of the functions in this library are equivalent to each other via +/// composition, i.e. everything could be achieved with just `up`, `down`, +/// `pop`, `push`, `peek`. The reason there is so much overloaded/duplicated +/// logic is that the Solidity compiler seems to fail at inlining equivalent +/// logic quite a lot. Perhaps once the IR compilation of Solidity is better +/// supported by tooling etc. we could remove a lot of this duplication as the +/// compiler itself would handle the optimisations. +library LibStackPointer { + using LibStackPointer for Pointer; + using LibStackPointer for uint256[]; + using LibStackPointer for bytes; + using LibUint256Array for uint256[]; + + /// Read the word immediately below the given stack pointer. + /// + /// Treats the given pointer as a pointer to the top of the stack, so `peek` + /// reads the word below the pointer. + /// + /// https://en.wikipedia.org/wiki/Peek_(data_type_operation) + /// + /// The caller MUST ensure this read is not out of bounds, e.g. a `peek` to + /// `0` will underflow (and exhaust gas attempting to read). + /// + /// @param pointer Pointer to the top of the stack to read below. + /// @return word The word that was read. + function unsafePeek(Pointer pointer) internal pure returns (bytes32 word) { + assembly ("memory-safe") { + word := mload(sub(pointer, 0x20)) + } + } + + /// Peeks 2 words from the top of the stack. + /// + /// Same as `unsafePeek` but returns 2 words instead of 1. + /// + /// @param pointer The stack top to peek below. + /// @return lower The lower of the two words read. + /// @return upper The upper of the two words read. + function unsafePeek2(Pointer pointer) internal pure returns (bytes32 lower, bytes32 upper) { + assembly ("memory-safe") { + lower := mload(sub(pointer, 0x40)) + upper := mload(sub(pointer, 0x20)) + } + } + + /// Pops the word from the top of the stack. + /// + /// Treats the given pointer as a pointer to the top of the stack, so `pop` + /// reads the word below the pointer. The popped pointer is returned + /// alongside the read word. + /// + /// https://en.wikipedia.org/wiki/Stack_(abstract_data_type) + /// + /// The caller MUST ensure the pop will not result in an out of bounds read. + /// + /// @param pointer Pointer to the top of the stack to read below. + /// @return pointerAfter Pointer after the pop. + /// @return word The word that was read. + function unsafePop(Pointer pointer) internal pure returns (Pointer pointerAfter, bytes32 word) { + assembly ("memory-safe") { + pointerAfter := sub(pointer, 0x20) + word := mload(pointerAfter) + } + } + + /// Pushes a word to the top of the stack. + /// + /// Treats the given pointer as a pointer to the top of the stack, so `push` + /// writes a word at the pointer. The pushed pointer is returned. + /// + /// https://en.wikipedia.org/wiki/Stack_(abstract_data_type) + /// + /// The caller MUST ensure the push will not result in an out of bounds + /// write. + /// + /// @param pointer The stack pointer to write at. + /// @param word The value to write. + /// @return The stack pointer above where `word` was written to. + function unsafePush(Pointer pointer, bytes32 word) internal pure returns (Pointer) { + assembly ("memory-safe") { + mstore(pointer, word) + pointer := add(pointer, 0x20) + } + return pointer; + } + + /// Returns `length` values from the stack as an array without allocating + /// new memory. As arrays always start with their length, this requires + /// writing the length value to the stack below the array values. The value + /// that is overwritten in the process is also returned so that data is not + /// lost. For example, imagine a stack `[ A B C D ]` and we list 2 values. + /// This will write the stack to look like `[ A 2 C D ]` and return both `B` + /// and a pointer to `2` represented as a `uint256[]`. + /// The returned array is ONLY valid for as long as the stack DOES NOT move + /// back into its memory. As soon as the stack moves up again and writes into + /// the array it will be corrupt. The caller MUST ensure that it does not + /// read from the returned array after it has been corrupted by subsequent + /// stack writes. + /// The caller is responsible for ensuring that `pointer` and `length` are + /// built from a real Solidity array, ensuring that the reads and writes in + /// this function do not underflow the original array. Specifically that + /// `length` is not greater than the number of items in the array below + /// `pointer`. + /// @param pointer The stack pointer to read the values below into an + /// array. + /// @param length The number of values to include in the returned array. + /// @return head The value that was overwritten with the length. + /// @return tail The array constructed from the stack memory. + function unsafeList(Pointer pointer, uint256 length) internal pure returns (bytes32 head, bytes32[] memory tail) { + assembly ("memory-safe") { + tail := sub(pointer, add(0x20, mul(length, 0x20))) + head := mload(tail) + mstore(tail, length) + } + } + + /// Convert two stack pointer values to a single stack index. A stack index + /// is the distance in 32 byte increments between two stack pointers. The + /// calculations require the two stack pointers are aligned. If the pointers + /// are not aligned, the function will revert. + /// + /// @param lower The lower of the two values. + /// @param upper The higher of the two values. + /// @return The stack index as 32 byte words distance between the top and + /// bottom. Negative if `lower` is above `upper`. + function toIndexSigned(Pointer lower, Pointer upper) internal pure returns (int256) { + unchecked { + uint256 distance = Pointer.unwrap(upper) >= Pointer.unwrap(lower) + ? Pointer.unwrap(upper) - Pointer.unwrap(lower) + : Pointer.unwrap(lower) - Pointer.unwrap(upper); + + if (distance % 0x20 != 0) { + revert UnalignedStackPointer(lower, upper); + } + // Dividing by 0x20 before casting to a signed int avoids the case + // where the difference between the two pointers is greater than + // `type(int256).max` and would overflow the signed int. + return int256(Pointer.unwrap(upper) / 0x20) - int256(Pointer.unwrap(lower) / 0x20); + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibStackSentinel.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibStackSentinel.sol new file mode 100644 index 00000000..1bd35a04 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibStackSentinel.sol @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Pointer} from "./LibPointer.sol"; + +/// Thrown when the sentinel tuple size is zero. +error ZeroSentinelTupleSize(); + +/// Thrown when the sentinel cannot be found. This can be because the sentinel +/// was not in stack, but also if the upper pointer is below the lower, or the +/// sentinel is in the stack but not aligned with the tuples size. +/// @param sentinel The sentinel that was not found. +error MissingSentinel(Sentinel sentinel); + +/// Thrown when the stack bounds are invalid because the lower is above the +/// upper. +/// @param lower The lower stack pointer. +/// @param upper The upper stack pointer. +error InvalidStackBounds(Pointer lower, Pointer upper); + +/// > In computer programming, a sentinel value (also referred to as a flag +/// > value, trip value, rogue value, signal value, or dummy data)[1] is a +/// > special value in the context of an algorithm which uses its presence as a +/// > condition of termination, typically in a loop or recursive algorithm. +/// > +/// > The sentinel value is a form of in-band data that makes it possible to +/// > detect the end of the data when no out-of-band data (such as an explicit +/// > size indication) is provided. The value should be selected in such a way +/// > that it is guaranteed to be distinct from all legal data values since +/// > otherwise, the presence of such values would prematurely signal the end of +/// > the data (the semipredicate problem). +/// > +/// > - [Wikipedia](https://en.wikipedia.org/wiki/Sentinel_value) +type Sentinel is uint256; + +/// Rainlang has no dynamic list data type as every stack item MUST be explicit +/// in the structure of the code itself. While it would be possible for users to +/// manually code length prefixes into the stack, this would be error prone and +/// generally hostile to the overall DX. Instead we can allow sentinels as an +/// option that is merely awkward rather than downright pathological. +/// +/// Rainlang authors can use a single sentinel value that is constant across all +/// their expressions rather than a calculated length prefix. This value can even +/// be aliased in onchain metadata and referenced by name for ease of use. The +/// calling contract defines and consumes sentinels, so the expression author +/// does not need to be aware of or have control over any subtleties in choice of +/// sentinel. +/// +/// The main tradeoffs for sentinel terminated lists on a stack are similar to +/// null-terminated strings, +/// as per [Wikipedia](https://en.wikipedia.org/wiki/Null-terminated_string) +/// +/// > While simple to implement, this representation has been prone to errors and +/// > performance problems. +/// +/// This library attempts to mitigate potential implementation errors with a +/// standard implementation that has been fuzzed and optimized for building lists +/// of tuples (and therefore lists of structs via. a direct type cast). The main +/// implementation issues in null-terminated strings are avoided: +/// +/// - Using any sentinel value other than `0`, such as the hash of some well +/// known string, will avoid misinterpreting unallocated memory as a sentinel. +/// - Any underflows manifest as either a "missing sentinel" or infinite loop, +/// which will revert either way due to an explicit check or gas limits. +/// - Given that a sentinel is `uint256` it is possible to construct a value that +/// is very unlikely to collide with real values in the implementation domain. +/// - Well behaved integrity checks will ensure the memory for the sentinel is +/// allocated as any other stack item. +/// +/// Sadly there is no way to avoid the O(n) performance overhead of searching for +/// a sentinel vs. O(1) of reading a length prefix directly. This is somewhat +/// mitigated by the nature of a hand-written stack being small in +/// computing terms, and that each item being iterated over is an entire struct +/// rather than individual stack values. Assembly is used to keep the looping +/// overhead to a minimum. +library LibStackSentinel { + using LibStackSentinel for Pointer; + + /// Given two stack pointers that bound a stack build an array of `n` item + /// tuples above the given sentinel value. The sentinel will be skipped and + /// a pointer below it returned alongside the tuples list. + /// + /// The tuples can be cast (via assembly) to structs. + /// + /// The caller MUST consider the region of memory consumed for the structs as + /// mutated/truncated/deallocated and reallocated insitu to the tuples. + /// + /// The sentinel MUST be chosen to have a negligible chance of colliding with + /// a real value in the array, otherwise an intended array item will be + /// interpreted as a sentinel. + /// + /// If the sentinel is absent in the stack this WILL REVERT. The intent is + /// to represent dynamic length arrays without forcing expression authors to + /// calculate lengths on the stack. If the expression author wants to model + /// an empty/optional/absent value they MAY provided a sentinel for a zero + /// length array and the calling contract SHOULD handle this. + /// + /// If `lower` is smaller than `n` it is possible that this will underflow + /// which will result in the evm immediately running out of gas as it + /// attempts to loop from infinity. There is no explicit underflow check but + /// there is no way to underflow without reverting due to gas. + /// + /// @param upper Pointer to the top of the stack range. + /// @param lower Pointer to the bottom of the stack range. + /// @param sentinel The value to expect as the sentinel. MUST be present in + /// the stack or `consumeSentinel` will revert. MUST NOT collide with valid + /// stack items (or be cryptographically improbable to do so). + /// @param n The number of items per tuple. + /// @return sentinelPointer Pointer to the sentinel that was found. A missing + /// sentinel WILL REVERT. + /// @return tuplesPointer Pointer to the n-item tuples array that was built. + function consumeSentinelTuples(Pointer lower, Pointer upper, Sentinel sentinel, uint256 n) + internal + pure + returns (Pointer sentinelPointer, Pointer tuplesPointer) + { + if (n == 0) { + revert ZeroSentinelTupleSize(); + } + + // Each tuple takes this much space in memory. + uint256 size; + + // First pass to find the sentinel. + assembly ("memory-safe") { + size := mul(n, 0x20) + // An underflow here always results in a revert due to gas. + for { let cursor := upper } gt(cursor, lower) { cursor := sub(cursor, size) } { + let potentialSentinelPointer := sub(cursor, 0x20) + if eq(mload(potentialSentinelPointer), sentinel) { + sentinelPointer := potentialSentinelPointer + break + } + } + } + + // We revert if the sentinel was not found. + if (Pointer.unwrap(sentinelPointer) == 0) { + if (Pointer.unwrap(upper) < Pointer.unwrap(lower)) { + revert InvalidStackBounds(lower, upper); + } + revert MissingSentinel(sentinel); + } + + // Second pass to build references _in order_ from the sentinel back up + // to upper. + assembly ("memory-safe") { + tuplesPointer := mload(0x40) + let tuplesCursor := add(tuplesPointer, 0x20) + for { let cursor := add(sentinelPointer, 0x20) } lt(cursor, upper) { + tuplesCursor := add(tuplesCursor, 0x20) + cursor := add(cursor, size) + } { + // Write the reference to the tuple. + mstore(tuplesCursor, cursor) + } + // Update allocated memory pointer past the tuples. + mstore(0x40, tuplesCursor) + // Store tuples length. + mstore(tuplesPointer, sub(div(sub(tuplesCursor, tuplesPointer), 0x20), 1)) + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibUint256Array.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibUint256Array.sol new file mode 100644 index 00000000..bc1099db --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibUint256Array.sol @@ -0,0 +1,382 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Pointer} from "./LibPointer.sol"; +import {OutOfBoundsTruncate} from "../error/ErrUint256Array.sol"; + +/// @title Uint256Array +/// @notice Things we want to do carefully and efficiently with uint256 arrays +/// that Solidity doesn't give us native tools for. +library LibUint256Array { + using LibUint256Array for uint256[]; + + /// Pointer to the start (length prefix) of a `uint256[]`. + /// @param array The array to get the start pointer of. + /// @return pointer The pointer to the start of `array`. + function startPointer(uint256[] memory array) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := array + } + } + + /// Pointer to the data of a `uint256[]` NOT the length prefix. + /// @param array The array to get the data pointer of. + /// @return pointer The pointer to the data of `array`. + function dataPointer(uint256[] memory array) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(array, 0x20) + } + } + + /// Pointer to the end of the allocated memory of an array. + /// @param array The array to get the end pointer of. + /// @return pointer The pointer to the end of `array`. + function endPointer(uint256[] memory array) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(array, add(0x20, mul(0x20, mload(array)))) + } + } + + /// Cast a `Pointer` to `uint256[]` without modification or safety checks. + /// The caller MUST ensure the pointer is to a valid region of memory for + /// some `uint256[]`. + /// @param pointer The pointer to cast to `uint256[]`. + /// @return array The cast `uint256[]`. + function unsafeAsUint256Array(Pointer pointer) internal pure returns (uint256[] memory array) { + assembly ("memory-safe") { + array := pointer + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a A single integer to build an array around. + /// @return array The newly allocated array including `a` as a single item. + function arrayFrom(uint256 a) internal pure returns (uint256[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 1) + mstore(add(array, 0x20), a) + mstore(0x40, add(array, 0x40)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @return array The newly allocated array including `a` and `b` as the only + /// items. + function arrayFrom(uint256 a, uint256 b) internal pure returns (uint256[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 2) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(0x40, add(array, 0x60)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @return array The newly allocated array including `a`, `b` and `c` as the + /// only items. + function arrayFrom(uint256 a, uint256 b, uint256 c) internal pure returns (uint256[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 3) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(0x40, add(array, 0x80)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c` and `d` as the + /// only items. + function arrayFrom(uint256 a, uint256 b, uint256 c, uint256 d) internal pure returns (uint256[] memory array) { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 4) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(0x40, add(array, 0xA0)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d` and + /// `e` as the only items. + function arrayFrom(uint256 a, uint256 b, uint256 c, uint256 d, uint256 e) + internal + pure + returns (uint256[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 5) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(0x40, add(array, 0xC0)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @param f The sixth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d`, `e` + /// and `f` as the only items. + function arrayFrom(uint256 a, uint256 b, uint256 c, uint256 d, uint256 e, uint256 f) + internal + pure + returns (uint256[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 6) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(add(array, 0xC0), f) + mstore(0x40, add(array, 0xE0)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @param f The sixth integer to build an array around. + /// @param g The seventh integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d`, `e`, + /// `f` and `g` as the only items. + function arrayFrom(uint256 a, uint256 b, uint256 c, uint256 d, uint256 e, uint256 f, uint256 g) + internal + pure + returns (uint256[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 7) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(add(array, 0xC0), f) + mstore(add(array, 0xE0), g) + mstore(0x40, add(array, 0x100)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first integer to build an array around. + /// @param b The second integer to build an array around. + /// @param c The third integer to build an array around. + /// @param d The fourth integer to build an array around. + /// @param e The fifth integer to build an array around. + /// @param f The sixth integer to build an array around. + /// @param g The seventh integer to build an array around. + /// @param h The eighth integer to build an array around. + /// @return array The newly allocated array including `a`, `b`, `c`, `d`, `e`, + /// `f`, `g` and `h` as the only items. + function arrayFrom(uint256 a, uint256 b, uint256 c, uint256 d, uint256 e, uint256 f, uint256 g, uint256 h) + internal + pure + returns (uint256[] memory array) + { + assembly ("memory-safe") { + array := mload(0x40) + mstore(array, 8) + mstore(add(array, 0x20), a) + mstore(add(array, 0x40), b) + mstore(add(array, 0x60), c) + mstore(add(array, 0x80), d) + mstore(add(array, 0xA0), e) + mstore(add(array, 0xC0), f) + mstore(add(array, 0xE0), g) + mstore(add(array, 0x100), h) + mstore(0x40, add(array, 0x120)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The head of the new array. + /// @param tail The tail of the new array. + /// @return array The new array. + function arrayFrom(uint256 a, uint256[] memory tail) internal pure returns (uint256[] memory array) { + assembly ("memory-safe") { + let length := add(mload(tail), 1) + let outputCursor := mload(0x40) + array := outputCursor + let outputEnd := add(outputCursor, add(0x20, mul(length, 0x20))) + mstore(0x40, outputEnd) + + mstore(outputCursor, length) + mstore(add(outputCursor, 0x20), a) + + mcopy(add(outputCursor, 0x40), add(tail, 0x20), mul(mload(tail), 0x20)) + } + } + + /// Building arrays from literal components is a common task that introduces + /// boilerplate that is either inefficient or error prone. + /// @param a The first item of the new array. + /// @param b The second item of the new array. + /// @param tail The tail of the new array. + /// @return array The new array. + function arrayFrom(uint256 a, uint256 b, uint256[] memory tail) internal pure returns (uint256[] memory array) { + assembly ("memory-safe") { + let length := add(mload(tail), 2) + let outputCursor := mload(0x40) + array := outputCursor + let outputEnd := add(outputCursor, add(0x20, mul(length, 0x20))) + mstore(0x40, outputEnd) + + mstore(outputCursor, length) + mstore(add(outputCursor, 0x20), a) + mstore(add(outputCursor, 0x40), b) + + mcopy(add(outputCursor, 0x60), add(tail, 0x20), mul(mload(tail), 0x20)) + } + } + + /// Solidity provides no way to change the length of in-memory arrays but + /// it also does not deallocate memory ever. It is always safe to shrink an + /// array that has already been allocated, with the caveat that the + /// truncated items will effectively become inaccessible regions of memory. + /// That is to say, we deliberately "leak" the truncated items, but that is + /// no worse than Solidity's native behaviour of leaking everything always. + /// The array is MUTATED in place so there is no return value and there is + /// no new allocation or copying of data either. + /// @param array The array to truncate. + /// @param newLength The new length of the array after truncation. + function truncate(uint256[] memory array, uint256 newLength) internal pure { + if (newLength > array.length) { + revert OutOfBoundsTruncate(array.length, newLength); + } + assembly ("memory-safe") { + mstore(array, newLength) + } + } + + /// Extends `base_` with `extend_` by allocating only an additional + /// `extend_.length` words onto `base_` and copying only `extend_` if + /// possible. If `base_` is large this MAY be significantly more efficient + /// than allocating `base_.length + extend_.length` for an entirely new array + /// and copying both `base_` and `extend_` into the new array one item at a + /// time in Solidity. + /// + /// The efficient version of extension is only possible if the free memory + /// pointer sits at the end of the base array at the moment of extension. If + /// there is allocated memory after the end of base then extension will + /// require copying both the base and extend arays to a new region of memory. + /// The caller is responsible for optimising code paths to avoid additional + /// allocations. + /// + /// This function is UNSAFE because the base array IS MUTATED DIRECTLY by + /// some code paths AND THE FINAL RETURN ARRAY MAY POINT TO THE SAME REGION + /// OF MEMORY. It is NOT POSSIBLE to reliably see this behaviour from the + /// caller in all cases as the Solidity compiler optimisations may switch the + /// caller between the allocating and non-allocating logic due to subtle + /// optimisation reasons. To use this function safely THE CALLER MUST NOT USE + /// THE BASE ARRAY AND MUST USE THE RETURNED ARRAY ONLY. It is safe to use + /// the extend array after calling this function as it is never mutated, it + /// is only copied from. + /// + /// @param b The base integer array that will be extended by `e`. + /// @param e The extend integer array that extends `b`. + /// @return extended The extended array of `b` extended by `e`. + function unsafeExtend(uint256[] memory b, uint256[] memory e) internal pure returns (uint256[] memory extended) { + assembly ("memory-safe") { + // Slither doesn't recognise assembly function names as mixed case + // even if they are. + // https://github.com/crytic/slither/issues/1815 + //slither-disable-next-line naming-convention + function extendInline(base, extend) -> baseAfter { + let outputCursor := mload(0x40) + let baseLength := mload(base) + let baseEnd := add(base, add(0x20, mul(baseLength, 0x20))) + + // If base is NOT the last thing in allocated memory, allocate, + // copy and recurse. + switch eq(outputCursor, baseEnd) + case 0 { + let newBase := outputCursor + // Base size includes the length word and is in bytes. + let newBaseSize := sub(baseEnd, base) + let newBaseEnd := add(newBase, newBaseSize) + mstore(0x40, newBaseEnd) + mcopy(newBase, base, newBaseSize) + + baseAfter := extendInline(newBase, extend) + } + case 1 { + let totalLength := add(baseLength, mload(extend)) + let outputEnd := add(base, add(0x20, mul(totalLength, 0x20))) + mstore(base, totalLength) + mstore(0x40, outputEnd) + mcopy(baseEnd, add(extend, 0x20), mul(mload(extend), 0x20)) + + baseAfter := base + } + } + + extended := extendInline(b, e) + } + } + + /// Reverse an array in place. This is a destructive operation that MUTATES + /// the array in place. There is no return value. + /// @param array The array to reverse. + function reverse(uint256[] memory array) internal pure { + assembly ("memory-safe") { + for { + let left := add(array, 0x20) + // Right points at the last item in the array. Which is the + // length number of items from the length. + let right := add(array, mul(mload(array), 0x20)) + } lt(left, right) { + left := add(left, 0x20) + right := sub(right, 0x20) + } { + let leftValue := mload(left) + mstore(left, mload(right)) + mstore(right, leftValue) + } + } + } +} diff --git a/dependencies/rain-solmem-0.1.3/src/lib/LibUint256Matrix.sol b/dependencies/rain-solmem-0.1.3/src/lib/LibUint256Matrix.sol new file mode 100644 index 00000000..257dd259 --- /dev/null +++ b/dependencies/rain-solmem-0.1.3/src/lib/LibUint256Matrix.sol @@ -0,0 +1,147 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +// keeping this import here so downstream code can get LibPointer easily. +// forge-lint: disable-next-line(unused-import) +import {Pointer, LibPointer} from "./LibPointer.sol"; + +library LibUint256Matrix { + /// Pointer to the start (length prefix) of a `uint256[][]`. + /// @param matrix The matrix to get the start pointer of. + /// @return pointer The pointer to the start of `matrix`. + function startPointer(uint256[][] memory matrix) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := matrix + } + } + + /// Pointer to the data of a `uint256[][]` NOT the length prefix. + /// Note that the data of a `uint256[][]` is _references_ to the `uint256[]` + /// start pointers and does NOT include the arrays themselves. + /// @param matrix The matrix to get the data pointer of. + /// @return pointer The pointer to the data of `matrix`. + function dataPointer(uint256[][] memory matrix) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(matrix, 0x20) + } + } + + /// Pointer to the end of the allocated memory of a matrix. + /// Note that the data of a `uint256[][]` is _references_ to the `uint256[]` + /// start pointers and does NOT include the arrays themselves. + /// @param matrix The matrix to get the end pointer of. + /// @return pointer The pointer to the end of `matrix`. + function endPointer(uint256[][] memory matrix) internal pure returns (Pointer pointer) { + assembly ("memory-safe") { + pointer := add(matrix, add(0x20, mul(0x20, mload(matrix)))) + } + } + + /// Cast a `Pointer` to `uint256[][]` without modification or safety checks. + /// The caller MUST ensure the pointer is to a valid region of memory for + /// some `uint256[][]`. + /// @param pointer The pointer to cast to `uint256[][]`. + /// @return matrix The cast `uint256[][]`. + function unsafeAsUint256Matrix(Pointer pointer) internal pure returns (uint256[][] memory matrix) { + assembly ("memory-safe") { + matrix := pointer + } + } + + /// 2-dimensional analogue of `arrayFrom`. Takes a 1-dimensional array and + /// coerces it to a 2-dimensional matrix where the first and only item in the + /// matrix is the 1-dimensional array. + /// @param a The 1-dimensional array to include in the matrix. + /// @return matrix The 2-dimensional matrix containing `a`. + function matrixFrom(uint256[] memory a) internal pure returns (uint256[][] memory matrix) { + assembly ("memory-safe") { + matrix := mload(0x40) + mstore(matrix, 1) + mstore(add(matrix, 0x20), a) + mstore(0x40, add(matrix, 0x40)) + } + } + + /// 2-dimensional analogue of `arrayFrom`. Takes 1-dimensional arrays and + /// coerces them to a 2-dimensional matrix where items in the matrix are the + /// 1-dimensional arrays. + /// @param a The 1-dimensional array to include in the matrix. + /// @param b Second 1-dimensional array to include in the matrix. + /// @return matrix The 2-dimensional matrix containing `a` and `b`. + function matrixFrom(uint256[] memory a, uint256[] memory b) internal pure returns (uint256[][] memory matrix) { + assembly ("memory-safe") { + matrix := mload(0x40) + mstore(matrix, 2) + mstore(add(matrix, 0x20), a) + mstore(add(matrix, 0x40), b) + mstore(0x40, add(matrix, 0x60)) + } + } + + /// 2-dimensional analogue of `arrayFrom`. Takes 1-dimensional arrays and + /// coerces them to a 2-dimensional matrix where items in the matrix are the + /// 1-dimensional arrays. + /// @param a The 1-dimensional array to include in the matrix. + /// @param b Second 1-dimensional array to include in the matrix. + /// @param c Third 1-dimensional array to include in the matrix. + /// @return matrix The 2-dimensional matrix containing `a`, `b` and `c`. + function matrixFrom(uint256[] memory a, uint256[] memory b, uint256[] memory c) + internal + pure + returns (uint256[][] memory matrix) + { + assembly ("memory-safe") { + matrix := mload(0x40) + mstore(matrix, 3) + mstore(add(matrix, 0x20), a) + mstore(add(matrix, 0x40), b) + mstore(add(matrix, 0x60), c) + mstore(0x40, add(matrix, 0x80)) + } + } + + /// Counts the total number of items in the matrix across all internal + /// arrays. Normally `matrix.length` only returns the number of internal + /// arrays, not the total number of items in the matrix. + function itemCount(uint256[][] memory matrix) internal pure returns (uint256 count) { + assembly ("memory-safe") { + let cursor := add(matrix, 0x20) + let end := add(cursor, mul(mload(matrix), 0x20)) + + for {} lt(cursor, end) {} { + count := add(count, mload(mload(cursor))) + cursor := add(cursor, 0x20) + } + } + } + + /// Allocates and builds a new `uint256[]` from a `uint256[][]`. This is + /// potentially memory intensive and expensive, but there's no way around + /// the allocation if a flat array is needed. This is because 2-dimensional + /// arrays are stored as a length-prefixed array of pointers to 1-dimensional + /// arrays, not as a contiguous block of memory. + /// @param matrix The matrix to flatten. + /// @return array The flattened array. + function flatten(uint256[][] memory matrix) internal pure returns (uint256[] memory) { + uint256 length = itemCount(matrix); + uint256[] memory array; + assembly ("memory-safe") { + array := mload(0x40) + mstore(0x40, add(array, add(0x20, mul(length, 0x20)))) + mstore(array, length) + + let cursor := add(matrix, 0x20) + let end := add(cursor, mul(mload(matrix), 0x20)) + + let arrayCursor := add(array, 0x20) + for {} lt(cursor, end) {} { + let size := mul(mload(mload(cursor)), 0x20) + mcopy(arrayCursor, add(mload(cursor), 0x20), size) + arrayCursor := add(arrayCursor, size) + cursor := add(cursor, 0x20) + } + } + return array; + } +} diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index 1d9650e9..00000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1d9650e951204a0ddce9ff89c32f1997984cef4d diff --git a/lib/openzeppelin-contracts-upgradeable b/lib/openzeppelin-contracts-upgradeable deleted file mode 160000 index 3d4c0d57..00000000 --- a/lib/openzeppelin-contracts-upgradeable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3d4c0d5741b131c231e558d7a6213392ab3672a5 diff --git a/lib/rain.factory b/lib/rain.factory deleted file mode 160000 index 0b55d7e7..00000000 --- a/lib/rain.factory +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b55d7e770633c443577e4eddf6ac832fac5daeb diff --git a/lib/rain.interpreter.interface b/lib/rain.interpreter.interface deleted file mode 160000 index dab8e3dd..00000000 --- a/lib/rain.interpreter.interface +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dab8e3dd110ef984e0c056cee085a4d7ee99cbb7 diff --git a/lib/rain.math.fixedpoint b/lib/rain.math.fixedpoint deleted file mode 160000 index 65df07e8..00000000 --- a/lib/rain.math.fixedpoint +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 65df07e8c1a93adb5766ec00a05a93e474277067 diff --git a/lib/rain.solmem b/lib/rain.solmem deleted file mode 160000 index 6414ab88..00000000 --- a/lib/rain.solmem +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6414ab88a017eacf2b263e9e08d0787fbd677192 diff --git a/src/concrete/Flow.sol b/src/concrete/Flow.sol index 476e1aaf..3ee6abc5 100644 --- a/src/concrete/Flow.sol +++ b/src/concrete/Flow.sol @@ -5,20 +5,21 @@ pragma solidity =0.8.25; import {LibUint256Array} from "rain.solmem/lib/LibUint256Array.sol"; import {Pointer} from "rain.solmem/lib/LibPointer.sol"; import { - IInterpreterCallerV2, + IInterpreterCallerV4, SignedContextV1, - EvaluableConfigV3 -} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; -import {LibEncodedDispatch} from "rain.interpreter.interface/lib/caller/LibEncodedDispatch.sol"; + EvaluableV4 +} from "rain.interpreter.interface/interface/IInterpreterCallerV4.sol"; import {LibContext} from "rain.interpreter.interface/lib/caller/LibContext.sol"; -import {UnregisteredFlow} from "../interface/IFlowV5.sol"; -import {LibEvaluable, EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {UnregisteredFlow} from "../interface/IFlowV6.sol"; +import {LibEvaluable} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import { + IInterpreterV4, + EvalV4, + StackItem, SourceIndexV2, - IInterpreterV2, - IInterpreterStoreV2, DEFAULT_STATE_NAMESPACE -} from "rain.interpreter.interface/interface/IInterpreterV2.sol"; +} from "rain.interpreter.interface/interface/IInterpreterV4.sol"; +import {IInterpreterStoreV3} from "rain.interpreter.interface/interface/IInterpreterStoreV3.sol"; import { MulticallUpgradeable as Multicall } from "openzeppelin-contracts-upgradeable/contracts/utils/MulticallUpgradeable.sol"; @@ -31,10 +32,10 @@ import { import { ReentrancyGuardUpgradeable as ReentrancyGuard } from "openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol"; -import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol"; +import {LibBytes32Matrix} from "rain.solmem/lib/LibBytes32Matrix.sol"; import {LibNamespace, StateNamespace} from "rain.interpreter.interface/lib/ns/LibNamespace.sol"; -import {UnsupportedFlowInputs, InsufficientFlowOutputs, EmptyFlowConfig} from "../error/ErrFlow.sol"; -import {IFlowV5, MIN_FLOW_SENTINELS, FlowTransferV1} from "../interface/IFlowV5.sol"; +import {EmptyFlowConfig} from "../error/ErrFlow.sol"; +import {IFlowV6, MIN_FLOW_SENTINELS, FlowTransferV1} from "../interface/IFlowV6.sol"; import {ICloneableV2, ICLONEABLE_V2_SUCCESS} from "rain.factory/src/interface/ICloneableV2.sol"; import {LibFlow} from "../lib/LibFlow.sol"; @@ -88,10 +89,10 @@ uint256 constant FLOW_IS_NOT_REGISTERED = 0; /// This is a known issue with `Multicall` so in the future, we may refactor /// `Flow` to not use `Multicall` and instead implement flow batching /// directly in the flow contracts. -contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInterpreterCallerV2, ICloneableV2, IFlowV5 { +contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInterpreterCallerV4, ICloneableV2, IFlowV6 { using LibUint256Array for uint256[]; - using LibUint256Matrix for uint256[]; - using LibEvaluable for EvaluableV2; + using LibBytes32Matrix for bytes32[]; + using LibEvaluable for EvaluableV4; using LibNamespace for StateNamespace; /// @dev This mapping tracks all flows that are registered at initialization. @@ -107,7 +108,7 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter /// @param evaluable The evaluable of the flow that was registered. The hash /// of this evaluable is used as the key in `registeredFlows` so users MUST /// provide the same evaluable when they evaluate the flow. - event FlowInitialized(address sender, EvaluableV2 evaluable); + event FlowInitialized(address sender, EvaluableV4 evaluable); /// Forwards config to `DeployerDiscoverableMetaV2` and disables /// initializers. The initializers are disabled because inheriting contracts @@ -122,13 +123,13 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter /// Overloaded typed initialize function MUST revert with this error. /// As per `ICloneableV2` interface. - function initialize(EvaluableConfigV3[] memory) external pure { + function initialize(EvaluableV4[] memory) external pure { revert InitializeSignatureFn(); } /// @inheritdoc ICloneableV2 function initialize(bytes calldata data) external initializer returns (bytes32) { - EvaluableConfigV3[] memory flowConfig = abi.decode(data, (EvaluableConfigV3[])); + EvaluableV4[] memory flowConfig = abi.decode(data, (EvaluableV4[])); emit Initialize(msg.sender, flowConfig); flowInit(flowConfig, MIN_FLOW_SENTINELS); @@ -136,18 +137,22 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter } /// @inheritdoc IFlowV5 - function stackToFlow(uint256[] memory stack) external pure virtual override returns (FlowTransferV1 memory) { - return LibFlow.stackToFlow(stack.dataPointer(), stack.endPointer()); + function stackToFlow(StackItem[] memory stack) external pure virtual override returns (FlowTransferV1 memory) { + uint256[] memory stackU; + assembly ("memory-safe") { + stackU := stack + } + return LibFlow.stackToFlow(stackU.dataPointer(), stackU.endPointer()); } /// @inheritdoc IFlowV5 - function flow(EvaluableV2 memory evaluable, uint256[] memory callerContext, SignedContextV1[] memory signedContexts) + function flow(EvaluableV4 memory evaluable, bytes32[] memory callerContext, SignedContextV1[] memory signedContexts) external virtual nonReentrant returns (FlowTransferV1 memory) { - (Pointer stackBottom, Pointer stackTop, uint256[] memory kvs) = + (Pointer stackBottom, Pointer stackTop, bytes32[] memory kvs) = _flowStack(evaluable, callerContext, signedContexts); FlowTransferV1 memory flowTransfer = LibFlow.stackToFlow(stackBottom, stackTop); LibFlow.flow(flowTransfer, evaluable.store, kvs); @@ -161,7 +166,7 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter /// movements at runtime for the inheriting contract. /// @param flowMinOutputs The minimum number of outputs for each flow. All /// flows share the same minimum number of outputs for simplicity. - function flowInit(EvaluableConfigV3[] memory evaluableConfigs, uint256 flowMinOutputs) internal onlyInitializing { + function flowInit(EvaluableV4[] memory evaluables, uint256 flowMinOutputs) internal onlyInitializing { unchecked { // First dispatch all the Open Zeppelin initializers. __ERC721Holder_init(); @@ -172,7 +177,7 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter // Reject empty configs at init time — an empty config would // produce a permanently inert clone where every `flow()` call // reverts with `UnregisteredFlow`. - if (evaluableConfigs.length == 0) { + if (evaluables.length == 0) { revert EmptyFlowConfig(); } @@ -183,39 +188,14 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter revert BadMinStackLength(flowMinOutputs); } - EvaluableConfigV3 memory config; - EvaluableV2 memory evaluable; - // Every evaluable MUST deploy cleanly (e.g. pass integrity checks) - // otherwise the entire initialization will fail. - for (uint256 i = 0; i < evaluableConfigs.length; ++i) { - config = evaluableConfigs[i]; - // Well behaved deployers SHOULD NOT be reentrant into the flow - // contract. It is up to the EOA that is initializing this - // flow contract to select a deployer that is trustworthy. - // Reentrancy is just one of many ways that a malicious deployer - // can cause problems, and it's probably the least of your - // worries if you're using a malicious deployer. - //slither-disable-next-line calls-loop - (IInterpreterV2 interpreter, IInterpreterStoreV2 store, address expression, bytes memory io) = - config.deployer.deployExpression2(config.bytecode, config.constants); - - { - uint256 flowInputs; - uint256 flowOutputs; - assembly ("memory-safe") { - let ioWord := mload(add(io, 0x20)) - flowInputs := byte(0, ioWord) - flowOutputs := byte(1, ioWord) - } - if (flowInputs != 0) { - revert UnsupportedFlowInputs(); - } - if (flowOutputs < flowMinOutputs) { - revert InsufficientFlowOutputs(); - } - } - - evaluable = EvaluableV2(interpreter, store, expression); + EvaluableV4 memory evaluable; + // In V4 the caller provides already-compiled evaluables + // (interpreter, store, bytecode) directly; there is no deploy-time + // integrity check. Flow validity is enforced at eval time by + // sentinel consumption against MIN_FLOW_SENTINELS, matching the + // upstream RaindexV6 caller model. + for (uint256 i = 0; i < evaluables.length; ++i) { + evaluable = evaluables[i]; // There's no way to set this mapping before the external // contract call because the output of the external contract // call is used to build the evaluable that we're registering. @@ -247,12 +227,12 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter /// @return The top of the stack after evaluation. /// @return The key-value pairs that were emitted during evaluation. function _flowStack( - EvaluableV2 memory evaluable, - uint256[] memory callerContext, + EvaluableV4 memory evaluable, + bytes32[] memory callerContext, SignedContextV1[] memory signedContexts - ) internal returns (Pointer, Pointer, uint256[] memory) { - uint256[][] memory context = LibContext.build(callerContext.matrixFrom(), signedContexts); - emit Context(msg.sender, context); + ) internal returns (Pointer, Pointer, bytes32[] memory) { + bytes32[][] memory context = LibContext.build(callerContext.matrixFrom(), signedContexts); + emit ContextV2(msg.sender, context); // Refuse to evaluate unregistered flows. { @@ -262,14 +242,21 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter } } - (uint256[] memory stack, uint256[] memory kvs) = evaluable.interpreter - .eval2( - evaluable.store, - DEFAULT_STATE_NAMESPACE.qualifyNamespace(address(this)), - LibEncodedDispatch.encode2(evaluable.expression, FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS), - context, - new uint256[](0) - ); - return (stack.dataPointer(), stack.endPointer(), kvs); + (StackItem[] memory stack, bytes32[] memory kvs) = evaluable.interpreter.eval4( + EvalV4({ + store: evaluable.store, + namespace: DEFAULT_STATE_NAMESPACE.qualifyNamespace(address(this)), + bytecode: evaluable.bytecode, + sourceIndex: FLOW_ENTRYPOINT, + context: context, + inputs: new StackItem[](0), + stateOverlay: new bytes32[](0) + }) + ); + uint256[] memory stackU; + assembly ("memory-safe") { + stackU := stack + } + return (stackU.dataPointer(), stackU.endPointer(), kvs); } } diff --git a/src/interface/IFlowV5.sol b/src/interface/IFlowV5.sol index 17568fbd..8921d6a1 100644 --- a/src/interface/IFlowV5.sol +++ b/src/interface/IFlowV5.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; diff --git a/src/interface/IFlowV6.sol b/src/interface/IFlowV6.sol new file mode 100644 index 00000000..1f8ae68d --- /dev/null +++ b/src/interface/IFlowV6.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {SignedContextV1, EvaluableV4} from "rain.interpreter.interface/interface/IInterpreterCallerV4.sol"; +import {StackItem} from "rain.interpreter.interface/interface/IInterpreterV4.sol"; +//forge-lint: disable-next-line(unused-import) +import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; +//forge-lint: disable-next-line(unused-import) +import {Pointer} from "rain.solmem/lib/LibPointer.sol"; +import { + FlowTransferV1, + //forge-lint: disable-next-line(unused-import) + ERC20Transfer, + //forge-lint: disable-next-line(unused-import) + ERC721Transfer, + //forge-lint: disable-next-line(unused-import) + ERC1155Transfer, + //forge-lint: disable-next-line(unused-import) + RAIN_FLOW_SENTINEL, + //forge-lint: disable-next-line(unused-import) + MIN_FLOW_SENTINELS +} from "./deprecated/v4/IFlowV4.sol"; +//forge-lint: disable-next-line(unused-import) +import {UnregisteredFlow} from "../error/ErrFlow.sol"; + +/// @title IFlowV6 +/// @notice V4-interpreter flow: evaluables carry bytecode directly (no expression +/// deployment), context + stack are bytes32-based. +interface IFlowV6 { + function stackToFlow(StackItem[] memory stack) external pure returns (FlowTransferV1 memory flowTransfer); + function flow( + EvaluableV4 calldata evaluable, + bytes32[] calldata callerContext, + SignedContextV1[] calldata signedContexts + ) external returns (FlowTransferV1 memory flowTransfer); +} diff --git a/src/interface/deprecated/v1/IFlowERC1155V1.sol b/src/interface/deprecated/v1/IFlowERC1155V1.sol index 57d6f10a..b190cc40 100644 --- a/src/interface/deprecated/v1/IFlowERC1155V1.sol +++ b/src/interface/deprecated/v1/IFlowERC1155V1.sol @@ -6,7 +6,7 @@ import { EvaluableConfig, Evaluable, SignedContext -} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {FlowTransfer} from "./IFlowV1.sol"; diff --git a/src/interface/deprecated/v1/IFlowERC20V1.sol b/src/interface/deprecated/v1/IFlowERC20V1.sol index 4e5818a3..772fb77b 100644 --- a/src/interface/deprecated/v1/IFlowERC20V1.sol +++ b/src/interface/deprecated/v1/IFlowERC20V1.sol @@ -6,7 +6,7 @@ import { EvaluableConfig, Evaluable, SignedContext -} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {FlowTransfer} from "./IFlowV1.sol"; diff --git a/src/interface/deprecated/v1/IFlowERC721V1.sol b/src/interface/deprecated/v1/IFlowERC721V1.sol index dbf07e88..00ca3197 100644 --- a/src/interface/deprecated/v1/IFlowERC721V1.sol +++ b/src/interface/deprecated/v1/IFlowERC721V1.sol @@ -6,7 +6,7 @@ import { EvaluableConfig, Evaluable, SignedContext -} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {FlowTransfer} from "./IFlowV1.sol"; /// Thrown when burner of tokens is not the owner of tokens. diff --git a/src/interface/deprecated/v1/IFlowV1.sol b/src/interface/deprecated/v1/IFlowV1.sol index 52fba302..492796a1 100644 --- a/src/interface/deprecated/v1/IFlowV1.sol +++ b/src/interface/deprecated/v1/IFlowV1.sol @@ -6,7 +6,7 @@ import { EvaluableConfig, Evaluable, SignedContext -} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; /// Thrown for unsupported native transfers. error UnsupportedNativeFlow(); diff --git a/src/interface/deprecated/v2/IFlowERC1155V2.sol b/src/interface/deprecated/v2/IFlowERC1155V2.sol index 96efd41e..019f7432 100644 --- a/src/interface/deprecated/v2/IFlowERC1155V2.sol +++ b/src/interface/deprecated/v2/IFlowERC1155V2.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableConfig, FlowTransfer, Evaluable} from "./IFlowV2.sol"; diff --git a/src/interface/deprecated/v2/IFlowERC20V2.sol b/src/interface/deprecated/v2/IFlowERC20V2.sol index 2ac55fc5..b7f2b806 100644 --- a/src/interface/deprecated/v2/IFlowERC20V2.sol +++ b/src/interface/deprecated/v2/IFlowERC20V2.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {FlowTransfer, EvaluableConfig, Evaluable} from "./IFlowV2.sol"; diff --git a/src/interface/deprecated/v2/IFlowERC721V2.sol b/src/interface/deprecated/v2/IFlowERC721V2.sol index 4a7f274a..43296b2b 100644 --- a/src/interface/deprecated/v2/IFlowERC721V2.sol +++ b/src/interface/deprecated/v2/IFlowERC721V2.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableConfig, FlowTransfer, Evaluable} from "./IFlowV2.sol"; /// Constructor config. diff --git a/src/interface/deprecated/v2/IFlowV2.sol b/src/interface/deprecated/v2/IFlowV2.sol index 73482a6c..2dd28398 100644 --- a/src/interface/deprecated/v2/IFlowV2.sol +++ b/src/interface/deprecated/v2/IFlowV2.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {Evaluable, EvaluableConfig} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {Evaluable, EvaluableConfig} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {UnsupportedNativeFlow} from "../v1/IFlowV1.sol"; diff --git a/src/interface/deprecated/v3/IFlowERC1155V3.sol b/src/interface/deprecated/v3/IFlowERC1155V3.sol index b5c88941..318bb6f4 100644 --- a/src/interface/deprecated/v3/IFlowERC1155V3.sol +++ b/src/interface/deprecated/v3/IFlowERC1155V3.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import { SourceIndex, diff --git a/src/interface/deprecated/v3/IFlowERC20V3.sol b/src/interface/deprecated/v3/IFlowERC20V3.sol index aa046b97..0d62e9b3 100644 --- a/src/interface/deprecated/v3/IFlowERC20V3.sol +++ b/src/interface/deprecated/v3/IFlowERC20V3.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SourceIndex} from "rain.interpreter.interface/interface/deprecated/IInterpreterV1.sol"; -import {EvaluableConfig, Evaluable} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SourceIndex} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV1.sol"; +import {EvaluableConfig, Evaluable} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import {MIN_FLOW_SENTINELS, SENTINEL_HIGH_BITS, FlowTransferV1} from "./IFlowV3.sol"; import {UnsupportedHandleTransferInputs, InsufficientHandleTransferOutputs} from "./IFlowERC1155V3.sol"; diff --git a/src/interface/deprecated/v3/IFlowERC721V3.sol b/src/interface/deprecated/v3/IFlowERC721V3.sol index a8dcfbea..83d25f0a 100644 --- a/src/interface/deprecated/v3/IFlowERC721V3.sol +++ b/src/interface/deprecated/v3/IFlowERC721V3.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import { SourceIndex, diff --git a/src/interface/deprecated/v3/IFlowV3.sol b/src/interface/deprecated/v3/IFlowV3.sol index 24b3b6ed..5207e656 100644 --- a/src/interface/deprecated/v3/IFlowV3.sol +++ b/src/interface/deprecated/v3/IFlowV3.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.25; //forge-lint: disable-next-line(unused-import) -import {SourceIndex} from "rain.interpreter.interface/interface/deprecated/IInterpreterV1.sol"; -import {Evaluable, EvaluableConfig} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SourceIndex} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV1.sol"; +import {Evaluable, EvaluableConfig} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; /// @dev The number of sentinels required by `FlowCommon`. An evaluable can never diff --git a/src/interface/deprecated/v4/IFlowERC1155V4.sol b/src/interface/deprecated/v4/IFlowERC1155V4.sol index f60b72b5..1bdb2807 100644 --- a/src/interface/deprecated/v4/IFlowERC1155V4.sol +++ b/src/interface/deprecated/v4/IFlowERC1155V4.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; //forge-lint: disable-next-line(unused-import) diff --git a/src/interface/deprecated/v4/IFlowERC20V4.sol b/src/interface/deprecated/v4/IFlowERC20V4.sol index f1263e28..ceae44df 100644 --- a/src/interface/deprecated/v4/IFlowERC20V4.sol +++ b/src/interface/deprecated/v4/IFlowERC20V4.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {Evaluable, EvaluableConfigV2} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {Evaluable, EvaluableConfigV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import { diff --git a/src/interface/deprecated/v4/IFlowERC721V4.sol b/src/interface/deprecated/v4/IFlowERC721V4.sol index 67697986..4a2b18ac 100644 --- a/src/interface/deprecated/v4/IFlowERC721V4.sol +++ b/src/interface/deprecated/v4/IFlowERC721V4.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {Evaluable, EvaluableConfigV2} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {Evaluable, EvaluableConfigV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import { FlowERC721IOV1, diff --git a/src/interface/deprecated/v4/IFlowV4.sol b/src/interface/deprecated/v4/IFlowV4.sol index c01ca8b4..e6ec6644 100644 --- a/src/interface/deprecated/v4/IFlowV4.sol +++ b/src/interface/deprecated/v4/IFlowV4.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/IInterpreterCallerV1.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; //forge-lint: disable-next-line(unused-import) diff --git a/src/interface/deprecated/v5/IFlowERC1155V5.sol b/src/interface/deprecated/v5/IFlowERC1155V5.sol index b95735c4..1df0d81d 100644 --- a/src/interface/deprecated/v5/IFlowERC1155V5.sol +++ b/src/interface/deprecated/v5/IFlowERC1155V5.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SourceIndexV2} from "rain.interpreter.interface/interface/IInterpreterV2.sol"; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; +import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; diff --git a/src/interface/deprecated/v5/IFlowERC20V5.sol b/src/interface/deprecated/v5/IFlowERC20V5.sol index 172c00d4..53673112 100644 --- a/src/interface/deprecated/v5/IFlowERC20V5.sol +++ b/src/interface/deprecated/v5/IFlowERC20V5.sol @@ -2,8 +2,8 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SourceIndexV2} from "rain.interpreter.interface/interface/IInterpreterV2.sol"; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; +import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; diff --git a/src/interface/deprecated/v5/IFlowERC721V5.sol b/src/interface/deprecated/v5/IFlowERC721V5.sol index ccdafbe4..6f4293ab 100644 --- a/src/interface/deprecated/v5/IFlowERC721V5.sol +++ b/src/interface/deprecated/v5/IFlowERC721V5.sol @@ -2,9 +2,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; -import {SourceIndexV2} from "rain.interpreter.interface/interface/IInterpreterV2.sol"; +import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; import { FlowERC721IOV1, diff --git a/src/lib/LibFlow.sol b/src/lib/LibFlow.sol index 3bfe7ce9..6454ae84 100644 --- a/src/lib/LibFlow.sol +++ b/src/lib/LibFlow.sol @@ -11,11 +11,11 @@ import { RAIN_FLOW_SENTINEL, //forge-lint: disable-next-line(unused-import) - IFlowV5 -} from "../interface/IFlowV5.sol"; -import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/IInterpreterStoreV2.sol"; + IFlowV6 +} from "../interface/IFlowV6.sol"; +import {IInterpreterStoreV3} from "rain.interpreter.interface/interface/IInterpreterStoreV3.sol"; import {LibStackSentinel} from "rain.solmem/lib/LibStackSentinel.sol"; -import {DEFAULT_STATE_NAMESPACE} from "rain.interpreter.interface/interface/IInterpreterV2.sol"; +import {DEFAULT_STATE_NAMESPACE} from "rain.interpreter.interface/interface/IInterpreterV4.sol"; import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; @@ -149,7 +149,7 @@ library LibFlow { /// @param flowTransfer The `FlowTransferV1` to process. /// @param interpreterStore The `IInterpreterStoreV1` to set state on. /// @param kvs The key value pairs to set on the interpreter store. - function flow(FlowTransferV1 memory flowTransfer, IInterpreterStoreV2 interpreterStore, uint256[] memory kvs) + function flow(FlowTransferV1 memory flowTransfer, IInterpreterStoreV3 interpreterStore, bytes32[] memory kvs) internal { if (kvs.length > 0) { From 15ed47bb4c1ecaeee6ad889ce9d3f86c9957d545 Mon Sep 17 00:00:00 2001 From: David Meister Date: Sat, 6 Jun 2026 10:17:51 +0000 Subject: [PATCH 3/5] wip(flow#474): track latest OZ (5.6.1) + declare known transitive deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per 'track latest', flow targets OZ 5.6.1 (not 4.9.6) — aligns flow with the rain deps that already pull OZ5. Requires flow's own OZ import paths + code to move 4->5 (see #474). Adds rain-lib-hash/math-float/metadata/lib-typecast. Refs #474 --- foundry.toml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/foundry.toml b/foundry.toml index 245a12da..60fee52d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -23,9 +23,9 @@ remappings = [ "rain.factory/=dependencies/rain-factory-0.1.1/", "rain.interpreter.interface/=dependencies/rain-interpreter-interface-0.1.0/src/", "rain.solmem/=dependencies/rain-solmem-0.1.3/src/", - "openzeppelin-contracts-upgradeable/contracts/=dependencies/@openzeppelin-contracts-upgradeable-4.9.6/", - "openzeppelin-contracts/contracts/=dependencies/@openzeppelin-contracts-4.9.6/", - "openzeppelin/=dependencies/@openzeppelin-contracts-upgradeable-4.9.6/", + "openzeppelin-contracts-upgradeable/contracts/=dependencies/@openzeppelin-contracts-upgradeable-5.6.1/", + "openzeppelin-contracts/contracts/=dependencies/@openzeppelin-contracts-5.6.1/", + "openzeppelin/=dependencies/@openzeppelin-contracts-upgradeable-5.6.1/", ] [fuzz] @@ -34,12 +34,16 @@ seed = "0xdeadbeef" [dependencies] forge-std = "1.16.1" -"@openzeppelin-contracts" = "4.9.6" -"@openzeppelin-contracts-upgradeable" = "4.9.6" +"@openzeppelin-contracts" = "5.6.1" +"@openzeppelin-contracts-upgradeable" = "5.6.1" rain-factory = "0.1.1" rain-interpreter-interface = "0.1.0" rain-math-fixedpoint = "0.2.0" rain-solmem = "0.1.3" +rain-lib-hash = "0.1.0" +rain-math-float = "0.1.1" +rain-metadata = "0.1.0" +rain-lib-typecast = "0.1.0" [soldeer] recursive_deps = false From ada53a37872e691c3b8a7754e6b8470d962d50fc Mon Sep 17 00:00:00 2001 From: David Meister Date: Sat, 6 Jun 2026 10:47:41 +0000 Subject: [PATCH 4/5] wip(flow#474): src compiles on V4 + OZ5 + soldeer OZ 4->5 for flow: holders/ECDSA/ReentrancyGuard moved to the non-upgradeable package (stateless, no __init); MulticallUpgradeable kept; @openzeppelin/contracts bridge remap added. Clean soldeer reinstall (OZ 5.6.1 + rain-lib-hash/math-float). Old flow interface EvaluableV2 imports repointed to deprecated/v1. src/ now builds; remaining errors are all in test/ (the V4+OZ5 test rewrite). Refs #474 --- .../access/AccessControlCrossChain.sol | 45 - .../access/AccessControlEnumerable.sol | 64 - .../contracts/AccessControlCrossChain.json | 228 - .../build/contracts/Address.json | 10 - .../build/contracts/Arrays.json | 10 - .../build/contracts/Base64.json | 10 - .../build/contracts/BeaconProxy.json | 80 - .../build/contracts/BitMaps.json | 10 - .../build/contracts/Checkpoints.json | 10 - .../build/contracts/Clones.json | 10 - .../build/contracts/ConditionalEscrow.json | 165 - .../build/contracts/Counters.json | 10 - .../build/contracts/Create2.json | 10 - .../build/contracts/CrossChainEnabledAMB.json | 22 - .../CrossChainEnabledArbitrumL1.json | 10 - .../CrossChainEnabledArbitrumL2.json | 10 - .../contracts/CrossChainEnabledOptimism.json | 10 - .../CrossChainEnabledPolygonChild.json | 39 - .../build/contracts/DoubleEndedQueue.json | 21 - .../build/contracts/ECDSA.json | 10 - .../build/contracts/ERC1155.json | 334 - .../build/contracts/ERC1155Holder.json | 108 - .../contracts/ERC1155PresetMinterPauser.json | 743 --- .../build/contracts/ERC165Checker.json | 10 - .../build/contracts/ERC165Storage.json | 30 - .../build/contracts/ERC1820Implementer.json | 35 - .../build/contracts/ERC1967Proxy.json | 80 - .../build/contracts/ERC1967Upgrade.json | 56 - .../build/contracts/ERC20.json | 297 - .../build/contracts/ERC20Capped.json | 294 - .../contracts/ERC20PresetFixedSupply.json | 338 - .../contracts/ERC20PresetMinterPauser.json | 672 -- .../build/contracts/ERC721.json | 357 - .../build/contracts/ERC721Holder.json | 45 - .../ERC721PresetMinterPauserAutoId.json | 751 --- .../build/contracts/ERC777.json | 587 -- .../contracts/ERC777PresetFixedSupply.json | 597 -- .../build/contracts/EnumerableMap.json | 10 - .../build/contracts/EnumerableSet.json | 10 - .../build/contracts/Escrow.json | 146 - .../build/contracts/Governor.json | 1019 --- .../contracts/GovernorCountingSimple.json | 1048 --- .../contracts/GovernorProposalThreshold.json | 1019 --- .../build/contracts/GovernorVotes.json | 1032 --- .../build/contracts/GovernorVotesComp.json | 1032 --- .../build/contracts/IAMB.json | 336 - .../build/contracts/IArbSys.json | 364 -- .../contracts/IDelayedMessageProvider.json | 43 - .../build/contracts/IGovernor.json | 771 --- .../IGovernorCompatibilityBravo.json | 1001 --- .../build/contracts/IGovernorTimelock.json | 856 --- .../build/contracts/IInbox.json | 453 -- .../build/contracts/IOutbox.json | 419 -- .../build/contracts/Initializable.json | 24 - .../build/contracts/LibAMB.json | 10 - .../build/contracts/LibArbitrumL1.json | 10 - .../build/contracts/LibArbitrumL2.json | 24 - .../build/contracts/LibOptimism.json | 10 - .../build/contracts/Math.json | 10 - .../build/contracts/MerkleProof.json | 10 - .../build/contracts/MinimalForwarder.json | 217 - .../build/contracts/PaymentSplitter.json | 313 - .../build/contracts/ProxyAdmin.json | 160 - .../build/contracts/RefundEscrow.json | 235 - .../build/contracts/SafeCast.json | 10 - .../build/contracts/SafeERC20.json | 10 - .../build/contracts/SafeMath.json | 10 - .../build/contracts/SignatureChecker.json | 10 - .../build/contracts/SignedMath.json | 10 - .../build/contracts/SignedSafeMath.json | 10 - .../build/contracts/StorageSlot.json | 10 - .../build/contracts/Strings.json | 10 - .../build/contracts/TimelockController.json | 900 --- .../build/contracts/Timers.json | 10 - .../build/contracts/TokenTimelock.json | 78 - .../TransparentUpgradeableProxy.json | 85 - .../build/contracts/UpgradeableBeacon.json | 113 - .../build/contracts/VestingWallet.json | 234 - .../crosschain/CrossChainEnabled.sol | 54 - .../crosschain/amb/CrossChainEnabledAMB.sol | 49 - .../crosschain/amb/LibAMB.sol | 35 - .../arbitrum/CrossChainEnabledArbitrumL1.sol | 44 - .../arbitrum/CrossChainEnabledArbitrumL2.sol | 40 - .../crosschain/arbitrum/LibArbitrumL1.sol | 42 - .../crosschain/arbitrum/LibArbitrumL2.sol | 45 - .../crosschain/errors.sol | 7 - .../optimism/CrossChainEnabledOptimism.sol | 41 - .../crosschain/optimism/LibOptimism.sol | 36 - .../polygon/CrossChainEnabledPolygonChild.sol | 72 - .../finance/PaymentSplitter.sol | 214 - .../governance/Governor.sol | 723 --- .../governance/IGovernor.sol | 313 - .../GovernorCompatibilityBravo.sol | 333 - .../IGovernorCompatibilityBravo.sol | 118 - .../extensions/GovernorProposalThreshold.sol | 23 - .../extensions/GovernorVotesComp.sol | 55 - .../extensions/IGovernorTimelock.sol | 26 - .../interfaces/IERC1155.sol | 6 - .../interfaces/IERC1155MetadataURI.sol | 6 - .../interfaces/IERC1155Receiver.sol | 6 - .../interfaces/IERC1271.sol | 19 - .../interfaces/IERC1363.sol | 80 - .../interfaces/IERC1363Receiver.sol | 35 - .../interfaces/IERC1363Spender.sol | 29 - .../interfaces/IERC165.sol | 6 - .../interfaces/IERC1820Implementer.sol | 6 - .../interfaces/IERC1820Registry.sol | 6 - .../interfaces/IERC20.sol | 6 - .../interfaces/IERC20Metadata.sol | 6 - .../interfaces/IERC2612.sol | 8 - .../interfaces/IERC3156.sol | 7 - .../interfaces/IERC5805.sol | 9 - .../interfaces/IERC721.sol | 6 - .../interfaces/IERC721Enumerable.sol | 6 - .../interfaces/IERC721Metadata.sol | 6 - .../interfaces/IERC721Receiver.sol | 6 - .../interfaces/IERC777.sol | 6 - .../interfaces/IERC777Recipient.sol | 6 - .../interfaces/IERC777Sender.sol | 6 - .../interfaces/draft-IERC2612.sol | 8 - .../metatx/ERC2771Context.sol | 54 - .../metatx/MinimalForwarder.sol | 72 - .../package.json | 32 - .../proxy/Clones.sol | 88 - .../proxy/ERC1967/ERC1967Proxy.sol | 32 - .../proxy/ERC1967/ERC1967Upgrade.sol | 157 - .../proxy/beacon/BeaconProxy.sol | 61 - .../proxy/transparent/ProxyAdmin.sol | 81 - .../TransparentUpgradeableProxy.sol | 191 - .../proxy/utils/Initializable.sol | 166 - .../proxy/utils/UUPSUpgradeable.sol | 99 - .../security/PullPayment.sol | 74 - .../token/ERC1155/ERC1155.sol | 497 -- .../ERC1155/extensions/ERC1155Supply.sol | 64 - .../presets/ERC1155PresetMinterPauser.sol | 114 - .../token/ERC1155/utils/ERC1155Receiver.sol | 19 - .../token/ERC20/ERC20.sol | 365 -- .../token/ERC20/extensions/ERC20Burnable.sol | 39 - .../token/ERC20/extensions/ERC20Capped.sol | 37 - .../token/ERC20/extensions/ERC20Permit.sol | 95 - .../token/ERC20/extensions/ERC20Snapshot.sol | 191 - .../token/ERC20/extensions/ERC20Votes.sol | 290 - .../token/ERC20/extensions/ERC20VotesComp.sol | 46 - .../token/ERC20/extensions/ERC20Wrapper.sol | 73 - .../token/ERC20/extensions/ERC4626.sol | 256 - .../ERC20/extensions/draft-ERC20Permit.sol | 8 - .../ERC20/extensions/draft-IERC20Permit.sol | 8 - .../ERC20/presets/ERC20PresetFixedSupply.sol | 30 - .../ERC20/presets/ERC20PresetMinterPauser.sol | 94 - .../token/ERC20/utils/SafeERC20.sol | 143 - .../token/ERC20/utils/TokenTimelock.sol | 72 - .../token/ERC721/ERC721.sol | 466 -- .../ERC721/extensions/ERC721Burnable.sol | 26 - .../ERC721/extensions/ERC721Consecutive.sol | 148 - .../token/ERC721/extensions/ERC721Royalty.sol | 38 - .../ERC721/extensions/ERC721URIStorage.sol | 74 - .../token/ERC721/extensions/ERC721Votes.sol | 43 - .../ERC721/extensions/draft-ERC721Votes.sol | 9 - .../ERC721PresetMinterPauserAutoId.sol | 132 - .../token/ERC777/ERC777.sol | 514 -- .../presets/ERC777PresetFixedSupply.sol | 30 - .../utils/Address.sol | 244 - .../utils/Arrays.sol | 105 - .../utils/Base64.sol | 101 - .../utils/Checkpoints.sol | 560 -- .../utils/Counters.sol | 43 - .../utils/Strings.sol | 85 - .../utils/Timers.sol | 75 - .../utils/cryptography/ECDSA.sol | 217 - .../utils/cryptography/MerkleProof.sol | 227 - .../utils/cryptography/SignatureChecker.sol | 50 - .../utils/cryptography/draft-EIP712.sol | 8 - .../utils/escrow/ConditionalEscrow.sol | 25 - .../utils/escrow/Escrow.sol | 67 - .../utils/escrow/RefundEscrow.sol | 100 - .../utils/introspection/ERC165Storage.sol | 42 - .../introspection/ERC1820Implementer.sol | 43 - .../utils/math/Math.sol | 339 - .../utils/math/SafeMath.sol | 215 - .../utils/math/SignedMath.sol | 43 - .../utils/math/SignedSafeMath.sol | 68 - .../utils/structs/DoubleEndedQueue.sol | 170 - .../utils/structs/EnumerableMap.sol | 598 -- .../utils/structs/EnumerableSet.sol | 378 -- .../vendor/amb/IAMB.sol | 41 - .../vendor/arbitrum/IArbSys.sol | 134 - .../vendor/arbitrum/IBridge.sol | 102 - .../arbitrum/IDelayedMessageProvider.sol | 16 - .../vendor/arbitrum/IInbox.sol | 152 - .../vendor/arbitrum/IOutbox.sol | 117 - .../vendor/optimism/ICrossDomainMessenger.sol | 34 - .../vendor/polygon/IFxMessageProcessor.sol | 7 - .../README.md | 52 +- .../access/AccessControl.sol | 115 +- .../access/IAccessControl.sol | 30 +- .../access/Ownable.sol | 37 +- .../access/Ownable2Step.sol | 20 +- .../AccessControlDefaultAdminRules.sol | 121 +- .../extensions/AccessControlEnumerable.sol | 81 + .../IAccessControlDefaultAdminRules.sol | 42 +- .../extensions}/IAccessControlEnumerable.sol | 8 +- .../access/manager/AccessManaged.sol | 112 + .../access/manager/AccessManager.sol | 741 +++ .../access/manager/AuthorityUtils.sol | 36 + .../access/manager/IAccessManaged.sol | 32 + .../access/manager/IAccessManager.sol | 403 ++ .../access/manager/IAuthority.sol | 14 + .../account/Account.sol | 151 + .../extensions/draft-AccountERC7579.sol | 420 ++ .../extensions/draft-AccountERC7579Hooked.sol | 107 + .../account/extensions/draft-ERC7821.sol | 70 + .../account/utils/EIP7702Utils.sol | 21 + .../account/utils/draft-ERC4337Utils.sol | 279 + .../account/utils/draft-ERC7579Utils.sol | 280 + .../build/contracts/AbstractSigner.json} | 4 +- .../build/contracts/AccessControl.json | 23 +- .../AccessControlDefaultAdminRules.json | 66 +- .../contracts/AccessControlEnumerable.json | 44 +- .../build/contracts/AccessManaged.json} | 73 +- .../build/contracts/AccessManager.json | 1175 ++++ .../build/contracts/Account.json | 147 + .../build/contracts/AccountERC7579.json | 512 ++ .../build/contracts/AccountERC7579Hooked.json | 536 ++ .../build/contracts/Accumulators.json | 10 + .../build/contracts/Address.json | 22 + .../build/contracts/Arrays.json | 10 + .../build/contracts/AuthorityUtils.json | 10 + .../build/contracts/Base58.json | 22 + .../build/contracts/Base64.json | 22 + .../build/contracts/BeaconProxy.json | 87 + .../build/contracts/BitMaps.json | 10 + .../build/contracts/Blockhash.json | 10 + .../build/contracts/BridgeERC20.json} | 257 +- .../build/contracts/BridgeERC7802.json} | 240 +- .../build/contracts/BridgeFungible.json | 228 + .../build/contracts/Bytes.json | 10 + .../build/contracts/CAIP10.json | 10 + .../build/contracts/CAIP2.json | 10 + .../build/contracts/Calldata.json | 10 + .../build/contracts/Checkpoints.json | 16 + .../build/contracts/CircularBuffer.json | 16 + .../build/contracts/Clones.json | 16 + .../build/contracts/Comparators.json | 10 + .../build/contracts/Context.json | 0 .../build/contracts/Create2.json | 16 + .../build/contracts/CrosschainLinked.json | 142 + .../build/contracts/DoubleEndedQueue.json | 10 + .../build/contracts/ECDSA.json | 38 + .../build/contracts/EIP712.json | 0 .../build/contracts/EIP7702Utils.json | 10 + .../build/contracts/ERC1155.json} | 161 +- .../build/contracts/ERC1155Burnable.json | 106 +- .../build/contracts/ERC1155Holder.json} | 24 +- .../build/contracts/ERC1155Pausable.json | 116 +- .../build/contracts/ERC1155Supply.json | 119 +- .../build/contracts/ERC1155URIStorage.json | 106 +- .../build/contracts/ERC1155Utils.json | 10 + .../build/contracts/ERC1363.json | 582 ++ .../build/contracts/ERC1363Utils.json | 33 + .../build/contracts/ERC165.json | 0 .../build/contracts/ERC165Checker.json | 10 + .../build/contracts/ERC1967Proxy.json | 81 + .../build/contracts/ERC1967Utils.json | 49 + .../build/contracts/ERC20.json} | 170 +- .../build/contracts/ERC20Bridgeable.json} | 296 +- .../build/contracts/ERC20Burnable.json | 144 +- .../build/contracts/ERC20Capped.json} | 215 +- .../build/contracts/ERC20Crosschain.json} | 531 +- .../build/contracts/ERC20FlashMint.json | 177 +- .../build/contracts/ERC20Pausable.json | 150 +- .../build/contracts/ERC20Permit.json | 210 +- .../contracts/ERC20TemporaryApproval.json} | 200 +- .../build/contracts/ERC20Votes.json | 326 +- .../build/contracts/ERC20Wrapper.json | 166 +- .../build/contracts/ERC2771Context.json | 13 + .../build/contracts/ERC2771Forwarder.json | 388 ++ .../build/contracts/ERC2981.json | 123 + .../build/contracts/ERC4337Utils.json | 10 + .../build/contracts/ERC4626.json | 235 +- .../build/contracts/ERC6909.json | 412 ++ .../build/contracts/ERC6909ContentURI.json | 469 ++ .../build/contracts/ERC6909Metadata.json | 526 ++ .../build/contracts/ERC6909TokenSupply.json | 431 ++ .../build/contracts/ERC721.json} | 149 +- .../build/contracts/ERC721Burnable.json | 103 + .../build/contracts/ERC721Consecutive.json | 134 + .../build/contracts/ERC721Enumerable.json | 124 + .../build/contracts/ERC721Holder.json} | 12 +- .../build/contracts/ERC721Pausable.json | 113 + .../build/contracts/ERC721Royalty.json | 171 +- .../build/contracts/ERC721URIStorage.json | 103 + .../build/contracts/ERC721Utils.json | 10 + .../build/contracts/ERC721Votes.json | 216 +- .../build/contracts/ERC721Wrapper.json | 114 + .../build/contracts/ERC7579Utils.json | 116 + .../build/contracts/ERC7739.json} | 44 +- .../build/contracts/ERC7739Utils.json | 10 + .../build/contracts/ERC7786Recipient.json | 56 + .../build/contracts/ERC7821.json | 109 + .../build/contracts/ERC7913P256Verifier.json | 40 + .../build/contracts/ERC7913RSAVerifier.json | 40 + .../contracts/ERC7913WebAuthnVerifier.json | 40 + .../build/contracts/EnumerableMap.json | 33 + .../build/contracts/EnumerableSet.json | 10 + .../build/contracts/Errors.json | 48 + .../build/contracts/Governor.json} | 514 +- .../contracts/GovernorCountingFractional.json | 1446 +++++ .../GovernorCountingOverridable.json | 1598 +++++ .../contracts/GovernorCountingSimple.json | 1401 ++++ .../build/contracts/GovernorNoncesKeyed.json | 1396 ++++ .../contracts/GovernorPreventLateQuorum.json | 411 +- .../contracts/GovernorProposalGuardian.json | 1417 ++++ .../GovernorSequentialProposalId.json | 1390 ++++ .../build/contracts/GovernorSettings.json | 411 +- .../build/contracts/GovernorStorage.json | 1497 +++++ .../build/contracts/GovernorSuperQuorum.json | 1420 ++++ .../contracts/GovernorTimelockAccess.json | 1573 +++++ .../contracts/GovernorTimelockCompound.json | 349 +- .../contracts/GovernorTimelockControl.json | 333 +- .../build/contracts/GovernorVotes.json} | 424 +- .../GovernorVotesQuorumFraction.json | 1483 +++++ .../GovernorVotesSuperQuorumFraction.json | 1643 +++++ .../build/contracts/Hashes.json | 10 + .../build/contracts/Heap.json | 10 + .../build/contracts/IAccessControl.json | 23 +- .../IAccessControlDefaultAdminRules.json | 52 +- .../contracts/IAccessControlEnumerable.json | 25 +- .../build/contracts/IAccessManaged.json | 101 + .../build/contracts/IAccessManager.json | 1071 +++ .../build/contracts/IAccount.json | 87 + .../build/contracts/IAccountExecute.json | 76 + .../build/contracts/IAggregator.json | 208 + .../build/contracts/IAuthority.json} | 29 +- .../build/contracts/IBeacon.json | 0 .../build/contracts/ICompoundTimelock.json | 0 .../build/contracts/IERC1155.json | 4 +- .../build/contracts/IERC1155Errors.json | 113 + .../build/contracts/IERC1155MetadataURI.json | 4 +- .../build/contracts/IERC1155Receiver.json | 0 .../build/contracts/IERC1271.json | 0 .../build/contracts/IERC1363.json | 18 +- .../build/contracts/IERC1363Receiver.json | 2 +- .../build/contracts/IERC1363Spender.json | 2 +- .../build/contracts/IERC165.json | 0 .../build/contracts/IERC1820Implementer.json | 2 +- .../build/contracts/IERC1820Registry.json | 2 +- .../build/contracts/IERC1822Proxiable.json | 0 .../build/contracts/IERC1967.json | 0 .../build/contracts/IERC20.json | 6 +- .../build/contracts/IERC20Errors.json} | 81 +- .../build/contracts/IERC20Metadata.json | 6 +- .../build/contracts/IERC20Permit.json | 0 .../build/contracts/IERC2309.json | 0 .../build/contracts/IERC2612.json | 0 .../build/contracts/IERC2981.json | 0 .../contracts/IERC3156FlashBorrower.json | 0 .../build/contracts/IERC3156FlashLender.json | 0 .../build/contracts/IERC4626.json | 6 +- .../build/contracts/IERC4906.json | 0 .../build/contracts/IERC5267.json | 0 .../build/contracts/IERC5313.json | 0 .../build/contracts/IERC5805.json | 15 +- .../build/contracts/IERC6372.json | 0 .../build/contracts/IERC6909.json | 316 + .../build/contracts/IERC6909ContentURI.json} | 214 +- .../build/contracts/IERC6909Metadata.json} | 192 +- .../build/contracts/IERC6909TokenSupply.json} | 233 +- .../build/contracts/IERC721.json | 0 .../build/contracts/IERC721Enumerable.json | 0 .../build/contracts/IERC721Errors.json | 114 + .../build/contracts/IERC721Metadata.json | 0 .../build/contracts/IERC721Receiver.json | 0 .../contracts/IERC7579AccountConfig.json} | 47 +- .../build/contracts/IERC7579Execution.json | 53 + .../build/contracts/IERC7579Hook.json} | 108 +- .../build/contracts/IERC7579Module.json | 56 + .../contracts/IERC7579ModuleConfig.json} | 112 +- .../build/contracts/IERC7579Validator.json | 156 + .../build/contracts/IERC7674.json} | 34 +- .../build/contracts/IERC7751.json | 37 + .../build/contracts/IERC777.json | 2 +- .../build/contracts/IERC777Recipient.json | 2 +- .../build/contracts/IERC777Sender.json | 2 +- .../contracts/IERC7786GatewaySource.json} | 91 +- .../build/contracts/IERC7786Recipient.json} | 22 +- .../build/contracts/IERC7802.json} | 101 +- .../build/contracts/IERC7821.json | 48 + .../contracts/IERC7913SignatureVerifier.json} | 13 +- .../build/contracts/IEntryPoint.json | 302 + .../build/contracts/IEntryPointExtra.json | 77 + .../build/contracts/IEntryPointNonces.json} | 29 +- .../build/contracts/IEntryPointStake.json | 94 + .../build/contracts/IGovernor.json} | 444 +- .../build/contracts/IPaymaster.json | 120 + .../ITransparentUpgradeableProxy.json} | 29 +- .../build/contracts/IVotes.json | 15 +- .../build/contracts/Initializable.json | 14 +- .../build/contracts/InteroperableAddress.json | 27 + .../build/contracts/LowLevelCall.json | 10 + .../build/contracts/Math.json | 10 + .../build/contracts/Memory.json | 10 + .../build/contracts/MerkleProof.json | 16 + .../build/contracts/MerkleTree.json | 32 + .../build/contracts/MessageHashUtils.json | 16 + .../build/contracts/MultiSignerERC7913.json | 173 + .../contracts/MultiSignerERC7913Weighted.json | 261 + .../build/contracts/Multicall.json | 16 + .../build/contracts/Nonces.json} | 33 +- .../build/contracts/NoncesKeyed.json} | 56 +- .../build/contracts/Ownable.json | 22 + .../build/contracts/Ownable2Step.json | 22 + .../build/contracts/P256.json | 10 + .../build/contracts/Packing.json | 16 + .../build/contracts/Panic.json | 10 + .../build/contracts/Pausable.json | 12 +- .../build/contracts/Proxy.json | 4 - .../build/contracts/ProxyAdmin.json | 132 + .../build/contracts/RLP.json | 16 + .../build/contracts/RSA.json | 10 + .../build/contracts/ReentrancyGuard.json | 16 + .../contracts/ReentrancyGuardTransient.json | 16 + .../build/contracts/RelayedCall.json | 10 + .../build/contracts/SafeCast.json | 65 + .../build/contracts/SafeERC20.json | 43 + .../build/contracts/ShortStrings.json | 4 +- .../build/contracts/SignatureChecker.json | 10 + .../build/contracts/SignedMath.json | 10 + .../build/contracts/SignerECDSA.json} | 6 +- .../build/contracts/SignerEIP7702.json} | 4 +- .../build/contracts/SignerERC7913.json} | 10 +- .../build/contracts/SignerP256.json} | 26 +- .../build/contracts/SignerRSA.json | 29 + .../build/contracts/SignerWebAuthn.json | 45 + .../build/contracts/SlotDerivation.json | 10 + .../build/contracts/StorageSlot.json | 10 + .../build/contracts/Strings.json | 37 + .../build/contracts/Time.json | 10 + .../build/contracts/TimelockController.json | 1007 +++ .../build/contracts/TransientSlot.json | 10 + .../TransparentUpgradeableProxy.json | 121 + .../build/contracts/TrieProof.json | 22 + .../build/contracts/UUPSUpgradeable.json | 69 +- .../build/contracts/UpgradeableBeacon.json | 151 + .../build/contracts/VestingWallet.json | 340 + .../build/contracts/VestingWalletCliff.json | 364 ++ .../build/contracts/Votes.json | 113 +- .../build/contracts/VotesExtended.json} | 419 +- .../build/contracts/WebAuthn.json | 10 + .../crosschain/CrosschainLinked.sol | 109 + .../crosschain/ERC7786Recipient.sol | 66 + .../crosschain/bridges/BridgeERC20.sol | 37 + .../crosschain/bridges/BridgeERC7802.sol | 34 + .../bridges/abstract/BridgeFungible.sol | 80 + .../finance/VestingWallet.sol | 73 +- .../finance/VestingWalletCliff.sol | 54 + .../governance/Governor.sol | 819 +++ .../governance/IGovernor.sol | 454 ++ .../governance/TimelockController.sol | 220 +- .../extensions/GovernorCountingFractional.sol | 190 + .../GovernorCountingOverridable.sol | 222 + .../extensions/GovernorCountingSimple.sol | 42 +- .../extensions/GovernorNoncesKeyed.sol | 91 + .../extensions/GovernorPreventLateQuorum.sol | 47 +- .../extensions/GovernorProposalGuardian.sol | 59 + .../GovernorSequentialProposalId.sol | 75 + .../extensions/GovernorSettings.sol | 42 +- .../governance/extensions/GovernorStorage.sol | 134 + .../extensions/GovernorSuperQuorum.sol | 59 + .../extensions/GovernorTimelockAccess.sol | 346 + .../extensions/GovernorTimelockCompound.sol | 117 +- .../extensions/GovernorTimelockControl.sol | 117 +- .../governance/extensions/GovernorVotes.sol | 40 +- .../GovernorVotesQuorumFraction.sol | 78 +- .../GovernorVotesSuperQuorumFraction.sol | 135 + .../governance/utils/IVotes.sol | 16 +- .../governance/utils/Votes.sol | 163 +- .../governance/utils/VotesExtended.sol | 85 + .../interfaces/IERC1155.sol | 6 + .../interfaces/IERC1155MetadataURI.sol | 6 + .../interfaces/IERC1155Receiver.sol | 6 + .../interfaces/IERC1271.sol | 17 + .../interfaces/IERC1363.sol | 86 + .../interfaces/IERC1363Receiver.sol | 32 + .../interfaces/IERC1363Spender.sol | 26 + .../interfaces/IERC165.sol | 6 + .../interfaces}/IERC1820Implementer.sol | 8 +- .../interfaces}/IERC1820Registry.sol | 24 +- .../interfaces/IERC1967.sol | 6 +- .../interfaces/IERC20.sol | 6 + .../interfaces/IERC20Metadata.sol | 6 + .../interfaces/IERC2309.sol | 6 +- .../interfaces/IERC2612.sol | 8 + .../interfaces/IERC2981.sol | 11 +- .../interfaces/IERC3156.sol | 7 + .../interfaces/IERC3156FlashBorrower.sol | 8 +- .../interfaces/IERC3156FlashLender.sol | 12 +- .../interfaces/IERC4626.sol | 18 +- .../interfaces/IERC4906.sol | 10 +- .../interfaces/IERC5267.sol | 4 +- .../interfaces/IERC5313.sol | 6 +- .../interfaces/IERC5805.sol | 9 + .../interfaces/IERC6372.sol | 4 +- .../interfaces/IERC6909.sol | 125 + .../interfaces/IERC721.sol | 6 + .../interfaces/IERC721Enumerable.sol | 6 + .../interfaces/IERC721Metadata.sol | 6 + .../interfaces/IERC721Receiver.sol | 6 + .../interfaces/IERC7751.sol | 12 + .../interfaces}/IERC777.sol | 10 +- .../interfaces}/IERC777Recipient.sol | 10 +- .../interfaces}/IERC777Sender.sol | 10 +- .../interfaces/IERC7913.sol | 18 + .../interfaces/draft-IERC1822.sol | 6 +- .../interfaces/draft-IERC4337.sol | 255 + .../interfaces/draft-IERC6093.sol | 162 + .../interfaces/draft-IERC7579.sol | 227 + .../interfaces/draft-IERC7674.sol | 17 + .../interfaces/draft-IERC7786.sol | 64 + .../interfaces/draft-IERC7802.sol | 32 + .../interfaces/draft-IERC7821.sol | 44 + .../metatx/ERC2771Context.sol | 90 + .../metatx/ERC2771Forwarder.sol | 372 ++ .../proxy/Clones.sol | 294 + .../proxy/ERC1967/ERC1967Proxy.sol | 62 + .../proxy/ERC1967/ERC1967Utils.sol | 177 + .../proxy/Proxy.sol | 35 +- .../proxy/beacon/BeaconProxy.sol | 57 + .../proxy/beacon/IBeacon.sol | 6 +- .../proxy/beacon/UpgradeableBeacon.sol | 27 +- .../proxy/transparent/ProxyAdmin.sol | 45 + .../TransparentUpgradeableProxy.sol | 118 + .../proxy/utils/Initializable.sol | 140 +- .../proxy/utils/UUPSUpgradeable.sol | 148 + .../token/ERC1155/ERC1155.sol | 417 ++ .../token/ERC1155/IERC1155.sol | 44 +- .../token/ERC1155/IERC1155Receiver.sol | 13 +- .../ERC1155/extensions/ERC1155Burnable.sol | 22 +- .../ERC1155/extensions/ERC1155Pausable.sol | 28 +- .../ERC1155/extensions/ERC1155Supply.sol | 88 + .../ERC1155/extensions/ERC1155URIStorage.sol | 21 +- .../extensions/IERC1155MetadataURI.sol | 10 +- .../token/ERC1155/utils/ERC1155Holder.sol | 18 +- .../token/ERC1155/utils/ERC1155Utils.sol | 88 + .../token/ERC20/ERC20.sol | 305 + .../token/ERC20/IERC20.sol | 25 +- .../token/ERC20/extensions/ERC1363.sol | 135 + .../token/ERC20/extensions/ERC20Burnable.sol | 39 + .../token/ERC20/extensions/ERC20Capped.sol | 54 + .../ERC20/extensions/ERC20Crosschain.sol | 39 + .../token/ERC20/extensions/ERC20FlashMint.sol | 89 +- .../token/ERC20/extensions/ERC20Pausable.sol | 20 +- .../token/ERC20/extensions/ERC20Permit.sol | 77 + .../token/ERC20/extensions/ERC20Votes.sol | 83 + .../token/ERC20/extensions/ERC20Wrapper.sol | 89 + .../token/ERC20/extensions/ERC4626.sol | 315 + .../token/ERC20/extensions/IERC20Metadata.sol | 10 +- .../token/ERC20/extensions/IERC20Permit.sol | 12 +- .../extensions/draft-ERC20Bridgeable.sol | 51 + .../draft-ERC20TemporaryApproval.sol | 119 + .../token/ERC20/utils/ERC1363Utils.sol | 95 + .../token/ERC20/utils/SafeERC20.sol | 280 + .../token/ERC6909/ERC6909.sol | 224 + .../ERC6909/extensions/ERC6909ContentURI.sol | 59 + .../ERC6909/extensions/ERC6909Metadata.sol | 83 + .../ERC6909/extensions/ERC6909TokenSupply.sol | 41 + .../token/ERC721/ERC721.sol | 433 ++ .../token/ERC721/IERC721.sol | 23 +- .../token/ERC721/IERC721Receiver.sol | 11 +- .../ERC721/extensions/ERC721Burnable.sol | 26 + .../ERC721/extensions/ERC721Consecutive.sol | 176 + .../ERC721/extensions/ERC721Enumerable.sol | 118 +- .../ERC721/extensions/ERC721Pausable.sol | 27 +- .../token/ERC721/extensions/ERC721Royalty.sol | 26 + .../ERC721/extensions/ERC721URIStorage.sol | 62 + .../token/ERC721/extensions/ERC721Votes.sol | 47 + .../token/ERC721/extensions/ERC721Wrapper.sol | 47 +- .../ERC721/extensions/IERC721Enumerable.sol | 6 +- .../ERC721/extensions/IERC721Metadata.sol | 6 +- .../token/ERC721/utils/ERC721Holder.sol | 15 +- .../token/ERC721/utils/ERC721Utils.sol | 50 + .../token/common/ERC2981.sol | 78 +- .../utils/Address.sol | 167 + .../utils/Arrays.sol | 888 +++ .../utils/Base58.sol | 240 + .../utils/Base64.sol | 234 + .../utils/Blockhash.sol | 54 + .../utils/Bytes.sol | 332 + .../utils/CAIP10.sol | 54 + .../utils/CAIP2.sol | 51 + .../utils/Calldata.sol | 25 + .../utils/Comparators.sol | 19 + .../utils/Context.sol | 4 +- .../utils/Create2.sol | 54 +- .../utils/Errors.sol | 34 + .../utils/LowLevelCall.sol | 127 + .../utils/Memory.sol | 149 + .../utils/Multicall.sol | 16 +- .../utils/Nonces.sol | 46 + .../utils/NoncesKeyed.sol | 74 + .../utils/Packing.sol | 1656 +++++ .../utils/Panic.sol | 57 + .../utils}/Pausable.sol | 27 +- .../utils/RLP.sol | 487 ++ .../utils}/ReentrancyGuard.sol | 64 +- .../utils/ReentrancyGuardTransient.sol | 84 + .../utils/RelayedCall.sol | 137 + .../utils/ShortStrings.sol | 30 +- .../utils/SlotDerivation.sol | 155 + .../utils/StorageSlot.sol | 59 +- .../utils/Strings.sol | 532 ++ .../utils/TransientSlot.sol | 183 + .../utils/cryptography/ECDSA.sol | 284 + .../utils/cryptography/EIP712.sol | 70 +- .../utils/cryptography/Hashes.sol | 31 + .../utils/cryptography/MerkleProof.sol | 510 ++ .../utils/cryptography/MessageHashUtils.sol | 228 + .../utils/cryptography/P256.sol | 408 ++ .../utils/cryptography/RSA.sol | 154 + .../utils/cryptography/SignatureChecker.sol | 191 + .../utils/cryptography/TrieProof.sol | 255 + .../utils/cryptography/WebAuthn.sol | 269 + .../utils/cryptography/draft-ERC7739Utils.sol | 207 + .../cryptography/signers/AbstractSigner.sol | 23 + .../signers/MultiSignerERC7913.sol | 259 + .../signers/MultiSignerERC7913Weighted.sol | 208 + .../cryptography/signers/SignerECDSA.sol | 56 + .../cryptography/signers/SignerEIP7702.sol | 25 + .../cryptography/signers/SignerERC7913.sol | 63 + .../utils/cryptography/signers/SignerP256.sol | 64 + .../utils/cryptography/signers/SignerRSA.sol | 65 + .../cryptography/signers/SignerWebAuthn.sol | 46 + .../cryptography/signers/draft-ERC7739.sol | 98 + .../verifiers/ERC7913P256Verifier.sol | 29 + .../verifiers/ERC7913RSAVerifier.sol | 23 + .../verifiers/ERC7913WebAuthnVerifier.sol | 35 + .../utils/draft-InteroperableAddress.sol | 245 + .../utils/introspection/ERC165.sol | 16 +- .../utils/introspection/ERC165Checker.sol | 72 +- .../utils/introspection/IERC165.sol | 10 +- .../utils/math/Math.sol | 763 +++ .../utils/math/SafeCast.sol | 422 +- .../utils/math/SignedMath.sol | 68 + .../utils/structs/Accumulators.sol | 135 + .../utils/structs/BitMaps.sol | 17 +- .../utils/structs/Checkpoints.sol | 833 +++ .../utils/structs/CircularBuffer.sol | 152 + .../utils/structs/DoubleEndedQueue.sol | 237 + .../utils/structs/EnumerableMap.sol | 1443 +++++ .../utils/structs/EnumerableSet.sol | 895 +++ .../utils/structs/Heap.sol | 259 + .../utils/structs/MerkleTree.sol | 267 + .../utils/types/Time.sol | 133 + .../vendor/compound/ICompoundTimelock.sol | 6 +- .../AccessControlCrossChainUpgradeable.sol | 58 - .../AccessControlEnumerableUpgradeable.sol | 77 - ...essControlDefaultAdminRulesUpgradeable.sol | 172 - .../IAccessControlEnumerableUpgradeable.sol | 31 - .../access/IAccessControlUpgradeable.sol | 88 - .../access/Ownable2StepUpgradeable.sol | 71 - .../access/OwnableUpgradeable.sol | 95 - .../access/README.adoc | 27 - .../build/contracts/AddressUpgradeable.json | 10 - .../build/contracts/ArraysUpgradeable.json | 10 - .../build/contracts/Base64Upgradeable.json | 10 - .../build/contracts/BitMapsUpgradeable.json | 10 - .../contracts/CheckpointsUpgradeable.json | 10 - .../build/contracts/ClonesUpgradeable.json | 10 - .../ConditionalEscrowUpgradeable.json | 185 - .../build/contracts/CountersUpgradeable.json | 10 - .../build/contracts/Create2Upgradeable.json | 10 - .../CrossChainEnabledAMBUpgradeable.json | 35 - ...rossChainEnabledArbitrumL1Upgradeable.json | 24 - ...rossChainEnabledArbitrumL2Upgradeable.json | 24 - .../CrossChainEnabledOptimismUpgradeable.json | 24 - ...ssChainEnabledPolygonChildUpgradeable.json | 52 - .../CrossChainEnabledUpgradeable.json | 24 - .../DoubleEndedQueueUpgradeable.json | 21 - .../build/contracts/ECDSAUpgradeable.json | 10 - .../contracts/ERC1155HolderUpgradeable.json | 121 - .../ERC1155PresetMinterPauserUpgradeable.json | 758 --- .../build/contracts/ERC1155Upgradeable.json | 336 - .../contracts/ERC165CheckerUpgradeable.json | 10 - .../ERC1820ImplementerUpgradeable.json | 48 - .../ERC20PresetFixedSupplyUpgradeable.json | 353 - .../ERC20PresetMinterPauserUpgradeable.json | 687 -- .../build/contracts/ERC20Upgradeable.json | 294 - .../contracts/ERC20VotesCompUpgradeable.json | 724 --- .../contracts/ERC721HolderUpgradeable.json | 58 - ...21PresetMinterPauserAutoIdUpgradeable.json | 766 --- .../build/contracts/ERC721Upgradeable.json | 354 - .../ERC777PresetFixedSupplyUpgradeable.json | 612 -- .../build/contracts/ERC777Upgradeable.json | 579 -- .../contracts/EnumerableMapUpgradeable.json | 10 - .../contracts/EnumerableSetUpgradeable.json | 10 - .../build/contracts/EscrowUpgradeable.json | 166 - .../GovernorCountingSimpleUpgradeable.json | 1045 --- .../GovernorProposalThresholdUpgradeable.json | 1016 --- .../build/contracts/GovernorUpgradeable.json | 1016 --- .../GovernorVotesCompUpgradeable.json | 1029 --- .../contracts/GovernorVotesUpgradeable.json | 1029 --- .../build/contracts/IAMBUpgradeable.json | 336 - ...ssControlDefaultAdminRulesUpgradeable.json | 355 - .../IAccessControlEnumerableUpgradeable.json | 226 - .../contracts/IAccessControlUpgradeable.json | 183 - .../build/contracts/IArbSysUpgradeable.json | 364 -- .../IDelayedMessageProviderUpgradeable.json | 43 - .../build/contracts/IERC1155Upgradeable.json | 304 - .../build/contracts/IERC165Upgradeable.json | 30 - .../IERC1820RegistryUpgradeable.json | 224 - .../IERC1822ProxiableUpgradeable.json | 24 - .../build/contracts/IERC1967Upgradeable.json | 56 - .../contracts/IERC20PermitUpgradeable.json | 86 - .../build/contracts/IERC2309Upgradeable.json | 42 - .../build/contracts/IERC2981Upgradeable.json | 59 - .../IERC3156FlashBorrowerUpgradeable.json | 50 - .../build/contracts/IERC5805Upgradeable.json | 219 - .../build/contracts/IERC6372Upgradeable.json | 37 - .../IERC721EnumerableUpgradeable.json | 352 - .../contracts/IERC721MetadataUpgradeable.json | 341 - .../build/contracts/IERC721Upgradeable.json | 296 - .../IERC777RecipientUpgradeable.json | 49 - .../contracts/IERC777SenderUpgradeable.json | 49 - .../build/contracts/IERC777Upgradeable.json | 402 -- .../IFxMessageProcessorUpgradeable.json | 34 - .../IGovernorTimelockUpgradeable.json | 869 --- .../build/contracts/IGovernorUpgradeable.json | 784 --- .../build/contracts/IInboxUpgradeable.json | 453 -- .../build/contracts/IOutboxUpgradeable.json | 419 -- .../build/contracts/IVotesUpgradeable.json | 193 - .../build/contracts/LibAMBUpgradeable.json | 10 - .../contracts/LibArbitrumL1Upgradeable.json | 10 - .../contracts/LibArbitrumL2Upgradeable.json | 24 - .../contracts/LibOptimismUpgradeable.json | 10 - .../build/contracts/MathUpgradeable.json | 10 - .../contracts/MerkleProofUpgradeable.json | 10 - .../MinimalForwarderUpgradeable.json | 209 - .../contracts/PaymentSplitterUpgradeable.json | 310 - .../contracts/ReentrancyGuardUpgradeable.json | 24 - .../contracts/RefundEscrowUpgradeable.json | 244 - .../build/contracts/SafeCastUpgradeable.json | 10 - .../build/contracts/SafeERC20Upgradeable.json | 10 - .../build/contracts/SafeMathUpgradeable.json | 10 - .../contracts/ShortStringsUpgradeable.json | 27 - .../SignatureCheckerUpgradeable.json | 10 - .../contracts/SignedMathUpgradeable.json | 10 - .../contracts/SignedSafeMathUpgradeable.json | 10 - .../contracts/StorageSlotUpgradeable.json | 10 - .../build/contracts/StringsUpgradeable.json | 10 - .../TimelockControllerUpgradeable.json | 887 --- ...kControllerWith46MigrationUpgradeable.json | 894 --- .../build/contracts/TimersUpgradeable.json | 10 - .../contracts/TokenTimelockUpgradeable.json | 70 - .../contracts/VestingWalletUpgradeable.json | 226 - .../CrossChainEnabledUpgradeable.sol | 67 - .../crosschain/README.adoc | 34 - .../amb/CrossChainEnabledAMBUpgradeable.sol | 57 - .../crosschain/amb/LibAMBUpgradeable.sol | 35 - ...CrossChainEnabledArbitrumL1Upgradeable.sol | 52 - ...CrossChainEnabledArbitrumL2Upgradeable.sol | 53 - .../arbitrum/LibArbitrumL1Upgradeable.sol | 42 - .../arbitrum/LibArbitrumL2Upgradeable.sol | 45 - .../crosschain/errorsUpgradeable.sol | 7 - .../CrossChainEnabledOptimismUpgradeable.sol | 49 - .../optimism/LibOptimismUpgradeable.sol | 36 - ...ossChainEnabledPolygonChildUpgradeable.sol | 80 - .../finance/PaymentSplitterUpgradeable.sol | 226 - .../finance/README.adoc | 20 - .../finance/VestingWalletUpgradeable.sol | 159 - .../governance/GovernorUpgradeable.sol | 736 --- .../governance/IGovernorUpgradeable.sol | 326 - .../governance/README.adoc | 176 - ...ckControllerWith46MigrationUpgradeable.sol | 56 - .../GovernorCompatibilityBravoUpgradeable.sol | 346 - ...IGovernorCompatibilityBravoUpgradeable.sol | 131 - .../GovernorCountingSimpleUpgradeable.sol | 113 - .../GovernorProposalThresholdUpgradeable.sol | 36 - .../GovernorSettingsUpgradeable.sol | 122 - .../GovernorTimelockCompoundUpgradeable.sol | 202 - .../GovernorTimelockControlUpgradeable.sol | 178 - .../GovernorVotesCompUpgradeable.sol | 69 - ...GovernorVotesQuorumFractionUpgradeable.sol | 133 - .../extensions/GovernorVotesUpgradeable.sol | 69 - .../IGovernorTimelockUpgradeable.sol | 39 - .../governance/utils/IVotesUpgradeable.sol | 56 - .../IERC1155MetadataURIUpgradeable.sol | 6 - .../IERC1155ReceiverUpgradeable.sol | 6 - .../interfaces/IERC1155Upgradeable.sol | 6 - .../interfaces/IERC1271Upgradeable.sol | 19 - .../IERC1363ReceiverUpgradeable.sol | 35 - .../interfaces/IERC1363SpenderUpgradeable.sol | 29 - .../interfaces/IERC1363Upgradeable.sol | 80 - .../interfaces/IERC165Upgradeable.sol | 6 - .../IERC1820ImplementerUpgradeable.sol | 6 - .../IERC1820RegistryUpgradeable.sol | 6 - .../interfaces/IERC1967Upgradeable.sol | 26 - .../interfaces/IERC20MetadataUpgradeable.sol | 6 - .../interfaces/IERC20Upgradeable.sol | 6 - .../interfaces/IERC2309Upgradeable.sol | 21 - .../interfaces/IERC2612Upgradeable.sol | 8 - .../interfaces/IERC2981Upgradeable.sol | 25 - .../IERC3156FlashBorrowerUpgradeable.sol | 29 - .../IERC3156FlashLenderUpgradeable.sol | 43 - .../interfaces/IERC3156Upgradeable.sol | 7 - .../interfaces/IERC4626Upgradeable.sol | 232 - .../interfaces/IERC4906Upgradeable.sol | 20 - .../interfaces/IERC5267Upgradeable.sol | 28 - .../interfaces/IERC5313Upgradeable.sol | 18 - .../interfaces/IERC5805Upgradeable.sol | 9 - .../interfaces/IERC6372Upgradeable.sol | 17 - .../IERC721EnumerableUpgradeable.sol | 6 - .../interfaces/IERC721MetadataUpgradeable.sol | 6 - .../interfaces/IERC721ReceiverUpgradeable.sol | 6 - .../interfaces/IERC721Upgradeable.sol | 6 - .../IERC777RecipientUpgradeable.sol | 6 - .../interfaces/IERC777SenderUpgradeable.sol | 6 - .../interfaces/IERC777Upgradeable.sol | 6 - .../interfaces/README.adoc | 73 - .../interfaces/draft-IERC1822Upgradeable.sol | 20 - .../interfaces/draft-IERC2612Upgradeable.sol | 8 - .../metatx/ERC2771ContextUpgradeable.sol | 62 - .../metatx/MinimalForwarderUpgradeable.sol | 84 - .../metatx/README.adoc | 12 - .../package.json | 32 - .../proxy/ClonesUpgradeable.sol | 88 - .../ERC1967/ERC1967UpgradeUpgradeable.sol | 170 - .../proxy/README.adoc | 87 - .../proxy/beacon/IBeaconUpgradeable.sol | 16 - .../proxy/utils/UUPSUpgradeable.sol | 112 - .../security/PullPaymentUpgradeable.sol | 89 - .../security/README.adoc | 20 - .../security/ReentrancyGuardUpgradeable.sol | 89 - .../token/ERC1155/ERC1155Upgradeable.sol | 509 -- .../ERC1155/IERC1155ReceiverUpgradeable.sol | 58 - .../token/ERC1155/IERC1155Upgradeable.sol | 119 - .../token/ERC1155/README.adoc | 49 - .../extensions/ERC1155BurnableUpgradeable.sol | 45 - .../extensions/ERC1155PausableUpgradeable.sol | 58 - .../extensions/ERC1155SupplyUpgradeable.sol | 77 - .../ERC1155URIStorageUpgradeable.sol | 78 - .../IERC1155MetadataURIUpgradeable.sol | 22 - .../ERC1155PresetMinterPauserUpgradeable.sol | 131 - .../token/ERC1155/presets/README.md | 1 - .../utils/ERC1155HolderUpgradeable.sol | 49 - .../utils/ERC1155ReceiverUpgradeable.sol | 32 - .../token/ERC20/ERC20Upgradeable.sol | 377 -- .../token/ERC20/IERC20Upgradeable.sol | 78 - .../token/ERC20/README.adoc | 80 - .../extensions/ERC20BurnableUpgradeable.sol | 52 - .../extensions/ERC20CappedUpgradeable.sol | 51 - .../extensions/ERC20PausableUpgradeable.sol | 49 - .../extensions/ERC20PermitUpgradeable.sol | 109 - .../extensions/ERC20SnapshotUpgradeable.sol | 204 - .../extensions/ERC20VotesCompUpgradeable.sol | 59 - .../extensions/ERC20VotesUpgradeable.sol | 303 - .../extensions/ERC20WrapperUpgradeable.sol | 87 - .../ERC20/extensions/ERC4626Upgradeable.sol | 268 - .../extensions/IERC20MetadataUpgradeable.sol | 28 - .../extensions/IERC20PermitUpgradeable.sol | 90 - .../draft-ERC20PermitUpgradeable.sol | 8 - .../draft-IERC20PermitUpgradeable.sol | 8 - .../ERC20PresetFixedSupplyUpgradeable.sol | 46 - .../ERC20PresetMinterPauserUpgradeable.sol | 111 - .../token/ERC20/presets/README.md | 1 - .../ERC20/utils/SafeERC20Upgradeable.sol | 143 - .../ERC20/utils/TokenTimelockUpgradeable.sol | 86 - .../token/ERC721/ERC721Upgradeable.sol | 478 -- .../ERC721/IERC721ReceiverUpgradeable.sol | 27 - .../token/ERC721/IERC721Upgradeable.sol | 132 - .../token/ERC721/README.adoc | 73 - .../extensions/ERC721BurnableUpgradeable.sol | 39 - .../ERC721ConsecutiveUpgradeable.sol | 161 - .../ERC721EnumerableUpgradeable.sol | 172 - .../extensions/ERC721PausableUpgradeable.sol | 54 - .../extensions/ERC721RoyaltyUpgradeable.sol | 51 - .../ERC721URIStorageUpgradeable.sol | 87 - .../extensions/ERC721VotesUpgradeable.sol | 56 - .../extensions/ERC721WrapperUpgradeable.sol | 109 - .../IERC721EnumerableUpgradeable.sol | 29 - .../extensions/IERC721MetadataUpgradeable.sol | 27 - .../draft-ERC721VotesUpgradeable.sol | 9 - ...721PresetMinterPauserAutoIdUpgradeable.sol | 149 - .../token/ERC721/presets/README.md | 1 - .../ERC721/utils/ERC721HolderUpgradeable.sol | 36 - .../token/ERC777/ERC777Upgradeable.sol | 526 -- .../ERC777/IERC777RecipientUpgradeable.sol | 35 - .../token/ERC777/IERC777SenderUpgradeable.sol | 35 - .../token/ERC777/IERC777Upgradeable.sol | 200 - .../token/ERC777/README.adoc | 32 - .../ERC777PresetFixedSupplyUpgradeable.sol | 58 - .../token/common/ERC2981Upgradeable.sol | 120 - .../token/common/README.adoc | 10 - .../utils/AddressUpgradeable.sol | 244 - .../utils/ArraysUpgradeable.sol | 105 - .../utils/Base64Upgradeable.sol | 101 - .../utils/CheckpointsUpgradeable.sol | 560 -- .../utils/CountersUpgradeable.sol | 43 - .../utils/Create2Upgradeable.sol | 75 - .../utils/README.adoc | 113 - .../utils/ShortStringsUpgradeable.sol | 122 - .../utils/StorageSlotUpgradeable.sol | 138 - .../utils/StringsUpgradeable.sol | 85 - .../utils/TimersUpgradeable.sol | 75 - .../utils/cryptography/ECDSAUpgradeable.sol | 217 - .../cryptography/MerkleProofUpgradeable.sol | 227 - .../SignatureCheckerUpgradeable.sol | 50 - .../cryptography/draft-EIP712Upgradeable.sol | 8 - .../escrow/ConditionalEscrowUpgradeable.sol | 39 - .../utils/escrow/EscrowUpgradeable.sol | 84 - .../utils/escrow/RefundEscrowUpgradeable.sol | 113 - .../ERC165CheckerUpgradeable.sol | 126 - .../ERC165StorageUpgradeable.sol | 55 - .../utils/introspection/ERC165Upgradeable.sol | 42 - .../ERC1820ImplementerUpgradeable.sol | 56 - .../introspection/IERC165Upgradeable.sol | 25 - .../IERC1820ImplementerUpgradeable.sol | 20 - .../IERC1820RegistryUpgradeable.sol | 112 - .../utils/math/MathUpgradeable.sol | 339 - .../utils/math/SafeCastUpgradeable.sol | 1136 ---- .../utils/math/SafeMathUpgradeable.sol | 215 - .../utils/math/SignedMathUpgradeable.sol | 43 - .../utils/math/SignedSafeMathUpgradeable.sol | 68 - .../utils/structs/BitMapsUpgradeable.sol | 51 - .../structs/DoubleEndedQueueUpgradeable.sol | 170 - .../structs/EnumerableMapUpgradeable.sol | 598 -- .../structs/EnumerableSetUpgradeable.sol | 378 -- .../vendor/amb/IAMBUpgradeable.sol | 41 - .../vendor/arbitrum/IArbSysUpgradeable.sol | 134 - .../vendor/arbitrum/IBridgeUpgradeable.sol | 102 - .../IDelayedMessageProviderUpgradeable.sol | 16 - .../vendor/arbitrum/IInboxUpgradeable.sol | 152 - .../vendor/arbitrum/IOutboxUpgradeable.sol | 117 - .../compound/ICompoundTimelockUpgradeable.sol | 86 - .../vendor/compound/LICENSE | 11 - .../ICrossDomainMessengerUpgradeable.sol | 34 - .../vendor/optimism/LICENSE | 22 - .../IFxMessageProcessorUpgradeable.sol | 7 - .../README.md | 56 +- .../access/AccessControlUpgradeable.sol | 152 +- .../access/Ownable2StepUpgradeable.sol | 88 + .../access/OwnableUpgradeable.sol | 119 + ...essControlDefaultAdminRulesUpgradeable.sol | 222 +- .../AccessControlEnumerableUpgradeable.sol | 104 + .../manager/AccessManagedUpgradeable.sol | 133 + .../manager/AccessManagerUpgradeable.sol | 784 +++ .../draft-AccountERC7579HookedUpgradeable.sol | 128 + .../draft-AccountERC7579Upgradeable.sol | 433 ++ ...ssControlDefaultAdminRulesUpgradeable.json | 80 +- .../AccessControlEnumerableUpgradeable.json | 58 +- .../contracts/AccessControlUpgradeable.json | 37 +- .../contracts/AccessManagedUpgradeable.json} | 98 +- .../contracts/AccessManagerUpgradeable.json | 1200 ++++ .../AccountERC7579HookedUpgradeable.json | 559 ++ .../contracts/AccountERC7579Upgradeable.json | 535 ++ .../contracts/BridgeERC20Upgradeable.json | 275 + .../contracts/BridgeERC7802Upgradeable.json | 264 + .../contracts/BridgeFungibleUpgradeable.json | 251 + .../build/contracts/ContextUpgradeable.json | 14 +- .../CrosschainLinkedUpgradeable.json | 165 + .../build/contracts/EIP712Upgradeable.json | 14 +- .../contracts/ERC1155BurnableUpgradeable.json | 120 +- .../contracts/ERC1155PausableUpgradeable.json | 130 +- .../contracts/ERC1155SupplyUpgradeable.json | 499 ++ .../ERC1155URIStorageUpgradeable.json | 120 +- .../build/contracts/ERC1155Upgradeable.json} | 135 +- .../build/contracts/ERC1363Upgradeable.json} | 496 +- .../build/contracts/ERC165Upgradeable.json | 14 +- .../contracts/ERC20BridgeableUpgradeable.json | 447 ++ .../contracts/ERC20BurnableUpgradeable.json | 158 +- .../contracts/ERC20CappedUpgradeable.json | 382 ++ .../ERC20CrosschainUpgradeable.json} | 546 +- .../contracts/ERC20FlashMintUpgradeable.json | 452 ++ .../contracts/ERC20PausableUpgradeable.json | 164 +- .../contracts/ERC20PermitUpgradeable.json} | 489 +- .../ERC20TemporaryApprovalUpgradeable.json | 366 ++ .../build/contracts/ERC20Upgradeable.json | 342 + .../contracts/ERC20VotesUpgradeable.json | 340 +- .../contracts/ERC20WrapperUpgradeable.json | 182 +- .../contracts/ERC2771ContextUpgradeable.json | 27 +- .../ERC2771ForwarderUpgradeable.json | 397 ++ .../build/contracts/ERC2981Upgradeable.json | 146 + .../build/contracts/ERC4626Upgradeable.json | 249 +- .../ERC6909ContentURIUpgradeable.json | 492 ++ .../contracts/ERC6909MetadataUpgradeable.json | 549 ++ .../ERC6909TokenSupplyUpgradeable.json | 454 ++ .../build/contracts/ERC6909Upgradeable.json | 435 ++ .../contracts/ERC721BurnableUpgradeable.json | 117 +- .../ERC721ConsecutiveUpgradeable.json | 529 ++ .../ERC721EnumerableUpgradeable.json | 138 +- .../contracts/ERC721PausableUpgradeable.json | 127 +- .../contracts/ERC721RoyaltyUpgradeable.json | 560 ++ .../ERC721URIStorageUpgradeable.json | 117 +- .../build/contracts/ERC721Upgradeable.json} | 148 +- .../contracts/ERC721VotesUpgradeable.json | 230 +- .../contracts/ERC721WrapperUpgradeable.json | 130 +- .../build/contracts/ERC7739Upgradeable.json | 107 + ...GovernorCountingFractionalUpgradeable.json | 1453 +++++ ...overnorCountingOverridableUpgradeable.json | 1605 +++++ .../GovernorCountingSimpleUpgradeable.json | 1408 ++++ .../GovernorNoncesKeyedUpgradeable.json | 1403 ++++ .../GovernorPreventLateQuorumUpgradeable.json | 427 +- .../GovernorProposalGuardianUpgradeable.json | 1424 ++++ ...vernorSequentialProposalIdUpgradeable.json | 1397 ++++ .../GovernorSettingsUpgradeable.json | 427 +- .../contracts/GovernorStorageUpgradeable.json | 1504 +++++ .../GovernorSuperQuorumUpgradeable.json | 1427 ++++ .../GovernorTimelockAccessUpgradeable.json | 1580 +++++ .../GovernorTimelockCompoundUpgradeable.json | 367 +- .../GovernorTimelockControlUpgradeable.json | 349 +- .../build/contracts/GovernorUpgradeable.json} | 530 +- ...overnorVotesQuorumFractionUpgradeable.json | 1490 +++++ ...orVotesSuperQuorumFractionUpgradeable.json | 1650 +++++ .../contracts/GovernorVotesUpgradeable.json} | 442 +- .../MultiSignerERC7913Upgradeable.json | 196 + ...MultiSignerERC7913WeightedUpgradeable.json | 284 + .../build/contracts/MulticallUpgradeable.json | 30 +- .../contracts/NoncesKeyedUpgradeable.json} | 81 +- .../build/contracts/NoncesUpgradeable.json} | 51 +- .../contracts/Ownable2StepUpgradeable.json | 36 +- .../build/contracts/OwnableUpgradeable.json | 36 +- .../build/contracts/PausableUpgradeable.json | 26 +- .../contracts/SignerECDSAUpgradeable.json} | 32 +- .../contracts/SignerERC7913Upgradeable.json | 47 + .../contracts/SignerP256Upgradeable.json | 68 + .../build/contracts/SignerRSAUpgradeable.json | 52 + .../contracts/SignerWebAuthnUpgradeable.json | 68 + .../TimelockControllerUpgradeable.json | 1032 +++ .../VestingWalletCliffUpgradeable.json | 394 ++ .../contracts/VestingWalletUpgradeable.json | 365 ++ .../contracts/VotesExtendedUpgradeable.json | 454 ++ .../build/contracts/VotesUpgradeable.json | 127 +- .../CrosschainLinkedUpgradeable.sol | 128 + .../bridges/BridgeERC20Upgradeable.sol | 57 + .../bridges/BridgeERC7802Upgradeable.sol | 53 + .../abstract/BridgeFungibleUpgradeable.sol | 86 + .../finance/VestingWalletCliffUpgradeable.sol | 73 + .../finance/VestingWalletUpgradeable.sol | 188 + .../governance/GovernorUpgradeable.sol | 851 +++ .../TimelockControllerUpgradeable.sol | 267 +- .../GovernorCountingFractionalUpgradeable.sol | 214 + ...GovernorCountingOverridableUpgradeable.sol | 248 + .../GovernorCountingSimpleUpgradeable.sol | 120 + .../GovernorNoncesKeyedUpgradeable.sol | 97 + .../GovernorPreventLateQuorumUpgradeable.sol | 86 +- .../GovernorProposalGuardianUpgradeable.sol | 79 + ...overnorSequentialProposalIdUpgradeable.sol | 98 + .../GovernorSettingsUpgradeable.sol | 130 + .../extensions/GovernorStorageUpgradeable.sol | 159 + .../GovernorSuperQuorumUpgradeable.sol | 65 + .../GovernorTimelockAccessUpgradeable.sol | 376 ++ .../GovernorTimelockCompoundUpgradeable.sol | 191 + .../GovernorTimelockControlUpgradeable.sol | 192 + ...GovernorVotesQuorumFractionUpgradeable.sol | 133 + ...norVotesSuperQuorumFractionUpgradeable.sol | 156 + .../extensions/GovernorVotesUpgradeable.sol | 82 + .../utils/VotesExtendedUpgradeable.sol | 107 + .../governance/utils/VotesUpgradeable.sol | 204 +- .../metatx/ERC2771ContextUpgradeable.sol | 91 + .../metatx/ERC2771ForwarderUpgradeable.sol | 380 ++ .../proxy/utils/Initializable.sol | 5 + .../proxy/utils/UUPSUpgradeable.sol | 5 + .../token/ERC1155/ERC1155Upgradeable.sol | 441 ++ .../extensions/ERC1155BurnableUpgradeable.sol | 34 + .../extensions/ERC1155PausableUpgradeable.sol | 44 + .../extensions/ERC1155SupplyUpgradeable.sol | 109 + .../ERC1155URIStorageUpgradeable.sol | 82 + .../token/ERC20/ERC20Upgradeable.sol | 330 + .../ERC20/extensions/ERC1363Upgradeable.sol | 142 + .../extensions/ERC20BurnableUpgradeable.sol | 45 + .../extensions/ERC20CappedUpgradeable.sol | 73 + .../extensions/ERC20CrosschainUpgradeable.sol | 45 + .../extensions/ERC20FlashMintUpgradeable.sol | 102 +- .../extensions/ERC20PausableUpgradeable.sol | 39 + .../extensions/ERC20PermitUpgradeable.sol | 82 + .../extensions/ERC20VotesUpgradeable.sol | 89 + .../extensions/ERC20WrapperUpgradeable.sol | 114 + .../ERC20/extensions/ERC4626Upgradeable.sol | 337 + .../draft-ERC20BridgeableUpgradeable.sol | 58 + ...raft-ERC20TemporaryApprovalUpgradeable.sol | 126 + .../token/ERC6909/ERC6909Upgradeable.sol | 250 + .../ERC6909ContentURIUpgradeable.sol | 81 + .../extensions/ERC6909MetadataUpgradeable.sol | 107 + .../ERC6909TokenSupplyUpgradeable.sol | 61 + .../token/ERC721/ERC721Upgradeable.sol | 462 ++ .../extensions/ERC721BurnableUpgradeable.sol | 32 + .../ERC721ConsecutiveUpgradeable.sol | 198 + .../ERC721EnumerableUpgradeable.sol | 190 + .../extensions/ERC721PausableUpgradeable.sol | 43 + .../extensions/ERC721RoyaltyUpgradeable.sol | 32 + .../ERC721URIStorageUpgradeable.sol | 82 + .../extensions/ERC721VotesUpgradeable.sol | 53 + .../extensions/ERC721WrapperUpgradeable.sol | 122 + .../token/common/ERC2981Upgradeable.sol | 163 + .../utils/ContextUpgradeable.sol | 13 +- .../utils/MulticallUpgradeable.sol | 27 +- .../utils/NoncesKeyedUpgradeable.sol | 94 + .../utils/NoncesUpgradeable.sol | 66 + .../utils}/PausableUpgradeable.sol | 66 +- .../utils/cryptography/EIP712Upgradeable.sol | 127 +- .../signers/MultiSignerERC7913Upgradeable.sol | 284 + .../MultiSignerERC7913WeightedUpgradeable.sol | 230 + .../signers/SignerECDSAUpgradeable.sol | 75 + .../signers/SignerERC7913Upgradeable.sol | 82 + .../signers/SignerP256Upgradeable.sol | 83 + .../signers/SignerRSAUpgradeable.sol | 84 + .../signers/SignerWebAuthnUpgradeable.sol | 52 + .../signers/draft-ERC7739Upgradeable.sol | 104 + .../utils/introspection/ERC165Upgradeable.sol | 31 + dependencies/rain-lib-hash-0.1.0/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + dependencies/rain-lib-hash-0.1.0/README.md | 517 ++ .../src/LibHashNoAlloc.sol | 107 + .../test/LibHashNoAlloc.t.sol | 82 + .../rain-lib-hash-0.1.0/test/LibHashSlow.sol | 21 + dependencies/rain-lib-typecast-0.1.0/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + .../rain-lib-typecast-0.1.0/README.md | 14 + .../rain-lib-typecast-0.1.0/src/LibCast.sol | 52 + .../src/LibConvert.sol | 59 + .../test/LibCast.t.sol | 28 + .../test/LibConvert.t.sol | 27 + .../test/LibConvertSlow.sol | 17 + dependencies/rain-math-float-0.1.1/Cargo.lock | 4953 ++++++++++++++ dependencies/rain-math-float-0.1.1/Cargo.toml | 21 + dependencies/rain-math-float-0.1.1/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + dependencies/rain-math-float-0.1.1/README.md | 224 + .../script/BuildPointers.sol | 47 + .../script/CopyArtifacts.sol | 26 + .../rain-math-float-0.1.1/script/Deploy.sol | 72 + .../script/lib/LibCopyArtifacts.sol | 48 + .../script/lib/LibEtchLogTables.sol | 29 + .../src/concrete/DecimalFloat.sol | 328 + .../src/error/ErrDecimalFloat.sol | 81 + .../src/error/ErrFormat.sol | 7 + .../src/error/ErrParse.sol | 19 + .../src/generated/LogTables.pointers.sol | 33 + .../src/lib/LibDecimalFloat.sol | 870 +++ .../src/lib/deploy/LibDecimalFloatDeploy.sol | 64 + .../src/lib/format/LibFormatDecimalFloat.sol | 196 + .../LibDecimalFloatImplementation.sol | 1324 ++++ .../src/lib/parse/LibParseDecimalFloat.sol | 221 + .../src/lib/table/LibLogTable.sol | 754 +++ dependencies/rain-metadata-0.1.0/Cargo.lock | 5722 +++++++++++++++++ dependencies/rain-metadata-0.1.0/Cargo.toml | 26 + dependencies/rain-metadata-0.1.0/LICENSE | 189 + .../LICENSES/LicenseRef-DCL-1.0.txt | 189 + dependencies/rain-metadata-0.1.0/README.md | 49 + .../rain-metadata-0.1.0/script/Deploy.sol | 31 + .../src/concrete/MetaBoard.sol | 27 + .../src/interface/IDescribedByMetaV1.sol | 27 + .../src/interface/deprecated/IMetaBoardV1.sol | 19 + .../src/interface/deprecated/IMetaV1.sol | 32 + .../src/interface/unstable/IMetaBoardV1_2.sol | 21 + .../src/interface/unstable/IMetaV1_2.sol | 25 + .../src/lib/LibDescribedByMeta.sol | 39 + .../rain-metadata-0.1.0/src/lib/LibMeta.sol | 49 + .../src/lib/deploy/LibMetaBoardDeploy.sol | 28 + .../test/concrete/MetaBoard.hash.t.sol | 14 + .../test/concrete/MetaBoard.t.sol | 25 + ...cribedByMeta.emitForDescribedAddress.t.sol | 56 + .../lib/LibMeta.checkMetaHashedV1_2.t.sol | 49 + .../lib/LibMeta.checkMetaUnhashedV1_2.t.sol | 24 + .../test/lib/LibMeta.isRainMetaV1_2.t.sol | 19 + .../test/lib/deploy/LibMetaBoardDeploy.t.sol | 198 + foundry.toml | 2 + remappings.txt | 8 +- soldeer.lock | 44 +- src/concrete/Flow.sol | 15 +- src/interface/IFlowV5.sol | 2 +- .../deprecated/v4/IFlowERC1155V4.sol | 2 +- src/interface/deprecated/v4/IFlowV4.sol | 2 +- .../deprecated/v5/IFlowERC1155V5.sol | 2 +- src/interface/deprecated/v5/IFlowERC20V5.sol | 2 +- src/interface/deprecated/v5/IFlowERC721V5.sol | 2 +- test/abstract/FlowTest.sol | 2 +- test/abstract/InterpreterMockTest.sol | 6 +- test/lib/LibContextWrapper.sol | 2 +- test/lib/SignContextLib.sol | 4 +- test/src/concrete/Flow.construction.t.sol | 2 +- test/src/concrete/Flow.context.t.sol | 2 +- test/src/concrete/Flow.expression.t.sol | 4 +- test/src/concrete/Flow.multicall.t.sol | 2 +- test/src/concrete/Flow.signedContext.t.sol | 2 +- test/src/concrete/Flow.time.t.sol | 6 +- test/src/concrete/Flow.transfer.t.sol | 2 +- 1185 files changed, 129765 insertions(+), 77573 deletions(-) delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/package.json delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol delete mode 100644 dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/README.md (60%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/access/AccessControl.sol (62%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/access/IAccessControl.sol (76%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/access/Ownable.sol (66%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/access/Ownable2Step.sol (67%) rename dependencies/{@openzeppelin-contracts-4.9.6/access => @openzeppelin-contracts-5.6.1/access/extensions}/AccessControlDefaultAdminRules.sol (81%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/access/extensions/AccessControlEnumerable.sol rename dependencies/{@openzeppelin-contracts-4.9.6/access => @openzeppelin-contracts-5.6.1/access/extensions}/IAccessControlDefaultAdminRules.sol (83%) rename dependencies/{@openzeppelin-contracts-4.9.6/access => @openzeppelin-contracts-5.6.1/access/extensions}/IAccessControlEnumerable.sol (83%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManaged.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManager.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/access/manager/AuthorityUtils.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManaged.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManager.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAuthority.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/account/Account.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579Hooked.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-ERC7821.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/account/utils/EIP7702Utils.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC4337Utils.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC7579Utils.sol rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json => @openzeppelin-contracts-5.6.1/build/contracts/AbstractSigner.json} (58%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/AccessControl.json (90%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/AccessControlDefaultAdminRules.json (85%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/AccessControlEnumerable.json (85%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/AccessManaged.json} (58%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessManager.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Account.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579Hooked.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Accumulators.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Address.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Arrays.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AuthorityUtils.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base58.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base64.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BeaconProxy.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BitMaps.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Blockhash.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/BridgeERC20.json} (50%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/BridgeERC7802.json} (51%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeFungible.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Bytes.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP10.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP2.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Calldata.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Checkpoints.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CircularBuffer.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Clones.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Comparators.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Context.json (100%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Create2.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CrosschainLinked.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/DoubleEndedQueue.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ECDSA.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/EIP712.json (100%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EIP7702Utils.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC1155.json} (79%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC1155Burnable.json (78%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC1155Holder.json} (83%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC1155Pausable.json (76%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC1155Supply.json (75%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC1155URIStorage.json (75%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Utils.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363Utils.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC165.json (100%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC165Checker.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Proxy.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Utils.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC20.json} (81%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC20Bridgeable.json} (75%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC20Burnable.json (81%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC20Capped.json} (80%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC20Crosschain.json} (67%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC20FlashMint.json (77%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC20Pausable.json (80%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC20Permit.json (75%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC20TemporaryApproval.json} (82%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC20Votes.json (79%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC20Wrapper.json (78%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC2771Context.json (70%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2771Forwarder.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2981.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC4337Utils.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC4626.json (80%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909ContentURI.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909Metadata.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909TokenSupply.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC721.json} (81%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721Burnable.json (78%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721Consecutive.json (74%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721Enumerable.json (76%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC721Holder.json} (76%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721Pausable.json (77%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721Royalty.json (68%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721URIStorage.json (78%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Utils.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721Votes.json (77%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ERC721Wrapper.json (79%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7579Utils.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ERC7739.json} (58%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7739Utils.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7786Recipient.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7821.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913P256Verifier.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913RSAVerifier.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913WebAuthnVerifier.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableMap.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableSet.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Errors.json rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json => @openzeppelin-contracts-5.6.1/build/contracts/Governor.json} (88%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingFractional.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingOverridable.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingSimple.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorNoncesKeyed.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/GovernorPreventLateQuorum.json (74%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorProposalGuardian.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSequentialProposalId.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/GovernorSettings.json (75%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorStorage.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSuperQuorum.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockAccess.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/GovernorTimelockCompound.json (78%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/GovernorTimelockControl.json (79%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json => @openzeppelin-contracts-5.6.1/build/contracts/GovernorVotes.json} (77%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesQuorumFraction.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesSuperQuorumFraction.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Hashes.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Heap.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IAccessControl.json (89%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IAccessControlDefaultAdminRules.json (87%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IAccessControlEnumerable.json (89%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManaged.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManager.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccount.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccountExecute.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAggregator.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IAuthority.json} (52%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IBeacon.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ICompoundTimelock.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1155.json (99%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155Errors.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1155MetadataURI.json (99%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1155Receiver.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1271.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1363.json (96%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1363Receiver.json (97%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1363Spender.json (96%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC165.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1820Implementer.json (90%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1820Registry.json (98%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1822Proxiable.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC1967.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC20.json (97%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC20Errors.json} (51%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC20Metadata.json (98%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC20Permit.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC2309.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC2612.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC2981.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC3156FlashBorrower.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC3156FlashLender.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC4626.json (99%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC4906.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC5267.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC5313.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC5805.json (94%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC6372.json (100%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC6909ContentURI.json} (75%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC6909Metadata.json} (80%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC6909TokenSupply.json} (74%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC721.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC721Enumerable.json (100%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Errors.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC721Metadata.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC721Receiver.json (100%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7579AccountConfig.json} (51%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Execution.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7579Hook.json} (50%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Module.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7579ModuleConfig.json} (54%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Validator.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7674.json} (85%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7751.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC777.json (99%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC777Recipient.json (94%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IERC777Sender.json (94%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7786GatewaySource.json} (51%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7786Recipient.json} (54%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7802.json} (57%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7821.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IERC7913SignatureVerifier.json} (69%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPoint.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointExtra.json rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json => @openzeppelin-contracts-5.6.1/build/contracts/IEntryPointNonces.json} (51%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointStake.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/IGovernor.json} (84%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IPaymaster.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/ITransparentUpgradeableProxy.json} (71%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/IVotes.json (93%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Initializable.json (64%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/InteroperableAddress.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/LowLevelCall.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Math.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Memory.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleProof.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleTree.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MessageHashUtils.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913Weighted.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Multicall.json (67%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json => @openzeppelin-contracts-5.6.1/build/contracts/Nonces.json} (60%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/NoncesKeyed.json} (59%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Ownable.json (75%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Ownable2Step.json (83%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/P256.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Packing.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Panic.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Pausable.json (81%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Proxy.json (80%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ProxyAdmin.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RLP.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RSA.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuard.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuardTransient.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RelayedCall.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeCast.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeERC20.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/ShortStrings.json (55%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignatureChecker.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignedMath.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/SignerECDSA.json} (74%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json => @openzeppelin-contracts-5.6.1/build/contracts/SignerEIP7702.json} (58%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/SignerERC7913.json} (61%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/SignerP256.json} (50%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerRSA.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerWebAuthn.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SlotDerivation.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/StorageSlot.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Strings.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Time.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TimelockController.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransientSlot.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransparentUpgradeableProxy.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TrieProof.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/UUPSUpgradeable.json (65%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/UpgradeableBeacon.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWallet.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWalletCliff.json rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/build/contracts/Votes.json (77%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json => @openzeppelin-contracts-5.6.1/build/contracts/VotesExtended.json} (60%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/build/contracts/WebAuthn.json create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/crosschain/CrosschainLinked.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/crosschain/ERC7786Recipient.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC20.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC7802.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/abstract/BridgeFungible.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/finance/VestingWallet.sol (57%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/finance/VestingWalletCliff.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/Governor.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/IGovernor.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/TimelockController.sol (64%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingFractional.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingOverridable.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/extensions/GovernorCountingSimple.sol (75%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorNoncesKeyed.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/extensions/GovernorPreventLateQuorum.sol (69%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorProposalGuardian.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSequentialProposalId.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/extensions/GovernorSettings.sol (73%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorStorage.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSuperQuorum.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockAccess.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/extensions/GovernorTimelockCompound.sol (56%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/extensions/GovernorTimelockControl.sol (54%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/extensions/GovernorVotes.sol (52%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/extensions/GovernorVotesQuorumFraction.sol (54%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotesSuperQuorumFraction.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/utils/IVotes.sol (87%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/governance/utils/Votes.sol (61%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/governance/utils/VotesExtended.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155MetadataURI.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1271.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Spender.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC165.sol rename dependencies/{@openzeppelin-contracts-4.9.6/utils/introspection => @openzeppelin-contracts-5.6.1/interfaces}/IERC1820Implementer.sol (72%) rename dependencies/{@openzeppelin-contracts-4.9.6/utils/introspection => @openzeppelin-contracts-5.6.1/interfaces}/IERC1820Registry.sol (85%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC1967.sol (82%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20Metadata.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC2309.sol (78%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2612.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC2981.sol (64%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC3156FlashBorrower.sol (80%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC3156FlashLender.sol (79%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC4626.sol (95%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC4906.sol (74%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC5267.sol (87%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC5313.sol (74%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5805.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/IERC6372.sol (82%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC6909.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Enumerable.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Metadata.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Receiver.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7751.sol rename dependencies/{@openzeppelin-contracts-4.9.6/token/ERC777 => @openzeppelin-contracts-5.6.1/interfaces}/IERC777.sol (95%) rename dependencies/{@openzeppelin-contracts-4.9.6/token/ERC777 => @openzeppelin-contracts-5.6.1/interfaces}/IERC777Recipient.sol (75%) rename dependencies/{@openzeppelin-contracts-4.9.6/token/ERC777 => @openzeppelin-contracts-5.6.1/interfaces}/IERC777Sender.sol (76%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7913.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/interfaces/draft-IERC1822.sol (76%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC4337.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC6093.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7579.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7674.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7786.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7802.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7821.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Context.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Forwarder.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/proxy/Clones.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Proxy.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Utils.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/proxy/Proxy.sol (68%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/BeaconProxy.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/proxy/beacon/IBeacon.sol (63%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/proxy/beacon/UpgradeableBeacon.sol (69%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/ProxyAdmin.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/TransparentUpgradeableProxy.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-5.6.1}/proxy/utils/Initializable.sol (54%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/proxy/utils/UUPSUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/ERC1155.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC1155/IERC1155.sol (66%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC1155/IERC1155Receiver.sol (83%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC1155/extensions/ERC1155Burnable.sol (52%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC1155/extensions/ERC1155Pausable.sol (56%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Supply.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC1155/extensions/ERC1155URIStorage.sol (75%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC1155/extensions/IERC1155MetadataURI.sol (73%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC1155/utils/ERC1155Holder.sol (50%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/utils/ERC1155Utils.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/ERC20.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC20/IERC20.sol (69%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC1363.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Burnable.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Capped.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Crosschain.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC20/extensions/ERC20FlashMint.sol (51%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC20/extensions/ERC20Pausable.sol (58%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Permit.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Votes.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Wrapper.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC4626.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC20/extensions/IERC20Metadata.sol (75%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC20/extensions/IERC20Permit.sol (91%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20Bridgeable.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/ERC1363Utils.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/SafeERC20.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/ERC6909.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909ContentURI.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909Metadata.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909TokenSupply.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/ERC721.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/IERC721.sol (87%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/IERC721Receiver.sol (76%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Burnable.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Consecutive.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/extensions/ERC721Enumerable.sol (60%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/extensions/ERC721Pausable.sol (56%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Royalty.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721URIStorage.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Votes.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/extensions/ERC721Wrapper.sol (66%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/extensions/IERC721Enumerable.sol (87%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/extensions/IERC721Metadata.sol (79%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/ERC721/utils/ERC721Holder.sol (59%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/utils/ERC721Utils.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/token/common/ERC2981.sol (54%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Address.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Arrays.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Base58.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Base64.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Blockhash.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Bytes.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP10.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP2.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Calldata.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Comparators.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/Context.sol (90%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/Create2.sol (54%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Errors.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/LowLevelCall.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Memory.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/Multicall.sol (77%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Nonces.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/NoncesKeyed.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Packing.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Panic.sol rename dependencies/{@openzeppelin-contracts-4.9.6/security => @openzeppelin-contracts-5.6.1/utils}/Pausable.sol (82%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/RLP.sol rename dependencies/{@openzeppelin-contracts-4.9.6/security => @openzeppelin-contracts-5.6.1/utils}/ReentrancyGuard.sol (55%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/ReentrancyGuardTransient.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/RelayedCall.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/ShortStrings.sol (82%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/SlotDerivation.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/StorageSlot.sol (68%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/Strings.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/TransientSlot.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/ECDSA.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/cryptography/EIP712.sol (66%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/Hashes.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MerkleProof.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MessageHashUtils.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/P256.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/RSA.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/SignatureChecker.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/TrieProof.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/WebAuthn.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/draft-ERC7739Utils.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/AbstractSigner.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913Weighted.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerECDSA.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerEIP7702.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerERC7913.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerP256.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerRSA.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerWebAuthn.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/draft-ERC7739.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913P256Verifier.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913RSAVerifier.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/draft-InteroperableAddress.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/introspection/ERC165.sol (56%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/introspection/ERC165Checker.sol (65%) rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/introspection/IERC165.sol (72%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/math/Math.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/math/SafeCast.sol (76%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/math/SignedMath.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Accumulators.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/utils/structs/BitMaps.sol (67%) create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Checkpoints.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/CircularBuffer.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/DoubleEndedQueue.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableMap.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableSet.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Heap.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/structs/MerkleTree.sol create mode 100644 dependencies/@openzeppelin-contracts-5.6.1/utils/types/Time.sol rename dependencies/{@openzeppelin-contracts-4.9.6 => @openzeppelin-contracts-5.6.1}/vendor/compound/ICompoundTimelock.sol (93%) delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE delete mode 100644 dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/README.md (60%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/access/AccessControlUpgradeable.sol (57%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/Ownable2StepUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/OwnableUpgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/access => @openzeppelin-contracts-upgradeable-5.6.1/access/extensions}/AccessControlDefaultAdminRulesUpgradeable.sol (60%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/extensions/AccessControlEnumerableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagedUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagerUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579HookedUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579Upgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json (84%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/AccessControlEnumerableUpgradeable.json (82%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/AccessControlUpgradeable.json (87%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagedUpgradeable.json} (56%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579HookedUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC20Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC7802Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeFungibleUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ContextUpgradeable.json (64%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/CrosschainLinkedUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/EIP712Upgradeable.json (86%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC1155BurnableUpgradeable.json (76%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC1155PausableUpgradeable.json (75%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155SupplyUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC1155URIStorageUpgradeable.json (74%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155Upgradeable.json} (71%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1363Upgradeable.json} (68%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC165Upgradeable.json (77%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20BridgeableUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC20BurnableUpgradeable.json (79%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CappedUpgradeable.json rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CrosschainUpgradeable.json} (65%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20FlashMintUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC20PausableUpgradeable.json (78%) rename dependencies/{@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20PermitUpgradeable.json} (62%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20TemporaryApprovalUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20Upgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC20VotesUpgradeable.json (78%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC20WrapperUpgradeable.json (76%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC2771ContextUpgradeable.json (62%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2771ForwarderUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2981Upgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC4626Upgradeable.json (79%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909ContentURIUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909MetadataUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909TokenSupplyUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909Upgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC721BurnableUpgradeable.json (76%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721ConsecutiveUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC721EnumerableUpgradeable.json (75%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC721PausableUpgradeable.json (76%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721RoyaltyUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC721URIStorageUpgradeable.json (77%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721Upgradeable.json} (78%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC721VotesUpgradeable.json (76%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/ERC721WrapperUpgradeable.json (78%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC7739Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingFractionalUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingOverridableUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingSimpleUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorNoncesKeyedUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/GovernorPreventLateQuorumUpgradeable.json (73%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorProposalGuardianUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSequentialProposalIdUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/GovernorSettingsUpgradeable.json (74%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorStorageUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSuperQuorumUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockAccessUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/GovernorTimelockCompoundUpgradeable.json (77%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/GovernorTimelockControlUpgradeable.json (78%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorUpgradeable.json} (87%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesQuorumFractionUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesSuperQuorumFractionUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesUpgradeable.json} (76%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913WeightedUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/MulticallUpgradeable.json (60%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesKeyedUpgradeable.json} (58%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesUpgradeable.json} (54%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/Ownable2StepUpgradeable.json (77%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/OwnableUpgradeable.json (69%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/PausableUpgradeable.json (70%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json => @openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerECDSAUpgradeable.json} (50%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerERC7913Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerP256Upgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerRSAUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerWebAuthnUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/TimelockControllerUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletCliffUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletUpgradeable.json create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VotesExtendedUpgradeable.json rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/build/contracts/VotesUpgradeable.json (75%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/CrosschainLinkedUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC20Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC7802Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/abstract/BridgeFungibleUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletCliffUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/GovernorUpgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/governance/TimelockControllerUpgradeable.sol (58%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingFractionalUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingOverridableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingSimpleUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorNoncesKeyedUpgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol (52%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorProposalGuardianUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSequentialProposalIdUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSettingsUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorStorageUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSuperQuorumUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockAccessUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockCompoundUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockControlUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesSuperQuorumFractionUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/utils/VotesExtendedUpgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/governance/utils/VotesUpgradeable.sol (53%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ContextUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ForwarderUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/Initializable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/UUPSUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/ERC1155Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/ERC20Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC1363Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20BurnableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CappedUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CrosschainUpgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol (51%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PausableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PermitUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20VotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20WrapperUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC4626Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/ERC6909Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909ContentURIUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909MetadataUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909TokenSupplyUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/ERC721Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721BurnableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721PausableUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721VotesUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721WrapperUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/common/ERC2981Upgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/utils/ContextUpgradeable.sol (70%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/utils/MulticallUpgradeable.sol (62%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesKeyedUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesUpgradeable.sol rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6/security => @openzeppelin-contracts-upgradeable-5.6.1/utils}/PausableUpgradeable.sol (62%) rename dependencies/{@openzeppelin-contracts-upgradeable-4.9.6 => @openzeppelin-contracts-upgradeable-5.6.1}/utils/cryptography/EIP712Upgradeable.sol (53%) create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerECDSAUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerERC7913Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerP256Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerRSAUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/draft-ERC7739Upgradeable.sol create mode 100644 dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/introspection/ERC165Upgradeable.sol create mode 100644 dependencies/rain-lib-hash-0.1.0/LICENSE create mode 100644 dependencies/rain-lib-hash-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-lib-hash-0.1.0/README.md create mode 100644 dependencies/rain-lib-hash-0.1.0/src/LibHashNoAlloc.sol create mode 100644 dependencies/rain-lib-hash-0.1.0/test/LibHashNoAlloc.t.sol create mode 100644 dependencies/rain-lib-hash-0.1.0/test/LibHashSlow.sol create mode 100644 dependencies/rain-lib-typecast-0.1.0/LICENSE create mode 100644 dependencies/rain-lib-typecast-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-lib-typecast-0.1.0/README.md create mode 100644 dependencies/rain-lib-typecast-0.1.0/src/LibCast.sol create mode 100644 dependencies/rain-lib-typecast-0.1.0/src/LibConvert.sol create mode 100644 dependencies/rain-lib-typecast-0.1.0/test/LibCast.t.sol create mode 100644 dependencies/rain-lib-typecast-0.1.0/test/LibConvert.t.sol create mode 100644 dependencies/rain-lib-typecast-0.1.0/test/LibConvertSlow.sol create mode 100644 dependencies/rain-math-float-0.1.1/Cargo.lock create mode 100644 dependencies/rain-math-float-0.1.1/Cargo.toml create mode 100644 dependencies/rain-math-float-0.1.1/LICENSE create mode 100644 dependencies/rain-math-float-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-math-float-0.1.1/README.md create mode 100644 dependencies/rain-math-float-0.1.1/script/BuildPointers.sol create mode 100644 dependencies/rain-math-float-0.1.1/script/CopyArtifacts.sol create mode 100644 dependencies/rain-math-float-0.1.1/script/Deploy.sol create mode 100644 dependencies/rain-math-float-0.1.1/script/lib/LibCopyArtifacts.sol create mode 100644 dependencies/rain-math-float-0.1.1/script/lib/LibEtchLogTables.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/concrete/DecimalFloat.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/error/ErrDecimalFloat.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/error/ErrFormat.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/error/ErrParse.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/generated/LogTables.pointers.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/lib/LibDecimalFloat.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/lib/deploy/LibDecimalFloatDeploy.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/lib/format/LibFormatDecimalFloat.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/lib/implementation/LibDecimalFloatImplementation.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/lib/parse/LibParseDecimalFloat.sol create mode 100644 dependencies/rain-math-float-0.1.1/src/lib/table/LibLogTable.sol create mode 100644 dependencies/rain-metadata-0.1.0/Cargo.lock create mode 100644 dependencies/rain-metadata-0.1.0/Cargo.toml create mode 100644 dependencies/rain-metadata-0.1.0/LICENSE create mode 100644 dependencies/rain-metadata-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt create mode 100644 dependencies/rain-metadata-0.1.0/README.md create mode 100644 dependencies/rain-metadata-0.1.0/script/Deploy.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/concrete/MetaBoard.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/interface/IDescribedByMetaV1.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaBoardV1.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaV1.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaBoardV1_2.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaV1_2.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/lib/LibDescribedByMeta.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/lib/LibMeta.sol create mode 100644 dependencies/rain-metadata-0.1.0/src/lib/deploy/LibMetaBoardDeploy.sol create mode 100644 dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.hash.t.sol create mode 100644 dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.t.sol create mode 100644 dependencies/rain-metadata-0.1.0/test/lib/LibDescribedByMeta.emitForDescribedAddress.t.sol create mode 100644 dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaHashedV1_2.t.sol create mode 100644 dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaUnhashedV1_2.t.sol create mode 100644 dependencies/rain-metadata-0.1.0/test/lib/LibMeta.isRainMetaV1_2.t.sol create mode 100644 dependencies/rain-metadata-0.1.0/test/lib/deploy/LibMetaBoardDeploy.t.sol diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol deleted file mode 100644 index 95be5091..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlCrossChain.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControlCrossChain.sol) - -pragma solidity ^0.8.4; - -import "./AccessControl.sol"; -import "../crosschain/CrossChainEnabled.sol"; - -/** - * @dev An extension to {AccessControl} with support for cross-chain access management. - * For each role, is extension implements an equivalent "aliased" role that is used for - * restricting calls originating from other chains. - * - * For example, if a function `myFunction` is protected by `onlyRole(SOME_ROLE)`, and - * if an address `x` has role `SOME_ROLE`, it would be able to call `myFunction` directly. - * A wallet or contract at the same address on another chain would however not be able - * to call this function. In order to do so, it would require to have the role - * `_crossChainRoleAlias(SOME_ROLE)`. - * - * This aliasing is required to protect against multiple contracts living at the same - * address on different chains but controlled by conflicting entities. - * - * _Available since v4.6._ - */ -abstract contract AccessControlCrossChain is AccessControl, CrossChainEnabled { - bytes32 public constant CROSSCHAIN_ALIAS = keccak256("CROSSCHAIN_ALIAS"); - - /** - * @dev See {AccessControl-_checkRole}. - */ - function _checkRole(bytes32 role) internal view virtual override { - if (_isCrossChain()) { - _checkRole(_crossChainRoleAlias(role), _crossChainSender()); - } else { - super._checkRole(role); - } - } - - /** - * @dev Returns the aliased role corresponding to `role`. - */ - function _crossChainRoleAlias(bytes32 role) internal pure virtual returns (bytes32) { - return role ^ CROSSCHAIN_ALIAS; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol b/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol deleted file mode 100644 index 354e1bed..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlEnumerable.sol +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) - -pragma solidity ^0.8.0; - -import "./IAccessControlEnumerable.sol"; -import "./AccessControl.sol"; -import "../utils/structs/EnumerableSet.sol"; - -/** - * @dev Extension of {AccessControl} that allows enumerating the members of each role. - */ -abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { - using EnumerableSet for EnumerableSet.AddressSet; - - mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev Returns one of the accounts that have `role`. `index` must be a - * value between 0 and {getRoleMemberCount}, non-inclusive. - * - * Role bearers are not sorted in any particular way, and their ordering may - * change at any point. - * - * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure - * you perform all queries on the same block. See the following - * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] - * for more information. - */ - function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { - return _roleMembers[role].at(index); - } - - /** - * @dev Returns the number of accounts that have `role`. Can be used - * together with {getRoleMember} to enumerate all bearers of a role. - */ - function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { - return _roleMembers[role].length(); - } - - /** - * @dev Overload {_grantRole} to track enumerable memberships - */ - function _grantRole(bytes32 role, address account) internal virtual override { - super._grantRole(role, account); - _roleMembers[role].add(account); - } - - /** - * @dev Overload {_revokeRole} to track enumerable memberships - */ - function _revokeRole(bytes32 role, address account) internal virtual override { - super._revokeRole(role, account); - _roleMembers[role].remove(account); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json deleted file mode 100644 index 42081954..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlCrossChain.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "AccessControlCrossChain", - "sourceName": "contracts/access/AccessControlCrossChain.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "CROSSCHAIN_ALIAS", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json deleted file mode 100644 index a7453c45..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Address.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Address", - "sourceName": "contracts/utils/Address.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e314a746944a88937ddf36f70d12597ff2704256740dc7ecc710cd852fcdb75664736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e314a746944a88937ddf36f70d12597ff2704256740dc7ecc710cd852fcdb75664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json deleted file mode 100644 index dfc78a14..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Arrays.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Arrays", - "sourceName": "contracts/utils/Arrays.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f639f3917a7155d9dac2ac79c05c349410ec2f1d4c410d25367ff627cf1d3fcf64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f639f3917a7155d9dac2ac79c05c349410ec2f1d4c410d25367ff627cf1d3fcf64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json deleted file mode 100644 index 1cf1705f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Base64.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Base64", - "sourceName": "contracts/utils/Base64.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d7506eece366c56484c97cb077692615d357c16e59ca917c60a4a727a883f39e64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d7506eece366c56484c97cb077692615d357c16e59ca917c60a4a727a883f39e64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json deleted file mode 100644 index 1c05fd02..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BeaconProxy.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "BeaconProxy", - "sourceName": "contracts/proxy/beacon/BeaconProxy.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "beacon", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405260405161091438038061091483398101604081905261002291610463565b61002e82826000610035565b505061058d565b61003e83610100565b6040516001600160a01b038416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a260008251118061007f5750805b156100fb576100f9836001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e99190610523565b836102a360201b6100291760201c565b505b505050565b610113816102cf60201b6100551760201c565b6101725760405162461bcd60e51b815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e6044820152641d1c9858dd60da1b60648201526084015b60405180910390fd5b6101e6816001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610523565b6102cf60201b6100551760201c565b61024b5760405162461bcd60e51b815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201526f1cc81b9bdd08184818dbdb9d1c9858dd60821b6064820152608401610169565b806102827fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5060001b6102de60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606102c883836040518060600160405280602781526020016108ed602791396102e1565b9392505050565b6001600160a01b03163b151590565b90565b6060600080856001600160a01b0316856040516102fe919061053e565b600060405180830381855af49150503d8060008114610339576040519150601f19603f3d011682016040523d82523d6000602084013e61033e565b606091505b5090925090506103508683838761035a565b9695505050505050565b606083156103c95782516000036103c2576001600160a01b0385163b6103c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610169565b50816103d3565b6103d383836103db565b949350505050565b8151156103eb5781518083602001fd5b8060405162461bcd60e51b8152600401610169919061055a565b80516001600160a01b038116811461041c57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561045257818101518382015260200161043a565b838111156100f95750506000910152565b6000806040838503121561047657600080fd5b61047f83610405565b60208401519092506001600160401b038082111561049c57600080fd5b818501915085601f8301126104b057600080fd5b8151818111156104c2576104c2610421565b604051601f8201601f19908116603f011681019083821181831017156104ea576104ea610421565b8160405282815288602084870101111561050357600080fd5b610514836020830160208801610437565b80955050505050509250929050565b60006020828403121561053557600080fd5b6102c882610405565b60008251610550818460208701610437565b9190910192915050565b6020815260008251806020840152610579816040850160208701610437565b601f01601f19169190910160400192915050565b6103518061059c6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f560279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061024c565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a5565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b60608315610210578251600003610209576001600160a01b0385163b6102095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b508161021a565b61021a8383610222565b949350505050565b8151156102325781518083602001fd5b8060405162461bcd60e51b815260040161020091906102c1565b60006020828403121561025e57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b83811015610290578181015183820152602001610278565b8381111561029f576000848401525b50505050565b600082516102b7818460208701610275565b9190910192915050565b60208152600082518060208401526102e0816040850160208701610275565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e1837ee2a5e3e46daae239d8e33725bdb2ac92b33d5244f5ae7544f9e9658be064736f6c634300080d0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b610100565b565b606061004e83836040518060600160405280602781526020016102f560279139610124565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50546001600160a01b031690565b6001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100fb919061024c565b905090565b3660008037600080366000845af43d6000803e80801561011f573d6000f35b3d6000fd5b6060600080856001600160a01b03168560405161014191906102a5565b600060405180830381855af49150503d806000811461017c576040519150601f19603f3d011682016040523d82523d6000602084013e610181565b606091505b50915091506101928683838761019c565b9695505050505050565b60608315610210578251600003610209576001600160a01b0385163b6102095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b508161021a565b61021a8383610222565b949350505050565b8151156102325781518083602001fd5b8060405162461bcd60e51b815260040161020091906102c1565b60006020828403121561025e57600080fd5b81516001600160a01b038116811461004e57600080fd5b60005b83811015610290578181015183820152602001610278565b8381111561029f576000848401525b50505050565b600082516102b7818460208701610275565b9190910192915050565b60208152600082518060208401526102e0816040850160208701610275565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e1837ee2a5e3e46daae239d8e33725bdb2ac92b33d5244f5ae7544f9e9658be064736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json deleted file mode 100644 index ab189332..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/BitMaps.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "BitMaps", - "sourceName": "contracts/utils/structs/BitMaps.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208b2adfe7bc81a58a2a40a020a408f71785946afd343d6940099885382a9553b564736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208b2adfe7bc81a58a2a40a020a408f71785946afd343d6940099885382a9553b564736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json deleted file mode 100644 index 05930f42..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Checkpoints.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Checkpoints", - "sourceName": "contracts/utils/Checkpoints.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220617bccba49cb0196ad9890fb1d0c0c2a021397699f8832f9ff7f6826148d784964736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220617bccba49cb0196ad9890fb1d0c0c2a021397699f8832f9ff7f6826148d784964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json deleted file mode 100644 index ea1fd247..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Clones.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Clones", - "sourceName": "contracts/proxy/Clones.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bfa180daadd7577892dd23a92f94613264d53e31a9dea0fac999d868b9e5972464736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bfa180daadd7577892dd23a92f94613264d53e31a9dea0fac999d868b9e5972464736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json deleted file mode 100644 index 2cad814e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ConditionalEscrow.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ConditionalEscrow", - "sourceName": "contracts/utils/escrow/ConditionalEscrow.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "depositsOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "payee", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "withdrawalAllowed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json deleted file mode 100644 index 1a85ce86..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Counters.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Counters", - "sourceName": "contracts/utils/Counters.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a0f2d371d3902f9f97698ff62207f2be404c635a455462f7975038bd4ff06c2864736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a0f2d371d3902f9f97698ff62207f2be404c635a455462f7975038bd4ff06c2864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json deleted file mode 100644 index 52cfa2bc..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Create2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Create2", - "sourceName": "contracts/utils/Create2.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d29aa4630276ec2d362f51009f42de367181a9e9a4f354f2123aad436a259b2c64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d29aa4630276ec2d362f51009f42de367181a9e9a4f354f2123aad436a259b2c64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json deleted file mode 100644 index 7fe3848b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledAMB.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledAMB", - "sourceName": "contracts/crosschain/amb/CrossChainEnabledAMB.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "bridge", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - } - ], - "bytecode": "0x60a0604052348015600f57600080fd5b5060405160bc38038060bc833981016040819052602a91603a565b6001600160a01b03166080526068565b600060208284031215604b57600080fd5b81516001600160a01b0381168114606157600080fd5b9392505050565b608051603f607d60003960005050603f6000f3fe6080604052600080fdfea2646970667358221220d3427256f2cc3966b4327f0cdded16f31ea2ff6a19d775d665ac0029b652013b64736f6c634300080d0033", - "deployedBytecode": "0x6080604052600080fdfea2646970667358221220d3427256f2cc3966b4327f0cdded16f31ea2ff6a19d775d665ac0029b652013b64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json deleted file mode 100644 index 7230266a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledArbitrumL1", - "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol", - "abi": [], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json deleted file mode 100644 index 4a367a58..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledArbitrumL2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledArbitrumL2", - "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol", - "abi": [], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json deleted file mode 100644 index 533ab64e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledOptimism.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledOptimism", - "sourceName": "contracts/crosschain/optimism/CrossChainEnabledOptimism.sol", - "abi": [], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json deleted file mode 100644 index 3cca555f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabledPolygonChild.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledPolygonChild", - "sourceName": "contracts/crosschain/polygon/CrossChainEnabledPolygonChild.sol", - "abi": [ - { - "inputs": [], - "name": "NotCrossChainCall", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "rootMessageSender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "processMessageFromRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json deleted file mode 100644 index 1d0a264a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/DoubleEndedQueue.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "DoubleEndedQueue", - "sourceName": "contracts/utils/structs/DoubleEndedQueue.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "inputs": [], - "name": "OutOfBounds", - "type": "error" - } - ], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220810d96be5927e34adabd6068f9ce6b4ad1f4b37b56f64e58e90015980790a52a64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220810d96be5927e34adabd6068f9ce6b4ad1f4b37b56f64e58e90015980790a52a64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json deleted file mode 100644 index ce3aded8..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ECDSA.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ECDSA", - "sourceName": "contracts/utils/cryptography/ECDSA.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122000bc104fa1e28b55e0005c74a91dd6b3f202b227c6abc94b269ade7db7eb296d64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122000bc104fa1e28b55e0005c74a91dd6b3f202b227c6abc94b269ade7db7eb296d64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json deleted file mode 100644 index 8486b360..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1155", - "sourceName": "contracts/token/ERC1155/ERC1155.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "uri_", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b50604051620015cb380380620015cb83398101604081905262000034916200011b565b6200003f8162000046565b5062000233565b80516200005b9060029060208401906200005f565b5050565b8280546200006d90620001f7565b90600052602060002090601f016020900481019282620000915760008555620000dc565b82601f10620000ac57805160ff1916838001178555620000dc565b82800160010185558215620000dc579182015b82811115620000dc578251825591602001919060010190620000bf565b50620000ea929150620000ee565b5090565b5b80821115620000ea5760008155600101620000ef565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156200012f57600080fd5b82516001600160401b03808211156200014757600080fd5b818501915085601f8301126200015c57600080fd5b81518181111562000171576200017162000105565b604051601f8201601f19908116603f011681019083821181831017156200019c576200019c62000105565b816040528281528886848701011115620001b557600080fd5b600093505b82841015620001d95784840186015181850187015292850192620001ba565b82841115620001eb5760008684830101525b98975050505050505050565b600181811c908216806200020c57607f821691505b6020821081036200022d57634e487b7160e01b600052602260045260246000fd5b50919050565b61138880620002436000396000f3fe608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b3f565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b82565b610222565b60405190151581526020016100a9565b6100e86100e3366004610ba6565b610274565b6040516100a99190610c0c565b610108610103366004610d6b565b610308565b005b61011d610118366004610e15565b610354565b6040516100a99190610f1b565b610108610138366004610f2e565b61047e565b6100c561014b366004610f6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b610108610187366004610f9d565b61048d565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025357506001600160e01b031982166303a24d0760e21b145b8061026e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461028390611002565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90611002565b80156102fc5780601f106102d1576101008083540402835291602001916102fc565b820191906000526020600020905b8154815290600101906020018083116102df57829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103245750610324853361014b565b6103405760405162461bcd60e51b81526004016101f39061103c565b61034d85858585856104d2565b5050505050565b606081518351146103b95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d5576103d5610c1f565b6040519080825280602002602001820160405280156103fe578160200160208202803683370190505b50905060005b8451811015610476576104498582815181106104225761042261108a565b602002602001015185838151811061043c5761043c61108a565b602002602001015161018c565b82828151811061045b5761045b61108a565b602090810291909101015261046f816110b6565b9050610404565b509392505050565b6104893383836106af565b5050565b6001600160a01b0385163314806104a957506104a9853361014b565b6104c55760405162461bcd60e51b81526004016101f39061103c565b61034d858585858561078f565b81518351146105345760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055a5760405162461bcd60e51b81526004016101f3906110cf565b3360005b845181101561064157600085828151811061057b5761057b61108a565b6020026020010151905060008583815181106105995761059961108a565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156105e95760405162461bcd60e51b81526004016101f390611114565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062690849061115e565b925050819055505050508061063a906110b6565b905061055e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610691929190611176565b60405180910390a46106a78187878787876108b9565b505050505050565b816001600160a01b0316836001600160a01b0316036107225760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107b55760405162461bcd60e51b81526004016101f3906110cf565b3360006107c185610a1d565b905060006107ce85610a1d565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156108115760405162461bcd60e51b81526004016101f390611114565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061084e90849061115e565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108ae848a8a8a8a8a610a68565b505050505050505050565b6001600160a01b0384163b156106a75760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906108fd90899089908890889088906004016111a4565b6020604051808303816000875af1925050508015610938575060408051601f3d908101601f1916820190925261093591810190611202565b60015b6109e45761094461121f565b806308c379a00361097d575061095861123b565b80610963575061097f565b8060405162461bcd60e51b81526004016101f39190610c0c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a5757610a5761108a565b602090810291909101015292915050565b6001600160a01b0384163b156106a75760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610aac908990899088908890889060040161130d565b6020604051808303816000875af1925050508015610ae7575060408051601f3d908101601f19168201909252610ae491810190611202565b60015b610af35761094461121f565b6001600160e01b0319811663f23a6e6160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b80356001600160a01b0381168114610b3a57600080fd5b919050565b60008060408385031215610b5257600080fd5b610b5b83610b23565b946020939093013593505050565b6001600160e01b031981168114610b7f57600080fd5b50565b600060208284031215610b9457600080fd5b8135610b9f81610b69565b9392505050565b600060208284031215610bb857600080fd5b5035919050565b6000815180845260005b81811015610be557602081850181015186830182015201610bc9565b81811115610bf7576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610b9f6020830184610bbf565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c5b57610c5b610c1f565b6040525050565b600067ffffffffffffffff821115610c7c57610c7c610c1f565b5060051b60200190565b600082601f830112610c9757600080fd5b81356020610ca482610c62565b604051610cb18282610c35565b83815260059390931b8501820192828101915086841115610cd157600080fd5b8286015b84811015610cec5780358352918301918301610cd5565b509695505050505050565b600082601f830112610d0857600080fd5b813567ffffffffffffffff811115610d2257610d22610c1f565b604051610d39601f8301601f191660200182610c35565b818152846020838601011115610d4e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8357600080fd5b610d8c86610b23565b9450610d9a60208701610b23565b9350604086013567ffffffffffffffff80821115610db757600080fd5b610dc389838a01610c86565b94506060880135915080821115610dd957600080fd5b610de589838a01610c86565b93506080880135915080821115610dfb57600080fd5b50610e0888828901610cf7565b9150509295509295909350565b60008060408385031215610e2857600080fd5b823567ffffffffffffffff80821115610e4057600080fd5b818501915085601f830112610e5457600080fd5b81356020610e6182610c62565b604051610e6e8282610c35565b83815260059390931b8501820192828101915089841115610e8e57600080fd5b948201945b83861015610eb357610ea486610b23565b82529482019490820190610e93565b96505086013592505080821115610ec957600080fd5b50610ed685828601610c86565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1057815187529582019590820190600101610ef4565b509495945050505050565b602081526000610b9f6020830184610ee0565b60008060408385031215610f4157600080fd5b610f4a83610b23565b915060208301358015158114610f5f57600080fd5b809150509250929050565b60008060408385031215610f7d57600080fd5b610f8683610b23565b9150610f9460208401610b23565b90509250929050565b600080600080600060a08688031215610fb557600080fd5b610fbe86610b23565b9450610fcc60208701610b23565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ff657600080fd5b610e0888828901610cf7565b600181811c9082168061101657607f821691505b60208210810361103657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110c8576110c86110a0565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611171576111716110a0565b500190565b6040815260006111896040830185610ee0565b828103602084015261119b8185610ee0565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d090830186610ee0565b82810360608401526111e28186610ee0565b905082810360808401526111f68185610bbf565b98975050505050505050565b60006020828403121561121457600080fd5b8151610b9f81610b69565b600060033d11156112385760046000803e5060005160e01c5b90565b600060443d10156112495790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561127957505050505090565b82850191508151818111156112915750505050505090565b843d87010160208285010111156112ab5750505050505090565b6112ba60208286010187610c35565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061134790830184610bbf565b97965050505050505056fea26469706673582212202f31a5ed9841bb19ea3048d1ee82155c8ba6a9a7cec7bee194b0e339d260147f64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b3f565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b82565b610222565b60405190151581526020016100a9565b6100e86100e3366004610ba6565b610274565b6040516100a99190610c0c565b610108610103366004610d6b565b610308565b005b61011d610118366004610e15565b610354565b6040516100a99190610f1b565b610108610138366004610f2e565b61047e565b6100c561014b366004610f6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b610108610187366004610f9d565b61048d565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025357506001600160e01b031982166303a24d0760e21b145b8061026e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461028390611002565b80601f01602080910402602001604051908101604052809291908181526020018280546102af90611002565b80156102fc5780601f106102d1576101008083540402835291602001916102fc565b820191906000526020600020905b8154815290600101906020018083116102df57829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103245750610324853361014b565b6103405760405162461bcd60e51b81526004016101f39061103c565b61034d85858585856104d2565b5050505050565b606081518351146103b95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d5576103d5610c1f565b6040519080825280602002602001820160405280156103fe578160200160208202803683370190505b50905060005b8451811015610476576104498582815181106104225761042261108a565b602002602001015185838151811061043c5761043c61108a565b602002602001015161018c565b82828151811061045b5761045b61108a565b602090810291909101015261046f816110b6565b9050610404565b509392505050565b6104893383836106af565b5050565b6001600160a01b0385163314806104a957506104a9853361014b565b6104c55760405162461bcd60e51b81526004016101f39061103c565b61034d858585858561078f565b81518351146105345760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055a5760405162461bcd60e51b81526004016101f3906110cf565b3360005b845181101561064157600085828151811061057b5761057b61108a565b6020026020010151905060008583815181106105995761059961108a565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156105e95760405162461bcd60e51b81526004016101f390611114565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062690849061115e565b925050819055505050508061063a906110b6565b905061055e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610691929190611176565b60405180910390a46106a78187878787876108b9565b505050505050565b816001600160a01b0316836001600160a01b0316036107225760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107b55760405162461bcd60e51b81526004016101f3906110cf565b3360006107c185610a1d565b905060006107ce85610a1d565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156108115760405162461bcd60e51b81526004016101f390611114565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061084e90849061115e565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108ae848a8a8a8a8a610a68565b505050505050505050565b6001600160a01b0384163b156106a75760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906108fd90899089908890889088906004016111a4565b6020604051808303816000875af1925050508015610938575060408051601f3d908101601f1916820190925261093591810190611202565b60015b6109e45761094461121f565b806308c379a00361097d575061095861123b565b80610963575061097f565b8060405162461bcd60e51b81526004016101f39190610c0c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a5757610a5761108a565b602090810291909101015292915050565b6001600160a01b0384163b156106a75760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610aac908990899088908890889060040161130d565b6020604051808303816000875af1925050508015610ae7575060408051601f3d908101601f19168201909252610ae491810190611202565b60015b610af35761094461121f565b6001600160e01b0319811663f23a6e6160e01b14610a145760405162461bcd60e51b81526004016101f3906112c5565b80356001600160a01b0381168114610b3a57600080fd5b919050565b60008060408385031215610b5257600080fd5b610b5b83610b23565b946020939093013593505050565b6001600160e01b031981168114610b7f57600080fd5b50565b600060208284031215610b9457600080fd5b8135610b9f81610b69565b9392505050565b600060208284031215610bb857600080fd5b5035919050565b6000815180845260005b81811015610be557602081850181015186830182015201610bc9565b81811115610bf7576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610b9f6020830184610bbf565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c5b57610c5b610c1f565b6040525050565b600067ffffffffffffffff821115610c7c57610c7c610c1f565b5060051b60200190565b600082601f830112610c9757600080fd5b81356020610ca482610c62565b604051610cb18282610c35565b83815260059390931b8501820192828101915086841115610cd157600080fd5b8286015b84811015610cec5780358352918301918301610cd5565b509695505050505050565b600082601f830112610d0857600080fd5b813567ffffffffffffffff811115610d2257610d22610c1f565b604051610d39601f8301601f191660200182610c35565b818152846020838601011115610d4e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8357600080fd5b610d8c86610b23565b9450610d9a60208701610b23565b9350604086013567ffffffffffffffff80821115610db757600080fd5b610dc389838a01610c86565b94506060880135915080821115610dd957600080fd5b610de589838a01610c86565b93506080880135915080821115610dfb57600080fd5b50610e0888828901610cf7565b9150509295509295909350565b60008060408385031215610e2857600080fd5b823567ffffffffffffffff80821115610e4057600080fd5b818501915085601f830112610e5457600080fd5b81356020610e6182610c62565b604051610e6e8282610c35565b83815260059390931b8501820192828101915089841115610e8e57600080fd5b948201945b83861015610eb357610ea486610b23565b82529482019490820190610e93565b96505086013592505080821115610ec957600080fd5b50610ed685828601610c86565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1057815187529582019590820190600101610ef4565b509495945050505050565b602081526000610b9f6020830184610ee0565b60008060408385031215610f4157600080fd5b610f4a83610b23565b915060208301358015158114610f5f57600080fd5b809150509250929050565b60008060408385031215610f7d57600080fd5b610f8683610b23565b9150610f9460208401610b23565b90509250929050565b600080600080600060a08688031215610fb557600080fd5b610fbe86610b23565b9450610fcc60208701610b23565b93506040860135925060608601359150608086013567ffffffffffffffff811115610ff657600080fd5b610e0888828901610cf7565b600181811c9082168061101657607f821691505b60208210810361103657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110c8576110c86110a0565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611171576111716110a0565b500190565b6040815260006111896040830185610ee0565b828103602084015261119b8185610ee0565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d090830186610ee0565b82810360608401526111e28186610ee0565b905082810360808401526111f68185610bbf565b98975050505050505050565b60006020828403121561121457600080fd5b8151610b9f81610b69565b600060033d11156112385760046000803e5060005160e01c5b90565b600060443d10156112495790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561127957505050505090565b82850191508151818111156112915750505050505090565b843d87010160208285010111156112ab5750505050505090565b6112ba60208286010187610c35565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061134790830184610bbf565b97965050505050505056fea26469706673582212202f31a5ed9841bb19ea3048d1ee82155c8ba6a9a7cec7bee194b0e339d260147f64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json deleted file mode 100644 index f4780bf9..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Holder.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1155Holder", - "sourceName": "contracts/token/ERC1155/utils/ERC1155Holder.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506103c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212209e59a98cec3bcfd01c6cf17362bae2a8fe30630fad8342f10ae79d6ad274689d64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212209e59a98cec3bcfd01c6cf17362bae2a8fe30630fad8342f10ae79d6ad274689d64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json deleted file mode 100644 index 7c9cb800..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155PresetMinterPauser.json +++ /dev/null @@ -1,743 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1155PresetMinterPauser", - "sourceName": "contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "uri", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "burnBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "mintBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162002d6138038062002d618339810160408190526200003491620002e7565b806200004081620000b7565b506005805460ff1916905562000058600033620000d0565b620000847f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000d0565b620000b07f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000d0565b50620003ff565b8051620000cc9060049060208401906200022b565b5050565b620000cc8282620000ed82826200011960201b62000a871760201c565b60008281526001602090815260409091206200011491839062000b0b620001b9821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000cc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001753390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001d0836001600160a01b038416620001d9565b90505b92915050565b60008181526001830160205260408120546200022257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001d3565b506000620001d3565b8280546200023990620003c3565b90600052602060002090601f0160209004810192826200025d5760008555620002a8565b82601f106200027857805160ff1916838001178555620002a8565b82800160010185558215620002a8579182015b82811115620002a85782518255916020019190600101906200028b565b50620002b6929150620002ba565b5090565b5b80821115620002b65760008155600101620002bb565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215620002fb57600080fd5b82516001600160401b03808211156200031357600080fd5b818501915085601f8301126200032857600080fd5b8151818111156200033d576200033d620002d1565b604051601f8201601f19908116603f01168101908382118183101715620003685762000368620002d1565b8160405282815288868487010111156200038157600080fd5b600093505b82841015620003a5578484018601518185018701529285019262000386565b82841115620003b75760008684830101525b98975050505050505050565b600181811c90821680620003d857607f821691505b602082108103620003f957634e487b7160e01b600052602260045260246000fd5b50919050565b612952806200040f6000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c8063731133e9116100de578063ca15c87311610097578063e63ab1e911610071578063e63ab1e914610358578063e985e9c51461037f578063f242432a146103bb578063f5298aca146103ce57600080fd5b8063ca15c8731461030b578063d53913931461031e578063d547741f1461034557600080fd5b8063731133e9146102975780638456cb59146102aa5780639010d07c146102b257806391d14854146102dd578063a217fddf146102f0578063a22cb465146102f857600080fd5b80632f2ff15d116101305780632f2ff15d1461022b57806336568abe1461023e5780633f4ba83a146102515780634e1273f4146102595780635c975abb146102795780636b20c4541461028457600080fd5b8062fdd58e1461017757806301ffc9a71461019d5780630e89341c146101c05780631f7fdffa146101e0578063248a9ca3146101f55780632eb2c2d614610218575b600080fd5b61018a610185366004611ce9565b6103e1565b6040519081526020015b60405180910390f35b6101b06101ab366004611d29565b61047c565b6040519015158152602001610194565b6101d36101ce366004611d46565b610487565b6040516101949190611db7565b6101f36101ee366004611f16565b61051b565b005b61018a610203366004611d46565b60009081526020819052604090206001015490565b6101f3610226366004611faf565b610573565b6101f3610239366004612059565b6105bf565b6101f361024c366004612059565b6105e9565b6101f3610667565b61026c610267366004612085565b61070d565b604051610194919061218b565b60055460ff166101b0565b6101f361029236600461219e565b610837565b6101f36102a5366004612212565b61087a565b6101f36108cc565b6102c56102c0366004612267565b610970565b6040516001600160a01b039091168152602001610194565b6101b06102eb366004612059565b61098f565b61018a600081565b6101f3610306366004612289565b6109b8565b61018a610319366004611d46565b6109c3565b61018a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101f3610353366004612059565b6109da565b61018a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101b061038d3660046122c5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101f36103c93660046122ef565b6109ff565b6101f36103dc366004612354565b610a44565b60006001600160a01b0383166104515760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b600061047682610b20565b60606004805461049690612387565b80601f01602080910402602001604051908101604052809291908181526020018280546104c290612387565b801561050f5780601f106104e45761010080835404028352916020019161050f565b820191906000526020600020905b8154815290600101906020018083116104f257829003601f168201915b50505050509050919050565b6105457f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6105615760405162461bcd60e51b8152600401610448906123c1565b61056d84848484610b60565b50505050565b6001600160a01b03851633148061058f575061058f853361038d565b6105ab5760405162461bcd60e51b81526004016104489061241e565b6105b88585858585610cbb565b5050505050565b6000828152602081905260409020600101546105da81610e68565b6105e48383610e75565b505050565b6001600160a01b03811633146106595760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610448565b6106638282610e97565b5050565b6106917f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6107035760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610448565b61070b610eb9565b565b606081518351146107725760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610448565b6000835167ffffffffffffffff81111561078e5761078e611dca565b6040519080825280602002602001820160405280156107b7578160200160208202803683370190505b50905060005b845181101561082f576108028582815181106107db576107db61246c565b60200260200101518583815181106107f5576107f561246c565b60200260200101516103e1565b8282815181106108145761081461246c565b602090810291909101015261082881612498565b90506107bd565b509392505050565b6001600160a01b0383163314806108535750610853833361038d565b61086f5760405162461bcd60e51b81526004016104489061241e565b6105e4838383610f0b565b6108a47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6108c05760405162461bcd60e51b8152600401610448906123c1565b61056d848484846110aa565b6108f67f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6109685760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610448565b61070b611195565b600082815260016020526040812061098890836111d2565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6106633383836111de565b6000818152600160205260408120610476906112be565b6000828152602081905260409020600101546109f581610e68565b6105e48383610e97565b6001600160a01b038516331480610a1b5750610a1b853361038d565b610a375760405162461bcd60e51b81526004016104489061241e565b6105b885858585856112c8565b6001600160a01b038316331480610a605750610a60833361038d565b610a7c5760405162461bcd60e51b81526004016104489061241e565b6105e4838383611404565b610a91828261098f565b610663576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610ac73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610988836001600160a01b038416611520565b60006001600160e01b03198216636cdb3d1360e11b1480610b5157506001600160e01b031982166303a24d0760e21b145b8061047657506104768261156f565b6001600160a01b038416610b865760405162461bcd60e51b8152600401610448906124b1565b8151835114610ba75760405162461bcd60e51b8152600401610448906124f2565b33610bb781600087878787611594565b60005b8451811015610c5357838181518110610bd557610bd561246c565b602002602001015160026000878481518110610bf357610bf361246c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c3b919061253a565b90915550819050610c4b81612498565b915050610bba565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ca4929190612552565b60405180910390a46105b8816000878787876115a2565b8151835114610cdc5760405162461bcd60e51b8152600401610448906124f2565b6001600160a01b038416610d025760405162461bcd60e51b815260040161044890612580565b33610d11818787878787611594565b60005b8451811015610dfa576000858281518110610d3157610d3161246c565b602002602001015190506000858381518110610d4f57610d4f61246c565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610da05760405162461bcd60e51b8152600401610448906125c5565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610ddf90849061253a565b9250508190555050505080610df390612498565b9050610d14565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e4a929190612552565b60405180910390a4610e608187878787876115a2565b505050505050565b610e7281336116fd565b50565b610e7f8282610a87565b60008281526001602052604090206105e49082610b0b565b610ea18282611756565b60008281526001602052604090206105e490826117bb565b610ec16117d0565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f315760405162461bcd60e51b81526004016104489061260f565b8051825114610f525760405162461bcd60e51b8152600401610448906124f2565b6000339050610f7581856000868660405180602001604052806000815250611594565b60005b835181101561103d576000848281518110610f9557610f9561246c565b602002602001015190506000848381518110610fb357610fb361246c565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156110045760405162461bcd60e51b815260040161044890612652565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061103581612498565b915050610f78565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161108e929190612552565b60405180910390a460408051602081019091526000905261056d565b6001600160a01b0384166110d05760405162461bcd60e51b8152600401610448906124b1565b3360006110dc85611819565b905060006110e985611819565b90506110fa83600089858589611594565b60008681526002602090815260408083206001600160a01b038b1684529091528120805487929061112c90849061253a565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461118c83600089898989611864565b50505050505050565b61119d61191f565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610eee3390565b60006109888383611965565b816001600160a01b0316836001600160a01b0316036112515760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610448565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610476825490565b6001600160a01b0384166112ee5760405162461bcd60e51b815260040161044890612580565b3360006112fa85611819565b9050600061130785611819565b9050611317838989858589611594565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561135a5760405162461bcd60e51b8152600401610448906125c5565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061139990849061253a565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46113f9848a8a8a8a8a611864565b505050505050505050565b6001600160a01b03831661142a5760405162461bcd60e51b81526004016104489061260f565b33600061143684611819565b9050600061144384611819565b905061146383876000858560405180602001604052806000815250611594565b60008581526002602090815260408083206001600160a01b038a168452909152902054848110156114a65760405162461bcd60e51b815260040161044890612652565b60008681526002602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a460408051602081019091526000905261118c565b600081815260018301602052604081205461156757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610476565b506000610476565b60006001600160e01b03198216635a05180f60e01b148061047657506104768261198f565b610e608686868686866119c4565b6001600160a01b0384163b15610e605760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115e69089908990889088908890600401612696565b6020604051808303816000875af1925050508015611621575060408051601f3d908101601f1916820190925261161e918101906126f4565b60015b6116cd5761162d612711565b806308c379a003611666575061164161272d565b8061164c5750611668565b8060405162461bcd60e51b81526004016104489190611db7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610448565b6001600160e01b0319811663bc197c8160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b611707828261098f565b6106635761171481611a2c565b61171f836020611a3e565b6040516020016117309291906127ff565b60408051601f198184030181529082905262461bcd60e51b825261044891600401611db7565b611760828261098f565b15610663576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610988836001600160a01b038416611bda565b60055460ff1661070b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610448565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106118535761185361246c565b602090810291909101015292915050565b6001600160a01b0384163b15610e605760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906118a89089908990889088908890600401612874565b6020604051808303816000875af19250505080156118e3575060408051601f3d908101601f191682019092526118e0918101906126f4565b60015b6118ef5761162d612711565b6001600160e01b0319811663f23a6e6160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b60055460ff161561070b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610448565b600082600001828154811061197c5761197c61246c565b9060005260206000200154905092915050565b60006001600160e01b03198216637965db0b60e01b148061047657506301ffc9a760e01b6001600160e01b0319831614610476565b60055460ff1615610e605760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610448565b60606104766001600160a01b03831660145b60606000611a4d8360026128b9565b611a5890600261253a565b67ffffffffffffffff811115611a7057611a70611dca565b6040519080825280601f01601f191660200182016040528015611a9a576020820181803683370190505b509050600360fc1b81600081518110611ab557611ab561246c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611ae457611ae461246c565b60200101906001600160f81b031916908160001a9053506000611b088460026128b9565b611b1390600161253a565b90505b6001811115611b8b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b4757611b4761246c565b1a60f81b828281518110611b5d57611b5d61246c565b60200101906001600160f81b031916908160001a90535060049490941c93611b84816128d8565b9050611b16565b5083156109885760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610448565b60008181526001830160205260408120548015611cc3576000611bfe6001836128ef565b8554909150600090611c12906001906128ef565b9050818114611c77576000866000018281548110611c3257611c3261246c565b9060005260206000200154905080876000018481548110611c5557611c5561246c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c8857611c88612906565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610476565b6000915050610476565b80356001600160a01b0381168114611ce457600080fd5b919050565b60008060408385031215611cfc57600080fd5b611d0583611ccd565b946020939093013593505050565b6001600160e01b031981168114610e7257600080fd5b600060208284031215611d3b57600080fd5b813561098881611d13565b600060208284031215611d5857600080fd5b5035919050565b60005b83811015611d7a578181015183820152602001611d62565b8381111561056d5750506000910152565b60008151808452611da3816020860160208601611d5f565b601f01601f19169290920160200192915050565b6020815260006109886020830184611d8b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611e0657611e06611dca565b6040525050565b600067ffffffffffffffff821115611e2757611e27611dca565b5060051b60200190565b600082601f830112611e4257600080fd5b81356020611e4f82611e0d565b604051611e5c8282611de0565b83815260059390931b8501820192828101915086841115611e7c57600080fd5b8286015b84811015611e975780358352918301918301611e80565b509695505050505050565b600082601f830112611eb357600080fd5b813567ffffffffffffffff811115611ecd57611ecd611dca565b604051611ee4601f8301601f191660200182611de0565b818152846020838601011115611ef957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611f2c57600080fd5b611f3585611ccd565b9350602085013567ffffffffffffffff80821115611f5257600080fd5b611f5e88838901611e31565b94506040870135915080821115611f7457600080fd5b611f8088838901611e31565b93506060870135915080821115611f9657600080fd5b50611fa387828801611ea2565b91505092959194509250565b600080600080600060a08688031215611fc757600080fd5b611fd086611ccd565b9450611fde60208701611ccd565b9350604086013567ffffffffffffffff80821115611ffb57600080fd5b61200789838a01611e31565b9450606088013591508082111561201d57600080fd5b61202989838a01611e31565b9350608088013591508082111561203f57600080fd5b5061204c88828901611ea2565b9150509295509295909350565b6000806040838503121561206c57600080fd5b8235915061207c60208401611ccd565b90509250929050565b6000806040838503121561209857600080fd5b823567ffffffffffffffff808211156120b057600080fd5b818501915085601f8301126120c457600080fd5b813560206120d182611e0d565b6040516120de8282611de0565b83815260059390931b85018201928281019150898411156120fe57600080fd5b948201945b838610156121235761211486611ccd565b82529482019490820190612103565b9650508601359250508082111561213957600080fd5b5061214685828601611e31565b9150509250929050565b600081518084526020808501945080840160005b8381101561218057815187529582019590820190600101612164565b509495945050505050565b6020815260006109886020830184612150565b6000806000606084860312156121b357600080fd5b6121bc84611ccd565b9250602084013567ffffffffffffffff808211156121d957600080fd5b6121e587838801611e31565b935060408601359150808211156121fb57600080fd5b5061220886828701611e31565b9150509250925092565b6000806000806080858703121561222857600080fd5b61223185611ccd565b93506020850135925060408501359150606085013567ffffffffffffffff81111561225b57600080fd5b611fa387828801611ea2565b6000806040838503121561227a57600080fd5b50508035926020909101359150565b6000806040838503121561229c57600080fd5b6122a583611ccd565b9150602083013580151581146122ba57600080fd5b809150509250929050565b600080604083850312156122d857600080fd5b6122e183611ccd565b915061207c60208401611ccd565b600080600080600060a0868803121561230757600080fd5b61231086611ccd565b945061231e60208701611ccd565b93506040860135925060608601359150608086013567ffffffffffffffff81111561234857600080fd5b61204c88828901611ea2565b60008060006060848603121561236957600080fd5b61237284611ccd565b95602085013595506040909401359392505050565b600181811c9082168061239b57607f821691505b6020821081036123bb57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124aa576124aa612482565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000821982111561254d5761254d612482565b500190565b6040815260006125656040830185612150565b82810360208401526125778185612150565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906126c290830186612150565b82810360608401526126d48186612150565b905082810360808401526126e88185611d8b565b98975050505050505050565b60006020828403121561270657600080fd5b815161098881611d13565b600060033d111561272a5760046000803e5060005160e01c5b90565b600060443d101561273b5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561276b57505050505090565b82850191508151818111156127835750505050505090565b843d870101602082850101111561279d5750505050505090565b6127ac60208286010187611de0565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612837816017850160208801611d5f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612868816028840160208801611d5f565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906128ae90830184611d8b565b979650505050505050565b60008160001904831182151516156128d3576128d3612482565b500290565b6000816128e7576128e7612482565b506000190190565b60008282101561290157612901612482565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201e4cf5e83555322760dcba378b8422e055cfb74fd9f205bcf5d1b2b3554faaf664736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101725760003560e01c8063731133e9116100de578063ca15c87311610097578063e63ab1e911610071578063e63ab1e914610358578063e985e9c51461037f578063f242432a146103bb578063f5298aca146103ce57600080fd5b8063ca15c8731461030b578063d53913931461031e578063d547741f1461034557600080fd5b8063731133e9146102975780638456cb59146102aa5780639010d07c146102b257806391d14854146102dd578063a217fddf146102f0578063a22cb465146102f857600080fd5b80632f2ff15d116101305780632f2ff15d1461022b57806336568abe1461023e5780633f4ba83a146102515780634e1273f4146102595780635c975abb146102795780636b20c4541461028457600080fd5b8062fdd58e1461017757806301ffc9a71461019d5780630e89341c146101c05780631f7fdffa146101e0578063248a9ca3146101f55780632eb2c2d614610218575b600080fd5b61018a610185366004611ce9565b6103e1565b6040519081526020015b60405180910390f35b6101b06101ab366004611d29565b61047c565b6040519015158152602001610194565b6101d36101ce366004611d46565b610487565b6040516101949190611db7565b6101f36101ee366004611f16565b61051b565b005b61018a610203366004611d46565b60009081526020819052604090206001015490565b6101f3610226366004611faf565b610573565b6101f3610239366004612059565b6105bf565b6101f361024c366004612059565b6105e9565b6101f3610667565b61026c610267366004612085565b61070d565b604051610194919061218b565b60055460ff166101b0565b6101f361029236600461219e565b610837565b6101f36102a5366004612212565b61087a565b6101f36108cc565b6102c56102c0366004612267565b610970565b6040516001600160a01b039091168152602001610194565b6101b06102eb366004612059565b61098f565b61018a600081565b6101f3610306366004612289565b6109b8565b61018a610319366004611d46565b6109c3565b61018a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6101f3610353366004612059565b6109da565b61018a7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101b061038d3660046122c5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101f36103c93660046122ef565b6109ff565b6101f36103dc366004612354565b610a44565b60006001600160a01b0383166104515760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b600061047682610b20565b60606004805461049690612387565b80601f01602080910402602001604051908101604052809291908181526020018280546104c290612387565b801561050f5780601f106104e45761010080835404028352916020019161050f565b820191906000526020600020905b8154815290600101906020018083116104f257829003601f168201915b50505050509050919050565b6105457f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6105615760405162461bcd60e51b8152600401610448906123c1565b61056d84848484610b60565b50505050565b6001600160a01b03851633148061058f575061058f853361038d565b6105ab5760405162461bcd60e51b81526004016104489061241e565b6105b88585858585610cbb565b5050505050565b6000828152602081905260409020600101546105da81610e68565b6105e48383610e75565b505050565b6001600160a01b03811633146106595760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610448565b6106638282610e97565b5050565b6106917f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6107035760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610448565b61070b610eb9565b565b606081518351146107725760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610448565b6000835167ffffffffffffffff81111561078e5761078e611dca565b6040519080825280602002602001820160405280156107b7578160200160208202803683370190505b50905060005b845181101561082f576108028582815181106107db576107db61246c565b60200260200101518583815181106107f5576107f561246c565b60200260200101516103e1565b8282815181106108145761081461246c565b602090810291909101015261082881612498565b90506107bd565b509392505050565b6001600160a01b0383163314806108535750610853833361038d565b61086f5760405162461bcd60e51b81526004016104489061241e565b6105e4838383610f0b565b6108a47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361098f565b6108c05760405162461bcd60e51b8152600401610448906123c1565b61056d848484846110aa565b6108f67f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361098f565b6109685760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610448565b61070b611195565b600082815260016020526040812061098890836111d2565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6106633383836111de565b6000818152600160205260408120610476906112be565b6000828152602081905260409020600101546109f581610e68565b6105e48383610e97565b6001600160a01b038516331480610a1b5750610a1b853361038d565b610a375760405162461bcd60e51b81526004016104489061241e565b6105b885858585856112c8565b6001600160a01b038316331480610a605750610a60833361038d565b610a7c5760405162461bcd60e51b81526004016104489061241e565b6105e4838383611404565b610a91828261098f565b610663576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610ac73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610988836001600160a01b038416611520565b60006001600160e01b03198216636cdb3d1360e11b1480610b5157506001600160e01b031982166303a24d0760e21b145b8061047657506104768261156f565b6001600160a01b038416610b865760405162461bcd60e51b8152600401610448906124b1565b8151835114610ba75760405162461bcd60e51b8152600401610448906124f2565b33610bb781600087878787611594565b60005b8451811015610c5357838181518110610bd557610bd561246c565b602002602001015160026000878481518110610bf357610bf361246c565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c3b919061253a565b90915550819050610c4b81612498565b915050610bba565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ca4929190612552565b60405180910390a46105b8816000878787876115a2565b8151835114610cdc5760405162461bcd60e51b8152600401610448906124f2565b6001600160a01b038416610d025760405162461bcd60e51b815260040161044890612580565b33610d11818787878787611594565b60005b8451811015610dfa576000858281518110610d3157610d3161246c565b602002602001015190506000858381518110610d4f57610d4f61246c565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610da05760405162461bcd60e51b8152600401610448906125c5565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610ddf90849061253a565b9250508190555050505080610df390612498565b9050610d14565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e4a929190612552565b60405180910390a4610e608187878787876115a2565b505050505050565b610e7281336116fd565b50565b610e7f8282610a87565b60008281526001602052604090206105e49082610b0b565b610ea18282611756565b60008281526001602052604090206105e490826117bb565b610ec16117d0565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f315760405162461bcd60e51b81526004016104489061260f565b8051825114610f525760405162461bcd60e51b8152600401610448906124f2565b6000339050610f7581856000868660405180602001604052806000815250611594565b60005b835181101561103d576000848281518110610f9557610f9561246c565b602002602001015190506000848381518110610fb357610fb361246c565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156110045760405162461bcd60e51b815260040161044890612652565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061103581612498565b915050610f78565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161108e929190612552565b60405180910390a460408051602081019091526000905261056d565b6001600160a01b0384166110d05760405162461bcd60e51b8152600401610448906124b1565b3360006110dc85611819565b905060006110e985611819565b90506110fa83600089858589611594565b60008681526002602090815260408083206001600160a01b038b1684529091528120805487929061112c90849061253a565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461118c83600089898989611864565b50505050505050565b61119d61191f565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610eee3390565b60006109888383611965565b816001600160a01b0316836001600160a01b0316036112515760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610448565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610476825490565b6001600160a01b0384166112ee5760405162461bcd60e51b815260040161044890612580565b3360006112fa85611819565b9050600061130785611819565b9050611317838989858589611594565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561135a5760405162461bcd60e51b8152600401610448906125c5565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061139990849061253a565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46113f9848a8a8a8a8a611864565b505050505050505050565b6001600160a01b03831661142a5760405162461bcd60e51b81526004016104489061260f565b33600061143684611819565b9050600061144384611819565b905061146383876000858560405180602001604052806000815250611594565b60008581526002602090815260408083206001600160a01b038a168452909152902054848110156114a65760405162461bcd60e51b815260040161044890612652565b60008681526002602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a460408051602081019091526000905261118c565b600081815260018301602052604081205461156757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610476565b506000610476565b60006001600160e01b03198216635a05180f60e01b148061047657506104768261198f565b610e608686868686866119c4565b6001600160a01b0384163b15610e605760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906115e69089908990889088908890600401612696565b6020604051808303816000875af1925050508015611621575060408051601f3d908101601f1916820190925261161e918101906126f4565b60015b6116cd5761162d612711565b806308c379a003611666575061164161272d565b8061164c5750611668565b8060405162461bcd60e51b81526004016104489190611db7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610448565b6001600160e01b0319811663bc197c8160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b611707828261098f565b6106635761171481611a2c565b61171f836020611a3e565b6040516020016117309291906127ff565b60408051601f198184030181529082905262461bcd60e51b825261044891600401611db7565b611760828261098f565b15610663576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610988836001600160a01b038416611bda565b60055460ff1661070b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610448565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106118535761185361246c565b602090810291909101015292915050565b6001600160a01b0384163b15610e605760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906118a89089908990889088908890600401612874565b6020604051808303816000875af19250505080156118e3575060408051601f3d908101601f191682019092526118e0918101906126f4565b60015b6118ef5761162d612711565b6001600160e01b0319811663f23a6e6160e01b1461118c5760405162461bcd60e51b8152600401610448906127b7565b60055460ff161561070b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610448565b600082600001828154811061197c5761197c61246c565b9060005260206000200154905092915050565b60006001600160e01b03198216637965db0b60e01b148061047657506301ffc9a760e01b6001600160e01b0319831614610476565b60055460ff1615610e605760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610448565b60606104766001600160a01b03831660145b60606000611a4d8360026128b9565b611a5890600261253a565b67ffffffffffffffff811115611a7057611a70611dca565b6040519080825280601f01601f191660200182016040528015611a9a576020820181803683370190505b509050600360fc1b81600081518110611ab557611ab561246c565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611ae457611ae461246c565b60200101906001600160f81b031916908160001a9053506000611b088460026128b9565b611b1390600161253a565b90505b6001811115611b8b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611b4757611b4761246c565b1a60f81b828281518110611b5d57611b5d61246c565b60200101906001600160f81b031916908160001a90535060049490941c93611b84816128d8565b9050611b16565b5083156109885760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610448565b60008181526001830160205260408120548015611cc3576000611bfe6001836128ef565b8554909150600090611c12906001906128ef565b9050818114611c77576000866000018281548110611c3257611c3261246c565b9060005260206000200154905080876000018481548110611c5557611c5561246c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c8857611c88612906565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610476565b6000915050610476565b80356001600160a01b0381168114611ce457600080fd5b919050565b60008060408385031215611cfc57600080fd5b611d0583611ccd565b946020939093013593505050565b6001600160e01b031981168114610e7257600080fd5b600060208284031215611d3b57600080fd5b813561098881611d13565b600060208284031215611d5857600080fd5b5035919050565b60005b83811015611d7a578181015183820152602001611d62565b8381111561056d5750506000910152565b60008151808452611da3816020860160208601611d5f565b601f01601f19169290920160200192915050565b6020815260006109886020830184611d8b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611e0657611e06611dca565b6040525050565b600067ffffffffffffffff821115611e2757611e27611dca565b5060051b60200190565b600082601f830112611e4257600080fd5b81356020611e4f82611e0d565b604051611e5c8282611de0565b83815260059390931b8501820192828101915086841115611e7c57600080fd5b8286015b84811015611e975780358352918301918301611e80565b509695505050505050565b600082601f830112611eb357600080fd5b813567ffffffffffffffff811115611ecd57611ecd611dca565b604051611ee4601f8301601f191660200182611de0565b818152846020838601011115611ef957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611f2c57600080fd5b611f3585611ccd565b9350602085013567ffffffffffffffff80821115611f5257600080fd5b611f5e88838901611e31565b94506040870135915080821115611f7457600080fd5b611f8088838901611e31565b93506060870135915080821115611f9657600080fd5b50611fa387828801611ea2565b91505092959194509250565b600080600080600060a08688031215611fc757600080fd5b611fd086611ccd565b9450611fde60208701611ccd565b9350604086013567ffffffffffffffff80821115611ffb57600080fd5b61200789838a01611e31565b9450606088013591508082111561201d57600080fd5b61202989838a01611e31565b9350608088013591508082111561203f57600080fd5b5061204c88828901611ea2565b9150509295509295909350565b6000806040838503121561206c57600080fd5b8235915061207c60208401611ccd565b90509250929050565b6000806040838503121561209857600080fd5b823567ffffffffffffffff808211156120b057600080fd5b818501915085601f8301126120c457600080fd5b813560206120d182611e0d565b6040516120de8282611de0565b83815260059390931b85018201928281019150898411156120fe57600080fd5b948201945b838610156121235761211486611ccd565b82529482019490820190612103565b9650508601359250508082111561213957600080fd5b5061214685828601611e31565b9150509250929050565b600081518084526020808501945080840160005b8381101561218057815187529582019590820190600101612164565b509495945050505050565b6020815260006109886020830184612150565b6000806000606084860312156121b357600080fd5b6121bc84611ccd565b9250602084013567ffffffffffffffff808211156121d957600080fd5b6121e587838801611e31565b935060408601359150808211156121fb57600080fd5b5061220886828701611e31565b9150509250925092565b6000806000806080858703121561222857600080fd5b61223185611ccd565b93506020850135925060408501359150606085013567ffffffffffffffff81111561225b57600080fd5b611fa387828801611ea2565b6000806040838503121561227a57600080fd5b50508035926020909101359150565b6000806040838503121561229c57600080fd5b6122a583611ccd565b9150602083013580151581146122ba57600080fd5b809150509250929050565b600080604083850312156122d857600080fd5b6122e183611ccd565b915061207c60208401611ccd565b600080600080600060a0868803121561230757600080fd5b61231086611ccd565b945061231e60208701611ccd565b93506040860135925060608601359150608086013567ffffffffffffffff81111561234857600080fd5b61204c88828901611ea2565b60008060006060848603121561236957600080fd5b61237284611ccd565b95602085013595506040909401359392505050565b600181811c9082168061239b57607f821691505b6020821081036123bb57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016124aa576124aa612482565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000821982111561254d5761254d612482565b500190565b6040815260006125656040830185612150565b82810360208401526125778185612150565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906126c290830186612150565b82810360608401526126d48186612150565b905082810360808401526126e88185611d8b565b98975050505050505050565b60006020828403121561270657600080fd5b815161098881611d13565b600060033d111561272a5760046000803e5060005160e01c5b90565b600060443d101561273b5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561276b57505050505090565b82850191508151818111156127835750505050505090565b843d870101602082850101111561279d5750505050505090565b6127ac60208286010187611de0565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612837816017850160208801611d5f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612868816028840160208801611d5f565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906128ae90830184611d8b565b979650505050505050565b60008160001904831182151516156128d3576128d3612482565b500290565b6000816128e7576128e7612482565b506000190190565b60008282101561290157612901612482565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212201e4cf5e83555322760dcba378b8422e055cfb74fd9f205bcf5d1b2b3554faaf664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json deleted file mode 100644 index 33c93ba4..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Checker.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC165Checker", - "sourceName": "contracts/utils/introspection/ERC165Checker.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e6cd488a95ebc63e0022dd975fdc218ce3b7c04e8100e41d5952999f20cb29e164736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220e6cd488a95ebc63e0022dd975fdc218ce3b7c04e8100e41d5952999f20cb29e164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json deleted file mode 100644 index 73e465ab..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165Storage.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC165Storage", - "sourceName": "contracts/utils/introspection/ERC165Storage.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json deleted file mode 100644 index 261797e5..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1820Implementer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1820Implementer", - "sourceName": "contracts/utils/introspection/ERC1820Implementer.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "interfaceHash", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "canImplementInterfaceForAddress", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610114806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a4565b604e565b60405190815260200160405180910390f35b6000828152602081815260408083206001600160a01b038516845290915281205460ff16607b576000609d565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b657600080fd5b8235915060208301356001600160a01b038116811460d357600080fd5b80915050925092905056fea2646970667358221220a5979d2eef8916fee729d245f887d0acab4fec8979c537f4d26331a22797461964736f6c634300080d0033", - "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a4565b604e565b60405190815260200160405180910390f35b6000828152602081815260408083206001600160a01b038516845290915281205460ff16607b576000609d565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b657600080fd5b8235915060208301356001600160a01b038116811460d357600080fd5b80915050925092905056fea2646970667358221220a5979d2eef8916fee729d245f887d0acab4fec8979c537f4d26331a22797461964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json deleted file mode 100644 index 8d9f451b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Proxy.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1967Proxy", - "sourceName": "contracts/proxy/ERC1967/ERC1967Proxy.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405260405161073b38038061073b83398101604081905261002291610321565b61002e82826000610035565b505061043e565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d08383604051806060016040528060278152602001610714602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ef565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b8152600401610148919061040b565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b838111156100645750506000910152565b6000806040838503121561033457600080fd5b82516001600160a01b038116811461034b57600080fd5b60208401519092506001600160401b038082111561036857600080fd5b818501915085601f83011261037c57600080fd5b81518181111561038e5761038e6102df565b604051601f8201601f19908116603f011681019083821181831017156103b6576103b66102df565b816040528281528860208487010111156103cf57600080fd5b6103e08360208301602088016102f5565b80955050505050509250929050565b600082516104018184602087016102f5565b9190910192915050565b602081526000825180602084015261042a8160408501602087016102f5565b601f01601f19169190910160400192915050565b6102c78061044d6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161026b602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061021b565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f9190610237565b60005b838110156102065781810151838201526020016101ee565b83811115610215576000848401525b50505050565b6000825161022d8184602087016101eb565b9190910192915050565b60208152600082518060208401526102568160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122076c43ef7e83f3f5d4e9f67a47bb741a482d559078b0eb91b700166478c77577664736f6c634300080d0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161026b602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061021b565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f9190610237565b60005b838110156102065781810151838201526020016101ee565b83811115610215576000848401525b50505050565b6000825161022d8184602087016101eb565b9190910192915050565b60208152600082518060208401526102568160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122076c43ef7e83f3f5d4e9f67a47bb741a482d559078b0eb91b700166478c77577664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json deleted file mode 100644 index b827aab3..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1967Upgrade.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1967Upgrade", - "sourceName": "contracts/proxy/ERC1967/ERC1967Upgrade.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json deleted file mode 100644 index e1f5a7ac..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20", - "sourceName": "contracts/token/ERC20/ERC20.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000aed38038062000aed8339810160408190526200003491620001db565b81516200004990600390602085019062000068565b5080516200005f90600490602084019062000068565b50505062000281565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b6020821081036200027b57634e487b7160e01b600052602260045260246000fd5b50919050565b61085c80620002916000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610800565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b6020821081036107fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082157634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212208ea3918651cefe661c47475f544a91c156156839b9d304a33b7b43e599a312a064736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610800565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b6020821081036107fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082157634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212208ea3918651cefe661c47475f544a91c156156839b9d304a33b7b43e599a312a064736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json deleted file mode 100644 index 50963fb0..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Capped.json +++ /dev/null @@ -1,294 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20Capped", - "sourceName": "contracts/token/ERC20/extensions/ERC20Capped.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json deleted file mode 100644 index 7d889bcb..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetFixedSupply.json +++ /dev/null @@ -1,338 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20PresetFixedSupply", - "sourceName": "contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000dd738038062000dd78339810160408190526200003491620002bb565b8351849084906200004d90600390602085019062000148565b5080516200006390600490602084019062000148565b5050506200007881836200008260201b60201c565b50505050620003b3565b6001600160a01b038216620000dd5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620000f1919062000350565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b828054620001569062000377565b90600052602060002090601f0160209004810192826200017a5760008555620001c5565b82601f106200019557805160ff1916838001178555620001c5565b82800160010185558215620001c5579182015b82811115620001c5578251825591602001919060010190620001a8565b50620001d3929150620001d7565b5090565b5b80821115620001d35760008155600101620001d8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200021657600080fd5b81516001600160401b0380821115620002335762000233620001ee565b604051601f8301601f19908116603f011681019082821181831017156200025e576200025e620001ee565b816040528381526020925086838588010111156200027b57600080fd5b600091505b838210156200029f578582018301518183018401529082019062000280565b83821115620002b15760008385830101525b9695505050505050565b60008060008060808587031215620002d257600080fd5b84516001600160401b0380821115620002ea57600080fd5b620002f88883890162000204565b955060208701519150808211156200030f57600080fd5b506200031e8782880162000204565b60408701516060880151919550935090506001600160a01b03811681146200034557600080fd5b939692955090935050565b600082198211156200037257634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200038c57607f821691505b602082108103620003ad57634e487b7160e01b600052602260045260246000fd5b50919050565b610a1480620003c36000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806342966c681161008c57806395d89b411161006657806395d89b41146101ad578063a457c2d7146101b5578063a9059cbb146101c8578063dd62ed3e146101db57600080fd5b806342966c681461015c57806370a082311461017157806379cc67901461019a57600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd14610127578063313ce5671461013a5780633950935114610149575b600080fd5b6100dc6101ee565b6040516100e99190610839565b60405180910390f35b6101056101003660046108aa565b610280565b60405190151581526020016100e9565b6002545b6040519081526020016100e9565b6101056101353660046108d4565b610298565b604051601281526020016100e9565b6101056101573660046108aa565b6102bc565b61016f61016a366004610910565b6102de565b005b61011961017f366004610929565b6001600160a01b031660009081526020819052604090205490565b61016f6101a83660046108aa565b6102eb565b6100dc610304565b6101056101c33660046108aa565b610313565b6101056101d63660046108aa565b610393565b6101196101e936600461094b565b6103a1565b6060600380546101fd9061097e565b80601f01602080910402602001604051908101604052809291908181526020018280546102299061097e565b80156102765780601f1061024b57610100808354040283529160200191610276565b820191906000526020600020905b81548152906001019060200180831161025957829003601f168201915b5050505050905090565b60003361028e8185856103cc565b5060019392505050565b6000336102a68582856104f1565b6102b185858561056b565b506001949350505050565b60003361028e8185856102cf83836103a1565b6102d991906109b8565b6103cc565b6102e8338261070f565b50565b6102f68233836104f1565b610300828261070f565b5050565b6060600480546101fd9061097e565b6000338161032182866103a1565b9050838110156103865760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102b182868684036103cc565b60003361028e81858561056b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661042e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161037d565b6001600160a01b03821661048f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161037d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006104fd84846103a1565b9050600019811461056557818110156105585760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161037d565b61056584848484036103cc565b50505050565b6001600160a01b0383166105cf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161037d565b6001600160a01b0382166106315760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161037d565b6001600160a01b038316600090815260208190526040902054818110156106a95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161037d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610565565b6001600160a01b03821661076f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161037d565b6001600160a01b038216600090815260208190526040902054818110156107e35760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161037d565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016104e4565b600060208083528351808285015260005b818110156108665785810183015185820160400152820161084a565b81811115610878576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146108a557600080fd5b919050565b600080604083850312156108bd57600080fd5b6108c68361088e565b946020939093013593505050565b6000806000606084860312156108e957600080fd5b6108f28461088e565b92506109006020850161088e565b9150604084013590509250925092565b60006020828403121561092257600080fd5b5035919050565b60006020828403121561093b57600080fd5b6109448261088e565b9392505050565b6000806040838503121561095e57600080fd5b6109678361088e565b91506109756020840161088e565b90509250929050565b600181811c9082168061099257607f821691505b6020821081036109b257634e487b7160e01b600052602260045260246000fd5b50919050565b600082198211156109d957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220efa1bda0e839940aa63cf7f615e0adac1c5d575a4340ac463f90db7de2dbf48f64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806342966c681161008c57806395d89b411161006657806395d89b41146101ad578063a457c2d7146101b5578063a9059cbb146101c8578063dd62ed3e146101db57600080fd5b806342966c681461015c57806370a082311461017157806379cc67901461019a57600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd14610127578063313ce5671461013a5780633950935114610149575b600080fd5b6100dc6101ee565b6040516100e99190610839565b60405180910390f35b6101056101003660046108aa565b610280565b60405190151581526020016100e9565b6002545b6040519081526020016100e9565b6101056101353660046108d4565b610298565b604051601281526020016100e9565b6101056101573660046108aa565b6102bc565b61016f61016a366004610910565b6102de565b005b61011961017f366004610929565b6001600160a01b031660009081526020819052604090205490565b61016f6101a83660046108aa565b6102eb565b6100dc610304565b6101056101c33660046108aa565b610313565b6101056101d63660046108aa565b610393565b6101196101e936600461094b565b6103a1565b6060600380546101fd9061097e565b80601f01602080910402602001604051908101604052809291908181526020018280546102299061097e565b80156102765780601f1061024b57610100808354040283529160200191610276565b820191906000526020600020905b81548152906001019060200180831161025957829003601f168201915b5050505050905090565b60003361028e8185856103cc565b5060019392505050565b6000336102a68582856104f1565b6102b185858561056b565b506001949350505050565b60003361028e8185856102cf83836103a1565b6102d991906109b8565b6103cc565b6102e8338261070f565b50565b6102f68233836104f1565b610300828261070f565b5050565b6060600480546101fd9061097e565b6000338161032182866103a1565b9050838110156103865760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102b182868684036103cc565b60003361028e81858561056b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661042e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161037d565b6001600160a01b03821661048f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161037d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006104fd84846103a1565b9050600019811461056557818110156105585760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161037d565b61056584848484036103cc565b50505050565b6001600160a01b0383166105cf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161037d565b6001600160a01b0382166106315760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161037d565b6001600160a01b038316600090815260208190526040902054818110156106a95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161037d565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610565565b6001600160a01b03821661076f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161037d565b6001600160a01b038216600090815260208190526040902054818110156107e35760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161037d565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016104e4565b600060208083528351808285015260005b818110156108665785810183015185820160400152820161084a565b81811115610878576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146108a557600080fd5b919050565b600080604083850312156108bd57600080fd5b6108c68361088e565b946020939093013593505050565b6000806000606084860312156108e957600080fd5b6108f28461088e565b92506109006020850161088e565b9150604084013590509250925092565b60006020828403121561092257600080fd5b5035919050565b60006020828403121561093b57600080fd5b6109448261088e565b9392505050565b6000806040838503121561095e57600080fd5b6109678361088e565b91506109756020840161088e565b90509250929050565b600181811c9082168061099257607f821691505b6020821081036109b257634e487b7160e01b600052602260045260246000fd5b50919050565b600082198211156109d957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220efa1bda0e839940aa63cf7f615e0adac1c5d575a4340ac463f90db7de2dbf48f64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json deleted file mode 100644 index de11d250..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20PresetMinterPauser.json +++ /dev/null @@ -1,672 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20PresetMinterPauser", - "sourceName": "contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001d1038038062001d108339810160408190526200003491620003b5565b8151829082906200004d90600590602085019062000242565b5080516200006390600690602084019062000242565b50506007805460ff19169055506200007d600033620000dd565b620000a97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000dd565b620000d57f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000dd565b50506200045b565b620000e98282620000ed565b5050565b6200010482826200013060201b6200093d1760201c565b60008281526001602090815260409091206200012b918390620009c1620001d0821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000e9576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200018c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001e7836001600160a01b038416620001f0565b90505b92915050565b60008181526001830160205260408120546200023957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001ea565b506000620001ea565b82805462000250906200041f565b90600052602060002090601f016020900481019282620002745760008555620002bf565b82601f106200028f57805160ff1916838001178555620002bf565b82800160010185558215620002bf579182015b82811115620002bf578251825591602001919060010190620002a2565b50620002cd929150620002d1565b5090565b5b80821115620002cd5760008155600101620002d2565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200031057600080fd5b81516001600160401b03808211156200032d576200032d620002e8565b604051601f8301601f19908116603f01168101908282118183101715620003585762000358620002e8565b816040528381526020925086838588010111156200037557600080fd5b600091505b838210156200039957858201830151818301840152908201906200037a565b83821115620003ab5760008385830101525b9695505050505050565b60008060408385031215620003c957600080fd5b82516001600160401b0380821115620003e157600080fd5b620003ef86838701620002fe565b935060208501519150808211156200040657600080fd5b506200041585828601620002fe565b9150509250929050565b600181811c908216806200043457607f821691505b6020821081036200045557634e487b7160e01b600052602260045260246000fd5b50919050565b6118a5806200046b6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063a457c2d711610097578063d539139311610071578063d5391393146103af578063d547741f146103d6578063dd62ed3e146103e9578063e63ab1e9146103fc57600080fd5b8063a457c2d714610376578063a9059cbb14610389578063ca15c8731461039c57600080fd5b80639010d07c116100d35780639010d07c1461032857806391d148541461035357806395d89b4114610366578063a217fddf1461036e57600080fd5b806370a08231146102e457806379cc67901461030d5780638456cb591461032057600080fd5b8063313ce567116101665780633f4ba83a116101405780633f4ba83a146102ab57806340c10f19146102b357806342966c68146102c65780635c975abb146102d957600080fd5b8063313ce5671461027657806336568abe14610285578063395093511461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d736600461154c565b610423565b60405190151581526020015b60405180910390f35b6101f961044e565b6040516101e891906115a2565b6101dc6102143660046115f1565b6104e0565b6004545b6040519081526020016101e8565b6101dc61023936600461161b565b6104f8565b61021d61024c366004611657565b60009081526020819052604090206001015490565b61027461026f366004611670565b61051c565b005b604051601281526020016101e8565b610274610293366004611670565b610546565b6101dc6102a63660046115f1565b6105c9565b6102746105eb565b6102746102c13660046115f1565b610691565b6102746102d4366004611657565b610730565b60075460ff166101dc565b61021d6102f236600461169c565b6001600160a01b031660009081526002602052604090205490565b61027461031b3660046115f1565b61073d565b610274610752565b61033b6103363660046116b7565b6107f6565b6040516001600160a01b0390911681526020016101e8565b6101dc610361366004611670565b610815565b6101f961083e565b61021d600081565b6101dc6103843660046115f1565b61084d565b6101dc6103973660046115f1565b6108c8565b61021d6103aa366004611657565b6108d6565b61021d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102746103e4366004611670565b6108ed565b61021d6103f73660046116d9565b610912565b61021d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60006001600160e01b03198216635a05180f60e01b14806104485750610448826109d6565b92915050565b60606005805461045d90611703565b80601f016020809104026020016040519081016040528092919081815260200182805461048990611703565b80156104d65780601f106104ab576101008083540402835291602001916104d6565b820191906000526020600020905b8154815290600101906020018083116104b957829003601f168201915b5050505050905090565b6000336104ee818585610a0b565b5060019392505050565b600033610506858285610b2f565b610511858585610ba9565b506001949350505050565b60008281526020819052604090206001015461053781610d5f565b6105418383610d69565b505050565b6001600160a01b03811633146105bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105c58282610d8b565b5050565b6000336104ee8185856105dc8383610912565b6105e69190611753565b610a0b565b6106157f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6106875760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105b2565b61068f610dad565b565b6106bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610815565b6107265760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105b2565b6105c58282610dff565b61073a3382610ecc565b50565b610748823383610b2f565b6105c58282610ecc565b61077c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6107ee5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105b2565b61068f61100c565b600082815260016020526040812061080e9083611049565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461045d90611703565b6000338161085b8286610912565b9050838110156108bb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105b2565b6105118286868403610a0b565b6000336104ee818585610ba9565b600081815260016020526040812061044890611055565b60008281526020819052604090206001015461090881610d5f565b6105418383610d8b565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6109478282610815565b6105c5576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561097d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061080e836001600160a01b03841661105f565b60006001600160e01b03198216637965db0b60e01b148061044857506301ffc9a760e01b6001600160e01b0319831614610448565b6001600160a01b038316610a6d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b2565b6001600160a01b038216610ace5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b2565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610b3b8484610912565b90506000198114610ba35781811015610b965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105b2565b610ba38484848403610a0b565b50505050565b6001600160a01b038316610c0d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b2565b6001600160a01b038216610c6f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b2565b610c7a8383836110ae565b6001600160a01b03831660009081526002602052604090205481811015610cf25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105b2565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d529086815260200190565b60405180910390a3610ba3565b61073a81336110b9565b610d73828261093d565b600082815260016020526040902061054190826109c1565b610d958282611112565b60008281526001602052604090206105419082611177565b610db561118c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e555760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105b2565b610e61600083836110ae565b8060046000828254610e739190611753565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f2c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105b2565b610f38826000836110ae565b6001600160a01b03821660009081526002602052604090205481811015610fac5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105b2565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6110146111d5565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610de23390565b600061080e838361121b565b6000610448825490565b60008181526001830160205260408120546110a657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610448565b506000610448565b610541838383611245565b6110c38282610815565b6105c5576110d0816112ab565b6110db8360206112bd565b6040516020016110ec92919061176b565b60408051601f198184030181529082905262461bcd60e51b82526105b2916004016115a2565b61111c8282610815565b156105c5576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061080e836001600160a01b038416611459565b60075460ff1661068f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105b2565b60075460ff161561068f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105b2565b6000826000018281548110611232576112326117e0565b9060005260206000200154905092915050565b60075460ff16156105415760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105b2565b60606104486001600160a01b03831660145b606060006112cc8360026117f6565b6112d7906002611753565b67ffffffffffffffff8111156112ef576112ef611815565b6040519080825280601f01601f191660200182016040528015611319576020820181803683370190505b509050600360fc1b81600081518110611334576113346117e0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611363576113636117e0565b60200101906001600160f81b031916908160001a90535060006113878460026117f6565b611392906001611753565b90505b600181111561140a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113c6576113c66117e0565b1a60f81b8282815181106113dc576113dc6117e0565b60200101906001600160f81b031916908160001a90535060049490941c936114038161182b565b9050611395565b50831561080e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b6000818152600183016020526040812054801561154257600061147d600183611842565b855490915060009061149190600190611842565b90508181146114f65760008660000182815481106114b1576114b16117e0565b90600052602060002001549050808760000184815481106114d4576114d46117e0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061150757611507611859565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610448565b6000915050610448565b60006020828403121561155e57600080fd5b81356001600160e01b03198116811461080e57600080fd5b60005b83811015611591578181015183820152602001611579565b83811115610ba35750506000910152565b60208152600082518060208401526115c1816040850160208701611576565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115ec57600080fd5b919050565b6000806040838503121561160457600080fd5b61160d836115d5565b946020939093013593505050565b60008060006060848603121561163057600080fd5b611639846115d5565b9250611647602085016115d5565b9150604084013590509250925092565b60006020828403121561166957600080fd5b5035919050565b6000806040838503121561168357600080fd5b82359150611693602084016115d5565b90509250929050565b6000602082840312156116ae57600080fd5b61080e826115d5565b600080604083850312156116ca57600080fd5b50508035926020909101359150565b600080604083850312156116ec57600080fd5b6116f5836115d5565b9150611693602084016115d5565b600181811c9082168061171757607f821691505b60208210810361173757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117665761176661173d565b500190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117a3816017850160208801611576565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117d4816028840160208801611576565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b60008160001904831182151516156118105761181061173d565b500290565b634e487b7160e01b600052604160045260246000fd5b60008161183a5761183a61173d565b506000190190565b6000828210156118545761185461173d565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206fe5c7cf3a386933ec322d482e544de06b06ae04a5ab2d7be7a5ee80e55a9f6764736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370a08231116100f9578063a457c2d711610097578063d539139311610071578063d5391393146103af578063d547741f146103d6578063dd62ed3e146103e9578063e63ab1e9146103fc57600080fd5b8063a457c2d714610376578063a9059cbb14610389578063ca15c8731461039c57600080fd5b80639010d07c116100d35780639010d07c1461032857806391d148541461035357806395d89b4114610366578063a217fddf1461036e57600080fd5b806370a08231146102e457806379cc67901461030d5780638456cb591461032057600080fd5b8063313ce567116101665780633f4ba83a116101405780633f4ba83a146102ab57806340c10f19146102b357806342966c68146102c65780635c975abb146102d957600080fd5b8063313ce5671461027657806336568abe14610285578063395093511461029857600080fd5b806318160ddd116101a257806318160ddd1461021957806323b872dd1461022b578063248a9ca31461023e5780632f2ff15d1461026157600080fd5b806301ffc9a7146101c957806306fdde03146101f1578063095ea7b314610206575b600080fd5b6101dc6101d736600461154c565b610423565b60405190151581526020015b60405180910390f35b6101f961044e565b6040516101e891906115a2565b6101dc6102143660046115f1565b6104e0565b6004545b6040519081526020016101e8565b6101dc61023936600461161b565b6104f8565b61021d61024c366004611657565b60009081526020819052604090206001015490565b61027461026f366004611670565b61051c565b005b604051601281526020016101e8565b610274610293366004611670565b610546565b6101dc6102a63660046115f1565b6105c9565b6102746105eb565b6102746102c13660046115f1565b610691565b6102746102d4366004611657565b610730565b60075460ff166101dc565b61021d6102f236600461169c565b6001600160a01b031660009081526002602052604090205490565b61027461031b3660046115f1565b61073d565b610274610752565b61033b6103363660046116b7565b6107f6565b6040516001600160a01b0390911681526020016101e8565b6101dc610361366004611670565b610815565b6101f961083e565b61021d600081565b6101dc6103843660046115f1565b61084d565b6101dc6103973660046115f1565b6108c8565b61021d6103aa366004611657565b6108d6565b61021d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102746103e4366004611670565b6108ed565b61021d6103f73660046116d9565b610912565b61021d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60006001600160e01b03198216635a05180f60e01b14806104485750610448826109d6565b92915050565b60606005805461045d90611703565b80601f016020809104026020016040519081016040528092919081815260200182805461048990611703565b80156104d65780601f106104ab576101008083540402835291602001916104d6565b820191906000526020600020905b8154815290600101906020018083116104b957829003601f168201915b5050505050905090565b6000336104ee818585610a0b565b5060019392505050565b600033610506858285610b2f565b610511858585610ba9565b506001949350505050565b60008281526020819052604090206001015461053781610d5f565b6105418383610d69565b505050565b6001600160a01b03811633146105bb5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105c58282610d8b565b5050565b6000336104ee8185856105dc8383610912565b6105e69190611753565b610a0b565b6106157f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6106875760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105b2565b61068f610dad565b565b6106bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610815565b6107265760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105b2565b6105c58282610dff565b61073a3382610ecc565b50565b610748823383610b2f565b6105c58282610ecc565b61077c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610815565b6107ee5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105b2565b61068f61100c565b600082815260016020526040812061080e9083611049565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461045d90611703565b6000338161085b8286610912565b9050838110156108bb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105b2565b6105118286868403610a0b565b6000336104ee818585610ba9565b600081815260016020526040812061044890611055565b60008281526020819052604090206001015461090881610d5f565b6105418383610d8b565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6109478282610815565b6105c5576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561097d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061080e836001600160a01b03841661105f565b60006001600160e01b03198216637965db0b60e01b148061044857506301ffc9a760e01b6001600160e01b0319831614610448565b6001600160a01b038316610a6d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b2565b6001600160a01b038216610ace5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b2565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610b3b8484610912565b90506000198114610ba35781811015610b965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105b2565b610ba38484848403610a0b565b50505050565b6001600160a01b038316610c0d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b2565b6001600160a01b038216610c6f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b2565b610c7a8383836110ae565b6001600160a01b03831660009081526002602052604090205481811015610cf25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105b2565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d529086815260200190565b60405180910390a3610ba3565b61073a81336110b9565b610d73828261093d565b600082815260016020526040902061054190826109c1565b610d958282611112565b60008281526001602052604090206105419082611177565b610db561118c565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610e555760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105b2565b610e61600083836110ae565b8060046000828254610e739190611753565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f2c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105b2565b610f38826000836110ae565b6001600160a01b03821660009081526002602052604090205481811015610fac5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105b2565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6110146111d5565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610de23390565b600061080e838361121b565b6000610448825490565b60008181526001830160205260408120546110a657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610448565b506000610448565b610541838383611245565b6110c38282610815565b6105c5576110d0816112ab565b6110db8360206112bd565b6040516020016110ec92919061176b565b60408051601f198184030181529082905262461bcd60e51b82526105b2916004016115a2565b61111c8282610815565b156105c5576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061080e836001600160a01b038416611459565b60075460ff1661068f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105b2565b60075460ff161561068f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105b2565b6000826000018281548110611232576112326117e0565b9060005260206000200154905092915050565b60075460ff16156105415760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105b2565b60606104486001600160a01b03831660145b606060006112cc8360026117f6565b6112d7906002611753565b67ffffffffffffffff8111156112ef576112ef611815565b6040519080825280601f01601f191660200182016040528015611319576020820181803683370190505b509050600360fc1b81600081518110611334576113346117e0565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611363576113636117e0565b60200101906001600160f81b031916908160001a90535060006113878460026117f6565b611392906001611753565b90505b600181111561140a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113c6576113c66117e0565b1a60f81b8282815181106113dc576113dc6117e0565b60200101906001600160f81b031916908160001a90535060049490941c936114038161182b565b9050611395565b50831561080e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b6000818152600183016020526040812054801561154257600061147d600183611842565b855490915060009061149190600190611842565b90508181146114f65760008660000182815481106114b1576114b16117e0565b90600052602060002001549050808760000184815481106114d4576114d46117e0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061150757611507611859565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610448565b6000915050610448565b60006020828403121561155e57600080fd5b81356001600160e01b03198116811461080e57600080fd5b60005b83811015611591578181015183820152602001611579565b83811115610ba35750506000910152565b60208152600082518060208401526115c1816040850160208701611576565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146115ec57600080fd5b919050565b6000806040838503121561160457600080fd5b61160d836115d5565b946020939093013593505050565b60008060006060848603121561163057600080fd5b611639846115d5565b9250611647602085016115d5565b9150604084013590509250925092565b60006020828403121561166957600080fd5b5035919050565b6000806040838503121561168357600080fd5b82359150611693602084016115d5565b90509250929050565b6000602082840312156116ae57600080fd5b61080e826115d5565b600080604083850312156116ca57600080fd5b50508035926020909101359150565b600080604083850312156116ec57600080fd5b6116f5836115d5565b9150611693602084016115d5565b600181811c9082168061171757607f821691505b60208210810361173757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117665761176661173d565b500190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117a3816017850160208801611576565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117d4816028840160208801611576565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b60008160001904831182151516156118105761181061173d565b500290565b634e487b7160e01b600052604160045260246000fd5b60008161183a5761183a61173d565b506000190190565b6000828210156118545761185461173d565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206fe5c7cf3a386933ec322d482e544de06b06ae04a5ab2d7be7a5ee80e55a9f6764736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json deleted file mode 100644 index 789fdef4..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721.json +++ /dev/null @@ -1,357 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC721", - "sourceName": "contracts/token/ERC721/ERC721.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b506040516200138c3803806200138c8339810160408190526200003491620001db565b81516200004990600090602085019062000068565b5080516200005f90600190602084019062000068565b50505062000281565b828054620000769062000245565b90600052602060002090601f0160209004810192826200009a5760008555620000e5565b82601f10620000b557805160ff1916838001178555620000e5565b82800160010185558215620000e5579182015b82811115620000e5578251825591602001919060010190620000c8565b50620000f3929150620000f7565b5090565b5b80821115620000f35760008155600101620000f8565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013657600080fd5b81516001600160401b03808211156200015357620001536200010e565b604051601f8301601f19908116603f011681019082821181831017156200017e576200017e6200010e565b816040528381526020925086838588010111156200019b57600080fd5b600091505b83821015620001bf5785820183015181830184015290820190620001a0565b83821115620001d15760008385830101525b9695505050505050565b60008060408385031215620001ef57600080fd5b82516001600160401b03808211156200020757600080fd5b620002158683870162000124565b935060208501519150808211156200022c57600080fd5b506200023b8582860162000124565b9150509250929050565b600181811c908216806200025a57607f821691505b6020821081036200027b57634e487b7160e01b600052602260045260246000fd5b50919050565b6110fb80620002916000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152600460205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152600260205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526003602052604090205490565b60606001805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152600260205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea26469706673582212203444012838d8a4d94e0f3add6d8bb2fb39f1578fcb587501af32ec2cd13620e164736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152600460205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152600260205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526003602052604090205490565b60606001805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152600260205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea26469706673582212203444012838d8a4d94e0f3add6d8bb2fb39f1578fcb587501af32ec2cd13620e164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json deleted file mode 100644 index 1e642ea8..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Holder.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC721Holder", - "sourceName": "contracts/token/ERC721/utils/ERC721Holder.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506101af806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea2646970667358221220937e7e7aca3ed2e03266b2dc995300bf04e0f158dc015502d750404e0329305d64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea2646970667358221220937e7e7aca3ed2e03266b2dc995300bf04e0f158dc015502d750404e0329305d64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json deleted file mode 100644 index 68b79912..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721PresetMinterPauserAutoId.json +++ /dev/null @@ -1,751 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC721PresetMinterPauserAutoId", - "sourceName": "contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "string", - "name": "baseTokenURI", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenOfOwnerByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162002a0738038062002a078339810160408190526200003491620003cc565b8251839083906200004d90600290602085019062000259565b5080516200006390600390602084019062000259565b5050600c805460ff191690555080516200008590600e90602084019062000259565b5062000093600033620000f4565b620000bf7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000f4565b620000eb7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000f4565b50505062000499565b62000100828262000104565b5050565b6200011b82826200014760201b62000cec1760201c565b60008281526001602090815260409091206200014291839062000d70620001e7821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000100576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001a33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001fe836001600160a01b03841662000207565b90505b92915050565b6000818152600183016020526040812054620002505750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000201565b50600062000201565b82805462000267906200045d565b90600052602060002090601f0160209004810192826200028b5760008555620002d6565b82601f10620002a657805160ff1916838001178555620002d6565b82800160010185558215620002d6579182015b82811115620002d6578251825591602001919060010190620002b9565b50620002e4929150620002e8565b5090565b5b80821115620002e45760008155600101620002e9565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200032757600080fd5b81516001600160401b0380821115620003445762000344620002ff565b604051601f8301601f19908116603f011681019082821181831017156200036f576200036f620002ff565b816040528381526020925086838588010111156200038c57600080fd5b600091505b83821015620003b0578582018301518183018401529082019062000391565b83821115620003c25760008385830101525b9695505050505050565b600080600060608486031215620003e257600080fd5b83516001600160401b0380821115620003fa57600080fd5b620004088783880162000315565b945060208601519150808211156200041f57600080fd5b6200042d8783880162000315565b935060408601519150808211156200044457600080fd5b50620004538682870162000315565b9150509250925092565b600181811c908216806200047257607f821691505b6020821081036200049357634e487b7160e01b600052602260045260246000fd5b50919050565b61255e80620004a96000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80636352211e1161010f578063a22cb465116100a2578063d539139311610071578063d5391393146103f7578063d547741f1461041e578063e63ab1e914610431578063e985e9c51461045857600080fd5b8063a22cb465146103ab578063b88d4fde146103be578063c87b56dd146103d1578063ca15c873146103e457600080fd5b80639010d07c116100de5780639010d07c1461037557806391d148541461038857806395d89b411461039b578063a217fddf146103a357600080fd5b80636352211e146103345780636a6278421461034757806370a082311461035a5780638456cb591461036d57600080fd5b80632f2ff15d1161018757806342842e0e1161015657806342842e0e146102f057806342966c68146103035780634f6ccce7146103165780635c975abb1461032957600080fd5b80632f2ff15d146102af5780632f745c59146102c257806336568abe146102d55780633f4ba83a146102e857600080fd5b8063095ea7b3116101c3578063095ea7b31461025257806318160ddd1461026757806323b872dd14610279578063248a9ca31461028c57600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f8366004611f81565b610494565b60405190151581526020015b60405180910390f35b61021a6104a5565b6040516102099190611ff6565b61023a610235366004612009565b610537565b6040516001600160a01b039091168152602001610209565b61026561026036600461203e565b61055e565b005b600a545b604051908152602001610209565b610265610287366004612068565b610678565b61026b61029a366004612009565b60009081526020819052604090206001015490565b6102656102bd3660046120a4565b6106aa565b61026b6102d036600461203e565b6106cf565b6102656102e33660046120a4565b610765565b6102656107e3565b6102656102fe366004612068565b61088b565b610265610311366004612009565b6108a6565b61026b610324366004612009565b6108d7565b600c5460ff166101fd565b61023a610342366004612009565b61096a565b6102656103553660046120d0565b6109ca565b61026b6103683660046120d0565b610a86565b610265610b0c565b61023a6103833660046120eb565b610bb0565b6101fd6103963660046120a4565b610bcf565b61021a610bf8565b61026b600081565b6102656103b936600461210d565b610c07565b6102656103cc36600461215f565b610c12565b61021a6103df366004612009565b610c4a565b61026b6103f2366004612009565b610cb0565b61026b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61026561042c3660046120a4565b610cc7565b61026b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101fd61046636600461223b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600061049f82610d85565b92915050565b6060600280546104b490612265565b80601f01602080910402602001604051908101604052809291908181526020018280546104e090612265565b801561052d5780601f106105025761010080835404028352916020019161052d565b820191906000526020600020905b81548152906001019060200180831161051057829003601f168201915b5050505050905090565b600061054282610daa565b506000908152600660205260409020546001600160a01b031690565b60006105698261096a565b9050806001600160a01b0316836001600160a01b0316036105db5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806105f757506105f78133610466565b6106695760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105d2565b6106738383610e09565b505050565b610683335b82610e77565b61069f5760405162461bcd60e51b81526004016105d29061229f565b610673838383610ef6565b6000828152602081905260409020600101546106c581611067565b6106738383611071565b60006106da83610a86565b821061073c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105d2565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6001600160a01b03811633146107d55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105d2565b6107df8282611093565b5050565b61080d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610881576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105d2565b6108896110b5565b565b61067383838360405180602001604052806000815250610c12565b6108af3361067d565b6108cb5760405162461bcd60e51b81526004016105d29061229f565b6108d481611107565b50565b60006108e2600a5490565b82106109455760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105d2565b600a8281548110610958576109586122ec565b90600052602060002001549050919050565b6000818152600460205260408120546001600160a01b03168061049f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b6109f47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bcf565b610a665760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105d2565b610a7881610a73600d5490565b6111aa565b6108d4600d80546001019055565b60006001600160a01b038216610af05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105d2565b506001600160a01b031660009081526005602052604090205490565b610b367f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610ba85760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105d2565b610889611343565b6000828152600160205260408120610bc89083611380565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546104b490612265565b6107df33838361138c565b610c1c3383610e77565b610c385760405162461bcd60e51b81526004016105d29061229f565b610c448484848461145a565b50505050565b6060610c5582610daa565b6000610c5f61148d565b90506000815111610c7f5760405180602001604052806000815250610bc8565b80610c898461149c565b604051602001610c9a929190612302565b6040516020818303038152906040529392505050565b600081815260016020526040812061049f9061152f565b600082815260208190526040902060010154610ce281611067565b6106738383611093565b610cf68282610bcf565b6107df576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610d2c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bc8836001600160a01b038416611539565b60006001600160e01b0319821663780e9d6360e01b148061049f575061049f82611588565b6000818152600460205260409020546001600160a01b03166108d45760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b600081815260066020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e3e8261096a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610e838361096a565b9050806001600160a01b0316846001600160a01b03161480610eca57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b80610eee5750836001600160a01b0316610ee384610537565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f098261096a565b6001600160a01b031614610f2f5760405162461bcd60e51b81526004016105d290612331565b6001600160a01b038216610f915760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105d2565b610f9e83838360016115c8565b826001600160a01b0316610fb18261096a565b6001600160a01b031614610fd75760405162461bcd60e51b81526004016105d290612331565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108d481336115d4565b61107b8282610cec565b60008281526001602052604090206106739082610d70565b61109d828261162d565b60008281526001602052604090206106739082611692565b6110bd6116a7565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006111128261096a565b90506111228160008460016115c8565b61112b8261096a565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105d2565b6000818152600460205260409020546001600160a01b0316156112655760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6112736000838360016115c8565b6000818152600460205260409020546001600160a01b0316156112d85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61134b6116f0565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110ea3390565b6000610bc88383611736565b816001600160a01b0316836001600160a01b0316036113ed5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105d2565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611465848484610ef6565b61147184848484611760565b610c445760405162461bcd60e51b81526004016105d290612376565b6060600e80546104b490612265565b606060006114a983611861565b600101905060008167ffffffffffffffff8111156114c9576114c9612149565b6040519080825280601f01601f1916602001820160405280156114f3576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846114fd57509392505050565b600061049f825490565b60008181526001830160205260408120546115805750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561049f565b50600061049f565b60006001600160e01b031982166380ac58cd60e01b14806115b957506001600160e01b03198216635b5e139f60e01b145b8061049f575061049f82611939565b610c448484848461195e565b6115de8282610bcf565b6107df576115eb816119d1565b6115f68360206119e3565b6040516020016116079291906123c8565b60408051601f198184030181529082905262461bcd60e51b82526105d291600401611ff6565b6116378282610bcf565b156107df576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bc8836001600160a01b038416611b7f565b600c5460ff166108895760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105d2565b600c5460ff16156108895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105d2565b600082600001828154811061174d5761174d6122ec565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561185657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906117a490339089908890889060040161243d565b6020604051808303816000875af19250505080156117df575060408051601f3d908101601f191682019092526117dc9181019061247a565b60015b61183c573d80801561180d576040519150601f19603f3d011682016040523d82523d6000602084013e611812565b606091505b5080516000036118345760405162461bcd60e51b81526004016105d290612376565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610eee565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106118a05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106118cc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106118ea57662386f26fc10000830492506010015b6305f5e1008310611902576305f5e100830492506008015b612710831061191657612710830492506004015b60648310611928576064830492506002015b600a831061049f5760010192915050565b60006001600160e01b03198216635a05180f60e01b148061049f575061049f82611c72565b61196a84848484611ca7565b600c5460ff1615610c445760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105d2565b606061049f6001600160a01b03831660145b606060006119f28360026124ad565b6119fd9060026124cc565b67ffffffffffffffff811115611a1557611a15612149565b6040519080825280601f01601f191660200182016040528015611a3f576020820181803683370190505b509050600360fc1b81600081518110611a5a57611a5a6122ec565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a8957611a896122ec565b60200101906001600160f81b031916908160001a9053506000611aad8460026124ad565b611ab89060016124cc565b90505b6001811115611b30576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611aec57611aec6122ec565b1a60f81b828281518110611b0257611b026122ec565b60200101906001600160f81b031916908160001a90535060049490941c93611b29816124e4565b9050611abb565b508315610bc85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105d2565b60008181526001830160205260408120548015611c68576000611ba36001836124fb565b8554909150600090611bb7906001906124fb565b9050818114611c1c576000866000018281548110611bd757611bd76122ec565b9060005260206000200154905080876000018481548110611bfa57611bfa6122ec565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c2d57611c2d612512565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061049f565b600091505061049f565b60006001600160e01b03198216637965db0b60e01b148061049f57506301ffc9a760e01b6001600160e01b031983161461049f565b6001811115611d165760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105d2565b816001600160a01b038516611d7257611d6d81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b611d95565b836001600160a01b0316856001600160a01b031614611d9557611d958582611ddb565b6001600160a01b038416611db157611dac81611e78565b611dd4565b846001600160a01b0316846001600160a01b031614611dd457611dd48482611f27565b5050505050565b60006001611de884610a86565b611df291906124fb565b600083815260096020526040902054909150808214611e45576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090611e8a906001906124fb565b6000838152600b6020526040812054600a8054939450909284908110611eb257611eb26122ec565b9060005260206000200154905080600a8381548110611ed357611ed36122ec565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480611f0b57611f0b612512565b6001900381819060005260206000200160009055905550505050565b6000611f3283610a86565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160e01b0319811681146108d457600080fd5b600060208284031215611f9357600080fd5b8135610bc881611f6b565b60005b83811015611fb9578181015183820152602001611fa1565b83811115610c445750506000910152565b60008151808452611fe2816020860160208601611f9e565b601f01601f19169290920160200192915050565b602081526000610bc86020830184611fca565b60006020828403121561201b57600080fd5b5035919050565b80356001600160a01b038116811461203957600080fd5b919050565b6000806040838503121561205157600080fd5b61205a83612022565b946020939093013593505050565b60008060006060848603121561207d57600080fd5b61208684612022565b925061209460208501612022565b9150604084013590509250925092565b600080604083850312156120b757600080fd5b823591506120c760208401612022565b90509250929050565b6000602082840312156120e257600080fd5b610bc882612022565b600080604083850312156120fe57600080fd5b50508035926020909101359150565b6000806040838503121561212057600080fd5b61212983612022565b91506020830135801515811461213e57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561217557600080fd5b61217e85612022565b935061218c60208601612022565b925060408501359150606085013567ffffffffffffffff808211156121b057600080fd5b818701915087601f8301126121c457600080fd5b8135818111156121d6576121d6612149565b604051601f8201601f19908116603f011681019083821181831017156121fe576121fe612149565b816040528281528a602084870101111561221757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561224e57600080fd5b61225783612022565b91506120c760208401612022565b600181811c9082168061227957607f821691505b60208210810361229957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008351612314818460208801611f9e565b835190830190612328818360208801611f9e565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612400816017850160208801611f9e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612431816028840160208801611f9e565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061247090830184611fca565b9695505050505050565b60006020828403121561248c57600080fd5b8151610bc881611f6b565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124c7576124c7612497565b500290565b600082198211156124df576124df612497565b500190565b6000816124f3576124f3612497565b506000190190565b60008282101561250d5761250d612497565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212202ec9496ef969b38824d5643b32bdd6096a581310145908055518bd2dd589553e64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80636352211e1161010f578063a22cb465116100a2578063d539139311610071578063d5391393146103f7578063d547741f1461041e578063e63ab1e914610431578063e985e9c51461045857600080fd5b8063a22cb465146103ab578063b88d4fde146103be578063c87b56dd146103d1578063ca15c873146103e457600080fd5b80639010d07c116100de5780639010d07c1461037557806391d148541461038857806395d89b411461039b578063a217fddf146103a357600080fd5b80636352211e146103345780636a6278421461034757806370a082311461035a5780638456cb591461036d57600080fd5b80632f2ff15d1161018757806342842e0e1161015657806342842e0e146102f057806342966c68146103035780634f6ccce7146103165780635c975abb1461032957600080fd5b80632f2ff15d146102af5780632f745c59146102c257806336568abe146102d55780633f4ba83a146102e857600080fd5b8063095ea7b3116101c3578063095ea7b31461025257806318160ddd1461026757806323b872dd14610279578063248a9ca31461028c57600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f8366004611f81565b610494565b60405190151581526020015b60405180910390f35b61021a6104a5565b6040516102099190611ff6565b61023a610235366004612009565b610537565b6040516001600160a01b039091168152602001610209565b61026561026036600461203e565b61055e565b005b600a545b604051908152602001610209565b610265610287366004612068565b610678565b61026b61029a366004612009565b60009081526020819052604090206001015490565b6102656102bd3660046120a4565b6106aa565b61026b6102d036600461203e565b6106cf565b6102656102e33660046120a4565b610765565b6102656107e3565b6102656102fe366004612068565b61088b565b610265610311366004612009565b6108a6565b61026b610324366004612009565b6108d7565b600c5460ff166101fd565b61023a610342366004612009565b61096a565b6102656103553660046120d0565b6109ca565b61026b6103683660046120d0565b610a86565b610265610b0c565b61023a6103833660046120eb565b610bb0565b6101fd6103963660046120a4565b610bcf565b61021a610bf8565b61026b600081565b6102656103b936600461210d565b610c07565b6102656103cc36600461215f565b610c12565b61021a6103df366004612009565b610c4a565b61026b6103f2366004612009565b610cb0565b61026b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61026561042c3660046120a4565b610cc7565b61026b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101fd61046636600461223b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600061049f82610d85565b92915050565b6060600280546104b490612265565b80601f01602080910402602001604051908101604052809291908181526020018280546104e090612265565b801561052d5780601f106105025761010080835404028352916020019161052d565b820191906000526020600020905b81548152906001019060200180831161051057829003601f168201915b5050505050905090565b600061054282610daa565b506000908152600660205260409020546001600160a01b031690565b60006105698261096a565b9050806001600160a01b0316836001600160a01b0316036105db5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806105f757506105f78133610466565b6106695760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105d2565b6106738383610e09565b505050565b610683335b82610e77565b61069f5760405162461bcd60e51b81526004016105d29061229f565b610673838383610ef6565b6000828152602081905260409020600101546106c581611067565b6106738383611071565b60006106da83610a86565b821061073c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105d2565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6001600160a01b03811633146107d55760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105d2565b6107df8282611093565b5050565b61080d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610881576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105d2565b6108896110b5565b565b61067383838360405180602001604052806000815250610c12565b6108af3361067d565b6108cb5760405162461bcd60e51b81526004016105d29061229f565b6108d481611107565b50565b60006108e2600a5490565b82106109455760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105d2565b600a8281548110610958576109586122ec565b90600052602060002001549050919050565b6000818152600460205260408120546001600160a01b03168061049f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b6109f47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bcf565b610a665760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105d2565b610a7881610a73600d5490565b6111aa565b6108d4600d80546001019055565b60006001600160a01b038216610af05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105d2565b506001600160a01b031660009081526005602052604090205490565b610b367f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33610bcf565b610ba85760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105d2565b610889611343565b6000828152600160205260408120610bc89083611380565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546104b490612265565b6107df33838361138c565b610c1c3383610e77565b610c385760405162461bcd60e51b81526004016105d29061229f565b610c448484848461145a565b50505050565b6060610c5582610daa565b6000610c5f61148d565b90506000815111610c7f5760405180602001604052806000815250610bc8565b80610c898461149c565b604051602001610c9a929190612302565b6040516020818303038152906040529392505050565b600081815260016020526040812061049f9061152f565b600082815260208190526040902060010154610ce281611067565b6106738383611093565b610cf68282610bcf565b6107df576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610d2c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bc8836001600160a01b038416611539565b60006001600160e01b0319821663780e9d6360e01b148061049f575061049f82611588565b6000818152600460205260409020546001600160a01b03166108d45760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105d2565b600081815260066020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e3e8261096a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610e838361096a565b9050806001600160a01b0316846001600160a01b03161480610eca57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b80610eee5750836001600160a01b0316610ee384610537565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f098261096a565b6001600160a01b031614610f2f5760405162461bcd60e51b81526004016105d290612331565b6001600160a01b038216610f915760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105d2565b610f9e83838360016115c8565b826001600160a01b0316610fb18261096a565b6001600160a01b031614610fd75760405162461bcd60e51b81526004016105d290612331565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108d481336115d4565b61107b8282610cec565b60008281526001602052604090206106739082610d70565b61109d828261162d565b60008281526001602052604090206106739082611692565b6110bd6116a7565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006111128261096a565b90506111228160008460016115c8565b61112b8261096a565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105d2565b6000818152600460205260409020546001600160a01b0316156112655760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6112736000838360016115c8565b6000818152600460205260409020546001600160a01b0316156112d85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d2565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61134b6116f0565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110ea3390565b6000610bc88383611736565b816001600160a01b0316836001600160a01b0316036113ed5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105d2565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611465848484610ef6565b61147184848484611760565b610c445760405162461bcd60e51b81526004016105d290612376565b6060600e80546104b490612265565b606060006114a983611861565b600101905060008167ffffffffffffffff8111156114c9576114c9612149565b6040519080825280601f01601f1916602001820160405280156114f3576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846114fd57509392505050565b600061049f825490565b60008181526001830160205260408120546115805750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561049f565b50600061049f565b60006001600160e01b031982166380ac58cd60e01b14806115b957506001600160e01b03198216635b5e139f60e01b145b8061049f575061049f82611939565b610c448484848461195e565b6115de8282610bcf565b6107df576115eb816119d1565b6115f68360206119e3565b6040516020016116079291906123c8565b60408051601f198184030181529082905262461bcd60e51b82526105d291600401611ff6565b6116378282610bcf565b156107df576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bc8836001600160a01b038416611b7f565b600c5460ff166108895760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105d2565b600c5460ff16156108895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105d2565b600082600001828154811061174d5761174d6122ec565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561185657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906117a490339089908890889060040161243d565b6020604051808303816000875af19250505080156117df575060408051601f3d908101601f191682019092526117dc9181019061247a565b60015b61183c573d80801561180d576040519150601f19603f3d011682016040523d82523d6000602084013e611812565b606091505b5080516000036118345760405162461bcd60e51b81526004016105d290612376565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610eee565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106118a05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106118cc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106118ea57662386f26fc10000830492506010015b6305f5e1008310611902576305f5e100830492506008015b612710831061191657612710830492506004015b60648310611928576064830492506002015b600a831061049f5760010192915050565b60006001600160e01b03198216635a05180f60e01b148061049f575061049f82611c72565b61196a84848484611ca7565b600c5460ff1615610c445760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105d2565b606061049f6001600160a01b03831660145b606060006119f28360026124ad565b6119fd9060026124cc565b67ffffffffffffffff811115611a1557611a15612149565b6040519080825280601f01601f191660200182016040528015611a3f576020820181803683370190505b509050600360fc1b81600081518110611a5a57611a5a6122ec565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a8957611a896122ec565b60200101906001600160f81b031916908160001a9053506000611aad8460026124ad565b611ab89060016124cc565b90505b6001811115611b30576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611aec57611aec6122ec565b1a60f81b828281518110611b0257611b026122ec565b60200101906001600160f81b031916908160001a90535060049490941c93611b29816124e4565b9050611abb565b508315610bc85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105d2565b60008181526001830160205260408120548015611c68576000611ba36001836124fb565b8554909150600090611bb7906001906124fb565b9050818114611c1c576000866000018281548110611bd757611bd76122ec565b9060005260206000200154905080876000018481548110611bfa57611bfa6122ec565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c2d57611c2d612512565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061049f565b600091505061049f565b60006001600160e01b03198216637965db0b60e01b148061049f57506301ffc9a760e01b6001600160e01b031983161461049f565b6001811115611d165760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105d2565b816001600160a01b038516611d7257611d6d81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b611d95565b836001600160a01b0316856001600160a01b031614611d9557611d958582611ddb565b6001600160a01b038416611db157611dac81611e78565b611dd4565b846001600160a01b0316846001600160a01b031614611dd457611dd48482611f27565b5050505050565b60006001611de884610a86565b611df291906124fb565b600083815260096020526040902054909150808214611e45576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090611e8a906001906124fb565b6000838152600b6020526040812054600a8054939450909284908110611eb257611eb26122ec565b9060005260206000200154905080600a8381548110611ed357611ed36122ec565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480611f0b57611f0b612512565b6001900381819060005260206000200160009055905550505050565b6000611f3283610a86565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6001600160e01b0319811681146108d457600080fd5b600060208284031215611f9357600080fd5b8135610bc881611f6b565b60005b83811015611fb9578181015183820152602001611fa1565b83811115610c445750506000910152565b60008151808452611fe2816020860160208601611f9e565b601f01601f19169290920160200192915050565b602081526000610bc86020830184611fca565b60006020828403121561201b57600080fd5b5035919050565b80356001600160a01b038116811461203957600080fd5b919050565b6000806040838503121561205157600080fd5b61205a83612022565b946020939093013593505050565b60008060006060848603121561207d57600080fd5b61208684612022565b925061209460208501612022565b9150604084013590509250925092565b600080604083850312156120b757600080fd5b823591506120c760208401612022565b90509250929050565b6000602082840312156120e257600080fd5b610bc882612022565b600080604083850312156120fe57600080fd5b50508035926020909101359150565b6000806040838503121561212057600080fd5b61212983612022565b91506020830135801515811461213e57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561217557600080fd5b61217e85612022565b935061218c60208601612022565b925060408501359150606085013567ffffffffffffffff808211156121b057600080fd5b818701915087601f8301126121c457600080fd5b8135818111156121d6576121d6612149565b604051601f8201601f19908116603f011681019083821181831017156121fe576121fe612149565b816040528281528a602084870101111561221757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561224e57600080fd5b61225783612022565b91506120c760208401612022565b600181811c9082168061227957607f821691505b60208210810361229957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60008351612314818460208801611f9e565b835190830190612328818360208801611f9e565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612400816017850160208801611f9e565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612431816028840160208801611f9e565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061247090830184611fca565b9695505050505050565b60006020828403121561248c57600080fd5b8151610bc881611f6b565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156124c7576124c7612497565b500290565b600082198211156124df576124df612497565b500190565b6000816124f3576124f3612497565b506000190190565b60008282101561250d5761250d612497565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212202ec9496ef969b38824d5643b32bdd6096a581310145908055518bd2dd589553e64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json deleted file mode 100644 index f6ef7019..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777.json +++ /dev/null @@ -1,587 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC777", - "sourceName": "contracts/token/ERC777/ERC777.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "address[]", - "name": "defaultOperators_", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "AuthorizedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Burned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Minted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "RevokedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Sent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "authorizeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "defaultOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "granularity", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "isOperatorFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "revokeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001bab38038062001bab8339810160408190526200003491620003f1565b82516200004990600290602086019062000215565b5081516200005f90600390602085019062000215565b50805162000075906004906020840190620002a4565b5060005b8151811015620000e5576001600560008484815181106200009e576200009e62000508565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620000dc816200051e565b91505062000079565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b1580156200016057600080fd5b505af115801562000175573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b158015620001f357600080fd5b505af115801562000208573d6000803e3d6000fd5b5050505050505062000582565b828054620002239062000546565b90600052602060002090601f01602090048101928262000247576000855562000292565b82601f106200026257805160ff191683800117855562000292565b8280016001018555821562000292579182015b828111156200029257825182559160200191906001019062000275565b50620002a0929150620002fc565b5090565b82805482825590600052602060002090810192821562000292579160200282015b828111156200029257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620002c5565b5b80821115620002a05760008155600101620002fd565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000354576200035462000313565b604052919050565b600082601f8301126200036e57600080fd5b81516001600160401b038111156200038a576200038a62000313565b6020620003a0601f8301601f1916820162000329565b8281528582848701011115620003b557600080fd5b60005b83811015620003d5578581018301518282018401528201620003b8565b83811115620003e75760008385840101525b5095945050505050565b6000806000606084860312156200040757600080fd5b83516001600160401b03808211156200041f57600080fd5b6200042d878388016200035c565b94506020915081860151818111156200044557600080fd5b62000453888289016200035c565b9450506040860151818111156200046957600080fd5b8601601f810188136200047b57600080fd5b80518281111562000490576200049062000313565b8060051b9250620004a384840162000329565b818152928201840192848101908a851115620004be57600080fd5b928501925b84841015620004f857835192506001600160a01b0383168314620004e75760008081fd5b8282529285019290850190620004c3565b8096505050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b6000600182016200053f57634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c908216806200055b57607f821691505b6020821081036200057c57634e487b7160e01b600052602260045260246000fd5b50919050565b61161980620005926000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526020819052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea264697066735822122098f5763d08059f98d276d9f24c7df2a4be3021e5f489ba6feb5581633ad3920264736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526020819052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea264697066735822122098f5763d08059f98d276d9f24c7df2a4be3021e5f489ba6feb5581633ad3920264736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json deleted file mode 100644 index ea691e74..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC777PresetFixedSupply.json +++ /dev/null @@ -1,597 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC777PresetFixedSupply", - "sourceName": "contracts/token/ERC777/presets/ERC777PresetFixedSupply.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address[]", - "name": "defaultOperators", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "AuthorizedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Burned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Minted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "RevokedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Sent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "authorizeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "defaultOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "granularity", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "isOperatorFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "revokeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b506040516200209d3803806200209d8339810160408190526200003491620007b9565b84848482600290805190602001906200004f929190620005b2565b50815162000065906003906020850190620005b2565b5080516200007b90600490602084019062000641565b5060005b8151811015620000eb57600160056000848481518110620000a457620000a4620008dc565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620000e28162000908565b9150506200007f565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b1580156200016657600080fd5b505af11580156200017b573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b158015620001f957600080fd5b505af11580156200020e573d6000803e3d6000fd5b5050505050505062000247818360405180602001604052806000815250604051806020016040528060008152506200025260201b60201c565b505050505062000a65565b6200026284848484600162000268565b50505050565b6001600160a01b038516620002c45760405162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f206164647265737360448201526064015b60405180910390fd5b60003390508460016000828254620002dd919062000924565b90915550506001600160a01b038616600090815260208190526040812080548792906200030c90849062000924565b909155506200032490508160008888888888620003be565b856001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d8787876040516200036d939291906200096d565b60405180910390a36040518581526001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa15801562000440573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004669190620009a6565b90506001600160a01b03811615620004e8576040516223de2960e01b81526001600160a01b038216906223de2990620004ae908b908b908b908b908b908b90600401620009cb565b600060405180830381600087803b158015620004c957600080fd5b505af1158015620004de573d6000803e3d6000fd5b5050505062000599565b811562000599576200050e866001600160a01b0316620005a360201b620007d91760201c565b15620005995760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a401620002bb565b5050505050505050565b6001600160a01b03163b151590565b828054620005c09062000a29565b90600052602060002090601f016020900481019282620005e457600085556200062f565b82601f10620005ff57805160ff19168380011785556200062f565b828001600101855582156200062f579182015b828111156200062f57825182559160200191906001019062000612565b506200063d92915062000699565b5090565b8280548282559060005260206000209081019282156200062f579160200282015b828111156200062f57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000662565b5b808211156200063d57600081556001016200069a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620006f157620006f1620006b0565b604052919050565b60005b8381101562000716578181015183820152602001620006fc565b83811115620002625750506000910152565b600082601f8301126200073a57600080fd5b81516001600160401b03811115620007565762000756620006b0565b6200076b601f8201601f1916602001620006c6565b8181528460208386010111156200078157600080fd5b62000794826020830160208701620006f9565b949350505050565b80516001600160a01b0381168114620007b457600080fd5b919050565b600080600080600060a08688031215620007d257600080fd5b85516001600160401b0380821115620007ea57600080fd5b620007f889838a0162000728565b96506020915081880151818111156200081057600080fd5b6200081e8a828b0162000728565b9650506040880151818111156200083457600080fd5b8801601f81018a136200084657600080fd5b8051828111156200085b576200085b620006b0565b8060051b92506200086e848401620006c6565b818152928201840192848101908c8511156200088957600080fd5b928501925b84841015620008b257620008a2846200079c565b825292850192908501906200088e565b80985050505050505060608601519150620008d0608087016200079c565b90509295509295909350565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200091d576200091d620008f2565b5060010190565b600082198211156200093a576200093a620008f2565b500190565b6000815180845262000959816020860160208601620006f9565b601f01601f19169290920160200192915050565b8381526060602082015260006200098860608301856200093f565b82810360408401526200099c81856200093f565b9695505050505050565b600060208284031215620009b957600080fd5b620009c4826200079c565b9392505050565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c06080820181905260009062000a08908301856200093f565b82810360a084015262000a1c81856200093f565b9998505050505050505050565b600181811c9082168062000a3e57607f821691505b60208210810362000a5f57634e487b7160e01b600052602260045260246000fd5b50919050565b6116288062000a756000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061109d565b60405180910390f35b610141610312565b6040516101309190611137565b61016161015c366004611162565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461118e565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611272565b6103f9565b005b6101756101cf366004611305565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f8366004611305565b61043e565b61014161055b565b6101bf610213366004611322565b61056a565b610161610226366004611162565b61058d565b61016161023936600461137b565b6105c5565b61017561024c36600461137b565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf610285366004611305565b610667565b6101bf6102983660046113b4565b610782565b6101bf6102ab366004611434565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061147b565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061147b565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107e8565b5060019392505050565b6000336103c185828561090f565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061099b565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114b5565b60405180910390fd5b6104378585858585600161099b565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061147b565b6105883384848460405180602001604052806000815250600161099b565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061099b565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114b5565b6107b484848484610a97565b50505050565b6107d533838360405180602001604052806000815250610a97565b5050565b6001600160a01b03163b151590565b6001600160a01b03831661084c5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b0382166108ae5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561098e5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107e8565b6001600160a01b038616610a005760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a625760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a71818888888888610c4b565b610a7f818888888888610d72565b610a8e81888888888888610ed8565b50505050505050565b6001600160a01b038416610af85760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610b0881866000878787610c4b565b6001600160a01b03851660009081526020819052604090205484811015610b7d5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610bac908490611517565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610bfa9392919061152e565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf09190611563565b90506001600160a01b03811615610a8e57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d37908a908a908a908a908a908a90600401611580565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610deb5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e229084906115da565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e7a9392919061152e565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610ec791815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d9190611563565b90506001600160a01b03811615610ff9576040516223de2960e01b81526001600160a01b038216906223de2990610fc2908b908b908b908b908b908b90600401611580565b600060405180830381600087803b158015610fdc57600080fd5b505af1158015610ff0573d6000803e3d6000fd5b50505050611093565b8115611093576001600160a01b0386163b156110935760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110de5783516001600160a01b0316835292840192918401916001016110b9565b50909695505050505050565b6000815180845260005b81811015611110576020818501810151868301820152016110f4565b81811115611122576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110ea565b6001600160a01b038116811461115f57600080fd5b50565b6000806040838503121561117557600080fd5b82356111808161114a565b946020939093013593505050565b6000806000606084860312156111a357600080fd5b83356111ae8161114a565b925060208401356111be8161114a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111f657600080fd5b813567ffffffffffffffff80821115611211576112116111cf565b604051601f8301601f19908116603f01168101908282118183101715611239576112396111cf565b8160405283815286602085880101111561125257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561128a57600080fd5b85356112958161114a565b945060208601356112a58161114a565b935060408601359250606086013567ffffffffffffffff808211156112c957600080fd5b6112d589838a016111e5565b935060808801359150808211156112eb57600080fd5b506112f8888289016111e5565b9150509295509295909350565b60006020828403121561131757600080fd5b81356106608161114a565b60008060006060848603121561133757600080fd5b83356113428161114a565b925060208401359150604084013567ffffffffffffffff81111561136557600080fd5b611371868287016111e5565b9150509250925092565b6000806040838503121561138e57600080fd5b82356113998161114a565b915060208301356113a98161114a565b809150509250929050565b600080600080608085870312156113ca57600080fd5b84356113d58161114a565b935060208501359250604085013567ffffffffffffffff808211156113f957600080fd5b611405888389016111e5565b9350606087013591508082111561141b57600080fd5b50611428878288016111e5565b91505092959194509250565b6000806040838503121561144757600080fd5b82359150602083013567ffffffffffffffff81111561146557600080fd5b611471858286016111e5565b9150509250929050565b600181811c9082168061148f57607f821691505b6020821081036114af57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561152957611529611501565b500390565b83815260606020820152600061154760608301856110ea565b828103604084015261155981856110ea565b9695505050505050565b60006020828403121561157557600080fd5b81516106608161114a565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115bb908301856110ea565b82810360a08401526115cd81856110ea565b9998505050505050505050565b600082198211156115ed576115ed611501565b50019056fea264697066735822122001b9508dd34edac4606f8d9c5c4918af5839a07f18449e7c7b61fdf6ed783a5464736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061109d565b60405180910390f35b610141610312565b6040516101309190611137565b61016161015c366004611162565b61039b565b6040519015158152602001610130565b6001545b604051908152602001610130565b61016161019136600461118e565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611272565b6103f9565b005b6101756101cf366004611305565b6001600160a01b031660009081526020819052604090205490565b6101bf6101f8366004611305565b61043e565b61014161055b565b6101bf610213366004611322565b61056a565b610161610226366004611162565b61058d565b61016161023936600461137b565b6105c5565b61017561024c36600461137b565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6101bf610285366004611305565b610667565b6101bf6102983660046113b4565b610782565b6101bf6102ab366004611434565b6107ba565b6060600480548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060600280546103219061147b565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061147b565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107e8565b5060019392505050565b6000336103c185828561090f565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061099b565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114b5565b60405180910390fd5b6104378585858585600161099b565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff16156104f3573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060600380546103219061147b565b6105883384848460405180602001604052806000815250600161099b565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061099b565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526005602052604090205460ff16801561063057506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526005602052604090205460ff161561071d573360009081526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526006602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114b5565b6107b484848484610a97565b50505050565b6107d533838360405180602001604052806000815250610a97565b5050565b6001600160a01b03163b151590565b6001600160a01b03831661084c5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b0382166108ae5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526008602090815260408083209386168352929052205460001981146107b4578181101561098e5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107e8565b6001600160a01b038616610a005760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a625760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a71818888888888610c4b565b610a7f818888888888610d72565b610a8e81888888888888610ed8565b50505050505050565b6001600160a01b038416610af85760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610b0881866000878787610c4b565b6001600160a01b03851660009081526020819052604090205484811015610b7d5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152602081905260408120868303905560018054879290610bac908490611517565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610bfa9392919061152e565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf09190611563565b90506001600160a01b03811615610a8e57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d37908a908a908a908a908a908a90600401611580565b600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526020819052604090205483811015610deb5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260208190526040808220878503905591871681529081208054869290610e229084906115da565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e7a9392919061152e565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610ec791815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7d9190611563565b90506001600160a01b03811615610ff9576040516223de2960e01b81526001600160a01b038216906223de2990610fc2908b908b908b908b908b908b90600401611580565b600060405180830381600087803b158015610fdc57600080fd5b505af1158015610ff0573d6000803e3d6000fd5b50505050611093565b8115611093576001600160a01b0386163b156110935760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110de5783516001600160a01b0316835292840192918401916001016110b9565b50909695505050505050565b6000815180845260005b81811015611110576020818501810151868301820152016110f4565b81811115611122576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110ea565b6001600160a01b038116811461115f57600080fd5b50565b6000806040838503121561117557600080fd5b82356111808161114a565b946020939093013593505050565b6000806000606084860312156111a357600080fd5b83356111ae8161114a565b925060208401356111be8161114a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111f657600080fd5b813567ffffffffffffffff80821115611211576112116111cf565b604051601f8301601f19908116603f01168101908282118183101715611239576112396111cf565b8160405283815286602085880101111561125257600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561128a57600080fd5b85356112958161114a565b945060208601356112a58161114a565b935060408601359250606086013567ffffffffffffffff808211156112c957600080fd5b6112d589838a016111e5565b935060808801359150808211156112eb57600080fd5b506112f8888289016111e5565b9150509295509295909350565b60006020828403121561131757600080fd5b81356106608161114a565b60008060006060848603121561133757600080fd5b83356113428161114a565b925060208401359150604084013567ffffffffffffffff81111561136557600080fd5b611371868287016111e5565b9150509250925092565b6000806040838503121561138e57600080fd5b82356113998161114a565b915060208301356113a98161114a565b809150509250929050565b600080600080608085870312156113ca57600080fd5b84356113d58161114a565b935060208501359250604085013567ffffffffffffffff808211156113f957600080fd5b611405888389016111e5565b9350606087013591508082111561141b57600080fd5b50611428878288016111e5565b91505092959194509250565b6000806040838503121561144757600080fd5b82359150602083013567ffffffffffffffff81111561146557600080fd5b611471858286016111e5565b9150509250929050565b600181811c9082168061148f57607f821691505b6020821081036114af57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561152957611529611501565b500390565b83815260606020820152600061154760608301856110ea565b828103604084015261155981856110ea565b9695505050505050565b60006020828403121561157557600080fd5b81516106608161114a565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115bb908301856110ea565b82810360a08401526115cd81856110ea565b9998505050505050505050565b600082198211156115ed576115ed611501565b50019056fea264697066735822122001b9508dd34edac4606f8d9c5c4918af5839a07f18449e7c7b61fdf6ed783a5464736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json deleted file mode 100644 index fa7fb02b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableMap.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "EnumerableMap", - "sourceName": "contracts/utils/structs/EnumerableMap.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1247dbc9cc619113e0c5945f8c62202b8c4eb957dce30baa3239658a5019e5864736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1247dbc9cc619113e0c5945f8c62202b8c4eb957dce30baa3239658a5019e5864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json deleted file mode 100644 index 8271ee39..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EnumerableSet.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "EnumerableSet", - "sourceName": "contracts/utils/structs/EnumerableSet.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122074e69cd2a0d98d262dffa88e25191ecf000f74539d774ab9f6d72ba9c393e1b964736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122074e69cd2a0d98d262dffa88e25191ecf000f74539d774ab9f6d72ba9c393e1b964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json deleted file mode 100644 index 5cfd0f06..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Escrow.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Escrow", - "sourceName": "contracts/utils/escrow/Escrow.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "depositsOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "payee", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61050d8061007e6000396000f3fe6080604052600436106100555760003560e01c806351cff8d91461005a578063715018a61461007c5780638da5cb5b14610091578063e3a9db1a146100be578063f2fde38b14610102578063f340fa0114610122575b600080fd5b34801561006657600080fd5b5061007a61007536600461048d565b610135565b005b34801561008857600080fd5b5061007a6101ac565b34801561009d57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100ca57600080fd5b506100f46100d936600461048d565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100b5565b34801561010e57600080fd5b5061007a61011d36600461048d565b6101c0565b61007a61013036600461048d565b61023e565b61013d6102b0565b6001600160a01b0381166000818152600160205260408120805491905590610165908261030a565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101a091815260200190565b60405180910390a25050565b6101b46102b0565b6101be6000610428565b565b6101c86102b0565b6001600160a01b0381166102325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61023b81610428565b50565b6102466102b0565b6001600160a01b0381166000908152600160205260408120805434928392916102709084906104b1565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101a0565b6000546001600160a01b031633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610229565b8047101561035a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610229565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103a7576040519150601f19603f3d011682016040523d82523d6000602084013e6103ac565b606091505b50509050806104235760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610229565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461023b57600080fd5b60006020828403121561049f57600080fd5b81356104aa81610478565b9392505050565b600082198211156104d257634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212202ff20c631ff364ad1effeb2af7fad46d1c273068d3fa7030c8388bbade6ca76b64736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100555760003560e01c806351cff8d91461005a578063715018a61461007c5780638da5cb5b14610091578063e3a9db1a146100be578063f2fde38b14610102578063f340fa0114610122575b600080fd5b34801561006657600080fd5b5061007a61007536600461048d565b610135565b005b34801561008857600080fd5b5061007a6101ac565b34801561009d57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100ca57600080fd5b506100f46100d936600461048d565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100b5565b34801561010e57600080fd5b5061007a61011d36600461048d565b6101c0565b61007a61013036600461048d565b61023e565b61013d6102b0565b6001600160a01b0381166000818152600160205260408120805491905590610165908261030a565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101a091815260200190565b60405180910390a25050565b6101b46102b0565b6101be6000610428565b565b6101c86102b0565b6001600160a01b0381166102325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61023b81610428565b50565b6102466102b0565b6001600160a01b0381166000908152600160205260408120805434928392916102709084906104b1565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101a0565b6000546001600160a01b031633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610229565b8047101561035a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610229565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103a7576040519150601f19603f3d011682016040523d82523d6000602084013e6103ac565b606091505b50509050806104235760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610229565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461023b57600080fd5b60006020828403121561049f57600080fd5b81356104aa81610478565b9392505050565b600082198211156104d257634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212202ff20c631ff364ad1effeb2af7fad46d1c273068d3fa7030c8388bbade6ca76b64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json deleted file mode 100644 index 3344d96b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Governor.json +++ /dev/null @@ -1,1019 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Governor", - "sourceName": "contracts/governance/Governor.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json deleted file mode 100644 index 02087f27..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCountingSimple.json +++ /dev/null @@ -1,1048 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorCountingSimple", - "sourceName": "contracts/governance/extensions/GovernorCountingSimple.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "abstainVotes", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json deleted file mode 100644 index 39c4908f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorProposalThreshold.json +++ /dev/null @@ -1,1019 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorProposalThreshold", - "sourceName": "contracts/governance/extensions/GovernorProposalThreshold.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json deleted file mode 100644 index d2ceec6c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotes.json +++ /dev/null @@ -1,1032 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorVotes", - "sourceName": "contracts/governance/extensions/GovernorVotes.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC5805", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json deleted file mode 100644 index fad189d7..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesComp.json +++ /dev/null @@ -1,1032 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorVotesComp", - "sourceName": "contracts/governance/extensions/GovernorVotesComp.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract ERC20VotesComp", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json deleted file mode 100644 index 26d11c59..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAMB.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IAMB", - "sourceName": "contracts/vendor/amb/IAMB.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "executor", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "name": "AffirmationCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "executor", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "name": "RelayedMessage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedData", - "type": "bytes" - } - ], - "name": "UserRequestForAffirmation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedData", - "type": "bytes" - } - ], - "name": "UserRequestForSignature", - "type": "event" - }, - { - "inputs": [], - "name": "destinationChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "failedMessageDataHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "failedMessageReceiver", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "failedMessageSender", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxGasPerTx", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "messageCallStatus", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageSender", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageSourceChainId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_contract", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_gas", - "type": "uint256" - } - ], - "name": "requireToConfirmMessage", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_contract", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_gas", - "type": "uint256" - } - ], - "name": "requireToPassMessage", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sourceChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "transactionHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json deleted file mode 100644 index b5c84069..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IArbSys.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IArbSys", - "sourceName": "contracts/vendor/arbitrum/IArbSys.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "uniqueId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "batchNumber", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "indexInBatch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "arbBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "callvalue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "L2ToL1Transaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "hash", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "position", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "arbBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "callvalue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "L2ToL1Tx", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "reserved", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "position", - "type": "uint256" - } - ], - "name": "SendMerkleUpdate", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "arbBlockNum", - "type": "uint256" - } - ], - "name": "arbBlockHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbChainID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbOSVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStorageGasAvailable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isTopLevelCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "unused", - "type": "address" - } - ], - "name": "mapL1SenderContractAddressToL2Alias", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "myCallersAddressWithoutAliasing", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sendMerkleTreeState", - "outputs": [ - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "partials", - "type": "bytes32[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendTxToL1", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "wasMyCallersAddressAliased", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "name": "withdrawEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json deleted file mode 100644 index d5b2829f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IDelayedMessageProvider.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IDelayedMessageProvider", - "sourceName": "contracts/vendor/arbitrum/IDelayedMessageProvider.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "InboxMessageDelivered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - } - ], - "name": "InboxMessageDeliveredFromOrigin", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json deleted file mode 100644 index adc25f04..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernor.json +++ /dev/null @@ -1,771 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IGovernor", - "sourceName": "contracts/governance/IGovernor.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json deleted file mode 100644 index 1770361b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorCompatibilityBravo.json +++ /dev/null @@ -1,1001 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IGovernorCompatibilityBravo", - "sourceName": "contracts/governance/compatibility/IGovernorCompatibilityBravo.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getActions", - "outputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "voter", - "type": "address" - } - ], - "name": "getReceipt", - "outputs": [ - { - "components": [ - { - "internalType": "bool", - "name": "hasVoted", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "internalType": "struct IGovernorCompatibilityBravo.Receipt", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "proposals", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "abstainVotes", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "canceled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "queue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quorumVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json deleted file mode 100644 index ea5bd9cd..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IGovernorTimelock.json +++ /dev/null @@ -1,856 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IGovernorTimelock", - "sourceName": "contracts/governance/extensions/IGovernorTimelock.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ProposalQueued", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalEta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "queue", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernor.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "timelock", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json deleted file mode 100644 index 246210e4..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IInbox.json +++ /dev/null @@ -1,453 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IInbox", - "sourceName": "contracts/vendor/arbitrum/IInbox.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "InboxMessageDelivered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - } - ], - "name": "InboxMessageDeliveredFromOrigin", - "type": "event" - }, - { - "inputs": [], - "name": "bridge", - "outputs": [ - { - "internalType": "contract IBridge", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "dataLength", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "baseFee", - "type": "uint256" - } - ], - "name": "calculateRetryableSubmissionFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2CallValue", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxSubmissionCost", - "type": "uint256" - }, - { - "internalType": "address", - "name": "excessFeeRefundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "callValueRefundAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "createRetryableTicket", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "depositEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IBridge", - "name": "_bridge", - "type": "address" - }, - { - "internalType": "address", - "name": "_sequencerInbox", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IBridge", - "name": "_bridge", - "type": "address" - } - ], - "name": "postUpgradeInit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendContractTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendL1FundedContractTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendL1FundedUnsignedTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "messageData", - "type": "bytes" - } - ], - "name": "sendL2Message", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "messageData", - "type": "bytes" - } - ], - "name": "sendL2MessageFromOrigin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendUnsignedTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sequencerInbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2CallValue", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxSubmissionCost", - "type": "uint256" - }, - { - "internalType": "address", - "name": "excessFeeRefundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "callValueRefundAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "unsafeCreateRetryableTicket", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json deleted file mode 100644 index 29366c8a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IOutbox.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IOutbox", - "sourceName": "contracts/vendor/arbitrum/IOutbox.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "zero", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "transactionIndex", - "type": "uint256" - } - ], - "name": "OutBoxTransactionExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "outputRoot", - "type": "bytes32" - } - ], - "name": "SendRootUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "OUTBOX_VERSION", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridge", - "outputs": [ - { - "internalType": "contract IBridge", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l1Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l2Timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "calculateItemHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "uint256", - "name": "path", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "item", - "type": "bytes32" - } - ], - "name": "calculateMerkleRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l1Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l2Timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "executeTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l1Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l2Timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "executeTransactionSimulation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "isSpent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1Block", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1EthBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1OutputId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1Sender", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1Timestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rollup", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "roots", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "spent", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sendRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "l2BlockHash", - "type": "bytes32" - } - ], - "name": "updateSendRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json deleted file mode 100644 index 96741fd2..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Initializable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Initializable", - "sourceName": "contracts/proxy/utils/Initializable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json deleted file mode 100644 index 71280e7c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibAMB.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibAMB", - "sourceName": "contracts/crosschain/amb/LibAMB.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c37d84352192a9d1c9d136f3ababaab90d8fbc0bfc54bdfad597a76cd115a33564736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c37d84352192a9d1c9d136f3ababaab90d8fbc0bfc54bdfad597a76cd115a33564736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json deleted file mode 100644 index 3520670c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibArbitrumL1", - "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL1.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206190f169f8594207515dc7a2913dcad2c0c1a0fd794325ed434d995106bacff464736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206190f169f8594207515dc7a2913dcad2c0c1a0fd794325ed434d995106bacff464736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json deleted file mode 100644 index 357c6962..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibArbitrumL2.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibArbitrumL2", - "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL2.sol", - "abi": [ - { - "inputs": [], - "name": "ARBSYS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x6091610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea2646970667358221220a997e9a9bed247ae5a204c5becb72b696557d3f8c1958c819328313f56d94d9f64736f6c634300080d0033", - "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea2646970667358221220a997e9a9bed247ae5a204c5becb72b696557d3f8c1958c819328313f56d94d9f64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json deleted file mode 100644 index ae17552b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/LibOptimism.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibOptimism", - "sourceName": "contracts/crosschain/optimism/LibOptimism.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bb2210e34ad6350132412385b3a70def83a4bfceae8b49adbe13cf4035bb9e1864736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bb2210e34ad6350132412385b3a70def83a4bfceae8b49adbe13cf4035bb9e1864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json deleted file mode 100644 index ce20d6ca..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Math.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Math", - "sourceName": "contracts/utils/math/Math.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3421fb69c380795c0236420a50209dc26fa39d309540fbc9f7eaed7c161e7a764736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3421fb69c380795c0236420a50209dc26fa39d309540fbc9f7eaed7c161e7a764736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json deleted file mode 100644 index 2594b82a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MerkleProof.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "MerkleProof", - "sourceName": "contracts/utils/cryptography/MerkleProof.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203a94e470524bbd013c9bcfe4535aa142bdd779f30162512fd7f3d146ae17d01e64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203a94e470524bbd013c9bcfe4535aa142bdd779f30162512fd7f3d146ae17d01e64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json deleted file mode 100644 index 84a150a4..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/MinimalForwarder.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "MinimalForwarder", - "sourceName": "contracts/metatx/MinimalForwarder.sol", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct MinimalForwarder.ForwardRequest", - "name": "req", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - } - ], - "name": "getNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct MinimalForwarder.ForwardRequest", - "name": "req", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "verify", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x6101606040523480156200001257600080fd5b506040518060400160405280601081526020016f26b4b734b6b0b62337b93bb0b93232b960811b81525060405180604001604052806005815260200164302e302e3160d81b815250620000756000836200012f60201b620004a71790919060201c565b61012052620000928160016200012f602090811b620004a717901c565b61014052815160208084019190912060e052815190820120610100524660a0526200012060e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526200032e565b60006020835110156200014f57620001478362000183565b90506200017d565b826200016683620001cf60201b620004e01760201c565b8151620001779260200190620001d2565b5060ff90505b92915050565b600080829050601f81511115620001ba578260405163305a27a960e01b8152600401620001b1919062000278565b60405180910390fd5b8051620001c782620002d0565b179392505050565b90565b828054620001e090620002f8565b90600052602060002090601f0160209004810192826200020457600085556200024f565b82601f106200021f57805160ff19168380011785556200024f565b828001600101855582156200024f579182015b828111156200024f57825182559160200191906001019062000232565b506200025d92915062000261565b5090565b5b808211156200025d576000815560010162000262565b600060208083528351808285015260005b81811015620002a75785810183015185820160400152820162000289565b81811115620002ba576000604083870101525b50601f01601f1916929092016040019392505050565b80516020808301519190811015620002f2576000198160200360031b1b821691505b50919050565b600181811c908216806200030d57607f821691505b602082108103620002f257634e487b7160e01b600052602260045260246000fd5b60805160a05160c05160e051610100516101205161014051610e1e6200038960003960006102d8015260006102ae0152600061072f01526000610707015260006106620152600061068c015260006106b60152610e1e6000f3fe60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610a9c565b6001600160a01b031660009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610acc565b610106565b604051610084929190610bc7565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610bea565b3480156100e257600080fd5b506100f66100f1366004610acc565b610328565b6040519015158152602001610084565b60006060610115858585610328565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610c80565b600260006101a16020890189610a9c565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610a9c565b6001600160a01b0316606088013560408901356101fb60a08b018b610ca6565b61020860208d018d610a9c565b60405160200161021a93929190610ced565b60408051601f198184030181529082905261023491610d13565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610d2f565b5a1161029457fe5b90969095509350505050565b6000606080828080836102d37f0000000000000000000000000000000000000000000000000000000000000000836104e3565b6102fe7f000000000000000000000000000000000000000000000000000000000000000060016104e3565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061043b84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061043592507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e489150610398905060208a018a610a9c565b6103a860408b0160208c01610a9c565b60408b013560608c013560808d01356103c460a08f018f610ca6565b6040516103d2929190610d51565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e08101919091526101000160405160208183030381529060405280519060200120610587565b906105b4565b90506080850135600260006104536020890189610a9c565b6001600160a01b03166001600160a01b031681526020019081526020016000205414801561049e57506104896020860186610a9c565b6001600160a01b0316816001600160a01b0316145b95945050505050565b60006020835110156104c3576104bc836105d8565b90506104da565b828281516104d49260200190610a03565b5060ff90505b92915050565b90565b606060ff83146104f6576104bc83610616565b81805461050290610d61565b80601f016020809104026020016040519081016040528092919081815260200182805461052e90610d61565b801561057b5780601f106105505761010080835404028352916020019161057b565b820191906000526020600020905b81548152906001019060200180831161055e57829003601f168201915b505050505090506104da565b60006104da610594610655565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060006105c38585610785565b915091506105d0816107ca565b509392505050565b600080829050601f81511115610603578260405163305a27a960e01b81526004016101789190610d9b565b805161060e82610dae565b179392505050565b6060600061062383610917565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156106ae57507f000000000000000000000000000000000000000000000000000000000000000046145b156106d857507f000000000000000000000000000000000000000000000000000000000000000090565b610780604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b60008082516041036107bb5760208301516040840151606085015160001a6107af8782858561093f565b945094505050506107c3565b506000905060025b9250929050565b60008160048111156107de576107de610dd2565b036107e65750565b60018160048111156107fa576107fa610dd2565b036108475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561085b5761085b610dd2565b036108a85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156108bc576108bc610dd2565b036109145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b600060ff8216601f8111156104da57604051632cd44ac360e21b815260040160405180910390fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561097657506000905060036109fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156109ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166109f3576000600192509250506109fa565b9150600090505b94509492505050565b828054610a0f90610d61565b90600052602060002090601f016020900481019282610a315760008555610a77565b82601f10610a4a57805160ff1916838001178555610a77565b82800160010185558215610a77579182015b82811115610a77578251825591602001919060010190610a5c565b50610a83929150610a87565b5090565b5b80821115610a835760008155600101610a88565b600060208284031215610aae57600080fd5b81356001600160a01b0381168114610ac557600080fd5b9392505050565b600080600060408486031215610ae157600080fd5b833567ffffffffffffffff80821115610af957600080fd5b9085019060c08288031215610b0d57600080fd5b90935060208501359080821115610b2357600080fd5b818601915086601f830112610b3757600080fd5b813581811115610b4657600080fd5b876020828501011115610b5857600080fd5b6020830194508093505050509250925092565b60005b83811015610b86578181015183820152602001610b6e565b83811115610b95576000848401525b50505050565b60008151808452610bb3816020860160208601610b6b565b601f01601f19169290920160200192915050565b8215158152604060208201526000610be26040830184610b9b565b949350505050565b60ff60f81b881681526000602060e081840152610c0a60e084018a610b9b565b8381036040850152610c1c818a610b9b565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610c6e57835183529284019291840191600101610c52565b50909c9b505050505050505050505050565b60008219821115610ca157634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610cbd57600080fd5b83018035915067ffffffffffffffff821115610cd857600080fd5b6020019150368190038213156107c357600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610d25818460208701610b6b565b9190910192915050565b600082610d4c57634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610d7557607f821691505b602082108103610d9557634e487b7160e01b600052602260045260246000fd5b50919050565b602081526000610ac56020830184610b9b565b80516020808301519190811015610d955760001960209190910360031b1b16919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206fe5ed5ceb0154292fd4bec46d808cd37f1bb24363f695e1a84a3f4f9c71b78164736f6c634300080d0033", - "deployedBytecode": "0x60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610a9c565b6001600160a01b031660009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610acc565b610106565b604051610084929190610bc7565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610bea565b3480156100e257600080fd5b506100f66100f1366004610acc565b610328565b6040519015158152602001610084565b60006060610115858585610328565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610c80565b600260006101a16020890189610a9c565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610a9c565b6001600160a01b0316606088013560408901356101fb60a08b018b610ca6565b61020860208d018d610a9c565b60405160200161021a93929190610ced565b60408051601f198184030181529082905261023491610d13565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610d2f565b5a1161029457fe5b90969095509350505050565b6000606080828080836102d37f0000000000000000000000000000000000000000000000000000000000000000836104e3565b6102fe7f000000000000000000000000000000000000000000000000000000000000000060016104e3565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061043b84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061043592507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e489150610398905060208a018a610a9c565b6103a860408b0160208c01610a9c565b60408b013560608c013560808d01356103c460a08f018f610ca6565b6040516103d2929190610d51565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e08101919091526101000160405160208183030381529060405280519060200120610587565b906105b4565b90506080850135600260006104536020890189610a9c565b6001600160a01b03166001600160a01b031681526020019081526020016000205414801561049e57506104896020860186610a9c565b6001600160a01b0316816001600160a01b0316145b95945050505050565b60006020835110156104c3576104bc836105d8565b90506104da565b828281516104d49260200190610a03565b5060ff90505b92915050565b90565b606060ff83146104f6576104bc83610616565b81805461050290610d61565b80601f016020809104026020016040519081016040528092919081815260200182805461052e90610d61565b801561057b5780601f106105505761010080835404028352916020019161057b565b820191906000526020600020905b81548152906001019060200180831161055e57829003601f168201915b505050505090506104da565b60006104da610594610655565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060006105c38585610785565b915091506105d0816107ca565b509392505050565b600080829050601f81511115610603578260405163305a27a960e01b81526004016101789190610d9b565b805161060e82610dae565b179392505050565b6060600061062383610917565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156106ae57507f000000000000000000000000000000000000000000000000000000000000000046145b156106d857507f000000000000000000000000000000000000000000000000000000000000000090565b610780604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b905090565b60008082516041036107bb5760208301516040840151606085015160001a6107af8782858561093f565b945094505050506107c3565b506000905060025b9250929050565b60008160048111156107de576107de610dd2565b036107e65750565b60018160048111156107fa576107fa610dd2565b036108475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561085b5761085b610dd2565b036108a85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156108bc576108bc610dd2565b036109145760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b600060ff8216601f8111156104da57604051632cd44ac360e21b815260040160405180910390fd5b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561097657506000905060036109fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156109ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166109f3576000600192509250506109fa565b9150600090505b94509492505050565b828054610a0f90610d61565b90600052602060002090601f016020900481019282610a315760008555610a77565b82601f10610a4a57805160ff1916838001178555610a77565b82800160010185558215610a77579182015b82811115610a77578251825591602001919060010190610a5c565b50610a83929150610a87565b5090565b5b80821115610a835760008155600101610a88565b600060208284031215610aae57600080fd5b81356001600160a01b0381168114610ac557600080fd5b9392505050565b600080600060408486031215610ae157600080fd5b833567ffffffffffffffff80821115610af957600080fd5b9085019060c08288031215610b0d57600080fd5b90935060208501359080821115610b2357600080fd5b818601915086601f830112610b3757600080fd5b813581811115610b4657600080fd5b876020828501011115610b5857600080fd5b6020830194508093505050509250925092565b60005b83811015610b86578181015183820152602001610b6e565b83811115610b95576000848401525b50505050565b60008151808452610bb3816020860160208601610b6b565b601f01601f19169290920160200192915050565b8215158152604060208201526000610be26040830184610b9b565b949350505050565b60ff60f81b881681526000602060e081840152610c0a60e084018a610b9b565b8381036040850152610c1c818a610b9b565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610c6e57835183529284019291840191600101610c52565b50909c9b505050505050505050505050565b60008219821115610ca157634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610cbd57600080fd5b83018035915067ffffffffffffffff821115610cd857600080fd5b6020019150368190038213156107c357600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610d25818460208701610b6b565b9190910192915050565b600082610d4c57634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610d7557607f821691505b602082108103610d9557634e487b7160e01b600052602260045260246000fd5b50919050565b602081526000610ac56020830184610b9b565b80516020808301519190811015610d955760001960209190910360031b1b16919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206fe5ed5ceb0154292fd4bec46d808cd37f1bb24363f695e1a84a3f4f9c71b78164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json deleted file mode 100644 index 2dc38f34..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PaymentSplitter.json +++ /dev/null @@ -1,313 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "PaymentSplitter", - "sourceName": "contracts/finance/PaymentSplitter.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address[]", - "name": "payees", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "shares_", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ERC20PaymentReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "PayeeAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "PaymentReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "PaymentReleased", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "payee", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "account", - "type": "address" - } - ], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "shares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "totalReleased", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalReleased", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x6080604052604051620011d3380380620011d383398101604081905262000026916200042e565b8051825114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b60005b82518110156200015757620001428382815181106200011157620001116200050c565b60200260200101518383815181106200012e576200012e6200050c565b60200260200101516200016060201b60201c565b806200014e8162000538565b915050620000ee565b5050506200056f565b6001600160a01b038216620001cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b600081116200021f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260026020526040902054156200029b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200030390829062000554565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200038d576200038d6200034c565b604052919050565b60006001600160401b03821115620003b157620003b16200034c565b5060051b60200190565b600082601f830112620003cd57600080fd5b81516020620003e6620003e08362000395565b62000362565b82815260059290921b840181019181810190868411156200040657600080fd5b8286015b848110156200042357805183529183019183016200040a565b509695505050505050565b600080604083850312156200044257600080fd5b82516001600160401b03808211156200045a57600080fd5b818501915085601f8301126200046f57600080fd5b8151602062000482620003e08362000395565b82815260059290921b84018101918181019089841115620004a257600080fd5b948201945b83861015620004d95785516001600160a01b0381168114620004c95760008081fd5b82529482019490820190620004a7565b91880151919650909350505080821115620004f357600080fd5b506200050285828601620003bb565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200054d576200054d62000522565b5060010190565b600082198211156200056a576200056a62000522565b500190565b610c54806200057f6000396000f3fe6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109c8565b6102c9565b005b34801561011c57600080fd5b506000545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e5565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e5565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a1e565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109c8565b6001600160a01b031660009081526003602052604090205490565b34801561021457600080fd5b506101216102233660046109c8565b6104fa565b34801561023457600080fd5b506101216102433660046109e5565b610542565b34801561025457600080fd5b506101216102633660046109c8565b6001600160a01b031660009081526002602052604090205490565b34801561028a57600080fd5b506101216102993660046109c8565b6001600160a01b031660009081526005602052604090205490565b3480156102c057600080fd5b50600154610121565b6001600160a01b0381166000908152600260205260409020546103075760405162461bcd60e51b81526004016102fe90610a37565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a7d565b80600160008282546103469190610ade565b90915550506001600160a01b0382166000908152600360205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152600260205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a37565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a7d565b6001600160a01b03831660009081526005602052604081208054839290610444908490610ade565b90915550506001600160a01b03808416600090815260066020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000600482815481106104df576104df610af6565b6000918252602090912001546001600160a01b031692915050565b60008061050660015490565b6105109047610ade565b905061053b8382610536866001600160a01b031660009081526003602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0c565b6105cf9190610ade565b6001600160a01b03808616600090815260066020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107b8565b600080546001600160a01b0385168252600260205260408220548391906107a49086610b25565b6107ae9190610b44565b6106059190610b66565b600061080d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661088d9092919063ffffffff16565b905080516000148061082e57508080602001905181019061082e9190610b7d565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b49190610bcf565b60006040518083038185875af1925050503d80600081146108f1576040519150601f19603f3d011682016040523d82523d6000602084013e6108f6565b606091505b509150915061090787838387610912565b979650505050505050565b6060831561098157825160000361097a576001600160a01b0385163b61097a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109965781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610beb565b6001600160a01b03811681146109c557600080fd5b50565b6000602082840312156109da57600080fd5b813561053b816109b0565b600080604083850312156109f857600080fd5b8235610a03816109b0565b91506020830135610a13816109b0565b809150509250929050565b600060208284031215610a3057600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af157610af1610ac8565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b1e57600080fd5b5051919050565b6000816000190483118215151615610b3f57610b3f610ac8565b500290565b600082610b6157634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7857610b78610ac8565b500390565b600060208284031215610b8f57600080fd5b8151801515811461053b57600080fd5b60005b83811015610bba578181015183820152602001610ba2565b83811115610bc9576000848401525b50505050565b60008251610be1818460208701610b9f565b9190910192915050565b6020815260008251806020840152610c0a816040850160208701610b9f565b601f01601f1916919091016040019291505056fea2646970667358221220d987fb49ce7826e2aaff592a3a8ca3b459a6f78dc41ef1b2cb4bcf65fa6a1ea164736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109c8565b6102c9565b005b34801561011c57600080fd5b506000545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e5565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e5565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a1e565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109c8565b6001600160a01b031660009081526003602052604090205490565b34801561021457600080fd5b506101216102233660046109c8565b6104fa565b34801561023457600080fd5b506101216102433660046109e5565b610542565b34801561025457600080fd5b506101216102633660046109c8565b6001600160a01b031660009081526002602052604090205490565b34801561028a57600080fd5b506101216102993660046109c8565b6001600160a01b031660009081526005602052604090205490565b3480156102c057600080fd5b50600154610121565b6001600160a01b0381166000908152600260205260409020546103075760405162461bcd60e51b81526004016102fe90610a37565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a7d565b80600160008282546103469190610ade565b90915550506001600160a01b0382166000908152600360205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152600260205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a37565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a7d565b6001600160a01b03831660009081526005602052604081208054839290610444908490610ade565b90915550506001600160a01b03808416600090815260066020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000600482815481106104df576104df610af6565b6000918252602090912001546001600160a01b031692915050565b60008061050660015490565b6105109047610ade565b905061053b8382610536866001600160a01b031660009081526003602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0c565b6105cf9190610ade565b6001600160a01b03808616600090815260066020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107b8565b600080546001600160a01b0385168252600260205260408220548391906107a49086610b25565b6107ae9190610b44565b6106059190610b66565b600061080d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661088d9092919063ffffffff16565b905080516000148061082e57508080602001905181019061082e9190610b7d565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b49190610bcf565b60006040518083038185875af1925050503d80600081146108f1576040519150601f19603f3d011682016040523d82523d6000602084013e6108f6565b606091505b509150915061090787838387610912565b979650505050505050565b6060831561098157825160000361097a576001600160a01b0385163b61097a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109965781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610beb565b6001600160a01b03811681146109c557600080fd5b50565b6000602082840312156109da57600080fd5b813561053b816109b0565b600080604083850312156109f857600080fd5b8235610a03816109b0565b91506020830135610a13816109b0565b809150509250929050565b600060208284031215610a3057600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af157610af1610ac8565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b1e57600080fd5b5051919050565b6000816000190483118215151615610b3f57610b3f610ac8565b500290565b600082610b6157634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7857610b78610ac8565b500390565b600060208284031215610b8f57600080fd5b8151801515811461053b57600080fd5b60005b83811015610bba578181015183820152602001610ba2565b83811115610bc9576000848401525b50505050565b60008251610be1818460208701610b9f565b9190910192915050565b6020815260008251806020840152610c0a816040850160208701610b9f565b601f01601f1916919091016040019291505056fea2646970667358221220d987fb49ce7826e2aaff592a3a8ca3b459a6f78dc41ef1b2cb4bcf65fa6a1ea164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json deleted file mode 100644 index d595e944..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ProxyAdmin.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ProxyAdmin", - "sourceName": "contracts/proxy/transparent/ProxyAdmin.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract ITransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61069a8061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105e2565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c990869086906004016105ff565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff8082111561055957600080fd5b818601915086601f83011261056d57600080fd5b81358181111561057f5761057f6104f6565b604051601f8201601f19908116603f011681019083821181831017156105a7576105a76104f6565b816040528281528960208487010111156105c057600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156105f457600080fd5b81516104b681610484565b60018060a01b038316815260006020604081840152835180604085015260005b8181101561063b5785810183015185820160600152820161061f565b8181111561064d576000606083870101525b50601f01601f19169290920160600194935050505056fea264697066735822122076254e1b299bc3634bc290e818ae9ec1432090068736205a6eea82c6f8707b3064736f6c634300080d0033", - "deployedBytecode": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105e2565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c990869086906004016105ff565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff8082111561055957600080fd5b818601915086601f83011261056d57600080fd5b81358181111561057f5761057f6104f6565b604051601f8201601f19908116603f011681019083821181831017156105a7576105a76104f6565b816040528281528960208487010111156105c057600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156105f457600080fd5b81516104b681610484565b60018060a01b038316815260006020604081840152835180604085015260005b8181101561063b5785810183015185820160600152820161061f565b8181111561064d576000606083870101525b50601f01601f19169290920160600194935050505056fea264697066735822122076254e1b299bc3634bc290e818ae9ec1432090068736205a6eea82c6f8707b3064736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json deleted file mode 100644 index 93d97d67..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/RefundEscrow.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "RefundEscrow", - "sourceName": "contracts/utils/escrow/RefundEscrow.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address payable", - "name": "beneficiary_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "RefundsClosed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "RefundsEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [], - "name": "beneficiary", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "beneficiaryWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "close", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "refundee", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "depositsOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "enableRefunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "state", - "outputs": [ - { - "internalType": "enum RefundEscrow.State", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "payee", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrawalAllowed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x60a060405234801561001057600080fd5b50604051610b22380380610b2283398101604081905261002f91610113565b610038336100c3565b6001600160a01b0381166100a85760405162461bcd60e51b815260206004820152602d60248201527f526566756e64457363726f773a2062656e65666963696172792069732074686560448201526c207a65726f206164647265737360981b606482015260840160405180910390fd5b6001600160a01b03166080526002805460ff19169055610143565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561012557600080fd5b81516001600160a01b038116811461013c57600080fd5b9392505050565b6080516109be6101646000396000818160bb015261051b01526109be6000f3fe6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b146101895780639af6549a146101a7578063c19d93fb146101bc578063e3a9db1a146101dc578063f2fde38b14610220578063f340fa011461024057600080fd5b806338af3eed146100ac57806343d726d6146100f857806351cff8d91461010f578063685ca1941461012f578063715018a61461015f5780638c52dc4114610174575b600080fd5b3480156100b857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010457600080fd5b5061010d610253565b005b34801561011b57600080fd5b5061010d61012a366004610900565b61030f565b34801561013b57600080fd5b5061014f61014a366004610900565b61038c565b60405190151581526020016100ef565b34801561016b57600080fd5b5061010d6103ae565b34801561018057600080fd5b5061010d6103c2565b34801561019557600080fd5b506000546001600160a01b03166100db565b3480156101b357600080fd5b5061010d610483565b3480156101c857600080fd5b5060025460ff166040516100ef919061093a565b3480156101e857600080fd5b506102126101f7366004610900565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100ef565b34801561022c57600080fd5b5061010d61023b366004610900565b610541565b61010d61024e366004610900565b6105b7565b61025b61063a565b600060025460ff16600281111561027457610274610924565b146102d85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b6002805460ff1916811790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b6103188161038c565b6103805760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102cf565b61038981610694565b50565b6000600160025460ff1660028111156103a7576103a7610924565b1492915050565b6103b661063a565b6103c0600061070b565b565b6103ca61063a565b600060025460ff1660028111156103e3576103e3610924565b1461044b5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102cf565b6002805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b6002805460ff16600281111561049b5761049b610924565b1461050e5760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102cf565b6103c06001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000164761075b565b61054961063a565b6001600160a01b0381166105ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cf565b6103898161070b565b600060025460ff1660028111156105d0576105d0610924565b146106315760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102cf565b61038981610879565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102cf565b61069c61063a565b6001600160a01b03811660008181526001602052604081208054919055906106c4908261075b565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516106ff91815260200190565b60405180910390a25050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b804710156107ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146107f8576040519150601f19603f3d011682016040523d82523d6000602084013e6107fd565b606091505b50509050806108745760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102cf565b505050565b61088161063a565b6001600160a01b0381166000908152600160205260408120805434928392916108ab908490610962565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016106ff565b6001600160a01b038116811461038957600080fd5b60006020828403121561091257600080fd5b813561091d816108eb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016003831061095c57634e487b7160e01b600052602160045260246000fd5b91905290565b6000821982111561098357634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212209451dd3e19c5e6257ae2e4369be3f5f0df39f043cc4afbd5e6052adc8e0d341964736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b146101895780639af6549a146101a7578063c19d93fb146101bc578063e3a9db1a146101dc578063f2fde38b14610220578063f340fa011461024057600080fd5b806338af3eed146100ac57806343d726d6146100f857806351cff8d91461010f578063685ca1941461012f578063715018a61461015f5780638c52dc4114610174575b600080fd5b3480156100b857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010457600080fd5b5061010d610253565b005b34801561011b57600080fd5b5061010d61012a366004610900565b61030f565b34801561013b57600080fd5b5061014f61014a366004610900565b61038c565b60405190151581526020016100ef565b34801561016b57600080fd5b5061010d6103ae565b34801561018057600080fd5b5061010d6103c2565b34801561019557600080fd5b506000546001600160a01b03166100db565b3480156101b357600080fd5b5061010d610483565b3480156101c857600080fd5b5060025460ff166040516100ef919061093a565b3480156101e857600080fd5b506102126101f7366004610900565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100ef565b34801561022c57600080fd5b5061010d61023b366004610900565b610541565b61010d61024e366004610900565b6105b7565b61025b61063a565b600060025460ff16600281111561027457610274610924565b146102d85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b6002805460ff1916811790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b6103188161038c565b6103805760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102cf565b61038981610694565b50565b6000600160025460ff1660028111156103a7576103a7610924565b1492915050565b6103b661063a565b6103c0600061070b565b565b6103ca61063a565b600060025460ff1660028111156103e3576103e3610924565b1461044b5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102cf565b6002805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b6002805460ff16600281111561049b5761049b610924565b1461050e5760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102cf565b6103c06001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000164761075b565b61054961063a565b6001600160a01b0381166105ae5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cf565b6103898161070b565b600060025460ff1660028111156105d0576105d0610924565b146106315760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102cf565b61038981610879565b6000546001600160a01b031633146103c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102cf565b61069c61063a565b6001600160a01b03811660008181526001602052604081208054919055906106c4908261075b565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516106ff91815260200190565b60405180910390a25050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b804710156107ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102cf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146107f8576040519150601f19603f3d011682016040523d82523d6000602084013e6107fd565b606091505b50509050806108745760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102cf565b505050565b61088161063a565b6001600160a01b0381166000908152600160205260408120805434928392916108ab908490610962565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016106ff565b6001600160a01b038116811461038957600080fd5b60006020828403121561091257600080fd5b813561091d816108eb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016003831061095c57634e487b7160e01b600052602160045260246000fd5b91905290565b6000821982111561098357634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212209451dd3e19c5e6257ae2e4369be3f5f0df39f043cc4afbd5e6052adc8e0d341964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json deleted file mode 100644 index 647864e9..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeCast.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeCast", - "sourceName": "contracts/utils/math/SafeCast.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209b70f13b9037ee79c19308444b56b249ba516d35f57eaf86c037b39c5bf00f0464736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209b70f13b9037ee79c19308444b56b249ba516d35f57eaf86c037b39c5bf00f0464736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json deleted file mode 100644 index b9050921..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeERC20.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeERC20", - "sourceName": "contracts/token/ERC20/utils/SafeERC20.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b80db6a35dc835f568009f7be47739d5e03aa028c58404766b6e2a2584321aa064736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b80db6a35dc835f568009f7be47739d5e03aa028c58404766b6e2a2584321aa064736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json deleted file mode 100644 index 3aff1478..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SafeMath.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeMath", - "sourceName": "contracts/utils/math/SafeMath.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206bad85ec3f129e4a2d14c0ffec29b8707e9fa0d94b1f1866adbff6471def4ddb64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206bad85ec3f129e4a2d14c0ffec29b8707e9fa0d94b1f1866adbff6471def4ddb64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json deleted file mode 100644 index 75649089..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignatureChecker.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SignatureChecker", - "sourceName": "contracts/utils/cryptography/SignatureChecker.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220767b2d621e5661e0a91e7ef50e37dfb79311d08bd7d95516bfedb69ebb980e9a64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220767b2d621e5661e0a91e7ef50e37dfb79311d08bd7d95516bfedb69ebb980e9a64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json deleted file mode 100644 index 343f4c7c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedMath.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SignedMath", - "sourceName": "contracts/utils/math/SignedMath.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205cc84bcb96ea603ae82ad7a10d9c3b8fd7d26a5cb5168847aaac64c60399549964736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205cc84bcb96ea603ae82ad7a10d9c3b8fd7d26a5cb5168847aaac64c60399549964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json deleted file mode 100644 index d13783eb..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/SignedSafeMath.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SignedSafeMath", - "sourceName": "contracts/utils/math/SignedSafeMath.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220eb083871ab45137463fe50ab403fd89f48c46327b5ac689f37963752e92d060064736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220eb083871ab45137463fe50ab403fd89f48c46327b5ac689f37963752e92d060064736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json deleted file mode 100644 index e80087cb..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/StorageSlot.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "StorageSlot", - "sourceName": "contracts/utils/StorageSlot.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207aec9d374217a385544909e233e47dc530ff22774efe9a7b3f32d59634b911de64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207aec9d374217a385544909e233e47dc530ff22774efe9a7b3f32d59634b911de64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json deleted file mode 100644 index 7cba042b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Strings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Strings", - "sourceName": "contracts/utils/Strings.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099dc6e723e28541c81b9dfe9b80160aa492ed578a0a0233f4ab4731b030d604164736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122099dc6e723e28541c81b9dfe9b80160aa492ed578a0a0233f4ab4731b030d604164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json deleted file mode 100644 index 8484276a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TimelockController.json +++ /dev/null @@ -1,900 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TimelockController", - "sourceName": "contracts/governance/TimelockController.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "minDelay", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "proposers", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "executors", - "type": "address[]" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "CallExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "CallSalt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "CallScheduled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "Cancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldDuration", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newDuration", - "type": "uint256" - } - ], - "name": "MinDelayChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "CANCELLER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXECUTOR_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PROPOSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TIMELOCK_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "executeBatch", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getMinDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "hashOperation", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "hashOperationBatch", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperation", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationDone", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationPending", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationReady", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "schedule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "scheduleBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newDelay", - "type": "uint256" - } - ], - "name": "updateDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b50604051620023a4380380620023a4833981016040819052620000349162000408565b6200004f60008051602062002324833981519152806200022d565b6200007960008051602062002344833981519152600080516020620023248339815191526200022d565b620000a360008051602062002364833981519152600080516020620023248339815191526200022d565b620000cd60008051602062002384833981519152600080516020620023248339815191526200022d565b620000e8600080516020620023248339815191523062000278565b6001600160a01b03811615620001135762000113600080516020620023248339815191528262000278565b60005b835181101562000199576200015d600080516020620023448339815191528583815181106200014957620001496200048f565b60200260200101516200027860201b60201c565b62000186600080516020620023848339815191528583815181106200014957620001496200048f565b6200019181620004a5565b905062000116565b5060005b8251811015620001e357620001d0600080516020620023648339815191528483815181106200014957620001496200048f565b620001db81620004a5565b90506200019d565b5060028490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050620004cd565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000284828262000288565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000284576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002e43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200035657600080fd5b919050565b600082601f8301126200036d57600080fd5b815160206001600160401b03808311156200038c576200038c62000328565b8260051b604051601f19603f83011681018181108482111715620003b457620003b462000328565b604052938452858101830193838101925087851115620003d357600080fd5b83870191505b84821015620003fd57620003ed826200033e565b83529183019190830190620003d9565b979650505050505050565b600080600080608085870312156200041f57600080fd5b845160208601519094506001600160401b03808211156200043f57600080fd5b6200044d888389016200035b565b945060408701519150808211156200046457600080fd5b5062000473878288016200035b565b92505062000484606086016200033e565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b600060018201620004c657634e487b7160e01b600052601160045260246000fd5b5060010190565b611e4780620004dd6000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610582578063e38335e5146105a2578063f23a6e61146105b5578063f27a0c92146105e157600080fd5b8063bc197c8114610509578063c4d252f514610535578063d45c44351461055557600080fd5b806391d14854116100c657806391d1485414610480578063a217fddf146104a0578063b08e51c0146104b5578063b1c5f427146104e957600080fd5b80638065657f1461040c5780638f2a0bb01461042c5780638f61f4f51461044c57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038c57806336568abe146103ac578063584b153e146103cc57806364d62353146103ec57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036c57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611442565b6105f6565b005b3480156101f557600080fd5b506102096102043660046114b6565b6106cc565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e0565b6106f7565b3480156102b357600080fd5b506102096102c236600461154b565b6107ac565b3480156102d357600080fd5b506102f26102e2366004611619565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b5061025261032636600461154b565b60009081526020819052604090206001015490565b34801561034757600080fd5b5061020961035636600461154b565b6000908152600160208190526040909120541490565b34801561037857600080fd5b506101e7610387366004611680565b6107d2565b34801561039857600080fd5b506102096103a736600461154b565b6107fc565b3480156103b857600080fd5b506101e76103c7366004611680565b610815565b3480156103d857600080fd5b506102096103e736600461154b565b610898565b3480156103f857600080fd5b506101e761040736600461154b565b6108ae565b34801561041857600080fd5b506102526104273660046114e0565b610952565b34801561043857600080fd5b506101e76104473660046116f0565b610991565b34801561045857600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048c57600080fd5b5061020961049b366004611680565b610b24565b3480156104ac57600080fd5b50610252600081565b3480156104c157600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f557600080fd5b506102526105043660046117a1565b610b4d565b34801561051557600080fd5b506102f26105243660046118c8565b63bc197c8160e01b95945050505050565b34801561054157600080fd5b506101e761055036600461154b565b610b92565b34801561056157600080fd5b5061025261057036600461154b565b60009081526001602052604090205490565b34801561058e57600080fd5b506101e761059d366004611680565b610c67565b6101e76105b03660046117a1565b610c8c565b3480156105c157600080fd5b506102f26105d0366004611971565b63f23a6e6160e01b95945050505050565b3480156105ed57600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161062081610e16565b6000610630898989898989610952565b905061063c8184610e23565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610678969594939291906119fe565b60405180910390a383156106c157807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b891815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f157506106f182610f12565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610723816000610b24565b610731576107318133610f47565b6000610741888888888888610952565b905061074d8185610fa0565b6107598888888861103c565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107919493929190611a3b565b60405180910390a36107a28161110f565b5050505050505050565b6000818152600160205260408120546001811180156107cb5750428111155b9392505050565b6000828152602081905260409020600101546107ed81610e16565b6107f78383611148565b505050565b60008181526001602052604081205481905b1192915050565b6001600160a01b038116331461088a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089482826111cc565b5050565b600081815260016020819052604082205461080e565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610881565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b600086868686868660405160200161096f969594939291906119fe565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e16565b8887146109da5760405162461bcd60e51b815260040161088190611a6d565b8885146109f95760405162461bcd60e51b815260040161088190611a6d565b6000610a0b8b8b8b8b8b8b8b8b610b4d565b9050610a178184610e23565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab0565b9050602002016020810190610a6c9190611ac6565b8d8d86818110610a7e57610a7e611ab0565b905060200201358c8c87818110610a9757610a97611ab0565b9050602002810190610aa99190611ae1565b8c8b604051610abd969594939291906119fe565b60405180910390a3610ace81611b3d565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b6e989796959493929190611be6565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbc81610e16565b610bc582610898565b610c2b5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610881565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c8281610e16565b6107f783836111cc565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cb8816000610b24565b610cc657610cc68133610f47565b878614610ce55760405162461bcd60e51b815260040161088190611a6d565b878414610d045760405162461bcd60e51b815260040161088190611a6d565b6000610d168a8a8a8a8a8a8a8a610b4d565b9050610d228185610fa0565b60005b89811015610e005760008b8b83818110610d4157610d41611ab0565b9050602002016020810190610d569190611ac6565b905060008a8a84818110610d6c57610d6c611ab0565b9050602002013590503660008a8a86818110610d8a57610d8a611ab0565b9050602002810190610d9c9190611ae1565b91509150610dac8484848461103c565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de39493929190611a3b565b60405180910390a35050505080610df990611b3d565b9050610d25565b50610e0a8161110f565b50505050505050505050565b610e208133610f47565b50565b610e2c826107fc565b15610e915760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610881565b600254811015610ef25760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610881565b610efc8142611c91565b6000928352600160205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f157506301ffc9a760e01b6001600160e01b03198316146106f1565b610f518282610b24565b61089457610f5e81611231565b610f69836020611243565b604051602001610f7a929190611cd9565b60408051601f198184030181529082905262461bcd60e51b825261088191600401611d4e565b610fa9826107ac565b610fc55760405162461bcd60e51b815260040161088190611d81565b801580610fe15750600081815260016020819052604090912054145b6108945760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610881565b6000846001600160a01b0316848484604051611059929190611dcb565b60006040518083038185875af1925050503d8060008114611096576040519150601f19603f3d011682016040523d82523d6000602084013e61109b565b606091505b50509050806111085760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610881565b5050505050565b611118816107ac565b6111345760405162461bcd60e51b815260040161088190611d81565b600090815260016020819052604090912055565b6111528282610b24565b610894576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d68282610b24565b15610894576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f16001600160a01b03831660145b60606000611252836002611ddb565b61125d906002611c91565b6001600160401b0381111561127457611274611564565b6040519080825280601f01601f19166020018201604052801561129e576020820181803683370190505b509050600360fc1b816000815181106112b9576112b9611ab0565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112e8576112e8611ab0565b60200101906001600160f81b031916908160001a905350600061130c846002611ddb565b611317906001611c91565b90505b600181111561138f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061134b5761134b611ab0565b1a60f81b82828151811061136157611361611ab0565b60200101906001600160f81b031916908160001a90535060049490941c9361138881611dfa565b905061131a565b5083156107cb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610881565b80356001600160a01b03811681146113f557600080fd5b919050565b60008083601f84011261140c57600080fd5b5081356001600160401b0381111561142357600080fd5b60208301915083602082850101111561143b57600080fd5b9250929050565b600080600080600080600060c0888a03121561145d57600080fd5b611466886113de565b96506020880135955060408801356001600160401b0381111561148857600080fd5b6114948a828b016113fa565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114c857600080fd5b81356001600160e01b0319811681146107cb57600080fd5b60008060008060008060a087890312156114f957600080fd5b611502876113de565b95506020870135945060408701356001600160401b0381111561152457600080fd5b61153089828a016113fa565b979a9699509760608101359660809091013595509350505050565b60006020828403121561155d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a2576115a2611564565b604052919050565b600082601f8301126115bb57600080fd5b81356001600160401b038111156115d4576115d4611564565b6115e7601f8201601f191660200161157a565b8181528460208386010111156115fc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561162f57600080fd5b611638856113de565b9350611646602086016113de565b92506040850135915060608501356001600160401b0381111561166857600080fd5b611674878288016115aa565b91505092959194509250565b6000806040838503121561169357600080fd5b823591506116a3602084016113de565b90509250929050565b60008083601f8401126116be57600080fd5b5081356001600160401b038111156116d557600080fd5b6020830191508360208260051b850101111561143b57600080fd5b600080600080600080600080600060c08a8c03121561170e57600080fd5b89356001600160401b038082111561172557600080fd5b6117318d838e016116ac565b909b50995060208c013591508082111561174a57600080fd5b6117568d838e016116ac565b909950975060408c013591508082111561176f57600080fd5b5061177c8c828d016116ac565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117bd57600080fd5b88356001600160401b03808211156117d457600080fd5b6117e08c838d016116ac565b909a50985060208b01359150808211156117f957600080fd5b6118058c838d016116ac565b909850965060408b013591508082111561181e57600080fd5b5061182b8b828c016116ac565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185a57600080fd5b813560206001600160401b0382111561187557611875611564565b8160051b61188482820161157a565b928352848101820192828101908785111561189e57600080fd5b83870192505b848310156118bd578235825291830191908301906118a4565b979650505050505050565b600080600080600060a086880312156118e057600080fd5b6118e9866113de565b94506118f7602087016113de565b935060408601356001600160401b038082111561191357600080fd5b61191f89838a01611849565b9450606088013591508082111561193557600080fd5b61194189838a01611849565b9350608088013591508082111561195757600080fd5b50611964888289016115aa565b9150509295509295909350565b600080600080600060a0868803121561198957600080fd5b611992866113de565b94506119a0602087016113de565b9350604086013592506060860135915060808601356001600160401b038111156119c957600080fd5b611964888289016115aa565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2660a0830186886119d5565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a636060830184866119d5565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611ad857600080fd5b6107cb826113de565b6000808335601e19843603018112611af857600080fd5b8301803591506001600160401b03821115611b1257600080fd5b60200191503681900382131561143b57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b4f57611b4f611b27565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bd95782840389528135601e19883603018112611b9157600080fd5b870180356001600160401b03811115611ba957600080fd5b803603891315611bb857600080fd5b611bc586828985016119d5565b9a87019a9550505090840190600101611b70565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c27576001600160a01b03611c12846113de565b16825260209283019290910190600101611bf9565b5083810360208501528881526001600160fb1b03891115611c4757600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7881888a611b56565b6060850196909652505050608001529695505050505050565b60008219821115611ca457611ca4611b27565b500190565b60005b83811015611cc4578181015183820152602001611cac565b83811115611cd3576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d11816017850160208801611ca9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d42816028840160208801611ca9565b01602801949350505050565b6020815260008251806020840152611d6d816040850160208701611ca9565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611df557611df5611b27565b500290565b600081611e0957611e09611b27565b50600019019056fea2646970667358221220b32209da5a30ad0f79b8537a384ac093ebcf479734f8be816134df27c23ccc6664736f6c634300080d00335f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", - "deployedBytecode": "0x6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610582578063e38335e5146105a2578063f23a6e61146105b5578063f27a0c92146105e157600080fd5b8063bc197c8114610509578063c4d252f514610535578063d45c44351461055557600080fd5b806391d14854116100c657806391d1485414610480578063a217fddf146104a0578063b08e51c0146104b5578063b1c5f427146104e957600080fd5b80638065657f1461040c5780638f2a0bb01461042c5780638f61f4f51461044c57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038c57806336568abe146103ac578063584b153e146103cc57806364d62353146103ec57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036c57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611442565b6105f6565b005b3480156101f557600080fd5b506102096102043660046114b6565b6106cc565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e0565b6106f7565b3480156102b357600080fd5b506102096102c236600461154b565b6107ac565b3480156102d357600080fd5b506102f26102e2366004611619565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b5061025261032636600461154b565b60009081526020819052604090206001015490565b34801561034757600080fd5b5061020961035636600461154b565b6000908152600160208190526040909120541490565b34801561037857600080fd5b506101e7610387366004611680565b6107d2565b34801561039857600080fd5b506102096103a736600461154b565b6107fc565b3480156103b857600080fd5b506101e76103c7366004611680565b610815565b3480156103d857600080fd5b506102096103e736600461154b565b610898565b3480156103f857600080fd5b506101e761040736600461154b565b6108ae565b34801561041857600080fd5b506102526104273660046114e0565b610952565b34801561043857600080fd5b506101e76104473660046116f0565b610991565b34801561045857600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048c57600080fd5b5061020961049b366004611680565b610b24565b3480156104ac57600080fd5b50610252600081565b3480156104c157600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f557600080fd5b506102526105043660046117a1565b610b4d565b34801561051557600080fd5b506102f26105243660046118c8565b63bc197c8160e01b95945050505050565b34801561054157600080fd5b506101e761055036600461154b565b610b92565b34801561056157600080fd5b5061025261057036600461154b565b60009081526001602052604090205490565b34801561058e57600080fd5b506101e761059d366004611680565b610c67565b6101e76105b03660046117a1565b610c8c565b3480156105c157600080fd5b506102f26105d0366004611971565b63f23a6e6160e01b95945050505050565b3480156105ed57600080fd5b50600254610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161062081610e16565b6000610630898989898989610952565b905061063c8184610e23565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610678969594939291906119fe565b60405180910390a383156106c157807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b891815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f157506106f182610f12565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610723816000610b24565b610731576107318133610f47565b6000610741888888888888610952565b905061074d8185610fa0565b6107598888888861103c565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107919493929190611a3b565b60405180910390a36107a28161110f565b5050505050505050565b6000818152600160205260408120546001811180156107cb5750428111155b9392505050565b6000828152602081905260409020600101546107ed81610e16565b6107f78383611148565b505050565b60008181526001602052604081205481905b1192915050565b6001600160a01b038116331461088a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089482826111cc565b5050565b600081815260016020819052604082205461080e565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610881565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b600086868686868660405160200161096f969594939291906119fe565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e16565b8887146109da5760405162461bcd60e51b815260040161088190611a6d565b8885146109f95760405162461bcd60e51b815260040161088190611a6d565b6000610a0b8b8b8b8b8b8b8b8b610b4d565b9050610a178184610e23565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab0565b9050602002016020810190610a6c9190611ac6565b8d8d86818110610a7e57610a7e611ab0565b905060200201358c8c87818110610a9757610a97611ab0565b9050602002810190610aa99190611ae1565b8c8b604051610abd969594939291906119fe565b60405180910390a3610ace81611b3d565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b6e989796959493929190611be6565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbc81610e16565b610bc582610898565b610c2b5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610881565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610c8281610e16565b6107f783836111cc565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cb8816000610b24565b610cc657610cc68133610f47565b878614610ce55760405162461bcd60e51b815260040161088190611a6d565b878414610d045760405162461bcd60e51b815260040161088190611a6d565b6000610d168a8a8a8a8a8a8a8a610b4d565b9050610d228185610fa0565b60005b89811015610e005760008b8b83818110610d4157610d41611ab0565b9050602002016020810190610d569190611ac6565b905060008a8a84818110610d6c57610d6c611ab0565b9050602002013590503660008a8a86818110610d8a57610d8a611ab0565b9050602002810190610d9c9190611ae1565b91509150610dac8484848461103c565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de39493929190611a3b565b60405180910390a35050505080610df990611b3d565b9050610d25565b50610e0a8161110f565b50505050505050505050565b610e208133610f47565b50565b610e2c826107fc565b15610e915760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610881565b600254811015610ef25760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610881565b610efc8142611c91565b6000928352600160205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f157506301ffc9a760e01b6001600160e01b03198316146106f1565b610f518282610b24565b61089457610f5e81611231565b610f69836020611243565b604051602001610f7a929190611cd9565b60408051601f198184030181529082905262461bcd60e51b825261088191600401611d4e565b610fa9826107ac565b610fc55760405162461bcd60e51b815260040161088190611d81565b801580610fe15750600081815260016020819052604090912054145b6108945760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610881565b6000846001600160a01b0316848484604051611059929190611dcb565b60006040518083038185875af1925050503d8060008114611096576040519150601f19603f3d011682016040523d82523d6000602084013e61109b565b606091505b50509050806111085760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610881565b5050505050565b611118816107ac565b6111345760405162461bcd60e51b815260040161088190611d81565b600090815260016020819052604090912055565b6111528282610b24565b610894576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111883390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d68282610b24565b15610894576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f16001600160a01b03831660145b60606000611252836002611ddb565b61125d906002611c91565b6001600160401b0381111561127457611274611564565b6040519080825280601f01601f19166020018201604052801561129e576020820181803683370190505b509050600360fc1b816000815181106112b9576112b9611ab0565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112e8576112e8611ab0565b60200101906001600160f81b031916908160001a905350600061130c846002611ddb565b611317906001611c91565b90505b600181111561138f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061134b5761134b611ab0565b1a60f81b82828151811061136157611361611ab0565b60200101906001600160f81b031916908160001a90535060049490941c9361138881611dfa565b905061131a565b5083156107cb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610881565b80356001600160a01b03811681146113f557600080fd5b919050565b60008083601f84011261140c57600080fd5b5081356001600160401b0381111561142357600080fd5b60208301915083602082850101111561143b57600080fd5b9250929050565b600080600080600080600060c0888a03121561145d57600080fd5b611466886113de565b96506020880135955060408801356001600160401b0381111561148857600080fd5b6114948a828b016113fa565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114c857600080fd5b81356001600160e01b0319811681146107cb57600080fd5b60008060008060008060a087890312156114f957600080fd5b611502876113de565b95506020870135945060408701356001600160401b0381111561152457600080fd5b61153089828a016113fa565b979a9699509760608101359660809091013595509350505050565b60006020828403121561155d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a2576115a2611564565b604052919050565b600082601f8301126115bb57600080fd5b81356001600160401b038111156115d4576115d4611564565b6115e7601f8201601f191660200161157a565b8181528460208386010111156115fc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561162f57600080fd5b611638856113de565b9350611646602086016113de565b92506040850135915060608501356001600160401b0381111561166857600080fd5b611674878288016115aa565b91505092959194509250565b6000806040838503121561169357600080fd5b823591506116a3602084016113de565b90509250929050565b60008083601f8401126116be57600080fd5b5081356001600160401b038111156116d557600080fd5b6020830191508360208260051b850101111561143b57600080fd5b600080600080600080600080600060c08a8c03121561170e57600080fd5b89356001600160401b038082111561172557600080fd5b6117318d838e016116ac565b909b50995060208c013591508082111561174a57600080fd5b6117568d838e016116ac565b909950975060408c013591508082111561176f57600080fd5b5061177c8c828d016116ac565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117bd57600080fd5b88356001600160401b03808211156117d457600080fd5b6117e08c838d016116ac565b909a50985060208b01359150808211156117f957600080fd5b6118058c838d016116ac565b909850965060408b013591508082111561181e57600080fd5b5061182b8b828c016116ac565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185a57600080fd5b813560206001600160401b0382111561187557611875611564565b8160051b61188482820161157a565b928352848101820192828101908785111561189e57600080fd5b83870192505b848310156118bd578235825291830191908301906118a4565b979650505050505050565b600080600080600060a086880312156118e057600080fd5b6118e9866113de565b94506118f7602087016113de565b935060408601356001600160401b038082111561191357600080fd5b61191f89838a01611849565b9450606088013591508082111561193557600080fd5b61194189838a01611849565b9350608088013591508082111561195757600080fd5b50611964888289016115aa565b9150509295509295909350565b600080600080600060a0868803121561198957600080fd5b611992866113de565b94506119a0602087016113de565b9350604086013592506060860135915060808601356001600160401b038111156119c957600080fd5b611964888289016115aa565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2660a0830186886119d5565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a636060830184866119d5565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611ad857600080fd5b6107cb826113de565b6000808335601e19843603018112611af857600080fd5b8301803591506001600160401b03821115611b1257600080fd5b60200191503681900382131561143b57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b4f57611b4f611b27565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bd95782840389528135601e19883603018112611b9157600080fd5b870180356001600160401b03811115611ba957600080fd5b803603891315611bb857600080fd5b611bc586828985016119d5565b9a87019a9550505090840190600101611b70565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c27576001600160a01b03611c12846113de565b16825260209283019290910190600101611bf9565b5083810360208501528881526001600160fb1b03891115611c4757600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7881888a611b56565b6060850196909652505050608001529695505050505050565b60008219821115611ca457611ca4611b27565b500190565b60005b83811015611cc4578181015183820152602001611cac565b83811115611cd3576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d11816017850160208801611ca9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d42816028840160208801611ca9565b01602801949350505050565b6020815260008251806020840152611d6d816040850160208701611ca9565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611df557611df5611b27565b500290565b600081611e0957611e09611b27565b50600019019056fea2646970667358221220b32209da5a30ad0f79b8537a384ac093ebcf479734f8be816134df27c23ccc6664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json deleted file mode 100644 index d233aebb..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Timers.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Timers", - "sourceName": "contracts/utils/Timers.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203361d5163d1831e2ebf32fbfc15e410a638426196f221a6a1b2affd3ea7d006a64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203361d5163d1831e2ebf32fbfc15e410a638426196f221a6a1b2affd3ea7d006a64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json deleted file mode 100644 index 53f74a22..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TokenTimelock.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TokenTimelock", - "sourceName": "contracts/token/ERC20/utils/TokenTimelock.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token_", - "type": "address" - }, - { - "internalType": "address", - "name": "beneficiary_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "releaseTime_", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "beneficiary", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "releaseTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x60e060405234801561001057600080fd5b506040516107cd3803806107cd83398101604081905261002f916100d0565b42811161009d5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206260448201527165666f72652063757272656e742074696d6560701b606482015260840160405180910390fd5b6001600160a01b03928316608052911660a05260c052610113565b6001600160a01b03811681146100cd57600080fd5b50565b6000806000606084860312156100e557600080fd5b83516100f0816100b8565b6020850151909350610101816100b8565b80925050604084015190509250925092565b60805160a05160c05161067361015a60003960008181609f015260f00152600081816053015261029801526000818160ca01528181610182015261027601526106736000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f14610090578063b91d40011461009a578063fc0c546a146100c8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b6100986100ee565b005b6040517f00000000000000000000000000000000000000000000000000000000000000008152602001610087565b7f0000000000000000000000000000000000000000000000000000000000000000610073565b7f000000000000000000000000000000000000000000000000000000000000000042101561017e5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b919061057c565b9050600081116102695760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610175565b6102bd6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836102c0565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610312908490610317565b505050565b600061036c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103ec9092919063ffffffff16565b905080516000148061038d57508080602001905181019061038d9190610595565b6103125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610175565b60606103fb8484600085610403565b949350505050565b6060824710156104645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610175565b600080866001600160a01b0316858760405161048091906105ee565b60006040518083038185875af1925050503d80600081146104bd576040519150601f19603f3d011682016040523d82523d6000602084013e6104c2565b606091505b50915091506104d3878383876104de565b979650505050505050565b6060831561054d578251600003610546576001600160a01b0385163b6105465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610175565b50816103fb565b6103fb83838151156105625781518083602001fd5b8060405162461bcd60e51b8152600401610175919061060a565b60006020828403121561058e57600080fd5b5051919050565b6000602082840312156105a757600080fd5b815180151581146105b757600080fd5b9392505050565b60005b838110156105d95781810151838201526020016105c1565b838111156105e8576000848401525b50505050565b600082516106008184602087016105be565b9190910192915050565b60208152600082518060208401526106298160408501602087016105be565b601f01601f1916919091016040019291505056fea2646970667358221220389f41f60ded85b1a04a92c03ecacd1f136c38a5677c1da351e8cecb46b6e2b664736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f14610090578063b91d40011461009a578063fc0c546a146100c8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b6100986100ee565b005b6040517f00000000000000000000000000000000000000000000000000000000000000008152602001610087565b7f0000000000000000000000000000000000000000000000000000000000000000610073565b7f000000000000000000000000000000000000000000000000000000000000000042101561017e5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156101e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020b919061057c565b9050600081116102695760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610175565b6102bd6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000836102c0565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610312908490610317565b505050565b600061036c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103ec9092919063ffffffff16565b905080516000148061038d57508080602001905181019061038d9190610595565b6103125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610175565b60606103fb8484600085610403565b949350505050565b6060824710156104645760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610175565b600080866001600160a01b0316858760405161048091906105ee565b60006040518083038185875af1925050503d80600081146104bd576040519150601f19603f3d011682016040523d82523d6000602084013e6104c2565b606091505b50915091506104d3878383876104de565b979650505050505050565b6060831561054d578251600003610546576001600160a01b0385163b6105465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610175565b50816103fb565b6103fb83838151156105625781518083602001fd5b8060405162461bcd60e51b8152600401610175919061060a565b60006020828403121561058e57600080fd5b5051919050565b6000602082840312156105a757600080fd5b815180151581146105b757600080fd5b9392505050565b60005b838110156105d95781810151838201526020016105c1565b838111156105e8576000848401525b50505050565b600082516106008184602087016105be565b9190910192915050565b60208152600082518060208401526106298160408501602087016105be565b601f01601f1916919091016040019291505056fea2646970667358221220389f41f60ded85b1a04a92c03ecacd1f136c38a5677c1da351e8cecb46b6e2b664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json deleted file mode 100644 index 9c5ceac4..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/TransparentUpgradeableProxy.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TransparentUpgradeableProxy", - "sourceName": "contracts/proxy/transparent/TransparentUpgradeableProxy.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405260405162000ed038038062000ed08339810160408190526200002691620004a0565b828162000036828260006200004d565b50620000449050826200008a565b505050620005d3565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b620001691760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f08162000244565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000ea960279139620002f8565b9392505050565b60006200018060008051602062000e8983398151915260001b6200037760201b620001951760201c565b546001600160a01b0316919050565b6001600160a01b038116620001fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022360008051602062000e8983398151915260001b6200037760201b620001951760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200025a816200037a60201b620001981760201c565b620002be5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f1565b80620002237f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200037760201b620001951760201c565b6060600080856001600160a01b03168560405162000317919062000580565b600060405180830381855af49150503d806000811462000354576040519150601f19603f3d011682016040523d82523d6000602084013e62000359565b606091505b5090925090506200036d8683838762000389565b9695505050505050565b90565b6001600160a01b03163b151590565b60608315620003fd578251600003620003f5576001600160a01b0385163b620003f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001f1565b508162000409565b62000409838362000411565b949350505050565b815115620004225781518083602001fd5b8060405162461bcd60e51b8152600401620001f191906200059e565b80516001600160a01b03811681146200045657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200048e57818101518382015260200162000474565b83811115620000835750506000910152565b600080600060608486031215620004b657600080fd5b620004c1846200043e565b9250620004d1602085016200043e565b60408501519092506001600160401b0380821115620004ef57600080fd5b818601915086601f8301126200050457600080fd5b8151818111156200051957620005196200045b565b604051601f8201601f19908116603f011681019083821181831017156200054457620005446200045b565b816040528281528960208487010111156200055e57600080fd5b6200057183602083016020880162000471565b80955050505050509250925092565b600082516200059481846020870162000471565b9190910192915050565b6020815260008251806020840152620005bf81604085016020870162000471565b601f01601f19169190910160400192915050565b6108a680620005e36000396000f3fe60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220eed753f2d706b2830a4f22c0a254d6bf8195eda4b6811061eb1a5a96d822738c64736f6c634300080d0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", - "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220eed753f2d706b2830a4f22c0a254d6bf8195eda4b6811061eb1a5a96d822738c64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json deleted file mode 100644 index f2b66c17..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UpgradeableBeacon.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "UpgradeableBeacon", - "sourceName": "contracts/proxy/beacon/UpgradeableBeacon.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506040516104e43803806104e483398101604081905261002f91610151565b61003833610047565b61004181610097565b50610181565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6100aa8161014260201b6101a01760201c565b6101205760405162461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e747261637400000000000000000000000000606482015260840160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03163b151590565b60006020828403121561016357600080fd5b81516001600160a01b038116811461017a57600080fd5b9392505050565b610354806101906000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610071578063715018a61461009a5780638da5cb5b146100a2578063f2fde38b146100b3575b600080fd5b61006f61006a3660046102ee565b6100c6565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006f61010e565b6000546001600160a01b031661007e565b61006f6100c13660046102ee565b610122565b6100ce6101af565b6100d781610209565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6101166101af565b610120600061029e565b565b61012a6101af565b6001600160a01b0381166101945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61019d8161029e565b50565b6001600160a01b03163b151590565b6000546001600160a01b031633146101205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018b565b6001600160a01b0381163b61027c5760405162461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6044820152721b881a5cc81b9bdd08184818dbdb9d1c9858dd606a1b606482015260840161018b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561030057600080fd5b81356001600160a01b038116811461031757600080fd5b939250505056fea26469706673582212200d7e9852e7cdb45eb82087b8a3654e2621338b938fb632e14ddb0781d543abbd64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c80633659cfe61461005c5780635c60da1b14610071578063715018a61461009a5780638da5cb5b146100a2578063f2fde38b146100b3575b600080fd5b61006f61006a3660046102ee565b6100c6565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006f61010e565b6000546001600160a01b031661007e565b61006f6100c13660046102ee565b610122565b6100ce6101af565b6100d781610209565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6101166101af565b610120600061029e565b565b61012a6101af565b6001600160a01b0381166101945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61019d8161029e565b50565b6001600160a01b03163b151590565b6000546001600160a01b031633146101205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018b565b6001600160a01b0381163b61027c5760405162461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f6044820152721b881a5cc81b9bdd08184818dbdb9d1c9858dd606a1b606482015260840161018b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561030057600080fd5b81356001600160a01b038116811461031757600080fd5b939250505056fea26469706673582212200d7e9852e7cdb45eb82087b8a3654e2621338b938fb632e14ddb0781d543abbd64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json b/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json deleted file mode 100644 index 39eb3a7d..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/VestingWallet.json +++ /dev/null @@ -1,234 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "VestingWallet", - "sourceName": "contracts/finance/VestingWallet.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "beneficiaryAddress", - "type": "address" - }, - { - "internalType": "uint64", - "name": "startTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "durationSeconds", - "type": "uint64" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ERC20Released", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "EtherReleased", - "type": "event" - }, - { - "inputs": [], - "name": "beneficiary", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "duration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "start", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - } - ], - "name": "vestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - } - ], - "name": "vestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x60e0604052604051610cdb380380610cdb833981016040819052610022916100d0565b6001600160a01b03831661008f5760405162461bcd60e51b815260206004820152602a60248201527f56657374696e6757616c6c65743a2062656e6566696369617279206973207a65604482015269726f206164647265737360b01b606482015260840160405180910390fd5b6001600160a01b039092166080526001600160401b0390811660a0521660c052610121565b80516001600160401b03811681146100cb57600080fd5b919050565b6000806000606084860312156100e557600080fd5b83516001600160a01b03811681146100fc57600080fd5b925061010a602085016100b4565b9150610118604085016100b4565b90509250925092565b60805160a05160c051610b7061016b6000396000818160ee015281816104ce01526105230152600061046a015260008181610158015281816102f1015261040a0152610b706000f3fe6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f146101a257806396132521146101b75780639852595c146101cc578063a3f8eace14610202578063be9a655514610222578063fbccedae1461023757600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df578063191655871461011c57806338af3eed1461013e578063810ec23b1461018257600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c736600461097a565b61024c565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166100cc565b34801561012857600080fd5b5061013c6101373660046109ac565b610270565b005b34801561014a57600080fd5b506040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526020016100d6565b34801561018e57600080fd5b506100cc61019d3660046109c7565b61031a565b3480156101ae57600080fd5b5061013c6103b0565b3480156101c357600080fd5b506000546100cc565b3480156101d857600080fd5b506100cc6101e73660046109ac565b6001600160a01b031660009081526001602052604090205490565b34801561020e57600080fd5b506100cc61021d3660046109ac565b610432565b34801561022e57600080fd5b506100cc61045f565b34801561024357600080fd5b506100cc61048d565b600061026a61025a60005490565b6102649047610a10565b836104a9565b92915050565b600061027b82610432565b6001600160a01b0383166000908152600160205260408120805492935083929091906102a8908490610a10565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a2610316827f000000000000000000000000000000000000000000000000000000000000000083610583565b5050565b6001600160a01b0382166000908152600160205260408120546103a9906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610a28565b6102649190610a10565b9392505050565b60006103ba61048d565b9050806000808282546103cd9190610a10565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a161042f7f0000000000000000000000000000000000000000000000000000000000000000826105da565b50565b6001600160a01b038116600090815260016020526040812054610455834261031a565b61026a9190610a41565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690565b6000805461049a4261024c565b6104a49190610a41565b905090565b60006104b361045f565b8267ffffffffffffffff1610156104cc5750600061026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166104ff61045f565b6105099190610a10565b8267ffffffffffffffff16111561052157508161026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1661055461045f565b6105689067ffffffffffffffff8516610a41565b6105729085610a58565b61057c9190610a77565b905061026a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526105d59084906106f8565b505050565b8047101561062f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461067c576040519150601f19603f3d011682016040523d82523d6000602084013e610681565b606091505b50509050806105d55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610626565b600061074d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107cd9092919063ffffffff16565b905080516000148061076e57508080602001905181019061076e9190610a99565b6105d55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610626565b60606107dc84846000856107e4565b949350505050565b6060824710156108455760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610626565b600080866001600160a01b031685876040516108619190610aeb565b60006040518083038185875af1925050503d806000811461089e576040519150601f19603f3d011682016040523d82523d6000602084013e6108a3565b606091505b50915091506108b4878383876108bf565b979650505050505050565b6060831561092e578251600003610927576001600160a01b0385163b6109275760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610626565b50816107dc565b6107dc83838151156109435781518083602001fd5b8060405162461bcd60e51b81526004016106269190610b07565b803567ffffffffffffffff8116811461097557600080fd5b919050565b60006020828403121561098c57600080fd5b6103a98261095d565b80356001600160a01b038116811461097557600080fd5b6000602082840312156109be57600080fd5b6103a982610995565b600080604083850312156109da57600080fd5b6109e383610995565b91506109f16020840161095d565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a2357610a236109fa565b500190565b600060208284031215610a3a57600080fd5b5051919050565b600082821015610a5357610a536109fa565b500390565b6000816000190483118215151615610a7257610a726109fa565b500290565b600082610a9457634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610aab57600080fd5b815180151581146103a957600080fd5b60005b83811015610ad6578181015183820152602001610abe565b83811115610ae5576000848401525b50505050565b60008251610afd818460208701610abb565b9190910192915050565b6020815260008251806020840152610b26816040850160208701610abb565b601f01601f1916919091016040019291505056fea264697066735822122057bb7906b57102ec2fdea4d75ef610cf997a5bd74275d1e80d6f18f6cf5a778064736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f146101a257806396132521146101b75780639852595c146101cc578063a3f8eace14610202578063be9a655514610222578063fbccedae1461023757600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df578063191655871461011c57806338af3eed1461013e578063810ec23b1461018257600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c736600461097a565b61024c565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166100cc565b34801561012857600080fd5b5061013c6101373660046109ac565b610270565b005b34801561014a57600080fd5b506040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681526020016100d6565b34801561018e57600080fd5b506100cc61019d3660046109c7565b61031a565b3480156101ae57600080fd5b5061013c6103b0565b3480156101c357600080fd5b506000546100cc565b3480156101d857600080fd5b506100cc6101e73660046109ac565b6001600160a01b031660009081526001602052604090205490565b34801561020e57600080fd5b506100cc61021d3660046109ac565b610432565b34801561022e57600080fd5b506100cc61045f565b34801561024357600080fd5b506100cc61048d565b600061026a61025a60005490565b6102649047610a10565b836104a9565b92915050565b600061027b82610432565b6001600160a01b0383166000908152600160205260408120805492935083929091906102a8908490610a10565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a2610316827f000000000000000000000000000000000000000000000000000000000000000083610583565b5050565b6001600160a01b0382166000908152600160205260408120546103a9906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f9190610a28565b6102649190610a10565b9392505050565b60006103ba61048d565b9050806000808282546103cd9190610a10565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a161042f7f0000000000000000000000000000000000000000000000000000000000000000826105da565b50565b6001600160a01b038116600090815260016020526040812054610455834261031a565b61026a9190610a41565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690565b6000805461049a4261024c565b6104a49190610a41565b905090565b60006104b361045f565b8267ffffffffffffffff1610156104cc5750600061026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166104ff61045f565b6105099190610a10565b8267ffffffffffffffff16111561052157508161026a565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1661055461045f565b6105689067ffffffffffffffff8516610a41565b6105729085610a58565b61057c9190610a77565b905061026a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526105d59084906106f8565b505050565b8047101561062f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461067c576040519150601f19603f3d011682016040523d82523d6000602084013e610681565b606091505b50509050806105d55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610626565b600061074d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107cd9092919063ffffffff16565b905080516000148061076e57508080602001905181019061076e9190610a99565b6105d55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610626565b60606107dc84846000856107e4565b949350505050565b6060824710156108455760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610626565b600080866001600160a01b031685876040516108619190610aeb565b60006040518083038185875af1925050503d806000811461089e576040519150601f19603f3d011682016040523d82523d6000602084013e6108a3565b606091505b50915091506108b4878383876108bf565b979650505050505050565b6060831561092e578251600003610927576001600160a01b0385163b6109275760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610626565b50816107dc565b6107dc83838151156109435781518083602001fd5b8060405162461bcd60e51b81526004016106269190610b07565b803567ffffffffffffffff8116811461097557600080fd5b919050565b60006020828403121561098c57600080fd5b6103a98261095d565b80356001600160a01b038116811461097557600080fd5b6000602082840312156109be57600080fd5b6103a982610995565b600080604083850312156109da57600080fd5b6109e383610995565b91506109f16020840161095d565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a2357610a236109fa565b500190565b600060208284031215610a3a57600080fd5b5051919050565b600082821015610a5357610a536109fa565b500390565b6000816000190483118215151615610a7257610a726109fa565b500290565b600082610a9457634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610aab57600080fd5b815180151581146103a957600080fd5b60005b83811015610ad6578181015183820152602001610abe565b83811115610ae5576000848401525b50505050565b60008251610afd818460208701610abb565b9190910192915050565b6020815260008251806020840152610b26816040850160208701610abb565b601f01601f1916919091016040019291505056fea264697066735822122057bb7906b57102ec2fdea4d75ef610cf997a5bd74275d1e80d6f18f6cf5a778064736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol deleted file mode 100644 index 4c9b9e5c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/CrossChainEnabled.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/CrossChainEnabled.sol) - -pragma solidity ^0.8.4; - -import "./errors.sol"; - -/** - * @dev Provides information for building cross-chain aware contracts. This - * abstract contract provides accessors and modifiers to control the execution - * flow when receiving cross-chain messages. - * - * Actual implementations of cross-chain aware contracts, which are based on - * this abstraction, will have to inherit from a bridge-specific - * specialization. Such specializations are provided under - * `crosschain//CrossChainEnabled.sol`. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabled { - /** - * @dev Throws if the current function call is not the result of a - * cross-chain execution. - */ - modifier onlyCrossChain() { - if (!_isCrossChain()) revert NotCrossChainCall(); - _; - } - - /** - * @dev Throws if the current function call is not the result of a - * cross-chain execution initiated by `account`. - */ - modifier onlyCrossChainSender(address expected) { - address actual = _crossChainSender(); - if (expected != actual) revert InvalidCrossChainSender(actual, expected); - _; - } - - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message. - */ - function _isCrossChain() internal view virtual returns (bool); - - /** - * @dev Returns the address of the sender of the cross-chain message that - * triggered the current function call. - * - * IMPORTANT: Should revert with `NotCrossChainCall` if the current function - * call is not the result of a cross-chain message. - */ - function _crossChainSender() internal view virtual returns (address); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol deleted file mode 100644 index e69355d6..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/CrossChainEnabledAMB.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/CrossChainEnabledAMB.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabled.sol"; -import "./LibAMB.sol"; - -/** - * @dev https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] - * specialization or the {CrossChainEnabled} abstraction. - * - * As of february 2020, AMB bridges are available between the following chains: - * - * - https://docs.tokenbridge.net/eth-xdai-amb-bridge/about-the-eth-xdai-amb[ETH ⇌ xDai] - * - https://docs.tokenbridge.net/eth-qdai-bridge/about-the-eth-qdai-amb[ETH ⇌ qDai] - * - https://docs.tokenbridge.net/eth-etc-amb-bridge/about-the-eth-etc-amb[ETH ⇌ ETC] - * - https://docs.tokenbridge.net/eth-bsc-amb/about-the-eth-bsc-amb[ETH ⇌ BSC] - * - https://docs.tokenbridge.net/eth-poa-amb-bridge/about-the-eth-poa-amb[ETH ⇌ POA] - * - https://docs.tokenbridge.net/bsc-xdai-amb/about-the-bsc-xdai-amb[BSC ⇌ xDai] - * - https://docs.tokenbridge.net/poa-xdai-amb/about-the-poa-xdai-amb[POA ⇌ xDai] - * - https://docs.tokenbridge.net/rinkeby-xdai-amb-bridge/about-the-rinkeby-xdai-amb[Rinkeby ⇌ xDai] - * - https://docs.tokenbridge.net/kovan-sokol-amb-bridge/about-the-kovan-sokol-amb[Kovan ⇌ Sokol] - * - * _Available since v4.6._ - */ -contract CrossChainEnabledAMB is CrossChainEnabled { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _bridge; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address bridge) { - _bridge = bridge; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibAMB.isCrossChain(_bridge); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibAMB.crossChainSender(_bridge); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol deleted file mode 100644 index aef9c43e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/amb/LibAMB.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/LibAMB.sol) - -pragma solidity ^0.8.4; - -import {IAMB as AMB_Bridge} from "../../vendor/amb/IAMB.sol"; -import "../errors.sol"; - -/** - * @dev Primitives for cross-chain aware contracts using the - * https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] - * family of bridges. - */ -library LibAMB { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by `bridge`. - */ - function isCrossChain(address bridge) internal view returns (bool) { - return msg.sender == bridge; - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through `bridge`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address bridge) internal view returns (address) { - if (!isCrossChain(bridge)) revert NotCrossChainCall(); - return AMB_Bridge(bridge).messageSender(); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol deleted file mode 100644 index 5068da39..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabled.sol"; -import "./LibArbitrumL1.sol"; - -/** - * @dev https://arbitrum.io/[Arbitrum] specialization or the - * {CrossChainEnabled} abstraction the L1 side (mainnet). - * - * This version should only be deployed on L1 to process cross-chain messages - * originating from L2. For the other side, use {CrossChainEnabledArbitrumL2}. - * - * The bridge contract is provided and maintained by the arbitrum team. You can - * find the address of this contract on the rinkeby testnet in - * https://developer.offchainlabs.com/docs/useful_addresses[Arbitrum's developer documentation]. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabledArbitrumL1 is CrossChainEnabled { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _bridge; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address bridge) { - _bridge = bridge; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibArbitrumL1.isCrossChain(_bridge); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibArbitrumL1.crossChainSender(_bridge); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol deleted file mode 100644 index e85993db..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabled.sol"; -import "./LibArbitrumL2.sol"; - -/** - * @dev https://arbitrum.io/[Arbitrum] specialization or the - * {CrossChainEnabled} abstraction the L2 side (arbitrum). - * - * This version should only be deployed on L2 to process cross-chain messages - * originating from L1. For the other side, use {CrossChainEnabledArbitrumL1}. - * - * Arbitrum L2 includes the `ArbSys` contract at a fixed address. Therefore, - * this specialization of {CrossChainEnabled} does not include a constructor. - * - * _Available since v4.6._ - * - * WARNING: There is currently a bug in Arbitrum that causes this contract to - * fail to detect cross-chain calls when deployed behind a proxy. This will be - * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for - * August 31st 2022. - */ -abstract contract CrossChainEnabledArbitrumL2 is CrossChainEnabled { - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibArbitrumL2.isCrossChain(LibArbitrumL2.ARBSYS); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibArbitrumL2.crossChainSender(LibArbitrumL2.ARBSYS); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol deleted file mode 100644 index be7236b2..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL1.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL1.sol) - -pragma solidity ^0.8.4; - -import {IBridge as ArbitrumL1_Bridge} from "../../vendor/arbitrum/IBridge.sol"; -import {IOutbox as ArbitrumL1_Outbox} from "../../vendor/arbitrum/IOutbox.sol"; -import "../errors.sol"; - -/** - * @dev Primitives for cross-chain aware contracts for - * https://arbitrum.io/[Arbitrum]. - * - * This version should only be used on L1 to process cross-chain messages - * originating from L2. For the other side, use {LibArbitrumL2}. - */ -library LibArbitrumL1 { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by the `bridge`. - */ - function isCrossChain(address bridge) internal view returns (bool) { - return msg.sender == bridge; - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through the `bridge`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address bridge) internal view returns (address) { - if (!isCrossChain(bridge)) revert NotCrossChainCall(); - - address sender = ArbitrumL1_Outbox(ArbitrumL1_Bridge(bridge).activeOutbox()).l2ToL1Sender(); - require(sender != address(0), "LibArbitrumL1: system messages without sender"); - - return sender; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol deleted file mode 100644 index 715a3878..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/arbitrum/LibArbitrumL2.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL2.sol) - -pragma solidity ^0.8.4; - -import {IArbSys as ArbitrumL2_Bridge} from "../../vendor/arbitrum/IArbSys.sol"; -import "../errors.sol"; - -/** - * @dev Primitives for cross-chain aware contracts for - * https://arbitrum.io/[Arbitrum]. - * - * This version should only be used on L2 to process cross-chain messages - * originating from L1. For the other side, use {LibArbitrumL1}. - * - * WARNING: There is currently a bug in Arbitrum that causes this contract to - * fail to detect cross-chain calls when deployed behind a proxy. This will be - * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for - * August 31st 2022. - */ -library LibArbitrumL2 { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by `arbsys`. - */ - address public constant ARBSYS = 0x0000000000000000000000000000000000000064; - - function isCrossChain(address arbsys) internal view returns (bool) { - return ArbitrumL2_Bridge(arbsys).wasMyCallersAddressAliased(); - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through `arbsys`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address arbsys) internal view returns (address) { - if (!isCrossChain(arbsys)) revert NotCrossChainCall(); - - return ArbitrumL2_Bridge(arbsys).myCallersAddressWithoutAliasing(); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol deleted file mode 100644 index 004460e9..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/errors.sol +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/errors.sol) - -pragma solidity ^0.8.4; - -error NotCrossChainCall(); -error InvalidCrossChainSender(address actual, address expected); diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol deleted file mode 100644 index 1005864a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/CrossChainEnabledOptimism.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/CrossChainEnabledOptimism.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabled.sol"; -import "./LibOptimism.sol"; - -/** - * @dev https://www.optimism.io/[Optimism] specialization or the - * {CrossChainEnabled} abstraction. - * - * The messenger (`CrossDomainMessenger`) contract is provided and maintained by - * the optimism team. You can find the address of this contract on mainnet and - * kovan in the https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/deployments[deployments section of Optimism monorepo]. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabledOptimism is CrossChainEnabled { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _messenger; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address messenger) { - _messenger = messenger; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibOptimism.isCrossChain(_messenger); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibOptimism.crossChainSender(_messenger); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol deleted file mode 100644 index d963ade2..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/optimism/LibOptimism.sol +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/LibOptimism.sol) - -pragma solidity ^0.8.4; - -import {ICrossDomainMessenger as Optimism_Bridge} from "../../vendor/optimism/ICrossDomainMessenger.sol"; -import "../errors.sol"; - -/** - * @dev Primitives for cross-chain aware contracts for https://www.optimism.io/[Optimism]. - * See the https://community.optimism.io/docs/developers/bridge/messaging/#accessing-msg-sender[documentation] - * for the functionality used here. - */ -library LibOptimism { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by `messenger`. - */ - function isCrossChain(address messenger) internal view returns (bool) { - return msg.sender == messenger; - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through `messenger`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address messenger) internal view returns (address) { - if (!isCrossChain(messenger)) revert NotCrossChainCall(); - - return Optimism_Bridge(messenger).xDomainMessageSender(); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol b/dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol deleted file mode 100644 index 1a201fd3..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChild.sol +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabled.sol"; -import "../../security/ReentrancyGuard.sol"; -import "../../utils/Address.sol"; -import "../../vendor/polygon/IFxMessageProcessor.sol"; - -address constant DEFAULT_SENDER = 0x000000000000000000000000000000000000dEaD; - -/** - * @dev https://polygon.technology/[Polygon] specialization or the - * {CrossChainEnabled} abstraction the child side (polygon/mumbai). - * - * This version should only be deployed on child chain to process cross-chain - * messages originating from the parent chain. - * - * The fxChild contract is provided and maintained by the polygon team. You can - * find the address of this contract polygon and mumbai in - * https://docs.polygon.technology/docs/develop/l1-l2-communication/fx-portal/#contract-addresses[Polygon's Fx-Portal documentation]. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabledPolygonChild is IFxMessageProcessor, CrossChainEnabled, ReentrancyGuard { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _fxChild; - address private _sender = DEFAULT_SENDER; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address fxChild) { - _fxChild = fxChild; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return msg.sender == _fxChild; - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return _sender; - } - - /** - * @dev External entry point to receive and relay messages originating - * from the fxChild. - * - * Non-reentrancy is crucial to avoid a cross-chain call being able - * to impersonate anyone by just looping through this with user-defined - * arguments. - * - * Note: if _fxChild calls any other function that does a delegate-call, - * then security could be compromised. - */ - function processMessageFromRoot( - uint256 /* stateId */, - address rootMessageSender, - bytes calldata data - ) external override nonReentrant { - if (!_isCrossChain()) revert NotCrossChainCall(); - - _sender = rootMessageSender; - Address.functionDelegateCall(address(this), data, "cross-chain execution failed"); - _sender = DEFAULT_SENDER; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol b/dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol deleted file mode 100644 index daa9090e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/finance/PaymentSplitter.sol +++ /dev/null @@ -1,214 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/utils/SafeERC20.sol"; -import "../utils/Address.sol"; -import "../utils/Context.sol"; - -/** - * @title PaymentSplitter - * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware - * that the Ether will be split in this way, since it is handled transparently by the contract. - * - * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each - * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim - * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the - * time of contract deployment and can't be updated thereafter. - * - * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the - * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} - * function. - * - * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and - * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you - * to run tests before sending real value to this contract. - */ -contract PaymentSplitter is Context { - event PayeeAdded(address account, uint256 shares); - event PaymentReleased(address to, uint256 amount); - event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); - event PaymentReceived(address from, uint256 amount); - - uint256 private _totalShares; - uint256 private _totalReleased; - - mapping(address => uint256) private _shares; - mapping(address => uint256) private _released; - address[] private _payees; - - mapping(IERC20 => uint256) private _erc20TotalReleased; - mapping(IERC20 => mapping(address => uint256)) private _erc20Released; - - /** - * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at - * the matching position in the `shares` array. - * - * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no - * duplicates in `payees`. - */ - constructor(address[] memory payees, uint256[] memory shares_) payable { - require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); - require(payees.length > 0, "PaymentSplitter: no payees"); - - for (uint256 i = 0; i < payees.length; i++) { - _addPayee(payees[i], shares_[i]); - } - } - - /** - * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully - * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the - * reliability of the events, and not the actual splitting of Ether. - * - * To learn more about this see the Solidity documentation for - * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback - * functions]. - */ - receive() external payable virtual { - emit PaymentReceived(_msgSender(), msg.value); - } - - /** - * @dev Getter for the total shares held by payees. - */ - function totalShares() public view returns (uint256) { - return _totalShares; - } - - /** - * @dev Getter for the total amount of Ether already released. - */ - function totalReleased() public view returns (uint256) { - return _totalReleased; - } - - /** - * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 - * contract. - */ - function totalReleased(IERC20 token) public view returns (uint256) { - return _erc20TotalReleased[token]; - } - - /** - * @dev Getter for the amount of shares held by an account. - */ - function shares(address account) public view returns (uint256) { - return _shares[account]; - } - - /** - * @dev Getter for the amount of Ether already released to a payee. - */ - function released(address account) public view returns (uint256) { - return _released[account]; - } - - /** - * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an - * IERC20 contract. - */ - function released(IERC20 token, address account) public view returns (uint256) { - return _erc20Released[token][account]; - } - - /** - * @dev Getter for the address of the payee number `index`. - */ - function payee(uint256 index) public view returns (address) { - return _payees[index]; - } - - /** - * @dev Getter for the amount of payee's releasable Ether. - */ - function releasable(address account) public view returns (uint256) { - uint256 totalReceived = address(this).balance + totalReleased(); - return _pendingPayment(account, totalReceived, released(account)); - } - - /** - * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an - * IERC20 contract. - */ - function releasable(IERC20 token, address account) public view returns (uint256) { - uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); - return _pendingPayment(account, totalReceived, released(token, account)); - } - - /** - * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the - * total shares and their previous withdrawals. - */ - function release(address payable account) public virtual { - require(_shares[account] > 0, "PaymentSplitter: account has no shares"); - - uint256 payment = releasable(account); - - require(payment != 0, "PaymentSplitter: account is not due payment"); - - // _totalReleased is the sum of all values in _released. - // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. - _totalReleased += payment; - unchecked { - _released[account] += payment; - } - - Address.sendValue(account, payment); - emit PaymentReleased(account, payment); - } - - /** - * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their - * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 - * contract. - */ - function release(IERC20 token, address account) public virtual { - require(_shares[account] > 0, "PaymentSplitter: account has no shares"); - - uint256 payment = releasable(token, account); - - require(payment != 0, "PaymentSplitter: account is not due payment"); - - // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. - // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" - // cannot overflow. - _erc20TotalReleased[token] += payment; - unchecked { - _erc20Released[token][account] += payment; - } - - SafeERC20.safeTransfer(token, account, payment); - emit ERC20PaymentReleased(token, account, payment); - } - - /** - * @dev internal logic for computing the pending payment of an `account` given the token historical balances and - * already released amounts. - */ - function _pendingPayment( - address account, - uint256 totalReceived, - uint256 alreadyReleased - ) private view returns (uint256) { - return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; - } - - /** - * @dev Add a new payee to the contract. - * @param account The address of the payee to add. - * @param shares_ The number of shares owned by the payee. - */ - function _addPayee(address account, uint256 shares_) private { - require(account != address(0), "PaymentSplitter: account is the zero address"); - require(shares_ > 0, "PaymentSplitter: shares are 0"); - require(_shares[account] == 0, "PaymentSplitter: account already has shares"); - - _payees.push(account); - _shares[account] = shares_; - _totalShares = _totalShares + shares_; - emit PayeeAdded(account, shares_); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol deleted file mode 100644 index e6fe2228..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/Governor.sol +++ /dev/null @@ -1,723 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.1) (governance/Governor.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/IERC721Receiver.sol"; -import "../token/ERC1155/IERC1155Receiver.sol"; -import "../utils/cryptography/ECDSA.sol"; -import "../utils/cryptography/EIP712.sol"; -import "../utils/introspection/ERC165.sol"; -import "../utils/math/SafeCast.sol"; -import "../utils/structs/DoubleEndedQueue.sol"; -import "../utils/Address.sol"; -import "../utils/Context.sol"; -import "./IGovernor.sol"; - -/** - * @dev Core of the governance system, designed to be extended though various modules. - * - * This contract is abstract and requires several functions to be implemented in various modules: - * - * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} - * - A voting module must implement {_getVotes} - * - Additionally, {votingPeriod} must also be implemented - * - * _Available since v4.3._ - */ -abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receiver, IERC1155Receiver { - using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; - - bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); - bytes32 public constant EXTENDED_BALLOT_TYPEHASH = - keccak256("ExtendedBallot(uint256 proposalId,uint8 support,string reason,bytes params)"); - - // solhint-disable var-name-mixedcase - struct ProposalCore { - // --- start retyped from Timers.BlockNumber at offset 0x00 --- - uint64 voteStart; - address proposer; - bytes4 __gap_unused0; - // --- start retyped from Timers.BlockNumber at offset 0x20 --- - uint64 voteEnd; - bytes24 __gap_unused1; - // --- Remaining fields starting at offset 0x40 --------------- - bool executed; - bool canceled; - } - // solhint-enable var-name-mixedcase - - string private _name; - - /// @custom:oz-retyped-from mapping(uint256 => Governor.ProposalCore) - mapping(uint256 => ProposalCore) private _proposals; - - // This queue keeps track of the governor operating on itself. Calls to functions protected by the - // {onlyGovernance} modifier needs to be whitelisted in this queue. Whitelisting is set in {_beforeExecute}, - // consumed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the - // execution of {onlyGovernance} protected calls can only be achieved through successful proposals. - DoubleEndedQueue.Bytes32Deque private _governanceCall; - - /** - * @dev Restricts a function so it can only be executed through governance proposals. For example, governance - * parameter setters in {GovernorSettings} are protected using this modifier. - * - * The governance executing address may be different from the Governor's own address, for example it could be a - * timelock. This can be customized by modules by overriding {_executor}. The executor is only able to invoke these - * functions during the execution of the governor's {execute} function, and not under any other circumstances. Thus, - * for example, additional timelock proposers are not able to change governance parameters without going through the - * governance protocol (since v4.6). - */ - modifier onlyGovernance() { - require(_msgSender() == _executor(), "Governor: onlyGovernance"); - if (_executor() != address(this)) { - bytes32 msgDataHash = keccak256(_msgData()); - // loop until popping the expected operation - throw if deque is empty (operation not authorized) - while (_governanceCall.popFront() != msgDataHash) {} - } - _; - } - - /** - * @dev Sets the value for {name} and {version} - */ - constructor(string memory name_) EIP712(name_, version()) { - _name = name_; - } - - /** - * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) - */ - receive() external payable virtual { - require(_executor() == address(this), "Governor: must send to executor"); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { - bytes4 governorCancelId = this.cancel.selector ^ this.proposalProposer.selector; - - bytes4 governorParamsId = this.castVoteWithReasonAndParams.selector ^ - this.castVoteWithReasonAndParamsBySig.selector ^ - this.getVotesWithParams.selector; - - // The original interface id in v4.3. - bytes4 governor43Id = type(IGovernor).interfaceId ^ - type(IERC6372).interfaceId ^ - governorCancelId ^ - governorParamsId; - - // An updated interface id in v4.6, with params added. - bytes4 governor46Id = type(IGovernor).interfaceId ^ type(IERC6372).interfaceId ^ governorCancelId; - - // For the updated interface id in v4.9, we use governorCancelId directly. - - return - interfaceId == governor43Id || - interfaceId == governor46Id || - interfaceId == governorCancelId || - interfaceId == type(IERC1155Receiver).interfaceId || - super.supportsInterface(interfaceId); - } - - /** - * @dev See {IGovernor-name}. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev See {IGovernor-version}. - */ - function version() public view virtual override returns (string memory) { - return "1"; - } - - /** - * @dev See {IGovernor-hashProposal}. - * - * The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array - * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id - * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in - * advance, before the proposal is submitted. - * - * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the - * same proposal (with same operation and same description) will have the same id if submitted on multiple governors - * across multiple networks. This also means that in order to execute the same operation twice (on the same - * governor) the proposer will have to change the description in order to avoid proposal id conflicts. - */ - function hashProposal( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public pure virtual override returns (uint256) { - return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); - } - - /** - * @dev See {IGovernor-state}. - */ - function state(uint256 proposalId) public view virtual override returns (ProposalState) { - ProposalCore storage proposal = _proposals[proposalId]; - - if (proposal.executed) { - return ProposalState.Executed; - } - - if (proposal.canceled) { - return ProposalState.Canceled; - } - - uint256 snapshot = proposalSnapshot(proposalId); - - if (snapshot == 0) { - revert("Governor: unknown proposal id"); - } - - uint256 currentTimepoint = clock(); - - if (snapshot >= currentTimepoint) { - return ProposalState.Pending; - } - - uint256 deadline = proposalDeadline(proposalId); - - if (deadline >= currentTimepoint) { - return ProposalState.Active; - } - - if (_quorumReached(proposalId) && _voteSucceeded(proposalId)) { - return ProposalState.Succeeded; - } else { - return ProposalState.Defeated; - } - } - - /** - * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. - */ - function proposalThreshold() public view virtual returns (uint256) { - return 0; - } - - /** - * @dev See {IGovernor-proposalSnapshot}. - */ - function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { - return _proposals[proposalId].voteStart; - } - - /** - * @dev See {IGovernor-proposalDeadline}. - */ - function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { - return _proposals[proposalId].voteEnd; - } - - /** - * @dev Returns the account that created a given proposal. - */ - function proposalProposer(uint256 proposalId) public view virtual override returns (address) { - return _proposals[proposalId].proposer; - } - - /** - * @dev Amount of votes already cast passes the threshold limit. - */ - function _quorumReached(uint256 proposalId) internal view virtual returns (bool); - - /** - * @dev Is the proposal successful or not. - */ - function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); - - /** - * @dev Get the voting weight of `account` at a specific `timepoint`, for a vote as described by `params`. - */ - function _getVotes(address account, uint256 timepoint, bytes memory params) internal view virtual returns (uint256); - - /** - * @dev Register a vote for `proposalId` by `account` with a given `support`, voting `weight` and voting `params`. - * - * Note: Support is generic and can represent various things depending on the voting system used. - */ - function _countVote( - uint256 proposalId, - address account, - uint8 support, - uint256 weight, - bytes memory params - ) internal virtual; - - /** - * @dev Default additional encoded parameters used by castVote methods that don't include them - * - * Note: Should be overridden by specific implementations to use an appropriate value, the - * meaning of the additional params, in the context of that implementation - */ - function _defaultParams() internal view virtual returns (bytes memory) { - return ""; - } - - /** - * @dev See {IGovernor-propose}. This function has opt-in frontrunning protection, described in {_isValidDescriptionForProposer}. - */ - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual override returns (uint256) { - address proposer = _msgSender(); - require(_isValidDescriptionForProposer(proposer, description), "Governor: proposer restricted"); - - uint256 currentTimepoint = clock(); - require( - getVotes(proposer, currentTimepoint - 1) >= proposalThreshold(), - "Governor: proposer votes below proposal threshold" - ); - - uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); - - require(targets.length == values.length, "Governor: invalid proposal length"); - require(targets.length == calldatas.length, "Governor: invalid proposal length"); - require(targets.length > 0, "Governor: empty proposal"); - require(_proposals[proposalId].voteStart == 0, "Governor: proposal already exists"); - - uint256 snapshot = currentTimepoint + votingDelay(); - uint256 deadline = snapshot + votingPeriod(); - - _proposals[proposalId] = ProposalCore({ - proposer: proposer, - voteStart: SafeCast.toUint64(snapshot), - voteEnd: SafeCast.toUint64(deadline), - executed: false, - canceled: false, - __gap_unused0: 0, - __gap_unused1: 0 - }); - - emit ProposalCreated( - proposalId, - proposer, - targets, - values, - new string[](targets.length), - calldatas, - snapshot, - deadline, - description - ); - - return proposalId; - } - - /** - * @dev See {IGovernor-execute}. - */ - function execute( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public payable virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - ProposalState currentState = state(proposalId); - require( - currentState == ProposalState.Succeeded || currentState == ProposalState.Queued, - "Governor: proposal not successful" - ); - _proposals[proposalId].executed = true; - - emit ProposalExecuted(proposalId); - - _beforeExecute(proposalId, targets, values, calldatas, descriptionHash); - _execute(proposalId, targets, values, calldatas, descriptionHash); - _afterExecute(proposalId, targets, values, calldatas, descriptionHash); - - return proposalId; - } - - /** - * @dev See {IGovernor-cancel}. - */ - function cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - require(state(proposalId) == ProposalState.Pending, "Governor: too late to cancel"); - require(_msgSender() == _proposals[proposalId].proposer, "Governor: only proposer can cancel"); - return _cancel(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Internal execution mechanism. Can be overridden to implement different execution mechanism - */ - function _execute( - uint256 /* proposalId */, - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 /*descriptionHash*/ - ) internal virtual { - string memory errorMessage = "Governor: call reverted without message"; - for (uint256 i = 0; i < targets.length; ++i) { - (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); - Address.verifyCallResult(success, returndata, errorMessage); - } - } - - /** - * @dev Hook before execution is triggered. - */ - function _beforeExecute( - uint256 /* proposalId */, - address[] memory targets, - uint256[] memory /* values */, - bytes[] memory calldatas, - bytes32 /*descriptionHash*/ - ) internal virtual { - if (_executor() != address(this)) { - for (uint256 i = 0; i < targets.length; ++i) { - if (targets[i] == address(this)) { - _governanceCall.pushBack(keccak256(calldatas[i])); - } - } - } - } - - /** - * @dev Hook after execution is triggered. - */ - function _afterExecute( - uint256 /* proposalId */, - address[] memory /* targets */, - uint256[] memory /* values */, - bytes[] memory /* calldatas */, - bytes32 /*descriptionHash*/ - ) internal virtual { - if (_executor() != address(this)) { - if (!_governanceCall.empty()) { - _governanceCall.clear(); - } - } - } - - /** - * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as - * canceled to allow distinguishing it from executed proposals. - * - * Emits a {IGovernor-ProposalCanceled} event. - */ - function _cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) internal virtual returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - ProposalState currentState = state(proposalId); - - require( - currentState != ProposalState.Canceled && - currentState != ProposalState.Expired && - currentState != ProposalState.Executed, - "Governor: proposal not active" - ); - _proposals[proposalId].canceled = true; - - emit ProposalCanceled(proposalId); - - return proposalId; - } - - /** - * @dev See {IGovernor-getVotes}. - */ - function getVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { - return _getVotes(account, timepoint, _defaultParams()); - } - - /** - * @dev See {IGovernor-getVotesWithParams}. - */ - function getVotesWithParams( - address account, - uint256 timepoint, - bytes memory params - ) public view virtual override returns (uint256) { - return _getVotes(account, timepoint, params); - } - - /** - * @dev See {IGovernor-castVote}. - */ - function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { - address voter = _msgSender(); - return _castVote(proposalId, voter, support, ""); - } - - /** - * @dev See {IGovernor-castVoteWithReason}. - */ - function castVoteWithReason( - uint256 proposalId, - uint8 support, - string calldata reason - ) public virtual override returns (uint256) { - address voter = _msgSender(); - return _castVote(proposalId, voter, support, reason); - } - - /** - * @dev See {IGovernor-castVoteWithReasonAndParams}. - */ - function castVoteWithReasonAndParams( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params - ) public virtual override returns (uint256) { - address voter = _msgSender(); - return _castVote(proposalId, voter, support, reason, params); - } - - /** - * @dev See {IGovernor-castVoteBySig}. - */ - function castVoteBySig( - uint256 proposalId, - uint8 support, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override returns (uint256) { - address voter = ECDSA.recover( - _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))), - v, - r, - s - ); - return _castVote(proposalId, voter, support, ""); - } - - /** - * @dev See {IGovernor-castVoteWithReasonAndParamsBySig}. - */ - function castVoteWithReasonAndParamsBySig( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override returns (uint256) { - address voter = ECDSA.recover( - _hashTypedDataV4( - keccak256( - abi.encode( - EXTENDED_BALLOT_TYPEHASH, - proposalId, - support, - keccak256(bytes(reason)), - keccak256(params) - ) - ) - ), - v, - r, - s - ); - - return _castVote(proposalId, voter, support, reason, params); - } - - /** - * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve - * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. Uses the _defaultParams(). - * - * Emits a {IGovernor-VoteCast} event. - */ - function _castVote( - uint256 proposalId, - address account, - uint8 support, - string memory reason - ) internal virtual returns (uint256) { - return _castVote(proposalId, account, support, reason, _defaultParams()); - } - - /** - * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve - * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. - * - * Emits a {IGovernor-VoteCast} event. - */ - function _castVote( - uint256 proposalId, - address account, - uint8 support, - string memory reason, - bytes memory params - ) internal virtual returns (uint256) { - ProposalCore storage proposal = _proposals[proposalId]; - require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active"); - - uint256 weight = _getVotes(account, proposal.voteStart, params); - _countVote(proposalId, account, support, weight, params); - - if (params.length == 0) { - emit VoteCast(account, proposalId, support, weight, reason); - } else { - emit VoteCastWithParams(account, proposalId, support, weight, reason, params); - } - - return weight; - } - - /** - * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor - * is some contract other than the governor itself, like when using a timelock, this function can be invoked - * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. - * Note that if the executor is simply the governor itself, use of `relay` is redundant. - */ - function relay(address target, uint256 value, bytes calldata data) external payable virtual onlyGovernance { - (bool success, bytes memory returndata) = target.call{value: value}(data); - Address.verifyCallResult(success, returndata, "Governor: relay reverted without message"); - } - - /** - * @dev Address through which the governor executes action. Will be overloaded by module that execute actions - * through another contract such as a timelock. - */ - function _executor() internal view virtual returns (address) { - return address(this); - } - - /** - * @dev See {IERC721Receiver-onERC721Received}. - */ - function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { - return this.onERC721Received.selector; - } - - /** - * @dev See {IERC1155Receiver-onERC1155Received}. - */ - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155Received.selector; - } - - /** - * @dev See {IERC1155Receiver-onERC1155BatchReceived}. - */ - function onERC1155BatchReceived( - address, - address, - uint256[] memory, - uint256[] memory, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155BatchReceived.selector; - } - - /** - * @dev Check if the proposer is authorized to submit a proposal with the given description. - * - * If the proposal description ends with `#proposer=0x???`, where `0x???` is an address written as a hex string - * (case insensitive), then the submission of this proposal will only be authorized to said address. - * - * This is used for frontrunning protection. By adding this pattern at the end of their proposal, one can ensure - * that no other address can submit the same proposal. An attacker would have to either remove or change that part, - * which would result in a different proposal id. - * - * If the description does not match this pattern, it is unrestricted and anyone can submit it. This includes: - * - If the `0x???` part is not a valid hex string. - * - If the `0x???` part is a valid hex string, but does not contain exactly 40 hex digits. - * - If it ends with the expected suffix followed by newlines or other whitespace. - * - If it ends with some other similar suffix, e.g. `#other=abc`. - * - If it does not end with any such suffix. - */ - function _isValidDescriptionForProposer( - address proposer, - string memory description - ) internal view virtual returns (bool) { - uint256 len = bytes(description).length; - - // Length is too short to contain a valid proposer suffix - if (len < 52) { - return true; - } - - // Extract what would be the `#proposer=0x` marker beginning the suffix - bytes12 marker; - assembly { - // - Start of the string contents in memory = description + 32 - // - First character of the marker = len - 52 - // - Length of "#proposer=0x0000000000000000000000000000000000000000" = 52 - // - We read the memory word starting at the first character of the marker: - // - (description + 32) + (len - 52) = description + (len - 20) - // - Note: Solidity will ignore anything past the first 12 bytes - marker := mload(add(description, sub(len, 20))) - } - - // If the marker is not found, there is no proposer suffix to check - if (marker != bytes12("#proposer=0x")) { - return true; - } - - // Parse the 40 characters following the marker as uint160 - uint160 recovered = 0; - for (uint256 i = len - 40; i < len; ++i) { - (bool isHex, uint8 value) = _tryHexToUint(bytes(description)[i]); - // If any of the characters is not a hex digit, ignore the suffix entirely - if (!isHex) { - return true; - } - recovered = (recovered << 4) | value; - } - - return recovered == uint160(proposer); - } - - /** - * @dev Try to parse a character from a string as a hex value. Returns `(true, value)` if the char is in - * `[0-9a-fA-F]` and `(false, 0)` otherwise. Value is guaranteed to be in the range `0 <= value < 16` - */ - function _tryHexToUint(bytes1 char) private pure returns (bool, uint8) { - uint8 c = uint8(char); - unchecked { - // Case 0-9 - if (47 < c && c < 58) { - return (true, c - 48); - } - // Case A-F - else if (64 < c && c < 71) { - return (true, c - 55); - } - // Case a-f - else if (96 < c && c < 103) { - return (true, c - 87); - } - // Else: not a hex char - else { - return (false, 0); - } - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol deleted file mode 100644 index 492d95b9..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/IGovernor.sol +++ /dev/null @@ -1,313 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/IGovernor.sol) - -pragma solidity ^0.8.0; - -import "../interfaces/IERC165.sol"; -import "../interfaces/IERC6372.sol"; - -/** - * @dev Interface of the {Governor} core. - * - * _Available since v4.3._ - */ -abstract contract IGovernor is IERC165, IERC6372 { - enum ProposalState { - Pending, - Active, - Canceled, - Defeated, - Succeeded, - Queued, - Expired, - Executed - } - - /** - * @dev Emitted when a proposal is created. - */ - event ProposalCreated( - uint256 proposalId, - address proposer, - address[] targets, - uint256[] values, - string[] signatures, - bytes[] calldatas, - uint256 voteStart, - uint256 voteEnd, - string description - ); - - /** - * @dev Emitted when a proposal is canceled. - */ - event ProposalCanceled(uint256 proposalId); - - /** - * @dev Emitted when a proposal is executed. - */ - event ProposalExecuted(uint256 proposalId); - - /** - * @dev Emitted when a vote is cast without params. - * - * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. - */ - event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); - - /** - * @dev Emitted when a vote is cast with params. - * - * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. - * `params` are additional encoded parameters. Their interpepretation also depends on the voting module used. - */ - event VoteCastWithParams( - address indexed voter, - uint256 proposalId, - uint8 support, - uint256 weight, - string reason, - bytes params - ); - - /** - * @notice module:core - * @dev Name of the governor instance (used in building the ERC712 domain separator). - */ - function name() public view virtual returns (string memory); - - /** - * @notice module:core - * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1" - */ - function version() public view virtual returns (string memory); - - /** - * @notice module:core - * @dev See {IERC6372} - */ - function clock() public view virtual override returns (uint48); - - /** - * @notice module:core - * @dev See EIP-6372. - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory); - - /** - * @notice module:voting - * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to - * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of - * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`. - * - * There are 2 standard keys: `support` and `quorum`. - * - * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`. - * - `quorum=bravo` means that only For votes are counted towards quorum. - * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum. - * - * If a counting module makes use of encoded `params`, it should include this under a `params` key with a unique - * name that describes the behavior. For example: - * - * - `params=fractional` might refer to a scheme where votes are divided fractionally between for/against/abstain. - * - `params=erc721` might refer to a scheme where specific NFTs are delegated to vote. - * - * NOTE: The string can be decoded by the standard - * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`] - * JavaScript class. - */ - // solhint-disable-next-line func-name-mixedcase - function COUNTING_MODE() public view virtual returns (string memory); - - /** - * @notice module:core - * @dev Hashing function used to (re)build the proposal id from the proposal details.. - */ - function hashProposal( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public pure virtual returns (uint256); - - /** - * @notice module:core - * @dev Current state of a proposal, following Compound's convention - */ - function state(uint256 proposalId) public view virtual returns (ProposalState); - - /** - * @notice module:core - * @dev Timepoint used to retrieve user's votes and quorum. If using block number (as per Compound's Comp), the - * snapshot is performed at the end of this block. Hence, voting for this proposal starts at the beginning of the - * following block. - */ - function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256); - - /** - * @notice module:core - * @dev Timepoint at which votes close. If using block number, votes close at the end of this block, so it is - * possible to cast a vote during this block. - */ - function proposalDeadline(uint256 proposalId) public view virtual returns (uint256); - - /** - * @notice module:core - * @dev The account that created a proposal. - */ - function proposalProposer(uint256 proposalId) public view virtual returns (address); - - /** - * @notice module:user-config - * @dev Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends - * on the clock (see EIP-6372) this contract uses. - * - * This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a - * proposal starts. - */ - function votingDelay() public view virtual returns (uint256); - - /** - * @notice module:user-config - * @dev Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock - * (see EIP-6372) this contract uses. - * - * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting - * duration compared to the voting delay. - */ - function votingPeriod() public view virtual returns (uint256); - - /** - * @notice module:user-config - * @dev Minimum number of cast voted required for a proposal to be successful. - * - * NOTE: The `timepoint` parameter corresponds to the snapshot used for counting vote. This allows to scale the - * quorum depending on values such as the totalSupply of a token at this timepoint (see {ERC20Votes}). - */ - function quorum(uint256 timepoint) public view virtual returns (uint256); - - /** - * @notice module:reputation - * @dev Voting power of an `account` at a specific `timepoint`. - * - * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or - * multiple), {ERC20Votes} tokens. - */ - function getVotes(address account, uint256 timepoint) public view virtual returns (uint256); - - /** - * @notice module:reputation - * @dev Voting power of an `account` at a specific `timepoint` given additional encoded parameters. - */ - function getVotesWithParams( - address account, - uint256 timepoint, - bytes memory params - ) public view virtual returns (uint256); - - /** - * @notice module:voting - * @dev Returns whether `account` has cast a vote on `proposalId`. - */ - function hasVoted(uint256 proposalId, address account) public view virtual returns (bool); - - /** - * @dev Create a new proposal. Vote start after a delay specified by {IGovernor-votingDelay} and lasts for a - * duration specified by {IGovernor-votingPeriod}. - * - * Emits a {ProposalCreated} event. - */ - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual returns (uint256 proposalId); - - /** - * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the - * deadline to be reached. - * - * Emits a {ProposalExecuted} event. - * - * Note: some module can modify the requirements for execution, for example by adding an additional timelock. - */ - function execute( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public payable virtual returns (uint256 proposalId); - - /** - * @dev Cancel a proposal. A proposal is cancellable by the proposer, but only while it is Pending state, i.e. - * before the vote starts. - * - * Emits a {ProposalCanceled} event. - */ - function cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual returns (uint256 proposalId); - - /** - * @dev Cast a vote - * - * Emits a {VoteCast} event. - */ - function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote with a reason - * - * Emits a {VoteCast} event. - */ - function castVoteWithReason( - uint256 proposalId, - uint8 support, - string calldata reason - ) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote with a reason and additional encoded parameters - * - * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. - */ - function castVoteWithReasonAndParams( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params - ) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote using the user's cryptographic signature. - * - * Emits a {VoteCast} event. - */ - function castVoteBySig( - uint256 proposalId, - uint8 support, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote with a reason and additional encoded parameters using the user's cryptographic signature. - * - * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. - */ - function castVoteWithReasonAndParamsBySig( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual returns (uint256 balance); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol deleted file mode 100644 index ecc94fba..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/GovernorCompatibilityBravo.sol +++ /dev/null @@ -1,333 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/GovernorCompatibilityBravo.sol) - -pragma solidity ^0.8.0; - -import "../../utils/math/SafeCast.sol"; -import "../extensions/IGovernorTimelock.sol"; -import "../Governor.sol"; -import "./IGovernorCompatibilityBravo.sol"; - -/** - * @dev Compatibility layer that implements GovernorBravo compatibility on top of {Governor}. - * - * This compatibility layer includes a voting system and requires a {IGovernorTimelock} compatible module to be added - * through inheritance. It does not include token bindings, nor does it include any variable upgrade patterns. - * - * NOTE: When using this module, you may need to enable the Solidity optimizer to avoid hitting the contract size limit. - * - * _Available since v4.3._ - */ -abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorCompatibilityBravo, Governor { - enum VoteType { - Against, - For, - Abstain - } - - struct ProposalDetails { - address proposer; - address[] targets; - uint256[] values; - string[] signatures; - bytes[] calldatas; - uint256 forVotes; - uint256 againstVotes; - uint256 abstainVotes; - mapping(address => Receipt) receipts; - bytes32 descriptionHash; - } - - mapping(uint256 => ProposalDetails) private _proposalDetails; - - // solhint-disable-next-line func-name-mixedcase - function COUNTING_MODE() public pure virtual override returns (string memory) { - return "support=bravo&quorum=bravo"; - } - - // ============================================== Proposal lifecycle ============================================== - /** - * @dev See {IGovernor-propose}. - */ - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual override(IGovernor, Governor) returns (uint256) { - // Stores the proposal details (if not already present) and executes the propose logic from the core. - _storeProposal(_msgSender(), targets, values, new string[](calldatas.length), calldatas, description); - return super.propose(targets, values, calldatas, description); - } - - /** - * @dev See {IGovernorCompatibilityBravo-propose}. - */ - function propose( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas, - string memory description - ) public virtual override returns (uint256) { - require(signatures.length == calldatas.length, "GovernorBravo: invalid signatures length"); - // Stores the full proposal and fallback to the public (possibly overridden) propose. The fallback is done - // after the full proposal is stored, so the store operation included in the fallback will be skipped. Here we - // call `propose` and not `super.propose` to make sure if a child contract override `propose`, whatever code - // is added there is also executed when calling this alternative interface. - _storeProposal(_msgSender(), targets, values, signatures, calldatas, description); - return propose(targets, values, _encodeCalldata(signatures, calldatas), description); - } - - /** - * @dev See {IGovernorCompatibilityBravo-queue}. - */ - function queue(uint256 proposalId) public virtual override { - ( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) = _getProposalParameters(proposalId); - - queue(targets, values, calldatas, descriptionHash); - } - - /** - * @dev See {IGovernorCompatibilityBravo-execute}. - */ - function execute(uint256 proposalId) public payable virtual override { - ( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) = _getProposalParameters(proposalId); - - execute(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Cancel a proposal with GovernorBravo logic. - */ - function cancel(uint256 proposalId) public virtual override { - ( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) = _getProposalParameters(proposalId); - - cancel(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Cancel a proposal with GovernorBravo logic. At any moment a proposal can be cancelled, either by the - * proposer, or by third parties if the proposer's voting power has dropped below the proposal threshold. - */ - function cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual override(IGovernor, Governor) returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - address proposer = _proposalDetails[proposalId].proposer; - - require( - _msgSender() == proposer || getVotes(proposer, clock() - 1) < proposalThreshold(), - "GovernorBravo: proposer above threshold" - ); - - return _cancel(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Encodes calldatas with optional function signature. - */ - function _encodeCalldata( - string[] memory signatures, - bytes[] memory calldatas - ) private pure returns (bytes[] memory) { - bytes[] memory fullcalldatas = new bytes[](calldatas.length); - for (uint256 i = 0; i < fullcalldatas.length; ++i) { - fullcalldatas[i] = bytes(signatures[i]).length == 0 - ? calldatas[i] - : abi.encodePacked(bytes4(keccak256(bytes(signatures[i]))), calldatas[i]); - } - - return fullcalldatas; - } - - /** - * @dev Retrieve proposal parameters by id, with fully encoded calldatas. - */ - function _getProposalParameters( - uint256 proposalId - ) - private - view - returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash) - { - ProposalDetails storage details = _proposalDetails[proposalId]; - return ( - details.targets, - details.values, - _encodeCalldata(details.signatures, details.calldatas), - details.descriptionHash - ); - } - - /** - * @dev Store proposal metadata (if not already present) for later lookup. - */ - function _storeProposal( - address proposer, - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas, - string memory description - ) private { - bytes32 descriptionHash = keccak256(bytes(description)); - uint256 proposalId = hashProposal(targets, values, _encodeCalldata(signatures, calldatas), descriptionHash); - - ProposalDetails storage details = _proposalDetails[proposalId]; - if (details.descriptionHash == bytes32(0)) { - details.proposer = proposer; - details.targets = targets; - details.values = values; - details.signatures = signatures; - details.calldatas = calldatas; - details.descriptionHash = descriptionHash; - } - } - - // ==================================================== Views ===================================================== - /** - * @dev See {IGovernorCompatibilityBravo-proposals}. - */ - function proposals( - uint256 proposalId - ) - public - view - virtual - override - returns ( - uint256 id, - address proposer, - uint256 eta, - uint256 startBlock, - uint256 endBlock, - uint256 forVotes, - uint256 againstVotes, - uint256 abstainVotes, - bool canceled, - bool executed - ) - { - id = proposalId; - eta = proposalEta(proposalId); - startBlock = proposalSnapshot(proposalId); - endBlock = proposalDeadline(proposalId); - - ProposalDetails storage details = _proposalDetails[proposalId]; - proposer = details.proposer; - forVotes = details.forVotes; - againstVotes = details.againstVotes; - abstainVotes = details.abstainVotes; - - ProposalState currentState = state(proposalId); - canceled = currentState == ProposalState.Canceled; - executed = currentState == ProposalState.Executed; - } - - /** - * @dev See {IGovernorCompatibilityBravo-getActions}. - */ - function getActions( - uint256 proposalId - ) - public - view - virtual - override - returns ( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas - ) - { - ProposalDetails storage details = _proposalDetails[proposalId]; - return (details.targets, details.values, details.signatures, details.calldatas); - } - - /** - * @dev See {IGovernorCompatibilityBravo-getReceipt}. - */ - function getReceipt(uint256 proposalId, address voter) public view virtual override returns (Receipt memory) { - return _proposalDetails[proposalId].receipts[voter]; - } - - /** - * @dev See {IGovernorCompatibilityBravo-quorumVotes}. - */ - function quorumVotes() public view virtual override returns (uint256) { - return quorum(clock() - 1); - } - - // ==================================================== Voting ==================================================== - /** - * @dev See {IGovernor-hasVoted}. - */ - function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { - return _proposalDetails[proposalId].receipts[account].hasVoted; - } - - /** - * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum. - */ - function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { - ProposalDetails storage details = _proposalDetails[proposalId]; - return quorum(proposalSnapshot(proposalId)) <= details.forVotes; - } - - /** - * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. - */ - function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { - ProposalDetails storage details = _proposalDetails[proposalId]; - return details.forVotes > details.againstVotes; - } - - /** - * @dev See {Governor-_countVote}. In this module, the support follows Governor Bravo. - */ - function _countVote( - uint256 proposalId, - address account, - uint8 support, - uint256 weight, - bytes memory // params - ) internal virtual override { - ProposalDetails storage details = _proposalDetails[proposalId]; - Receipt storage receipt = details.receipts[account]; - - require(!receipt.hasVoted, "GovernorCompatibilityBravo: vote already cast"); - receipt.hasVoted = true; - receipt.support = support; - receipt.votes = SafeCast.toUint96(weight); - - if (support == uint8(VoteType.Against)) { - details.againstVotes += weight; - } else if (support == uint8(VoteType.For)) { - details.forVotes += weight; - } else if (support == uint8(VoteType.Abstain)) { - details.abstainVotes += weight; - } else { - revert("GovernorCompatibilityBravo: invalid vote type"); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol deleted file mode 100644 index e64a66a6..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/compatibility/IGovernorCompatibilityBravo.sol +++ /dev/null @@ -1,118 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/IGovernorCompatibilityBravo.sol) - -pragma solidity ^0.8.0; - -import "../IGovernor.sol"; - -/** - * @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility. - * - * _Available since v4.3._ - */ -abstract contract IGovernorCompatibilityBravo is IGovernor { - /** - * @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as - * {{proposal}} returns a very different structure. - */ - struct Proposal { - uint256 id; - address proposer; - uint256 eta; - address[] targets; - uint256[] values; - string[] signatures; - bytes[] calldatas; - uint256 startBlock; - uint256 endBlock; - uint256 forVotes; - uint256 againstVotes; - uint256 abstainVotes; - bool canceled; - bool executed; - mapping(address => Receipt) receipts; - } - - /** - * @dev Receipt structure from Compound Governor Bravo - */ - struct Receipt { - bool hasVoted; - uint8 support; - uint96 votes; - } - - /** - * @dev Part of the Governor Bravo's interface. - */ - function quorumVotes() public view virtual returns (uint256); - - /** - * @dev Part of the Governor Bravo's interface: _"The official record of all proposals ever proposed"_. - */ - function proposals( - uint256 - ) - public - view - virtual - returns ( - uint256 id, - address proposer, - uint256 eta, - uint256 startBlock, - uint256 endBlock, - uint256 forVotes, - uint256 againstVotes, - uint256 abstainVotes, - bool canceled, - bool executed - ); - - /** - * @dev Part of the Governor Bravo's interface: _"Function used to propose a new proposal"_. - */ - function propose( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas, - string memory description - ) public virtual returns (uint256); - - /** - * @dev Part of the Governor Bravo's interface: _"Queues a proposal of state succeeded"_. - */ - function queue(uint256 proposalId) public virtual; - - /** - * @dev Part of the Governor Bravo's interface: _"Executes a queued proposal if eta has passed"_. - */ - function execute(uint256 proposalId) public payable virtual; - - /** - * @dev Cancels a proposal only if the sender is the proposer or the proposer delegates' voting power dropped below the proposal threshold. - */ - function cancel(uint256 proposalId) public virtual; - - /** - * @dev Part of the Governor Bravo's interface: _"Gets actions of a proposal"_. - */ - function getActions( - uint256 proposalId - ) - public - view - virtual - returns ( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas - ); - - /** - * @dev Part of the Governor Bravo's interface: _"Gets the receipt for a voter on a given proposal"_. - */ - function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol deleted file mode 100644 index 3feebace..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorProposalThreshold.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorProposalThreshold.sol) - -pragma solidity ^0.8.0; - -import "../Governor.sol"; - -/** - * @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance. - * - * _Available since v4.3._ - * _Deprecated since v4.4._ - */ -abstract contract GovernorProposalThreshold is Governor { - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual override returns (uint256) { - return super.propose(targets, values, calldatas, description); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol deleted file mode 100644 index e7d7c2c7..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesComp.sol +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesComp.sol) - -pragma solidity ^0.8.0; - -import "../Governor.sol"; -import "../../token/ERC20/extensions/ERC20VotesComp.sol"; - -/** - * @dev Extension of {Governor} for voting weight extraction from a Comp token. - * - * _Available since v4.3._ - */ -abstract contract GovernorVotesComp is Governor { - ERC20VotesComp public immutable token; - - constructor(ERC20VotesComp token_) { - token = token_; - } - - /** - * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token - * does not implement EIP-6372. - */ - function clock() public view virtual override returns (uint48) { - try token.clock() returns (uint48 timepoint) { - return timepoint; - } catch { - return SafeCast.toUint48(block.number); - } - } - - /** - * @dev Machine-readable description of the clock as specified in EIP-6372. - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory) { - try token.CLOCK_MODE() returns (string memory clockmode) { - return clockmode; - } catch { - return "mode=blocknumber&from=default"; - } - } - - /** - * Read the voting weight from the token's built-in snapshot mechanism (see {Governor-_getVotes}). - */ - function _getVotes( - address account, - uint256 timepoint, - bytes memory /*params*/ - ) internal view virtual override returns (uint256) { - return token.getPriorVotes(account, timepoint); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol b/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol deleted file mode 100644 index 40402f61..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/IGovernorTimelock.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol) - -pragma solidity ^0.8.0; - -import "../IGovernor.sol"; - -/** - * @dev Extension of the {IGovernor} for timelock supporting modules. - * - * _Available since v4.3._ - */ -abstract contract IGovernorTimelock is IGovernor { - event ProposalQueued(uint256 proposalId, uint256 eta); - - function timelock() public view virtual returns (address); - - function proposalEta(uint256 proposalId) public view virtual returns (uint256); - - function queue( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual returns (uint256 proposalId); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol deleted file mode 100644 index f8911321..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC1155/IERC1155.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol deleted file mode 100644 index 2aa885fe..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155MetadataURI.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC1155/extensions/IERC1155MetadataURI.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol deleted file mode 100644 index a6d4ead1..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1155Receiver.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC1155/IERC1155Receiver.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol deleted file mode 100644 index 5ec44c72..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1271.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC1271 standard signature validation method for - * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. - * - * _Available since v4.1._ - */ -interface IERC1271 { - /** - * @dev Should return whether the signature provided is valid for the provided data - * @param hash Hash of the data to be signed - * @param signature Signature byte array associated with _data - */ - function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol deleted file mode 100644 index 817f3daf..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363.sol +++ /dev/null @@ -1,80 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363.sol) - -pragma solidity ^0.8.0; - -import "./IERC20.sol"; -import "./IERC165.sol"; - -/** - * @dev Interface of an ERC1363 compliant contract, as defined in the - * https://eips.ethereum.org/EIPS/eip-1363[EIP]. - * - * Defines a interface for ERC20 tokens that supports executing recipient - * code after `transfer` or `transferFrom`, or spender code after `approve`. - */ -interface IERC1363 is IERC165, IERC20 { - /* - * Note: the ERC-165 identifier for this interface is 0xb0202a11. - * 0xb0202a11 === - * bytes4(keccak256('transferAndCall(address,uint256)')) ^ - * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ - * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ - * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ - * bytes4(keccak256('approveAndCall(address,uint256)')) ^ - * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) - */ - - /** - * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @return true unless throwing - */ - function transferAndCall(address to, uint256 amount) external returns (bool); - - /** - * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @param data bytes Additional data with no specified format, sent in call to `to` - * @return true unless throwing - */ - function transferAndCall(address to, uint256 amount, bytes memory data) external returns (bool); - - /** - * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver - * @param from address The address which you want to send tokens from - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @return true unless throwing - */ - function transferFromAndCall(address from, address to, uint256 amount) external returns (bool); - - /** - * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver - * @param from address The address which you want to send tokens from - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @param data bytes Additional data with no specified format, sent in call to `to` - * @return true unless throwing - */ - function transferFromAndCall(address from, address to, uint256 amount, bytes memory data) external returns (bool); - - /** - * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender - * and then call `onApprovalReceived` on spender. - * @param spender address The address which will spend the funds - * @param amount uint256 The amount of tokens to be spent - */ - function approveAndCall(address spender, uint256 amount) external returns (bool); - - /** - * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender - * and then call `onApprovalReceived` on spender. - * @param spender address The address which will spend the funds - * @param amount uint256 The amount of tokens to be spent - * @param data bytes Additional data with no specified format, sent in call to `spender` - */ - function approveAndCall(address spender, uint256 amount, bytes memory data) external returns (bool); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol deleted file mode 100644 index 382d7f11..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Receiver.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Receiver.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface for any contract that wants to support {IERC1363-transferAndCall} - * or {IERC1363-transferFromAndCall} from {ERC1363} token contracts. - */ -interface IERC1363Receiver { - /* - * Note: the ERC-165 identifier for this interface is 0x88a7ca5c. - * 0x88a7ca5c === bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)")) - */ - - /** - * @notice Handle the receipt of ERC1363 tokens - * @dev Any ERC1363 smart contract calls this function on the recipient - * after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the - * transfer. Return of other than the magic value MUST result in the - * transaction being reverted. - * Note: the token contract address is always the message sender. - * @param operator address The address which called `transferAndCall` or `transferFromAndCall` function - * @param from address The address which are token transferred from - * @param amount uint256 The amount of tokens transferred - * @param data bytes Additional data with no specified format - * @return `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` unless throwing - */ - function onTransferReceived( - address operator, - address from, - uint256 amount, - bytes memory data - ) external returns (bytes4); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol deleted file mode 100644 index 09a7bd27..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1363Spender.sol +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Spender.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface for any contract that wants to support {IERC1363-approveAndCall} - * from {ERC1363} token contracts. - */ -interface IERC1363Spender { - /* - * Note: the ERC-165 identifier for this interface is 0x7b04a2d0. - * 0x7b04a2d0 === bytes4(keccak256("onApprovalReceived(address,uint256,bytes)")) - */ - - /** - * @notice Handle the approval of ERC1363 tokens - * @dev Any ERC1363 smart contract calls this function on the recipient - * after an `approve`. This function MAY throw to revert and reject the - * approval. Return of other than the magic value MUST result in the - * transaction being reverted. - * Note: the token contract address is always the message sender. - * @param owner address The address which called `approveAndCall` function - * @param amount uint256 The amount of tokens to be spent - * @param data bytes Additional data with no specified format - * @return `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`unless throwing - */ - function onApprovalReceived(address owner, uint256 amount, bytes memory data) external returns (bytes4); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol deleted file mode 100644 index b97c4daa..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC165.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) - -pragma solidity ^0.8.0; - -import "../utils/introspection/IERC165.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol deleted file mode 100644 index a83a7a30..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Implementer.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol) - -pragma solidity ^0.8.0; - -import "../utils/introspection/IERC1820Implementer.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol deleted file mode 100644 index 1b1ba9fc..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1820Registry.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol) - -pragma solidity ^0.8.0; - -import "../utils/introspection/IERC1820Registry.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol deleted file mode 100644 index a819316d..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/IERC20.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol deleted file mode 100644 index aa5c6391..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC20Metadata.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/extensions/IERC20Metadata.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol deleted file mode 100644 index cd5fca4c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2612.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2612.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/extensions/IERC20Permit.sol"; - -interface IERC2612 is IERC20Permit {} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol deleted file mode 100644 index 12381906..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156.sol +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol) - -pragma solidity ^0.8.0; - -import "./IERC3156FlashBorrower.sol"; -import "./IERC3156FlashLender.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol deleted file mode 100644 index a012ccb1..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5805.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol) - -pragma solidity ^0.8.0; - -import "../governance/utils/IVotes.sol"; -import "./IERC6372.sol"; - -interface IERC5805 is IERC6372, IVotes {} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol deleted file mode 100644 index 822b311c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/IERC721.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol deleted file mode 100644 index e39a5a01..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Enumerable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/extensions/IERC721Enumerable.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol deleted file mode 100644 index afe2707c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Metadata.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/extensions/IERC721Metadata.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol deleted file mode 100644 index c9c153a2..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC721Receiver.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/IERC721Receiver.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol deleted file mode 100644 index b97ba7b8..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC777/IERC777.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol deleted file mode 100644 index 0ce2704a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Recipient.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC777/IERC777Recipient.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol deleted file mode 100644 index f1f17a22..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC777Sender.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC777/IERC777Sender.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol b/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol deleted file mode 100644 index 024b753e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC2612.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/draft-IERC2612.sol) - -pragma solidity ^0.8.0; - -// EIP-2612 is Final as of 2022-11-01. This file is deprecated. - -import "./IERC2612.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol b/dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol deleted file mode 100644 index 913022cd..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/metatx/ERC2771Context.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (metatx/ERC2771Context.sol) - -pragma solidity ^0.8.9; - -import "../utils/Context.sol"; - -/** - * @dev Context variant with ERC2771 support. - * - * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption. - * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender} - * recovery. - */ -abstract contract ERC2771Context is Context { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _trustedForwarder; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address trustedForwarder) { - _trustedForwarder = trustedForwarder; - } - - function isTrustedForwarder(address forwarder) public view virtual returns (bool) { - return forwarder == _trustedForwarder; - } - - function _msgSender() internal view virtual override returns (address) { - uint256 calldataLength = msg.data.length; - uint256 contextSuffixLength = _contextSuffixLength(); - if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { - return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); - } else { - return super._msgSender(); - } - } - - function _msgData() internal view virtual override returns (bytes calldata) { - uint256 calldataLength = msg.data.length; - uint256 contextSuffixLength = _contextSuffixLength(); - if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { - return msg.data[:calldataLength - contextSuffixLength]; - } else { - return super._msgData(); - } - } - - /** - * @dev ERC-2771 specifies the context as being a single address (20 bytes). - */ - function _contextSuffixLength() internal view virtual override returns (uint256) { - return 20; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol b/dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol deleted file mode 100644 index de264626..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/metatx/MinimalForwarder.sol +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (metatx/MinimalForwarder.sol) - -pragma solidity ^0.8.0; - -import "../utils/cryptography/ECDSA.sol"; -import "../utils/cryptography/EIP712.sol"; - -/** - * @dev Simple minimal forwarder to be used together with an ERC2771 compatible contract. See {ERC2771Context}. - * - * MinimalForwarder is mainly meant for testing, as it is missing features to be a good production-ready forwarder. This - * contract does not intend to have all the properties that are needed for a sound forwarding system. A fully - * functioning forwarding system with good properties requires more complexity. We suggest you look at other projects - * such as the GSN which do have the goal of building a system like that. - */ -contract MinimalForwarder is EIP712 { - using ECDSA for bytes32; - - struct ForwardRequest { - address from; - address to; - uint256 value; - uint256 gas; - uint256 nonce; - bytes data; - } - - bytes32 private constant _TYPEHASH = - keccak256("ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data)"); - - mapping(address => uint256) private _nonces; - - constructor() EIP712("MinimalForwarder", "0.0.1") {} - - function getNonce(address from) public view returns (uint256) { - return _nonces[from]; - } - - function verify(ForwardRequest calldata req, bytes calldata signature) public view returns (bool) { - address signer = _hashTypedDataV4( - keccak256(abi.encode(_TYPEHASH, req.from, req.to, req.value, req.gas, req.nonce, keccak256(req.data))) - ).recover(signature); - return _nonces[req.from] == req.nonce && signer == req.from; - } - - function execute( - ForwardRequest calldata req, - bytes calldata signature - ) public payable returns (bool, bytes memory) { - require(verify(req, signature), "MinimalForwarder: signature does not match request"); - _nonces[req.from] = req.nonce + 1; - - (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}( - abi.encodePacked(req.data, req.from) - ); - - // Validate that the relayer has sent enough gas for the call. - // See https://ronan.eth.limo/blog/ethereum-gas-dangers/ - if (gasleft() <= req.gas / 63) { - // We explicitly trigger invalid opcode to consume all gas and bubble-up the effects, since - // neither revert or assert consume all gas since Solidity 0.8.0 - // https://docs.soliditylang.org/en/v0.8.0/control-structures.html#panic-via-assert-and-error-via-require - /// @solidity memory-safe-assembly - assembly { - invalid() - } - } - - return (success, returndata); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/package.json b/dependencies/@openzeppelin-contracts-4.9.6/package.json deleted file mode 100644 index bd0c54ff..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@openzeppelin/contracts", - "description": "Secure Smart Contract library for Solidity", - "version": "4.9.6", - "files": [ - "**/*.sol", - "/build/contracts/*.json", - "!/mocks/**/*" - ], - "scripts": { - "prepare": "bash ../scripts/prepare-contracts-package.sh", - "prepare-docs": "cd ..; npm run prepare-docs" - }, - "repository": { - "type": "git", - "url": "https://github.com/OpenZeppelin/openzeppelin-contracts.git" - }, - "keywords": [ - "solidity", - "ethereum", - "smart", - "contracts", - "security", - "zeppelin" - ], - "author": "OpenZeppelin Community ", - "license": "MIT", - "bugs": { - "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/issues" - }, - "homepage": "https://openzeppelin.com/contracts/" -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol deleted file mode 100644 index 583e0223..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/Clones.sol +++ /dev/null @@ -1,88 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol) - -pragma solidity ^0.8.0; - -/** - * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for - * deploying minimal proxy contracts, also known as "clones". - * - * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies - * > a minimal bytecode implementation that delegates all calls to a known, fixed address. - * - * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` - * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the - * deterministic method. - * - * _Available since v3.4._ - */ -library Clones { - /** - * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. - * - * This function uses the create opcode, which should never revert. - */ - function clone(address implementation) internal returns (address instance) { - /// @solidity memory-safe-assembly - assembly { - // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes - // of the `implementation` address with the bytecode before the address. - mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) - // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. - mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) - instance := create(0, 0x09, 0x37) - } - require(instance != address(0), "ERC1167: create failed"); - } - - /** - * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. - * - * This function uses the create2 opcode and a `salt` to deterministically deploy - * the clone. Using the same `implementation` and `salt` multiple time will revert, since - * the clones cannot be deployed twice at the same address. - */ - function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { - /// @solidity memory-safe-assembly - assembly { - // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes - // of the `implementation` address with the bytecode before the address. - mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) - // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. - mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) - instance := create2(0, 0x09, 0x37, salt) - } - require(instance != address(0), "ERC1167: create2 failed"); - } - - /** - * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. - */ - function predictDeterministicAddress( - address implementation, - bytes32 salt, - address deployer - ) internal pure returns (address predicted) { - /// @solidity memory-safe-assembly - assembly { - let ptr := mload(0x40) - mstore(add(ptr, 0x38), deployer) - mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) - mstore(add(ptr, 0x14), implementation) - mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) - mstore(add(ptr, 0x58), salt) - mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) - predicted := keccak256(add(ptr, 0x43), 0x55) - } - } - - /** - * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. - */ - function predictDeterministicAddress( - address implementation, - bytes32 salt - ) internal view returns (address predicted) { - return predictDeterministicAddress(implementation, salt, address(this)); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol deleted file mode 100644 index a04d701c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Proxy.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) - -pragma solidity ^0.8.0; - -import "../Proxy.sol"; -import "./ERC1967Upgrade.sol"; - -/** - * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an - * implementation address that can be changed. This address is stored in storage in the location specified by - * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the - * implementation behind the proxy. - */ -contract ERC1967Proxy is Proxy, ERC1967Upgrade { - /** - * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. - * - * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded - * function call, and allows initializing the storage of the proxy like a Solidity constructor. - */ - constructor(address _logic, bytes memory _data) payable { - _upgradeToAndCall(_logic, _data, false); - } - - /** - * @dev Returns the current implementation address. - */ - function _implementation() internal view virtual override returns (address impl) { - return ERC1967Upgrade._getImplementation(); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol deleted file mode 100644 index cc9e5695..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/ERC1967/ERC1967Upgrade.sol +++ /dev/null @@ -1,157 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) - -pragma solidity ^0.8.2; - -import "../beacon/IBeacon.sol"; -import "../../interfaces/IERC1967.sol"; -import "../../interfaces/draft-IERC1822.sol"; -import "../../utils/Address.sol"; -import "../../utils/StorageSlot.sol"; - -/** - * @dev This abstract contract provides getters and event emitting update functions for - * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. - * - * _Available since v4.1._ - */ -abstract contract ERC1967Upgrade is IERC1967 { - // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 - bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; - - /** - * @dev Storage slot with the address of the current implementation. - * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is - * validated in the constructor. - */ - bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - - /** - * @dev Returns the current implementation address. - */ - function _getImplementation() internal view returns (address) { - return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; - } - - /** - * @dev Stores a new address in the EIP1967 implementation slot. - */ - function _setImplementation(address newImplementation) private { - require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); - StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; - } - - /** - * @dev Perform implementation upgrade - * - * Emits an {Upgraded} event. - */ - function _upgradeTo(address newImplementation) internal { - _setImplementation(newImplementation); - emit Upgraded(newImplementation); - } - - /** - * @dev Perform implementation upgrade with additional setup call. - * - * Emits an {Upgraded} event. - */ - function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { - _upgradeTo(newImplementation); - if (data.length > 0 || forceCall) { - Address.functionDelegateCall(newImplementation, data); - } - } - - /** - * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. - * - * Emits an {Upgraded} event. - */ - function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { - // Upgrades from old implementations will perform a rollback test. This test requires the new - // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing - // this special case will break upgrade paths from old UUPS implementation to new ones. - if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { - _setImplementation(newImplementation); - } else { - try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { - require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); - } catch { - revert("ERC1967Upgrade: new implementation is not UUPS"); - } - _upgradeToAndCall(newImplementation, data, forceCall); - } - } - - /** - * @dev Storage slot with the admin of the contract. - * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is - * validated in the constructor. - */ - bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; - - /** - * @dev Returns the current admin. - */ - function _getAdmin() internal view returns (address) { - return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; - } - - /** - * @dev Stores a new address in the EIP1967 admin slot. - */ - function _setAdmin(address newAdmin) private { - require(newAdmin != address(0), "ERC1967: new admin is the zero address"); - StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; - } - - /** - * @dev Changes the admin of the proxy. - * - * Emits an {AdminChanged} event. - */ - function _changeAdmin(address newAdmin) internal { - emit AdminChanged(_getAdmin(), newAdmin); - _setAdmin(newAdmin); - } - - /** - * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. - * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. - */ - bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; - - /** - * @dev Returns the current beacon. - */ - function _getBeacon() internal view returns (address) { - return StorageSlot.getAddressSlot(_BEACON_SLOT).value; - } - - /** - * @dev Stores a new beacon in the EIP1967 beacon slot. - */ - function _setBeacon(address newBeacon) private { - require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); - require( - Address.isContract(IBeacon(newBeacon).implementation()), - "ERC1967: beacon implementation is not a contract" - ); - StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; - } - - /** - * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does - * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). - * - * Emits a {BeaconUpgraded} event. - */ - function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { - _setBeacon(newBeacon); - emit BeaconUpgraded(newBeacon); - if (data.length > 0 || forceCall) { - Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol deleted file mode 100644 index d217b15e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/BeaconProxy.sol +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol) - -pragma solidity ^0.8.0; - -import "./IBeacon.sol"; -import "../Proxy.sol"; -import "../ERC1967/ERC1967Upgrade.sol"; - -/** - * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. - * - * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't - * conflict with the storage layout of the implementation behind the proxy. - * - * _Available since v3.4._ - */ -contract BeaconProxy is Proxy, ERC1967Upgrade { - /** - * @dev Initializes the proxy with `beacon`. - * - * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This - * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity - * constructor. - * - * Requirements: - * - * - `beacon` must be a contract with the interface {IBeacon}. - */ - constructor(address beacon, bytes memory data) payable { - _upgradeBeaconToAndCall(beacon, data, false); - } - - /** - * @dev Returns the current beacon address. - */ - function _beacon() internal view virtual returns (address) { - return _getBeacon(); - } - - /** - * @dev Returns the current implementation address of the associated beacon. - */ - function _implementation() internal view virtual override returns (address) { - return IBeacon(_getBeacon()).implementation(); - } - - /** - * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}. - * - * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. - * - * Requirements: - * - * - `beacon` must be a contract. - * - The implementation returned by `beacon` must be a contract. - */ - function _setBeacon(address beacon, bytes memory data) internal virtual { - _upgradeBeaconToAndCall(beacon, data, false); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol deleted file mode 100644 index 57153059..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/ProxyAdmin.sol +++ /dev/null @@ -1,81 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol) - -pragma solidity ^0.8.0; - -import "./TransparentUpgradeableProxy.sol"; -import "../../access/Ownable.sol"; - -/** - * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an - * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. - */ -contract ProxyAdmin is Ownable { - /** - * @dev Returns the current implementation of `proxy`. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { - // We need to manually run the static call since the getter cannot be flagged as view - // bytes4(keccak256("implementation()")) == 0x5c60da1b - (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60da1b"); - require(success); - return abi.decode(returndata, (address)); - } - - /** - * @dev Returns the current admin of `proxy`. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { - // We need to manually run the static call since the getter cannot be flagged as view - // bytes4(keccak256("admin()")) == 0xf851a440 - (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); - require(success); - return abi.decode(returndata, (address)); - } - - /** - * @dev Changes the admin of `proxy` to `newAdmin`. - * - * Requirements: - * - * - This contract must be the current admin of `proxy`. - */ - function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner { - proxy.changeAdmin(newAdmin); - } - - /** - * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner { - proxy.upgradeTo(implementation); - } - - /** - * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See - * {TransparentUpgradeableProxy-upgradeToAndCall}. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function upgradeAndCall( - ITransparentUpgradeableProxy proxy, - address implementation, - bytes memory data - ) public payable virtual onlyOwner { - proxy.upgradeToAndCall{value: msg.value}(implementation, data); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol deleted file mode 100644 index 6f18b492..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/transparent/TransparentUpgradeableProxy.sol +++ /dev/null @@ -1,191 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol) - -pragma solidity ^0.8.0; - -import "../ERC1967/ERC1967Proxy.sol"; - -/** - * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy} - * does not implement this interface directly, and some of its functions are implemented by an internal dispatch - * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not - * include them in the ABI so this interface must be used to interact with it. - */ -interface ITransparentUpgradeableProxy is IERC1967 { - function admin() external view returns (address); - - function implementation() external view returns (address); - - function changeAdmin(address) external; - - function upgradeTo(address) external; - - function upgradeToAndCall(address, bytes memory) external payable; -} - -/** - * @dev This contract implements a proxy that is upgradeable by an admin. - * - * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector - * clashing], which can potentially be used in an attack, this contract uses the - * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two - * things that go hand in hand: - * - * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if - * that call matches one of the admin functions exposed by the proxy itself. - * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the - * implementation. If the admin tries to call a function on the implementation it will fail with an error that says - * "admin cannot fallback to proxy target". - * - * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing - * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due - * to sudden errors when trying to call a function from the proxy implementation. - * - * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, - * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy. - * - * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not - * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch - * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to - * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the - * implementation. - * - * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler - * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function - * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could - * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised. - */ -contract TransparentUpgradeableProxy is ERC1967Proxy { - /** - * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and - * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}. - */ - constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) { - _changeAdmin(admin_); - } - - /** - * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin. - * - * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the - * implementation provides a function with the same selector. - */ - modifier ifAdmin() { - if (msg.sender == _getAdmin()) { - _; - } else { - _fallback(); - } - } - - /** - * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior - */ - function _fallback() internal virtual override { - if (msg.sender == _getAdmin()) { - bytes memory ret; - bytes4 selector = msg.sig; - if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) { - ret = _dispatchUpgradeTo(); - } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) { - ret = _dispatchUpgradeToAndCall(); - } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) { - ret = _dispatchChangeAdmin(); - } else if (selector == ITransparentUpgradeableProxy.admin.selector) { - ret = _dispatchAdmin(); - } else if (selector == ITransparentUpgradeableProxy.implementation.selector) { - ret = _dispatchImplementation(); - } else { - revert("TransparentUpgradeableProxy: admin cannot fallback to proxy target"); - } - assembly { - return(add(ret, 0x20), mload(ret)) - } - } else { - super._fallback(); - } - } - - /** - * @dev Returns the current admin. - * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the - * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. - * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` - */ - function _dispatchAdmin() private returns (bytes memory) { - _requireZeroValue(); - - address admin = _getAdmin(); - return abi.encode(admin); - } - - /** - * @dev Returns the current implementation. - * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the - * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. - * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` - */ - function _dispatchImplementation() private returns (bytes memory) { - _requireZeroValue(); - - address implementation = _implementation(); - return abi.encode(implementation); - } - - /** - * @dev Changes the admin of the proxy. - * - * Emits an {AdminChanged} event. - */ - function _dispatchChangeAdmin() private returns (bytes memory) { - _requireZeroValue(); - - address newAdmin = abi.decode(msg.data[4:], (address)); - _changeAdmin(newAdmin); - - return ""; - } - - /** - * @dev Upgrade the implementation of the proxy. - */ - function _dispatchUpgradeTo() private returns (bytes memory) { - _requireZeroValue(); - - address newImplementation = abi.decode(msg.data[4:], (address)); - _upgradeToAndCall(newImplementation, bytes(""), false); - - return ""; - } - - /** - * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified - * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the - * proxied contract. - */ - function _dispatchUpgradeToAndCall() private returns (bytes memory) { - (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes)); - _upgradeToAndCall(newImplementation, data, true); - - return ""; - } - - /** - * @dev Returns the current admin. - * - * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead. - */ - function _admin() internal view virtual returns (address) { - return _getAdmin(); - } - - /** - * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to - * emulate some proxy functions being non-payable while still allowing value to pass through. - */ - function _requireZeroValue() private { - require(msg.value == 0); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol deleted file mode 100644 index 33ec2279..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/Initializable.sol +++ /dev/null @@ -1,166 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) - -pragma solidity ^0.8.2; - -import "../../utils/Address.sol"; - -/** - * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed - * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an - * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer - * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. - * - * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be - * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in - * case an upgrade adds a module that needs to be initialized. - * - * For example: - * - * [.hljs-theme-light.nopadding] - * ```solidity - * contract MyToken is ERC20Upgradeable { - * function initialize() initializer public { - * __ERC20_init("MyToken", "MTK"); - * } - * } - * - * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { - * function initializeV2() reinitializer(2) public { - * __ERC20Permit_init("MyToken"); - * } - * } - * ``` - * - * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as - * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. - * - * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure - * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. - * - * [CAUTION] - * ==== - * Avoid leaving a contract uninitialized. - * - * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation - * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke - * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: - * - * [.hljs-theme-light.nopadding] - * ``` - * /// @custom:oz-upgrades-unsafe-allow constructor - * constructor() { - * _disableInitializers(); - * } - * ``` - * ==== - */ -abstract contract Initializable { - /** - * @dev Indicates that the contract has been initialized. - * @custom:oz-retyped-from bool - */ - uint8 private _initialized; - - /** - * @dev Indicates that the contract is in the process of being initialized. - */ - bool private _initializing; - - /** - * @dev Triggered when the contract has been initialized or reinitialized. - */ - event Initialized(uint8 version); - - /** - * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, - * `onlyInitializing` functions can be used to initialize parent contracts. - * - * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a - * constructor. - * - * Emits an {Initialized} event. - */ - modifier initializer() { - bool isTopLevelCall = !_initializing; - require( - (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1), - "Initializable: contract is already initialized" - ); - _initialized = 1; - if (isTopLevelCall) { - _initializing = true; - } - _; - if (isTopLevelCall) { - _initializing = false; - emit Initialized(1); - } - } - - /** - * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the - * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be - * used to initialize parent contracts. - * - * A reinitializer may be used after the original initialization step. This is essential to configure modules that - * are added through upgrades and that require initialization. - * - * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` - * cannot be nested. If one is invoked in the context of another, execution will revert. - * - * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in - * a contract, executing them in the right order is up to the developer or operator. - * - * WARNING: setting the version to 255 will prevent any future reinitialization. - * - * Emits an {Initialized} event. - */ - modifier reinitializer(uint8 version) { - require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); - _initialized = version; - _initializing = true; - _; - _initializing = false; - emit Initialized(version); - } - - /** - * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the - * {initializer} and {reinitializer} modifiers, directly or indirectly. - */ - modifier onlyInitializing() { - require(_initializing, "Initializable: contract is not initializing"); - _; - } - - /** - * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. - * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized - * to any version. It is recommended to use this to lock implementation contracts that are designed to be called - * through proxies. - * - * Emits an {Initialized} event the first time it is successfully executed. - */ - function _disableInitializers() internal virtual { - require(!_initializing, "Initializable: contract is initializing"); - if (_initialized != type(uint8).max) { - _initialized = type(uint8).max; - emit Initialized(type(uint8).max); - } - } - - /** - * @dev Returns the highest version that has been initialized. See {reinitializer}. - */ - function _getInitializedVersion() internal view returns (uint8) { - return _initialized; - } - - /** - * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. - */ - function _isInitializing() internal view returns (bool) { - return _initializing; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol b/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol deleted file mode 100644 index 86684cfc..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/utils/UUPSUpgradeable.sol +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) - -pragma solidity ^0.8.0; - -import "../../interfaces/draft-IERC1822.sol"; -import "../ERC1967/ERC1967Upgrade.sol"; - -/** - * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an - * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. - * - * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is - * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing - * `UUPSUpgradeable` with a custom implementation of upgrades. - * - * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. - * - * _Available since v4.1._ - */ -abstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment - address private immutable __self = address(this); - - /** - * @dev Check that the execution is being performed through a delegatecall call and that the execution context is - * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case - * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a - * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to - * fail. - */ - modifier onlyProxy() { - require(address(this) != __self, "Function must be called through delegatecall"); - require(_getImplementation() == __self, "Function must be called through active proxy"); - _; - } - - /** - * @dev Check that the execution is not being performed through a delegate call. This allows a function to be - * callable on the implementing contract but not through proxies. - */ - modifier notDelegated() { - require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); - _; - } - - /** - * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the - * implementation. It is used to validate the implementation's compatibility when performing an upgrade. - * - * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks - * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this - * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. - */ - function proxiableUUID() external view virtual override notDelegated returns (bytes32) { - return _IMPLEMENTATION_SLOT; - } - - /** - * @dev Upgrade the implementation of the proxy to `newImplementation`. - * - * Calls {_authorizeUpgrade}. - * - * Emits an {Upgraded} event. - * - * @custom:oz-upgrades-unsafe-allow-reachable delegatecall - */ - function upgradeTo(address newImplementation) public virtual onlyProxy { - _authorizeUpgrade(newImplementation); - _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); - } - - /** - * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call - * encoded in `data`. - * - * Calls {_authorizeUpgrade}. - * - * Emits an {Upgraded} event. - * - * @custom:oz-upgrades-unsafe-allow-reachable delegatecall - */ - function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { - _authorizeUpgrade(newImplementation); - _upgradeToAndCallUUPS(newImplementation, data, true); - } - - /** - * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by - * {upgradeTo} and {upgradeToAndCall}. - * - * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. - * - * ```solidity - * function _authorizeUpgrade(address) internal override onlyOwner {} - * ``` - */ - function _authorizeUpgrade(address newImplementation) internal virtual; -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol b/dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol deleted file mode 100644 index 65b4980f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/security/PullPayment.sol +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (security/PullPayment.sol) - -pragma solidity ^0.8.0; - -import "../utils/escrow/Escrow.sol"; - -/** - * @dev Simple implementation of a - * https://consensys.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/#favor-pull-over-push-for-external-calls[pull-payment] - * strategy, where the paying contract doesn't interact directly with the - * receiver account, which must withdraw its payments itself. - * - * Pull-payments are often considered the best practice when it comes to sending - * Ether, security-wise. It prevents recipients from blocking execution, and - * eliminates reentrancy concerns. - * - * TIP: If you would like to learn more about reentrancy and alternative ways - * to protect against it, check out our blog post - * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. - * - * To use, derive from the `PullPayment` contract, and use {_asyncTransfer} - * instead of Solidity's `transfer` function. Payees can query their due - * payments with {payments}, and retrieve them with {withdrawPayments}. - */ -abstract contract PullPayment { - Escrow private immutable _escrow; - - constructor() { - _escrow = new Escrow(); - } - - /** - * @dev Withdraw accumulated payments, forwarding all gas to the recipient. - * - * Note that _any_ account can call this function, not just the `payee`. - * This means that contracts unaware of the `PullPayment` protocol can still - * receive funds this way, by having a separate account call - * {withdrawPayments}. - * - * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. - * Make sure you trust the recipient, or are either following the - * checks-effects-interactions pattern or using {ReentrancyGuard}. - * - * @param payee Whose payments will be withdrawn. - * - * Causes the `escrow` to emit a {Withdrawn} event. - */ - function withdrawPayments(address payable payee) public virtual { - _escrow.withdraw(payee); - } - - /** - * @dev Returns the payments owed to an address. - * @param dest The creditor's address. - */ - function payments(address dest) public view returns (uint256) { - return _escrow.depositsOf(dest); - } - - /** - * @dev Called by the payer to store the sent amount as credit to be pulled. - * Funds sent in this way are stored in an intermediate {Escrow} contract, so - * there is no danger of them being spent before withdrawal. - * - * @param dest The destination address of the funds. - * @param amount The amount to transfer. - * - * Causes the `escrow` to emit a {Deposited} event. - */ - function _asyncTransfer(address dest, uint256 amount) internal virtual { - _escrow.deposit{value: amount}(dest); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol deleted file mode 100644 index 6260e4ce..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/ERC1155.sol +++ /dev/null @@ -1,497 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol) - -pragma solidity ^0.8.0; - -import "./IERC1155.sol"; -import "./IERC1155Receiver.sol"; -import "./extensions/IERC1155MetadataURI.sol"; -import "../../utils/Address.sol"; -import "../../utils/Context.sol"; -import "../../utils/introspection/ERC165.sol"; - -/** - * @dev Implementation of the basic standard multi-token. - * See https://eips.ethereum.org/EIPS/eip-1155 - * Originally based on code by Enjin: https://github.com/enjin/erc-1155 - * - * _Available since v3.1._ - */ -contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { - using Address for address; - - // Mapping from token ID to account balances - mapping(uint256 => mapping(address => uint256)) private _balances; - - // Mapping from account to operator approvals - mapping(address => mapping(address => bool)) private _operatorApprovals; - - // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json - string private _uri; - - /** - * @dev See {_setURI}. - */ - constructor(string memory uri_) { - _setURI(uri_); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { - return - interfaceId == type(IERC1155).interfaceId || - interfaceId == type(IERC1155MetadataURI).interfaceId || - super.supportsInterface(interfaceId); - } - - /** - * @dev See {IERC1155MetadataURI-uri}. - * - * This implementation returns the same URI for *all* token types. It relies - * on the token type ID substitution mechanism - * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. - * - * Clients calling this function must replace the `\{id\}` substring with the - * actual token type ID. - */ - function uri(uint256) public view virtual override returns (string memory) { - return _uri; - } - - /** - * @dev See {IERC1155-balanceOf}. - * - * Requirements: - * - * - `account` cannot be the zero address. - */ - function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { - require(account != address(0), "ERC1155: address zero is not a valid owner"); - return _balances[id][account]; - } - - /** - * @dev See {IERC1155-balanceOfBatch}. - * - * Requirements: - * - * - `accounts` and `ids` must have the same length. - */ - function balanceOfBatch( - address[] memory accounts, - uint256[] memory ids - ) public view virtual override returns (uint256[] memory) { - require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); - - uint256[] memory batchBalances = new uint256[](accounts.length); - - for (uint256 i = 0; i < accounts.length; ++i) { - batchBalances[i] = balanceOf(accounts[i], ids[i]); - } - - return batchBalances; - } - - /** - * @dev See {IERC1155-setApprovalForAll}. - */ - function setApprovalForAll(address operator, bool approved) public virtual override { - _setApprovalForAll(_msgSender(), operator, approved); - } - - /** - * @dev See {IERC1155-isApprovedForAll}. - */ - function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { - return _operatorApprovals[account][operator]; - } - - /** - * @dev See {IERC1155-safeTransferFrom}. - */ - function safeTransferFrom( - address from, - address to, - uint256 id, - uint256 amount, - bytes memory data - ) public virtual override { - require( - from == _msgSender() || isApprovedForAll(from, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); - _safeTransferFrom(from, to, id, amount, data); - } - - /** - * @dev See {IERC1155-safeBatchTransferFrom}. - */ - function safeBatchTransferFrom( - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) public virtual override { - require( - from == _msgSender() || isApprovedForAll(from, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); - _safeBatchTransferFrom(from, to, ids, amounts, data); - } - - /** - * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. - * - * Emits a {TransferSingle} event. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - `from` must have a balance of tokens of type `id` of at least `amount`. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the - * acceptance magic value. - */ - function _safeTransferFrom( - address from, - address to, - uint256 id, - uint256 amount, - bytes memory data - ) internal virtual { - require(to != address(0), "ERC1155: transfer to the zero address"); - - address operator = _msgSender(); - uint256[] memory ids = _asSingletonArray(id); - uint256[] memory amounts = _asSingletonArray(amount); - - _beforeTokenTransfer(operator, from, to, ids, amounts, data); - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - _balances[id][to] += amount; - - emit TransferSingle(operator, from, to, id, amount); - - _afterTokenTransfer(operator, from, to, ids, amounts, data); - - _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. - * - * Emits a {TransferBatch} event. - * - * Requirements: - * - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the - * acceptance magic value. - */ - function _safeBatchTransferFrom( - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual { - require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); - require(to != address(0), "ERC1155: transfer to the zero address"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, from, to, ids, amounts, data); - - for (uint256 i = 0; i < ids.length; ++i) { - uint256 id = ids[i]; - uint256 amount = amounts[i]; - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - _balances[id][to] += amount; - } - - emit TransferBatch(operator, from, to, ids, amounts); - - _afterTokenTransfer(operator, from, to, ids, amounts, data); - - _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); - } - - /** - * @dev Sets a new URI for all token types, by relying on the token type ID - * substitution mechanism - * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. - * - * By this mechanism, any occurrence of the `\{id\}` substring in either the - * URI or any of the amounts in the JSON file at said URI will be replaced by - * clients with the token type ID. - * - * For example, the `https://token-cdn-domain/\{id\}.json` URI would be - * interpreted by clients as - * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` - * for token type ID 0x4cce0. - * - * See {uri}. - * - * Because these URIs cannot be meaningfully represented by the {URI} event, - * this function emits no events. - */ - function _setURI(string memory newuri) internal virtual { - _uri = newuri; - } - - /** - * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. - * - * Emits a {TransferSingle} event. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the - * acceptance magic value. - */ - function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { - require(to != address(0), "ERC1155: mint to the zero address"); - - address operator = _msgSender(); - uint256[] memory ids = _asSingletonArray(id); - uint256[] memory amounts = _asSingletonArray(amount); - - _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); - - _balances[id][to] += amount; - emit TransferSingle(operator, address(0), to, id, amount); - - _afterTokenTransfer(operator, address(0), to, ids, amounts, data); - - _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. - * - * Emits a {TransferBatch} event. - * - * Requirements: - * - * - `ids` and `amounts` must have the same length. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the - * acceptance magic value. - */ - function _mintBatch( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual { - require(to != address(0), "ERC1155: mint to the zero address"); - require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); - - for (uint256 i = 0; i < ids.length; i++) { - _balances[ids[i]][to] += amounts[i]; - } - - emit TransferBatch(operator, address(0), to, ids, amounts); - - _afterTokenTransfer(operator, address(0), to, ids, amounts, data); - - _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); - } - - /** - * @dev Destroys `amount` tokens of token type `id` from `from` - * - * Emits a {TransferSingle} event. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `from` must have at least `amount` tokens of token type `id`. - */ - function _burn(address from, uint256 id, uint256 amount) internal virtual { - require(from != address(0), "ERC1155: burn from the zero address"); - - address operator = _msgSender(); - uint256[] memory ids = _asSingletonArray(id); - uint256[] memory amounts = _asSingletonArray(amount); - - _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - - emit TransferSingle(operator, from, address(0), id, amount); - - _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. - * - * Emits a {TransferBatch} event. - * - * Requirements: - * - * - `ids` and `amounts` must have the same length. - */ - function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { - require(from != address(0), "ERC1155: burn from the zero address"); - require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); - - for (uint256 i = 0; i < ids.length; i++) { - uint256 id = ids[i]; - uint256 amount = amounts[i]; - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - } - - emit TransferBatch(operator, from, address(0), ids, amounts); - - _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); - } - - /** - * @dev Approve `operator` to operate on all of `owner` tokens - * - * Emits an {ApprovalForAll} event. - */ - function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { - require(owner != operator, "ERC1155: setting approval status for self"); - _operatorApprovals[owner][operator] = approved; - emit ApprovalForAll(owner, operator, approved); - } - - /** - * @dev Hook that is called before any token transfer. This includes minting - * and burning, as well as batched variants. - * - * The same hook is called on both single and batched variants. For single - * transfers, the length of the `ids` and `amounts` arrays will be 1. - * - * Calling conditions (for each `id` and `amount` pair): - * - * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * of token type `id` will be transferred to `to`. - * - When `from` is zero, `amount` tokens of token type `id` will be minted - * for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` - * will be burned. - * - `from` and `to` are never both zero. - * - `ids` and `amounts` have the same, non-zero length. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual {} - - /** - * @dev Hook that is called after any token transfer. This includes minting - * and burning, as well as batched variants. - * - * The same hook is called on both single and batched variants. For single - * transfers, the length of the `id` and `amount` arrays will be 1. - * - * Calling conditions (for each `id` and `amount` pair): - * - * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * of token type `id` will be transferred to `to`. - * - When `from` is zero, `amount` tokens of token type `id` will be minted - * for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` - * will be burned. - * - `from` and `to` are never both zero. - * - `ids` and `amounts` have the same, non-zero length. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _afterTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual {} - - function _doSafeTransferAcceptanceCheck( - address operator, - address from, - address to, - uint256 id, - uint256 amount, - bytes memory data - ) private { - if (to.isContract()) { - try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { - if (response != IERC1155Receiver.onERC1155Received.selector) { - revert("ERC1155: ERC1155Receiver rejected tokens"); - } - } catch Error(string memory reason) { - revert(reason); - } catch { - revert("ERC1155: transfer to non-ERC1155Receiver implementer"); - } - } - } - - function _doSafeBatchTransferAcceptanceCheck( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) private { - if (to.isContract()) { - try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( - bytes4 response - ) { - if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { - revert("ERC1155: ERC1155Receiver rejected tokens"); - } - } catch Error(string memory reason) { - revert(reason); - } catch { - revert("ERC1155: transfer to non-ERC1155Receiver implementer"); - } - } - } - - function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { - uint256[] memory array = new uint256[](1); - array[0] = element; - - return array; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol deleted file mode 100644 index ec24389a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Supply.sol +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) - -pragma solidity ^0.8.0; - -import "../ERC1155.sol"; - -/** - * @dev Extension of ERC1155 that adds tracking of total supply per id. - * - * Useful for scenarios where Fungible and Non-fungible tokens have to be - * clearly identified. Note: While a totalSupply of 1 might mean the - * corresponding is an NFT, there is no guarantees that no other token with the - * same id are not going to be minted. - */ -abstract contract ERC1155Supply is ERC1155 { - mapping(uint256 => uint256) private _totalSupply; - - /** - * @dev Total amount of tokens in with a given id. - */ - function totalSupply(uint256 id) public view virtual returns (uint256) { - return _totalSupply[id]; - } - - /** - * @dev Indicates whether any token exist with a given id, or not. - */ - function exists(uint256 id) public view virtual returns (bool) { - return ERC1155Supply.totalSupply(id) > 0; - } - - /** - * @dev See {ERC1155-_beforeTokenTransfer}. - */ - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual override { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - - if (from == address(0)) { - for (uint256 i = 0; i < ids.length; ++i) { - _totalSupply[ids[i]] += amounts[i]; - } - } - - if (to == address(0)) { - for (uint256 i = 0; i < ids.length; ++i) { - uint256 id = ids[i]; - uint256 amount = amounts[i]; - uint256 supply = _totalSupply[id]; - require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); - unchecked { - _totalSupply[id] = supply - amount; - } - } - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol deleted file mode 100644 index 2f68dcaf..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauser.sol +++ /dev/null @@ -1,114 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol) - -pragma solidity ^0.8.0; - -import "../ERC1155.sol"; -import "../extensions/ERC1155Burnable.sol"; -import "../extensions/ERC1155Pausable.sol"; -import "../../../access/AccessControlEnumerable.sol"; -import "../../../utils/Context.sol"; - -/** - * @dev {ERC1155} token, including: - * - * - ability for holders to burn (destroy) their tokens - * - a minter role that allows for token minting (creation) - * - a pauser role that allows to stop all token transfers - * - * This contract uses {AccessControl} to lock permissioned functions using the - * different roles - head to its documentation for details. - * - * The account that deploys the contract will be granted the minter and pauser - * roles, as well as the default admin role, which will let it grant both minter - * and pauser roles to other accounts. - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable { - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); - - /** - * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that - * deploys the contract. - */ - constructor(string memory uri) ERC1155(uri) { - _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); - - _setupRole(MINTER_ROLE, _msgSender()); - _setupRole(PAUSER_ROLE, _msgSender()); - } - - /** - * @dev Creates `amount` new tokens for `to`, of token type `id`. - * - * See {ERC1155-_mint}. - * - * Requirements: - * - * - the caller must have the `MINTER_ROLE`. - */ - function mint(address to, uint256 id, uint256 amount, bytes memory data) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); - - _mint(to, id, amount, data); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}. - */ - function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); - - _mintBatch(to, ids, amounts, data); - } - - /** - * @dev Pauses all token transfers. - * - * See {ERC1155Pausable} and {Pausable-_pause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function pause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to pause"); - _pause(); - } - - /** - * @dev Unpauses all token transfers. - * - * See {ERC1155Pausable} and {Pausable-_unpause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function unpause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to unpause"); - _unpause(); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface( - bytes4 interfaceId - ) public view virtual override(AccessControlEnumerable, ERC1155) returns (bool) { - return super.supportsInterface(interfaceId); - } - - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual override(ERC1155, ERC1155Pausable) { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol deleted file mode 100644 index 2e6804a2..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Receiver.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) - -pragma solidity ^0.8.0; - -import "../IERC1155Receiver.sol"; -import "../../../utils/introspection/ERC165.sol"; - -/** - * @dev _Available since v3.1._ - */ -abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { - return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol deleted file mode 100644 index 91b7f98f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/ERC20.sol +++ /dev/null @@ -1,365 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) - -pragma solidity ^0.8.0; - -import "./IERC20.sol"; -import "./extensions/IERC20Metadata.sol"; -import "../../utils/Context.sol"; - -/** - * @dev Implementation of the {IERC20} interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using {_mint}. - * For a generic mechanism see {ERC20PresetMinterPauser}. - * - * TIP: For a detailed writeup see our guide - * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How - * to implement supply mechanisms]. - * - * The default value of {decimals} is 18. To change this, you should override - * this function so it returns a different value. - * - * We have followed general OpenZeppelin Contracts guidelines: functions revert - * instead returning `false` on failure. This behavior is nonetheless - * conventional and does not conflict with the expectations of ERC20 - * applications. - * - * Additionally, an {Approval} event is emitted on calls to {transferFrom}. - * This allows applications to reconstruct the allowance for all accounts just - * by listening to said events. Other implementations of the EIP may not emit - * these events, as it isn't required by the specification. - * - * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} - * functions have been added to mitigate the well-known issues around setting - * allowances. See {IERC20-approve}. - */ -contract ERC20 is Context, IERC20, IERC20Metadata { - mapping(address => uint256) private _balances; - - mapping(address => mapping(address => uint256)) private _allowances; - - uint256 private _totalSupply; - - string private _name; - string private _symbol; - - /** - * @dev Sets the values for {name} and {symbol}. - * - * All two of these values are immutable: they can only be set once during - * construction. - */ - constructor(string memory name_, string memory symbol_) { - _name = name_; - _symbol = symbol_; - } - - /** - * @dev Returns the name of the token. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev Returns the symbol of the token, usually a shorter version of the - * name. - */ - function symbol() public view virtual override returns (string memory) { - return _symbol; - } - - /** - * @dev Returns the number of decimals used to get its user representation. - * For example, if `decimals` equals `2`, a balance of `505` tokens should - * be displayed to a user as `5.05` (`505 / 10 ** 2`). - * - * Tokens usually opt for a value of 18, imitating the relationship between - * Ether and Wei. This is the default value returned by this function, unless - * it's overridden. - * - * NOTE: This information is only used for _display_ purposes: it in - * no way affects any of the arithmetic of the contract, including - * {IERC20-balanceOf} and {IERC20-transfer}. - */ - function decimals() public view virtual override returns (uint8) { - return 18; - } - - /** - * @dev See {IERC20-totalSupply}. - */ - function totalSupply() public view virtual override returns (uint256) { - return _totalSupply; - } - - /** - * @dev See {IERC20-balanceOf}. - */ - function balanceOf(address account) public view virtual override returns (uint256) { - return _balances[account]; - } - - /** - * @dev See {IERC20-transfer}. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - the caller must have a balance of at least `amount`. - */ - function transfer(address to, uint256 amount) public virtual override returns (bool) { - address owner = _msgSender(); - _transfer(owner, to, amount); - return true; - } - - /** - * @dev See {IERC20-allowance}. - */ - function allowance(address owner, address spender) public view virtual override returns (uint256) { - return _allowances[owner][spender]; - } - - /** - * @dev See {IERC20-approve}. - * - * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on - * `transferFrom`. This is semantically equivalent to an infinite approval. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function approve(address spender, uint256 amount) public virtual override returns (bool) { - address owner = _msgSender(); - _approve(owner, spender, amount); - return true; - } - - /** - * @dev See {IERC20-transferFrom}. - * - * Emits an {Approval} event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of {ERC20}. - * - * NOTE: Does not update the allowance if the current allowance - * is the maximum `uint256`. - * - * Requirements: - * - * - `from` and `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - * - the caller must have allowance for ``from``'s tokens of at least - * `amount`. - */ - function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { - address spender = _msgSender(); - _spendAllowance(from, spender, amount); - _transfer(from, to, amount); - return true; - } - - /** - * @dev Atomically increases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { - address owner = _msgSender(); - _approve(owner, spender, allowance(owner, spender) + addedValue); - return true; - } - - /** - * @dev Atomically decreases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `spender` must have allowance for the caller of at least - * `subtractedValue`. - */ - function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { - address owner = _msgSender(); - uint256 currentAllowance = allowance(owner, spender); - require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); - unchecked { - _approve(owner, spender, currentAllowance - subtractedValue); - } - - return true; - } - - /** - * @dev Moves `amount` of tokens from `from` to `to`. - * - * This internal function is equivalent to {transfer}, and can be used to - * e.g. implement automatic token fees, slashing mechanisms, etc. - * - * Emits a {Transfer} event. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - */ - function _transfer(address from, address to, uint256 amount) internal virtual { - require(from != address(0), "ERC20: transfer from the zero address"); - require(to != address(0), "ERC20: transfer to the zero address"); - - _beforeTokenTransfer(from, to, amount); - - uint256 fromBalance = _balances[from]; - require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); - unchecked { - _balances[from] = fromBalance - amount; - // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by - // decrementing then incrementing. - _balances[to] += amount; - } - - emit Transfer(from, to, amount); - - _afterTokenTransfer(from, to, amount); - } - - /** @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * Emits a {Transfer} event with `from` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - */ - function _mint(address account, uint256 amount) internal virtual { - require(account != address(0), "ERC20: mint to the zero address"); - - _beforeTokenTransfer(address(0), account, amount); - - _totalSupply += amount; - unchecked { - // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. - _balances[account] += amount; - } - emit Transfer(address(0), account, amount); - - _afterTokenTransfer(address(0), account, amount); - } - - /** - * @dev Destroys `amount` tokens from `account`, reducing the - * total supply. - * - * Emits a {Transfer} event with `to` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - * - `account` must have at least `amount` tokens. - */ - function _burn(address account, uint256 amount) internal virtual { - require(account != address(0), "ERC20: burn from the zero address"); - - _beforeTokenTransfer(account, address(0), amount); - - uint256 accountBalance = _balances[account]; - require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); - unchecked { - _balances[account] = accountBalance - amount; - // Overflow not possible: amount <= accountBalance <= totalSupply. - _totalSupply -= amount; - } - - emit Transfer(account, address(0), amount); - - _afterTokenTransfer(account, address(0), amount); - } - - /** - * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. - * - * This internal function is equivalent to `approve`, and can be used to - * e.g. set automatic allowances for certain subsystems, etc. - * - * Emits an {Approval} event. - * - * Requirements: - * - * - `owner` cannot be the zero address. - * - `spender` cannot be the zero address. - */ - function _approve(address owner, address spender, uint256 amount) internal virtual { - require(owner != address(0), "ERC20: approve from the zero address"); - require(spender != address(0), "ERC20: approve to the zero address"); - - _allowances[owner][spender] = amount; - emit Approval(owner, spender, amount); - } - - /** - * @dev Updates `owner` s allowance for `spender` based on spent `amount`. - * - * Does not update the allowance amount in case of infinite allowance. - * Revert if not enough allowance is available. - * - * Might emit an {Approval} event. - */ - function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { - uint256 currentAllowance = allowance(owner, spender); - if (currentAllowance != type(uint256).max) { - require(currentAllowance >= amount, "ERC20: insufficient allowance"); - unchecked { - _approve(owner, spender, currentAllowance - amount); - } - } - } - - /** - * @dev Hook that is called before any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * will be transferred to `to`. - * - when `from` is zero, `amount` tokens will be minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} - - /** - * @dev Hook that is called after any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * has been transferred to `to`. - * - when `from` is zero, `amount` tokens have been minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens have been burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol deleted file mode 100644 index 1cd08ee8..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Burnable.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) - -pragma solidity ^0.8.0; - -import "../ERC20.sol"; -import "../../../utils/Context.sol"; - -/** - * @dev Extension of {ERC20} that allows token holders to destroy both their own - * tokens and those that they have an allowance for, in a way that can be - * recognized off-chain (via event analysis). - */ -abstract contract ERC20Burnable is Context, ERC20 { - /** - * @dev Destroys `amount` tokens from the caller. - * - * See {ERC20-_burn}. - */ - function burn(uint256 amount) public virtual { - _burn(_msgSender(), amount); - } - - /** - * @dev Destroys `amount` tokens from `account`, deducting from the caller's - * allowance. - * - * See {ERC20-_burn} and {ERC20-allowance}. - * - * Requirements: - * - * - the caller must have allowance for ``accounts``'s tokens of at least - * `amount`. - */ - function burnFrom(address account, uint256 amount) public virtual { - _spendAllowance(account, _msgSender(), amount); - _burn(account, amount); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol deleted file mode 100644 index 16f830d1..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Capped.sol +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) - -pragma solidity ^0.8.0; - -import "../ERC20.sol"; - -/** - * @dev Extension of {ERC20} that adds a cap to the supply of tokens. - */ -abstract contract ERC20Capped is ERC20 { - uint256 private immutable _cap; - - /** - * @dev Sets the value of the `cap`. This value is immutable, it can only be - * set once during construction. - */ - constructor(uint256 cap_) { - require(cap_ > 0, "ERC20Capped: cap is 0"); - _cap = cap_; - } - - /** - * @dev Returns the cap on the token's total supply. - */ - function cap() public view virtual returns (uint256) { - return _cap; - } - - /** - * @dev See {ERC20-_mint}. - */ - function _mint(address account, uint256 amount) internal virtual override { - require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded"); - super._mint(account, amount); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol deleted file mode 100644 index 4a83b96e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Permit.sol +++ /dev/null @@ -1,95 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol) - -pragma solidity ^0.8.0; - -import "./IERC20Permit.sol"; -import "../ERC20.sol"; -import "../../../utils/cryptography/ECDSA.sol"; -import "../../../utils/cryptography/EIP712.sol"; -import "../../../utils/Counters.sol"; - -/** - * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in - * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. - * - * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by - * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't - * need to send a transaction, and thus is not required to hold Ether at all. - * - * _Available since v3.4._ - */ -abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { - using Counters for Counters.Counter; - - mapping(address => Counters.Counter) private _nonces; - - // solhint-disable-next-line var-name-mixedcase - bytes32 private constant _PERMIT_TYPEHASH = - keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); - /** - * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. - * However, to ensure consistency with the upgradeable transpiler, we will continue - * to reserve a slot. - * @custom:oz-renamed-from _PERMIT_TYPEHASH - */ - // solhint-disable-next-line var-name-mixedcase - bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; - - /** - * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. - * - * It's a good idea to use the same `name` that is defined as the ERC20 token name. - */ - constructor(string memory name) EIP712(name, "1") {} - - /** - * @inheritdoc IERC20Permit - */ - function permit( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override { - require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); - - bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); - - bytes32 hash = _hashTypedDataV4(structHash); - - address signer = ECDSA.recover(hash, v, r, s); - require(signer == owner, "ERC20Permit: invalid signature"); - - _approve(owner, spender, value); - } - - /** - * @inheritdoc IERC20Permit - */ - function nonces(address owner) public view virtual override returns (uint256) { - return _nonces[owner].current(); - } - - /** - * @inheritdoc IERC20Permit - */ - // solhint-disable-next-line func-name-mixedcase - function DOMAIN_SEPARATOR() external view override returns (bytes32) { - return _domainSeparatorV4(); - } - - /** - * @dev "Consume a nonce": return the current value and increment. - * - * _Available since v4.1._ - */ - function _useNonce(address owner) internal virtual returns (uint256 current) { - Counters.Counter storage nonce = _nonces[owner]; - current = nonce.current(); - nonce.increment(); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol deleted file mode 100644 index 504e7a92..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Snapshot.sol +++ /dev/null @@ -1,191 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Snapshot.sol) - -pragma solidity ^0.8.0; - -import "../ERC20.sol"; -import "../../../utils/Arrays.sol"; -import "../../../utils/Counters.sol"; - -/** - * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and - * total supply at the time are recorded for later access. - * - * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. - * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different - * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be - * used to create an efficient ERC20 forking mechanism. - * - * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a - * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot - * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id - * and the account address. - * - * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it - * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this - * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract. - * - * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient - * alternative consider {ERC20Votes}. - * - * ==== Gas Costs - * - * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log - * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much - * smaller since identical balances in subsequent snapshots are stored as a single entry. - * - * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is - * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent - * transfers will have normal cost until the next snapshot, and so on. - */ - -abstract contract ERC20Snapshot is ERC20 { - // Inspired by Jordi Baylina's MiniMeToken to record historical balances: - // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol - - using Arrays for uint256[]; - using Counters for Counters.Counter; - - // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a - // Snapshot struct, but that would impede usage of functions that work on an array. - struct Snapshots { - uint256[] ids; - uint256[] values; - } - - mapping(address => Snapshots) private _accountBalanceSnapshots; - Snapshots private _totalSupplySnapshots; - - // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. - Counters.Counter private _currentSnapshotId; - - /** - * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. - */ - event Snapshot(uint256 id); - - /** - * @dev Creates a new snapshot and returns its snapshot id. - * - * Emits a {Snapshot} event that contains the same id. - * - * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a - * set of accounts, for example using {AccessControl}, or it may be open to the public. - * - * [WARNING] - * ==== - * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, - * you must consider that it can potentially be used by attackers in two ways. - * - * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow - * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target - * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs - * section above. - * - * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. - * ==== - */ - function _snapshot() internal virtual returns (uint256) { - _currentSnapshotId.increment(); - - uint256 currentId = _getCurrentSnapshotId(); - emit Snapshot(currentId); - return currentId; - } - - /** - * @dev Get the current snapshotId - */ - function _getCurrentSnapshotId() internal view virtual returns (uint256) { - return _currentSnapshotId.current(); - } - - /** - * @dev Retrieves the balance of `account` at the time `snapshotId` was created. - */ - function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) { - (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); - - return snapshotted ? value : balanceOf(account); - } - - /** - * @dev Retrieves the total supply at the time `snapshotId` was created. - */ - function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) { - (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); - - return snapshotted ? value : totalSupply(); - } - - // Update balance and/or total supply snapshots before the values are modified. This is implemented - // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. - function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { - super._beforeTokenTransfer(from, to, amount); - - if (from == address(0)) { - // mint - _updateAccountSnapshot(to); - _updateTotalSupplySnapshot(); - } else if (to == address(0)) { - // burn - _updateAccountSnapshot(from); - _updateTotalSupplySnapshot(); - } else { - // transfer - _updateAccountSnapshot(from); - _updateAccountSnapshot(to); - } - } - - function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { - require(snapshotId > 0, "ERC20Snapshot: id is 0"); - require(snapshotId <= _getCurrentSnapshotId(), "ERC20Snapshot: nonexistent id"); - - // When a valid snapshot is queried, there are three possibilities: - // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never - // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds - // to this id is the current one. - // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the - // requested id, and its value is the one to return. - // c) More snapshots were created after the requested one, and the queried value was later modified. There will be - // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is - // larger than the requested one. - // - // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if - // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does - // exactly this. - - uint256 index = snapshots.ids.findUpperBound(snapshotId); - - if (index == snapshots.ids.length) { - return (false, 0); - } else { - return (true, snapshots.values[index]); - } - } - - function _updateAccountSnapshot(address account) private { - _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); - } - - function _updateTotalSupplySnapshot() private { - _updateSnapshot(_totalSupplySnapshots, totalSupply()); - } - - function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { - uint256 currentId = _getCurrentSnapshotId(); - if (_lastSnapshotId(snapshots.ids) < currentId) { - snapshots.ids.push(currentId); - snapshots.values.push(currentValue); - } - } - - function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { - if (ids.length == 0) { - return 0; - } else { - return ids[ids.length - 1]; - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol deleted file mode 100644 index 8b31fda6..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Votes.sol +++ /dev/null @@ -1,290 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol) - -pragma solidity ^0.8.0; - -import "./ERC20Permit.sol"; -import "../../../interfaces/IERC5805.sol"; -import "../../../utils/math/Math.sol"; -import "../../../utils/math/SafeCast.sol"; -import "../../../utils/cryptography/ECDSA.sol"; - -/** - * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, - * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. - * - * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module. - * - * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either - * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting - * power can be queried through the public accessors {getVotes} and {getPastVotes}. - * - * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it - * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. - * - * _Available since v4.2._ - */ -abstract contract ERC20Votes is ERC20Permit, IERC5805 { - struct Checkpoint { - uint32 fromBlock; - uint224 votes; - } - - bytes32 private constant _DELEGATION_TYPEHASH = - keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); - - mapping(address => address) private _delegates; - mapping(address => Checkpoint[]) private _checkpoints; - Checkpoint[] private _totalSupplyCheckpoints; - - /** - * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). - */ - function clock() public view virtual override returns (uint48) { - return SafeCast.toUint48(block.number); - } - - /** - * @dev Description of the clock - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory) { - // Check that the clock was not modified - require(clock() == block.number, "ERC20Votes: broken clock mode"); - return "mode=blocknumber&from=default"; - } - - /** - * @dev Get the `pos`-th checkpoint for `account`. - */ - function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) { - return _checkpoints[account][pos]; - } - - /** - * @dev Get number of checkpoints for `account`. - */ - function numCheckpoints(address account) public view virtual returns (uint32) { - return SafeCast.toUint32(_checkpoints[account].length); - } - - /** - * @dev Get the address `account` is currently delegating to. - */ - function delegates(address account) public view virtual override returns (address) { - return _delegates[account]; - } - - /** - * @dev Gets the current votes balance for `account` - */ - function getVotes(address account) public view virtual override returns (uint256) { - uint256 pos = _checkpoints[account].length; - unchecked { - return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes; - } - } - - /** - * @dev Retrieve the number of votes for `account` at the end of `timepoint`. - * - * Requirements: - * - * - `timepoint` must be in the past - */ - function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "ERC20Votes: future lookup"); - return _checkpointsLookup(_checkpoints[account], timepoint); - } - - /** - * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. - * It is NOT the sum of all the delegated votes! - * - * Requirements: - * - * - `timepoint` must be in the past - */ - function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "ERC20Votes: future lookup"); - return _checkpointsLookup(_totalSupplyCheckpoints, timepoint); - } - - /** - * @dev Lookup a value in a list of (sorted) checkpoints. - */ - function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 timepoint) private view returns (uint256) { - // We run a binary search to look for the last (most recent) checkpoint taken before (or at) `timepoint`. - // - // Initially we check if the block is recent to narrow the search range. - // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). - // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. - // - If the middle checkpoint is after `timepoint`, we look in [low, mid) - // - If the middle checkpoint is before or equal to `timepoint`, we look in [mid+1, high) - // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not - // out of bounds (in which case we're looking too far in the past and the result is 0). - // Note that if the latest checkpoint available is exactly for `timepoint`, we end up with an index that is - // past the end of the array, so we technically don't find a checkpoint after `timepoint`, but it works out - // the same. - uint256 length = ckpts.length; - - uint256 low = 0; - uint256 high = length; - - if (length > 5) { - uint256 mid = length - Math.sqrt(length); - if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { - high = mid; - } else { - low = mid + 1; - } - } - - while (low < high) { - uint256 mid = Math.average(low, high); - if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { - high = mid; - } else { - low = mid + 1; - } - } - - unchecked { - return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes; - } - } - - /** - * @dev Delegate votes from the sender to `delegatee`. - */ - function delegate(address delegatee) public virtual override { - _delegate(_msgSender(), delegatee); - } - - /** - * @dev Delegates votes from signer to `delegatee` - */ - function delegateBySig( - address delegatee, - uint256 nonce, - uint256 expiry, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override { - require(block.timestamp <= expiry, "ERC20Votes: signature expired"); - address signer = ECDSA.recover( - _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), - v, - r, - s - ); - require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce"); - _delegate(signer, delegatee); - } - - /** - * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). - */ - function _maxSupply() internal view virtual returns (uint224) { - return type(uint224).max; - } - - /** - * @dev Snapshots the totalSupply after it has been increased. - */ - function _mint(address account, uint256 amount) internal virtual override { - super._mint(account, amount); - require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes"); - - _writeCheckpoint(_totalSupplyCheckpoints, _add, amount); - } - - /** - * @dev Snapshots the totalSupply after it has been decreased. - */ - function _burn(address account, uint256 amount) internal virtual override { - super._burn(account, amount); - - _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount); - } - - /** - * @dev Move voting power when tokens are transferred. - * - * Emits a {IVotes-DelegateVotesChanged} event. - */ - function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override { - super._afterTokenTransfer(from, to, amount); - - _moveVotingPower(delegates(from), delegates(to), amount); - } - - /** - * @dev Change delegation for `delegator` to `delegatee`. - * - * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. - */ - function _delegate(address delegator, address delegatee) internal virtual { - address currentDelegate = delegates(delegator); - uint256 delegatorBalance = balanceOf(delegator); - _delegates[delegator] = delegatee; - - emit DelegateChanged(delegator, currentDelegate, delegatee); - - _moveVotingPower(currentDelegate, delegatee, delegatorBalance); - } - - function _moveVotingPower(address src, address dst, uint256 amount) private { - if (src != dst && amount > 0) { - if (src != address(0)) { - (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount); - emit DelegateVotesChanged(src, oldWeight, newWeight); - } - - if (dst != address(0)) { - (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount); - emit DelegateVotesChanged(dst, oldWeight, newWeight); - } - } - } - - function _writeCheckpoint( - Checkpoint[] storage ckpts, - function(uint256, uint256) view returns (uint256) op, - uint256 delta - ) private returns (uint256 oldWeight, uint256 newWeight) { - uint256 pos = ckpts.length; - - unchecked { - Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1); - - oldWeight = oldCkpt.votes; - newWeight = op(oldWeight, delta); - - if (pos > 0 && oldCkpt.fromBlock == clock()) { - _unsafeAccess(ckpts, pos - 1).votes = SafeCast.toUint224(newWeight); - } else { - ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(clock()), votes: SafeCast.toUint224(newWeight)})); - } - } - } - - function _add(uint256 a, uint256 b) private pure returns (uint256) { - return a + b; - } - - function _subtract(uint256 a, uint256 b) private pure returns (uint256) { - return a - b; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) { - assembly { - mstore(0, ckpts.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol deleted file mode 100644 index 0461310a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20VotesComp.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20VotesComp.sol) - -pragma solidity ^0.8.0; - -import "./ERC20Votes.sol"; - -/** - * @dev Extension of ERC20 to support Compound's voting and delegation. This version exactly matches Compound's - * interface, with the drawback of only supporting supply up to (2^96^ - 1). - * - * NOTE: You should use this contract if you need exact compatibility with COMP (for example in order to use your token - * with Governor Alpha or Bravo) and if you are sure the supply cap of 2^96^ is enough for you. Otherwise, use the - * {ERC20Votes} variant of this module. - * - * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either - * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting - * power can be queried through the public accessors {getCurrentVotes} and {getPriorVotes}. - * - * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it - * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. - * - * _Available since v4.2._ - */ -abstract contract ERC20VotesComp is ERC20Votes { - /** - * @dev Comp version of the {getVotes} accessor, with `uint96` return type. - */ - function getCurrentVotes(address account) external view virtual returns (uint96) { - return SafeCast.toUint96(getVotes(account)); - } - - /** - * @dev Comp version of the {getPastVotes} accessor, with `uint96` return type. - */ - function getPriorVotes(address account, uint256 blockNumber) external view virtual returns (uint96) { - return SafeCast.toUint96(getPastVotes(account, blockNumber)); - } - - /** - * @dev Maximum token supply. Reduced to `type(uint96).max` (2^96^ - 1) to fit COMP interface. - */ - function _maxSupply() internal view virtual override returns (uint224) { - return type(uint96).max; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol deleted file mode 100644 index bc85a0b3..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Wrapper.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Wrapper.sol) - -pragma solidity ^0.8.0; - -import "../ERC20.sol"; -import "../utils/SafeERC20.sol"; - -/** - * @dev Extension of the ERC20 token contract to support token wrapping. - * - * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful - * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the - * wrapping of an existing "basic" ERC20 into a governance token. - * - * _Available since v4.2._ - */ -abstract contract ERC20Wrapper is ERC20 { - IERC20 private immutable _underlying; - - constructor(IERC20 underlyingToken) { - require(underlyingToken != this, "ERC20Wrapper: cannot self wrap"); - _underlying = underlyingToken; - } - - /** - * @dev See {ERC20-decimals}. - */ - function decimals() public view virtual override returns (uint8) { - try IERC20Metadata(address(_underlying)).decimals() returns (uint8 value) { - return value; - } catch { - return super.decimals(); - } - } - - /** - * @dev Returns the address of the underlying ERC-20 token that is being wrapped. - */ - function underlying() public view returns (IERC20) { - return _underlying; - } - - /** - * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens. - */ - function depositFor(address account, uint256 amount) public virtual returns (bool) { - address sender = _msgSender(); - require(sender != address(this), "ERC20Wrapper: wrapper can't deposit"); - SafeERC20.safeTransferFrom(_underlying, sender, address(this), amount); - _mint(account, amount); - return true; - } - - /** - * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens. - */ - function withdrawTo(address account, uint256 amount) public virtual returns (bool) { - _burn(_msgSender(), amount); - SafeERC20.safeTransfer(_underlying, account, amount); - return true; - } - - /** - * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal - * function that can be exposed with access control if desired. - */ - function _recover(address account) internal virtual returns (uint256) { - uint256 value = _underlying.balanceOf(address(this)) - totalSupply(); - _mint(account, value); - return value; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol deleted file mode 100644 index 4f6a2d64..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC4626.sol +++ /dev/null @@ -1,256 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC4626.sol) - -pragma solidity ^0.8.0; - -import "../ERC20.sol"; -import "../utils/SafeERC20.sol"; -import "../../../interfaces/IERC4626.sol"; -import "../../../utils/math/Math.sol"; - -/** - * @dev Implementation of the ERC4626 "Tokenized Vault Standard" as defined in - * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626]. - * - * This extension allows the minting and burning of "shares" (represented using the ERC20 inheritance) in exchange for - * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends - * the ERC20 standard. Any additional extensions included along it would affect the "shares" token represented by this - * contract and not the "assets" token which is an independent contract. - * - * [CAUTION] - * ==== - * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning - * with a "donation" to the vault that inflates the price of a share. This is variously known as a donation or inflation - * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial - * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may - * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by - * verifying the amount received is as expected, using a wrapper that performs these checks such as - * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. - * - * Since v4.9, this implementation uses virtual assets and shares to mitigate that risk. The `_decimalsOffset()` - * corresponds to an offset in the decimal representation between the underlying asset's decimals and the vault - * decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which itself - * determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default offset - * (0) makes it non-profitable, as a result of the value being captured by the virtual shares (out of the attacker's - * donation) matching the attacker's expected gains. With a larger offset, the attack becomes orders of magnitude more - * expensive than it is profitable. More details about the underlying math can be found - * xref:erc4626.adoc#inflation-attack[here]. - * - * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued - * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets - * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience - * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the - * `_convertToShares` and `_convertToAssets` functions. - * - * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide]. - * ==== - * - * _Available since v4.7._ - */ -abstract contract ERC4626 is ERC20, IERC4626 { - using Math for uint256; - - IERC20 private immutable _asset; - uint8 private immutable _underlyingDecimals; - - /** - * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777). - */ - constructor(IERC20 asset_) { - (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_); - _underlyingDecimals = success ? assetDecimals : 18; - _asset = asset_; - } - - /** - * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way. - */ - function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool, uint8) { - (bool success, bytes memory encodedDecimals) = address(asset_).staticcall( - abi.encodeWithSelector(IERC20Metadata.decimals.selector) - ); - if (success && encodedDecimals.length >= 32) { - uint256 returnedDecimals = abi.decode(encodedDecimals, (uint256)); - if (returnedDecimals <= type(uint8).max) { - return (true, uint8(returnedDecimals)); - } - } - return (false, 0); - } - - /** - * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This - * "original" value is cached during construction of the vault contract. If this read operation fails (e.g., the - * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals. - * - * See {IERC20Metadata-decimals}. - */ - function decimals() public view virtual override(IERC20Metadata, ERC20) returns (uint8) { - return _underlyingDecimals + _decimalsOffset(); - } - - /** @dev See {IERC4626-asset}. */ - function asset() public view virtual override returns (address) { - return address(_asset); - } - - /** @dev See {IERC4626-totalAssets}. */ - function totalAssets() public view virtual override returns (uint256) { - return _asset.balanceOf(address(this)); - } - - /** @dev See {IERC4626-convertToShares}. */ - function convertToShares(uint256 assets) public view virtual override returns (uint256) { - return _convertToShares(assets, Math.Rounding.Down); - } - - /** @dev See {IERC4626-convertToAssets}. */ - function convertToAssets(uint256 shares) public view virtual override returns (uint256) { - return _convertToAssets(shares, Math.Rounding.Down); - } - - /** @dev See {IERC4626-maxDeposit}. */ - function maxDeposit(address) public view virtual override returns (uint256) { - return type(uint256).max; - } - - /** @dev See {IERC4626-maxMint}. */ - function maxMint(address) public view virtual override returns (uint256) { - return type(uint256).max; - } - - /** @dev See {IERC4626-maxWithdraw}. */ - function maxWithdraw(address owner) public view virtual override returns (uint256) { - return _convertToAssets(balanceOf(owner), Math.Rounding.Down); - } - - /** @dev See {IERC4626-maxRedeem}. */ - function maxRedeem(address owner) public view virtual override returns (uint256) { - return balanceOf(owner); - } - - /** @dev See {IERC4626-previewDeposit}. */ - function previewDeposit(uint256 assets) public view virtual override returns (uint256) { - return _convertToShares(assets, Math.Rounding.Down); - } - - /** @dev See {IERC4626-previewMint}. */ - function previewMint(uint256 shares) public view virtual override returns (uint256) { - return _convertToAssets(shares, Math.Rounding.Up); - } - - /** @dev See {IERC4626-previewWithdraw}. */ - function previewWithdraw(uint256 assets) public view virtual override returns (uint256) { - return _convertToShares(assets, Math.Rounding.Up); - } - - /** @dev See {IERC4626-previewRedeem}. */ - function previewRedeem(uint256 shares) public view virtual override returns (uint256) { - return _convertToAssets(shares, Math.Rounding.Down); - } - - /** @dev See {IERC4626-deposit}. */ - function deposit(uint256 assets, address receiver) public virtual override returns (uint256) { - require(assets <= maxDeposit(receiver), "ERC4626: deposit more than max"); - - uint256 shares = previewDeposit(assets); - _deposit(_msgSender(), receiver, assets, shares); - - return shares; - } - - /** @dev See {IERC4626-mint}. - * - * As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero. - * In this case, the shares will be minted without requiring any assets to be deposited. - */ - function mint(uint256 shares, address receiver) public virtual override returns (uint256) { - require(shares <= maxMint(receiver), "ERC4626: mint more than max"); - - uint256 assets = previewMint(shares); - _deposit(_msgSender(), receiver, assets, shares); - - return assets; - } - - /** @dev See {IERC4626-withdraw}. */ - function withdraw(uint256 assets, address receiver, address owner) public virtual override returns (uint256) { - require(assets <= maxWithdraw(owner), "ERC4626: withdraw more than max"); - - uint256 shares = previewWithdraw(assets); - _withdraw(_msgSender(), receiver, owner, assets, shares); - - return shares; - } - - /** @dev See {IERC4626-redeem}. */ - function redeem(uint256 shares, address receiver, address owner) public virtual override returns (uint256) { - require(shares <= maxRedeem(owner), "ERC4626: redeem more than max"); - - uint256 assets = previewRedeem(shares); - _withdraw(_msgSender(), receiver, owner, assets, shares); - - return assets; - } - - /** - * @dev Internal conversion function (from assets to shares) with support for rounding direction. - */ - function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) { - return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding); - } - - /** - * @dev Internal conversion function (from shares to assets) with support for rounding direction. - */ - function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) { - return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding); - } - - /** - * @dev Deposit/mint common workflow. - */ - function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual { - // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the - // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, - // calls the vault, which is assumed not malicious. - // - // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the - // assets are transferred and before the shares are minted, which is a valid state. - // slither-disable-next-line reentrancy-no-eth - SafeERC20.safeTransferFrom(_asset, caller, address(this), assets); - _mint(receiver, shares); - - emit Deposit(caller, receiver, assets, shares); - } - - /** - * @dev Withdraw/redeem common workflow. - */ - function _withdraw( - address caller, - address receiver, - address owner, - uint256 assets, - uint256 shares - ) internal virtual { - if (caller != owner) { - _spendAllowance(owner, caller, shares); - } - - // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the - // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, - // calls the vault, which is assumed not malicious. - // - // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the - // shares are burned and after the assets are transferred, which is a valid state. - _burn(owner, shares); - SafeERC20.safeTransfer(_asset, receiver, assets); - - emit Withdraw(caller, receiver, owner, assets, shares); - } - - function _decimalsOffset() internal view virtual returns (uint8) { - return 0; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol deleted file mode 100644 index 55b38b26..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-ERC20Permit.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-ERC20Permit.sol) - -pragma solidity ^0.8.0; - -// EIP-2612 is Final as of 2022-11-01. This file is deprecated. - -import "./ERC20Permit.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol deleted file mode 100644 index ff6ede3c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/draft-IERC20Permit.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol) - -pragma solidity ^0.8.0; - -// EIP-2612 is Final as of 2022-11-01. This file is deprecated. - -import "./IERC20Permit.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol deleted file mode 100644 index d293999c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetFixedSupply.sol +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/presets/ERC20PresetFixedSupply.sol) -pragma solidity ^0.8.0; - -import "../extensions/ERC20Burnable.sol"; - -/** - * @dev {ERC20} token, including: - * - * - Preminted initial supply - * - Ability for holders to burn (destroy) their tokens - * - No access control mechanism (for minting/pausing) and hence no governance - * - * This contract uses {ERC20Burnable} to include burn capabilities - head to - * its documentation for details. - * - * _Available since v3.4._ - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC20PresetFixedSupply is ERC20Burnable { - /** - * @dev Mints `initialSupply` amount of token and transfers them to `owner`. - * - * See {ERC20-constructor}. - */ - constructor(string memory name, string memory symbol, uint256 initialSupply, address owner) ERC20(name, symbol) { - _mint(owner, initialSupply); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol deleted file mode 100644 index e711a894..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/presets/ERC20PresetMinterPauser.sol +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol) - -pragma solidity ^0.8.0; - -import "../ERC20.sol"; -import "../extensions/ERC20Burnable.sol"; -import "../extensions/ERC20Pausable.sol"; -import "../../../access/AccessControlEnumerable.sol"; -import "../../../utils/Context.sol"; - -/** - * @dev {ERC20} token, including: - * - * - ability for holders to burn (destroy) their tokens - * - a minter role that allows for token minting (creation) - * - a pauser role that allows to stop all token transfers - * - * This contract uses {AccessControl} to lock permissioned functions using the - * different roles - head to its documentation for details. - * - * The account that deploys the contract will be granted the minter and pauser - * roles, as well as the default admin role, which will let it grant both minter - * and pauser roles to other accounts. - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable { - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); - - /** - * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the - * account that deploys the contract. - * - * See {ERC20-constructor}. - */ - constructor(string memory name, string memory symbol) ERC20(name, symbol) { - _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); - - _setupRole(MINTER_ROLE, _msgSender()); - _setupRole(PAUSER_ROLE, _msgSender()); - } - - /** - * @dev Creates `amount` new tokens for `to`. - * - * See {ERC20-_mint}. - * - * Requirements: - * - * - the caller must have the `MINTER_ROLE`. - */ - function mint(address to, uint256 amount) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint"); - _mint(to, amount); - } - - /** - * @dev Pauses all token transfers. - * - * See {ERC20Pausable} and {Pausable-_pause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function pause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause"); - _pause(); - } - - /** - * @dev Unpauses all token transfers. - * - * See {ERC20Pausable} and {Pausable-_unpause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function unpause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause"); - _unpause(); - } - - function _beforeTokenTransfer( - address from, - address to, - uint256 amount - ) internal virtual override(ERC20, ERC20Pausable) { - super._beforeTokenTransfer(from, to, amount); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol deleted file mode 100644 index d4bcd988..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/SafeERC20.sol +++ /dev/null @@ -1,143 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) - -pragma solidity ^0.8.0; - -import "../IERC20.sol"; -import "../extensions/IERC20Permit.sol"; -import "../../../utils/Address.sol"; - -/** - * @title SafeERC20 - * @dev Wrappers around ERC20 operations that throw on failure (when the token - * contract returns false). Tokens that return no value (and instead revert or - * throw on failure) are also supported, non-reverting calls are assumed to be - * successful. - * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, - * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. - */ -library SafeERC20 { - using Address for address; - - /** - * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, - * non-reverting calls are assumed to be successful. - */ - function safeTransfer(IERC20 token, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); - } - - /** - * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the - * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. - */ - function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); - } - - /** - * @dev Deprecated. This function has issues similar to the ones found in - * {IERC20-approve}, and its usage is discouraged. - * - * Whenever possible, use {safeIncreaseAllowance} and - * {safeDecreaseAllowance} instead. - */ - function safeApprove(IERC20 token, address spender, uint256 value) internal { - // safeApprove should only be called when setting an initial allowance, - // or when resetting it to zero. To increase and decrease it, use - // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' - require( - (value == 0) || (token.allowance(address(this), spender) == 0), - "SafeERC20: approve from non-zero to non-zero allowance" - ); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); - } - - /** - * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, - * non-reverting calls are assumed to be successful. - */ - function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { - uint256 oldAllowance = token.allowance(address(this), spender); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); - } - - /** - * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, - * non-reverting calls are assumed to be successful. - */ - function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { - unchecked { - uint256 oldAllowance = token.allowance(address(this), spender); - require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); - } - } - - /** - * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, - * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval - * to be set to zero before setting it to a non-zero value, such as USDT. - */ - function forceApprove(IERC20 token, address spender, uint256 value) internal { - bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); - - if (!_callOptionalReturnBool(token, approvalCall)) { - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); - _callOptionalReturn(token, approvalCall); - } - } - - /** - * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. - * Revert on invalid signature. - */ - function safePermit( - IERC20Permit token, - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) internal { - uint256 nonceBefore = token.nonces(owner); - token.permit(owner, spender, value, deadline, v, r, s); - uint256 nonceAfter = token.nonces(owner); - require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); - } - - /** - * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement - * on the return value: the return value is optional (but if data is returned, it must not be false). - * @param token The token targeted by the call. - * @param data The call data (encoded using abi.encode or one of its variants). - */ - function _callOptionalReturn(IERC20 token, bytes memory data) private { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since - // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that - // the target address contains contract code and also asserts for success in the low-level call. - - bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); - require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); - } - - /** - * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement - * on the return value: the return value is optional (but if data is returned, it must not be false). - * @param token The token targeted by the call. - * @param data The call data (encoded using abi.encode or one of its variants). - * - * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. - */ - function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since - // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false - // and not revert is the subcall reverts. - - (bool success, bytes memory returndata) = address(token).call(data); - return - success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol deleted file mode 100644 index cffdac5d..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/utils/TokenTimelock.sol +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/TokenTimelock.sol) - -pragma solidity ^0.8.0; - -import "./SafeERC20.sol"; - -/** - * @dev A token holder contract that will allow a beneficiary to extract the - * tokens after a given release time. - * - * Useful for simple vesting schedules like "advisors get all of their tokens - * after 1 year". - */ -contract TokenTimelock { - using SafeERC20 for IERC20; - - // ERC20 basic token contract being held - IERC20 private immutable _token; - - // beneficiary of tokens after they are released - address private immutable _beneficiary; - - // timestamp when token release is enabled - uint256 private immutable _releaseTime; - - /** - * @dev Deploys a timelock instance that is able to hold the token specified, and will only release it to - * `beneficiary_` when {release} is invoked after `releaseTime_`. The release time is specified as a Unix timestamp - * (in seconds). - */ - constructor(IERC20 token_, address beneficiary_, uint256 releaseTime_) { - require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time"); - _token = token_; - _beneficiary = beneficiary_; - _releaseTime = releaseTime_; - } - - /** - * @dev Returns the token being held. - */ - function token() public view virtual returns (IERC20) { - return _token; - } - - /** - * @dev Returns the beneficiary that will receive the tokens. - */ - function beneficiary() public view virtual returns (address) { - return _beneficiary; - } - - /** - * @dev Returns the time when the tokens are released in seconds since Unix epoch (i.e. Unix timestamp). - */ - function releaseTime() public view virtual returns (uint256) { - return _releaseTime; - } - - /** - * @dev Transfers tokens held by the timelock to the beneficiary. Will only succeed if invoked after the release - * time. - */ - function release() public virtual { - require(block.timestamp >= releaseTime(), "TokenTimelock: current time is before release time"); - - uint256 amount = token().balanceOf(address(this)); - require(amount > 0, "TokenTimelock: no tokens to release"); - - token().safeTransfer(beneficiary(), amount); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol deleted file mode 100644 index 7942e6fe..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/ERC721.sol +++ /dev/null @@ -1,466 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) - -pragma solidity ^0.8.0; - -import "./IERC721.sol"; -import "./IERC721Receiver.sol"; -import "./extensions/IERC721Metadata.sol"; -import "../../utils/Address.sol"; -import "../../utils/Context.sol"; -import "../../utils/Strings.sol"; -import "../../utils/introspection/ERC165.sol"; - -/** - * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including - * the Metadata extension, but not including the Enumerable extension, which is available separately as - * {ERC721Enumerable}. - */ -contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { - using Address for address; - using Strings for uint256; - - // Token name - string private _name; - - // Token symbol - string private _symbol; - - // Mapping from token ID to owner address - mapping(uint256 => address) private _owners; - - // Mapping owner address to token count - mapping(address => uint256) private _balances; - - // Mapping from token ID to approved address - mapping(uint256 => address) private _tokenApprovals; - - // Mapping from owner to operator approvals - mapping(address => mapping(address => bool)) private _operatorApprovals; - - /** - * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. - */ - constructor(string memory name_, string memory symbol_) { - _name = name_; - _symbol = symbol_; - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { - return - interfaceId == type(IERC721).interfaceId || - interfaceId == type(IERC721Metadata).interfaceId || - super.supportsInterface(interfaceId); - } - - /** - * @dev See {IERC721-balanceOf}. - */ - function balanceOf(address owner) public view virtual override returns (uint256) { - require(owner != address(0), "ERC721: address zero is not a valid owner"); - return _balances[owner]; - } - - /** - * @dev See {IERC721-ownerOf}. - */ - function ownerOf(uint256 tokenId) public view virtual override returns (address) { - address owner = _ownerOf(tokenId); - require(owner != address(0), "ERC721: invalid token ID"); - return owner; - } - - /** - * @dev See {IERC721Metadata-name}. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev See {IERC721Metadata-symbol}. - */ - function symbol() public view virtual override returns (string memory) { - return _symbol; - } - - /** - * @dev See {IERC721Metadata-tokenURI}. - */ - function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { - _requireMinted(tokenId); - - string memory baseURI = _baseURI(); - return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; - } - - /** - * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each - * token will be the concatenation of the `baseURI` and the `tokenId`. Empty - * by default, can be overridden in child contracts. - */ - function _baseURI() internal view virtual returns (string memory) { - return ""; - } - - /** - * @dev See {IERC721-approve}. - */ - function approve(address to, uint256 tokenId) public virtual override { - address owner = ERC721.ownerOf(tokenId); - require(to != owner, "ERC721: approval to current owner"); - - require( - _msgSender() == owner || isApprovedForAll(owner, _msgSender()), - "ERC721: approve caller is not token owner or approved for all" - ); - - _approve(to, tokenId); - } - - /** - * @dev See {IERC721-getApproved}. - */ - function getApproved(uint256 tokenId) public view virtual override returns (address) { - _requireMinted(tokenId); - - return _tokenApprovals[tokenId]; - } - - /** - * @dev See {IERC721-setApprovalForAll}. - */ - function setApprovalForAll(address operator, bool approved) public virtual override { - _setApprovalForAll(_msgSender(), operator, approved); - } - - /** - * @dev See {IERC721-isApprovedForAll}. - */ - function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { - return _operatorApprovals[owner][operator]; - } - - /** - * @dev See {IERC721-transferFrom}. - */ - function transferFrom(address from, address to, uint256 tokenId) public virtual override { - //solhint-disable-next-line max-line-length - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); - - _transfer(from, to, tokenId); - } - - /** - * @dev See {IERC721-safeTransferFrom}. - */ - function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { - safeTransferFrom(from, to, tokenId, ""); - } - - /** - * @dev See {IERC721-safeTransferFrom}. - */ - function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); - _safeTransfer(from, to, tokenId, data); - } - - /** - * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients - * are aware of the ERC721 protocol to prevent tokens from being forever locked. - * - * `data` is additional data, it has no specified format and it is sent in call to `to`. - * - * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. - * implement alternative mechanisms to perform token transfer, such as signature-based. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `tokenId` token must exist and be owned by `from`. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. - * - * Emits a {Transfer} event. - */ - function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { - _transfer(from, to, tokenId); - require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); - } - - /** - * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist - */ - function _ownerOf(uint256 tokenId) internal view virtual returns (address) { - return _owners[tokenId]; - } - - /** - * @dev Returns whether `tokenId` exists. - * - * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. - * - * Tokens start existing when they are minted (`_mint`), - * and stop existing when they are burned (`_burn`). - */ - function _exists(uint256 tokenId) internal view virtual returns (bool) { - return _ownerOf(tokenId) != address(0); - } - - /** - * @dev Returns whether `spender` is allowed to manage `tokenId`. - * - * Requirements: - * - * - `tokenId` must exist. - */ - function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { - address owner = ERC721.ownerOf(tokenId); - return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); - } - - /** - * @dev Safely mints `tokenId` and transfers it to `to`. - * - * Requirements: - * - * - `tokenId` must not exist. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. - * - * Emits a {Transfer} event. - */ - function _safeMint(address to, uint256 tokenId) internal virtual { - _safeMint(to, tokenId, ""); - } - - /** - * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is - * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. - */ - function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { - _mint(to, tokenId); - require( - _checkOnERC721Received(address(0), to, tokenId, data), - "ERC721: transfer to non ERC721Receiver implementer" - ); - } - - /** - * @dev Mints `tokenId` and transfers it to `to`. - * - * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible - * - * Requirements: - * - * - `tokenId` must not exist. - * - `to` cannot be the zero address. - * - * Emits a {Transfer} event. - */ - function _mint(address to, uint256 tokenId) internal virtual { - require(to != address(0), "ERC721: mint to the zero address"); - require(!_exists(tokenId), "ERC721: token already minted"); - - _beforeTokenTransfer(address(0), to, tokenId, 1); - - // Check that tokenId was not minted by `_beforeTokenTransfer` hook - require(!_exists(tokenId), "ERC721: token already minted"); - - unchecked { - // Will not overflow unless all 2**256 token ids are minted to the same owner. - // Given that tokens are minted one by one, it is impossible in practice that - // this ever happens. Might change if we allow batch minting. - // The ERC fails to describe this case. - _balances[to] += 1; - } - - _owners[tokenId] = to; - - emit Transfer(address(0), to, tokenId); - - _afterTokenTransfer(address(0), to, tokenId, 1); - } - - /** - * @dev Destroys `tokenId`. - * The approval is cleared when the token is burned. - * This is an internal function that does not check if the sender is authorized to operate on the token. - * - * Requirements: - * - * - `tokenId` must exist. - * - * Emits a {Transfer} event. - */ - function _burn(uint256 tokenId) internal virtual { - address owner = ERC721.ownerOf(tokenId); - - _beforeTokenTransfer(owner, address(0), tokenId, 1); - - // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook - owner = ERC721.ownerOf(tokenId); - - // Clear approvals - delete _tokenApprovals[tokenId]; - - unchecked { - // Cannot overflow, as that would require more tokens to be burned/transferred - // out than the owner initially received through minting and transferring in. - _balances[owner] -= 1; - } - delete _owners[tokenId]; - - emit Transfer(owner, address(0), tokenId); - - _afterTokenTransfer(owner, address(0), tokenId, 1); - } - - /** - * @dev Transfers `tokenId` from `from` to `to`. - * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - `tokenId` token must be owned by `from`. - * - * Emits a {Transfer} event. - */ - function _transfer(address from, address to, uint256 tokenId) internal virtual { - require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); - require(to != address(0), "ERC721: transfer to the zero address"); - - _beforeTokenTransfer(from, to, tokenId, 1); - - // Check that tokenId was not transferred by `_beforeTokenTransfer` hook - require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); - - // Clear approvals from the previous owner - delete _tokenApprovals[tokenId]; - - unchecked { - // `_balances[from]` cannot overflow for the same reason as described in `_burn`: - // `from`'s balance is the number of token held, which is at least one before the current - // transfer. - // `_balances[to]` could overflow in the conditions described in `_mint`. That would require - // all 2**256 token ids to be minted, which in practice is impossible. - _balances[from] -= 1; - _balances[to] += 1; - } - _owners[tokenId] = to; - - emit Transfer(from, to, tokenId); - - _afterTokenTransfer(from, to, tokenId, 1); - } - - /** - * @dev Approve `to` to operate on `tokenId` - * - * Emits an {Approval} event. - */ - function _approve(address to, uint256 tokenId) internal virtual { - _tokenApprovals[tokenId] = to; - emit Approval(ERC721.ownerOf(tokenId), to, tokenId); - } - - /** - * @dev Approve `operator` to operate on all of `owner` tokens - * - * Emits an {ApprovalForAll} event. - */ - function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { - require(owner != operator, "ERC721: approve to caller"); - _operatorApprovals[owner][operator] = approved; - emit ApprovalForAll(owner, operator, approved); - } - - /** - * @dev Reverts if the `tokenId` has not been minted yet. - */ - function _requireMinted(uint256 tokenId) internal view virtual { - require(_exists(tokenId), "ERC721: invalid token ID"); - } - - /** - * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. - * The call is not executed if the target address is not a contract. - * - * @param from address representing the previous owner of the given token ID - * @param to target address that will receive the tokens - * @param tokenId uint256 ID of the token to be transferred - * @param data bytes optional data to send along with the call - * @return bool whether the call correctly returned the expected magic value - */ - function _checkOnERC721Received( - address from, - address to, - uint256 tokenId, - bytes memory data - ) private returns (bool) { - if (to.isContract()) { - try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { - return retval == IERC721Receiver.onERC721Received.selector; - } catch (bytes memory reason) { - if (reason.length == 0) { - revert("ERC721: transfer to non ERC721Receiver implementer"); - } else { - /// @solidity memory-safe-assembly - assembly { - revert(add(32, reason), mload(reason)) - } - } - } - } else { - return true; - } - } - - /** - * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is - * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. - * - * Calling conditions: - * - * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. - * - When `from` is zero, the tokens will be minted for `to`. - * - When `to` is zero, ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - `batchSize` is non-zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} - - /** - * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is - * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. - * - * Calling conditions: - * - * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. - * - When `from` is zero, the tokens were minted for `to`. - * - When `to` is zero, ``from``'s tokens were burned. - * - `from` and `to` are never both zero. - * - `batchSize` is non-zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} - - /** - * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. - * - * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant - * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such - * that `ownerOf(tokenId)` is `a`. - */ - // solhint-disable-next-line func-name-mixedcase - function __unsafe_increaseBalance(address account, uint256 amount) internal { - _balances[account] += amount; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol deleted file mode 100644 index 0dc7dae2..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Burnable.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) - -pragma solidity ^0.8.0; - -import "../ERC721.sol"; -import "../../../utils/Context.sol"; - -/** - * @title ERC721 Burnable Token - * @dev ERC721 Token that can be burned (destroyed). - */ -abstract contract ERC721Burnable is Context, ERC721 { - /** - * @dev Burns `tokenId`. See {ERC721-_burn}. - * - * Requirements: - * - * - The caller must own `tokenId` or be an approved operator. - */ - function burn(uint256 tokenId) public virtual { - //solhint-disable-next-line max-line-length - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); - _burn(tokenId); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol deleted file mode 100644 index 4312d984..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Consecutive.sol +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Consecutive.sol) - -pragma solidity ^0.8.0; - -import "../ERC721.sol"; -import "../../../interfaces/IERC2309.sol"; -import "../../../utils/Checkpoints.sol"; -import "../../../utils/structs/BitMaps.sol"; - -/** - * @dev Implementation of the ERC2309 "Consecutive Transfer Extension" as defined in - * https://eips.ethereum.org/EIPS/eip-2309[EIP-2309]. - * - * This extension allows the minting of large batches of tokens, during contract construction only. For upgradeable - * contracts this implies that batch minting is only available during proxy deployment, and not in subsequent upgrades. - * These batches are limited to 5000 tokens at a time by default to accommodate off-chain indexers. - * - * Using this extension removes the ability to mint single tokens during contract construction. This ability is - * regained after construction. During construction, only batch minting is allowed. - * - * IMPORTANT: This extension bypasses the hooks {_beforeTokenTransfer} and {_afterTokenTransfer} for tokens minted in - * batch. When using this extension, you should consider the {_beforeConsecutiveTokenTransfer} and - * {_afterConsecutiveTokenTransfer} hooks in addition to {_beforeTokenTransfer} and {_afterTokenTransfer}. - * - * IMPORTANT: When overriding {_afterTokenTransfer}, be careful about call ordering. {ownerOf} may return invalid - * values during the {_afterTokenTransfer} execution if the super call is not called first. To be safe, execute the - * super call before your custom logic. - * - * _Available since v4.8._ - */ -abstract contract ERC721Consecutive is IERC2309, ERC721 { - using BitMaps for BitMaps.BitMap; - using Checkpoints for Checkpoints.Trace160; - - Checkpoints.Trace160 private _sequentialOwnership; - BitMaps.BitMap private _sequentialBurn; - - /** - * @dev Maximum size of a batch of consecutive tokens. This is designed to limit stress on off-chain indexing - * services that have to record one entry per token, and have protections against "unreasonably large" batches of - * tokens. - * - * NOTE: Overriding the default value of 5000 will not cause on-chain issues, but may result in the asset not being - * correctly supported by off-chain indexing services (including marketplaces). - */ - function _maxBatchSize() internal view virtual returns (uint96) { - return 5000; - } - - /** - * @dev See {ERC721-_ownerOf}. Override that checks the sequential ownership structure for tokens that have - * been minted as part of a batch, and not yet transferred. - */ - function _ownerOf(uint256 tokenId) internal view virtual override returns (address) { - address owner = super._ownerOf(tokenId); - - // If token is owned by the core, or beyond consecutive range, return base value - if (owner != address(0) || tokenId > type(uint96).max) { - return owner; - } - - // Otherwise, check the token was not burned, and fetch ownership from the anchors - // Note: no need for safe cast, we know that tokenId <= type(uint96).max - return _sequentialBurn.get(tokenId) ? address(0) : address(_sequentialOwnership.lowerLookup(uint96(tokenId))); - } - - /** - * @dev Mint a batch of tokens of length `batchSize` for `to`. Returns the token id of the first token minted in the - * batch; if `batchSize` is 0, returns the number of consecutive ids minted so far. - * - * Requirements: - * - * - `batchSize` must not be greater than {_maxBatchSize}. - * - The function is called in the constructor of the contract (directly or indirectly). - * - * CAUTION: Does not emit a `Transfer` event. This is ERC721 compliant as long as it is done inside of the - * constructor, which is enforced by this function. - * - * CAUTION: Does not invoke `onERC721Received` on the receiver. - * - * Emits a {IERC2309-ConsecutiveTransfer} event. - */ - function _mintConsecutive(address to, uint96 batchSize) internal virtual returns (uint96) { - uint96 first = _totalConsecutiveSupply(); - - // minting a batch of size 0 is a no-op - if (batchSize > 0) { - require(!Address.isContract(address(this)), "ERC721Consecutive: batch minting restricted to constructor"); - require(to != address(0), "ERC721Consecutive: mint to the zero address"); - require(batchSize <= _maxBatchSize(), "ERC721Consecutive: batch too large"); - - // hook before - _beforeTokenTransfer(address(0), to, first, batchSize); - - // push an ownership checkpoint & emit event - uint96 last = first + batchSize - 1; - _sequentialOwnership.push(last, uint160(to)); - - // The invariant required by this function is preserved because the new sequentialOwnership checkpoint - // is attributing ownership of `batchSize` new tokens to account `to`. - __unsafe_increaseBalance(to, batchSize); - - emit ConsecutiveTransfer(first, last, address(0), to); - - // hook after - _afterTokenTransfer(address(0), to, first, batchSize); - } - - return first; - } - - /** - * @dev See {ERC721-_mint}. Override version that restricts normal minting to after construction. - * - * Warning: Using {ERC721Consecutive} prevents using {_mint} during construction in favor of {_mintConsecutive}. - * After construction, {_mintConsecutive} is no longer available and {_mint} becomes available. - */ - function _mint(address to, uint256 tokenId) internal virtual override { - require(Address.isContract(address(this)), "ERC721Consecutive: can't mint during construction"); - super._mint(to, tokenId); - } - - /** - * @dev See {ERC721-_afterTokenTransfer}. Burning of tokens that have been sequentially minted must be explicit. - */ - function _afterTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - if ( - to == address(0) && // if we burn - firstTokenId < _totalConsecutiveSupply() && // and the tokenId was minted in a batch - !_sequentialBurn.get(firstTokenId) // and the token was never marked as burnt - ) { - require(batchSize == 1, "ERC721Consecutive: batch burn not supported"); - _sequentialBurn.set(firstTokenId); - } - super._afterTokenTransfer(from, to, firstTokenId, batchSize); - } - - function _totalConsecutiveSupply() private view returns (uint96) { - (bool exists, uint96 latestId, ) = _sequentialOwnership.latestCheckpoint(); - return exists ? latestId + 1 : 0; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol deleted file mode 100644 index 298e3420..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Royalty.sol +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol) - -pragma solidity ^0.8.0; - -import "../ERC721.sol"; -import "../../common/ERC2981.sol"; -import "../../../utils/introspection/ERC165.sol"; - -/** - * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment - * information. - * - * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for - * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. - * - * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See - * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to - * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. - * - * _Available since v4.5._ - */ -abstract contract ERC721Royalty is ERC2981, ERC721 { - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { - return super.supportsInterface(interfaceId); - } - - /** - * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. - */ - function _burn(uint256 tokenId) internal virtual override { - super._burn(tokenId); - _resetTokenRoyalty(tokenId); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol deleted file mode 100644 index c9d79b6b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721URIStorage.sol +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721URIStorage.sol) - -pragma solidity ^0.8.0; - -import "../ERC721.sol"; -import "../../../interfaces/IERC4906.sol"; - -/** - * @dev ERC721 token with storage based token URI management. - */ -abstract contract ERC721URIStorage is IERC4906, ERC721 { - using Strings for uint256; - - // Optional mapping for token URIs - mapping(uint256 => string) private _tokenURIs; - - /** - * @dev See {IERC165-supportsInterface} - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { - return interfaceId == bytes4(0x49064906) || super.supportsInterface(interfaceId); - } - - /** - * @dev See {IERC721Metadata-tokenURI}. - */ - function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { - _requireMinted(tokenId); - - string memory _tokenURI = _tokenURIs[tokenId]; - string memory base = _baseURI(); - - // If there is no base URI, return the token URI. - if (bytes(base).length == 0) { - return _tokenURI; - } - // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). - if (bytes(_tokenURI).length > 0) { - return string(abi.encodePacked(base, _tokenURI)); - } - - return super.tokenURI(tokenId); - } - - /** - * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. - * - * Emits {MetadataUpdate}. - * - * Requirements: - * - * - `tokenId` must exist. - */ - function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { - require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); - _tokenURIs[tokenId] = _tokenURI; - - emit MetadataUpdate(tokenId); - } - - /** - * @dev See {ERC721-_burn}. This override additionally checks to see if a - * token-specific URI was set for the token, and if so, it deletes the token URI from - * the storage mapping. - */ - function _burn(uint256 tokenId) internal virtual override { - super._burn(tokenId); - - if (bytes(_tokenURIs[tokenId]).length != 0) { - delete _tokenURIs[tokenId]; - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol deleted file mode 100644 index 55b82c1c..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Votes.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Votes.sol) - -pragma solidity ^0.8.0; - -import "../ERC721.sol"; -import "../../../governance/utils/Votes.sol"; - -/** - * @dev Extension of ERC721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts - * as 1 vote unit. - * - * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost - * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of - * the votes in governance decisions, or they can delegate to themselves to be their own representative. - * - * _Available since v4.5._ - */ -abstract contract ERC721Votes is ERC721, Votes { - /** - * @dev See {ERC721-_afterTokenTransfer}. Adjusts votes when tokens are transferred. - * - * Emits a {IVotes-DelegateVotesChanged} event. - */ - function _afterTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - _transferVotingUnits(from, to, batchSize); - super._afterTokenTransfer(from, to, firstTokenId, batchSize); - } - - /** - * @dev Returns the balance of `account`. - * - * WARNING: Overriding this function will likely result in incorrect vote tracking. - */ - function _getVotingUnits(address account) internal view virtual override returns (uint256) { - return balanceOf(account); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol deleted file mode 100644 index c6aa7c56..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/draft-ERC721Votes.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/draft-ERC721Votes.sol) - -pragma solidity ^0.8.0; - -// ERC721Votes was marked as draft due to the EIP-712 dependency. -// EIP-712 is Final as of 2022-08-11. This file is deprecated. - -import "./ERC721Votes.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol deleted file mode 100644 index da53b88b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol +++ /dev/null @@ -1,132 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol) - -pragma solidity ^0.8.0; - -import "../ERC721.sol"; -import "../extensions/ERC721Enumerable.sol"; -import "../extensions/ERC721Burnable.sol"; -import "../extensions/ERC721Pausable.sol"; -import "../../../access/AccessControlEnumerable.sol"; -import "../../../utils/Context.sol"; -import "../../../utils/Counters.sol"; - -/** - * @dev {ERC721} token, including: - * - * - ability for holders to burn (destroy) their tokens - * - a minter role that allows for token minting (creation) - * - a pauser role that allows to stop all token transfers - * - token ID and URI autogeneration - * - * This contract uses {AccessControl} to lock permissioned functions using the - * different roles - head to its documentation for details. - * - * The account that deploys the contract will be granted the minter and pauser - * roles, as well as the default admin role, which will let it grant both minter - * and pauser roles to other accounts. - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC721PresetMinterPauserAutoId is - Context, - AccessControlEnumerable, - ERC721Enumerable, - ERC721Burnable, - ERC721Pausable -{ - using Counters for Counters.Counter; - - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); - - Counters.Counter private _tokenIdTracker; - - string private _baseTokenURI; - - /** - * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the - * account that deploys the contract. - * - * Token URIs will be autogenerated based on `baseURI` and their token IDs. - * See {ERC721-tokenURI}. - */ - constructor(string memory name, string memory symbol, string memory baseTokenURI) ERC721(name, symbol) { - _baseTokenURI = baseTokenURI; - - _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); - - _setupRole(MINTER_ROLE, _msgSender()); - _setupRole(PAUSER_ROLE, _msgSender()); - } - - function _baseURI() internal view virtual override returns (string memory) { - return _baseTokenURI; - } - - /** - * @dev Creates a new token for `to`. Its token ID will be automatically - * assigned (and available on the emitted {IERC721-Transfer} event), and the token - * URI autogenerated based on the base URI passed at construction. - * - * See {ERC721-_mint}. - * - * Requirements: - * - * - the caller must have the `MINTER_ROLE`. - */ - function mint(address to) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); - - // We cannot just use balanceOf to create the new tokenId because tokens - // can be burned (destroyed), so we need a separate counter. - _mint(to, _tokenIdTracker.current()); - _tokenIdTracker.increment(); - } - - /** - * @dev Pauses all token transfers. - * - * See {ERC721Pausable} and {Pausable-_pause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function pause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); - _pause(); - } - - /** - * @dev Unpauses all token transfers. - * - * See {ERC721Pausable} and {Pausable-_unpause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function unpause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); - _unpause(); - } - - function _beforeTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { - super._beforeTokenTransfer(from, to, firstTokenId, batchSize); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface( - bytes4 interfaceId - ) public view virtual override(AccessControlEnumerable, ERC721, ERC721Enumerable) returns (bool) { - return super.supportsInterface(interfaceId); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol deleted file mode 100644 index c9a17d86..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/ERC777.sol +++ /dev/null @@ -1,514 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/ERC777.sol) - -pragma solidity ^0.8.0; - -import "./IERC777.sol"; -import "./IERC777Recipient.sol"; -import "./IERC777Sender.sol"; -import "../ERC20/IERC20.sol"; -import "../../utils/Address.sol"; -import "../../utils/Context.sol"; -import "../../utils/introspection/IERC1820Registry.sol"; - -/** - * @dev Implementation of the {IERC777} interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using {_mint}. - * - * Support for ERC20 is included in this contract, as specified by the EIP: both - * the ERC777 and ERC20 interfaces can be safely used when interacting with it. - * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token - * movements. - * - * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there - * are no special restrictions in the amount of tokens that created, moved, or - * destroyed. This makes integration with ERC20 applications seamless. - * - * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. - */ -contract ERC777 is Context, IERC777, IERC20 { - using Address for address; - - IERC1820Registry internal constant _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); - - mapping(address => uint256) private _balances; - - uint256 private _totalSupply; - - string private _name; - string private _symbol; - - bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender"); - bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient"); - - // This isn't ever read from - it's only used to respond to the defaultOperators query. - address[] private _defaultOperatorsArray; - - // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators). - mapping(address => bool) private _defaultOperators; - - // For each account, a mapping of its operators and revoked default operators. - mapping(address => mapping(address => bool)) private _operators; - mapping(address => mapping(address => bool)) private _revokedDefaultOperators; - - // ERC20-allowances - mapping(address => mapping(address => uint256)) private _allowances; - - /** - * @dev `defaultOperators` may be an empty array. - */ - constructor(string memory name_, string memory symbol_, address[] memory defaultOperators_) { - _name = name_; - _symbol = symbol_; - - _defaultOperatorsArray = defaultOperators_; - for (uint256 i = 0; i < defaultOperators_.length; i++) { - _defaultOperators[defaultOperators_[i]] = true; - } - - // register interfaces - _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC777Token"), address(this)); - _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC20Token"), address(this)); - } - - /** - * @dev See {IERC777-name}. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev See {IERC777-symbol}. - */ - function symbol() public view virtual override returns (string memory) { - return _symbol; - } - - /** - * @dev See {ERC20-decimals}. - * - * Always returns 18, as per the - * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility). - */ - function decimals() public pure virtual returns (uint8) { - return 18; - } - - /** - * @dev See {IERC777-granularity}. - * - * This implementation always returns `1`. - */ - function granularity() public view virtual override returns (uint256) { - return 1; - } - - /** - * @dev See {IERC777-totalSupply}. - */ - function totalSupply() public view virtual override(IERC20, IERC777) returns (uint256) { - return _totalSupply; - } - - /** - * @dev Returns the amount of tokens owned by an account (`tokenHolder`). - */ - function balanceOf(address tokenHolder) public view virtual override(IERC20, IERC777) returns (uint256) { - return _balances[tokenHolder]; - } - - /** - * @dev See {IERC777-send}. - * - * Also emits a {IERC20-Transfer} event for ERC20 compatibility. - */ - function send(address recipient, uint256 amount, bytes memory data) public virtual override { - _send(_msgSender(), recipient, amount, data, "", true); - } - - /** - * @dev See {IERC20-transfer}. - * - * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient} - * interface if it is a contract. - * - * Also emits a {Sent} event. - */ - function transfer(address recipient, uint256 amount) public virtual override returns (bool) { - _send(_msgSender(), recipient, amount, "", "", false); - return true; - } - - /** - * @dev See {IERC777-burn}. - * - * Also emits a {IERC20-Transfer} event for ERC20 compatibility. - */ - function burn(uint256 amount, bytes memory data) public virtual override { - _burn(_msgSender(), amount, data, ""); - } - - /** - * @dev See {IERC777-isOperatorFor}. - */ - function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) { - return - operator == tokenHolder || - (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) || - _operators[tokenHolder][operator]; - } - - /** - * @dev See {IERC777-authorizeOperator}. - */ - function authorizeOperator(address operator) public virtual override { - require(_msgSender() != operator, "ERC777: authorizing self as operator"); - - if (_defaultOperators[operator]) { - delete _revokedDefaultOperators[_msgSender()][operator]; - } else { - _operators[_msgSender()][operator] = true; - } - - emit AuthorizedOperator(operator, _msgSender()); - } - - /** - * @dev See {IERC777-revokeOperator}. - */ - function revokeOperator(address operator) public virtual override { - require(operator != _msgSender(), "ERC777: revoking self as operator"); - - if (_defaultOperators[operator]) { - _revokedDefaultOperators[_msgSender()][operator] = true; - } else { - delete _operators[_msgSender()][operator]; - } - - emit RevokedOperator(operator, _msgSender()); - } - - /** - * @dev See {IERC777-defaultOperators}. - */ - function defaultOperators() public view virtual override returns (address[] memory) { - return _defaultOperatorsArray; - } - - /** - * @dev See {IERC777-operatorSend}. - * - * Emits {Sent} and {IERC20-Transfer} events. - */ - function operatorSend( - address sender, - address recipient, - uint256 amount, - bytes memory data, - bytes memory operatorData - ) public virtual override { - require(isOperatorFor(_msgSender(), sender), "ERC777: caller is not an operator for holder"); - _send(sender, recipient, amount, data, operatorData, true); - } - - /** - * @dev See {IERC777-operatorBurn}. - * - * Emits {Burned} and {IERC20-Transfer} events. - */ - function operatorBurn( - address account, - uint256 amount, - bytes memory data, - bytes memory operatorData - ) public virtual override { - require(isOperatorFor(_msgSender(), account), "ERC777: caller is not an operator for holder"); - _burn(account, amount, data, operatorData); - } - - /** - * @dev See {IERC20-allowance}. - * - * Note that operator and allowance concepts are orthogonal: operators may - * not have allowance, and accounts with allowance may not be operators - * themselves. - */ - function allowance(address holder, address spender) public view virtual override returns (uint256) { - return _allowances[holder][spender]; - } - - /** - * @dev See {IERC20-approve}. - * - * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on - * `transferFrom`. This is semantically equivalent to an infinite approval. - * - * Note that accounts cannot have allowance issued by their operators. - */ - function approve(address spender, uint256 value) public virtual override returns (bool) { - address holder = _msgSender(); - _approve(holder, spender, value); - return true; - } - - /** - * @dev See {IERC20-transferFrom}. - * - * NOTE: Does not update the allowance if the current allowance - * is the maximum `uint256`. - * - * Note that operator and allowance concepts are orthogonal: operators cannot - * call `transferFrom` (unless they have allowance), and accounts with - * allowance cannot call `operatorSend` (unless they are operators). - * - * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events. - */ - function transferFrom(address holder, address recipient, uint256 amount) public virtual override returns (bool) { - address spender = _msgSender(); - _spendAllowance(holder, spender, amount); - _send(holder, recipient, amount, "", "", false); - return true; - } - - /** - * @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * If a send hook is registered for `account`, the corresponding function - * will be called with the caller address as the `operator` and with - * `userData` and `operatorData`. - * - * See {IERC777Sender} and {IERC777Recipient}. - * - * Emits {Minted} and {IERC20-Transfer} events. - * - * Requirements - * - * - `account` cannot be the zero address. - * - if `account` is a contract, it must implement the {IERC777Recipient} - * interface. - */ - function _mint(address account, uint256 amount, bytes memory userData, bytes memory operatorData) internal virtual { - _mint(account, amount, userData, operatorData, true); - } - - /** - * @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * If `requireReceptionAck` is set to true, and if a send hook is - * registered for `account`, the corresponding function will be called with - * `operator`, `data` and `operatorData`. - * - * See {IERC777Sender} and {IERC777Recipient}. - * - * Emits {Minted} and {IERC20-Transfer} events. - * - * Requirements - * - * - `account` cannot be the zero address. - * - if `account` is a contract, it must implement the {IERC777Recipient} - * interface. - */ - function _mint( - address account, - uint256 amount, - bytes memory userData, - bytes memory operatorData, - bool requireReceptionAck - ) internal virtual { - require(account != address(0), "ERC777: mint to the zero address"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, address(0), account, amount); - - // Update state variables - _totalSupply += amount; - _balances[account] += amount; - - _callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck); - - emit Minted(operator, account, amount, userData, operatorData); - emit Transfer(address(0), account, amount); - } - - /** - * @dev Send tokens - * @param from address token holder address - * @param to address recipient address - * @param amount uint256 amount of tokens to transfer - * @param userData bytes extra information provided by the token holder (if any) - * @param operatorData bytes extra information provided by the operator (if any) - * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient - */ - function _send( - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData, - bool requireReceptionAck - ) internal virtual { - require(from != address(0), "ERC777: transfer from the zero address"); - require(to != address(0), "ERC777: transfer to the zero address"); - - address operator = _msgSender(); - - _callTokensToSend(operator, from, to, amount, userData, operatorData); - - _move(operator, from, to, amount, userData, operatorData); - - _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck); - } - - /** - * @dev Burn tokens - * @param from address token holder address - * @param amount uint256 amount of tokens to burn - * @param data bytes extra information provided by the token holder - * @param operatorData bytes extra information provided by the operator (if any) - */ - function _burn(address from, uint256 amount, bytes memory data, bytes memory operatorData) internal virtual { - require(from != address(0), "ERC777: burn from the zero address"); - - address operator = _msgSender(); - - _callTokensToSend(operator, from, address(0), amount, data, operatorData); - - _beforeTokenTransfer(operator, from, address(0), amount); - - // Update state variables - uint256 fromBalance = _balances[from]; - require(fromBalance >= amount, "ERC777: burn amount exceeds balance"); - unchecked { - _balances[from] = fromBalance - amount; - } - _totalSupply -= amount; - - emit Burned(operator, from, amount, data, operatorData); - emit Transfer(from, address(0), amount); - } - - function _move( - address operator, - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData - ) private { - _beforeTokenTransfer(operator, from, to, amount); - - uint256 fromBalance = _balances[from]; - require(fromBalance >= amount, "ERC777: transfer amount exceeds balance"); - unchecked { - _balances[from] = fromBalance - amount; - } - _balances[to] += amount; - - emit Sent(operator, from, to, amount, userData, operatorData); - emit Transfer(from, to, amount); - } - - /** - * @dev See {ERC20-_approve}. - * - * Note that accounts cannot have allowance issued by their operators. - */ - function _approve(address holder, address spender, uint256 value) internal virtual { - require(holder != address(0), "ERC777: approve from the zero address"); - require(spender != address(0), "ERC777: approve to the zero address"); - - _allowances[holder][spender] = value; - emit Approval(holder, spender, value); - } - - /** - * @dev Call from.tokensToSend() if the interface is registered - * @param operator address operator requesting the transfer - * @param from address token holder address - * @param to address recipient address - * @param amount uint256 amount of tokens to transfer - * @param userData bytes extra information provided by the token holder (if any) - * @param operatorData bytes extra information provided by the operator (if any) - */ - function _callTokensToSend( - address operator, - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData - ) private { - address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH); - if (implementer != address(0)) { - IERC777Sender(implementer).tokensToSend(operator, from, to, amount, userData, operatorData); - } - } - - /** - * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but - * tokensReceived() was not registered for the recipient - * @param operator address operator requesting the transfer - * @param from address token holder address - * @param to address recipient address - * @param amount uint256 amount of tokens to transfer - * @param userData bytes extra information provided by the token holder (if any) - * @param operatorData bytes extra information provided by the operator (if any) - * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient - */ - function _callTokensReceived( - address operator, - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData, - bool requireReceptionAck - ) private { - address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH); - if (implementer != address(0)) { - IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData); - } else if (requireReceptionAck) { - require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"); - } - } - - /** - * @dev Updates `owner` s allowance for `spender` based on spent `amount`. - * - * Does not update the allowance amount in case of infinite allowance. - * Revert if not enough allowance is available. - * - * Might emit an {IERC20-Approval} event. - */ - function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { - uint256 currentAllowance = allowance(owner, spender); - if (currentAllowance != type(uint256).max) { - require(currentAllowance >= amount, "ERC777: insufficient allowance"); - unchecked { - _approve(owner, spender, currentAllowance - amount); - } - } - } - - /** - * @dev Hook that is called before any token transfer. This includes - * calls to {send}, {transfer}, {operatorSend}, {transferFrom}, minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * will be to transferred to `to`. - * - when `from` is zero, `amount` tokens will be minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer(address operator, address from, address to, uint256 amount) internal virtual {} -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol b/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol deleted file mode 100644 index 8bd4b79a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/presets/ERC777PresetFixedSupply.sol +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC777/presets/ERC777PresetFixedSupply.sol) -pragma solidity ^0.8.0; - -import "../ERC777.sol"; - -/** - * @dev {ERC777} token, including: - * - * - Preminted initial supply - * - No access control mechanism (for minting/pausing) and hence no governance - * - * _Available since v3.4._ - */ -contract ERC777PresetFixedSupply is ERC777 { - /** - * @dev Mints `initialSupply` amount of token and transfers them to `owner`. - * - * See {ERC777-constructor}. - */ - constructor( - string memory name, - string memory symbol, - address[] memory defaultOperators, - uint256 initialSupply, - address owner - ) ERC777(name, symbol, defaultOperators) { - _mint(owner, initialSupply, "", ""); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol deleted file mode 100644 index 0791a66a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Address.sol +++ /dev/null @@ -1,244 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) - -pragma solidity ^0.8.1; - -/** - * @dev Collection of functions related to the address type - */ -library Address { - /** - * @dev Returns true if `account` is a contract. - * - * [IMPORTANT] - * ==== - * It is unsafe to assume that an address for which this function returns - * false is an externally-owned account (EOA) and not a contract. - * - * Among others, `isContract` will return false for the following - * types of addresses: - * - * - an externally-owned account - * - a contract in construction - * - an address where a contract will be created - * - an address where a contract lived, but was destroyed - * - * Furthermore, `isContract` will also return true if the target contract within - * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, - * which only has an effect at the end of a transaction. - * ==== - * - * [IMPORTANT] - * ==== - * You shouldn't rely on `isContract` to protect against flash loan attacks! - * - * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets - * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract - * constructor. - * ==== - */ - function isContract(address account) internal view returns (bool) { - // This method relies on extcodesize/address.code.length, which returns 0 - // for contracts in construction, since the code is only stored at the end - // of the constructor execution. - - return account.code.length > 0; - } - - /** - * @dev Replacement for Solidity's `transfer`: sends `amount` wei to - * `recipient`, forwarding all available gas and reverting on errors. - * - * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost - * of certain opcodes, possibly making contracts go over the 2300 gas limit - * imposed by `transfer`, making them unable to receive funds via - * `transfer`. {sendValue} removes this limitation. - * - * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. - * - * IMPORTANT: because control is transferred to `recipient`, care must be - * taken to not create reentrancy vulnerabilities. Consider using - * {ReentrancyGuard} or the - * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. - */ - function sendValue(address payable recipient, uint256 amount) internal { - require(address(this).balance >= amount, "Address: insufficient balance"); - - (bool success, ) = recipient.call{value: amount}(""); - require(success, "Address: unable to send value, recipient may have reverted"); - } - - /** - * @dev Performs a Solidity function call using a low level `call`. A - * plain `call` is an unsafe replacement for a function call: use this - * function instead. - * - * If `target` reverts with a revert reason, it is bubbled up by this - * function (like regular Solidity function calls). - * - * Returns the raw returned data. To convert to the expected return value, - * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. - * - * Requirements: - * - * - `target` must be a contract. - * - calling `target` with `data` must not revert. - * - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data) internal returns (bytes memory) { - return functionCallWithValue(target, data, 0, "Address: low-level call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with - * `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCall( - address target, - bytes memory data, - string memory errorMessage - ) internal returns (bytes memory) { - return functionCallWithValue(target, data, 0, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but also transferring `value` wei to `target`. - * - * Requirements: - * - * - the calling contract must have an ETH balance of at least `value`. - * - the called Solidity function must be `payable`. - * - * _Available since v3.1._ - */ - function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { - return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); - } - - /** - * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but - * with `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCallWithValue( - address target, - bytes memory data, - uint256 value, - string memory errorMessage - ) internal returns (bytes memory) { - require(address(this).balance >= value, "Address: insufficient balance for call"); - (bool success, bytes memory returndata) = target.call{value: value}(data); - return verifyCallResultFromTarget(target, success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { - return functionStaticCall(target, data, "Address: low-level static call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall( - address target, - bytes memory data, - string memory errorMessage - ) internal view returns (bytes memory) { - (bool success, bytes memory returndata) = target.staticcall(data); - return verifyCallResultFromTarget(target, success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { - return functionDelegateCall(target, data, "Address: low-level delegate call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall( - address target, - bytes memory data, - string memory errorMessage - ) internal returns (bytes memory) { - (bool success, bytes memory returndata) = target.delegatecall(data); - return verifyCallResultFromTarget(target, success, returndata, errorMessage); - } - - /** - * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling - * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. - * - * _Available since v4.8._ - */ - function verifyCallResultFromTarget( - address target, - bool success, - bytes memory returndata, - string memory errorMessage - ) internal view returns (bytes memory) { - if (success) { - if (returndata.length == 0) { - // only check isContract if the call was successful and the return data is empty - // otherwise we already know that it was a contract - require(isContract(target), "Address: call to non-contract"); - } - return returndata; - } else { - _revert(returndata, errorMessage); - } - } - - /** - * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the - * revert reason or using the provided one. - * - * _Available since v4.3._ - */ - function verifyCallResult( - bool success, - bytes memory returndata, - string memory errorMessage - ) internal pure returns (bytes memory) { - if (success) { - return returndata; - } else { - _revert(returndata, errorMessage); - } - } - - function _revert(bytes memory returndata, string memory errorMessage) private pure { - // Look for revert reason and bubble it up if present - if (returndata.length > 0) { - // The easiest way to bubble the revert reason is using memory via assembly - /// @solidity memory-safe-assembly - assembly { - let returndata_size := mload(returndata) - revert(add(32, returndata), returndata_size) - } - } else { - revert(errorMessage); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol deleted file mode 100644 index 66fe322b..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Arrays.sol +++ /dev/null @@ -1,105 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Arrays.sol) - -pragma solidity ^0.8.0; - -import "./StorageSlot.sol"; -import "./math/Math.sol"; - -/** - * @dev Collection of functions related to array types. - */ -library Arrays { - using StorageSlot for bytes32; - - /** - * @dev Searches a sorted `array` and returns the first index that contains - * a value greater or equal to `element`. If no such index exists (i.e. all - * values in the array are strictly less than `element`), the array length is - * returned. Time complexity O(log n). - * - * `array` is expected to be sorted in ascending order, and to contain no - * repeated elements. - */ - function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { - if (array.length == 0) { - return 0; - } - - uint256 low = 0; - uint256 high = array.length; - - while (low < high) { - uint256 mid = Math.average(low, high); - - // Note that mid will always be strictly less than high (i.e. it will be a valid array index) - // because Math.average rounds down (it does integer division with truncation). - if (unsafeAccess(array, mid).value > element) { - high = mid; - } else { - low = mid + 1; - } - } - - // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. - if (low > 0 && unsafeAccess(array, low - 1).value == element) { - return low - 1; - } else { - return low; - } - } - - /** - * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. - * - * WARNING: Only use if you are certain `pos` is lower than the array length. - */ - function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { - bytes32 slot; - // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` - // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. - - /// @solidity memory-safe-assembly - assembly { - mstore(0, arr.slot) - slot := add(keccak256(0, 0x20), pos) - } - return slot.getAddressSlot(); - } - - /** - * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. - * - * WARNING: Only use if you are certain `pos` is lower than the array length. - */ - function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { - bytes32 slot; - // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` - // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. - - /// @solidity memory-safe-assembly - assembly { - mstore(0, arr.slot) - slot := add(keccak256(0, 0x20), pos) - } - return slot.getBytes32Slot(); - } - - /** - * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. - * - * WARNING: Only use if you are certain `pos` is lower than the array length. - */ - function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { - bytes32 slot; - // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` - // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. - - /// @solidity memory-safe-assembly - assembly { - mstore(0, arr.slot) - slot := add(keccak256(0, 0x20), pos) - } - return slot.getUint256Slot(); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol deleted file mode 100644 index bc606a2a..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Base64.sol +++ /dev/null @@ -1,101 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.6) (utils/Base64.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Provides a set of functions to operate with Base64 strings. - * - * _Available since v4.5._ - */ -library Base64 { - /** - * @dev Base64 Encoding/Decoding Table - */ - string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - /** - * @dev Converts a `bytes` to its Bytes64 `string` representation. - */ - function encode(bytes memory data) internal pure returns (string memory) { - /** - * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence - * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol - */ - if (data.length == 0) return ""; - - // Loads the table into memory - string memory table = _TABLE; - - // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter - // and split into 4 numbers of 6 bits. - // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up - // - `data.length + 2` -> Round up - // - `/ 3` -> Number of 3-bytes chunks - // - `4 *` -> 4 characters for each chunk - string memory result = new string(4 * ((data.length + 2) / 3)); - - /// @solidity memory-safe-assembly - assembly { - // Prepare the lookup table (skip the first "length" byte) - let tablePtr := add(table, 1) - - // Prepare result pointer, jump over length - let resultPtr := add(result, 0x20) - let dataPtr := data - let endPtr := add(data, mload(data)) - - // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and - // set it to zero to make sure no dirty bytes are read in that section. - let afterPtr := add(endPtr, 0x20) - let afterCache := mload(afterPtr) - mstore(afterPtr, 0x00) - - // Run over the input, 3 bytes at a time - for { - - } lt(dataPtr, endPtr) { - - } { - // Advance 3 bytes - dataPtr := add(dataPtr, 3) - let input := mload(dataPtr) - - // To write each character, shift the 3 byte (24 bits) chunk - // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) - // and apply logical AND with 0x3F to bitmask the least significant 6 bits. - // Use this as an index into the lookup table, mload an entire word - // so the desired character is in the least significant byte, and - // mstore8 this least significant byte into the result and continue. - - mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - - mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - - mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - - mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - } - - // Reset the value that was cached - mstore(afterPtr, afterCache) - - // When data `bytes` is not exactly 3 bytes long - // it is padded with `=` characters at the end - switch mod(mload(data), 3) - case 1 { - mstore8(sub(resultPtr, 1), 0x3d) - mstore8(sub(resultPtr, 2), 0x3d) - } - case 2 { - mstore8(sub(resultPtr, 1), 0x3d) - } - } - - return result; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol deleted file mode 100644 index 9d4f0f96..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Checkpoints.sol +++ /dev/null @@ -1,560 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Checkpoints.sol) -// This file was procedurally generated from scripts/generate/templates/Checkpoints.js. - -pragma solidity ^0.8.0; - -import "./math/Math.sol"; -import "./math/SafeCast.sol"; - -/** - * @dev This library defines the `History` struct, for checkpointing values as they change at different points in - * time, and later looking up past values by block number. See {Votes} as an example. - * - * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new - * checkpoint for the current transaction block using the {push} function. - * - * _Available since v4.5._ - */ -library Checkpoints { - struct History { - Checkpoint[] _checkpoints; - } - - struct Checkpoint { - uint32 _blockNumber; - uint224 _value; - } - - /** - * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one - * before it is returned, or zero otherwise. Because the number returned corresponds to that at the end of the - * block, the requested block number must be in the past, excluding the current block. - */ - function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { - require(blockNumber < block.number, "Checkpoints: block not yet mined"); - uint32 key = SafeCast.toUint32(blockNumber); - - uint256 len = self._checkpoints.length; - uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one - * before it is returned, or zero otherwise. Similar to {upperLookup} but optimized for the case when the searched - * checkpoint is probably "recent", defined as being among the last sqrt(N) checkpoints where N is the number of - * checkpoints. - */ - function getAtProbablyRecentBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { - require(blockNumber < block.number, "Checkpoints: block not yet mined"); - uint32 key = SafeCast.toUint32(blockNumber); - - uint256 len = self._checkpoints.length; - - uint256 low = 0; - uint256 high = len; - - if (len > 5) { - uint256 mid = len - Math.sqrt(len); - if (key < _unsafeAccess(self._checkpoints, mid)._blockNumber) { - high = mid; - } else { - low = mid + 1; - } - } - - uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); - - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block. - * - * Returns previous value and new value. - */ - function push(History storage self, uint256 value) internal returns (uint256, uint256) { - return _insert(self._checkpoints, SafeCast.toUint32(block.number), SafeCast.toUint224(value)); - } - - /** - * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will - * be set to `op(latest, delta)`. - * - * Returns previous value and new value. - */ - function push( - History storage self, - function(uint256, uint256) view returns (uint256) op, - uint256 delta - ) internal returns (uint256, uint256) { - return push(self, op(latest(self), delta)); - } - - /** - * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. - */ - function latest(History storage self) internal view returns (uint224) { - uint256 pos = self._checkpoints.length; - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value - * in the most recent checkpoint. - */ - function latestCheckpoint( - History storage self - ) internal view returns (bool exists, uint32 _blockNumber, uint224 _value) { - uint256 pos = self._checkpoints.length; - if (pos == 0) { - return (false, 0, 0); - } else { - Checkpoint memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); - return (true, ckpt._blockNumber, ckpt._value); - } - } - - /** - * @dev Returns the number of checkpoint. - */ - function length(History storage self) internal view returns (uint256) { - return self._checkpoints.length; - } - - /** - * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, - * or by updating the last one. - */ - function _insert(Checkpoint[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { - uint256 pos = self.length; - - if (pos > 0) { - // Copying to memory is important here. - Checkpoint memory last = _unsafeAccess(self, pos - 1); - - // Checkpoint keys must be non-decreasing. - require(last._blockNumber <= key, "Checkpoint: decreasing keys"); - - // Update or push new checkpoint - if (last._blockNumber == key) { - _unsafeAccess(self, pos - 1)._value = value; - } else { - self.push(Checkpoint({_blockNumber: key, _value: value})); - } - return (last._value, value); - } else { - self.push(Checkpoint({_blockNumber: key, _value: value})); - return (0, value); - } - } - - /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _upperBinaryLookup( - Checkpoint[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = Math.average(low, high); - if (_unsafeAccess(self, mid)._blockNumber > key) { - high = mid; - } else { - low = mid + 1; - } - } - return high; - } - - /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _lowerBinaryLookup( - Checkpoint[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = Math.average(low, high); - if (_unsafeAccess(self, mid)._blockNumber < key) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess(Checkpoint[] storage self, uint256 pos) private pure returns (Checkpoint storage result) { - assembly { - mstore(0, self.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } - - struct Trace224 { - Checkpoint224[] _checkpoints; - } - - struct Checkpoint224 { - uint32 _key; - uint224 _value; - } - - /** - * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint. - * - * Returns previous value and new value. - */ - function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) { - return _insert(self._checkpoints, key, value); - } - - /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. - */ - function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { - uint256 len = self._checkpoints.length; - uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); - return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - */ - function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { - uint256 len = self._checkpoints.length; - uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). - */ - function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) { - uint256 len = self._checkpoints.length; - - uint256 low = 0; - uint256 high = len; - - if (len > 5) { - uint256 mid = len - Math.sqrt(len); - if (key < _unsafeAccess(self._checkpoints, mid)._key) { - high = mid; - } else { - low = mid + 1; - } - } - - uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); - - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. - */ - function latest(Trace224 storage self) internal view returns (uint224) { - uint256 pos = self._checkpoints.length; - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value - * in the most recent checkpoint. - */ - function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) { - uint256 pos = self._checkpoints.length; - if (pos == 0) { - return (false, 0, 0); - } else { - Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); - return (true, ckpt._key, ckpt._value); - } - } - - /** - * @dev Returns the number of checkpoint. - */ - function length(Trace224 storage self) internal view returns (uint256) { - return self._checkpoints.length; - } - - /** - * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, - * or by updating the last one. - */ - function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { - uint256 pos = self.length; - - if (pos > 0) { - // Copying to memory is important here. - Checkpoint224 memory last = _unsafeAccess(self, pos - 1); - - // Checkpoint keys must be non-decreasing. - require(last._key <= key, "Checkpoint: decreasing keys"); - - // Update or push new checkpoint - if (last._key == key) { - _unsafeAccess(self, pos - 1)._value = value; - } else { - self.push(Checkpoint224({_key: key, _value: value})); - } - return (last._value, value); - } else { - self.push(Checkpoint224({_key: key, _value: value})); - return (0, value); - } - } - - /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _upperBinaryLookup( - Checkpoint224[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = Math.average(low, high); - if (_unsafeAccess(self, mid)._key > key) { - high = mid; - } else { - low = mid + 1; - } - } - return high; - } - - /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _lowerBinaryLookup( - Checkpoint224[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = Math.average(low, high); - if (_unsafeAccess(self, mid)._key < key) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess( - Checkpoint224[] storage self, - uint256 pos - ) private pure returns (Checkpoint224 storage result) { - assembly { - mstore(0, self.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } - - struct Trace160 { - Checkpoint160[] _checkpoints; - } - - struct Checkpoint160 { - uint96 _key; - uint160 _value; - } - - /** - * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint. - * - * Returns previous value and new value. - */ - function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) { - return _insert(self._checkpoints, key, value); - } - - /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. - */ - function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { - uint256 len = self._checkpoints.length; - uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); - return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - */ - function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { - uint256 len = self._checkpoints.length; - uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). - */ - function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) { - uint256 len = self._checkpoints.length; - - uint256 low = 0; - uint256 high = len; - - if (len > 5) { - uint256 mid = len - Math.sqrt(len); - if (key < _unsafeAccess(self._checkpoints, mid)._key) { - high = mid; - } else { - low = mid + 1; - } - } - - uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); - - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. - */ - function latest(Trace160 storage self) internal view returns (uint160) { - uint256 pos = self._checkpoints.length; - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value - * in the most recent checkpoint. - */ - function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) { - uint256 pos = self._checkpoints.length; - if (pos == 0) { - return (false, 0, 0); - } else { - Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); - return (true, ckpt._key, ckpt._value); - } - } - - /** - * @dev Returns the number of checkpoint. - */ - function length(Trace160 storage self) internal view returns (uint256) { - return self._checkpoints.length; - } - - /** - * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, - * or by updating the last one. - */ - function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) { - uint256 pos = self.length; - - if (pos > 0) { - // Copying to memory is important here. - Checkpoint160 memory last = _unsafeAccess(self, pos - 1); - - // Checkpoint keys must be non-decreasing. - require(last._key <= key, "Checkpoint: decreasing keys"); - - // Update or push new checkpoint - if (last._key == key) { - _unsafeAccess(self, pos - 1)._value = value; - } else { - self.push(Checkpoint160({_key: key, _value: value})); - } - return (last._value, value); - } else { - self.push(Checkpoint160({_key: key, _value: value})); - return (0, value); - } - } - - /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _upperBinaryLookup( - Checkpoint160[] storage self, - uint96 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = Math.average(low, high); - if (_unsafeAccess(self, mid)._key > key) { - high = mid; - } else { - low = mid + 1; - } - } - return high; - } - - /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _lowerBinaryLookup( - Checkpoint160[] storage self, - uint96 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = Math.average(low, high); - if (_unsafeAccess(self, mid)._key < key) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess( - Checkpoint160[] storage self, - uint256 pos - ) private pure returns (Checkpoint160 storage result) { - assembly { - mstore(0, self.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol deleted file mode 100644 index 8a4f2a2e..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Counters.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) - -pragma solidity ^0.8.0; - -/** - * @title Counters - * @author Matt Condon (@shrugs) - * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number - * of elements in a mapping, issuing ERC721 ids, or counting request ids. - * - * Include with `using Counters for Counters.Counter;` - */ -library Counters { - struct Counter { - // This variable should never be directly accessed by users of the library: interactions must be restricted to - // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add - // this feature: see https://github.com/ethereum/solidity/issues/4637 - uint256 _value; // default: 0 - } - - function current(Counter storage counter) internal view returns (uint256) { - return counter._value; - } - - function increment(Counter storage counter) internal { - unchecked { - counter._value += 1; - } - } - - function decrement(Counter storage counter) internal { - uint256 value = counter._value; - require(value > 0, "Counter: decrement overflow"); - unchecked { - counter._value = value - 1; - } - } - - function reset(Counter storage counter) internal { - counter._value = 0; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol deleted file mode 100644 index 657ebd66..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) - -pragma solidity ^0.8.0; - -import "./math/Math.sol"; -import "./math/SignedMath.sol"; - -/** - * @dev String operations. - */ -library Strings { - bytes16 private constant _SYMBOLS = "0123456789abcdef"; - uint8 private constant _ADDRESS_LENGTH = 20; - - /** - * @dev Converts a `uint256` to its ASCII `string` decimal representation. - */ - function toString(uint256 value) internal pure returns (string memory) { - unchecked { - uint256 length = Math.log10(value) + 1; - string memory buffer = new string(length); - uint256 ptr; - /// @solidity memory-safe-assembly - assembly { - ptr := add(buffer, add(32, length)) - } - while (true) { - ptr--; - /// @solidity memory-safe-assembly - assembly { - mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) - } - value /= 10; - if (value == 0) break; - } - return buffer; - } - } - - /** - * @dev Converts a `int256` to its ASCII `string` decimal representation. - */ - function toString(int256 value) internal pure returns (string memory) { - return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); - } - - /** - * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. - */ - function toHexString(uint256 value) internal pure returns (string memory) { - unchecked { - return toHexString(value, Math.log256(value) + 1); - } - } - - /** - * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. - */ - function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { - bytes memory buffer = new bytes(2 * length + 2); - buffer[0] = "0"; - buffer[1] = "x"; - for (uint256 i = 2 * length + 1; i > 1; --i) { - buffer[i] = _SYMBOLS[value & 0xf]; - value >>= 4; - } - require(value == 0, "Strings: hex length insufficient"); - return string(buffer); - } - - /** - * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. - */ - function toHexString(address addr) internal pure returns (string memory) { - return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); - } - - /** - * @dev Returns true if the two strings are equal. - */ - function equal(string memory a, string memory b) internal pure returns (bool) { - return keccak256(bytes(a)) == keccak256(bytes(b)); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol deleted file mode 100644 index 04f86645..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Timers.sol +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Timers.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Tooling for timepoints, timers and delays - * - * CAUTION: This file is deprecated as of 4.9 and will be removed in the next major release. - */ -library Timers { - struct Timestamp { - uint64 _deadline; - } - - function getDeadline(Timestamp memory timer) internal pure returns (uint64) { - return timer._deadline; - } - - function setDeadline(Timestamp storage timer, uint64 timestamp) internal { - timer._deadline = timestamp; - } - - function reset(Timestamp storage timer) internal { - timer._deadline = 0; - } - - function isUnset(Timestamp memory timer) internal pure returns (bool) { - return timer._deadline == 0; - } - - function isStarted(Timestamp memory timer) internal pure returns (bool) { - return timer._deadline > 0; - } - - function isPending(Timestamp memory timer) internal view returns (bool) { - return timer._deadline > block.timestamp; - } - - function isExpired(Timestamp memory timer) internal view returns (bool) { - return isStarted(timer) && timer._deadline <= block.timestamp; - } - - struct BlockNumber { - uint64 _deadline; - } - - function getDeadline(BlockNumber memory timer) internal pure returns (uint64) { - return timer._deadline; - } - - function setDeadline(BlockNumber storage timer, uint64 timestamp) internal { - timer._deadline = timestamp; - } - - function reset(BlockNumber storage timer) internal { - timer._deadline = 0; - } - - function isUnset(BlockNumber memory timer) internal pure returns (bool) { - return timer._deadline == 0; - } - - function isStarted(BlockNumber memory timer) internal pure returns (bool) { - return timer._deadline > 0; - } - - function isPending(BlockNumber memory timer) internal view returns (bool) { - return timer._deadline > block.number; - } - - function isExpired(BlockNumber memory timer) internal view returns (bool) { - return isStarted(timer) && timer._deadline <= block.number; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol deleted file mode 100644 index 4326e5b6..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/ECDSA.sol +++ /dev/null @@ -1,217 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) - -pragma solidity ^0.8.0; - -import "../Strings.sol"; - -/** - * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. - * - * These functions can be used to verify that a message was signed by the holder - * of the private keys of a given address. - */ -library ECDSA { - enum RecoverError { - NoError, - InvalidSignature, - InvalidSignatureLength, - InvalidSignatureS, - InvalidSignatureV // Deprecated in v4.8 - } - - function _throwError(RecoverError error) private pure { - if (error == RecoverError.NoError) { - return; // no error: do nothing - } else if (error == RecoverError.InvalidSignature) { - revert("ECDSA: invalid signature"); - } else if (error == RecoverError.InvalidSignatureLength) { - revert("ECDSA: invalid signature length"); - } else if (error == RecoverError.InvalidSignatureS) { - revert("ECDSA: invalid signature 's' value"); - } - } - - /** - * @dev Returns the address that signed a hashed message (`hash`) with - * `signature` or error string. This address can then be used for verification purposes. - * - * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: - * this function rejects them by requiring the `s` value to be in the lower - * half order, and the `v` value to be either 27 or 28. - * - * IMPORTANT: `hash` _must_ be the result of a hash operation for the - * verification to be secure: it is possible to craft signatures that - * recover to arbitrary addresses for non-hashed data. A safe way to ensure - * this is by receiving a hash of the original message (which may otherwise - * be too long), and then calling {toEthSignedMessageHash} on it. - * - * Documentation for signature generation: - * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] - * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] - * - * _Available since v4.3._ - */ - function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { - if (signature.length == 65) { - bytes32 r; - bytes32 s; - uint8 v; - // ecrecover takes the signature parameters, and the only way to get them - // currently is to use assembly. - /// @solidity memory-safe-assembly - assembly { - r := mload(add(signature, 0x20)) - s := mload(add(signature, 0x40)) - v := byte(0, mload(add(signature, 0x60))) - } - return tryRecover(hash, v, r, s); - } else { - return (address(0), RecoverError.InvalidSignatureLength); - } - } - - /** - * @dev Returns the address that signed a hashed message (`hash`) with - * `signature`. This address can then be used for verification purposes. - * - * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: - * this function rejects them by requiring the `s` value to be in the lower - * half order, and the `v` value to be either 27 or 28. - * - * IMPORTANT: `hash` _must_ be the result of a hash operation for the - * verification to be secure: it is possible to craft signatures that - * recover to arbitrary addresses for non-hashed data. A safe way to ensure - * this is by receiving a hash of the original message (which may otherwise - * be too long), and then calling {toEthSignedMessageHash} on it. - */ - function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { - (address recovered, RecoverError error) = tryRecover(hash, signature); - _throwError(error); - return recovered; - } - - /** - * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. - * - * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] - * - * _Available since v4.3._ - */ - function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { - bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); - uint8 v = uint8((uint256(vs) >> 255) + 27); - return tryRecover(hash, v, r, s); - } - - /** - * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. - * - * _Available since v4.2._ - */ - function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { - (address recovered, RecoverError error) = tryRecover(hash, r, vs); - _throwError(error); - return recovered; - } - - /** - * @dev Overload of {ECDSA-tryRecover} that receives the `v`, - * `r` and `s` signature fields separately. - * - * _Available since v4.3._ - */ - function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { - // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature - // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines - // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most - // signatures from current libraries generate a unique signature with an s-value in the lower half order. - // - // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value - // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or - // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept - // these malleable signatures as well. - if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { - return (address(0), RecoverError.InvalidSignatureS); - } - - // If the signature is valid (and not malleable), return the signer address - address signer = ecrecover(hash, v, r, s); - if (signer == address(0)) { - return (address(0), RecoverError.InvalidSignature); - } - - return (signer, RecoverError.NoError); - } - - /** - * @dev Overload of {ECDSA-recover} that receives the `v`, - * `r` and `s` signature fields separately. - */ - function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { - (address recovered, RecoverError error) = tryRecover(hash, v, r, s); - _throwError(error); - return recovered; - } - - /** - * @dev Returns an Ethereum Signed Message, created from a `hash`. This - * produces hash corresponding to the one signed with the - * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] - * JSON-RPC method as part of EIP-191. - * - * See {recover}. - */ - function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { - // 32 is the length in bytes of hash, - // enforced by the type signature above - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, "\x19Ethereum Signed Message:\n32") - mstore(0x1c, hash) - message := keccak256(0x00, 0x3c) - } - } - - /** - * @dev Returns an Ethereum Signed Message, created from `s`. This - * produces hash corresponding to the one signed with the - * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] - * JSON-RPC method as part of EIP-191. - * - * See {recover}. - */ - function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { - return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); - } - - /** - * @dev Returns an Ethereum Signed Typed Data, created from a - * `domainSeparator` and a `structHash`. This produces hash corresponding - * to the one signed with the - * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] - * JSON-RPC method as part of EIP-712. - * - * See {recover}. - */ - function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { - /// @solidity memory-safe-assembly - assembly { - let ptr := mload(0x40) - mstore(ptr, "\x19\x01") - mstore(add(ptr, 0x02), domainSeparator) - mstore(add(ptr, 0x22), structHash) - data := keccak256(ptr, 0x42) - } - } - - /** - * @dev Returns an Ethereum Signed Data with intended validator, created from a - * `validator` and `data` according to the version 0 of EIP-191. - * - * See {recover}. - */ - function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { - return keccak256(abi.encodePacked("\x19\x00", validator, data)); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol deleted file mode 100644 index 19806eac..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/MerkleProof.sol +++ /dev/null @@ -1,227 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) - -pragma solidity ^0.8.0; - -/** - * @dev These functions deal with verification of Merkle Tree proofs. - * - * The tree and the proofs can be generated using our - * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. - * You will find a quickstart guide in the readme. - * - * WARNING: You should avoid using leaf values that are 64 bytes long prior to - * hashing, or use a hash function other than keccak256 for hashing leaves. - * This is because the concatenation of a sorted pair of internal nodes in - * the merkle tree could be reinterpreted as a leaf value. - * OpenZeppelin's JavaScript library generates merkle trees that are safe - * against this attack out of the box. - */ -library MerkleProof { - /** - * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree - * defined by `root`. For this, a `proof` must be provided, containing - * sibling hashes on the branch from the leaf to the root of the tree. Each - * pair of leaves and each pair of pre-images are assumed to be sorted. - */ - function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { - return processProof(proof, leaf) == root; - } - - /** - * @dev Calldata version of {verify} - * - * _Available since v4.7._ - */ - function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { - return processProofCalldata(proof, leaf) == root; - } - - /** - * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up - * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt - * hash matches the root of the tree. When processing the proof, the pairs - * of leafs & pre-images are assumed to be sorted. - * - * _Available since v4.4._ - */ - function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { - bytes32 computedHash = leaf; - for (uint256 i = 0; i < proof.length; i++) { - computedHash = _hashPair(computedHash, proof[i]); - } - return computedHash; - } - - /** - * @dev Calldata version of {processProof} - * - * _Available since v4.7._ - */ - function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { - bytes32 computedHash = leaf; - for (uint256 i = 0; i < proof.length; i++) { - computedHash = _hashPair(computedHash, proof[i]); - } - return computedHash; - } - - /** - * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by - * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. - * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. - * - * _Available since v4.7._ - */ - function multiProofVerify( - bytes32[] memory proof, - bool[] memory proofFlags, - bytes32 root, - bytes32[] memory leaves - ) internal pure returns (bool) { - return processMultiProof(proof, proofFlags, leaves) == root; - } - - /** - * @dev Calldata version of {multiProofVerify} - * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. - * - * _Available since v4.7._ - */ - function multiProofVerifyCalldata( - bytes32[] calldata proof, - bool[] calldata proofFlags, - bytes32 root, - bytes32[] memory leaves - ) internal pure returns (bool) { - return processMultiProofCalldata(proof, proofFlags, leaves) == root; - } - - /** - * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction - * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another - * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false - * respectively. - * - * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree - * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the - * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). - * - * _Available since v4.7._ - */ - function processMultiProof( - bytes32[] memory proof, - bool[] memory proofFlags, - bytes32[] memory leaves - ) internal pure returns (bytes32 merkleRoot) { - // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by - // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the - // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of - // the merkle tree. - uint256 leavesLen = leaves.length; - uint256 proofLen = proof.length; - uint256 totalHashes = proofFlags.length; - - // Check proof validity. - require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); - - // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using - // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". - bytes32[] memory hashes = new bytes32[](totalHashes); - uint256 leafPos = 0; - uint256 hashPos = 0; - uint256 proofPos = 0; - // At each step, we compute the next hash using two values: - // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we - // get the next hash. - // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the - // `proof` array. - for (uint256 i = 0; i < totalHashes; i++) { - bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; - bytes32 b = proofFlags[i] - ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) - : proof[proofPos++]; - hashes[i] = _hashPair(a, b); - } - - if (totalHashes > 0) { - require(proofPos == proofLen, "MerkleProof: invalid multiproof"); - unchecked { - return hashes[totalHashes - 1]; - } - } else if (leavesLen > 0) { - return leaves[0]; - } else { - return proof[0]; - } - } - - /** - * @dev Calldata version of {processMultiProof}. - * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. - * - * _Available since v4.7._ - */ - function processMultiProofCalldata( - bytes32[] calldata proof, - bool[] calldata proofFlags, - bytes32[] memory leaves - ) internal pure returns (bytes32 merkleRoot) { - // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by - // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the - // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of - // the merkle tree. - uint256 leavesLen = leaves.length; - uint256 proofLen = proof.length; - uint256 totalHashes = proofFlags.length; - - // Check proof validity. - require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); - - // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using - // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". - bytes32[] memory hashes = new bytes32[](totalHashes); - uint256 leafPos = 0; - uint256 hashPos = 0; - uint256 proofPos = 0; - // At each step, we compute the next hash using two values: - // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we - // get the next hash. - // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the - // `proof` array. - for (uint256 i = 0; i < totalHashes; i++) { - bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; - bytes32 b = proofFlags[i] - ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) - : proof[proofPos++]; - hashes[i] = _hashPair(a, b); - } - - if (totalHashes > 0) { - require(proofPos == proofLen, "MerkleProof: invalid multiproof"); - unchecked { - return hashes[totalHashes - 1]; - } - } else if (leavesLen > 0) { - return leaves[0]; - } else { - return proof[0]; - } - } - - function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { - return a < b ? _efficientHash(a, b) : _efficientHash(b, a); - } - - function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, a) - mstore(0x20, b) - value := keccak256(0x00, 0x40) - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol deleted file mode 100644 index 1815d27f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/SignatureChecker.sol +++ /dev/null @@ -1,50 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) - -pragma solidity ^0.8.0; - -import "./ECDSA.sol"; -import "../../interfaces/IERC1271.sol"; - -/** - * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA - * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like - * Argent and Gnosis Safe. - * - * _Available since v4.1._ - */ -library SignatureChecker { - /** - * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the - * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. - * - * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus - * change through time. It could return true at block N and false at block N+1 (or the opposite). - */ - function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { - (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); - return - (error == ECDSA.RecoverError.NoError && recovered == signer) || - isValidERC1271SignatureNow(signer, hash, signature); - } - - /** - * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated - * against the signer smart contract using ERC1271. - * - * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus - * change through time. It could return true at block N and false at block N+1 (or the opposite). - */ - function isValidERC1271SignatureNow( - address signer, - bytes32 hash, - bytes memory signature - ) internal view returns (bool) { - (bool success, bytes memory result) = signer.staticcall( - abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) - ); - return (success && - result.length >= 32 && - abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol deleted file mode 100644 index fdae3ba3..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/draft-EIP712.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol) - -pragma solidity ^0.8.0; - -// EIP-712 is Final as of 2022-08-11. This file is deprecated. - -import "./EIP712.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol deleted file mode 100644 index 87f53815..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/ConditionalEscrow.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/escrow/ConditionalEscrow.sol) - -pragma solidity ^0.8.0; - -import "./Escrow.sol"; - -/** - * @title ConditionalEscrow - * @dev Base abstract escrow to only allow withdrawal if a condition is met. - * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. - */ -abstract contract ConditionalEscrow is Escrow { - /** - * @dev Returns whether an address is allowed to withdraw their funds. To be - * implemented by derived contracts. - * @param payee The destination address of the funds. - */ - function withdrawalAllowed(address payee) public view virtual returns (bool); - - function withdraw(address payable payee) public virtual override { - require(withdrawalAllowed(payee), "ConditionalEscrow: payee is not allowed to withdraw"); - super.withdraw(payee); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol deleted file mode 100644 index 48dd51ab..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/Escrow.sol +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (utils/escrow/Escrow.sol) - -pragma solidity ^0.8.0; - -import "../../access/Ownable.sol"; -import "../Address.sol"; - -/** - * @title Escrow - * @dev Base escrow contract, holds funds designated for a payee until they - * withdraw them. - * - * Intended usage: This contract (and derived escrow contracts) should be a - * standalone contract, that only interacts with the contract that instantiated - * it. That way, it is guaranteed that all Ether will be handled according to - * the `Escrow` rules, and there is no need to check for payable functions or - * transfers in the inheritance tree. The contract that uses the escrow as its - * payment method should be its owner, and provide public methods redirecting - * to the escrow's deposit and withdraw. - */ -contract Escrow is Ownable { - using Address for address payable; - - event Deposited(address indexed payee, uint256 weiAmount); - event Withdrawn(address indexed payee, uint256 weiAmount); - - mapping(address => uint256) private _deposits; - - function depositsOf(address payee) public view returns (uint256) { - return _deposits[payee]; - } - - /** - * @dev Stores the sent amount as credit to be withdrawn. - * @param payee The destination address of the funds. - * - * Emits a {Deposited} event. - */ - function deposit(address payee) public payable virtual onlyOwner { - uint256 amount = msg.value; - _deposits[payee] += amount; - emit Deposited(payee, amount); - } - - /** - * @dev Withdraw accumulated balance for a payee, forwarding all gas to the - * recipient. - * - * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. - * Make sure you trust the recipient, or are either following the - * checks-effects-interactions pattern or using {ReentrancyGuard}. - * - * @param payee The address whose funds will be withdrawn and transferred to. - * - * Emits a {Withdrawn} event. - */ - function withdraw(address payable payee) public virtual onlyOwner { - uint256 payment = _deposits[payee]; - - _deposits[payee] = 0; - - payee.sendValue(payment); - - emit Withdrawn(payee, payment); - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol deleted file mode 100644 index 0e9621fe..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/escrow/RefundEscrow.sol +++ /dev/null @@ -1,100 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/escrow/RefundEscrow.sol) - -pragma solidity ^0.8.0; - -import "./ConditionalEscrow.sol"; - -/** - * @title RefundEscrow - * @dev Escrow that holds funds for a beneficiary, deposited from multiple - * parties. - * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. - * @dev The owner account (that is, the contract that instantiates this - * contract) may deposit, close the deposit period, and allow for either - * withdrawal by the beneficiary, or refunds to the depositors. All interactions - * with `RefundEscrow` will be made through the owner contract. - */ -contract RefundEscrow is ConditionalEscrow { - using Address for address payable; - - enum State { - Active, - Refunding, - Closed - } - - event RefundsClosed(); - event RefundsEnabled(); - - State private _state; - address payable private immutable _beneficiary; - - /** - * @dev Constructor. - * @param beneficiary_ The beneficiary of the deposits. - */ - constructor(address payable beneficiary_) { - require(beneficiary_ != address(0), "RefundEscrow: beneficiary is the zero address"); - _beneficiary = beneficiary_; - _state = State.Active; - } - - /** - * @return The current state of the escrow. - */ - function state() public view virtual returns (State) { - return _state; - } - - /** - * @return The beneficiary of the escrow. - */ - function beneficiary() public view virtual returns (address payable) { - return _beneficiary; - } - - /** - * @dev Stores funds that may later be refunded. - * @param refundee The address funds will be sent to if a refund occurs. - */ - function deposit(address refundee) public payable virtual override { - require(state() == State.Active, "RefundEscrow: can only deposit while active"); - super.deposit(refundee); - } - - /** - * @dev Allows for the beneficiary to withdraw their funds, rejecting - * further deposits. - */ - function close() public virtual onlyOwner { - require(state() == State.Active, "RefundEscrow: can only close while active"); - _state = State.Closed; - emit RefundsClosed(); - } - - /** - * @dev Allows for refunds to take place, rejecting further deposits. - */ - function enableRefunds() public virtual onlyOwner { - require(state() == State.Active, "RefundEscrow: can only enable refunds while active"); - _state = State.Refunding; - emit RefundsEnabled(); - } - - /** - * @dev Withdraws the beneficiary's funds. - */ - function beneficiaryWithdraw() public virtual { - require(state() == State.Closed, "RefundEscrow: beneficiary can only withdraw while closed"); - beneficiary().sendValue(address(this).balance); - } - - /** - * @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a - * 'payee' argument, but we ignore it here since the condition is global, not per-payee. - */ - function withdrawalAllowed(address) public view override returns (bool) { - return state() == State.Refunding; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol deleted file mode 100644 index c99d9f3f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Storage.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol) - -pragma solidity ^0.8.0; - -import "./ERC165.sol"; - -/** - * @dev Storage based implementation of the {IERC165} interface. - * - * Contracts may inherit from this and call {_registerInterface} to declare - * their support of an interface. - */ -abstract contract ERC165Storage is ERC165 { - /** - * @dev Mapping of interface ids to whether or not it's supported. - */ - mapping(bytes4 => bool) private _supportedInterfaces; - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; - } - - /** - * @dev Registers the contract as an implementer of the interface defined by - * `interfaceId`. Support of the actual ERC165 interface is automatic and - * registering its interface id is not required. - * - * See {IERC165-supportsInterface}. - * - * Requirements: - * - * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). - */ - function _registerInterface(bytes4 interfaceId) internal virtual { - require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); - _supportedInterfaces[interfaceId] = true; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol deleted file mode 100644 index 7a684ede..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC1820Implementer.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC1820Implementer.sol) - -pragma solidity ^0.8.0; - -import "./IERC1820Implementer.sol"; - -/** - * @dev Implementation of the {IERC1820Implementer} interface. - * - * Contracts may inherit from this and call {_registerInterfaceForAddress} to - * declare their willingness to be implementers. - * {IERC1820Registry-setInterfaceImplementer} should then be called for the - * registration to be complete. - * - * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. - */ -contract ERC1820Implementer is IERC1820Implementer { - bytes32 private constant _ERC1820_ACCEPT_MAGIC = keccak256("ERC1820_ACCEPT_MAGIC"); - - mapping(bytes32 => mapping(address => bool)) private _supportedInterfaces; - - /** - * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}. - */ - function canImplementInterfaceForAddress( - bytes32 interfaceHash, - address account - ) public view virtual override returns (bytes32) { - return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00); - } - - /** - * @dev Declares the contract as willing to be an implementer of - * `interfaceHash` for `account`. - * - * See {IERC1820Registry-setInterfaceImplementer} and - * {IERC1820Registry-interfaceHash}. - */ - function _registerInterfaceForAddress(bytes32 interfaceHash, address account) internal virtual { - _supportedInterfaces[interfaceHash][account] = true; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol deleted file mode 100644 index 551b1a51..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/Math.sol +++ /dev/null @@ -1,339 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Standard math utilities missing in the Solidity language. - */ -library Math { - enum Rounding { - Down, // Toward negative infinity - Up, // Toward infinity - Zero // Toward zero - } - - /** - * @dev Returns the largest of two numbers. - */ - function max(uint256 a, uint256 b) internal pure returns (uint256) { - return a > b ? a : b; - } - - /** - * @dev Returns the smallest of two numbers. - */ - function min(uint256 a, uint256 b) internal pure returns (uint256) { - return a < b ? a : b; - } - - /** - * @dev Returns the average of two numbers. The result is rounded towards - * zero. - */ - function average(uint256 a, uint256 b) internal pure returns (uint256) { - // (a + b) / 2 can overflow. - return (a & b) + (a ^ b) / 2; - } - - /** - * @dev Returns the ceiling of the division of two numbers. - * - * This differs from standard division with `/` in that it rounds up instead - * of rounding down. - */ - function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { - // (a + b - 1) / b can overflow on addition, so we distribute. - return a == 0 ? 0 : (a - 1) / b + 1; - } - - /** - * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 - * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) - * with further edits by Uniswap Labs also under MIT license. - */ - function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { - unchecked { - // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use - // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 - // variables such that product = prod1 * 2^256 + prod0. - uint256 prod0; // Least significant 256 bits of the product - uint256 prod1; // Most significant 256 bits of the product - assembly { - let mm := mulmod(x, y, not(0)) - prod0 := mul(x, y) - prod1 := sub(sub(mm, prod0), lt(mm, prod0)) - } - - // Handle non-overflow cases, 256 by 256 division. - if (prod1 == 0) { - // Solidity will revert if denominator == 0, unlike the div opcode on its own. - // The surrounding unchecked block does not change this fact. - // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. - return prod0 / denominator; - } - - // Make sure the result is less than 2^256. Also prevents denominator == 0. - require(denominator > prod1, "Math: mulDiv overflow"); - - /////////////////////////////////////////////// - // 512 by 256 division. - /////////////////////////////////////////////// - - // Make division exact by subtracting the remainder from [prod1 prod0]. - uint256 remainder; - assembly { - // Compute remainder using mulmod. - remainder := mulmod(x, y, denominator) - - // Subtract 256 bit number from 512 bit number. - prod1 := sub(prod1, gt(remainder, prod0)) - prod0 := sub(prod0, remainder) - } - - // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. - // See https://cs.stackexchange.com/q/138556/92363. - - // Does not overflow because the denominator cannot be zero at this stage in the function. - uint256 twos = denominator & (~denominator + 1); - assembly { - // Divide denominator by twos. - denominator := div(denominator, twos) - - // Divide [prod1 prod0] by twos. - prod0 := div(prod0, twos) - - // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. - twos := add(div(sub(0, twos), twos), 1) - } - - // Shift in bits from prod1 into prod0. - prod0 |= prod1 * twos; - - // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such - // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for - // four bits. That is, denominator * inv = 1 mod 2^4. - uint256 inverse = (3 * denominator) ^ 2; - - // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works - // in modular arithmetic, doubling the correct bits in each step. - inverse *= 2 - denominator * inverse; // inverse mod 2^8 - inverse *= 2 - denominator * inverse; // inverse mod 2^16 - inverse *= 2 - denominator * inverse; // inverse mod 2^32 - inverse *= 2 - denominator * inverse; // inverse mod 2^64 - inverse *= 2 - denominator * inverse; // inverse mod 2^128 - inverse *= 2 - denominator * inverse; // inverse mod 2^256 - - // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. - // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is - // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 - // is no longer required. - result = prod0 * inverse; - return result; - } - } - - /** - * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. - */ - function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { - uint256 result = mulDiv(x, y, denominator); - if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { - result += 1; - } - return result; - } - - /** - * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. - * - * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). - */ - function sqrt(uint256 a) internal pure returns (uint256) { - if (a == 0) { - return 0; - } - - // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. - // - // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have - // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. - // - // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` - // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` - // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` - // - // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. - uint256 result = 1 << (log2(a) >> 1); - - // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, - // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at - // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision - // into the expected uint128 result. - unchecked { - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - return min(result, a / result); - } - } - - /** - * @notice Calculates sqrt(a), following the selected rounding direction. - */ - function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = sqrt(a); - return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); - } - } - - /** - * @dev Return the log in base 2, rounded down, of a positive value. - * Returns 0 if given 0. - */ - function log2(uint256 value) internal pure returns (uint256) { - uint256 result = 0; - unchecked { - if (value >> 128 > 0) { - value >>= 128; - result += 128; - } - if (value >> 64 > 0) { - value >>= 64; - result += 64; - } - if (value >> 32 > 0) { - value >>= 32; - result += 32; - } - if (value >> 16 > 0) { - value >>= 16; - result += 16; - } - if (value >> 8 > 0) { - value >>= 8; - result += 8; - } - if (value >> 4 > 0) { - value >>= 4; - result += 4; - } - if (value >> 2 > 0) { - value >>= 2; - result += 2; - } - if (value >> 1 > 0) { - result += 1; - } - } - return result; - } - - /** - * @dev Return the log in base 2, following the selected rounding direction, of a positive value. - * Returns 0 if given 0. - */ - function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = log2(value); - return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); - } - } - - /** - * @dev Return the log in base 10, rounded down, of a positive value. - * Returns 0 if given 0. - */ - function log10(uint256 value) internal pure returns (uint256) { - uint256 result = 0; - unchecked { - if (value >= 10 ** 64) { - value /= 10 ** 64; - result += 64; - } - if (value >= 10 ** 32) { - value /= 10 ** 32; - result += 32; - } - if (value >= 10 ** 16) { - value /= 10 ** 16; - result += 16; - } - if (value >= 10 ** 8) { - value /= 10 ** 8; - result += 8; - } - if (value >= 10 ** 4) { - value /= 10 ** 4; - result += 4; - } - if (value >= 10 ** 2) { - value /= 10 ** 2; - result += 2; - } - if (value >= 10 ** 1) { - result += 1; - } - } - return result; - } - - /** - * @dev Return the log in base 10, following the selected rounding direction, of a positive value. - * Returns 0 if given 0. - */ - function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = log10(value); - return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); - } - } - - /** - * @dev Return the log in base 256, rounded down, of a positive value. - * Returns 0 if given 0. - * - * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. - */ - function log256(uint256 value) internal pure returns (uint256) { - uint256 result = 0; - unchecked { - if (value >> 128 > 0) { - value >>= 128; - result += 16; - } - if (value >> 64 > 0) { - value >>= 64; - result += 8; - } - if (value >> 32 > 0) { - value >>= 32; - result += 4; - } - if (value >> 16 > 0) { - value >>= 16; - result += 2; - } - if (value >> 8 > 0) { - result += 1; - } - } - return result; - } - - /** - * @dev Return the log in base 256, following the selected rounding direction, of a positive value. - * Returns 0 if given 0. - */ - function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = log256(value); - return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol deleted file mode 100644 index f7315a61..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeMath.sol +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) - -pragma solidity ^0.8.0; - -// CAUTION -// This version of SafeMath should only be used with Solidity 0.8 or later, -// because it relies on the compiler's built in overflow checks. - -/** - * @dev Wrappers over Solidity's arithmetic operations. - * - * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler - * now has built in overflow checking. - */ -library SafeMath { - /** - * @dev Returns the addition of two unsigned integers, with an overflow flag. - * - * _Available since v3.4._ - */ - function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - uint256 c = a + b; - if (c < a) return (false, 0); - return (true, c); - } - } - - /** - * @dev Returns the subtraction of two unsigned integers, with an overflow flag. - * - * _Available since v3.4._ - */ - function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - if (b > a) return (false, 0); - return (true, a - b); - } - } - - /** - * @dev Returns the multiplication of two unsigned integers, with an overflow flag. - * - * _Available since v3.4._ - */ - function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - // Gas optimization: this is cheaper than requiring 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 - if (a == 0) return (true, 0); - uint256 c = a * b; - if (c / a != b) return (false, 0); - return (true, c); - } - } - - /** - * @dev Returns the division of two unsigned integers, with a division by zero flag. - * - * _Available since v3.4._ - */ - function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - if (b == 0) return (false, 0); - return (true, a / b); - } - } - - /** - * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. - * - * _Available since v3.4._ - */ - function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - if (b == 0) return (false, 0); - return (true, a % b); - } - } - - /** - * @dev Returns the addition of two unsigned integers, reverting on - * overflow. - * - * Counterpart to Solidity's `+` operator. - * - * Requirements: - * - * - Addition cannot overflow. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256) { - return a + b; - } - - /** - * @dev Returns the subtraction of two unsigned integers, reverting on - * overflow (when the result is negative). - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - * - Subtraction cannot overflow. - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - return a - b; - } - - /** - * @dev Returns the multiplication of two unsigned integers, reverting on - * overflow. - * - * Counterpart to Solidity's `*` operator. - * - * Requirements: - * - * - Multiplication cannot overflow. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256) { - return a * b; - } - - /** - * @dev Returns the integer division of two unsigned integers, reverting on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - return a / b; - } - - /** - * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), - * reverting when dividing by zero. - * - * Counterpart to Solidity's `%` operator. This function uses a `revert` - * opcode (which leaves remaining gas untouched) while Solidity uses an - * invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function mod(uint256 a, uint256 b) internal pure returns (uint256) { - return a % b; - } - - /** - * @dev Returns the subtraction of two unsigned integers, reverting with custom message on - * overflow (when the result is negative). - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {trySub}. - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - * - Subtraction cannot overflow. - */ - function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - unchecked { - require(b <= a, errorMessage); - return a - b; - } - } - - /** - * @dev Returns the integer division of two unsigned integers, reverting with custom message on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. Note: this function uses a - * `revert` opcode (which leaves remaining gas untouched) while Solidity - * uses an invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - unchecked { - require(b > 0, errorMessage); - return a / b; - } - } - - /** - * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), - * reverting with custom message when dividing by zero. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryMod}. - * - * Counterpart to Solidity's `%` operator. This function uses a `revert` - * opcode (which leaves remaining gas untouched) while Solidity uses an - * invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - unchecked { - require(b > 0, errorMessage); - return a % b; - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol deleted file mode 100644 index 3ea9f8bf..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedMath.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Standard signed math utilities missing in the Solidity language. - */ -library SignedMath { - /** - * @dev Returns the largest of two signed numbers. - */ - function max(int256 a, int256 b) internal pure returns (int256) { - return a > b ? a : b; - } - - /** - * @dev Returns the smallest of two signed numbers. - */ - function min(int256 a, int256 b) internal pure returns (int256) { - return a < b ? a : b; - } - - /** - * @dev Returns the average of two signed numbers without overflow. - * The result is rounded towards zero. - */ - function average(int256 a, int256 b) internal pure returns (int256) { - // Formula from the book "Hacker's Delight" - int256 x = (a & b) + ((a ^ b) >> 1); - return x + (int256(uint256(x) >> 255) & (a ^ b)); - } - - /** - * @dev Returns the absolute unsigned value of a signed value. - */ - function abs(int256 n) internal pure returns (uint256) { - unchecked { - // must be unchecked in order to support `n = type(int256).min` - return uint256(n >= 0 ? n : -n); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol deleted file mode 100644 index 6704d4ce..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SignedSafeMath.sol +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Wrappers over Solidity's arithmetic operations. - * - * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler - * now has built in overflow checking. - */ -library SignedSafeMath { - /** - * @dev Returns the multiplication of two signed integers, reverting on - * overflow. - * - * Counterpart to Solidity's `*` operator. - * - * Requirements: - * - * - Multiplication cannot overflow. - */ - function mul(int256 a, int256 b) internal pure returns (int256) { - return a * b; - } - - /** - * @dev Returns the integer division of two signed integers. Reverts on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function div(int256 a, int256 b) internal pure returns (int256) { - return a / b; - } - - /** - * @dev Returns the subtraction of two signed integers, reverting on - * overflow. - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - * - Subtraction cannot overflow. - */ - function sub(int256 a, int256 b) internal pure returns (int256) { - return a - b; - } - - /** - * @dev Returns the addition of two signed integers, reverting on - * overflow. - * - * Counterpart to Solidity's `+` operator. - * - * Requirements: - * - * - Addition cannot overflow. - */ - function add(int256 a, int256 b) internal pure returns (int256) { - return a + b; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol deleted file mode 100644 index 325918d2..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/DoubleEndedQueue.sol +++ /dev/null @@ -1,170 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/DoubleEndedQueue.sol) -pragma solidity ^0.8.4; - -import "../math/SafeCast.sol"; - -/** - * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of - * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and - * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that - * the existing queue contents are left in storage. - * - * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be - * used in storage, and not in memory. - * ```solidity - * DoubleEndedQueue.Bytes32Deque queue; - * ``` - * - * _Available since v4.6._ - */ -library DoubleEndedQueue { - /** - * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty. - */ - error Empty(); - - /** - * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds. - */ - error OutOfBounds(); - - /** - * @dev Indices are signed integers because the queue can grow in any direction. They are 128 bits so begin and end - * are packed in a single storage slot for efficient access. Since the items are added one at a time we can safely - * assume that these 128-bit indices will not overflow, and use unchecked arithmetic. - * - * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to - * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and - * lead to unexpected behavior. - * - * Indices are in the range [begin, end) which means the first item is at data[begin] and the last item is at - * data[end - 1]. - */ - struct Bytes32Deque { - int128 _begin; - int128 _end; - mapping(int128 => bytes32) _data; - } - - /** - * @dev Inserts an item at the end of the queue. - */ - function pushBack(Bytes32Deque storage deque, bytes32 value) internal { - int128 backIndex = deque._end; - deque._data[backIndex] = value; - unchecked { - deque._end = backIndex + 1; - } - } - - /** - * @dev Removes the item at the end of the queue and returns it. - * - * Reverts with `Empty` if the queue is empty. - */ - function popBack(Bytes32Deque storage deque) internal returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 backIndex; - unchecked { - backIndex = deque._end - 1; - } - value = deque._data[backIndex]; - delete deque._data[backIndex]; - deque._end = backIndex; - } - - /** - * @dev Inserts an item at the beginning of the queue. - */ - function pushFront(Bytes32Deque storage deque, bytes32 value) internal { - int128 frontIndex; - unchecked { - frontIndex = deque._begin - 1; - } - deque._data[frontIndex] = value; - deque._begin = frontIndex; - } - - /** - * @dev Removes the item at the beginning of the queue and returns it. - * - * Reverts with `Empty` if the queue is empty. - */ - function popFront(Bytes32Deque storage deque) internal returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 frontIndex = deque._begin; - value = deque._data[frontIndex]; - delete deque._data[frontIndex]; - unchecked { - deque._begin = frontIndex + 1; - } - } - - /** - * @dev Returns the item at the beginning of the queue. - * - * Reverts with `Empty` if the queue is empty. - */ - function front(Bytes32Deque storage deque) internal view returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 frontIndex = deque._begin; - return deque._data[frontIndex]; - } - - /** - * @dev Returns the item at the end of the queue. - * - * Reverts with `Empty` if the queue is empty. - */ - function back(Bytes32Deque storage deque) internal view returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 backIndex; - unchecked { - backIndex = deque._end - 1; - } - return deque._data[backIndex]; - } - - /** - * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at - * `length(deque) - 1`. - * - * Reverts with `OutOfBounds` if the index is out of bounds. - */ - function at(Bytes32Deque storage deque, uint256 index) internal view returns (bytes32 value) { - // int256(deque._begin) is a safe upcast - int128 idx = SafeCast.toInt128(int256(deque._begin) + SafeCast.toInt256(index)); - if (idx >= deque._end) revert OutOfBounds(); - return deque._data[idx]; - } - - /** - * @dev Resets the queue back to being empty. - * - * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses - * out on potential gas refunds. - */ - function clear(Bytes32Deque storage deque) internal { - deque._begin = 0; - deque._end = 0; - } - - /** - * @dev Returns the number of items in the queue. - */ - function length(Bytes32Deque storage deque) internal view returns (uint256) { - // The interface preserves the invariant that begin <= end so we assume this will not overflow. - // We also assume there are at most int256.max items in the queue. - unchecked { - return uint256(int256(deque._end) - int256(deque._begin)); - } - } - - /** - * @dev Returns true if the queue is empty. - */ - function empty(Bytes32Deque storage deque) internal view returns (bool) { - return deque._end <= deque._begin; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol deleted file mode 100644 index c49d2d67..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableMap.sol +++ /dev/null @@ -1,598 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableMap.sol) -// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js. - -pragma solidity ^0.8.0; - -import "./EnumerableSet.sol"; - -/** - * @dev Library for managing an enumerable variant of Solidity's - * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] - * type. - * - * Maps have the following properties: - * - * - Entries are added, removed, and checked for existence in constant time - * (O(1)). - * - Entries are enumerated in O(n). No guarantees are made on the ordering. - * - * ```solidity - * contract Example { - * // Add the library methods - * using EnumerableMap for EnumerableMap.UintToAddressMap; - * - * // Declare a set state variable - * EnumerableMap.UintToAddressMap private myMap; - * } - * ``` - * - * The following map types are supported: - * - * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0 - * - `address -> uint256` (`AddressToUintMap`) since v4.6.0 - * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0 - * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0 - * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0 - * - * [WARNING] - * ==== - * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure - * unusable. - * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. - * - * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an - * array of EnumerableMap. - * ==== - */ -library EnumerableMap { - using EnumerableSet for EnumerableSet.Bytes32Set; - - // To implement this library for multiple types with as little code - // repetition as possible, we write it in terms of a generic Map type with - // bytes32 keys and values. - // The Map implementation uses private functions, and user-facing - // implementations (such as Uint256ToAddressMap) are just wrappers around - // the underlying Map. - // This means that we can only create new EnumerableMaps for types that fit - // in bytes32. - - struct Bytes32ToBytes32Map { - // Storage of keys - EnumerableSet.Bytes32Set _keys; - mapping(bytes32 => bytes32) _values; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) { - map._values[key] = value; - return map._keys.add(key); - } - - /** - * @dev Removes a key-value pair from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) { - delete map._values[key]; - return map._keys.remove(key); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) { - return map._keys.contains(key); - } - - /** - * @dev Returns the number of key-value pairs in the map. O(1). - */ - function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) { - return map._keys.length(); - } - - /** - * @dev Returns the key-value pair stored at position `index` in the map. O(1). - * - * Note that there are no guarantees on the ordering of entries inside the - * array, and it may change when more entries are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32, bytes32) { - bytes32 key = map._keys.at(index); - return (key, map._values[key]); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) { - bytes32 value = map._values[key]; - if (value == bytes32(0)) { - return (contains(map, key), bytes32(0)); - } else { - return (true, value); - } - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) { - bytes32 value = map._values[key]; - require(value != 0 || contains(map, key), "EnumerableMap: nonexistent key"); - return value; - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - Bytes32ToBytes32Map storage map, - bytes32 key, - string memory errorMessage - ) internal view returns (bytes32) { - bytes32 value = map._values[key]; - require(value != 0 || contains(map, key), errorMessage); - return value; - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(Bytes32ToBytes32Map storage map) internal view returns (bytes32[] memory) { - return map._keys.values(); - } - - // UintToUintMap - - struct UintToUintMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) { - return set(map._inner, bytes32(key), bytes32(value)); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(UintToUintMap storage map, uint256 key) internal returns (bool) { - return remove(map._inner, bytes32(key)); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) { - return contains(map._inner, bytes32(key)); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(UintToUintMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(UintToUintMap storage map, uint256 index) internal view returns (uint256, uint256) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (uint256(key), uint256(value)); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) { - (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); - return (success, uint256(value)); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(key))); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get(UintToUintMap storage map, uint256 key, string memory errorMessage) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(key), errorMessage)); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(UintToUintMap storage map) internal view returns (uint256[] memory) { - bytes32[] memory store = keys(map._inner); - uint256[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // UintToAddressMap - - struct UintToAddressMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { - return set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { - return remove(map._inner, bytes32(key)); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { - return contains(map._inner, bytes32(key)); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(UintToAddressMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (uint256(key), address(uint160(uint256(value)))); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { - (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); - return (success, address(uint160(uint256(value)))); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { - return address(uint160(uint256(get(map._inner, bytes32(key))))); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - UintToAddressMap storage map, - uint256 key, - string memory errorMessage - ) internal view returns (address) { - return address(uint160(uint256(get(map._inner, bytes32(key), errorMessage)))); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(UintToAddressMap storage map) internal view returns (uint256[] memory) { - bytes32[] memory store = keys(map._inner); - uint256[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // AddressToUintMap - - struct AddressToUintMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) { - return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value)); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(AddressToUintMap storage map, address key) internal returns (bool) { - return remove(map._inner, bytes32(uint256(uint160(key)))); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(AddressToUintMap storage map, address key) internal view returns (bool) { - return contains(map._inner, bytes32(uint256(uint160(key)))); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(AddressToUintMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (address(uint160(uint256(key))), uint256(value)); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) { - (bool success, bytes32 value) = tryGet(map._inner, bytes32(uint256(uint160(key)))); - return (success, uint256(value)); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(AddressToUintMap storage map, address key) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(uint256(uint160(key))))); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - AddressToUintMap storage map, - address key, - string memory errorMessage - ) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(uint256(uint160(key))), errorMessage)); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(AddressToUintMap storage map) internal view returns (address[] memory) { - bytes32[] memory store = keys(map._inner); - address[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // Bytes32ToUintMap - - struct Bytes32ToUintMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) { - return set(map._inner, key, bytes32(value)); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) { - return remove(map._inner, key); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) { - return contains(map._inner, key); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(Bytes32ToUintMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (key, uint256(value)); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) { - (bool success, bytes32 value) = tryGet(map._inner, key); - return (success, uint256(value)); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) { - return uint256(get(map._inner, key)); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - Bytes32ToUintMap storage map, - bytes32 key, - string memory errorMessage - ) internal view returns (uint256) { - return uint256(get(map._inner, key, errorMessage)); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(Bytes32ToUintMap storage map) internal view returns (bytes32[] memory) { - bytes32[] memory store = keys(map._inner); - bytes32[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol b/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol deleted file mode 100644 index 447f9630..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/EnumerableSet.sol +++ /dev/null @@ -1,378 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) -// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. - -pragma solidity ^0.8.0; - -/** - * @dev Library for managing - * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive - * types. - * - * Sets have the following properties: - * - * - Elements are added, removed, and checked for existence in constant time - * (O(1)). - * - Elements are enumerated in O(n). No guarantees are made on the ordering. - * - * ```solidity - * contract Example { - * // Add the library methods - * using EnumerableSet for EnumerableSet.AddressSet; - * - * // Declare a set state variable - * EnumerableSet.AddressSet private mySet; - * } - * ``` - * - * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) - * and `uint256` (`UintSet`) are supported. - * - * [WARNING] - * ==== - * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure - * unusable. - * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. - * - * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an - * array of EnumerableSet. - * ==== - */ -library EnumerableSet { - // To implement this library for multiple types with as little code - // repetition as possible, we write it in terms of a generic Set type with - // bytes32 values. - // The Set implementation uses private functions, and user-facing - // implementations (such as AddressSet) are just wrappers around the - // underlying Set. - // This means that we can only create new EnumerableSets for types that fit - // in bytes32. - - struct Set { - // Storage of set values - bytes32[] _values; - // Position of the value in the `values` array, plus 1 because index 0 - // means a value is not in the set. - mapping(bytes32 => uint256) _indexes; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function _add(Set storage set, bytes32 value) private returns (bool) { - if (!_contains(set, value)) { - set._values.push(value); - // The value is stored at length-1, but we add 1 to all indexes - // and use 0 as a sentinel value - set._indexes[value] = set._values.length; - return true; - } else { - return false; - } - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function _remove(Set storage set, bytes32 value) private returns (bool) { - // We read and store the value's index to prevent multiple reads from the same storage slot - uint256 valueIndex = set._indexes[value]; - - if (valueIndex != 0) { - // Equivalent to contains(set, value) - // To delete an element from the _values array in O(1), we swap the element to delete with the last one in - // the array, and then remove the last element (sometimes called as 'swap and pop'). - // This modifies the order of the array, as noted in {at}. - - uint256 toDeleteIndex = valueIndex - 1; - uint256 lastIndex = set._values.length - 1; - - if (lastIndex != toDeleteIndex) { - bytes32 lastValue = set._values[lastIndex]; - - // Move the last value to the index where the value to delete is - set._values[toDeleteIndex] = lastValue; - // Update the index for the moved value - set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex - } - - // Delete the slot where the moved value was stored - set._values.pop(); - - // Delete the index for the deleted slot - delete set._indexes[value]; - - return true; - } else { - return false; - } - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function _contains(Set storage set, bytes32 value) private view returns (bool) { - return set._indexes[value] != 0; - } - - /** - * @dev Returns the number of values on the set. O(1). - */ - function _length(Set storage set) private view returns (uint256) { - return set._values.length; - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function _at(Set storage set, uint256 index) private view returns (bytes32) { - return set._values[index]; - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function _values(Set storage set) private view returns (bytes32[] memory) { - return set._values; - } - - // Bytes32Set - - struct Bytes32Set { - Set _inner; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { - return _add(set._inner, value); - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { - return _remove(set._inner, value); - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { - return _contains(set._inner, value); - } - - /** - * @dev Returns the number of values in the set. O(1). - */ - function length(Bytes32Set storage set) internal view returns (uint256) { - return _length(set._inner); - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { - return _at(set._inner, index); - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { - bytes32[] memory store = _values(set._inner); - bytes32[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // AddressSet - - struct AddressSet { - Set _inner; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function add(AddressSet storage set, address value) internal returns (bool) { - return _add(set._inner, bytes32(uint256(uint160(value)))); - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function remove(AddressSet storage set, address value) internal returns (bool) { - return _remove(set._inner, bytes32(uint256(uint160(value)))); - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function contains(AddressSet storage set, address value) internal view returns (bool) { - return _contains(set._inner, bytes32(uint256(uint160(value)))); - } - - /** - * @dev Returns the number of values in the set. O(1). - */ - function length(AddressSet storage set) internal view returns (uint256) { - return _length(set._inner); - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(AddressSet storage set, uint256 index) internal view returns (address) { - return address(uint160(uint256(_at(set._inner, index)))); - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function values(AddressSet storage set) internal view returns (address[] memory) { - bytes32[] memory store = _values(set._inner); - address[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // UintSet - - struct UintSet { - Set _inner; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function add(UintSet storage set, uint256 value) internal returns (bool) { - return _add(set._inner, bytes32(value)); - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function remove(UintSet storage set, uint256 value) internal returns (bool) { - return _remove(set._inner, bytes32(value)); - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function contains(UintSet storage set, uint256 value) internal view returns (bool) { - return _contains(set._inner, bytes32(value)); - } - - /** - * @dev Returns the number of values in the set. O(1). - */ - function length(UintSet storage set) internal view returns (uint256) { - return _length(set._inner); - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(UintSet storage set, uint256 index) internal view returns (uint256) { - return uint256(_at(set._inner, index)); - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function values(UintSet storage set) internal view returns (uint256[] memory) { - bytes32[] memory store = _values(set._inner); - uint256[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol deleted file mode 100644 index 658f7260..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/amb/IAMB.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/amb/IAMB.sol) -pragma solidity ^0.8.0; - -interface IAMB { - event UserRequestForAffirmation(bytes32 indexed messageId, bytes encodedData); - event UserRequestForSignature(bytes32 indexed messageId, bytes encodedData); - event AffirmationCompleted( - address indexed sender, - address indexed executor, - bytes32 indexed messageId, - bool status - ); - event RelayedMessage(address indexed sender, address indexed executor, bytes32 indexed messageId, bool status); - - function messageSender() external view returns (address); - - function maxGasPerTx() external view returns (uint256); - - function transactionHash() external view returns (bytes32); - - function messageId() external view returns (bytes32); - - function messageSourceChainId() external view returns (bytes32); - - function messageCallStatus(bytes32 _messageId) external view returns (bool); - - function failedMessageDataHash(bytes32 _messageId) external view returns (bytes32); - - function failedMessageReceiver(bytes32 _messageId) external view returns (address); - - function failedMessageSender(bytes32 _messageId) external view returns (address); - - function requireToPassMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); - - function requireToConfirmMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); - - function sourceChainId() external view returns (uint256); - - function destinationChainId() external view returns (uint256); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol deleted file mode 100644 index ea4e7504..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IArbSys.sol +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IArbSys.sol) - -pragma solidity >=0.4.21 <0.9.0; - -/** - * @title System level functionality - * @notice For use by contracts to interact with core L2-specific functionality. - * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. - */ -interface IArbSys { - /** - * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) - * @return block number as int - */ - function arbBlockNumber() external view returns (uint256); - - /** - * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum) - * @return block hash - */ - function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32); - - /** - * @notice Gets the rollup's unique chain identifier - * @return Chain identifier as int - */ - function arbChainID() external view returns (uint256); - - /** - * @notice Get internal version number identifying an ArbOS build - * @return version number as int - */ - function arbOSVersion() external view returns (uint256); - - /** - * @notice Returns 0 since Nitro has no concept of storage gas - * @return uint 0 - */ - function getStorageGasAvailable() external view returns (uint256); - - /** - * @notice (deprecated) check if current call is top level (meaning it was triggered by an EoA or a L1 contract) - * @dev this call has been deprecated and may be removed in a future release - * @return true if current execution frame is not a call by another L2 contract - */ - function isTopLevelCall() external view returns (bool); - - /** - * @notice map L1 sender contract address to its L2 alias - * @param sender sender address - * @param unused argument no longer used - * @return aliased sender address - */ - function mapL1SenderContractAddressToL2Alias(address sender, address unused) external pure returns (address); - - /** - * @notice check if the caller (of this caller of this) is an aliased L1 contract address - * @return true iff the caller's address is an alias for an L1 contract address - */ - function wasMyCallersAddressAliased() external view returns (bool); - - /** - * @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing - * @return address of the caller's caller, without applying L1 contract address aliasing - */ - function myCallersAddressWithoutAliasing() external view returns (address); - - /** - * @notice Send given amount of Eth to dest from sender. - * This is a convenience function, which is equivalent to calling sendTxToL1 with empty data. - * @param destination recipient address on L1 - * @return unique identifier for this L2-to-L1 transaction. - */ - function withdrawEth(address destination) external payable returns (uint256); - - /** - * @notice Send a transaction to L1 - * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data - * to a contract address without any code (as enforced by the Bridge contract). - * @param destination recipient address on L1 - * @param data (optional) calldata for L1 contract call - * @return a unique identifier for this L2-to-L1 transaction. - */ - function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256); - - /** - * @notice Get send Merkle tree state - * @return size number of sends in the history - * @return root root hash of the send history - * @return partials hashes of partial subtrees in the send history tree - */ - function sendMerkleTreeState() external view returns (uint256 size, bytes32 root, bytes32[] memory partials); - - /** - * @notice creates a send txn from L2 to L1 - * @param position = (level << 192) + leaf = (0 << 192) + leaf = leaf - */ - event L2ToL1Tx( - address caller, - address indexed destination, - uint256 indexed hash, - uint256 indexed position, - uint256 arbBlockNum, - uint256 ethBlockNum, - uint256 timestamp, - uint256 callvalue, - bytes data - ); - - /// @dev DEPRECATED in favour of the new L2ToL1Tx event above after the nitro upgrade - event L2ToL1Transaction( - address caller, - address indexed destination, - uint256 indexed uniqueId, - uint256 indexed batchNumber, - uint256 indexInBatch, - uint256 arbBlockNum, - uint256 ethBlockNum, - uint256 timestamp, - uint256 callvalue, - bytes data - ); - - /** - * @notice logs a merkle branch for proof synthesis - * @param reserved an index meant only to align the 4th index with L2ToL1Transaction's 4th event - * @param hash the merkle hash - * @param position = (level << 192) + leaf - */ - event SendMerkleUpdate(uint256 indexed reserved, bytes32 indexed hash, uint256 indexed position); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol deleted file mode 100644 index 398fb613..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IBridge.sol +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IBridge.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -interface IBridge { - event MessageDelivered( - uint256 indexed messageIndex, - bytes32 indexed beforeInboxAcc, - address inbox, - uint8 kind, - address sender, - bytes32 messageDataHash, - uint256 baseFeeL1, - uint64 timestamp - ); - - event BridgeCallTriggered(address indexed outbox, address indexed to, uint256 value, bytes data); - - event InboxToggle(address indexed inbox, bool enabled); - - event OutboxToggle(address indexed outbox, bool enabled); - - event SequencerInboxUpdated(address newSequencerInbox); - - function allowedDelayedInboxList(uint256) external returns (address); - - function allowedOutboxList(uint256) external returns (address); - - /// @dev Accumulator for delayed inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. - function delayedInboxAccs(uint256) external view returns (bytes32); - - /// @dev Accumulator for sequencer inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. - function sequencerInboxAccs(uint256) external view returns (bytes32); - - // OpenZeppelin: changed return type from IOwnable - function rollup() external view returns (address); - - function sequencerInbox() external view returns (address); - - function activeOutbox() external view returns (address); - - function allowedDelayedInboxes(address inbox) external view returns (bool); - - function allowedOutboxes(address outbox) external view returns (bool); - - function sequencerReportedSubMessageCount() external view returns (uint256); - - /** - * @dev Enqueue a message in the delayed inbox accumulator. - * These messages are later sequenced in the SequencerInbox, either - * by the sequencer as part of a normal batch, or by force inclusion. - */ - function enqueueDelayedMessage( - uint8 kind, - address sender, - bytes32 messageDataHash - ) external payable returns (uint256); - - function executeCall( - address to, - uint256 value, - bytes calldata data - ) external returns (bool success, bytes memory returnData); - - function delayedMessageCount() external view returns (uint256); - - function sequencerMessageCount() external view returns (uint256); - - // ---------- onlySequencerInbox functions ---------- - - function enqueueSequencerMessage( - bytes32 dataHash, - uint256 afterDelayedMessagesRead, - uint256 prevMessageCount, - uint256 newMessageCount - ) external returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc); - - /** - * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type - * This is done through a separate function entrypoint instead of allowing the sequencer inbox - * to call `enqueueDelayedMessage` to avoid the gas overhead of an extra SLOAD in either - * every delayed inbox or every sequencer inbox call. - */ - function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) external returns (uint256 msgNum); - - // ---------- onlyRollupOrOwner functions ---------- - - function setSequencerInbox(address _sequencerInbox) external; - - function setDelayedInbox(address inbox, bool enabled) external; - - function setOutbox(address inbox, bool enabled) external; - - // ---------- initializer ---------- - - // OpenZeppelin: changed rollup_ type from IOwnable - function initialize(address rollup_) external; -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol deleted file mode 100644 index 914c25fb..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IDelayedMessageProvider.sol +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IDelayedMessageProvider.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -interface IDelayedMessageProvider { - /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator - event InboxMessageDelivered(uint256 indexed messageNum, bytes data); - - /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator - /// same as InboxMessageDelivered but the batch data is available in tx.input - event InboxMessageDeliveredFromOrigin(uint256 indexed messageNum); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol deleted file mode 100644 index a8b67511..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IInbox.sol +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IInbox.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -import "./IBridge.sol"; -import "./IDelayedMessageProvider.sol"; - -interface IInbox is IDelayedMessageProvider { - function bridge() external view returns (IBridge); - - // OpenZeppelin: changed return type from ISequencerInbox - function sequencerInbox() external view returns (address); - - /** - * @notice Send a generic L2 message to the chain - * @dev This method is an optimization to avoid having to emit the entirety of the messageData in a log. Instead validators are expected to be able to parse the data from the transaction's input - * @param messageData Data of the message being sent - */ - function sendL2MessageFromOrigin(bytes calldata messageData) external returns (uint256); - - /** - * @notice Send a generic L2 message to the chain - * @dev This method can be used to send any type of message that doesn't require L1 validation - * @param messageData Data of the message being sent - */ - function sendL2Message(bytes calldata messageData) external returns (uint256); - - function sendL1FundedUnsignedTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - uint256 nonce, - address to, - bytes calldata data - ) external payable returns (uint256); - - function sendL1FundedContractTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - address to, - bytes calldata data - ) external payable returns (uint256); - - function sendUnsignedTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - uint256 nonce, - address to, - uint256 value, - bytes calldata data - ) external returns (uint256); - - function sendContractTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - address to, - uint256 value, - bytes calldata data - ) external returns (uint256); - - /** - * @notice Get the L1 fee for submitting a retryable - * @dev This fee can be paid by funds already in the L2 aliased address or by the current message value - * @dev This formula may change in the future, to future proof your code query this method instead of inlining!! - * @param dataLength The length of the retryable's calldata, in bytes - * @param baseFee The block basefee when the retryable is included in the chain, if 0 current block.basefee will be used - */ - function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) external view returns (uint256); - - /** - * @notice Deposit eth from L1 to L2 to address of the sender if sender is an EOA, and to its aliased address if the sender is a contract - * @dev This does not trigger the fallback function when receiving in the L2 side. - * Look into retryable tickets if you are interested in this functionality. - * @dev This function should not be called inside contract constructors - */ - function depositEth() external payable returns (uint256); - - /** - * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts - * @dev all msg.value will deposited to callValueRefundAddress on L2 - * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error - * @param to destination L2 contract address - * @param l2CallValue call value for retryable L2 message - * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee - * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance - * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled - * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param data ABI encoded data of L2 message - * @return unique message number of the retryable transaction - */ - function createRetryableTicket( - address to, - uint256 l2CallValue, - uint256 maxSubmissionCost, - address excessFeeRefundAddress, - address callValueRefundAddress, - uint256 gasLimit, - uint256 maxFeePerGas, - bytes calldata data - ) external payable returns (uint256); - - /** - * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts - * @dev Same as createRetryableTicket, but does not guarantee that submission will succeed by requiring the needed funds - * come from the deposit alone, rather than falling back on the user's L2 balance - * @dev Advanced usage only (does not rewrite aliases for excessFeeRefundAddress and callValueRefundAddress). - * createRetryableTicket method is the recommended standard. - * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error - * @param to destination L2 contract address - * @param l2CallValue call value for retryable L2 message - * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee - * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance - * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled - * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param data ABI encoded data of L2 message - * @return unique message number of the retryable transaction - */ - function unsafeCreateRetryableTicket( - address to, - uint256 l2CallValue, - uint256 maxSubmissionCost, - address excessFeeRefundAddress, - address callValueRefundAddress, - uint256 gasLimit, - uint256 maxFeePerGas, - bytes calldata data - ) external payable returns (uint256); - - // ---------- onlyRollupOrOwner functions ---------- - - /// @notice pauses all inbox functionality - function pause() external; - - /// @notice unpauses all inbox functionality - function unpause() external; - - // ---------- initializer ---------- - - /** - * @dev function to be called one time during the inbox upgrade process - * this is used to fix the storage slots - */ - function postUpgradeInit(IBridge _bridge) external; - - // OpenZeppelin: changed _sequencerInbox type from ISequencerInbox - function initialize(IBridge _bridge, address _sequencerInbox) external; -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol deleted file mode 100644 index 359ea6c1..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/arbitrum/IOutbox.sol +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IOutbox.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -import "./IBridge.sol"; - -interface IOutbox { - event SendRootUpdated(bytes32 indexed blockHash, bytes32 indexed outputRoot); - event OutBoxTransactionExecuted( - address indexed to, - address indexed l2Sender, - uint256 indexed zero, - uint256 transactionIndex - ); - - function rollup() external view returns (address); // the rollup contract - - function bridge() external view returns (IBridge); // the bridge contract - - function spent(uint256) external view returns (bytes32); // packed spent bitmap - - function roots(bytes32) external view returns (bytes32); // maps root hashes => L2 block hash - - // solhint-disable-next-line func-name-mixedcase - function OUTBOX_VERSION() external view returns (uint128); // the outbox version - - function updateSendRoot(bytes32 sendRoot, bytes32 l2BlockHash) external; - - /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account - /// When the return value is zero, that means this is a system message - /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies - function l2ToL1Sender() external view returns (address); - - /// @return l2Block return L2 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active - function l2ToL1Block() external view returns (uint256); - - /// @return l1Block return L1 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active - function l2ToL1EthBlock() external view returns (uint256); - - /// @return timestamp return L2 timestamp when the L2 tx was initiated or 0 if no L2 to L1 transaction is active - function l2ToL1Timestamp() external view returns (uint256); - - /// @return outputId returns the unique output identifier of the L2 to L1 tx or 0 if no L2 to L1 transaction is active - function l2ToL1OutputId() external view returns (bytes32); - - /** - * @notice Executes a messages in an Outbox entry. - * @dev Reverts if dispute period hasn't expired, since the outbox entry - * is only created once the rollup confirms the respective assertion. - * @dev it is not possible to execute any L2-to-L1 transaction which contains data - * to a contract address without any code (as enforced by the Bridge contract). - * @param proof Merkle proof of message inclusion in send root - * @param index Merkle path to message - * @param l2Sender sender if original message (i.e., caller of ArbSys.sendTxToL1) - * @param to destination address for L1 contract call - * @param l2Block l2 block number at which sendTxToL1 call was made - * @param l1Block l1 block number at which sendTxToL1 call was made - * @param l2Timestamp l2 Timestamp at which sendTxToL1 call was made - * @param value wei in L1 message - * @param data abi-encoded L1 message data - */ - function executeTransaction( - bytes32[] calldata proof, - uint256 index, - address l2Sender, - address to, - uint256 l2Block, - uint256 l1Block, - uint256 l2Timestamp, - uint256 value, - bytes calldata data - ) external; - - /** - * @dev function used to simulate the result of a particular function call from the outbox - * it is useful for things such as gas estimates. This function includes all costs except for - * proof validation (which can be considered offchain as a somewhat of a fixed cost - it's - * not really a fixed cost, but can be treated as so with a fixed overhead for gas estimation). - * We can't include the cost of proof validation since this is intended to be used to simulate txs - * that are included in yet-to-be confirmed merkle roots. The simulation entrypoint could instead pretend - * to confirm a pending merkle root, but that would be less practical for integrating with tooling. - * It is only possible to trigger it when the msg sender is address zero, which should be impossible - * unless under simulation in an eth_call or eth_estimateGas - */ - function executeTransactionSimulation( - uint256 index, - address l2Sender, - address to, - uint256 l2Block, - uint256 l1Block, - uint256 l2Timestamp, - uint256 value, - bytes calldata data - ) external; - - /** - * @param index Merkle path to message - * @return true if the message has been spent - */ - function isSpent(uint256 index) external view returns (bool); - - function calculateItemHash( - address l2Sender, - address to, - uint256 l2Block, - uint256 l1Block, - uint256 l2Timestamp, - uint256 value, - bytes calldata data - ) external pure returns (bytes32); - - function calculateMerkleRoot(bytes32[] memory proof, uint256 path, bytes32 item) external pure returns (bytes32); -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol deleted file mode 100644 index 461b88f6..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/optimism/ICrossDomainMessenger.sol +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/optimism/ICrossDomainMessenger.sol) -pragma solidity >0.5.0 <0.9.0; - -/** - * @title ICrossDomainMessenger - */ -interface ICrossDomainMessenger { - /********** - * Events * - **********/ - - event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit); - event RelayedMessage(bytes32 indexed msgHash); - event FailedRelayedMessage(bytes32 indexed msgHash); - - /************* - * Variables * - *************/ - - function xDomainMessageSender() external view returns (address); - - /******************** - * Public Functions * - ********************/ - - /** - * Sends a cross domain message to the target messenger. - * @param _target Target contract address. - * @param _message Message to send to the target. - * @param _gasLimit Gas limit for the provided message. - */ - function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external; -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol b/dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol deleted file mode 100644 index 1c7b6f6f..00000000 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/polygon/IFxMessageProcessor.sol +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/polygon/IFxMessageProcessor.sol) -pragma solidity ^0.8.0; - -interface IFxMessageProcessor { - function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external; -} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/README.md b/dependencies/@openzeppelin-contracts-5.6.1/README.md similarity index 60% rename from dependencies/@openzeppelin-contracts-4.9.6/README.md rename to dependencies/@openzeppelin-contracts-5.6.1/README.md index 9fc95518..6a01f561 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/README.md +++ b/dependencies/@openzeppelin-contracts-5.6.1/README.md @@ -1,10 +1,11 @@ # OpenZeppelin +[![Github Release](https://img.shields.io/github/v/tag/OpenZeppelin/openzeppelin-contracts.svg?filter=v*&sort=semver&label=github)](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/latest) [![NPM Package](https://img.shields.io/npm/v/@openzeppelin/contracts.svg)](https://www.npmjs.org/package/@openzeppelin/contracts) [![Coverage Status](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts/graph/badge.svg)](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts) [![GitPOAPs](https://public-api.gitpoap.io/v1/repo/OpenZeppelin/openzeppelin-contracts/badge)](https://www.gitpoap.io/gh/OpenZeppelin/openzeppelin-contracts) [![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-yellow)](https://docs.openzeppelin.com/contracts) -[![Forum](https://img.shields.io/badge/forum-%F0%9F%92%AC-yellow)](https://docs.openzeppelin.com/contracts) +[![Forum](https://img.shields.io/badge/forum-%F0%9F%92%AC-yellow)](https://forum.openzeppelin.com/) **A library for secure smart contract development.** Build on a solid foundation of community-vetted code. @@ -14,28 +15,57 @@ :mage: **Not sure how to get started?** Check out [Contracts Wizard](https://wizard.openzeppelin.com/) — an interactive smart contract generator. -:building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a secure platform for automating and monitoring your operations. +> [!IMPORTANT] +> OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at [Backwards Compatibility](https://docs.openzeppelin.com/contracts/backwards-compatibility). ## Overview +### Release tags + +We use NPM tags to clearly distinguish between audited and non-audited versions of our package: + +| Tag | Purpose | Description | +| :--------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **latest** | ✅ Audited releases | Stable, audited versions of the package. This is the **default** version installed when users run `npm install @openzeppelin/contracts`. | +| **dev** | 🧪 Final but not audited | Versions that are finalized and feature-complete but have **not yet been audited**. This version is fully tested, can be used in production and is covered by the bug bounty. | +| **next** | 🚧 Release candidates | Pre-release versions that are **not final**. Used for testing and validation before the version becomes a final `dev` or `latest` release. | + ### Installation +#### Hardhat (npm) + ``` $ npm install @openzeppelin/contracts ``` +→ Installs the latest audited release (`latest`). + +``` +$ npm install @openzeppelin/contracts@dev +``` +→ Installs the latest unaudited release (`dev`). -OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version. +#### Foundry (git) -An alternative to npm is to use the GitHub repository (`openzeppelin/openzeppelin-contracts`) to retrieve the contracts. When doing this, make sure to specify the tag for a release such as `v4.5.0`, instead of using the `master` branch. +> [!WARNING] +> When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee. + +> [!WARNING] +> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. + +``` +$ forge install OpenZeppelin/openzeppelin-contracts +``` + +Add `@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/` in `remappings.txt`. ### Usage Once installed, you can use the contracts in the library by importing them: ```solidity -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract MyCollectible is ERC721 { constructor() ERC721("MyCollectible", "MCO") { @@ -52,12 +82,12 @@ To keep your system secure, you should **always** use the installed code as-is, The guides in the [documentation site](https://docs.openzeppelin.com/contracts) will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides: * [Access Control](https://docs.openzeppelin.com/contracts/access-control): decide who can perform each of the actions on your system. -* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives, and distribute them via [Crowdsales](https://docs.openzeppelin.com/contracts/crowdsales). +* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectibles for popular ERC standards like ERC-20, ERC-721, ERC-1155, and ERC-6909. * [Utilities](https://docs.openzeppelin.com/contracts/utilities): generic useful tools including non-overflowing math, signature verification, and trustless paying systems. -The [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the [community forum](https://forum.openzeppelin.com). +The [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts' development in the [community forum](https://forum.openzeppelin.com). -Finally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/guides), which cover several common use cases and good practices. The following articles provide great background reading, though please note that some of the referenced tools have changed, as the tooling in the ecosystem continues to rapidly evolve. +Finally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/), which cover several common use cases and good practices. The following articles provide great background reading, though please note that some of the referenced tools have changed, as the tooling in the ecosystem continues to rapidly evolve. * [The Hitchhiker’s Guide to Smart Contracts in Ethereum](https://blog.openzeppelin.com/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) will help you get an overview of the various tools available for smart contract development, and help you set up your environment. * [A Gentle Introduction to Ethereum Programming, Part 1](https://blog.openzeppelin.com/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094) provides very useful information on an introductory level, including many basic concepts from the Ethereum platform. @@ -67,7 +97,9 @@ Finally, you may want to take a look at the [guides on our blog](https://blog.op This project is maintained by [OpenZeppelin](https://openzeppelin.com) with the goal of providing a secure and reliable library of smart contract components for the ecosystem. We address security through risk management in various areas such as engineering and open source best practices, scoping and API design, multi-layered review processes, and incident response preparedness. -The security policy is detailed in [`SECURITY.md`](./SECURITY.md), and specifies how you can report security vulnerabilities, which versions will receive security patches, and how to stay informed about them. We run a [bug bounty program on Immunefi](https://immunefi.com/bounty/openzeppelin) to reward the responsible disclosure of vulnerabilities. +The [OpenZeppelin Contracts Security Center](https://contracts.openzeppelin.com/security) contains more details about the secure development process. + +The security policy is detailed in [`SECURITY.md`](./SECURITY.md) as well, and specifies how you can report security vulnerabilities, which versions will receive security patches, and how to stay informed about them. We run a [bug bounty program on Immunefi](https://immunefi.com/bounty/openzeppelin) to reward the responsible disclosure of vulnerabilities. The engineering guidelines we follow to promote project quality can be found in [`GUIDELINES.md`](./GUIDELINES.md). diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControl.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/AccessControl.sol similarity index 62% rename from dependencies/@openzeppelin-contracts-4.9.6/access/AccessControl.sol rename to dependencies/@openzeppelin-contracts-5.6.1/access/AccessControl.sol index 0ec6be39..1c4aeb9f 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControl.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/AccessControl.sol @@ -1,12 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (access/AccessControl.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./IAccessControl.sol"; -import "../utils/Context.sol"; -import "../utils/Strings.sol"; -import "../utils/introspection/ERC165.sol"; +import {IAccessControl} from "./IAccessControl.sol"; +import {Context} from "../utils/Context.sol"; +import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access @@ -49,32 +48,24 @@ import "../utils/introspection/ERC165.sol"; */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { - mapping(address => bool) members; + mapping(address account => bool) hasRole; bytes32 adminRole; } - mapping(bytes32 => RoleData) private _roles; + mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts - * with a standardized message including the required role. - * - * The format of the revert reason is given by the following regular expression: - * - * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ - * - * _Available since v4.1._ + * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } @@ -82,41 +73,25 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { /** * @dev Returns `true` if `account` has been granted `role`. */ - function hasRole(bytes32 role, address account) public view virtual override returns (bool) { - return _roles[role].members[account]; + function hasRole(bytes32 role, address account) public view virtual returns (bool) { + return _roles[role].hasRole[account]; } /** - * @dev Revert with a standard message if `_msgSender()` is missing `role`. - * Overriding this function changes the behavior of the {onlyRole} modifier. - * - * Format of the revert message is described in {_checkRole}. - * - * _Available since v4.6._ + * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` + * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** - * @dev Revert with a standard message if `account` is missing `role`. - * - * The format of the revert reason is given by the following regular expression: - * - * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` + * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { - revert( - string( - abi.encodePacked( - "AccessControl: account ", - Strings.toHexString(account), - " is missing role ", - Strings.toHexString(uint256(role), 32) - ) - ) - ); + revert AccessControlUnauthorizedAccount(account, role); } } @@ -126,7 +101,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { * * To change a role's admin, use {_setRoleAdmin}. */ - function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { + function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } @@ -142,7 +117,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { * * May emit a {RoleGranted} event. */ - function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } @@ -157,7 +132,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { * * May emit a {RoleRevoked} event. */ - function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } @@ -173,38 +148,16 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { * * Requirements: * - * - the caller must be `account`. + * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ - function renounceRole(bytes32 role, address account) public virtual override { - require(account == _msgSender(), "AccessControl: can only renounce roles for self"); - - _revokeRole(role, account); - } + function renounceRole(bytes32 role, address callerConfirmation) public virtual { + if (callerConfirmation != _msgSender()) { + revert AccessControlBadConfirmation(); + } - /** - * @dev Grants `role` to `account`. - * - * If `account` had not been already granted `role`, emits a {RoleGranted} - * event. Note that unlike {grantRole}, this function doesn't perform any - * checks on the calling account. - * - * May emit a {RoleGranted} event. - * - * [WARNING] - * ==== - * This function should only be called from the constructor when setting - * up the initial roles for the system. - * - * Using this function in any other way is effectively circumventing the admin - * system imposed by {AccessControl}. - * ==== - * - * NOTE: This function is deprecated in favor of {_grantRole}. - */ - function _setupRole(bytes32 role, address account) internal virtual { - _grantRole(role, account); + _revokeRole(role, callerConfirmation); } /** @@ -219,30 +172,36 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { } /** - * @dev Grants `role` to `account`. + * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ - function _grantRole(bytes32 role, address account) internal virtual { + function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { - _roles[role].members[account] = true; + _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); + return true; + } else { + return false; } } /** - * @dev Revokes `role` from `account`. + * @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ - function _revokeRole(bytes32 role, address account) internal virtual { + function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { - _roles[role].members[account] = false; + _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); + return true; + } else { + return false; } } } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControl.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/IAccessControl.sol similarity index 76% rename from dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControl.sol rename to dependencies/@openzeppelin-contracts-5.6.1/access/IAccessControl.sol index f773ecc6..23f0770a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControl.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/IAccessControl.sol @@ -1,27 +1,37 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (access/IAccessControl.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.8.4; /** - * @dev External interface of AccessControl declared to support ERC165 detection. + * @dev External interface of AccessControl declared to support ERC-165 detection. */ interface IAccessControl { + /** + * @dev The `account` is missing a role. + */ + error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); + + /** + * @dev The caller of a function is not the expected one. + * + * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. + */ + error AccessControlBadConfirmation(); + /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite - * {RoleAdminChanged} not being emitted signaling this. - * - * _Available since v3.1._ + * {RoleAdminChanged} not being emitted to signal this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * - * `sender` is the account that originated the contract call, an admin role - * bearer except when using {AccessControl-_setupRole}. + * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role). + * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); @@ -82,7 +92,7 @@ interface IAccessControl { * * Requirements: * - * - the caller must be `account`. + * - the caller must be `callerConfirmation`. */ - function renounceRole(bytes32 role, address account) external; + function renounceRole(bytes32 role, address callerConfirmation) external; } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/Ownable.sol similarity index 66% rename from dependencies/@openzeppelin-contracts-4.9.6/access/Ownable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/access/Ownable.sol index c181ea1a..bd96f666 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/Ownable.sol @@ -1,17 +1,17 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../utils/Context.sol"; +import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * - * By default, the owner account will be the one that deploys the contract. This - * can later be changed with {transferOwnership}. + * The initial owner is set to the address provided by the deployer. This can + * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to @@ -20,13 +20,26 @@ import "../utils/Context.sol"; abstract contract Ownable is Context { address private _owner; + /** + * @dev The caller account is not authorized to perform an operation. + */ + error OwnableUnauthorizedAccount(address account); + + /** + * @dev The owner is not a valid owner account. (eg. `address(0)`) + */ + error OwnableInvalidOwner(address owner); + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** - * @dev Initializes the contract setting the deployer as the initial owner. + * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ - constructor() { - _transferOwnership(_msgSender()); + constructor(address initialOwner) { + if (initialOwner == address(0)) { + revert OwnableInvalidOwner(address(0)); + } + _transferOwnership(initialOwner); } /** @@ -48,7 +61,9 @@ abstract contract Ownable is Context { * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { - require(owner() == _msgSender(), "Ownable: caller is not the owner"); + if (owner() != _msgSender()) { + revert OwnableUnauthorizedAccount(_msgSender()); + } } /** @@ -67,7 +82,9 @@ abstract contract Ownable is Context { * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { - require(newOwner != address(0), "Ownable: new owner is the zero address"); + if (newOwner == address(0)) { + revert OwnableInvalidOwner(address(0)); + } _transferOwnership(newOwner); } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable2Step.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/Ownable2Step.sol similarity index 67% rename from dependencies/@openzeppelin-contracts-4.9.6/access/Ownable2Step.sol rename to dependencies/@openzeppelin-contracts-5.6.1/access/Ownable2Step.sol index e6f69988..3a0747ce 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/Ownable2Step.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/Ownable2Step.sol @@ -1,16 +1,22 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) +// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./Ownable.sol"; +import {Ownable} from "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * - * By default, the owner account will be the one that deploys the contract. This + * This extension of the {Ownable} contract includes a two-step mechanism to transfer + * ownership, where the new owner must call {acceptOwnership} in order to replace the + * old one. This can help prevent common mistakes, such as transfers of ownership to + * incorrect accounts, or to contracts that are unable to interact with the + * permission system. + * + * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions @@ -31,6 +37,8 @@ abstract contract Ownable2Step is Ownable { /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. + * + * Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; @@ -51,7 +59,9 @@ abstract contract Ownable2Step is Ownable { */ function acceptOwnership() public virtual { address sender = _msgSender(); - require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); + if (pendingOwner() != sender) { + revert OwnableUnauthorizedAccount(sender); + } _transferOwnership(sender); } } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlDefaultAdminRules.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/AccessControlDefaultAdminRules.sol similarity index 81% rename from dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlDefaultAdminRules.sol rename to dependencies/@openzeppelin-contracts-5.6.1/access/extensions/AccessControlDefaultAdminRules.sol index 9de32002..8d2c723b 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/AccessControlDefaultAdminRules.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/AccessControlDefaultAdminRules.sol @@ -1,12 +1,14 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControlDefaultAdminRules.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (access/extensions/AccessControlDefaultAdminRules.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./AccessControl.sol"; -import "./IAccessControlDefaultAdminRules.sol"; -import "../utils/math/SafeCast.sol"; -import "../interfaces/IERC5313.sol"; +import {IAccessControlDefaultAdminRules} from "./IAccessControlDefaultAdminRules.sol"; +import {AccessControl, IAccessControl} from "../AccessControl.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {Math} from "../../utils/math/Math.sol"; +import {IERC5313} from "../../interfaces/IERC5313.sol"; +import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Extension of {AccessControl} that allows specifying special rules to manage @@ -22,6 +24,7 @@ import "../interfaces/IERC5313.sol"; * * Enforces a 2-step process to transfer the `DEFAULT_ADMIN_ROLE` to another account. * * Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted. * * The delay can be changed by scheduling, see {changeDefaultAdminDelay}. + * * Role transfers must wait at least one block after scheduling before it can be accepted. * * It is not possible to use another role to manage the `DEFAULT_ADMIN_ROLE`. * * Example usage: @@ -34,8 +37,6 @@ import "../interfaces/IERC5313.sol"; * ) {} * } * ``` - * - * _Available since v4.9._ */ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRules, IERC5313, AccessControl { // pending admin pair read/written together frequently @@ -53,21 +54,19 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu * @dev Sets the initial values for {defaultAdminDelay} and {defaultAdmin} address. */ constructor(uint48 initialDelay, address initialDefaultAdmin) { - require(initialDefaultAdmin != address(0), "AccessControl: 0 default admin"); + if (initialDefaultAdmin == address(0)) { + revert AccessControlInvalidDefaultAdmin(address(0)); + } _currentDelay = initialDelay; _grantRole(DEFAULT_ADMIN_ROLE, initialDefaultAdmin); } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlDefaultAdminRules).interfaceId || super.supportsInterface(interfaceId); } - /** - * @dev See {IERC5313-owner}. - */ + /// @inheritdoc IERC5313 function owner() public view virtual returns (address) { return defaultAdmin(); } @@ -80,7 +79,9 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu * @dev See {AccessControl-grantRole}. Reverts for `DEFAULT_ADMIN_ROLE`. */ function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { - require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly grant default admin role"); + if (role == DEFAULT_ADMIN_ROLE) { + revert AccessControlEnforcedDefaultAdminRules(); + } super.grantRole(role, account); } @@ -88,7 +89,9 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu * @dev See {AccessControl-revokeRole}. Reverts for `DEFAULT_ADMIN_ROLE`. */ function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { - require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly revoke default admin role"); + if (role == DEFAULT_ADMIN_ROLE) { + revert AccessControlEnforcedDefaultAdminRules(); + } super.revokeRole(role, account); } @@ -108,10 +111,9 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { (address newDefaultAdmin, uint48 schedule) = pendingDefaultAdmin(); - require( - newDefaultAdmin == address(0) && _isScheduleSet(schedule) && _hasSchedulePassed(schedule), - "AccessControl: only can renounce in two delayed steps" - ); + if (newDefaultAdmin != address(0) || !_isScheduleSet(schedule) || !_hasSchedulePassed(schedule)) { + revert AccessControlEnforcedDefaultAdminDelay(schedule); + } delete _pendingDefaultAdminSchedule; } super.renounceRole(role, account); @@ -126,29 +128,31 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu * NOTE: Exposing this function through another mechanism may make the `DEFAULT_ADMIN_ROLE` * assignable again. Make sure to guarantee this is the expected behavior in your implementation. */ - function _grantRole(bytes32 role, address account) internal virtual override { + function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { if (role == DEFAULT_ADMIN_ROLE) { - require(defaultAdmin() == address(0), "AccessControl: default admin already granted"); + if (defaultAdmin() != address(0)) { + revert AccessControlEnforcedDefaultAdminRules(); + } _currentDefaultAdmin = account; } - super._grantRole(role, account); + return super._grantRole(role, account); } - /** - * @dev See {AccessControl-_revokeRole}. - */ - function _revokeRole(bytes32 role, address account) internal virtual override { + /// @inheritdoc AccessControl + function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { delete _currentDefaultAdmin; } - super._revokeRole(role, account); + return super._revokeRole(role, account); } /** * @dev See {AccessControl-_setRoleAdmin}. Reverts for `DEFAULT_ADMIN_ROLE`. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual override { - require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't violate default admin rules"); + if (role == DEFAULT_ADMIN_ROLE) { + revert AccessControlEnforcedDefaultAdminRules(); + } super._setRoleAdmin(role, adminRole); } @@ -156,39 +160,29 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /// AccessControlDefaultAdminRules accessors /// - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdmin() public view virtual returns (address) { return _currentDefaultAdmin; } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function pendingDefaultAdmin() public view virtual returns (address newAdmin, uint48 schedule) { return (_pendingDefaultAdmin, _pendingDefaultAdminSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdminDelay() public view virtual returns (uint48) { uint48 schedule = _pendingDelaySchedule; return (_isScheduleSet(schedule) && _hasSchedulePassed(schedule)) ? _pendingDelay : _currentDelay; } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function pendingDefaultAdminDelay() public view virtual returns (uint48 newDelay, uint48 schedule) { schedule = _pendingDelaySchedule; return (_isScheduleSet(schedule) && !_hasSchedulePassed(schedule)) ? (_pendingDelay, schedule) : (0, 0); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdminDelayIncreaseWait() public view virtual returns (uint48) { return 5 days; } @@ -197,9 +191,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /// AccessControlDefaultAdminRules public and internal setters for defaultAdmin/pendingDefaultAdmin /// - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function beginDefaultAdminTransfer(address newAdmin) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _beginDefaultAdminTransfer(newAdmin); } @@ -215,9 +207,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu emit DefaultAdminTransferScheduled(newAdmin, newSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function cancelDefaultAdminTransfer() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _cancelDefaultAdminTransfer(); } @@ -231,12 +221,13 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu _setPendingDefaultAdmin(address(0), 0); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function acceptDefaultAdminTransfer() public virtual { (address newDefaultAdmin, ) = pendingDefaultAdmin(); - require(_msgSender() == newDefaultAdmin, "AccessControl: pending admin must accept"); + if (_msgSender() != newDefaultAdmin) { + // Enforce newDefaultAdmin explicit acceptance. + revert AccessControlInvalidDefaultAdmin(_msgSender()); + } _acceptDefaultAdminTransfer(); } @@ -247,7 +238,9 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu */ function _acceptDefaultAdminTransfer() internal virtual { (address newAdmin, uint48 schedule) = pendingDefaultAdmin(); - require(_isScheduleSet(schedule) && _hasSchedulePassed(schedule), "AccessControl: transfer delay not passed"); + if (!_isScheduleSet(schedule) || !_hasSchedulePassed(schedule)) { + revert AccessControlEnforcedDefaultAdminDelay(schedule); + } _revokeRole(DEFAULT_ADMIN_ROLE, defaultAdmin()); _grantRole(DEFAULT_ADMIN_ROLE, newAdmin); delete _pendingDefaultAdmin; @@ -258,9 +251,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /// AccessControlDefaultAdminRules public and internal setters for defaultAdminDelay/pendingDefaultAdminDelay /// - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function changeDefaultAdminDelay(uint48 newDelay) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _changeDefaultAdminDelay(newDelay); } @@ -276,9 +267,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu emit DefaultAdminDelayChangeScheduled(newDelay, newSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function rollbackDefaultAdminDelay() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _rollbackDefaultAdminDelay(); } @@ -326,7 +315,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /** * @dev Setter of the tuple for pending admin and its schedule. * - * May emit a DefaultAdminTransferCanceled event. + * May emit a {DefaultAdminTransferCanceled} event. */ function _setPendingDefaultAdmin(address newAdmin, uint48 newSchedule) private { (, uint48 oldSchedule) = pendingDefaultAdmin(); @@ -344,7 +333,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /** * @dev Setter of the tuple for pending delay and its schedule. * - * May emit a DefaultAdminDelayChangeCanceled event. + * May emit a {DefaultAdminDelayChangeCanceled} event. */ function _setPendingDelay(uint48 newDelay, uint48 newSchedule) private { uint48 oldSchedule = _pendingDelaySchedule; @@ -368,14 +357,14 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /// /** - * @dev Defines if an `schedule` is considered set. For consistency purposes. + * @dev Defines if a `schedule` is considered set. For consistency purposes. */ function _isScheduleSet(uint48 schedule) private pure returns (bool) { return schedule != 0; } /** - * @dev Defines if an `schedule` is considered passed. For consistency purposes. + * @dev Defines if a `schedule` is considered passed. For consistency purposes. */ function _hasSchedulePassed(uint48 schedule) private view returns (bool) { return schedule < block.timestamp; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/AccessControlEnumerable.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/AccessControlEnumerable.sol new file mode 100644 index 00000000..26a15942 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/AccessControlEnumerable.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (access/extensions/AccessControlEnumerable.sol) + +pragma solidity ^0.8.24; + +import {IAccessControlEnumerable} from "./IAccessControlEnumerable.sol"; +import {AccessControl} from "../AccessControl.sol"; +import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol"; +import {IERC165} from "../../utils/introspection/ERC165.sol"; + +/** + * @dev Extension of {AccessControl} that allows enumerating the members of each role. + */ +abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { + using EnumerableSet for EnumerableSet.AddressSet; + + mapping(bytes32 role => EnumerableSet.AddressSet) private _roleMembers; + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) { + return _roleMembers[role].at(index); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) { + return _roleMembers[role].length(); + } + + /** + * @dev Return all accounts that have `role` + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function getRoleMembers(bytes32 role) public view virtual returns (address[] memory) { + return _roleMembers[role].values(); + } + + /** + * @dev Overload {AccessControl-_grantRole} to track enumerable memberships + */ + function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { + bool granted = super._grantRole(role, account); + if (granted) { + _roleMembers[role].add(account); + } + return granted; + } + + /** + * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships + */ + function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { + bool revoked = super._revokeRole(role, account); + if (revoked) { + _roleMembers[role].remove(account); + } + return revoked; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlDefaultAdminRules.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/IAccessControlDefaultAdminRules.sol similarity index 83% rename from dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlDefaultAdminRules.sol rename to dependencies/@openzeppelin-contracts-5.6.1/access/extensions/IAccessControlDefaultAdminRules.sol index 434324e5..62f8e1b3 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlDefaultAdminRules.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/IAccessControlDefaultAdminRules.sol @@ -1,16 +1,36 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/IAccessControlDefaultAdminRules.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (access/extensions/IAccessControlDefaultAdminRules.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.8.4; -import "./IAccessControl.sol"; +import {IAccessControl} from "../IAccessControl.sol"; /** - * @dev External interface of AccessControlDefaultAdminRules declared to support ERC165 detection. - * - * _Available since v4.9._ + * @dev External interface of AccessControlDefaultAdminRules declared to support ERC-165 detection. */ interface IAccessControlDefaultAdminRules is IAccessControl { + /** + * @dev The new default admin is not a valid default admin. + */ + error AccessControlInvalidDefaultAdmin(address defaultAdmin); + + /** + * @dev At least one of the following rules was violated: + * + * - The `DEFAULT_ADMIN_ROLE` must only be managed by itself. + * - The `DEFAULT_ADMIN_ROLE` must only be held by one account at the time. + * - Any `DEFAULT_ADMIN_ROLE` transfer must be in two delayed steps. + */ + error AccessControlEnforcedDefaultAdminRules(); + + /** + * @dev The delay for transferring the default admin delay is enforced and + * the operation must wait until `schedule`. + * + * NOTE: `schedule` can be 0 indicating there's no transfer scheduled. + */ + error AccessControlEnforcedDefaultAdminDelay(uint48 schedule); + /** * @dev Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next * address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule` @@ -83,7 +103,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl { * * - Only can be called by the current {defaultAdmin}. * - * Emits a DefaultAdminRoleChangeStarted event. + * Emits a {DefaultAdminTransferScheduled} event. */ function beginDefaultAdminTransfer(address newAdmin) external; @@ -96,7 +116,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl { * * - Only can be called by the current {defaultAdmin}. * - * May emit a DefaultAdminTransferCanceled event. + * May emit a {DefaultAdminTransferCanceled} event. */ function cancelDefaultAdminTransfer() external; @@ -140,7 +160,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl { * * - Only can be called by the current {defaultAdmin}. * - * Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event. + * Emits a {DefaultAdminDelayChangeScheduled} event and may emit a {DefaultAdminDelayChangeCanceled} event. */ function changeDefaultAdminDelay(uint48 newDelay) external; @@ -151,7 +171,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl { * * - Only can be called by the current {defaultAdmin}. * - * May emit a DefaultAdminDelayChangeCanceled event. + * May emit a {DefaultAdminDelayChangeCanceled} event. */ function rollbackDefaultAdminDelay() external; @@ -162,7 +182,7 @@ interface IAccessControlDefaultAdminRules is IAccessControl { * When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with * the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds) * that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can - * be overrode for a custom {defaultAdminDelay} increase scheduling. + * be overridden for a custom {defaultAdminDelay} increase scheduling. * * IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise, * there's a risk of setting a high new delay that goes into effect almost immediately without the diff --git a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlEnumerable.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/IAccessControlEnumerable.sol similarity index 83% rename from dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlEnumerable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/access/extensions/IAccessControlEnumerable.sol index 61aaf57a..90371fa9 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/access/IAccessControlEnumerable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/extensions/IAccessControlEnumerable.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (access/extensions/IAccessControlEnumerable.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.8.4; -import "./IAccessControl.sol"; +import {IAccessControl} from "../IAccessControl.sol"; /** - * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. + * @dev External interface of AccessControlEnumerable declared to support ERC-165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManaged.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManaged.sol new file mode 100644 index 00000000..382a3086 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManaged.sol @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/AccessManaged.sol) + +pragma solidity ^0.8.20; + +import {AuthorityUtils} from "./AuthorityUtils.sol"; +import {IAccessManager} from "./IAccessManager.sol"; +import {IAccessManaged} from "./IAccessManaged.sol"; +import {Context} from "../../utils/Context.sol"; + +/** + * @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be + * permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface, + * implementing a policy that allows certain callers to access certain functions. + * + * IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public` + * functions, and ideally only used in `external` functions. See {restricted}. + */ +abstract contract AccessManaged is Context, IAccessManaged { + address private _authority; + + bool private _consumingSchedule; + + /** + * @dev Initializes the contract connected to an initial authority. + */ + constructor(address initialAuthority) { + _setAuthority(initialAuthority); + } + + /** + * @dev Restricts access to a function as defined by the connected Authority for this contract and the + * caller and selector of the function that entered the contract. + * + * [IMPORTANT] + * ==== + * In general, this modifier should only be used on `external` functions. It is okay to use it on `public` + * functions that are used as external entry points and are not called internally. Unless you know what you're + * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security + * implications! This is because the permissions are determined by the function that entered the contract, i.e. the + * function at the bottom of the call stack, and not the function where the modifier is visible in the source code. + * ==== + * + * [WARNING] + * ==== + * Avoid adding this modifier to the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`] + * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These + * functions are the only execution paths where a function selector cannot be unambiguously determined from the calldata + * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()` function + * if no calldata is provided. (See {_checkCanCall}). + * + * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length. + * ==== + */ + modifier restricted() { + _checkCanCall(_msgSender(), _msgData()); + _; + } + + /// @inheritdoc IAccessManaged + function authority() public view virtual returns (address) { + return _authority; + } + + /// @inheritdoc IAccessManaged + function setAuthority(address newAuthority) public virtual { + address caller = _msgSender(); + if (caller != authority()) { + revert AccessManagedUnauthorized(caller); + } + if (newAuthority.code.length == 0) { + revert AccessManagedInvalidAuthority(newAuthority); + } + _setAuthority(newAuthority); + } + + /// @inheritdoc IAccessManaged + function isConsumingScheduledOp() public view returns (bytes4) { + return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0); + } + + /** + * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the + * permissions set by the current authority. + */ + function _setAuthority(address newAuthority) internal virtual { + _authority = newAuthority; + emit AuthorityUpdated(newAuthority); + } + + /** + * @dev Reverts if the caller is not allowed to call the function identified by a selector. Panics if the calldata + * is less than 4 bytes long. + */ + function _checkCanCall(address caller, bytes calldata data) internal virtual { + (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( + authority(), + caller, + address(this), + bytes4(data[0:4]) + ); + if (!immediate) { + if (delay > 0) { + _consumingSchedule = true; + IAccessManager(authority()).consumeScheduledOp(caller, data); + _consumingSchedule = false; + } else { + revert AccessManagedUnauthorized(caller); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManager.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManager.sol new file mode 100644 index 00000000..12a734d4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AccessManager.sol @@ -0,0 +1,741 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (access/manager/AccessManager.sol) + +pragma solidity ^0.8.20; + +import {IAccessManager} from "./IAccessManager.sol"; +import {IAccessManaged} from "./IAccessManaged.sol"; +import {Address} from "../../utils/Address.sol"; +import {Context} from "../../utils/Context.sol"; +import {Multicall} from "../../utils/Multicall.sol"; +import {Math} from "../../utils/math/Math.sol"; +import {Time} from "../../utils/types/Time.sol"; +import {Hashes} from "../../utils/cryptography/Hashes.sol"; + +/** + * @dev AccessManager is a central contract to store the permissions of a system. + * + * A smart contract under the control of an AccessManager instance is known as a target, and will inherit from the + * {AccessManaged} contract, be connected to this contract as its manager and implement the {AccessManaged-restricted} + * modifier on a set of functions selected to be permissioned. Note that any function without this setup won't be + * effectively restricted. + * + * The restriction rules for such functions are defined in terms of "roles" identified by an `uint64` and scoped + * by target (`address`) and function selectors (`bytes4`). These roles are stored in this contract and can be + * configured by admins (`ADMIN_ROLE` members) after a delay (see {getTargetAdminDelay}). + * + * For each target contract, admins can configure the following without any delay: + * + * * The target's {AccessManaged-authority} via {updateAuthority}. + * * Close or open a target via {setTargetClosed} keeping the permissions intact. + * * The roles that are allowed (or disallowed) to call a given function (identified by its selector) through {setTargetFunctionRole}. + * + * By default every address is member of the `PUBLIC_ROLE` and every target function is restricted to the `ADMIN_ROLE` until configured otherwise. + * Additionally, each role has the following configuration options restricted to this manager's admins: + * + * * A role's admin role via {setRoleAdmin} who can grant or revoke roles. + * * A role's guardian role via {setRoleGuardian} who's allowed to cancel operations. + * * A delay in which a role takes effect after being granted through {setGrantDelay}. + * * A delay of any target's admin action via {setTargetAdminDelay}. + * * A role label for discoverability purposes with {labelRole}. + * + * Any account can be added and removed into any number of these roles by using the {grantRole} and {revokeRole} functions + * restricted to each role's admin (see {getRoleAdmin}). + * + * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that + * they will be highly secured (e.g., a multisig or a well-configured DAO). + * + * NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it + * doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of + * the return data are a boolean as expected by that interface. + * + * NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an + * {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}. + * Users will be able to interact with these contracts through the {execute} function, following the access rules + * registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions + * will be {AccessManager} itself. + * + * WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very + * mindful of the danger associated with functions such as {Ownable-renounceOwnership} or + * {AccessControl-renounceRole}. + */ +contract AccessManager is Context, Multicall, IAccessManager { + using Time for *; + + // Structure that stores the details for a target contract. + struct TargetConfig { + mapping(bytes4 selector => uint64 roleId) allowedRoles; + Time.Delay adminDelay; + bool closed; + } + + // Structure that stores the details for a role/account pair. This structure fits into a single slot. + struct Access { + // Timepoint at which the user gets the permission. + // If this is either 0 or in the future, then the role permission is not available. + uint48 since; + // Delay for execution. Only applies to restricted() / execute() calls. + Time.Delay delay; + } + + // Structure that stores the details of a role. + struct Role { + // Members of the role. + mapping(address user => Access access) members; + // Admin who can grant or revoke permissions. + uint64 admin; + // Guardian who can cancel operations targeting functions that need this role. + uint64 guardian; + // Delay in which the role takes effect after being granted. + Time.Delay grantDelay; + } + + // Structure that stores the details for a scheduled operation. This structure fits into a single slot. + struct Schedule { + // Moment at which the operation can be executed. + uint48 timepoint; + // Operation nonce to allow third-party contracts to identify the operation. + uint32 nonce; + } + + /** + * @dev The identifier of the admin role. Required to perform most configuration operations including + * other roles' management and target restrictions. + */ + uint64 public constant ADMIN_ROLE = type(uint64).min; // 0 + + /** + * @dev The identifier of the public role. Automatically granted to all addresses with no delay. + */ + uint64 public constant PUBLIC_ROLE = type(uint64).max; // 2**64-1 + + mapping(address target => TargetConfig mode) private _targets; + mapping(uint64 roleId => Role) private _roles; + mapping(bytes32 operationId => Schedule) private _schedules; + + // Used to identify operations that are currently being executed via {execute}. + // This should be transient storage when supported by the EVM. + bytes32 private _executionId; + + /** + * @dev Check that the caller is authorized to perform the operation. + * See {AccessManager} description for a detailed breakdown of the authorization logic. + */ + modifier onlyAuthorized() { + _checkAuthorized(); + _; + } + + constructor(address initialAdmin) { + if (initialAdmin == address(0)) { + revert AccessManagerInvalidInitialAdmin(address(0)); + } + + // admin is active immediately and without any execution delay. + _grantRole(ADMIN_ROLE, initialAdmin, 0, 0); + } + + // =================================================== GETTERS ==================================================== + /// @inheritdoc IAccessManager + function canCall( + address caller, + address target, + bytes4 selector + ) public view virtual returns (bool immediate, uint32 delay) { + if (isTargetClosed(target)) { + return (false, 0); + } else if (caller == address(this)) { + // Caller is AccessManager, this means the call was sent through {execute} and it already checked + // permissions. We verify that the call "identifier", which is set during {execute}, is correct. + return (_isExecuting(target, selector), 0); + } else { + uint64 roleId = getTargetFunctionRole(target, selector); + (bool isMember, uint32 currentDelay) = hasRole(roleId, caller); + return isMember ? (currentDelay == 0, currentDelay) : (false, 0); + } + } + + /// @inheritdoc IAccessManager + function expiration() public view virtual returns (uint32) { + return 1 weeks; + } + + /// @inheritdoc IAccessManager + function minSetback() public view virtual returns (uint32) { + return 5 days; + } + + /// @inheritdoc IAccessManager + function isTargetClosed(address target) public view virtual returns (bool) { + return _targets[target].closed; + } + + /// @inheritdoc IAccessManager + function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) { + return _targets[target].allowedRoles[selector]; + } + + /// @inheritdoc IAccessManager + function getTargetAdminDelay(address target) public view virtual returns (uint32) { + return _targets[target].adminDelay.get(); + } + + /// @inheritdoc IAccessManager + function getRoleAdmin(uint64 roleId) public view virtual returns (uint64) { + return _roles[roleId].admin; + } + + /// @inheritdoc IAccessManager + function getRoleGuardian(uint64 roleId) public view virtual returns (uint64) { + return _roles[roleId].guardian; + } + + /// @inheritdoc IAccessManager + function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) { + return _roles[roleId].grantDelay.get(); + } + + /// @inheritdoc IAccessManager + function getAccess( + uint64 roleId, + address account + ) public view virtual returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect) { + Access storage access = _roles[roleId].members[account]; + + since = access.since; + (currentDelay, pendingDelay, effect) = access.delay.getFull(); + + return (since, currentDelay, pendingDelay, effect); + } + + /// @inheritdoc IAccessManager + function hasRole( + uint64 roleId, + address account + ) public view virtual returns (bool isMember, uint32 executionDelay) { + if (roleId == PUBLIC_ROLE) { + return (true, 0); + } else { + (uint48 hasRoleSince, uint32 currentDelay, , ) = getAccess(roleId, account); + return (hasRoleSince != 0 && hasRoleSince <= Time.timestamp(), currentDelay); + } + } + + // =============================================== ROLE MANAGEMENT =============================================== + /// @inheritdoc IAccessManager + function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized { + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + emit RoleLabel(roleId, label); + } + + /// @inheritdoc IAccessManager + function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized { + _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay); + } + + /// @inheritdoc IAccessManager + function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized { + _revokeRole(roleId, account); + } + + /// @inheritdoc IAccessManager + function renounceRole(uint64 roleId, address callerConfirmation) public virtual { + if (callerConfirmation != _msgSender()) { + revert AccessManagerBadConfirmation(); + } + _revokeRole(roleId, callerConfirmation); + } + + /// @inheritdoc IAccessManager + function setRoleAdmin(uint64 roleId, uint64 admin) public virtual onlyAuthorized { + _setRoleAdmin(roleId, admin); + } + + /// @inheritdoc IAccessManager + function setRoleGuardian(uint64 roleId, uint64 guardian) public virtual onlyAuthorized { + _setRoleGuardian(roleId, guardian); + } + + /// @inheritdoc IAccessManager + function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized { + _setGrantDelay(roleId, newDelay); + } + + /** + * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted. + * + * Emits a {RoleGranted} event. + */ + function _grantRole( + uint64 roleId, + address account, + uint32 grantDelay, + uint32 executionDelay + ) internal virtual returns (bool) { + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + bool newMember = _roles[roleId].members[account].since == 0; + uint48 since; + + if (newMember) { + since = Time.timestamp() + grantDelay; + _roles[roleId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); + } else { + // No setback here. Value can be reset by doing revoke + grant, effectively allowing the admin to perform + // any change to the execution delay within the duration of the role admin delay. + (_roles[roleId].members[account].delay, since) = _roles[roleId].members[account].delay.withUpdate( + executionDelay, + 0 + ); + } + + emit RoleGranted(roleId, account, executionDelay, since, newMember); + return newMember; + } + + /** + * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}. + * Returns true if the role was previously granted. + * + * Emits a {RoleRevoked} event if the account had the role. + */ + function _revokeRole(uint64 roleId, address account) internal virtual returns (bool) { + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + if (_roles[roleId].members[account].since == 0) { + return false; + } + + delete _roles[roleId].members[account]; + + emit RoleRevoked(roleId, account); + return true; + } + + /** + * @dev Internal version of {setRoleAdmin} without access control. + * + * Emits a {RoleAdminChanged} event. + * + * NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow + * anyone to set grant or revoke such role. + */ + function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual { + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + _roles[roleId].admin = admin; + + emit RoleAdminChanged(roleId, admin); + } + + /** + * @dev Internal version of {setRoleGuardian} without access control. + * + * Emits a {RoleGuardianChanged} event. + * + * NOTE: Setting the guardian role as the `PUBLIC_ROLE` is allowed, but it will effectively allow + * anyone to cancel any scheduled operation for such role. + */ + function _setRoleGuardian(uint64 roleId, uint64 guardian) internal virtual { + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + _roles[roleId].guardian = guardian; + + emit RoleGuardianChanged(roleId, guardian); + } + + /** + * @dev Internal version of {setGrantDelay} without access control. + * + * Emits a {RoleGrantDelayChanged} event. + */ + function _setGrantDelay(uint64 roleId, uint32 newDelay) internal virtual { + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + uint48 effect; + (_roles[roleId].grantDelay, effect) = _roles[roleId].grantDelay.withUpdate(newDelay, minSetback()); + + emit RoleGrantDelayChanged(roleId, newDelay, effect); + } + + // ============================================= FUNCTION MANAGEMENT ============================================== + /// @inheritdoc IAccessManager + function setTargetFunctionRole( + address target, + bytes4[] calldata selectors, + uint64 roleId + ) public virtual onlyAuthorized { + for (uint256 i = 0; i < selectors.length; ++i) { + _setTargetFunctionRole(target, selectors[i], roleId); + } + } + + /** + * @dev Internal version of {setTargetFunctionRole} without access control. + * + * Emits a {TargetFunctionRoleUpdated} event. + */ + function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual { + _targets[target].allowedRoles[selector] = roleId; + emit TargetFunctionRoleUpdated(target, selector, roleId); + } + + /// @inheritdoc IAccessManager + function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized { + _setTargetAdminDelay(target, newDelay); + } + + /** + * @dev Internal version of {setTargetAdminDelay} without access control. + * + * Emits a {TargetAdminDelayUpdated} event. + */ + function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual { + uint48 effect; + (_targets[target].adminDelay, effect) = _targets[target].adminDelay.withUpdate(newDelay, minSetback()); + + emit TargetAdminDelayUpdated(target, newDelay, effect); + } + + // =============================================== MODE MANAGEMENT ================================================ + /// @inheritdoc IAccessManager + function setTargetClosed(address target, bool closed) public virtual onlyAuthorized { + _setTargetClosed(target, closed); + } + + /** + * @dev Set the closed flag for a contract. This is an internal setter with no access restrictions. + * + * Emits a {TargetClosed} event. + */ + function _setTargetClosed(address target, bool closed) internal virtual { + _targets[target].closed = closed; + emit TargetClosed(target, closed); + } + + // ============================================== DELAYED OPERATIONS ============================================== + /// @inheritdoc IAccessManager + function getSchedule(bytes32 id) public view virtual returns (uint48) { + uint48 timepoint = _schedules[id].timepoint; + return _isExpired(timepoint) ? 0 : timepoint; + } + + /// @inheritdoc IAccessManager + function getNonce(bytes32 id) public view virtual returns (uint32) { + return _schedules[id].nonce; + } + + /// @inheritdoc IAccessManager + function schedule( + address target, + bytes calldata data, + uint48 when + ) public virtual returns (bytes32 operationId, uint32 nonce) { + address caller = _msgSender(); + + // Fetch restrictions that apply to the caller on the targeted function + (, uint32 setback) = _canCallExtended(caller, target, data); + + uint48 minWhen = Time.timestamp() + setback; + + // If call with delay is not authorized, or if requested timing is too soon, revert + if (setback == 0 || (when > 0 && when < minWhen)) { + revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); + } + + // Reuse variable due to stack too deep + when = uint48(Math.max(when, minWhen)); // cast is safe: both inputs are uint48 + + // If caller is authorised, schedule operation + operationId = hashOperation(caller, target, data); + + _checkNotScheduled(operationId); + + unchecked { + // It's not feasible to overflow the nonce in less than 1000 years + nonce = _schedules[operationId].nonce + 1; + } + _schedules[operationId].timepoint = when; + _schedules[operationId].nonce = nonce; + emit OperationScheduled(operationId, nonce, when, caller, target, data); + + // Using named return values because otherwise we get stack too deep + } + + /** + * @dev Reverts if the operation is currently scheduled and has not expired. + * + * NOTE: This function was introduced due to stack too deep errors in schedule. + */ + function _checkNotScheduled(bytes32 operationId) private view { + uint48 prevTimepoint = _schedules[operationId].timepoint; + if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) { + revert AccessManagerAlreadyScheduled(operationId); + } + } + + /// @inheritdoc IAccessManager + // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally, + // _consumeScheduledOp guarantees a scheduled operation is only executed once. + // slither-disable-next-line reentrancy-no-eth + function execute(address target, bytes calldata data) public payable virtual returns (uint32) { + address caller = _msgSender(); + + // Fetch restrictions that apply to the caller on the targeted function + (bool immediate, uint32 setback) = _canCallExtended(caller, target, data); + + // If call is not authorized, revert + if (!immediate && setback == 0) { + revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); + } + + bytes32 operationId = hashOperation(caller, target, data); + uint32 nonce; + + // If caller is authorised, check operation was scheduled early enough + // Consume an available schedule even if there is no currently enforced delay + if (setback != 0 || getSchedule(operationId) != 0) { + nonce = _consumeScheduledOp(operationId); + } + + // Mark the target and selector as authorised + bytes32 executionIdBefore = _executionId; + _executionId = _hashExecutionId(target, _checkSelector(data)); + + // Perform call + Address.functionCallWithValue(target, data, msg.value); + + // Reset execute identifier + _executionId = executionIdBefore; + + return nonce; + } + + /// @inheritdoc IAccessManager + function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) { + address msgsender = _msgSender(); + bytes4 selector = _checkSelector(data); + + bytes32 operationId = hashOperation(caller, target, data); + if (_schedules[operationId].timepoint == 0) { + revert AccessManagerNotScheduled(operationId); + } else if (caller != msgsender) { + // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role. + (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender); + (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender); + if (!isAdmin && !isGuardian) { + revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector); + } + } + + delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce + uint32 nonce = _schedules[operationId].nonce; + emit OperationCanceled(operationId, nonce); + + return nonce; + } + + /// @inheritdoc IAccessManager + function consumeScheduledOp(address caller, bytes calldata data) public virtual { + address target = _msgSender(); + if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) { + revert AccessManagerUnauthorizedConsume(target); + } + _consumeScheduledOp(hashOperation(caller, target, data)); + } + + /** + * @dev Internal variant of {consumeScheduledOp} that operates on bytes32 operationId. + * + * Returns the nonce of the scheduled operation that is consumed. + */ + function _consumeScheduledOp(bytes32 operationId) internal virtual returns (uint32) { + uint48 timepoint = _schedules[operationId].timepoint; + uint32 nonce = _schedules[operationId].nonce; + + if (timepoint == 0) { + revert AccessManagerNotScheduled(operationId); + } else if (timepoint > Time.timestamp()) { + revert AccessManagerNotReady(operationId); + } else if (_isExpired(timepoint)) { + revert AccessManagerExpired(operationId); + } + + delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce + emit OperationExecuted(operationId, nonce); + + return nonce; + } + + /// @inheritdoc IAccessManager + function hashOperation(address caller, address target, bytes calldata data) public view virtual returns (bytes32) { + return keccak256(abi.encode(caller, target, data)); + } + + // ==================================================== OTHERS ==================================================== + /// @inheritdoc IAccessManager + function updateAuthority(address target, address newAuthority) public virtual onlyAuthorized { + IAccessManaged(target).setAuthority(newAuthority); + } + + // ================================================= ADMIN LOGIC ================================================== + /** + * @dev Check if the current call is authorized according to admin and roles logic. + * + * WARNING: Carefully review the considerations of {AccessManaged-restricted} since they apply to this modifier. + */ + function _checkAuthorized() private { + address caller = _msgSender(); + (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData()); + if (!immediate) { + if (delay == 0) { + (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData()); + revert AccessManagerUnauthorizedAccount(caller, requiredRole); + } else { + _consumeScheduledOp(hashOperation(caller, address(this), _msgData())); + } + } + } + + /** + * @dev Get the admin restrictions of a given function call based on the function and arguments involved. + * + * Returns: + * - bool restricted: does this data match a restricted operation + * - uint64: which role is this operation restricted to + * - uint32: minimum delay to enforce for that operation (max between operation's delay and admin's execution delay) + */ + function _getAdminRestrictions( + bytes calldata data + ) private view returns (bool adminRestricted, uint64 roleAdminId, uint32 executionDelay) { + if (data.length < 4) { + return (false, 0, 0); + } + + bytes4 selector = _checkSelector(data); + + // Restricted to ADMIN with no delay beside any execution delay the caller may have + if ( + selector == this.labelRole.selector || + selector == this.setRoleAdmin.selector || + selector == this.setRoleGuardian.selector || + selector == this.setGrantDelay.selector || + selector == this.setTargetAdminDelay.selector + ) { + return (true, ADMIN_ROLE, 0); + } + + // Restricted to ADMIN with the admin delay corresponding to the target + if ( + selector == this.updateAuthority.selector || + selector == this.setTargetClosed.selector || + selector == this.setTargetFunctionRole.selector + ) { + // First argument is a target. + address target = abi.decode(data[0x04:0x24], (address)); + uint32 delay = getTargetAdminDelay(target); + return (true, ADMIN_ROLE, delay); + } + + // Restricted to that role's admin with no delay beside any execution delay the caller may have. + if (selector == this.grantRole.selector || selector == this.revokeRole.selector) { + // First argument is a roleId. + uint64 roleId = abi.decode(data[0x04:0x24], (uint64)); + return (true, getRoleAdmin(roleId), 0); + } + + return (false, getTargetFunctionRole(address(this), selector), 0); + } + + // =================================================== HELPERS ==================================================== + /** + * @dev An extended version of {canCall} for internal usage that checks {_canCallSelf} + * when the target is this contract. + * + * Returns: + * - bool immediate: whether the operation can be executed immediately (with no delay) + * - uint32 delay: the execution delay + */ + function _canCallExtended( + address caller, + address target, + bytes calldata data + ) private view returns (bool immediate, uint32 delay) { + if (target == address(this)) { + return _canCallSelf(caller, data); + } else { + return data.length < 4 ? (false, 0) : canCall(caller, target, _checkSelector(data)); + } + } + + /** + * @dev A version of {canCall} that checks for restrictions in this contract. + */ + function _canCallSelf(address caller, bytes calldata data) private view returns (bool immediate, uint32 delay) { + if (data.length < 4) { + return (false, 0); + } + + if (caller == address(this)) { + // Caller is AccessManager, this means the call was sent through {execute} and it already checked + // permissions. We verify that the call "identifier", which is set during {execute}, is correct. + return (_isExecuting(address(this), _checkSelector(data)), 0); + } + + (bool adminRestricted, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data); + + // isTargetClosed apply to non-admin-restricted function + if (!adminRestricted && isTargetClosed(address(this))) { + return (false, 0); + } + + (bool inRole, uint32 executionDelay) = hasRole(roleId, caller); + if (!inRole) { + return (false, 0); + } + + // downcast is safe because both options are uint32 + delay = uint32(Math.max(operationDelay, executionDelay)); + return (delay == 0, delay); + } + + /** + * @dev Returns true if a call with `target` and `selector` is being executed via {executed}. + */ + function _isExecuting(address target, bytes4 selector) private view returns (bool) { + return _executionId == _hashExecutionId(target, selector); + } + + /** + * @dev Returns true if a schedule timepoint is past its expiration deadline. + */ + function _isExpired(uint48 timepoint) private view returns (bool) { + return timepoint + expiration() <= Time.timestamp(); + } + + /** + * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes + */ + function _checkSelector(bytes calldata data) private pure returns (bytes4) { + return bytes4(data[0:4]); + } + + /** + * @dev Hashing function for execute protection + */ + function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { + return Hashes.efficientKeccak256(bytes32(uint256(uint160(target))), selector); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AuthorityUtils.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AuthorityUtils.sol new file mode 100644 index 00000000..8b047096 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/AuthorityUtils.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol) + +pragma solidity ^0.8.20; + +import {IAuthority} from "./IAuthority.sol"; + +library AuthorityUtils { + /** + * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility + * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data. + * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting. + */ + function canCallWithDelay( + address authority, + address caller, + address target, + bytes4 selector + ) internal view returns (bool immediate, uint32 delay) { + bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector)); + + assembly ("memory-safe") { + mstore(0x00, 0x00) + mstore(0x20, 0x00) + + if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) { + immediate := mload(0x00) + delay := mload(0x20) + + // If delay does not fit in a uint32, return 0 (no delay) + // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 } + delay := mul(delay, iszero(shr(32, delay))) + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManaged.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManaged.sol new file mode 100644 index 00000000..c93c7119 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManaged.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManaged.sol) + +pragma solidity >=0.8.4; + +interface IAccessManaged { + /** + * @dev Authority that manages this contract was updated. + */ + event AuthorityUpdated(address authority); + + error AccessManagedUnauthorized(address caller); + error AccessManagedRequiredDelay(address caller, uint32 delay); + error AccessManagedInvalidAuthority(address authority); + + /** + * @dev Returns the current authority. + */ + function authority() external view returns (address); + + /** + * @dev Transfers control to a new authority. The caller must be the current authority. + */ + function setAuthority(address) external; + + /** + * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is + * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs + * attacker controlled calls. + */ + function isConsumingScheduledOp() external view returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManager.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManager.sol new file mode 100644 index 00000000..056a2f49 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAccessManager.sol @@ -0,0 +1,403 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (access/manager/IAccessManager.sol) + +pragma solidity >=0.8.4; + +interface IAccessManager { + /** + * @dev A delayed operation was scheduled. + */ + event OperationScheduled( + bytes32 indexed operationId, + uint32 indexed nonce, + uint48 schedule, + address caller, + address target, + bytes data + ); + + /** + * @dev A scheduled operation was executed. + */ + event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce); + + /** + * @dev A scheduled operation was canceled. + */ + event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce); + + /** + * @dev Informational labelling for a roleId. + */ + event RoleLabel(uint64 indexed roleId, string label); + + /** + * @dev Emitted when `account` is granted `roleId`. + * + * NOTE: The meaning of the `since` argument depends on the `newMember` argument. + * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role, + * otherwise it indicates the timestamp when the execution delay update takes effect for this account and roleId. + */ + event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember); + + /** + * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous. + */ + event RoleRevoked(uint64 indexed roleId, address indexed account); + + /** + * @dev Role acting as admin over a given `roleId` is updated. + */ + event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin); + + /** + * @dev Role acting as guardian over a given `roleId` is updated. + */ + event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian); + + /** + * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached. + */ + event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since); + + /** + * @dev Target mode is updated (true = closed, false = open). + */ + event TargetClosed(address indexed target, bool closed); + + /** + * @dev Role required to invoke `selector` on `target` is updated to `roleId`. + */ + event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId); + + /** + * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached. + */ + event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since); + + error AccessManagerAlreadyScheduled(bytes32 operationId); + error AccessManagerNotScheduled(bytes32 operationId); + error AccessManagerNotReady(bytes32 operationId); + error AccessManagerExpired(bytes32 operationId); + error AccessManagerLockedRole(uint64 roleId); + error AccessManagerBadConfirmation(); + error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId); + error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector); + error AccessManagerUnauthorizedConsume(address target); + error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector); + error AccessManagerInvalidInitialAdmin(address initialAdmin); + + /** + * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with + * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule} + * & {execute} workflow. + * + * This function is usually called by the targeted contract to control immediate execution of restricted functions. + * Therefore we only return true if the call can be performed without any delay. If the call is subject to a + * previously set delay (not zero), then the function should return false and the caller should schedule the operation + * for future execution. + * + * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise + * the operation can be executed if and only if delay is greater than 0. + * + * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that + * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail + * to identify the indirect workflow, and will consider calls that require a delay to be forbidden. + * + * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the + * {AccessManager} documentation. + */ + function canCall( + address caller, + address target, + bytes4 selector + ) external view returns (bool allowed, uint32 delay); + + /** + * @dev Expiration delay for scheduled proposals. Defaults to 1 week. + * + * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately, + * disabling any scheduling usage. + */ + function expiration() external view returns (uint32); + + /** + * @dev Minimum setback for all delay updates, with the exception of execution delays. It + * can be increased without setback (and reset via {revokeRole} in the event of an + * accidental increase). Defaults to 5 days. + */ + function minSetback() external view returns (uint32); + + /** + * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied. + * + * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract. + */ + function isTargetClosed(address target) external view returns (bool); + + /** + * @dev Get the role required to call a function. + */ + function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64); + + /** + * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay. + */ + function getTargetAdminDelay(address target) external view returns (uint32); + + /** + * @dev Get the id of the role that acts as an admin for the given role. + * + * The admin permission is required to grant the role, revoke the role and update the execution delay to execute + * an operation that is restricted to this role. + */ + function getRoleAdmin(uint64 roleId) external view returns (uint64); + + /** + * @dev Get the role that acts as a guardian for a given role. + * + * The guardian permission allows canceling operations that have been scheduled under the role. + */ + function getRoleGuardian(uint64 roleId) external view returns (uint64); + + /** + * @dev Get the role current grant delay. + * + * Its value may change at any point without an event emitted following a call to {setGrantDelay}. + * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event. + */ + function getRoleGrantDelay(uint64 roleId) external view returns (uint32); + + /** + * @dev Get the access details for a given account for a given role. These details include the timepoint at which + * membership becomes active, and the delay applied to all operations by this user that requires this permission + * level. + * + * Returns: + * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted. + * [1] Current execution delay for the account. + * [2] Pending execution delay for the account. + * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled. + */ + function getAccess( + uint64 roleId, + address account + ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect); + + /** + * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this + * permission might be associated with an execution delay. {getAccess} can provide more details. + */ + function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay); + + /** + * @dev Give a label to a role, for improved role discoverability by UIs. + * + * Requirements: + * + * - the caller must be a global admin + * - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE` + * + * Emits a {RoleLabel} event. + */ + function labelRole(uint64 roleId, string calldata label) external; + + /** + * @dev Add `account` to `roleId`, or change its execution delay. + * + * This gives the account the authorization to call any function that is restricted to this role. An optional + * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation + * that is restricted to members of this role. The user will only be able to execute the operation after the delay has + * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}). + * + * If the account has already been granted this role, the execution delay will be updated. This update is not + * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is + * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any + * operation executed in the 3 hours that follows this update was indeed scheduled before this update. + * + * Requirements: + * + * - the caller must be an admin for the role (see {getRoleAdmin}) + * - granted role must not be the `PUBLIC_ROLE` + * + * Emits a {RoleGranted} event. + */ + function grantRole(uint64 roleId, address account, uint32 executionDelay) external; + + /** + * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has + * no effect. + * + * Requirements: + * + * - the caller must be an admin for the role (see {getRoleAdmin}) + * - revoked role must not be the `PUBLIC_ROLE` + * + * Emits a {RoleRevoked} event if the account had the role. + */ + function revokeRole(uint64 roleId, address account) external; + + /** + * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in + * the role this call has no effect. + * + * Requirements: + * + * - the caller must be `callerConfirmation`. + * + * Emits a {RoleRevoked} event if the account had the role. + */ + function renounceRole(uint64 roleId, address callerConfirmation) external; + + /** + * @dev Change admin role for a given role. + * + * Requirements: + * + * - the caller must be a global admin + * - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE` + * + * Emits a {RoleAdminChanged} event + */ + function setRoleAdmin(uint64 roleId, uint64 admin) external; + + /** + * @dev Change guardian role for a given role. + * + * Requirements: + * + * - the caller must be a global admin + * - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE` + * + * Emits a {RoleGuardianChanged} event + */ + function setRoleGuardian(uint64 roleId, uint64 guardian) external; + + /** + * @dev Update the delay for granting a `roleId`. + * + * Requirements: + * + * - the caller must be a global admin + * - `roleId` must not be the `PUBLIC_ROLE` + * + * Emits a {RoleGrantDelayChanged} event. + */ + function setGrantDelay(uint64 roleId, uint32 newDelay) external; + + /** + * @dev Set the role required to call functions identified by the `selectors` in the `target` contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {TargetFunctionRoleUpdated} event per selector. + */ + function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external; + + /** + * @dev Set the delay for changing the configuration of a given target contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {TargetAdminDelayUpdated} event. + */ + function setTargetAdminDelay(address target, uint32 newDelay) external; + + /** + * @dev Set the closed flag for a contract. + * + * Closing the manager itself won't disable access to admin methods to avoid locking the contract. + * + * Requirements: + * + * - the caller must be a global admin + * + * Emits a {TargetClosed} event. + */ + function setTargetClosed(address target, bool closed) external; + + /** + * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the + * operation is not yet scheduled, has expired, was executed, or was canceled. + */ + function getSchedule(bytes32 id) external view returns (uint48); + + /** + * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never + * been scheduled. + */ + function getNonce(bytes32 id) external view returns (uint32); + + /** + * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to + * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays + * required for the caller. The special value zero will automatically set the earliest possible time. + * + * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when + * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this + * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}. + * + * Emits a {OperationScheduled} event. + * + * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If + * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target + * contract if it is using standard Solidity ABI encoding. + */ + function schedule( + address target, + bytes calldata data, + uint48 when + ) external returns (bytes32 operationId, uint32 nonce); + + /** + * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the + * execution delay is 0. + * + * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the + * operation wasn't previously scheduled (if the caller doesn't have an execution delay). + * + * Emits an {OperationExecuted} event only if the call was scheduled and delayed. + */ + function execute(address target, bytes calldata data) external payable returns (uint32); + + /** + * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled + * operation that is cancelled. + * + * Requirements: + * + * - the caller must be the proposer, a guardian of the targeted function, or a global admin + * + * Emits a {OperationCanceled} event. + */ + function cancel(address caller, address target, bytes calldata data) external returns (uint32); + + /** + * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed + * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error. + * + * This is useful for contracts that want to enforce that calls targeting them were scheduled on the manager, + * with all the verifications that it implies. + * + * Emit a {OperationExecuted} event. + */ + function consumeScheduledOp(address caller, bytes calldata data) external; + + /** + * @dev Hashing function for delayed operations. + */ + function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32); + + /** + * @dev Changes the authority of a target managed by this manager instance. + * + * Requirements: + * + * - the caller must be a global admin + */ + function updateAuthority(address target, address newAuthority) external; +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAuthority.sol b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAuthority.sol new file mode 100644 index 00000000..6ad902c7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/access/manager/IAuthority.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol) + +pragma solidity >=0.4.16; + +/** + * @dev Standard interface for permissioning originally defined in Dappsys. + */ +interface IAuthority { + /** + * @dev Returns true if the caller can invoke on a target the function identified by a function selector. + */ + function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/account/Account.sol b/dependencies/@openzeppelin-contracts-5.6.1/account/Account.sol new file mode 100644 index 00000000..967ea0f3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/account/Account.sol @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/Account.sol) + +pragma solidity ^0.8.20; + +import {PackedUserOperation, IAccount, IEntryPoint} from "../interfaces/draft-IERC4337.sol"; +import {ERC4337Utils} from "./utils/draft-ERC4337Utils.sol"; +import {AbstractSigner} from "../utils/cryptography/signers/AbstractSigner.sol"; +import {LowLevelCall} from "../utils/LowLevelCall.sol"; + +/** + * @dev A simple ERC4337 account implementation. This base implementation only includes the minimal logic to process + * user operations. + * + * Developers must implement the {AbstractSigner-_rawSignatureValidation} function to define the account's validation logic. + * + * NOTE: This core account doesn't include any mechanism for performing arbitrary external calls. This is an essential + * feature that all Account should have. We leave it up to the developers to implement the mechanism of their choice. + * Common choices include ERC-6900, ERC-7579 and ERC-7821 (among others). + * + * IMPORTANT: Implementing a mechanism to validate signatures is a security-sensitive operation as it may allow an + * attacker to bypass the account's security measures. Check out {SignerECDSA}, {SignerP256}, or {SignerRSA} for + * digital signature validation implementations. + * + * @custom:stateless + */ +abstract contract Account is AbstractSigner, IAccount { + /** + * @dev Unauthorized call to the account. + */ + error AccountUnauthorized(address sender); + + /** + * @dev Revert if the caller is not the entry point or the account itself. + */ + modifier onlyEntryPointOrSelf() { + _checkEntryPointOrSelf(); + _; + } + + /** + * @dev Revert if the caller is not the entry point. + */ + modifier onlyEntryPoint() { + _checkEntryPoint(); + _; + } + + /** + * @dev Canonical entry point for the account that forwards and validates user operations. + */ + function entryPoint() public view virtual returns (IEntryPoint) { + return ERC4337Utils.ENTRYPOINT_V09; + } + + /** + * @dev Return the account nonce for the canonical sequence. + */ + function getNonce() public view virtual returns (uint256) { + return getNonce(0); + } + + /** + * @dev Return the account nonce for a given sequence (key). + */ + function getNonce(uint192 key) public view virtual returns (uint256) { + return entryPoint().getNonce(address(this), key); + } + + /** + * @inheritdoc IAccount + */ + function validateUserOp( + PackedUserOperation calldata userOp, + bytes32 userOpHash, + uint256 missingAccountFunds + ) public virtual onlyEntryPoint returns (uint256) { + uint256 validationData = _validateUserOp(userOp, userOpHash, userOp.signature); + _payPrefund(missingAccountFunds); + return validationData; + } + + /** + * @dev Returns the validationData for a given user operation. By default, this checks the signature of the + * signable hash (produced by {_signableUserOpHash}) using the abstract signer ({AbstractSigner-_rawSignatureValidation}). + * + * The `signature` parameter is taken directly from the user operation's `signature` field. + * This design enables derived contracts to implement custom signature handling logic, + * such as embedding additional data within the signature and processing it by overriding this function + * and optionally invoking `super`. + * + * NOTE: The userOpHash is assumed to be correct. Calling this function with a userOpHash that does not match the + * userOp will result in undefined behavior. + */ + function _validateUserOp( + PackedUserOperation calldata userOp, + bytes32 userOpHash, + bytes calldata signature + ) internal virtual returns (uint256) { + return + _rawSignatureValidation(_signableUserOpHash(userOp, userOpHash), signature) + ? ERC4337Utils.SIG_VALIDATION_SUCCESS + : ERC4337Utils.SIG_VALIDATION_FAILED; + } + + /** + * @dev Virtual function that returns the signable hash for a user operations. Since v0.8.0 of the entrypoint, + * `userOpHash` is an EIP-712 hash that can be signed directly. + */ + function _signableUserOpHash( + PackedUserOperation calldata /*userOp*/, + bytes32 userOpHash + ) internal view virtual returns (bytes32) { + return userOpHash; + } + + /** + * @dev Sends the missing funds for executing the user operation to the {entrypoint}. + * The `missingAccountFunds` must be defined by the entrypoint when calling {validateUserOp}. + */ + function _payPrefund(uint256 missingAccountFunds) internal virtual { + if (missingAccountFunds > 0) { + LowLevelCall.callNoReturn(msg.sender, missingAccountFunds, ""); // The entrypoint should validate the result. + } + } + + /** + * @dev Ensures the caller is the {entrypoint}. + */ + function _checkEntryPoint() internal view virtual { + address sender = msg.sender; + if (sender != address(entryPoint())) { + revert AccountUnauthorized(sender); + } + } + + /** + * @dev Ensures the caller is the {entrypoint} or the account itself. + */ + function _checkEntryPointOrSelf() internal view virtual { + address sender = msg.sender; + if (sender != address(this) && sender != address(entryPoint())) { + revert AccountUnauthorized(sender); + } + } + + /** + * @dev Receive Ether. + */ + receive() external payable virtual {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579.sol b/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579.sol new file mode 100644 index 00000000..1e86b89a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579.sol @@ -0,0 +1,420 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/extensions/draft-AccountERC7579.sol) + +pragma solidity ^0.8.26; + +import {PackedUserOperation} from "../../interfaces/draft-IERC4337.sol"; +import {IERC1271} from "../../interfaces/IERC1271.sol"; +import { + IERC7579Module, + IERC7579Validator, + IERC7579Execution, + IERC7579AccountConfig, + IERC7579ModuleConfig, + MODULE_TYPE_VALIDATOR, + MODULE_TYPE_EXECUTOR, + MODULE_TYPE_FALLBACK +} from "../../interfaces/draft-IERC7579.sol"; +import {ERC7579Utils, Mode, CallType, ExecType} from "../../account/utils/draft-ERC7579Utils.sol"; +import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol"; +import {LowLevelCall} from "../../utils/LowLevelCall.sol"; +import {Bytes} from "../../utils/Bytes.sol"; +import {Packing} from "../../utils/Packing.sol"; +import {Calldata} from "../../utils/Calldata.sol"; +import {Account} from "../Account.sol"; + +/** + * @dev Extension of {Account} that implements support for ERC-7579 modules. + * + * To comply with the ERC-1271 support requirement, this contract defers signature validation to + * installed validator modules by calling {IERC7579Validator-isValidSignatureWithSender}. + * + * This contract does not implement validation logic for user operations since this functionality + * is often delegated to self-contained validation modules. Developers must install a validator module + * upon initialization (or any other mechanism to enable execution from the account): + * + * ```solidity + * contract MyAccountERC7579 is AccountERC7579, Initializable { + * function initializeAccount(address validator, bytes calldata validatorData) public initializer { + * _installModule(MODULE_TYPE_VALIDATOR, validator, validatorData); + * } + * } + * ``` + * + * [NOTE] + * ==== + * * Hook support is not included. See {AccountERC7579Hooked} for a version that hooks to execution. + * * Validator selection, when verifying either ERC-1271 signature or ERC-4337 UserOperation is implemented in + * internal virtual functions {_extractUserOpValidator} and {_extractSignatureValidator}. Both are implemented + * following common practices. However, this part is not standardized in ERC-7579 (or in any follow-up ERC). Some + * accounts may want to override these internal functions. + * * When combined with {ERC7739}, resolution ordering of {isValidSignature} may have an impact ({ERC7739} does not + * call super). Manual resolution might be necessary. + * * Static calls (using callType `0xfe`) are currently NOT supported. + * ==== + * + * WARNING: Removing all validator modules will render the account inoperable, as no user operations can be validated thereafter. + */ +abstract contract AccountERC7579 is Account, IERC1271, IERC7579Execution, IERC7579AccountConfig, IERC7579ModuleConfig { + using Bytes for *; + using ERC7579Utils for *; + using EnumerableSet for *; + using Packing for bytes32; + + EnumerableSet.AddressSet private _validators; + EnumerableSet.AddressSet private _executors; + mapping(bytes4 selector => address) private _fallbacks; + + /// @dev The account's {fallback} was called with a selector that doesn't have an installed handler. + error ERC7579MissingFallbackHandler(bytes4 selector); + + /// @dev The provided initData/deInitData for a fallback module is too short to extract a selector. + error ERC7579CannotDecodeFallbackData(); + + /// @dev Modifier that checks if the caller is an installed module of the given type. + modifier onlyModule(uint256 moduleTypeId, bytes calldata additionalContext) { + _checkModule(moduleTypeId, msg.sender, additionalContext); + _; + } + + /// @dev See {_fallback}. + fallback(bytes calldata) external payable virtual returns (bytes memory) { + return _fallback(); + } + + /// @inheritdoc IERC7579AccountConfig + function accountId() public view virtual returns (string memory) { + // vendorname.accountname.semver + return "@openzeppelin/contracts.AccountERC7579.v1.0.0"; + } + + /** + * @inheritdoc IERC7579AccountConfig + * + * @dev Supported call types: + * * Single (`0x00`): A single transaction execution. + * * Batch (`0x01`): A batch of transactions execution. + * * Delegate (`0xff`): A delegate call execution. + * + * Supported exec types: + * * Default (`0x00`): Default execution type (revert on failure). + * * Try (`0x01`): Try execution type (emits ERC7579TryExecuteFail on failure). + */ + function supportsExecutionMode(bytes32 encodedMode) public view virtual returns (bool) { + (CallType callType, ExecType execType, , ) = Mode.wrap(encodedMode).decodeMode(); + return + (callType == ERC7579Utils.CALLTYPE_SINGLE || + callType == ERC7579Utils.CALLTYPE_BATCH || + callType == ERC7579Utils.CALLTYPE_DELEGATECALL) && + (execType == ERC7579Utils.EXECTYPE_DEFAULT || execType == ERC7579Utils.EXECTYPE_TRY); + } + + /** + * @inheritdoc IERC7579AccountConfig + * + * @dev Supported module types: + * + * * Validator: A module used during the validation phase to determine if a transaction is valid and + * should be executed on the account. + * * Executor: A module that can execute transactions on behalf of the smart account via a callback. + * * Fallback Handler: A module that can extend the fallback functionality of a smart account. + */ + function supportsModule(uint256 moduleTypeId) public view virtual returns (bool) { + return + moduleTypeId == MODULE_TYPE_VALIDATOR || + moduleTypeId == MODULE_TYPE_EXECUTOR || + moduleTypeId == MODULE_TYPE_FALLBACK; + } + + /// @inheritdoc IERC7579ModuleConfig + function installModule( + uint256 moduleTypeId, + address module, + bytes calldata initData + ) public virtual onlyEntryPointOrSelf { + _installModule(moduleTypeId, module, initData); + } + + /// @inheritdoc IERC7579ModuleConfig + function uninstallModule( + uint256 moduleTypeId, + address module, + bytes calldata deInitData + ) public virtual onlyEntryPointOrSelf { + _uninstallModule(moduleTypeId, module, deInitData); + } + + /// @inheritdoc IERC7579ModuleConfig + function isModuleInstalled( + uint256 moduleTypeId, + address module, + bytes calldata additionalContext + ) public view virtual returns (bool) { + if (moduleTypeId == MODULE_TYPE_VALIDATOR) return _validators.contains(module); + if (moduleTypeId == MODULE_TYPE_EXECUTOR) return _executors.contains(module); + if (moduleTypeId == MODULE_TYPE_FALLBACK) + // ERC-7579 requires this function to return bool, never revert. Check length to avoid out-of-bounds access. + return additionalContext.length > 3 && _fallbacks[bytes4(additionalContext[0:4])] == module; + return false; + } + + /// @inheritdoc IERC7579Execution + function execute(bytes32 mode, bytes calldata executionCalldata) public payable virtual onlyEntryPointOrSelf { + _execute(Mode.wrap(mode), executionCalldata); + } + + /// @inheritdoc IERC7579Execution + function executeFromExecutor( + bytes32 mode, + bytes calldata executionCalldata + ) + public + payable + virtual + onlyModule(MODULE_TYPE_EXECUTOR, Calldata.emptyBytes()) + returns (bytes[] memory returnData) + { + return _execute(Mode.wrap(mode), executionCalldata); + } + + /** + * @dev Implement ERC-1271 through IERC7579Validator modules. If module based validation fails, fallback to + * "native" validation by the abstract signer. + * + * NOTE: when combined with {ERC7739}, resolution ordering may have an impact ({ERC7739} does not call super). + * Manual resolution might be necessary. + */ + function isValidSignature(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4) { + // check signature length is enough for extraction + if (signature.length >= 20) { + (address module, bytes calldata innerSignature) = _extractSignatureValidator(signature); + // if module is not installed, skip + if (isModuleInstalled(MODULE_TYPE_VALIDATOR, module, Calldata.emptyBytes())) { + // try validation, skip any revert + try IERC7579Validator(module).isValidSignatureWithSender(msg.sender, hash, innerSignature) returns ( + bytes4 magic + ) { + return magic; + } catch {} + } + } + return bytes4(0xffffffff); + } + + /** + * @dev Validates a user operation with {_signableUserOpHash} and returns the validation data + * if the module specified by the first 20 bytes of the nonce key is installed. Falls back to + * {Account-_validateUserOp} otherwise. + * + * See {_extractUserOpValidator} for the module extraction logic. + */ + function _validateUserOp( + PackedUserOperation calldata userOp, + bytes32 userOpHash, + bytes calldata signature + ) internal virtual override returns (uint256) { + address module = _extractUserOpValidator(userOp); + return + isModuleInstalled(MODULE_TYPE_VALIDATOR, module, Calldata.emptyBytes()) + ? IERC7579Validator(module).validateUserOp(userOp, _signableUserOpHash(userOp, userOpHash)) + : super._validateUserOp(userOp, userOpHash, signature); + } + + /** + * @dev ERC-7579 execution logic. See {supportsExecutionMode} for supported modes. + * + * Reverts if the call type is not supported. + */ + function _execute( + Mode mode, + bytes calldata executionCalldata + ) internal virtual returns (bytes[] memory returnData) { + (CallType callType, ExecType execType, , ) = mode.decodeMode(); + if (callType == ERC7579Utils.CALLTYPE_SINGLE) return executionCalldata.execSingle(execType); + if (callType == ERC7579Utils.CALLTYPE_BATCH) return executionCalldata.execBatch(execType); + if (callType == ERC7579Utils.CALLTYPE_DELEGATECALL) return executionCalldata.execDelegateCall(execType); + revert ERC7579Utils.ERC7579UnsupportedCallType(callType); + } + + /** + * @dev Installs a module of the given type with the given initialization data. + * + * For the fallback module type, the `initData` is expected to be the (packed) concatenation of a 4-byte + * selector and the rest of the data to be sent to the handler when calling {IERC7579Module-onInstall}. + * + * Requirements: + * + * * Module type must be supported. See {supportsModule}. Reverts with {ERC7579Utils-ERC7579UnsupportedModuleType}. + * * Module must be of the given type. Reverts with {ERC7579Utils-ERC7579MismatchedModuleTypeId}. + * * Module must not be already installed. Reverts with {ERC7579Utils-ERC7579AlreadyInstalledModule}. + * + * Emits a {IERC7579ModuleConfig-ModuleInstalled} event. + */ + function _installModule(uint256 moduleTypeId, address module, bytes memory initData) internal virtual { + require(supportsModule(moduleTypeId), ERC7579Utils.ERC7579UnsupportedModuleType(moduleTypeId)); + require( + IERC7579Module(module).isModuleType(moduleTypeId), + ERC7579Utils.ERC7579MismatchedModuleTypeId(moduleTypeId, module) + ); + + if (moduleTypeId == MODULE_TYPE_VALIDATOR) { + require(_validators.add(module), ERC7579Utils.ERC7579AlreadyInstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) { + require(_executors.add(module), ERC7579Utils.ERC7579AlreadyInstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_FALLBACK) { + bytes4 selector; + (selector, initData) = _decodeFallbackData(initData); + require( + _fallbacks[selector] == address(0), + ERC7579Utils.ERC7579AlreadyInstalledModule(moduleTypeId, module) + ); + _fallbacks[selector] = module; + } + + IERC7579Module(module).onInstall(initData); + emit ModuleInstalled(moduleTypeId, module); + } + + /** + * @dev Uninstalls a module of the given type with the given de-initialization data. + * + * For the fallback module type, the `deInitData` is expected to be the (packed) concatenation of a 4-byte + * selector and the rest of the data to be sent to the handler when calling {IERC7579Module-onUninstall}. + * + * Requirements: + * + * * Module must be already installed. Reverts with {ERC7579Utils-ERC7579UninstalledModule} otherwise. + */ + function _uninstallModule(uint256 moduleTypeId, address module, bytes memory deInitData) internal virtual { + require(supportsModule(moduleTypeId), ERC7579Utils.ERC7579UnsupportedModuleType(moduleTypeId)); + + if (moduleTypeId == MODULE_TYPE_VALIDATOR) { + require(_validators.remove(module), ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) { + require(_executors.remove(module), ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_FALLBACK) { + bytes4 selector; + (selector, deInitData) = _decodeFallbackData(deInitData); + require( + _fallbackHandler(selector) == module && module != address(0), + ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module) + ); + delete _fallbacks[selector]; + } + + // Ignores success purposely to avoid modules that revert on uninstall + LowLevelCall.callNoReturn(module, abi.encodeCall(IERC7579Module.onUninstall, (deInitData))); + emit ModuleUninstalled(moduleTypeId, module); + } + + /** + * @dev Fallback function that delegates the call to the installed handler for the given selector. + * + * Reverts with {ERC7579MissingFallbackHandler} if the handler is not installed. + * + * Calls the handler with the original `msg.sender` appended at the end of the calldata following + * the ERC-2771 format. + */ + function _fallback() internal virtual returns (bytes memory) { + address handler = _fallbackHandler(msg.sig); + require(handler != address(0), ERC7579MissingFallbackHandler(msg.sig)); + + // From https://eips.ethereum.org/EIPS/eip-7579#fallback[ERC-7579 specifications]: + // - MUST utilize ERC-2771 to add the original msg.sender to the calldata sent to the fallback handler + // - MUST use call to invoke the fallback handler + if (LowLevelCall.callNoReturn(handler, msg.value, abi.encodePacked(msg.data, msg.sender))) { + return LowLevelCall.returnData(); + } else { + LowLevelCall.bubbleRevert(); + } + } + + /// @dev Returns the fallback handler for the given selector. Returns `address(0)` if not installed. + function _fallbackHandler(bytes4 selector) internal view virtual returns (address) { + return _fallbacks[selector]; + } + + /// @dev Checks if the module is installed. Reverts if the module is not installed. + function _checkModule( + uint256 moduleTypeId, + address module, + bytes calldata additionalContext + ) internal view virtual { + require( + isModuleInstalled(moduleTypeId, module, additionalContext), + ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module) + ); + } + + /** + * @dev Extracts the nonce validator from the user operation. + * + * To construct a nonce key, set nonce as follows: + * + * ``` + * | | + * ``` + * NOTE: The default behavior of this function replicates the behavior of + * https://github.com/rhinestonewtf/safe7579/blob/bb29e8b1a66658790c4169e72608e27d220f79be/src/Safe7579.sol#L266[Safe adapter], + * https://github.com/etherspot/etherspot-prime-contracts/blob/cfcdb48c4172cea0d66038324c0bae3288aa8caa/src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol#L227[Etherspot's Prime Account], and + * https://github.com/erc7579/erc7579-implementation/blob/16138d1afd4e9711f6c1425133538837bd7787b5/src/MSAAdvanced.sol#L247[ERC7579 reference implementation]. + * + * This is not standardized in ERC-7579 (or in any follow-up ERC). Some accounts may want to override these internal functions. + * + * For example, https://github.com/bcnmy/nexus/blob/54f4e19baaff96081a8843672977caf712ef19f4/contracts/lib/NonceLib.sol#L17[Biconomy's Nexus] + * uses a similar yet incompatible approach (the validator address is also part of the nonce, but not at the same location) + */ + function _extractUserOpValidator(PackedUserOperation calldata userOp) internal pure virtual returns (address) { + return address(bytes32(userOp.nonce).extract_32_20(0)); + } + + /** + * @dev Extracts the signature validator from the signature. + * + * To construct a signature, set the first 20 bytes as the module address and the remaining bytes as the + * signature data: + * + * ``` + * | + * ``` + * + * NOTE: The default behavior of this function replicates the behavior of + * https://github.com/rhinestonewtf/safe7579/blob/bb29e8b1a66658790c4169e72608e27d220f79be/src/Safe7579.sol#L350[Safe adapter], + * https://github.com/bcnmy/nexus/blob/54f4e19baaff96081a8843672977caf712ef19f4/contracts/Nexus.sol#L239[Biconomy's Nexus], + * https://github.com/etherspot/etherspot-prime-contracts/blob/cfcdb48c4172cea0d66038324c0bae3288aa8caa/src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol#L252[Etherspot's Prime Account], and + * https://github.com/erc7579/erc7579-implementation/blob/16138d1afd4e9711f6c1425133538837bd7787b5/src/MSAAdvanced.sol#L296[ERC7579 reference implementation]. + * + * This is not standardized in ERC-7579 (or in any follow-up ERC). Some accounts may want to override these internal functions. + * + * NOTE: This function expects the signature to be at least 20 bytes long. Panics with {Panic-ARRAY_OUT_OF_BOUNDS} (0x32) otherwise. + */ + function _extractSignatureValidator( + bytes calldata signature + ) internal pure virtual returns (address module, bytes calldata innerSignature) { + return (address(bytes20(signature)), signature[20:]); + } + + /** + * @dev Extract the function selector from initData/deInitData for MODULE_TYPE_FALLBACK + * + * NOTE: If we had calldata here, we could use calldata slice which are cheaper to manipulate and don't require + * actual copy. However, this would require `_installModule` to get a calldata bytes object instead of a memory + * bytes object. This would prevent calling `_installModule` from a contract constructor and would force the use + * of external initializers. That may change in the future, as most accounts will probably be deployed as + * clones/proxy/EIP-7702 delegates and therefore rely on initializers anyway. + */ + function _decodeFallbackData( + bytes memory data + ) internal pure virtual returns (bytes4 selector, bytes memory remaining) { + require(data.length > 3, ERC7579CannotDecodeFallbackData()); + return (bytes4(data), data.slice(4)); + } + + /// @dev By default, only use the modules for validation of userOp and signature. Disable raw signatures. + function _rawSignatureValidation( + bytes32 /*hash*/, + bytes calldata /*signature*/ + ) internal view virtual override returns (bool) { + return false; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579Hooked.sol b/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579Hooked.sol new file mode 100644 index 00000000..532fb97c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-AccountERC7579Hooked.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/extensions/draft-AccountERC7579Hooked.sol) + +pragma solidity ^0.8.26; + +import {IERC7579Hook, MODULE_TYPE_HOOK} from "../../interfaces/draft-IERC7579.sol"; +import {ERC7579Utils, Mode} from "../../account/utils/draft-ERC7579Utils.sol"; +import {AccountERC7579} from "./draft-AccountERC7579.sol"; + +/** + * @dev Extension of {AccountERC7579} with support for a single hook module (type 4). + * + * If installed, this extension will call the hook module's {IERC7579Hook-preCheck} before executing any operation + * with {_execute} (including {execute} and {executeFromExecutor} by default) and {IERC7579Hook-postCheck} thereafter. + * + * NOTE: Hook modules break the check-effect-interaction pattern. In particular, the {IERC7579Hook-preCheck} hook can + * lead to potentially dangerous reentrancy. Using the `withHook()` modifier is safe if no effect is performed + * before the preHook or after the postHook. That is the case on all functions here, but it may not be the case if + * functions that have this modifier are overridden. Developers should be extremely careful when implementing hook + * modules or further overriding functions that involve hooks. + */ +abstract contract AccountERC7579Hooked is AccountERC7579 { + address private _hook; + + /// @dev A hook module is already present. This contract only supports one hook module. + error ERC7579HookModuleAlreadyPresent(address hook); + + /** + * @dev Calls {IERC7579Hook-preCheck} before executing the modified function and {IERC7579Hook-postCheck} + * thereafter. + */ + modifier withHook() { + address hook_ = hook(); + bytes memory hookData; + + // slither-disable-next-line reentrancy-no-eth + if (hook_ != address(0)) hookData = IERC7579Hook(hook_).preCheck(msg.sender, msg.value, msg.data); + _; + if (hook_ != address(0)) IERC7579Hook(hook_).postCheck(hookData); + } + + /// @inheritdoc AccountERC7579 + function accountId() public view virtual override returns (string memory) { + // vendorname.accountname.semver + return "@openzeppelin/contracts.AccountERC7579Hooked.v1.0.0"; + } + + /// @dev Returns the hook module address if installed, or `address(0)` otherwise. + function hook() public view virtual returns (address) { + return _hook; + } + + /// @dev Supports hook modules. See {AccountERC7579-supportsModule} + function supportsModule(uint256 moduleTypeId) public view virtual override returns (bool) { + return moduleTypeId == MODULE_TYPE_HOOK || super.supportsModule(moduleTypeId); + } + + /// @inheritdoc AccountERC7579 + function isModuleInstalled( + uint256 moduleTypeId, + address module, + bytes calldata data + ) public view virtual override returns (bool) { + return + (moduleTypeId == MODULE_TYPE_HOOK && module == hook()) || + super.isModuleInstalled(moduleTypeId, module, data); + } + + /// @dev Installs a module with support for hook modules. See {AccountERC7579-_installModule} + function _installModule( + uint256 moduleTypeId, + address module, + bytes memory initData + ) internal virtual override withHook { + if (moduleTypeId == MODULE_TYPE_HOOK) { + require(_hook == address(0), ERC7579HookModuleAlreadyPresent(_hook)); + _hook = module; + } + super._installModule(moduleTypeId, module, initData); + } + + /// @dev Uninstalls a module with support for hook modules. See {AccountERC7579-_uninstallModule} + function _uninstallModule( + uint256 moduleTypeId, + address module, + bytes memory deInitData + ) internal virtual override withHook { + if (moduleTypeId == MODULE_TYPE_HOOK) { + require(_hook == module, ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module)); + _hook = address(0); + } + super._uninstallModule(moduleTypeId, module, deInitData); + } + + /// @dev Hooked version of {AccountERC7579-_execute}. + function _execute( + Mode mode, + bytes calldata executionCalldata + ) internal virtual override withHook returns (bytes[] memory) { + return super._execute(mode, executionCalldata); + } + + /// @dev Hooked version of {AccountERC7579-_fallback}. + function _fallback() internal virtual override withHook returns (bytes memory) { + return super._fallback(); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-ERC7821.sol b/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-ERC7821.sol new file mode 100644 index 00000000..f7e0573f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/account/extensions/draft-ERC7821.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (account/extensions/draft-ERC7821.sol) + +pragma solidity ^0.8.20; + +import {ERC7579Utils, Mode, CallType, ExecType, ModeSelector} from "../utils/draft-ERC7579Utils.sol"; +import {IERC7821} from "../../interfaces/draft-IERC7821.sol"; +import {Account} from "../Account.sol"; + +/** + * @dev Minimal batch executor following ERC-7821. + * + * Only supports single batch mode (`0x01000000000000000000`). Does not support optional "opData". + * + * @custom:stateless + */ +abstract contract ERC7821 is IERC7821 { + using ERC7579Utils for *; + + error UnsupportedExecutionMode(); + + /** + * @dev Executes the calls in `executionData` with no optional `opData` support. + * + * NOTE: Access to this function is controlled by {_erc7821AuthorizedExecutor}. Changing access permissions, for + * example to approve calls by the ERC-4337 entrypoint, should be implemented by overriding it. + * + * Reverts and bubbles up error if any call fails. + */ + function execute(bytes32 mode, bytes calldata executionData) public payable virtual { + if (!_erc7821AuthorizedExecutor(msg.sender, mode, executionData)) + revert Account.AccountUnauthorized(msg.sender); + if (!supportsExecutionMode(mode)) revert UnsupportedExecutionMode(); + executionData.execBatch(ERC7579Utils.EXECTYPE_DEFAULT); + } + + /// @inheritdoc IERC7821 + function supportsExecutionMode(bytes32 mode) public view virtual returns (bool result) { + (CallType callType, ExecType execType, ModeSelector modeSelector, ) = Mode.wrap(mode).decodeMode(); + return + callType == ERC7579Utils.CALLTYPE_BATCH && + execType == ERC7579Utils.EXECTYPE_DEFAULT && + modeSelector == ModeSelector.wrap(0x00000000); + } + + /** + * @dev Access control mechanism for the {execute} function. + * By default, only the contract itself is allowed to execute. + * + * Override this function to implement custom access control, for example to allow the + * ERC-4337 entrypoint to execute. + * + * ```solidity + * function _erc7821AuthorizedExecutor( + * address caller, + * bytes32 mode, + * bytes calldata executionData + * ) internal view virtual override returns (bool) { + * return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData); + * } + * ``` + */ + function _erc7821AuthorizedExecutor( + address caller, + bytes32 /* mode */, + bytes calldata /* executionData */ + ) internal view virtual returns (bool) { + return caller == address(this); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/account/utils/EIP7702Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/account/utils/EIP7702Utils.sol new file mode 100644 index 00000000..5de0f6b7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/account/utils/EIP7702Utils.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/utils/EIP7702Utils.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Library with common EIP-7702 utility functions. + * + * See https://eips.ethereum.org/EIPS/eip-7702[EIP-7702]. + */ +library EIP7702Utils { + bytes3 internal constant EIP7702_PREFIX = 0xef0100; + + /** + * @dev Returns the address of the delegate if `account` has an EIP-7702 delegation setup, or address(0) otherwise. + */ + function fetchDelegate(address account) internal view returns (address) { + bytes23 delegation = bytes23(account.code); + return bytes3(delegation) == EIP7702_PREFIX ? address(bytes20(delegation << 24)) : address(0); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC4337Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC4337Utils.sol new file mode 100644 index 00000000..4406f44c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC4337Utils.sol @@ -0,0 +1,279 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/utils/draft-ERC4337Utils.sol) + +pragma solidity ^0.8.20; + +import {IEntryPoint, PackedUserOperation} from "../../interfaces/draft-IERC4337.sol"; +import {Math} from "../../utils/math/Math.sol"; +import {Calldata} from "../../utils/Calldata.sol"; +import {Packing} from "../../utils/Packing.sol"; + +/// @dev This is available on all entrypoint since v0.4.0, but is not formally part of the ERC. +interface IEntryPointExtra { + function getUserOpHash(PackedUserOperation calldata userOp) external view returns (bytes32); +} + +/** + * @dev Library with common ERC-4337 utility functions. + * + * See https://eips.ethereum.org/EIPS/eip-4337[ERC-4337]. + */ +library ERC4337Utils { + using Packing for *; + + /// @dev Address of the entrypoint v0.7.0 + IEntryPoint internal constant ENTRYPOINT_V07 = IEntryPoint(0x0000000071727De22E5E9d8BAf0edAc6f37da032); + + /// @dev Address of the entrypoint v0.8.0 + IEntryPoint internal constant ENTRYPOINT_V08 = IEntryPoint(0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108); + + /// @dev Address of the entrypoint v0.9.0 + IEntryPoint internal constant ENTRYPOINT_V09 = IEntryPoint(0x433709009B8330FDa32311DF1C2AFA402eD8D009); + + /// @dev For simulation purposes, validateUserOp (and validatePaymasterUserOp) return this value on success. + uint256 internal constant SIG_VALIDATION_SUCCESS = 0; + + /// @dev For simulation purposes, validateUserOp (and validatePaymasterUserOp) must return this value in case of signature failure, instead of revert. + uint256 internal constant SIG_VALIDATION_FAILED = 1; + + /// @dev Magic value used in EntryPoint v0.9+ to detect the presence of a paymaster signature in `paymasterAndData`. + bytes8 internal constant PAYMASTER_SIG_MAGIC = 0x22e325a297439656; // keccak256("PaymasterSignature")[:8] + + /// @dev Highest bit set to 1 in a 6-bytes field. + uint48 internal constant BLOCK_RANGE_FLAG = 0x800000000000; + + /// @dev Mask for the lower 47 bits of a 6-bytes field (equivalent to uint48(~BLOCK_RANGE_FLAG)). + uint48 internal constant BLOCK_RANGE_MASK = 0x7fffffffffff; + + /// @dev Validity range of the validation data. + enum ValidationRange { + TIMESTAMP, + BLOCK + } + + /** + * @dev Parses the validation data into its components and the validity range. See {packValidationData}. + * Strips away the highest bit flag from the `validAfter` and `validUntil` fields. + */ + function parseValidationData( + uint256 validationData + ) internal pure returns (address aggregator, uint48 validAfter, uint48 validUntil, ValidationRange range) { + validAfter = uint48(bytes32(validationData).extract_32_6(0)); + validUntil = uint48(bytes32(validationData).extract_32_6(6)); + aggregator = address(bytes32(validationData).extract_32_20(12)); + range = ((validAfter & validUntil & BLOCK_RANGE_FLAG) == 0) ? ValidationRange.TIMESTAMP : ValidationRange.BLOCK; + + validAfter &= BLOCK_RANGE_MASK; + validUntil &= BLOCK_RANGE_MASK; + + if (validUntil == 0) validUntil = BLOCK_RANGE_MASK; + } + + /// @dev Packs the validation data into a single uint256. See {parseValidationData}. + function packValidationData( + address aggregator, + uint48 validAfter, + uint48 validUntil + ) internal pure returns (uint256) { + return + packValidationData( + aggregator, + validAfter, + validUntil, + (validAfter & validUntil & BLOCK_RANGE_FLAG) == 0 ? ValidationRange.TIMESTAMP : ValidationRange.BLOCK + ); + } + + /** + * @dev Variant of {packValidationData} that forces which validity range to use. This overwrites the presence of + * flags in `validAfter` and `validUntil`). + */ + function packValidationData( + address aggregator, + uint48 validAfter, + uint48 validUntil, + ValidationRange range + ) internal pure returns (uint256) { + if (range == ValidationRange.TIMESTAMP) { + validAfter &= BLOCK_RANGE_MASK; + validUntil &= BLOCK_RANGE_MASK; + } else if (range == ValidationRange.BLOCK) { + validAfter |= BLOCK_RANGE_FLAG; + validUntil |= BLOCK_RANGE_FLAG; + } + return uint256(bytes6(validAfter).pack_6_6(bytes6(validUntil)).pack_12_20(bytes20(aggregator))); + } + + /// @dev Variant of {packValidationData} that uses a boolean success flag instead of an aggregator address. + function packValidationData(bool sigSuccess, uint48 validAfter, uint48 validUntil) internal pure returns (uint256) { + return + packValidationData( + address(uint160(Math.ternary(sigSuccess, SIG_VALIDATION_SUCCESS, SIG_VALIDATION_FAILED))), + validAfter, + validUntil + ); + } + + /** + * @dev Variant of {packValidationData} that uses a boolean success flag instead of an aggregator address and that + * forces which validity range to use. This overwrites the presence of flags in `validAfter` and `validUntil`). + */ + function packValidationData( + bool sigSuccess, + uint48 validAfter, + uint48 validUntil, + ValidationRange range + ) internal pure returns (uint256) { + return + packValidationData( + address(uint160(Math.ternary(sigSuccess, SIG_VALIDATION_SUCCESS, SIG_VALIDATION_FAILED))), + validAfter, + validUntil, + range + ); + } + + /** + * @dev Combines two validation data into a single one. + * + * The `aggregator` is set to {SIG_VALIDATION_SUCCESS} if both are successful, while + * the `validAfter` is the maximum and the `validUntil` is the minimum of both. + * + * NOTE: Returns `SIG_VALIDATION_FAILED` if the validation ranges differ. + */ + function combineValidationData(uint256 validationData1, uint256 validationData2) internal pure returns (uint256) { + (address aggregator1, uint48 validAfter1, uint48 validUntil1, ValidationRange range1) = parseValidationData( + validationData1 + ); + (address aggregator2, uint48 validAfter2, uint48 validUntil2, ValidationRange range2) = parseValidationData( + validationData2 + ); + + if (range1 == range2) { + bool success = aggregator1 == address(uint160(SIG_VALIDATION_SUCCESS)) && + aggregator2 == address(uint160(SIG_VALIDATION_SUCCESS)); + uint48 validAfter = uint48(Math.max(validAfter1, validAfter2)); + uint48 validUntil = uint48(Math.min(validUntil1, validUntil2)); + return packValidationData(success, validAfter, validUntil, range1); + } else { + return SIG_VALIDATION_FAILED; + } + } + + /// @dev Returns the aggregator of the `validationData` and whether it is out of time range. + function getValidationData(uint256 validationData) internal view returns (address aggregator, bool outOfTimeRange) { + (address aggregator_, uint48 validAfter, uint48 validUntil, ValidationRange range) = parseValidationData( + validationData + ); + uint256 current = Math.ternary(range == ValidationRange.TIMESTAMP, block.timestamp, block.number); + return (aggregator_, current <= validAfter || validUntil < current); + } + + /// @dev Get the hash of a user operation for a given entrypoint + function hash(PackedUserOperation calldata self, address entrypoint) internal view returns (bytes32) { + // NOTE: getUserOpHash is available since v0.4.0 + // + // Prior to v0.8.0, this was easy to replicate for any entrypoint and chainId. Since v0.8.0 of the + // entrypoint, this depends on the Entrypoint's domain separator, which cannot be hardcoded and is complex + // to recompute. Domain separator could be fetch using the `getDomainSeparatorV4` getter, or recomputed from + // the ERC-5267 getter, but both operation would require doing a view call to the entrypoint. Overall it feels + // simpler and less error prone to get that functionality from the entrypoint directly. + return IEntryPointExtra(entrypoint).getUserOpHash(self); + } + + /// @dev Returns `factory` from the {PackedUserOperation}, or address(0) if the initCode is empty or not properly formatted. + function factory(PackedUserOperation calldata self) internal pure returns (address) { + return self.initCode.length < 20 ? address(0) : address(bytes20(self.initCode[0:20])); + } + + /// @dev Returns `factoryData` from the {PackedUserOperation}, or empty bytes if the initCode is empty or not properly formatted. + function factoryData(PackedUserOperation calldata self) internal pure returns (bytes calldata) { + return self.initCode.length < 20 ? Calldata.emptyBytes() : self.initCode[20:]; + } + + /// @dev Returns `verificationGasLimit` from the {PackedUserOperation}. + function verificationGasLimit(PackedUserOperation calldata self) internal pure returns (uint256) { + return uint128(self.accountGasLimits.extract_32_16(0)); + } + + /// @dev Returns `callGasLimit` from the {PackedUserOperation}. + function callGasLimit(PackedUserOperation calldata self) internal pure returns (uint256) { + return uint128(self.accountGasLimits.extract_32_16(16)); + } + + /// @dev Returns the first section of `gasFees` from the {PackedUserOperation}. + function maxPriorityFeePerGas(PackedUserOperation calldata self) internal pure returns (uint256) { + return uint128(self.gasFees.extract_32_16(0)); + } + + /// @dev Returns the second section of `gasFees` from the {PackedUserOperation}. + function maxFeePerGas(PackedUserOperation calldata self) internal pure returns (uint256) { + return uint128(self.gasFees.extract_32_16(16)); + } + + /// @dev Returns the total gas price for the {PackedUserOperation} (ie. `maxFeePerGas` or `maxPriorityFeePerGas + basefee`). + function gasPrice(PackedUserOperation calldata self) internal view returns (uint256) { + unchecked { + // Following values are "per gas" + uint256 maxPriorityFee = maxPriorityFeePerGas(self); + uint256 maxFee = maxFeePerGas(self); + return Math.min(maxFee, maxPriorityFee + block.basefee); + } + } + + /// @dev Returns the first section of `paymasterAndData` from the {PackedUserOperation}. + function paymaster(PackedUserOperation calldata self) internal pure returns (address) { + return self.paymasterAndData.length < 52 ? address(0) : address(bytes20(self.paymasterAndData[0:20])); + } + + /// @dev Returns the second section of `paymasterAndData` from the {PackedUserOperation}. + function paymasterVerificationGasLimit(PackedUserOperation calldata self) internal pure returns (uint256) { + return self.paymasterAndData.length < 52 ? 0 : uint128(bytes16(self.paymasterAndData[20:36])); + } + + /// @dev Returns the third section of `paymasterAndData` from the {PackedUserOperation}. + function paymasterPostOpGasLimit(PackedUserOperation calldata self) internal pure returns (uint256) { + return self.paymasterAndData.length < 52 ? 0 : uint128(bytes16(self.paymasterAndData[36:52])); + } + + /** + * @dev Returns the fourth section of `paymasterAndData` from the {PackedUserOperation}. + * If a paymaster signature is present, it is excluded from the returned data. + */ + function paymasterData(PackedUserOperation calldata self) internal pure returns (bytes calldata) { + bool hasSignature = self.paymasterAndData.length > 9 && + bytes8(self.paymasterAndData[self.paymasterAndData.length - 8:]) == PAYMASTER_SIG_MAGIC; + uint256 suffixLength = hasSignature ? _paymasterSignatureSize(self) + 10 : 0; + return + self.paymasterAndData.length < 52 + suffixLength + ? Calldata.emptyBytes() + : self.paymasterAndData[52:self.paymasterAndData.length - suffixLength]; + } + + /** + * @dev Returns the paymaster signature from `paymasterAndData` (EntryPoint v0.9+). + * Returns empty bytes if no paymaster signature is present. + */ + function paymasterSignature(PackedUserOperation calldata self) internal pure returns (bytes calldata) { + if ( + self.paymasterAndData.length < 10 || + bytes8(self.paymasterAndData[self.paymasterAndData.length - 8:]) != PAYMASTER_SIG_MAGIC + ) return Calldata.emptyBytes(); + + uint256 sigSize = _paymasterSignatureSize(self); + uint256 sigEnd = self.paymasterAndData.length - 10; + return + self.paymasterAndData.length < 62 + sigSize + ? Calldata.emptyBytes() + : self.paymasterAndData[sigEnd - sigSize:sigEnd]; + } + + /** + * @dev Returns the size of the paymaster signature in `paymasterAndData` (EntryPoint v0.9+). + * Does not check minimum length of `paymasterAndData`. + */ + function _paymasterSignatureSize(PackedUserOperation calldata self) private pure returns (uint256) { + return + uint16(bytes2(self.paymasterAndData[self.paymasterAndData.length - 10:self.paymasterAndData.length - 8])); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC7579Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC7579Utils.sol new file mode 100644 index 00000000..38809116 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/account/utils/draft-ERC7579Utils.sol @@ -0,0 +1,280 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/utils/draft-ERC7579Utils.sol) + +pragma solidity ^0.8.20; + +import {Execution} from "../../interfaces/draft-IERC7579.sol"; +import {Packing} from "../../utils/Packing.sol"; +import {Address} from "../../utils/Address.sol"; + +type Mode is bytes32; +type CallType is bytes1; +type ExecType is bytes1; +type ModeSelector is bytes4; +type ModePayload is bytes22; + +/** + * @dev Library with common ERC-7579 utility functions. + * + * See https://eips.ethereum.org/EIPS/eip-7579[ERC-7579]. + */ +// slither-disable-next-line unused-state +library ERC7579Utils { + using Packing for *; + + /// @dev A single `call` execution. + CallType internal constant CALLTYPE_SINGLE = CallType.wrap(0x00); + + /// @dev A batch of `call` executions. + CallType internal constant CALLTYPE_BATCH = CallType.wrap(0x01); + + /// @dev A `delegatecall` execution. + CallType internal constant CALLTYPE_DELEGATECALL = CallType.wrap(0xFF); + + /// @dev Default execution type that reverts on failure. + ExecType internal constant EXECTYPE_DEFAULT = ExecType.wrap(0x00); + + /// @dev Execution type that does not revert on failure. + ExecType internal constant EXECTYPE_TRY = ExecType.wrap(0x01); + + /** + * @dev Emits when an {EXECTYPE_TRY} execution fails. + * @param batchExecutionIndex The index of the failed call in the execution batch. + * @param returndata The returned data from the failed call. + */ + event ERC7579TryExecuteFail(uint256 batchExecutionIndex, bytes returndata); + + /// @dev The provided {CallType} is not supported. + error ERC7579UnsupportedCallType(CallType callType); + + /// @dev The provided {ExecType} is not supported. + error ERC7579UnsupportedExecType(ExecType execType); + + /// @dev The provided module doesn't match the provided module type. + error ERC7579MismatchedModuleTypeId(uint256 moduleTypeId, address module); + + /// @dev The module is not installed. + error ERC7579UninstalledModule(uint256 moduleTypeId, address module); + + /// @dev The module is already installed. + error ERC7579AlreadyInstalledModule(uint256 moduleTypeId, address module); + + /// @dev The module type is not supported. + error ERC7579UnsupportedModuleType(uint256 moduleTypeId); + + /// @dev Input calldata not properly formatted and possibly malicious. + error ERC7579DecodingError(); + + /// @dev Executes a single call. + function execSingle( + bytes calldata executionCalldata, + ExecType execType + ) internal returns (bytes[] memory returnData) { + (address target, uint256 value, bytes calldata callData) = decodeSingle(executionCalldata); + returnData = new bytes[](1); + returnData[0] = _call(0, execType, target, value, callData); + } + + /// @dev Executes a batch of calls. + function execBatch( + bytes calldata executionCalldata, + ExecType execType + ) internal returns (bytes[] memory returnData) { + Execution[] calldata executionBatch = decodeBatch(executionCalldata); + returnData = new bytes[](executionBatch.length); + for (uint256 i = 0; i < executionBatch.length; ++i) { + returnData[i] = _call( + i, + execType, + executionBatch[i].target, + executionBatch[i].value, + executionBatch[i].callData + ); + } + } + + /// @dev Executes a delegate call. + function execDelegateCall( + bytes calldata executionCalldata, + ExecType execType + ) internal returns (bytes[] memory returnData) { + (address target, bytes calldata callData) = decodeDelegate(executionCalldata); + returnData = new bytes[](1); + returnData[0] = _delegatecall(0, execType, target, callData); + } + + /// @dev Encodes the mode with the provided parameters. See {decodeMode}. + function encodeMode( + CallType callType, + ExecType execType, + ModeSelector selector, + ModePayload payload + ) internal pure returns (Mode mode) { + return + Mode.wrap( + CallType + .unwrap(callType) + .pack_1_1(ExecType.unwrap(execType)) + .pack_2_4(bytes4(0)) + .pack_6_4(ModeSelector.unwrap(selector)) + .pack_10_22(ModePayload.unwrap(payload)) + ); + } + + /// @dev Decodes the mode into its parameters. See {encodeMode}. + function decodeMode( + Mode mode + ) internal pure returns (CallType callType, ExecType execType, ModeSelector selector, ModePayload payload) { + return ( + CallType.wrap(Packing.extract_32_1(Mode.unwrap(mode), 0x00)), + ExecType.wrap(Packing.extract_32_1(Mode.unwrap(mode), 0x01)), + ModeSelector.wrap(Packing.extract_32_4(Mode.unwrap(mode), 0x06)), + ModePayload.wrap(Packing.extract_32_22(Mode.unwrap(mode), 0x0a)) + ); + } + + /// @dev Encodes a single call execution. See {decodeSingle}. + function encodeSingle( + address target, + uint256 value, + bytes calldata callData + ) internal pure returns (bytes memory executionCalldata) { + return abi.encodePacked(target, value, callData); + } + + /// @dev Decodes a single call execution. See {encodeSingle}. + function decodeSingle( + bytes calldata executionCalldata + ) internal pure returns (address target, uint256 value, bytes calldata callData) { + target = address(bytes20(executionCalldata)); + value = uint256(bytes32(executionCalldata[20:52])); + callData = executionCalldata[52:]; + } + + /// @dev Encodes a delegate call execution. See {decodeDelegate}. + function encodeDelegate( + address target, + bytes calldata callData + ) internal pure returns (bytes memory executionCalldata) { + return abi.encodePacked(target, callData); + } + + /// @dev Decodes a delegate call execution. See {encodeDelegate}. + function decodeDelegate( + bytes calldata executionCalldata + ) internal pure returns (address target, bytes calldata callData) { + target = address(bytes20(executionCalldata)); + callData = executionCalldata[20:]; + } + + /// @dev Encodes a batch of executions. See {decodeBatch}. + function encodeBatch(Execution[] memory executionBatch) internal pure returns (bytes memory executionCalldata) { + return abi.encode(executionBatch); + } + + /// @dev Decodes a batch of executions. See {encodeBatch}. + /// + /// NOTE: This function runs some checks and will throw a {ERC7579DecodingError} if the input is not properly formatted. + function decodeBatch(bytes calldata executionCalldata) internal pure returns (Execution[] calldata executionBatch) { + unchecked { + uint256 bufferLength = executionCalldata.length; + + // Check executionCalldata is not empty. + if (bufferLength < 0x20) revert ERC7579DecodingError(); + + // Get the offset of the array (pointer to the array length). + uint256 arrayLengthOffset = uint256(bytes32(executionCalldata[0x00:0x20])); + + // The array length (at arrayLengthOffset) should be 32 bytes long. We check that this is within the + // buffer bounds. Since we know bufferLength is at least 32, we can subtract with no overflow risk. + if (arrayLengthOffset > bufferLength - 0x20) revert ERC7579DecodingError(); + + // Get the array length. arrayLengthOffset + 32 is bounded by bufferLength so it does not overflow. + uint256 arrayLength = uint256(bytes32(executionCalldata[arrayLengthOffset:arrayLengthOffset + 0x20])); + + // Check that the buffer is long enough to store the array elements as "offset pointer": + // - each element of the array is an "offset pointer" to the data. + // - each "offset pointer" (to an array element) takes 32 bytes. + // - validity of the calldata at that location is checked when the array element is accessed, so we only + // need to check that the buffer is large enough to hold the pointers. + // + // Since we know bufferLength is at least arrayLengthOffset + 32, we can subtract with no overflow risk. + // Solidity limits length of such arrays to 2**64-1, this guarantees `arrayLength * 32` does not overflow. + if (arrayLength > type(uint64).max || bufferLength - arrayLengthOffset - 0x20 < arrayLength * 0x20) + revert ERC7579DecodingError(); + + assembly ("memory-safe") { + executionBatch.offset := add(add(executionCalldata.offset, arrayLengthOffset), 0x20) + executionBatch.length := arrayLength + } + } + } + + /// @dev Executes a `call` to the target with the provided {ExecType}. + function _call( + uint256 index, + ExecType execType, + address target, + uint256 value, + bytes calldata data + ) private returns (bytes memory) { + (bool success, bytes memory returndata) = (target == address(0) ? address(this) : target).call{value: value}( + data + ); + return _validateExecutionMode(index, execType, success, returndata); + } + + /// @dev Executes a `delegatecall` to the target with the provided {ExecType}. + function _delegatecall( + uint256 index, + ExecType execType, + address target, + bytes calldata data + ) private returns (bytes memory) { + (bool success, bytes memory returndata) = (target == address(0) ? address(this) : target).delegatecall(data); + return _validateExecutionMode(index, execType, success, returndata); + } + + /// @dev Validates the execution mode and returns the returndata. + function _validateExecutionMode( + uint256 index, + ExecType execType, + bool success, + bytes memory returndata + ) private returns (bytes memory) { + if (execType == ERC7579Utils.EXECTYPE_DEFAULT) { + Address.verifyCallResult(success, returndata); + } else if (execType == ERC7579Utils.EXECTYPE_TRY) { + if (!success) emit ERC7579TryExecuteFail(index, returndata); + } else { + revert ERC7579UnsupportedExecType(execType); + } + return returndata; + } +} + +// Operators +using {eqCallType as ==} for CallType global; +using {eqExecType as ==} for ExecType global; +using {eqModeSelector as ==} for ModeSelector global; +using {eqModePayload as ==} for ModePayload global; + +/// @dev Compares two `CallType` values for equality. +function eqCallType(CallType a, CallType b) pure returns (bool) { + return CallType.unwrap(a) == CallType.unwrap(b); +} + +/// @dev Compares two `ExecType` values for equality. +function eqExecType(ExecType a, ExecType b) pure returns (bool) { + return ExecType.unwrap(a) == ExecType.unwrap(b); +} + +/// @dev Compares two `ModeSelector` values for equality. +function eqModeSelector(ModeSelector a, ModeSelector b) pure returns (bool) { + return ModeSelector.unwrap(a) == ModeSelector.unwrap(b); +} + +/// @dev Compares two `ModePayload` values for equality. +function eqModePayload(ModePayload a, ModePayload b) pure returns (bool) { + return ModePayload.unwrap(a) == ModePayload.unwrap(b); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AbstractSigner.json similarity index 58% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AbstractSigner.json index 0b5c9378..3385a14b 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ReentrancyGuard.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AbstractSigner.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ReentrancyGuard", - "sourceName": "contracts/security/ReentrancyGuard.sol", + "contractName": "AbstractSigner", + "sourceName": "contracts/utils/cryptography/signers/AbstractSigner.sol", "abi": [], "bytecode": "0x", "deployedBytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControl.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControl.json similarity index 90% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControl.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControl.json index 61422fed..44765e96 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControl.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControl.json @@ -3,6 +3,27 @@ "contractName": "AccessControl", "sourceName": "contracts/access/AccessControl.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -161,7 +182,7 @@ }, { "internalType": "address", - "name": "account", + "name": "callerConfirmation", "type": "address" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlDefaultAdminRules.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControlDefaultAdminRules.json similarity index 85% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlDefaultAdminRules.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControlDefaultAdminRules.json index cc736758..dbf10f03 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlDefaultAdminRules.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControlDefaultAdminRules.json @@ -1,8 +1,72 @@ { "_format": "hh-sol-artifact-1", "contractName": "AccessControlDefaultAdminRules", - "sourceName": "contracts/access/AccessControlDefaultAdminRules.sol", + "sourceName": "contracts/access/extensions/AccessControlDefaultAdminRules.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "name": "AccessControlEnforcedDefaultAdminDelay", + "type": "error" + }, + { + "inputs": [], + "name": "AccessControlEnforcedDefaultAdminRules", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "defaultAdmin", + "type": "address" + } + ], + "name": "AccessControlInvalidDefaultAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "anonymous": false, "inputs": [], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlEnumerable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControlEnumerable.json similarity index 85% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlEnumerable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControlEnumerable.json index 896b3c47..df1c0988 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/AccessControlEnumerable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessControlEnumerable.json @@ -1,8 +1,29 @@ { "_format": "hh-sol-artifact-1", "contractName": "AccessControlEnumerable", - "sourceName": "contracts/access/AccessControlEnumerable.sol", + "sourceName": "contracts/access/extensions/AccessControlEnumerable.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -153,6 +174,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -204,7 +244,7 @@ }, { "internalType": "address", - "name": "account", + "name": "callerConfirmation", "type": "address" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessManaged.json similarity index 58% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessManaged.json index 4e877cb3..aca13615 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/UUPSUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessManaged.json @@ -1,95 +1,96 @@ { "_format": "hh-sol-artifact-1", - "contractName": "UUPSUpgradeable", - "sourceName": "contracts/proxy/utils/UUPSUpgradeable.sol", + "contractName": "AccessManaged", + "sourceName": "contracts/access/manager/AccessManaged.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "authority", "type": "address" - }, + } + ], + "name": "AccessManagedInvalidAuthority", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "caller", "type": "address" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" } ], - "name": "AdminChanged", - "type": "event" + "name": "AccessManagedRequiredDelay", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "beacon", + "name": "caller", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "name": "AccessManagedUnauthorized", + "type": "error" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "implementation", + "name": "authority", "type": "address" } ], - "name": "Upgraded", + "name": "AuthorityUpdated", "type": "event" }, { "inputs": [], - "name": "proxiableUUID", + "name": "authority", "outputs": [ { - "internalType": "bytes32", + "internalType": "address", "name": "", - "type": "bytes32" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "isConsumingScheduledOp", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "bytes4", + "name": "", + "type": "bytes4" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "newAuthority", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "upgradeToAndCall", + "name": "setAuthority", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessManager.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessManager.json new file mode 100644 index 00000000..c7443215 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccessManager.json @@ -0,0 +1,1175 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessManager", + "sourceName": "contracts/access/manager/AccessManager.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialAdmin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerAlreadyScheduled", + "type": "error" + }, + { + "inputs": [], + "name": "AccessManagerBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerExpired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialAdmin", + "type": "address" + } + ], + "name": "AccessManagerInvalidInitialAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "AccessManagerLockedRole", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerNotReady", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerNotScheduled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgsender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "AccessManagerUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "AccessManagerUnauthorizedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgsender", + "type": "address" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "AccessManagerUnauthorizedCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AccessManagerUnauthorizedConsume", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "OperationCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "admin", + "type": "uint64" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + } + ], + "name": "RoleGrantDelayChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newMember", + "type": "bool" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "guardian", + "type": "uint64" + } + ], + "name": "RoleGuardianChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "RoleLabel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + } + ], + "name": "TargetAdminDelayUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "closed", + "type": "bool" + } + ], + "name": "TargetClosed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "TargetFunctionRoleUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PUBLIC_ROLE", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "canCall", + "outputs": [ + { + "internalType": "bool", + "name": "immediate", + "type": "bool" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "consumeScheduledOp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "expiration", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccess", + "outputs": [ + { + "internalType": "uint48", + "name": "since", + "type": "uint48" + }, + { + "internalType": "uint32", + "name": "currentDelay", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "pendingDelay", + "type": "uint32" + }, + { + "internalType": "uint48", + "name": "effect", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleGrantDelay", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleGuardian", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getSchedule", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "getTargetAdminDelay", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getTargetFunctionRole", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "executionDelay", + "type": "uint32" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "isMember", + "type": "bool" + }, + { + "internalType": "uint32", + "name": "executionDelay", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "isTargetClosed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "labelRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "minSetback", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint48", + "name": "when", + "type": "uint48" + } + ], + "name": "schedule", + "outputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "newDelay", + "type": "uint32" + } + ], + "name": "setGrantDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "admin", + "type": "uint64" + } + ], + "name": "setRoleAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "guardian", + "type": "uint64" + } + ], + "name": "setRoleGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint32", + "name": "newDelay", + "type": "uint32" + } + ], + "name": "setTargetAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bool", + "name": "closed", + "type": "bool" + } + ], + "name": "setTargetClosed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + }, + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "setTargetFunctionRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "address", + "name": "newAuthority", + "type": "address" + } + ], + "name": "updateAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561000f575f5ffd5b50604051612ca3380380612ca383398101604081905261002e91610441565b6001600160a01b03811661005c57604051630409d6d160e11b81525f60048201526024015b60405180910390fd5b6100685f82818061006f565b50506104bc565b5f6002600160401b03196001600160401b038616016100ac5760405163061c6a4360e21b81526001600160401b0386166004820152602401610053565b6001600160401b0385165f9081526001602090815260408083206001600160a01b038816845290915281205465ffffffffffff16159081156101a15763ffffffff85166100f76102b5565b6101019190610482565b905060405180604001604052808265ffffffffffff1681526020016101318663ffffffff166102c460201b60201c565b6001600160701b039081169091526001600160401b0389165f9081526001602090815260408083206001600160a01b038c16845282529091208351815494909201519092166601000000000000026001600160a01b031990931665ffffffffffff90911617919091179055610247565b6001600160401b0387165f9081526001602090815260408083206001600160a01b038a1684529091528120546101ed9166010000000000009091046001600160701b03169086906102cd565b6001600160401b0389165f9081526001602090815260408083206001600160a01b038c168452909152902080546001600160701b03909316660100000000000002600160301b600160a01b03199093169290921790915590505b6040805163ffffffff8616815265ffffffffffff831660208201528315158183015290516001600160a01b038816916001600160401b038a16917ff98448b987f1428e0e230e1f3c6e2ce15b5693eaf31827fbd0b1ec4b424ae7cf9181900360600190a35095945050505050565b5f6102bf42610373565b905090565b63ffffffff1690565b5f80806102e26001600160701b0387166103a9565b90505f61031d8563ffffffff168763ffffffff168463ffffffff1611610308575f610312565b61031288856104a0565b63ffffffff166103c7565b905063ffffffff811661032e6102b5565b6103389190610482565b925063ffffffff8616602083901b67ffffffff0000000016604085901b6dffffffffffff000000000000000016171793505050935093915050565b5f65ffffffffffff8211156103a5576040516306dfcc6560e41b81526030600482015260248101839052604401610053565b5090565b5f806103bd6001600160701b0384166103d7565b5090949350505050565b8082118183180281185b92915050565b5f80806103eb846103e66102b5565b6103f8565b9250925092509193909250565b6001600160501b03602083901c166001600160701b03831665ffffffffffff604085901c811690841681111561043057828282610434565b815f5f5b9250925092509250925092565b5f60208284031215610451575f5ffd5b81516001600160a01b0381168114610467575f5ffd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b65ffffffffffff81811683821601908111156103d1576103d161046e565b63ffffffff82811682821603908111156103d1576103d161046e565b6127da806104c95f395ff3fe6080604052600436106101db575f3560e01c80636d5115bd116100fd578063b700961311610092578063d22b598911610062578063d22b598914610636578063d6bb62c614610655578063f801a69814610674578063fe0776f5146106ad575f5ffd5b8063b7009613146105a8578063b7d2b162146105e3578063cc1b6c8114610602578063d1f856ee14610617575f5ffd5b8063a166aa89116100cd578063a166aa8914610501578063a64d95ce14610530578063abd9bd2a1461054f578063ac9650d81461057c575f5ffd5b80636d5115bd1461049157806375b238fc146104b0578063853551b8146104c357806394c7d7ee146104e2575f5ffd5b806330cae187116101735780634665096d116101435780634665096d146104035780634c1da1e2146104185780635296295214610437578063530dd45614610456575f5ffd5b806330cae1871461035c5780633adc277a1461037b5780633ca7c02a146103b15780634136a33c146103cb575f5ffd5b806318ff183c116101ae57806318ff183c146102b25780631cff79cd146102d157806325c471a0146102e45780633078f11414610303575f5ffd5b806308d6122d146101df5780630b0a93ba1461020057806312be87271461025f578063167bd39514610293575b5f5ffd5b3480156101ea575f5ffd5b506101fe6101f93660046120c0565b6106cc565b005b34801561020b575f5ffd5b5061024261021a366004612122565b6001600160401b039081165f9081526001602081905260409091200154600160401b90041690565b6040516001600160401b0390911681526020015b60405180910390f35b34801561026a575f5ffd5b5061027e610279366004612122565b61071e565b60405163ffffffff9091168152602001610256565b34801561029e575f5ffd5b506101fe6102ad36600461213b565b610758565b3480156102bd575f5ffd5b506101fe6102cc366004612176565b61076e565b61027e6102df3660046121df565b6107d0565b3480156102ef575f5ffd5b506101fe6102fe366004612242565b6108fc565b34801561030e575f5ffd5b5061032261031d366004612284565b61091e565b604051610256949392919065ffffffffffff948516815263ffffffff93841660208201529190921660408201529116606082015260800190565b348015610367575f5ffd5b506101fe61037636600461229e565b610982565b348015610386575f5ffd5b5061039a6103953660046122cf565b610994565b60405165ffffffffffff9091168152602001610256565b3480156103bc575f5ffd5b506102426001600160401b0381565b3480156103d6575f5ffd5b5061027e6103e53660046122cf565b5f90815260026020526040902054600160301b900463ffffffff1690565b34801561040e575f5ffd5b5062093a8061027e565b348015610423575f5ffd5b5061027e6104323660046122e6565b6109c5565b348015610442575f5ffd5b506101fe61045136600461229e565b6109f2565b348015610461575f5ffd5b50610242610470366004612122565b6001600160401b039081165f90815260016020819052604090912001541690565b34801561049c575f5ffd5b506102426104ab366004612316565b610a04565b3480156104bb575f5ffd5b506102425f81565b3480156104ce575f5ffd5b506101fe6104dd366004612342565b610a3e565b3480156104ed575f5ffd5b506101fe6104fc3660046121df565b610ad5565b34801561050c575f5ffd5b5061052061051b3660046122e6565b610b7f565b6040519015158152602001610256565b34801561053b575f5ffd5b506101fe61054a36600461235d565b610ba6565b34801561055a575f5ffd5b5061056e610569366004612385565b610bb8565b604051908152602001610256565b348015610587575f5ffd5b5061059b6105963660046123e5565b610bf0565b6040516102569190612423565b3480156105b3575f5ffd5b506105c76105c23660046124a7565b610cd5565b60408051921515835263ffffffff909116602083015201610256565b3480156105ee575f5ffd5b506101fe6105fd366004612284565b610d56565b34801561060d575f5ffd5b506206978061027e565b348015610622575f5ffd5b506105c7610631366004612284565b610d6d565b348015610641575f5ffd5b506101fe6106503660046124ef565b610de6565b348015610660575f5ffd5b5061027e61066f366004612385565b610df8565b34801561067f575f5ffd5b5061069361068e36600461250b565b610f4b565b6040805192835263ffffffff909116602083015201610256565b3480156106b8575f5ffd5b506101fe6106c7366004612284565b61108c565b6106d46110b5565b5f5b828110156107175761070f858585848181106106f4576106f4612578565b9050602002016020810190610709919061258c565b8461112c565b6001016106d6565b5050505050565b6001600160401b0381165f9081526001602081905260408220015461075290600160801b90046001600160701b03166111ad565b92915050565b6107606110b5565b61076a82826111cb565b5050565b6107766110b5565b604051637a9e5e4b60e01b81526001600160a01b038281166004830152831690637a9e5e4b906024015f604051808303815f87803b1580156107b6575f5ffd5b505af11580156107c8573d5f5f3e3d5ffd5b505050505050565b5f3381806107e08388888861123c565b91509150811580156107f6575063ffffffff8116155b15610849578287610807888861128d565b6040516381c6f24b60e01b81526001600160a01b0393841660048201529290911660248301526001600160e01b03191660448201526064015b60405180910390fd5b5f61085684898989610bb8565b90505f63ffffffff831615158061087c575061087182610994565b65ffffffffffff1615155b1561088d5761088a826112a4565b90505b6003546108a38a61089e8b8b61128d565b6113a2565b6003819055506108ea8a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152503492506113c7915050565b506003559450505050505b9392505050565b6109046110b5565b61091883836109128661071e565b84611493565b50505050565b6001600160401b0382165f9081526001602090815260408083206001600160a01b03851684529091528120805465ffffffffffff81169291829182919061097490600160301b90046001600160701b03166116d9565b969991985096509350505050565b61098a6110b5565b61076a82826116fa565b5f8181526002602052604081205465ffffffffffff166109b38161179d565b6109bd57806108f5565b5f9392505050565b6001600160a01b0381165f90815260208190526040812060010154610752906001600160701b03166111ad565b6109fa6110b5565b61076a82826117cb565b6001600160a01b0382165f908152602081815260408083206001600160e01b0319851684529091529020546001600160401b031692915050565b610a466110b5565b6001600160401b0383161580610a6457506001600160401b03838116145b15610a8d5760405163061c6a4360e21b81526001600160401b0384166004820152602401610840565b826001600160401b03167f1256f5b5ecb89caec12db449738f2fbcd1ba5806cf38f35413f4e5c15bf6a4508383604051610ac89291906125cf565b60405180910390a2505050565b60408051638fb3603760e01b80825291513392918391638fb36037916004808201926020929091908290030181865afa158015610b14573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3891906125ea565b6001600160e01b03191614610b6b57604051630641fee960e31b81526001600160a01b0382166004820152602401610840565b610717610b7a85838686610bb8565b6112a4565b6001600160a01b03165f90815260208190526040902060010154600160701b900460ff1690565b610bae6110b5565b61076a828261187c565b5f84848484604051602001610bd09493929190612605565b604051602081830303815290604052805190602001209050949350505050565b604080515f815260208101909152606090826001600160401b03811115610c1957610c19612676565b604051908082528060200260200182016040528015610c4c57816020015b6060815260200190600190039081610c375790505b5091505f5b83811015610ccd57610ca830868684818110610c6f57610c6f612578565b9050602002810190610c81919061268a565b85604051602001610c94939291906126cc565b60405160208183030381529060405261198b565b838281518110610cba57610cba612578565b6020908102919091010152600101610c51565b505092915050565b5f5f610ce084610b7f565b15610cef57505f905080610d4e565b306001600160a01b03861603610d1357610d098484611a0d565b5f91509150610d4e565b5f610d1e8585610a04565b90505f5f610d2c8389610d6d565b9150915081610d3c575f5f610d46565b63ffffffff811615815b945094505050505b935093915050565b610d5e6110b5565b610d688282611a23565b505050565b5f8067fffffffffffffffe196001600160401b03851601610d935750600190505f610ddf565b5f5f610d9f868661091e565b5050915091508165ffffffffffff165f14158015610dd45750610dc0611b0c565b65ffffffffffff168265ffffffffffff1611155b93509150610ddf9050565b9250929050565b610dee6110b5565b61076a8282611b1b565b5f3381610e05858561128d565b90505f610e1488888888610bb8565b5f8181526002602052604081205491925065ffffffffffff9091169003610e515760405163060a299b60e41b815260048101829052602401610840565b826001600160a01b0316886001600160a01b031614610eea575f610e755f85610d6d565b5090505f610e8f610e8961021a8b87610a04565b86610d6d565b50905081158015610e9e575080155b15610ee757604051630ff89d4760e21b81526001600160a01b038087166004830152808c1660248301528a1660448201526001600160e01b031985166064820152608401610840565b50505b5f81815260026020526040808220805465ffffffffffff1916908190559051600160301b90910463ffffffff1691829184917fbd9ac67a6e2f6463b80927326310338bcbb4bdb7936ce1365ea3e01067e7b9f791a398975050505050505050565b5f803381610f5b8289898961123c565b9150505f8163ffffffff16610f6e611b0c565b610f7891906126ef565b905063ffffffff82161580610fae57505f8665ffffffffffff16118015610fae57508065ffffffffffff168665ffffffffffff16105b15610fbf5782896108078a8a61128d565b610fd98665ffffffffffff168265ffffffffffff16611bd6565b9550610fe7838a8a8a610bb8565b9450610ff285611be5565b5f8581526002602052604090819020805465ffffffffffff891669ffffffffffffffffffff19821617600160301b9182900463ffffffff90811660010190811692830291909117909255915190955086907f82a2da5dee54ea8021c6545b4444620291e07ee83be6dd57edb175062715f3b490611078908a9088908f908f908f9061270d565b60405180910390a350505094509492505050565b6001600160a01b0381163314610d5e57604051635f159e6360e01b815260040160405180910390fd5b335f806110c3838236611c31565b9150915081610d68578063ffffffff165f0361111d575f6110e48136611cf4565b5060405163f07e038f60e01b81526001600160a01b03871660048201526001600160401b03821660248201529092506044019050610840565b610918610b7a84305f36610bb8565b6001600160a01b0383165f818152602081815260408083206001600160e01b0319871680855290835292819020805467ffffffffffffffff19166001600160401b038716908117909155905192835292917f9ea6790c7dadfd01c9f8b9762b3682607af2c7e79e05a9f9fdf5580dde949151910160405180910390a3505050565b5f5f6111c1836001600160701b03166116d9565b5090949350505050565b6001600160a01b0382165f81815260208190526040908190206001018054841515600160701b0260ff60701b19909116179055517f90d4e7bb7e5d933792b3562e1741306f8be94837e1348dacef9b6f1df56eb1389061123090841515815260200190565b60405180910390a25050565b5f80306001600160a01b0386160361126257611259868585611c31565b91509150611284565b6004831061127e5761127986866105c2878761128d565b611259565b505f9050805b94509492505050565b5f61129b600482848661264f565b6108f591612752565b5f8181526002602052604081205465ffffffffffff811690600160301b900463ffffffff168183036112ec5760405163060a299b60e41b815260048101859052602401610840565b6112f4611b0c565b65ffffffffffff168265ffffffffffff16111561132757604051630c65b5bd60e11b815260048101859052602401610840565b6113308261179d565b1561135157604051631e2975b960e21b815260048101859052602401610840565b5f84815260026020526040808220805465ffffffffffff191690555163ffffffff83169186917f76a2a46953689d4861a5d3f6ed883ad7e6af674a21f8e162707159fc9dde614d9190a39392505050565b6001600160a01b0382165f9081526001600160e01b03198216602052604081206108f5565b6060814710156113f35760405163cf47918160e01b815247600482015260248101839052604401610840565b5f6113ff858486611eda565b905080801561142057505f3d118061142057505f856001600160a01b03163b115b156114355761142d611eef565b9150506108f5565b801561145f57604051639996b31560e01b81526001600160a01b0386166004820152602401610840565b3d156114725761146d611f08565b61148b565b60405163d6bda27560e01b815260040160405180910390fd5b509392505050565b5f67fffffffffffffffe196001600160401b038616016114d15760405163061c6a4360e21b81526001600160401b0386166004820152602401610840565b6001600160401b0385165f9081526001602090815260408083206001600160a01b038816845290915281205465ffffffffffff16159081156115c1578463ffffffff1661151c611b0c565b61152691906126ef565b905060405180604001604052808265ffffffffffff1681526020016115548663ffffffff1663ffffffff1690565b6001600160701b039081169091526001600160401b0389165f9081526001602090815260408083206001600160a01b038c1684528252909120835181549490920151909216600160301b026001600160a01b031990931665ffffffffffff9091161791909117905561166b565b6001600160401b0387165f9081526001602090815260408083206001600160a01b038a16845290915281205461160a91600160301b9091046001600160701b0316908690611f13565b6001600160401b0389165f9081526001602090815260408083206001600160a01b038c168452909152902080546001600160701b03909316600160301b0273ffffffffffffffffffffffffffff000000000000199093169290921790915590505b6040805163ffffffff8616815265ffffffffffff831660208201528315158183015290516001600160a01b038816916001600160401b038a16917ff98448b987f1428e0e230e1f3c6e2ce15b5693eaf31827fbd0b1ec4b424ae7cf9181900360600190a35095945050505050565b5f5f5f6116ed846116e8611b0c565b611fb9565b9250925092509193909250565b6001600160401b038216158061171857506001600160401b03828116145b156117415760405163061c6a4360e21b81526001600160401b0383166004820152602401610840565b6001600160401b038281165f818152600160208190526040808320909101805467ffffffffffffffff19169486169485179055517f1fd6dd7631312dfac2205b52913f99de03b4d7e381d5d27d3dbfe0713e6e63409190a35050565b5f6117a6611b0c565b65ffffffffffff166117bb62093a80846126ef565b65ffffffffffff16111592915050565b6001600160401b03821615806117e957506001600160401b03828116145b156118125760405163061c6a4360e21b81526001600160401b0383166004820152602401610840565b6001600160401b038281165f81815260016020819052604080832090910180546fffffffffffffffff00000000000000001916600160401b958716958602179055517f7a8059630b897b5de4c08ade69f8b90c3ead1f8596d62d10b6c4d14a0afb4ae29190a35050565b67fffffffffffffffe196001600160401b038316016118b95760405163061c6a4360e21b81526001600160401b0383166004820152602401610840565b6001600160401b0382165f908152600160208190526040822001546118f290600160801b90046001600160701b03168362069780611f13565b6001600160401b0385165f818152600160208190526040918290200180546001600160701b03909516600160801b026dffffffffffffffffffffffffffff60801b199095169490941790935591519092507ffeb69018ee8b8fd50ea86348f1267d07673379f72cffdeccec63853ee8ce8b4890610ac8908590859063ffffffff92909216825265ffffffffffff16602082015260400190565b60605f6119988484612005565b90508080156119b957505f3d11806119b957505f846001600160a01b03163b115b156119ce576119c6611eef565b915050610752565b80156119f857604051639996b31560e01b81526001600160a01b0385166004820152602401610840565b3d1561147257611a06611f08565b5092915050565b5f611a1883836113a2565b600354149392505050565b5f67fffffffffffffffe196001600160401b03841601611a615760405163061c6a4360e21b81526001600160401b0384166004820152602401610840565b6001600160401b0383165f9081526001602090815260408083206001600160a01b038616845290915281205465ffffffffffff169003611aa257505f610752565b6001600160401b0383165f8181526001602090815260408083206001600160a01b038716808552925280832080546001600160a01b0319169055519092917ff229baa593af28c41b1d16b748cd7688f0c83aaf92d4be41c44005defe84c16691a350600192915050565b5f611b1642612018565b905090565b6001600160a01b0382165f90815260208190526040812060010154611b4d906001600160701b03168362069780611f13565b6001600160a01b0385165f818152602081815260409182902060010180546dffffffffffffffffffffffffffff19166001600160701b039690961695909517909455805163ffffffff8716815265ffffffffffff841694810194909452919350917fa56b76017453f399ec2327ba00375dbfb1fd070ff854341ad6191e6a2e2de19c9101610ac8565b5f8282188284110282186108f5565b5f8181526002602052604090205465ffffffffffff168015801590611c105750611c0e8161179d565b155b1561076a5760405163813e945960e01b815260048101839052602401610840565b5f806004831015611c4657505f905080610d4e565b306001600160a01b03861603611c6957610d0930611c64868661128d565b611a0d565b5f5f5f611c768787611cf4565b92509250925082158015611c8e5750611c8e30610b7f565b15611ca1575f5f94509450505050610d4e565b5f5f611cad848b610d6d565b9150915081611cc6575f5f965096505050505050610d4e565b611cdc8363ffffffff168263ffffffff16611bd6565b63ffffffff8116159b909a5098505050505050505050565b5f80806004841015611d0d57505f915081905080611ed3565b5f611d18868661128d565b90506001600160e01b031981166310a6aa3760e31b1480611d4957506001600160e01b031981166330cae18760e01b145b80611d6457506001600160e01b0319811663294b14a960e11b145b80611d7f57506001600160e01b03198116635326cae760e11b145b80611d9a57506001600160e01b0319811663d22b598960e01b145b15611daf5760015f5f93509350935050611ed3565b6001600160e01b0319811663063fc60f60e21b1480611dde57506001600160e01b0319811663167bd39560e01b145b80611df957506001600160e01b031981166308d6122d60e01b145b15611e38575f611e0d60246004888a61264f565b810190611e1a91906122e6565b90505f611e26826109c5565b600196505f95509350611ed392505050565b6001600160e01b0319811663012e238d60e51b1480611e6757506001600160e01b03198116635be958b160e11b145b15611ebf575f611e7b60246004888a61264f565b810190611e889190612122565b90506001611eb1826001600160401b039081165f90815260016020819052604090912001541690565b5f9450945094505050611ed3565b5f611eca3083610a04565b5f935093509350505b9250925092565b5f5f5f83516020850186885af1949350505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f5f5f611f28866001600160701b03166111ad565b90505f611f638563ffffffff168763ffffffff168463ffffffff1611611f4e575f611f58565b611f588885612788565b63ffffffff16611bd6565b90508063ffffffff16611f74611b0c565b611f7e91906126ef565b925063ffffffff8616602083901b67ffffffff0000000016604085901b6dffffffffffff000000000000000016171793505050935093915050565b69ffffffffffffffffffff602083901c166001600160701b03831665ffffffffffff604085901c8116908416811115611ff457828282611ff8565b815f5f5b9250925092509250925092565b5f5f5f835160208501865af49392505050565b5f65ffffffffffff82111561204a576040516306dfcc6560e41b81526030600482015260248101839052604401610840565b5090565b6001600160a01b0381168114612062575f5ffd5b50565b5f5f83601f840112612075575f5ffd5b5081356001600160401b0381111561208b575f5ffd5b6020830191508360208260051b8501011115610ddf575f5ffd5b80356001600160401b03811681146120bb575f5ffd5b919050565b5f5f5f5f606085870312156120d3575f5ffd5b84356120de8161204e565b935060208501356001600160401b038111156120f8575f5ffd5b61210487828801612065565b90945092506121179050604086016120a5565b905092959194509250565b5f60208284031215612132575f5ffd5b6108f5826120a5565b5f5f6040838503121561214c575f5ffd5b82356121578161204e565b91506020830135801515811461216b575f5ffd5b809150509250929050565b5f5f60408385031215612187575f5ffd5b82356121928161204e565b9150602083013561216b8161204e565b5f5f83601f8401126121b2575f5ffd5b5081356001600160401b038111156121c8575f5ffd5b602083019150836020828501011115610ddf575f5ffd5b5f5f5f604084860312156121f1575f5ffd5b83356121fc8161204e565b925060208401356001600160401b03811115612216575f5ffd5b612222868287016121a2565b9497909650939450505050565b803563ffffffff811681146120bb575f5ffd5b5f5f5f60608486031215612254575f5ffd5b61225d846120a5565b9250602084013561226d8161204e565b915061227b6040850161222f565b90509250925092565b5f5f60408385031215612295575f5ffd5b612192836120a5565b5f5f604083850312156122af575f5ffd5b6122b8836120a5565b91506122c6602084016120a5565b90509250929050565b5f602082840312156122df575f5ffd5b5035919050565b5f602082840312156122f6575f5ffd5b81356108f58161204e565b6001600160e01b031981168114612062575f5ffd5b5f5f60408385031215612327575f5ffd5b82356123328161204e565b9150602083013561216b81612301565b5f5f5f60408486031215612354575f5ffd5b6121fc846120a5565b5f5f6040838503121561236e575f5ffd5b612377836120a5565b91506122c66020840161222f565b5f5f5f5f60608587031215612398575f5ffd5b84356123a38161204e565b935060208501356123b38161204e565b925060408501356001600160401b038111156123cd575f5ffd5b6123d9878288016121a2565b95989497509550505050565b5f5f602083850312156123f6575f5ffd5b82356001600160401b0381111561240b575f5ffd5b61241785828601612065565b90969095509350505050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561249b57603f19878603018452815180518087528060208301602089015e5f602082890101526020601f19601f83011688010196505050602082019150602084019350600181019050612449565b50929695505050505050565b5f5f5f606084860312156124b9575f5ffd5b83356124c48161204e565b925060208401356124d48161204e565b915060408401356124e481612301565b809150509250925092565b5f5f60408385031215612500575f5ffd5b82356123778161204e565b5f5f5f5f6060858703121561251e575f5ffd5b84356125298161204e565b935060208501356001600160401b03811115612543575f5ffd5b61254f878288016121a2565b909450925050604085013565ffffffffffff8116811461256d575f5ffd5b939692955090935050565b634e487b7160e01b5f52603260045260245ffd5b5f6020828403121561259c575f5ffd5b81356108f581612301565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f6125e26020830184866125a7565b949350505050565b5f602082840312156125fa575f5ffd5b81516108f581612301565b6001600160a01b038581168252841660208201526060604082018190525f9061263190830184866125a7565b9695505050505050565b634e487b7160e01b5f52601160045260245ffd5b5f5f8585111561265d575f5ffd5b83861115612669575f5ffd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f5f8335601e1984360301811261269f575f5ffd5b8301803591506001600160401b038211156126b8575f5ffd5b602001915036819003821315610ddf575f5ffd5b828482375f8382015f815283518060208601835e5f910190815295945050505050565b65ffffffffffff81811683821601908111156107525761075261263b565b65ffffffffffff861681526001600160a01b038581166020830152841660408201526080606082018190525f9061274790830184866125a7565b979650505050505050565b80356001600160e01b03198116906004841015611a06576001600160e01b031960049490940360031b84901b1690921692915050565b63ffffffff82811682821603908111156107525761075261263b56fea2646970667358221220707cb3a2a7bea7c2035e2d63d8696cf72c6dcdaf15f11484b185321e83680f0264736f6c634300081f0033", + "deployedBytecode": "0x6080604052600436106101db575f3560e01c80636d5115bd116100fd578063b700961311610092578063d22b598911610062578063d22b598914610636578063d6bb62c614610655578063f801a69814610674578063fe0776f5146106ad575f5ffd5b8063b7009613146105a8578063b7d2b162146105e3578063cc1b6c8114610602578063d1f856ee14610617575f5ffd5b8063a166aa89116100cd578063a166aa8914610501578063a64d95ce14610530578063abd9bd2a1461054f578063ac9650d81461057c575f5ffd5b80636d5115bd1461049157806375b238fc146104b0578063853551b8146104c357806394c7d7ee146104e2575f5ffd5b806330cae187116101735780634665096d116101435780634665096d146104035780634c1da1e2146104185780635296295214610437578063530dd45614610456575f5ffd5b806330cae1871461035c5780633adc277a1461037b5780633ca7c02a146103b15780634136a33c146103cb575f5ffd5b806318ff183c116101ae57806318ff183c146102b25780631cff79cd146102d157806325c471a0146102e45780633078f11414610303575f5ffd5b806308d6122d146101df5780630b0a93ba1461020057806312be87271461025f578063167bd39514610293575b5f5ffd5b3480156101ea575f5ffd5b506101fe6101f93660046120c0565b6106cc565b005b34801561020b575f5ffd5b5061024261021a366004612122565b6001600160401b039081165f9081526001602081905260409091200154600160401b90041690565b6040516001600160401b0390911681526020015b60405180910390f35b34801561026a575f5ffd5b5061027e610279366004612122565b61071e565b60405163ffffffff9091168152602001610256565b34801561029e575f5ffd5b506101fe6102ad36600461213b565b610758565b3480156102bd575f5ffd5b506101fe6102cc366004612176565b61076e565b61027e6102df3660046121df565b6107d0565b3480156102ef575f5ffd5b506101fe6102fe366004612242565b6108fc565b34801561030e575f5ffd5b5061032261031d366004612284565b61091e565b604051610256949392919065ffffffffffff948516815263ffffffff93841660208201529190921660408201529116606082015260800190565b348015610367575f5ffd5b506101fe61037636600461229e565b610982565b348015610386575f5ffd5b5061039a6103953660046122cf565b610994565b60405165ffffffffffff9091168152602001610256565b3480156103bc575f5ffd5b506102426001600160401b0381565b3480156103d6575f5ffd5b5061027e6103e53660046122cf565b5f90815260026020526040902054600160301b900463ffffffff1690565b34801561040e575f5ffd5b5062093a8061027e565b348015610423575f5ffd5b5061027e6104323660046122e6565b6109c5565b348015610442575f5ffd5b506101fe61045136600461229e565b6109f2565b348015610461575f5ffd5b50610242610470366004612122565b6001600160401b039081165f90815260016020819052604090912001541690565b34801561049c575f5ffd5b506102426104ab366004612316565b610a04565b3480156104bb575f5ffd5b506102425f81565b3480156104ce575f5ffd5b506101fe6104dd366004612342565b610a3e565b3480156104ed575f5ffd5b506101fe6104fc3660046121df565b610ad5565b34801561050c575f5ffd5b5061052061051b3660046122e6565b610b7f565b6040519015158152602001610256565b34801561053b575f5ffd5b506101fe61054a36600461235d565b610ba6565b34801561055a575f5ffd5b5061056e610569366004612385565b610bb8565b604051908152602001610256565b348015610587575f5ffd5b5061059b6105963660046123e5565b610bf0565b6040516102569190612423565b3480156105b3575f5ffd5b506105c76105c23660046124a7565b610cd5565b60408051921515835263ffffffff909116602083015201610256565b3480156105ee575f5ffd5b506101fe6105fd366004612284565b610d56565b34801561060d575f5ffd5b506206978061027e565b348015610622575f5ffd5b506105c7610631366004612284565b610d6d565b348015610641575f5ffd5b506101fe6106503660046124ef565b610de6565b348015610660575f5ffd5b5061027e61066f366004612385565b610df8565b34801561067f575f5ffd5b5061069361068e36600461250b565b610f4b565b6040805192835263ffffffff909116602083015201610256565b3480156106b8575f5ffd5b506101fe6106c7366004612284565b61108c565b6106d46110b5565b5f5b828110156107175761070f858585848181106106f4576106f4612578565b9050602002016020810190610709919061258c565b8461112c565b6001016106d6565b5050505050565b6001600160401b0381165f9081526001602081905260408220015461075290600160801b90046001600160701b03166111ad565b92915050565b6107606110b5565b61076a82826111cb565b5050565b6107766110b5565b604051637a9e5e4b60e01b81526001600160a01b038281166004830152831690637a9e5e4b906024015f604051808303815f87803b1580156107b6575f5ffd5b505af11580156107c8573d5f5f3e3d5ffd5b505050505050565b5f3381806107e08388888861123c565b91509150811580156107f6575063ffffffff8116155b15610849578287610807888861128d565b6040516381c6f24b60e01b81526001600160a01b0393841660048201529290911660248301526001600160e01b03191660448201526064015b60405180910390fd5b5f61085684898989610bb8565b90505f63ffffffff831615158061087c575061087182610994565b65ffffffffffff1615155b1561088d5761088a826112a4565b90505b6003546108a38a61089e8b8b61128d565b6113a2565b6003819055506108ea8a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152503492506113c7915050565b506003559450505050505b9392505050565b6109046110b5565b61091883836109128661071e565b84611493565b50505050565b6001600160401b0382165f9081526001602090815260408083206001600160a01b03851684529091528120805465ffffffffffff81169291829182919061097490600160301b90046001600160701b03166116d9565b969991985096509350505050565b61098a6110b5565b61076a82826116fa565b5f8181526002602052604081205465ffffffffffff166109b38161179d565b6109bd57806108f5565b5f9392505050565b6001600160a01b0381165f90815260208190526040812060010154610752906001600160701b03166111ad565b6109fa6110b5565b61076a82826117cb565b6001600160a01b0382165f908152602081815260408083206001600160e01b0319851684529091529020546001600160401b031692915050565b610a466110b5565b6001600160401b0383161580610a6457506001600160401b03838116145b15610a8d5760405163061c6a4360e21b81526001600160401b0384166004820152602401610840565b826001600160401b03167f1256f5b5ecb89caec12db449738f2fbcd1ba5806cf38f35413f4e5c15bf6a4508383604051610ac89291906125cf565b60405180910390a2505050565b60408051638fb3603760e01b80825291513392918391638fb36037916004808201926020929091908290030181865afa158015610b14573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3891906125ea565b6001600160e01b03191614610b6b57604051630641fee960e31b81526001600160a01b0382166004820152602401610840565b610717610b7a85838686610bb8565b6112a4565b6001600160a01b03165f90815260208190526040902060010154600160701b900460ff1690565b610bae6110b5565b61076a828261187c565b5f84848484604051602001610bd09493929190612605565b604051602081830303815290604052805190602001209050949350505050565b604080515f815260208101909152606090826001600160401b03811115610c1957610c19612676565b604051908082528060200260200182016040528015610c4c57816020015b6060815260200190600190039081610c375790505b5091505f5b83811015610ccd57610ca830868684818110610c6f57610c6f612578565b9050602002810190610c81919061268a565b85604051602001610c94939291906126cc565b60405160208183030381529060405261198b565b838281518110610cba57610cba612578565b6020908102919091010152600101610c51565b505092915050565b5f5f610ce084610b7f565b15610cef57505f905080610d4e565b306001600160a01b03861603610d1357610d098484611a0d565b5f91509150610d4e565b5f610d1e8585610a04565b90505f5f610d2c8389610d6d565b9150915081610d3c575f5f610d46565b63ffffffff811615815b945094505050505b935093915050565b610d5e6110b5565b610d688282611a23565b505050565b5f8067fffffffffffffffe196001600160401b03851601610d935750600190505f610ddf565b5f5f610d9f868661091e565b5050915091508165ffffffffffff165f14158015610dd45750610dc0611b0c565b65ffffffffffff168265ffffffffffff1611155b93509150610ddf9050565b9250929050565b610dee6110b5565b61076a8282611b1b565b5f3381610e05858561128d565b90505f610e1488888888610bb8565b5f8181526002602052604081205491925065ffffffffffff9091169003610e515760405163060a299b60e41b815260048101829052602401610840565b826001600160a01b0316886001600160a01b031614610eea575f610e755f85610d6d565b5090505f610e8f610e8961021a8b87610a04565b86610d6d565b50905081158015610e9e575080155b15610ee757604051630ff89d4760e21b81526001600160a01b038087166004830152808c1660248301528a1660448201526001600160e01b031985166064820152608401610840565b50505b5f81815260026020526040808220805465ffffffffffff1916908190559051600160301b90910463ffffffff1691829184917fbd9ac67a6e2f6463b80927326310338bcbb4bdb7936ce1365ea3e01067e7b9f791a398975050505050505050565b5f803381610f5b8289898961123c565b9150505f8163ffffffff16610f6e611b0c565b610f7891906126ef565b905063ffffffff82161580610fae57505f8665ffffffffffff16118015610fae57508065ffffffffffff168665ffffffffffff16105b15610fbf5782896108078a8a61128d565b610fd98665ffffffffffff168265ffffffffffff16611bd6565b9550610fe7838a8a8a610bb8565b9450610ff285611be5565b5f8581526002602052604090819020805465ffffffffffff891669ffffffffffffffffffff19821617600160301b9182900463ffffffff90811660010190811692830291909117909255915190955086907f82a2da5dee54ea8021c6545b4444620291e07ee83be6dd57edb175062715f3b490611078908a9088908f908f908f9061270d565b60405180910390a350505094509492505050565b6001600160a01b0381163314610d5e57604051635f159e6360e01b815260040160405180910390fd5b335f806110c3838236611c31565b9150915081610d68578063ffffffff165f0361111d575f6110e48136611cf4565b5060405163f07e038f60e01b81526001600160a01b03871660048201526001600160401b03821660248201529092506044019050610840565b610918610b7a84305f36610bb8565b6001600160a01b0383165f818152602081815260408083206001600160e01b0319871680855290835292819020805467ffffffffffffffff19166001600160401b038716908117909155905192835292917f9ea6790c7dadfd01c9f8b9762b3682607af2c7e79e05a9f9fdf5580dde949151910160405180910390a3505050565b5f5f6111c1836001600160701b03166116d9565b5090949350505050565b6001600160a01b0382165f81815260208190526040908190206001018054841515600160701b0260ff60701b19909116179055517f90d4e7bb7e5d933792b3562e1741306f8be94837e1348dacef9b6f1df56eb1389061123090841515815260200190565b60405180910390a25050565b5f80306001600160a01b0386160361126257611259868585611c31565b91509150611284565b6004831061127e5761127986866105c2878761128d565b611259565b505f9050805b94509492505050565b5f61129b600482848661264f565b6108f591612752565b5f8181526002602052604081205465ffffffffffff811690600160301b900463ffffffff168183036112ec5760405163060a299b60e41b815260048101859052602401610840565b6112f4611b0c565b65ffffffffffff168265ffffffffffff16111561132757604051630c65b5bd60e11b815260048101859052602401610840565b6113308261179d565b1561135157604051631e2975b960e21b815260048101859052602401610840565b5f84815260026020526040808220805465ffffffffffff191690555163ffffffff83169186917f76a2a46953689d4861a5d3f6ed883ad7e6af674a21f8e162707159fc9dde614d9190a39392505050565b6001600160a01b0382165f9081526001600160e01b03198216602052604081206108f5565b6060814710156113f35760405163cf47918160e01b815247600482015260248101839052604401610840565b5f6113ff858486611eda565b905080801561142057505f3d118061142057505f856001600160a01b03163b115b156114355761142d611eef565b9150506108f5565b801561145f57604051639996b31560e01b81526001600160a01b0386166004820152602401610840565b3d156114725761146d611f08565b61148b565b60405163d6bda27560e01b815260040160405180910390fd5b509392505050565b5f67fffffffffffffffe196001600160401b038616016114d15760405163061c6a4360e21b81526001600160401b0386166004820152602401610840565b6001600160401b0385165f9081526001602090815260408083206001600160a01b038816845290915281205465ffffffffffff16159081156115c1578463ffffffff1661151c611b0c565b61152691906126ef565b905060405180604001604052808265ffffffffffff1681526020016115548663ffffffff1663ffffffff1690565b6001600160701b039081169091526001600160401b0389165f9081526001602090815260408083206001600160a01b038c1684528252909120835181549490920151909216600160301b026001600160a01b031990931665ffffffffffff9091161791909117905561166b565b6001600160401b0387165f9081526001602090815260408083206001600160a01b038a16845290915281205461160a91600160301b9091046001600160701b0316908690611f13565b6001600160401b0389165f9081526001602090815260408083206001600160a01b038c168452909152902080546001600160701b03909316600160301b0273ffffffffffffffffffffffffffff000000000000199093169290921790915590505b6040805163ffffffff8616815265ffffffffffff831660208201528315158183015290516001600160a01b038816916001600160401b038a16917ff98448b987f1428e0e230e1f3c6e2ce15b5693eaf31827fbd0b1ec4b424ae7cf9181900360600190a35095945050505050565b5f5f5f6116ed846116e8611b0c565b611fb9565b9250925092509193909250565b6001600160401b038216158061171857506001600160401b03828116145b156117415760405163061c6a4360e21b81526001600160401b0383166004820152602401610840565b6001600160401b038281165f818152600160208190526040808320909101805467ffffffffffffffff19169486169485179055517f1fd6dd7631312dfac2205b52913f99de03b4d7e381d5d27d3dbfe0713e6e63409190a35050565b5f6117a6611b0c565b65ffffffffffff166117bb62093a80846126ef565b65ffffffffffff16111592915050565b6001600160401b03821615806117e957506001600160401b03828116145b156118125760405163061c6a4360e21b81526001600160401b0383166004820152602401610840565b6001600160401b038281165f81815260016020819052604080832090910180546fffffffffffffffff00000000000000001916600160401b958716958602179055517f7a8059630b897b5de4c08ade69f8b90c3ead1f8596d62d10b6c4d14a0afb4ae29190a35050565b67fffffffffffffffe196001600160401b038316016118b95760405163061c6a4360e21b81526001600160401b0383166004820152602401610840565b6001600160401b0382165f908152600160208190526040822001546118f290600160801b90046001600160701b03168362069780611f13565b6001600160401b0385165f818152600160208190526040918290200180546001600160701b03909516600160801b026dffffffffffffffffffffffffffff60801b199095169490941790935591519092507ffeb69018ee8b8fd50ea86348f1267d07673379f72cffdeccec63853ee8ce8b4890610ac8908590859063ffffffff92909216825265ffffffffffff16602082015260400190565b60605f6119988484612005565b90508080156119b957505f3d11806119b957505f846001600160a01b03163b115b156119ce576119c6611eef565b915050610752565b80156119f857604051639996b31560e01b81526001600160a01b0385166004820152602401610840565b3d1561147257611a06611f08565b5092915050565b5f611a1883836113a2565b600354149392505050565b5f67fffffffffffffffe196001600160401b03841601611a615760405163061c6a4360e21b81526001600160401b0384166004820152602401610840565b6001600160401b0383165f9081526001602090815260408083206001600160a01b038616845290915281205465ffffffffffff169003611aa257505f610752565b6001600160401b0383165f8181526001602090815260408083206001600160a01b038716808552925280832080546001600160a01b0319169055519092917ff229baa593af28c41b1d16b748cd7688f0c83aaf92d4be41c44005defe84c16691a350600192915050565b5f611b1642612018565b905090565b6001600160a01b0382165f90815260208190526040812060010154611b4d906001600160701b03168362069780611f13565b6001600160a01b0385165f818152602081815260409182902060010180546dffffffffffffffffffffffffffff19166001600160701b039690961695909517909455805163ffffffff8716815265ffffffffffff841694810194909452919350917fa56b76017453f399ec2327ba00375dbfb1fd070ff854341ad6191e6a2e2de19c9101610ac8565b5f8282188284110282186108f5565b5f8181526002602052604090205465ffffffffffff168015801590611c105750611c0e8161179d565b155b1561076a5760405163813e945960e01b815260048101839052602401610840565b5f806004831015611c4657505f905080610d4e565b306001600160a01b03861603611c6957610d0930611c64868661128d565b611a0d565b5f5f5f611c768787611cf4565b92509250925082158015611c8e5750611c8e30610b7f565b15611ca1575f5f94509450505050610d4e565b5f5f611cad848b610d6d565b9150915081611cc6575f5f965096505050505050610d4e565b611cdc8363ffffffff168263ffffffff16611bd6565b63ffffffff8116159b909a5098505050505050505050565b5f80806004841015611d0d57505f915081905080611ed3565b5f611d18868661128d565b90506001600160e01b031981166310a6aa3760e31b1480611d4957506001600160e01b031981166330cae18760e01b145b80611d6457506001600160e01b0319811663294b14a960e11b145b80611d7f57506001600160e01b03198116635326cae760e11b145b80611d9a57506001600160e01b0319811663d22b598960e01b145b15611daf5760015f5f93509350935050611ed3565b6001600160e01b0319811663063fc60f60e21b1480611dde57506001600160e01b0319811663167bd39560e01b145b80611df957506001600160e01b031981166308d6122d60e01b145b15611e38575f611e0d60246004888a61264f565b810190611e1a91906122e6565b90505f611e26826109c5565b600196505f95509350611ed392505050565b6001600160e01b0319811663012e238d60e51b1480611e6757506001600160e01b03198116635be958b160e11b145b15611ebf575f611e7b60246004888a61264f565b810190611e889190612122565b90506001611eb1826001600160401b039081165f90815260016020819052604090912001541690565b5f9450945094505050611ed3565b5f611eca3083610a04565b5f935093509350505b9250925092565b5f5f5f83516020850186885af1949350505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f5f5f611f28866001600160701b03166111ad565b90505f611f638563ffffffff168763ffffffff168463ffffffff1611611f4e575f611f58565b611f588885612788565b63ffffffff16611bd6565b90508063ffffffff16611f74611b0c565b611f7e91906126ef565b925063ffffffff8616602083901b67ffffffff0000000016604085901b6dffffffffffff000000000000000016171793505050935093915050565b69ffffffffffffffffffff602083901c166001600160701b03831665ffffffffffff604085901c8116908416811115611ff457828282611ff8565b815f5f5b9250925092509250925092565b5f5f5f835160208501865af49392505050565b5f65ffffffffffff82111561204a576040516306dfcc6560e41b81526030600482015260248101839052604401610840565b5090565b6001600160a01b0381168114612062575f5ffd5b50565b5f5f83601f840112612075575f5ffd5b5081356001600160401b0381111561208b575f5ffd5b6020830191508360208260051b8501011115610ddf575f5ffd5b80356001600160401b03811681146120bb575f5ffd5b919050565b5f5f5f5f606085870312156120d3575f5ffd5b84356120de8161204e565b935060208501356001600160401b038111156120f8575f5ffd5b61210487828801612065565b90945092506121179050604086016120a5565b905092959194509250565b5f60208284031215612132575f5ffd5b6108f5826120a5565b5f5f6040838503121561214c575f5ffd5b82356121578161204e565b91506020830135801515811461216b575f5ffd5b809150509250929050565b5f5f60408385031215612187575f5ffd5b82356121928161204e565b9150602083013561216b8161204e565b5f5f83601f8401126121b2575f5ffd5b5081356001600160401b038111156121c8575f5ffd5b602083019150836020828501011115610ddf575f5ffd5b5f5f5f604084860312156121f1575f5ffd5b83356121fc8161204e565b925060208401356001600160401b03811115612216575f5ffd5b612222868287016121a2565b9497909650939450505050565b803563ffffffff811681146120bb575f5ffd5b5f5f5f60608486031215612254575f5ffd5b61225d846120a5565b9250602084013561226d8161204e565b915061227b6040850161222f565b90509250925092565b5f5f60408385031215612295575f5ffd5b612192836120a5565b5f5f604083850312156122af575f5ffd5b6122b8836120a5565b91506122c6602084016120a5565b90509250929050565b5f602082840312156122df575f5ffd5b5035919050565b5f602082840312156122f6575f5ffd5b81356108f58161204e565b6001600160e01b031981168114612062575f5ffd5b5f5f60408385031215612327575f5ffd5b82356123328161204e565b9150602083013561216b81612301565b5f5f5f60408486031215612354575f5ffd5b6121fc846120a5565b5f5f6040838503121561236e575f5ffd5b612377836120a5565b91506122c66020840161222f565b5f5f5f5f60608587031215612398575f5ffd5b84356123a38161204e565b935060208501356123b38161204e565b925060408501356001600160401b038111156123cd575f5ffd5b6123d9878288016121a2565b95989497509550505050565b5f5f602083850312156123f6575f5ffd5b82356001600160401b0381111561240b575f5ffd5b61241785828601612065565b90969095509350505050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561249b57603f19878603018452815180518087528060208301602089015e5f602082890101526020601f19601f83011688010196505050602082019150602084019350600181019050612449565b50929695505050505050565b5f5f5f606084860312156124b9575f5ffd5b83356124c48161204e565b925060208401356124d48161204e565b915060408401356124e481612301565b809150509250925092565b5f5f60408385031215612500575f5ffd5b82356123778161204e565b5f5f5f5f6060858703121561251e575f5ffd5b84356125298161204e565b935060208501356001600160401b03811115612543575f5ffd5b61254f878288016121a2565b909450925050604085013565ffffffffffff8116811461256d575f5ffd5b939692955090935050565b634e487b7160e01b5f52603260045260245ffd5b5f6020828403121561259c575f5ffd5b81356108f581612301565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f6125e26020830184866125a7565b949350505050565b5f602082840312156125fa575f5ffd5b81516108f581612301565b6001600160a01b038581168252841660208201526060604082018190525f9061263190830184866125a7565b9695505050505050565b634e487b7160e01b5f52601160045260245ffd5b5f5f8585111561265d575f5ffd5b83861115612669575f5ffd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f5f8335601e1984360301811261269f575f5ffd5b8301803591506001600160401b038211156126b8575f5ffd5b602001915036819003821315610ddf575f5ffd5b828482375f8382015f815283518060208601835e5f910190815295945050505050565b65ffffffffffff81811683821601908111156107525761075261263b565b65ffffffffffff861681526001600160a01b038581166020830152841660408201526080606082018190525f9061274790830184866125a7565b979650505050505050565b80356001600160e01b03198116906004841015611a06576001600160e01b031960049490940360031b84901b1690921692915050565b63ffffffff82811682821603908111156107525761075261263b56fea2646970667358221220707cb3a2a7bea7c2035e2d63d8696cf72c6dcdaf15f11484b185321e83680f0264736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Account.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Account.json new file mode 100644 index 00000000..dcf46f27 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Account.json @@ -0,0 +1,147 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Account", + "sourceName": "contracts/account/Account.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "AccountUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "entryPoint", + "outputs": [ + { + "internalType": "contract IEntryPoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579.json new file mode 100644 index 00000000..24c17b3e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579.json @@ -0,0 +1,512 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccountERC7579", + "sourceName": "contracts/account/extensions/draft-AccountERC7579.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "AccountUnauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579AlreadyInstalledModule", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579CannotDecodeFallbackData", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579DecodingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579MismatchedModuleTypeId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "ERC7579MissingFallbackHandler", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579UninstalledModule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "CallType", + "name": "callType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedCallType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ExecType", + "name": "execType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedExecType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "ERC7579UnsupportedModuleType", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfRangeAccess", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "batchExecutionIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "ERC7579TryExecuteFail", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleInstalled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleUninstalled", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "accountId", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "entryPoint", + "outputs": [ + { + "internalType": "contract IEntryPoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "executeFromExecutor", + "outputs": [ + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "additionalContext", + "type": "bytes" + } + ], + "name": "isModuleInstalled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "encodedMode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "supportsModule", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "deInitData", + "type": "bytes" + } + ], + "name": "uninstallModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579Hooked.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579Hooked.json new file mode 100644 index 00000000..ebfeb5fb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AccountERC7579Hooked.json @@ -0,0 +1,536 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccountERC7579Hooked", + "sourceName": "contracts/account/extensions/draft-AccountERC7579Hooked.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "AccountUnauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579AlreadyInstalledModule", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579CannotDecodeFallbackData", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579DecodingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "hook", + "type": "address" + } + ], + "name": "ERC7579HookModuleAlreadyPresent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579MismatchedModuleTypeId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "ERC7579MissingFallbackHandler", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579UninstalledModule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "CallType", + "name": "callType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedCallType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ExecType", + "name": "execType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedExecType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "ERC7579UnsupportedModuleType", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfRangeAccess", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "batchExecutionIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "ERC7579TryExecuteFail", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleInstalled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleUninstalled", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "accountId", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "entryPoint", + "outputs": [ + { + "internalType": "contract IEntryPoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "executeFromExecutor", + "outputs": [ + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hook", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "isModuleInstalled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "encodedMode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "supportsModule", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "deInitData", + "type": "bytes" + } + ], + "name": "uninstallModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Accumulators.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Accumulators.json new file mode 100644 index 00000000..f96c5f46 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Accumulators.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Accumulators", + "sourceName": "contracts/utils/structs/Accumulators.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206b07182bf5e05e224d8903483279e99c1b858af52d9e7fa22bf40fcba3d60cec64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206b07182bf5e05e224d8903483279e99c1b858af52d9e7fa22bf40fcba3d60cec64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Address.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Address.json new file mode 100644 index 00000000..17d5a9dd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Address.json @@ -0,0 +1,22 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Address", + "sourceName": "contracts/utils/Address.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122069928772373346625eabf0559480b8343980df95cf815a50457a956f629af15d64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122069928772373346625eabf0559480b8343980df95cf815a50457a956f629af15d64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Arrays.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Arrays.json new file mode 100644 index 00000000..eff87003 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Arrays.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Arrays", + "sourceName": "contracts/utils/Arrays.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220937538b73f880a408f180c9aedd141ef1962fd8b8615f4c269a565c1e07c190164736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220937538b73f880a408f180c9aedd141ef1962fd8b8615f4c269a565c1e07c190164736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AuthorityUtils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AuthorityUtils.json new file mode 100644 index 00000000..9565439f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/AuthorityUtils.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AuthorityUtils", + "sourceName": "contracts/access/manager/AuthorityUtils.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209a81fade58e63192c232c98545294d5c8f45d3fbb4b7fe5f49be7107a565970964736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209a81fade58e63192c232c98545294d5c8f45d3fbb4b7fe5f49be7107a565970964736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base58.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base58.json new file mode 100644 index 00000000..39474aca --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base58.json @@ -0,0 +1,22 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Base58", + "sourceName": "contracts/utils/Base58.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } + ], + "name": "InvalidBase58Char", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212207c65299c851deca84744d4b730f8c1c5456ddbad2974772fa39f58399e82000264736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212207c65299c851deca84744d4b730f8c1c5456ddbad2974772fa39f58399e82000264736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base64.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base64.json new file mode 100644 index 00000000..b4c47c34 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Base64.json @@ -0,0 +1,22 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Base64", + "sourceName": "contracts/utils/Base64.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } + ], + "name": "InvalidBase64Char", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202ede7f8afa9bbab6a69b781616e3e0fe9aa2e774066eab6fbb1455b9ec92439364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212202ede7f8afa9bbab6a69b781616e3e0fe9aa2e774066eab6fbb1455b9ec92439364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BeaconProxy.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BeaconProxy.json new file mode 100644 index 00000000..8d877c52 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BeaconProxy.json @@ -0,0 +1,87 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BeaconProxy", + "sourceName": "contracts/proxy/beacon/BeaconProxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "beacon", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "ERC1967InvalidBeacon", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + } + ], + "bytecode": "0x60a060405260405161054538038061054583398101604081905261002291610331565b61002c828261003e565b506001600160a01b0316608052610413565b610047826100fb565b6040516001600160a01b038316907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e905f90a28051156100ef576100ea826001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100c0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100e491906103f3565b82610209565b505050565b6100f76102aa565b5050565b806001600160a01b03163b5f0361013557604051631933b43b60e21b81526001600160a01b03821660048201526024015b60405180910390fd5b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080546001600160a01b0319166001600160a01b0392831617905560408051635c60da1b60e01b815290515f92841691635c60da1b9160048083019260209291908290030181865afa1580156101ae573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101d291906103f3565b9050806001600160a01b03163b5f036100f757604051634c9c8ce360e01b81526001600160a01b038216600482015260240161012c565b60605f61021684846102cb565b905080801561023757505f3d118061023757505f846001600160a01b03163b115b1561024c576102446102de565b9150506102a4565b801561027657604051639996b31560e01b81526001600160a01b038516600482015260240161012c565b3d15610289576102846102f7565b6102a2565b60405163d6bda27560e01b815260040160405180910390fd5b505b92915050565b34156102c95760405163b398979f60e01b815260040160405180910390fd5b565b5f5f5f835160208501865af49392505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b80516001600160a01b0381168114610318575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215610342575f5ffd5b61034b83610302565b60208401519092506001600160401b03811115610366575f5ffd5b8301601f81018513610376575f5ffd5b80516001600160401b0381111561038f5761038f61031d565b604051601f8201601f19908116603f011681016001600160401b03811182821017156103bd576103bd61031d565b6040528181528282016020018710156103d4575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f60208284031215610403575f5ffd5b61040c82610302565b9392505050565b60805161011b61042a5f395f601d015261011b5ff3fe6080604052600a600c565b005b60186014601a565b609d565b565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156076573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906098919060ba565b905090565b365f5f375f5f365f845af43d5f5f3e80801560b6573d5ff35b3d5ffd5b5f6020828403121560c9575f5ffd5b81516001600160a01b038116811460de575f5ffd5b939250505056fea26469706673582212207c25bbd12b35789e10ab0c91c63f0f293eed541cee2015adf11ec062f830413b64736f6c634300081f0033", + "deployedBytecode": "0x6080604052600a600c565b005b60186014601a565b609d565b565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635c60da1b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156076573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906098919060ba565b905090565b365f5f375f5f365f845af43d5f5f3e80801560b6573d5ff35b3d5ffd5b5f6020828403121560c9575f5ffd5b81516001600160a01b038116811460de575f5ffd5b939250505056fea26469706673582212207c25bbd12b35789e10ab0c91c63f0f293eed541cee2015adf11ec062f830413b64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BitMaps.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BitMaps.json new file mode 100644 index 00000000..6b7300e5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BitMaps.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BitMaps", + "sourceName": "contracts/utils/structs/BitMaps.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220c45dcbeee557aa70e115829aa1e2ccad1bc83964bba465896e4c3e2961ac94cd64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220c45dcbeee557aa70e115829aa1e2ccad1bc83964bba465896e4c3e2961ac94cd64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Blockhash.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Blockhash.json new file mode 100644 index 00000000..b448f4b3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Blockhash.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Blockhash", + "sourceName": "contracts/utils/Blockhash.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220e92f3cae9f81eb7a3178af1fdb86fe3af8129eff0ac083f4ffa6e7b4e099ee0364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220e92f3cae9f81eb7a3178af1fdb86fe3af8129eff0ac083f4ffa6e7b4e099ee0364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeERC20.json similarity index 50% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeERC20.json index 78d6e1f4..4de68dc2 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlCrossChainUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeERC20.json @@ -1,45 +1,77 @@ { "_format": "hh-sol-artifact-1", - "contractName": "AccessControlCrossChainUpgradeable", - "sourceName": "contracts/access/AccessControlCrossChainUpgradeable.sol", + "contractName": "BridgeERC20", + "sourceName": "contracts/crosschain/bridges/BridgeERC20.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" } ], - "name": "Initialized", - "type": "event" + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" }, { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "RoleAdminChanged", - "type": "event" + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" }, { "anonymous": false, @@ -47,23 +79,29 @@ { "indexed": true, "internalType": "bytes32", - "name": "role", + "name": "receiveId", "type": "bytes32" }, { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" + "indexed": false, + "internalType": "bytes", + "name": "from", + "type": "bytes" }, { "indexed": true, "internalType": "address", - "name": "sender", + "name": "to", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "RoleGranted", + "name": "CrosschainFungibleTransferReceived", "type": "event" }, { @@ -72,60 +110,64 @@ { "indexed": true, "internalType": "bytes32", - "name": "role", + "name": "sendId", "type": "bytes32" }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "from", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "indexed": false, + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "RoleRevoked", + "name": "CrosschainFungibleTransferSent", "type": "event" }, { - "inputs": [], - "name": "CROSSCHAIN_ALIAS", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ + "indexed": false, + "internalType": "address", + "name": "gateway", + "type": "address" + }, { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" + "name": "LinkRegistered", + "type": "event" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "getRoleAdmin", + "name": "crosschainTransfer", "outputs": [ { "internalType": "bytes32", @@ -133,46 +175,28 @@ "type": "bytes32" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "bytes", + "name": "chain", + "type": "bytes" } ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "name": "getLink", + "outputs": [ { "internalType": "address", - "name": "account", + "name": "gateway", "type": "address" - } - ], - "name": "hasRole", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], "stateMutability": "view", @@ -182,52 +206,39 @@ "inputs": [ { "internalType": "bytes32", - "name": "role", + "name": "receiveId", "type": "bytes32" }, { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "bytes", + "name": "sender", + "type": "bytes" }, { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "bytes", + "name": "payload", + "type": "bytes" } ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "receiveMessage", + "outputs": [ { "internalType": "bytes4", - "name": "interfaceId", + "name": "", "type": "bytes4" } ], - "name": "supportsInterface", + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "token", "outputs": [ { - "internalType": "bool", + "internalType": "contract IERC20", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeERC7802.json similarity index 51% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeERC7802.json index 6edea5f8..03bfbc5c 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20MetadataUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeERC7802.json @@ -1,41 +1,81 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC20MetadataUpgradeable", - "sourceName": "contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol", + "contractName": "BridgeERC7802", + "sourceName": "contracts/crosschain/bridges/BridgeERC7802.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "gateway", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" }, { - "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "SafeCastOverflowedUintDowncast", + "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, - "internalType": "address", + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", "name": "from", - "type": "address" + "type": "bytes" }, { "indexed": true, @@ -46,127 +86,106 @@ { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Transfer", + "name": "CrosschainFungibleTransferReceived", "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" }, { + "indexed": true, "internalType": "address", - "name": "spender", + "name": "from", "type": "address" - } - ], - "name": "allowance", - "outputs": [ + }, { + "indexed": false, + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "CrosschainFungibleTransferSent", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "spender", + "name": "gateway", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "LinkRegistered", + "type": "event" }, { "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", + "name": "crosschainTransfer", "outputs": [ { - "internalType": "uint8", + "internalType": "bytes32", "name": "", - "type": "uint8" + "type": "bytes32" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "name", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "bytes", + "name": "chain", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", + "name": "getLink", "outputs": [ { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ + "internalType": "address", + "name": "gateway", + "type": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], "stateMutability": "view", @@ -175,54 +194,43 @@ { "inputs": [ { - "internalType": "address", - "name": "to", - "type": "address" + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" } ], - "name": "transfer", + "name": "receiveMessage", "outputs": [ { - "internalType": "bool", + "internalType": "bytes4", "name": "", - "type": "bool" + "type": "bytes4" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", + "inputs": [], + "name": "token", "outputs": [ { - "internalType": "bool", + "internalType": "contract IERC7802", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeFungible.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeFungible.json new file mode 100644 index 00000000..a8c666d1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/BridgeFungible.json @@ -0,0 +1,228 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BridgeFungible", + "sourceName": "contracts/crosschain/bridges/abstract/BridgeFungible.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "from", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "name": "LinkRegistered", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "crosschainTransfer", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "getLink", + "outputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Bytes.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Bytes.json new file mode 100644 index 00000000..5326490b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Bytes.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Bytes", + "sourceName": "contracts/utils/Bytes.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b72d705526fdaa0bc83b573821dc6ba7cd5e8915dc92d64e63587e0bd3fda20664736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b72d705526fdaa0bc83b573821dc6ba7cd5e8915dc92d64e63587e0bd3fda20664736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP10.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP10.json new file mode 100644 index 00000000..a1d7f09c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP10.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CAIP10", + "sourceName": "contracts/utils/CAIP10.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203d6f458d24360f8b4f06ff88046022e75d3c7bd655e79e5414202de5a266ba4764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203d6f458d24360f8b4f06ff88046022e75d3c7bd655e79e5414202de5a266ba4764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP2.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP2.json new file mode 100644 index 00000000..b37ba4c9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CAIP2.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CAIP2", + "sourceName": "contracts/utils/CAIP2.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122079b9490367ef4f8eb269fa3f39721dc9fd07a6ae7e444019fe4ccfac853d59ac64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122079b9490367ef4f8eb269fa3f39721dc9fd07a6ae7e444019fe4ccfac853d59ac64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Calldata.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Calldata.json new file mode 100644 index 00000000..f98ea211 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Calldata.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Calldata", + "sourceName": "contracts/utils/Calldata.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220ca7124d9a75b829feef7004ab8573858a15a7fa8a66ad549dfdd8209b4c8676964736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220ca7124d9a75b829feef7004ab8573858a15a7fa8a66ad549dfdd8209b4c8676964736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Checkpoints.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Checkpoints.json new file mode 100644 index 00000000..509cf25d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Checkpoints.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Checkpoints", + "sourceName": "contracts/utils/structs/Checkpoints.sol", + "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220f8fde1507fd51213048ebaf86cfa7b9838f7b28da97a150d2928ab7b3ade9e1664736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220f8fde1507fd51213048ebaf86cfa7b9838f7b28da97a150d2928ab7b3ade9e1664736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CircularBuffer.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CircularBuffer.json new file mode 100644 index 00000000..fc79b194 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CircularBuffer.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CircularBuffer", + "sourceName": "contracts/utils/structs/CircularBuffer.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidBufferSize", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b2d41091f245ba63339334468971846ed687dae4ccd45f8d3fac1ee824dda78264736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b2d41091f245ba63339334468971846ed687dae4ccd45f8d3fac1ee824dda78264736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Clones.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Clones.json new file mode 100644 index 00000000..2b342745 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Clones.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Clones", + "sourceName": "contracts/proxy/Clones.sol", + "abi": [ + { + "inputs": [], + "name": "CloneArgumentsTooLong", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d9d36f6064365b74db06fbce74c19fd6dbdb9a4316c08f27690dfbb158c70b7b64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d9d36f6064365b74db06fbce74c19fd6dbdb9a4316c08f27690dfbb158c70b7b64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Comparators.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Comparators.json new file mode 100644 index 00000000..df13a29e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Comparators.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Comparators", + "sourceName": "contracts/utils/Comparators.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212208fee8103cb458cc32eb613a1813d86ebf22a451ce01671d572e8ca70ba6da66764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212208fee8103cb458cc32eb613a1813d86ebf22a451ce01671d572e8ca70ba6da66764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Context.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Context.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Context.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Context.json diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Create2.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Create2.json new file mode 100644 index 00000000..8e8c8d83 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Create2.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Create2", + "sourceName": "contracts/utils/Create2.sol", + "abi": [ + { + "inputs": [], + "name": "Create2EmptyBytecode", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122086cf068a307b5b746e371cc8062db90d5fbceff7329fcae988b415845378d59864736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122086cf068a307b5b746e371cc8062db90d5fbceff7329fcae988b415845378d59864736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CrosschainLinked.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CrosschainLinked.json new file mode 100644 index 00000000..1fcf0336 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/CrosschainLinked.json @@ -0,0 +1,142 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrosschainLinked", + "sourceName": "contracts/crosschain/CrosschainLinked.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "name": "LinkRegistered", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "getLink", + "outputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/DoubleEndedQueue.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/DoubleEndedQueue.json new file mode 100644 index 00000000..0b493e46 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/DoubleEndedQueue.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "DoubleEndedQueue", + "sourceName": "contracts/utils/structs/DoubleEndedQueue.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122076c473aed98a9188d40c79f1eb76c0c59ece5ef0b77cf7d4758edd320b0b02cd64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122076c473aed98a9188d40c79f1eb76c0c59ece5ef0b77cf7d4758edd320b0b02cd64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ECDSA.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ECDSA.json new file mode 100644 index 00000000..b37600a5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ECDSA.json @@ -0,0 +1,38 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ECDSA", + "sourceName": "contracts/utils/cryptography/ECDSA.sol", + "abi": [ + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220c40fc0c29d08141d2f5ac1a3ba98c0feebd27b913cdf1bd5357d38d3a92a361864736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220c40fc0c29d08141d2f5ac1a3ba98c0feebd27b913cdf1bd5357d38d3a92a361864736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EIP712.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EIP712.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/EIP712.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EIP712.json diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EIP7702Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EIP7702Utils.json new file mode 100644 index 00000000..7eb8e0b9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EIP7702Utils.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EIP7702Utils", + "sourceName": "contracts/account/utils/EIP7702Utils.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205cfd2dfa8e91f5583fcb008fbc7cac1bdd3e3d274e1171874737cacf0b8a2fd764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205cfd2dfa8e91f5583fcb008fbc7cac1bdd3e3d274e1171874737cacf0b8a2fd764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155.json similarity index 79% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155.json index 21ae9bd0..c98707aa 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155SupplyUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155.json @@ -1,8 +1,110 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC1155SupplyUpgradeable", - "sourceName": "contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol", + "contractName": "ERC1155", + "sourceName": "contracts/token/ERC1155/ERC1155.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -28,19 +130,6 @@ "name": "ApprovalForAll", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -182,25 +271,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "exists", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -244,7 +314,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -277,7 +347,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { @@ -328,25 +398,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Burnable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Burnable.json similarity index 78% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Burnable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Burnable.json index 74455635..0a424d80 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Burnable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Burnable.json @@ -3,6 +3,108 @@ "contractName": "ERC1155Burnable", "sourceName": "contracts/token/ERC1155/extensions/ERC1155Burnable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -258,7 +360,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -291,7 +393,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Holder.json similarity index 83% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Holder.json index 06e7d48c..5e048661 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Receiver.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Holder.json @@ -1,33 +1,33 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC1155Receiver", - "sourceName": "contracts/token/ERC1155/utils/ERC1155Receiver.sol", + "contractName": "ERC1155Holder", + "sourceName": "contracts/token/ERC1155/utils/ERC1155Holder.sol", "abi": [ { "inputs": [ { "internalType": "address", - "name": "operator", + "name": "", "type": "address" }, { "internalType": "address", - "name": "from", + "name": "", "type": "address" }, { "internalType": "uint256[]", - "name": "ids", + "name": "", "type": "uint256[]" }, { "internalType": "uint256[]", - "name": "values", + "name": "", "type": "uint256[]" }, { "internalType": "bytes", - "name": "data", + "name": "", "type": "bytes" } ], @@ -46,27 +46,27 @@ "inputs": [ { "internalType": "address", - "name": "operator", + "name": "", "type": "address" }, { "internalType": "address", - "name": "from", + "name": "", "type": "address" }, { "internalType": "uint256", - "name": "id", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" }, { "internalType": "bytes", - "name": "data", + "name": "", "type": "bytes" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Pausable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Pausable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Pausable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Pausable.json index 6bc8b62d..fb5df926 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Pausable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Pausable.json @@ -3,6 +3,118 @@ "contractName": "ERC1155Pausable", "sourceName": "contracts/token/ERC1155/extensions/ERC1155Pausable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -251,7 +363,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -284,7 +396,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Supply.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Supply.json similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Supply.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Supply.json index fae95c68..f2fddb16 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155Supply.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Supply.json @@ -3,6 +3,108 @@ "contractName": "ERC1155Supply", "sourceName": "contracts/token/ERC1155/extensions/ERC1155Supply.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -231,7 +333,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -264,7 +366,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { @@ -315,6 +417,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155URIStorage.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155URIStorage.json similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155URIStorage.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155URIStorage.json index 84634ef3..a896e401 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC1155URIStorage.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155URIStorage.json @@ -3,6 +3,108 @@ "contractName": "ERC1155URIStorage", "sourceName": "contracts/token/ERC1155/extensions/ERC1155URIStorage.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -212,7 +314,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -245,7 +347,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Utils.json new file mode 100644 index 00000000..0fe53de4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1155Utils.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155Utils", + "sourceName": "contracts/token/ERC1155/utils/ERC1155Utils.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b36053ad00e4c7a4feee84a8bd42d8dccf0d2cb63b35352530609b80d995605564736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b36053ad00e4c7a4feee84a8bd42d8dccf0d2cb63b35352530609b80d995605564736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363.json new file mode 100644 index 00000000..618163ff --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363.json @@ -0,0 +1,582 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1363", + "sourceName": "contracts/token/ERC20/extensions/ERC1363.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "ERC1363ApproveFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1363InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC1363InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "ERC1363TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "ERC1363TransferFromFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFromAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363Utils.json new file mode 100644 index 00000000..3708fe68 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1363Utils.json @@ -0,0 +1,33 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1363Utils", + "sourceName": "contracts/token/ERC20/utils/ERC1363Utils.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1363InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC1363InvalidSpender", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220c98580c01d28a6abf6f57c4c25e96860a6f3b5224f0b33ea9d2bdc0fe7e99c7964736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220c98580c01d28a6abf6f57c4c25e96860a6f3b5224f0b33ea9d2bdc0fe7e99c7964736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC165.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC165.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC165.json diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC165Checker.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC165Checker.json new file mode 100644 index 00000000..11c6f411 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC165Checker.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC165Checker", + "sourceName": "contracts/utils/introspection/ERC165Checker.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220723668f9c4615931f5946a68288922a4ccf6a020cad024b9b75f3233ac02b38464736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220723668f9c4615931f5946a68288922a4ccf6a020cad024b9b75f3233ac02b38464736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Proxy.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Proxy.json new file mode 100644 index 00000000..b4292fe7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Proxy.json @@ -0,0 +1,81 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1967Proxy", + "sourceName": "contracts/proxy/ERC1967/ERC1967Proxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967ProxyUninitialized", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + } + ], + "bytecode": "0x60806040526040516103b63803806103b683398101604081905261002291610238565b8051610041576040516330a289cf60e21b815260040160405180910390fd5b61004b8282610052565b5050610307565b61005b826100b0565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156100a45761009f828261012b565b505050565b6100ac6101cc565b5050565b806001600160a01b03163b5f036100ea57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f61013884846101ed565b905080801561015957505f3d118061015957505f846001600160a01b03163b115b1561016e57610166610200565b9150506101c6565b801561019857604051639996b31560e01b81526001600160a01b03851660048201526024016100e1565b3d156101ab576101a6610219565b6101c4565b60405163d6bda27560e01b815260040160405180910390fd5b505b92915050565b34156101eb5760405163b398979f60e01b815260040160405180910390fd5b565b5f5f5f835160208501865af49392505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215610249575f5ffd5b82516001600160a01b038116811461025f575f5ffd5b60208401519092506001600160401b0381111561027a575f5ffd5b8301601f8101851361028a575f5ffd5b80516001600160401b038111156102a3576102a3610224565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102d1576102d1610224565b6040528181528282016020018710156102e8575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b60a3806103135f395ff3fe6080604052600a600c565b005b60186014601a565b6050565b565b5f604b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e8080156069573d5ff35b3d5ffdfea26469706673582212200f18014ea5c0066d8797ddb2f8a13e8798e6d2e79c2d6de92e1ead588a58c3b764736f6c634300081f0033", + "deployedBytecode": "0x6080604052600a600c565b005b60186014601a565b6050565b565b5f604b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e8080156069573d5ff35b3d5ffdfea26469706673582212200f18014ea5c0066d8797ddb2f8a13e8798e6d2e79c2d6de92e1ead588a58c3b764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Utils.json new file mode 100644 index 00000000..1fbf1cb8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC1967Utils.json @@ -0,0 +1,49 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1967Utils", + "sourceName": "contracts/proxy/ERC1967/ERC1967Utils.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "ERC1967InvalidAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "ERC1967InvalidBeacon", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220a8765931786f4b5e9c38524c621e164ab29298134997df977b3088e07e86974364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220a8765931786f4b5e9c38524c621e164ab29298134997df977b3088e07e86974364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20.json similarity index 81% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20.json index 52027fd3..b74b1b22 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20CappedUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20.json @@ -1,44 +1,117 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC20CappedUpgradeable", - "sourceName": "contracts/token/ERC20/extensions/ERC20CappedUpgradeable.sol", + "contractName": "ERC20", + "sourceName": "contracts/token/ERC20/ERC20.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "spender", + "name": "sender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, { "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "Initialized", + "name": "Approval", "type": "event" }, { @@ -99,7 +172,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -133,19 +206,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "cap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "decimals", @@ -159,54 +219,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -255,7 +267,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -284,7 +296,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Bridgeable.json similarity index 75% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Bridgeable.json index 2e392d05..8874c2d4 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PermitUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Bridgeable.json @@ -1,8 +1,94 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC20PermitUpgradeable", - "sourceName": "contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol", + "contractName": "ERC20Bridgeable", + "sourceName": "contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -30,21 +116,52 @@ }, { "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "CrosschainBurn", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, { "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "Initialized", + "name": "CrosschainMint", "type": "event" }, { @@ -72,19 +189,6 @@ "name": "Transfer", "type": "event" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -118,7 +222,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -152,108 +256,53 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "from", "type": "address" }, { "internalType": "uint256", - "name": "subtractedValue", + "name": "value", "type": "uint256" } ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "crosschainBurn", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "to", "type": "address" }, { "internalType": "uint256", - "name": "addedValue", + "name": "value", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "crosschainMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bool", + "internalType": "uint8", "name": "", - "type": "bool" + "type": "uint8" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -272,65 +321,22 @@ { "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "nonces", + "name": "supportsInterface", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "symbol", @@ -366,7 +372,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -395,7 +401,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Burnable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Burnable.json similarity index 81% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Burnable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Burnable.json index 4ad34d11..bb150265 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Burnable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Burnable.json @@ -3,6 +3,92 @@ "contractName": "ERC20Burnable", "sourceName": "contracts/token/ERC20/extensions/ERC20Burnable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -86,7 +172,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -124,7 +210,7 @@ "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -142,7 +228,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -164,54 +250,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -260,7 +298,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -289,7 +327,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Capped.json similarity index 80% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Capped.json index e05caf96..b93041e5 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20SnapshotUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Capped.json @@ -1,57 +1,144 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC20SnapshotUpgradeable", - "sourceName": "contracts/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol", + "contractName": "ERC20Capped", + "sourceName": "contracts/token/ERC20/extensions/ERC20Capped.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, + "internalType": "uint256", + "name": "increasedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "ERC20ExceededCap", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "spender", + "name": "sender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "ERC20InsufficientBalance", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "address", + "name": "approver", + "type": "address" } ], - "name": "Initialized", - "type": "event" + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "ERC20InvalidCap", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "id", + "name": "value", "type": "uint256" } ], - "name": "Snapshot", + "name": "Approval", "type": "event" }, { @@ -112,7 +199,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -147,19 +234,8 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "balanceOfAt", + "inputs": [], + "name": "cap", "outputs": [ { "internalType": "uint256", @@ -183,54 +259,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -270,25 +298,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -298,7 +307,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -327,7 +336,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Crosschain.json similarity index 67% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Crosschain.json index 7c245c2e..96604f71 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBridgeUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Crosschain.json @@ -1,191 +1,303 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IBridgeUpgradeable", - "sourceName": "contracts/vendor/arbitrum/IBridgeUpgradeable.sol", + "contractName": "ERC20Crosschain", + "sourceName": "contracts/token/ERC20/extensions/ERC20Crosschain.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "outbox", + "name": "spender", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "to", + "name": "sender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "balance", "type": "uint256" }, { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "needed", + "type": "uint256" } ], - "name": "BridgeCallTriggered", - "type": "event" + "name": "ERC20InsufficientBalance", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "inbox", + "name": "approver", "type": "address" - }, + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "bool", - "name": "enabled", - "type": "bool" + "internalType": "address", + "name": "receiver", + "type": "address" } ], - "name": "InboxToggle", - "type": "event" + "name": "ERC20InvalidReceiver", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "messageIndex", - "type": "uint256" - }, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "beforeInboxAcc", - "type": "bytes32" - }, + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, "internalType": "address", - "name": "inbox", + "name": "gateway", "type": "address" }, { - "indexed": false, + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { "internalType": "uint8", - "name": "kind", + "name": "bits", "type": "uint8" }, { - "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, "internalType": "address", - "name": "sender", + "name": "owner", "type": "address" }, { - "indexed": false, - "internalType": "bytes32", - "name": "messageDataHash", - "type": "bytes32" + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "baseFeeL1", + "name": "value", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" } ], - "name": "MessageDelivered", + "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "from", + "type": "bytes" + }, { "indexed": true, "internalType": "address", - "name": "outbox", + "name": "to", "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "enabled", - "type": "bool" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "OutboxToggle", + "name": "CrosschainFungibleTransferReceived", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", - "name": "newSequencerInbox", + "name": "from", "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "SequencerInboxUpdated", + "name": "CrosschainFungibleTransferSent", "type": "event" }, { - "inputs": [], - "name": "activeOutbox", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "gateway", "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" + "name": "LinkRegistered", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "allowedDelayedInboxList", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "to", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { "inputs": [ { "internalType": "address", - "name": "inbox", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", "type": "address" } ], - "name": "allowedDelayedInboxes", + "name": "allowance", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -193,18 +305,23 @@ }, { "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "name": "allowedOutboxList", + "name": "approve", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "nonpayable", @@ -214,16 +331,16 @@ "inputs": [ { "internalType": "address", - "name": "outbox", + "name": "account", "type": "address" } ], - "name": "allowedOutboxes", + "name": "balanceOf", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -231,13 +348,18 @@ }, { "inputs": [ + { + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "name": "delayedInboxAccs", + "name": "crosschainTransfer", "outputs": [ { "internalType": "bytes32", @@ -245,94 +367,32 @@ "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedMessageCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "uint8", - "name": "kind", - "type": "uint8" - }, { "internalType": "address", - "name": "sender", + "name": "from", "type": "address" }, { - "internalType": "bytes32", - "name": "messageDataHash", - "type": "bytes32" - } - ], - "name": "enqueueDelayedMessage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "dataHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "afterDelayedMessagesRead", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "prevMessageCount", - "type": "uint256" + "internalType": "bytes", + "name": "to", + "type": "bytes" }, { "internalType": "uint256", - "name": "newMessageCount", + "name": "amount", "type": "uint256" } ], - "name": "enqueueSequencerMessage", + "name": "crosschainTransferFrom", "outputs": [ - { - "internalType": "uint256", - "name": "seqMessageIndex", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "beforeAcc", - "type": "bytes32" - }, { "internalType": "bytes32", - "name": "delayedAcc", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "acc", + "name": "", "type": "bytes32" } ], @@ -340,60 +400,37 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "executeCall", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "returnData", - "type": "bytes" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "rollup_", - "type": "address" + "internalType": "bytes", + "name": "chain", + "type": "bytes" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rollup", + "name": "getLink", "outputs": [ { "internalType": "address", - "name": "", + "name": "gateway", "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], "stateMutability": "view", @@ -401,12 +438,12 @@ }, { "inputs": [], - "name": "sequencerInbox", + "name": "name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", @@ -415,30 +452,40 @@ { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" } ], - "name": "sequencerInboxAccs", + "name": "receiveMessage", "outputs": [ { - "internalType": "bytes32", + "internalType": "bytes4", "name": "", - "type": "bytes32" + "type": "bytes4" } ], - "stateMutability": "view", + "stateMutability": "payable", "type": "function" }, { "inputs": [], - "name": "sequencerMessageCount", + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", @@ -446,7 +493,7 @@ }, { "inputs": [], - "name": "sequencerReportedSubMessageCount", + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -461,35 +508,23 @@ "inputs": [ { "internalType": "address", - "name": "inbox", + "name": "to", "type": "address" }, { - "internalType": "bool", - "name": "enabled", - "type": "bool" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "setDelayedInbox", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "inbox", - "type": "address" - }, + "name": "transfer", + "outputs": [ { "internalType": "bool", - "name": "enabled", + "name": "", "type": "bool" } ], - "name": "setOutbox", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -497,34 +532,26 @@ "inputs": [ { "internalType": "address", - "name": "_sequencerInbox", + "name": "from", "type": "address" - } - ], - "name": "setSequencerInbox", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "address", - "name": "batchPoster", + "name": "to", "type": "address" }, { - "internalType": "bytes32", - "name": "dataHash", - "type": "bytes32" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "submitBatchSpendingReport", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", - "name": "msgNum", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20FlashMint.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20FlashMint.json similarity index 77% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20FlashMint.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20FlashMint.json index 8f36780f..16a416ca 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20FlashMint.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20FlashMint.json @@ -3,6 +3,125 @@ "contractName": "ERC20FlashMint", "sourceName": "contracts/token/ERC20/extensions/ERC20FlashMint.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxLoan", + "type": "uint256" + } + ], + "name": "ERC3156ExceededMaxLoan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC3156InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "ERC3156UnsupportedToken", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -86,7 +205,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -133,30 +252,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -166,7 +261,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -195,7 +290,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { @@ -215,30 +310,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -306,7 +377,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -335,7 +406,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Pausable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Pausable.json similarity index 80% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Pausable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Pausable.json index ea866855..bf70a4b6 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Pausable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Pausable.json @@ -3,6 +3,102 @@ "contractName": "ERC20Pausable", "sourceName": "contracts/token/ERC20/extensions/ERC20Pausable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -112,7 +208,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -159,54 +255,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -268,7 +316,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -297,7 +345,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Permit.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Permit.json similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Permit.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Permit.json index ba51d2a8..48da540b 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Permit.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Permit.json @@ -3,6 +3,162 @@ "contractName": "ERC20Permit", "sourceName": "contracts/token/ERC20/extensions/ERC20Permit.sol", "abi": [ + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "ERC2612ExpiredSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC2612InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, { "inputs": [], "name": "InvalidShortString", @@ -121,7 +277,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -168,30 +324,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "eip712Domain", @@ -235,30 +367,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -369,7 +477,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -398,7 +506,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20TemporaryApproval.json similarity index 82% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20TemporaryApproval.json index 9452d974..779387b9 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Snapshot.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20TemporaryApproval.json @@ -1,44 +1,117 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC20Snapshot", - "sourceName": "contracts/token/ERC20/extensions/ERC20Snapshot.sol", + "contractName": "ERC20TemporaryApproval", + "sourceName": "contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "spender", + "name": "sender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "id", + "name": "value", "type": "uint256" } ], - "name": "Snapshot", + "name": "Approval", "type": "event" }, { @@ -99,7 +172,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -134,24 +207,13 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "balanceOfAt", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "stateMutability": "view", @@ -159,39 +221,28 @@ }, { "inputs": [], - "name": "decimals", + "name": "name", "outputs": [ { - "internalType": "uint8", + "internalType": "string", "name": "", - "type": "uint8" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", + "inputs": [], + "name": "symbol", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -203,11 +254,11 @@ }, { "internalType": "uint256", - "name": "addedValue", + "name": "value", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "temporaryApprove", "outputs": [ { "internalType": "bool", @@ -218,32 +269,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "totalSupply", @@ -257,25 +282,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -285,7 +291,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -314,7 +320,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Votes.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Votes.json similarity index 79% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Votes.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Votes.json index 615b6c49..9f99148d 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Votes.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Votes.json @@ -3,11 +3,198 @@ "contractName": "ERC20Votes", "sourceName": "contracts/token/ERC20/extensions/ERC20Votes.sol", "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "increasedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "ERC20ExceededSafeSupply", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "clock", + "type": "uint48" + } + ], + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, { "inputs": [], "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -19,6 +206,17 @@ "name": "StringTooLong", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -81,13 +279,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], @@ -138,19 +336,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -184,7 +369,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -236,17 +421,17 @@ { "components": [ { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" + "internalType": "uint48", + "name": "_key", + "type": "uint48" }, { - "internalType": "uint224", - "name": "votes", - "type": "uint224" + "internalType": "uint208", + "name": "_value", + "type": "uint208" } ], - "internalType": "struct ERC20Votes.Checkpoint", + "internalType": "struct Checkpoints.Checkpoint208", "name": "", "type": "tuple" } @@ -280,30 +465,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -479,30 +640,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -554,49 +691,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "symbol", @@ -632,7 +726,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -661,7 +755,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Wrapper.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Wrapper.json similarity index 78% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Wrapper.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Wrapper.json index 7a29c69d..53717244 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20Wrapper.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC20Wrapper.json @@ -3,6 +3,114 @@ "contractName": "ERC20Wrapper", "sourceName": "contracts/token/ERC20/extensions/ERC20Wrapper.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "ERC20InvalidUnderlying", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -86,7 +194,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -133,30 +241,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -166,7 +250,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -181,30 +265,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -253,7 +313,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -282,7 +342,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -319,7 +379,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2771Context.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2771Context.json similarity index 70% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2771Context.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2771Context.json index 4adaab0b..a57e2ab8 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2771Context.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2771Context.json @@ -21,6 +21,19 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2771Forwarder.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2771Forwarder.json new file mode 100644 index 00000000..2fd9c5b3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2771Forwarder.json @@ -0,0 +1,388 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2771Forwarder", + "sourceName": "contracts/metatx/ERC2771Forwarder.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + } + ], + "name": "ERC2771ForwarderExpiredRequest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "name": "ERC2771ForwarderInvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "msgValue", + "type": "uint256" + } + ], + "name": "ERC2771ForwarderMismatchedValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "ERC2771UntrustfulTarget", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "name": "ExecutedForwardRequest", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct ERC2771Forwarder.ForwardRequestData", + "name": "request", + "type": "tuple" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct ERC2771Forwarder.ForwardRequestData[]", + "name": "requests", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "refundReceiver", + "type": "address" + } + ], + "name": "executeBatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct ERC2771Forwarder.ForwardRequestData", + "name": "request", + "type": "tuple" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x610160604052348015610010575f5ffd5b506040516112e53803806112e583398101604081905261002f91610189565b6040805180820190915260018152603160f81b60208201528190610053825f6100fd565b610120526100628160016100fd565b61014052815160208084019190912060e052815190820120610100524660a0526100ee60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506103cf565b5f602083511015610118576101118361012f565b9050610129565b8161012384826102bd565b5060ff90505b92915050565b5f5f829050601f81511115610162578260405163305a27a960e01b81526004016101599190610377565b60405180910390fd5b805161016d826103ac565b179392505050565b634e487b7160e01b5f52604160045260245ffd5b5f60208284031215610199575f5ffd5b81516001600160401b038111156101ae575f5ffd5b8201601f810184136101be575f5ffd5b80516001600160401b038111156101d7576101d7610175565b604051601f8201601f19908116603f011681016001600160401b038111828210171561020557610205610175565b60405281815282820160200186101561021c575f5ffd5b8160208401602083015e5f91810160200191909152949350505050565b600181811c9082168061024d57607f821691505b60208210810361026b57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156102b857805f5260205f20601f840160051c810160208510156102965750805b601f840160051c820191505b818110156102b5575f81556001016102a2565b50505b505050565b81516001600160401b038111156102d6576102d6610175565b6102ea816102e48454610239565b84610271565b6020601f82116001811461031c575f83156103055750848201515b5f19600385901b1c1916600184901b1784556102b5565b5f84815260208120601f198516915b8281101561034b578785015182556020948501946001909201910161032b565b508482101561036857868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b8051602080830151919081101561026b575f1960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051610ec56104205f395f61039e01525f61036d01525f610a3d01525f610a1501525f61097001525f61099a01525f6109c40152610ec55ff3fe608060405260043610610049575f3560e01c806319d8d38c1461004d5780637ecebe001461008157806384b0196e146100c3578063ccf96b4a146100ea578063df905caf146100ff575b5f5ffd5b348015610058575f5ffd5b5061006c610067366004610b7c565b610112565b60405190151581526020015b60405180910390f35b34801561008c575f5ffd5b506100b561009b366004610bce565b6001600160a01b03165f9081526002602052604090205490565b604051908152602001610078565b3480156100ce575f5ffd5b506100d7610142565b6040516100789796959493929190610c17565b6100fd6100f8366004610cad565b610184565b005b6100fd61010d366004610b7c565b610289565b5f5f5f5f61011f856102e4565b509250925092508280156101305750815b80156101395750805b95945050505050565b5f6060805f5f5f6060610153610366565b61015b610397565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6001600160a01b038116155f80805b85811015610242578686828181106101ad576101ad610d2f565b90506020028101906101bf9190610d43565b6101cd906040013584610d61565b92505f6101fd8888848181106101e5576101e5610d2f565b90506020028101906101f79190610d43565b866103c4565b9050806102395787878381811061021657610216610d2f565b90506020028101906102289190610d43565b610236906040013584610d61565b92505b50600101610193565b50348214610271576040516370647f7960e01b8152600481018390523460248201526044015b60405180910390fd5b801561028157610281848261059f565b505050505050565b806040013534146102b957604080516370647f7960e01b8152908201356004820152346024820152604401610268565b6102c48160016103c4565b6102e15760405163d6bda27560e01b815260040160405180910390fd5b50565b5f5f5f5f5f5f6102f387610616565b909250905061031061030b6040890160208a01610bce565b610758565b4261032160a08a0160808b01610d80565b65ffffffffffff161015838015610355575061034060208a018a610bce565b6001600160a01b0316836001600160a01b0316145b919750955093509150509193509193565b60606103927f00000000000000000000000000000000000000000000000000000000000000005f6107d1565b905090565b60606103927f000000000000000000000000000000000000000000000000000000000000000060016107d1565b5f5f5f5f5f6103d2876102e4565b935093509350935085156104985783610420576103f56040880160208901610bce565b60405163d2650cd160e01b81526001600160a01b039091166004820152306024820152604401610268565b826104595761043560a0880160808901610d80565b604051634a777ac560e11b815265ffffffffffff9091166004820152602401610268565b81610498578061046c6020890189610bce565b604051636422d02b60e11b81526001600160a01b03928316600482015291166024820152604401610268565b8380156104a25750815b80156104ab5750825b15610595576001600160a01b0381165f908152600260205260408120805460018101909155905060608801355f6104e860408b0160208c01610bce565b905060408a01355f6104fd60a08d018d610da5565b61050a60208f018f610bce565b60405160200161051c93929190610def565b60405160208183030381529060405290505f5f5f83516020850186888af19a505a9050610549818e61087c565b604080518781528c151560208201526001600160a01b038916917f842fb24a83793558587a3dab2be7674da4a51d09c5542d6dd354e5d0ea70813c910160405180910390a25050505050505b5050505092915050565b804710156105c95760405163cf47918160e01b815247600482015260248101829052604401610268565b6105e2828260405180602001604052805f815250610894565b156105eb575050565b3d156105fd576105f96108a9565b5050565b60405163d6bda27560e01b815260040160405180910390fd5b5f80808061073361062a60c0870187610da5565b61072c7f7f96328b83274ebc7c1cf4f7a3abda602b51a78b7fa1d86a2ce353d75e587cac61065b60208b018b610bce565b61066b60408c0160208d01610bce565b8b604001358c6060013561068a8e5f01602081019061009b9190610bce565b8e608001602081019061069d9190610d80565b8f8060a001906106ad9190610da5565b6040516106bb929190610e15565b6040805191829003822060208301999099526001600160a01b0397881690820152959094166060860152608085019290925260a084015260c083015265ffffffffffff1660e082015261010081019190915261012001604051602081830303815290604052805190602001206108b4565b91906108e0565b5090925090505f81600381111561074c5761074c610e24565b14959194509092505050565b6040513060248201525f90819060440160408051601f19818403018152919052602080820180516001600160e01b031663572b6c0560e01b17815282519293505f928392839290918391895afa92503d91505f5190508280156107bc575060208210155b80156107c757505f81115b9695505050505050565b606060ff83146107eb576107e483610927565b9050610876565b8180546107f790610e38565b80601f016020809104026020016040519081016040528092919081815260200182805461082390610e38565b801561086e5780601f106108455761010080835404028352916020019161086e565b820191905f5260205f20905b81548152906001019060200180831161085157829003601f168201915b505050505090505b92915050565b61088b603f6060830135610e70565b8210156105f957fe5b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b5f6108766108c0610964565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80806041849003610914578435602086013560408701355f1a61090689828585610a8d565b95509550955050505061091e565b505f915060029050825b93509350939050565b60605f61093383610b55565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156109bc57507f000000000000000000000000000000000000000000000000000000000000000046145b156109e657507f000000000000000000000000000000000000000000000000000000000000000090565b610392604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ac657505f91506003905082610b4b565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610b17573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610b4257505f925060019150829050610b4b565b92505f91508190505b9450945094915050565b5f60ff8216601f81111561087657604051632cd44ac360e21b815260040160405180910390fd5b5f60208284031215610b8c575f5ffd5b813567ffffffffffffffff811115610ba2575f5ffd5b820160e08185031215610bb3575f5ffd5b9392505050565b6001600160a01b03811681146102e1575f5ffd5b5f60208284031215610bde575f5ffd5b8135610bb381610bba565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f610c3560e0830189610be9565b8281036040840152610c478189610be9565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015610c9c578351835260209384019390920191600101610c7e565b50909b9a5050505050505050505050565b5f5f5f60408486031215610cbf575f5ffd5b833567ffffffffffffffff811115610cd5575f5ffd5b8401601f81018613610ce5575f5ffd5b803567ffffffffffffffff811115610cfb575f5ffd5b8660208260051b8401011115610d0f575f5ffd5b602091820194509250840135610d2481610bba565b809150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f823560de19833603018112610d57575f5ffd5b9190910192915050565b8082018082111561087657634e487b7160e01b5f52601160045260245ffd5b5f60208284031215610d90575f5ffd5b813565ffffffffffff81168114610bb3575f5ffd5b5f5f8335601e19843603018112610dba575f5ffd5b83018035915067ffffffffffffffff821115610dd4575f5ffd5b602001915036819003821315610de8575f5ffd5b9250929050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b818382375f9101908152919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c90821680610e4c57607f821691505b602082108103610e6a57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f82610e8a57634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212200d2bce2d4483dbb893d901bbdfd0f6ea06af3b33e8bc30213fd8a2a73af114b164736f6c634300081f0033", + "deployedBytecode": "0x608060405260043610610049575f3560e01c806319d8d38c1461004d5780637ecebe001461008157806384b0196e146100c3578063ccf96b4a146100ea578063df905caf146100ff575b5f5ffd5b348015610058575f5ffd5b5061006c610067366004610b7c565b610112565b60405190151581526020015b60405180910390f35b34801561008c575f5ffd5b506100b561009b366004610bce565b6001600160a01b03165f9081526002602052604090205490565b604051908152602001610078565b3480156100ce575f5ffd5b506100d7610142565b6040516100789796959493929190610c17565b6100fd6100f8366004610cad565b610184565b005b6100fd61010d366004610b7c565b610289565b5f5f5f5f61011f856102e4565b509250925092508280156101305750815b80156101395750805b95945050505050565b5f6060805f5f5f6060610153610366565b61015b610397565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6001600160a01b038116155f80805b85811015610242578686828181106101ad576101ad610d2f565b90506020028101906101bf9190610d43565b6101cd906040013584610d61565b92505f6101fd8888848181106101e5576101e5610d2f565b90506020028101906101f79190610d43565b866103c4565b9050806102395787878381811061021657610216610d2f565b90506020028101906102289190610d43565b610236906040013584610d61565b92505b50600101610193565b50348214610271576040516370647f7960e01b8152600481018390523460248201526044015b60405180910390fd5b801561028157610281848261059f565b505050505050565b806040013534146102b957604080516370647f7960e01b8152908201356004820152346024820152604401610268565b6102c48160016103c4565b6102e15760405163d6bda27560e01b815260040160405180910390fd5b50565b5f5f5f5f5f5f6102f387610616565b909250905061031061030b6040890160208a01610bce565b610758565b4261032160a08a0160808b01610d80565b65ffffffffffff161015838015610355575061034060208a018a610bce565b6001600160a01b0316836001600160a01b0316145b919750955093509150509193509193565b60606103927f00000000000000000000000000000000000000000000000000000000000000005f6107d1565b905090565b60606103927f000000000000000000000000000000000000000000000000000000000000000060016107d1565b5f5f5f5f5f6103d2876102e4565b935093509350935085156104985783610420576103f56040880160208901610bce565b60405163d2650cd160e01b81526001600160a01b039091166004820152306024820152604401610268565b826104595761043560a0880160808901610d80565b604051634a777ac560e11b815265ffffffffffff9091166004820152602401610268565b81610498578061046c6020890189610bce565b604051636422d02b60e11b81526001600160a01b03928316600482015291166024820152604401610268565b8380156104a25750815b80156104ab5750825b15610595576001600160a01b0381165f908152600260205260408120805460018101909155905060608801355f6104e860408b0160208c01610bce565b905060408a01355f6104fd60a08d018d610da5565b61050a60208f018f610bce565b60405160200161051c93929190610def565b60405160208183030381529060405290505f5f5f83516020850186888af19a505a9050610549818e61087c565b604080518781528c151560208201526001600160a01b038916917f842fb24a83793558587a3dab2be7674da4a51d09c5542d6dd354e5d0ea70813c910160405180910390a25050505050505b5050505092915050565b804710156105c95760405163cf47918160e01b815247600482015260248101829052604401610268565b6105e2828260405180602001604052805f815250610894565b156105eb575050565b3d156105fd576105f96108a9565b5050565b60405163d6bda27560e01b815260040160405180910390fd5b5f80808061073361062a60c0870187610da5565b61072c7f7f96328b83274ebc7c1cf4f7a3abda602b51a78b7fa1d86a2ce353d75e587cac61065b60208b018b610bce565b61066b60408c0160208d01610bce565b8b604001358c6060013561068a8e5f01602081019061009b9190610bce565b8e608001602081019061069d9190610d80565b8f8060a001906106ad9190610da5565b6040516106bb929190610e15565b6040805191829003822060208301999099526001600160a01b0397881690820152959094166060860152608085019290925260a084015260c083015265ffffffffffff1660e082015261010081019190915261012001604051602081830303815290604052805190602001206108b4565b91906108e0565b5090925090505f81600381111561074c5761074c610e24565b14959194509092505050565b6040513060248201525f90819060440160408051601f19818403018152919052602080820180516001600160e01b031663572b6c0560e01b17815282519293505f928392839290918391895afa92503d91505f5190508280156107bc575060208210155b80156107c757505f81115b9695505050505050565b606060ff83146107eb576107e483610927565b9050610876565b8180546107f790610e38565b80601f016020809104026020016040519081016040528092919081815260200182805461082390610e38565b801561086e5780601f106108455761010080835404028352916020019161086e565b820191905f5260205f20905b81548152906001019060200180831161085157829003601f168201915b505050505090505b92915050565b61088b603f6060830135610e70565b8210156105f957fe5b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b5f6108766108c0610964565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80806041849003610914578435602086013560408701355f1a61090689828585610a8d565b95509550955050505061091e565b505f915060029050825b93509350939050565b60605f61093383610b55565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156109bc57507f000000000000000000000000000000000000000000000000000000000000000046145b156109e657507f000000000000000000000000000000000000000000000000000000000000000090565b610392604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610ac657505f91506003905082610b4b565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610b17573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610b4257505f925060019150829050610b4b565b92505f91508190505b9450945094915050565b5f60ff8216601f81111561087657604051632cd44ac360e21b815260040160405180910390fd5b5f60208284031215610b8c575f5ffd5b813567ffffffffffffffff811115610ba2575f5ffd5b820160e08185031215610bb3575f5ffd5b9392505050565b6001600160a01b03811681146102e1575f5ffd5b5f60208284031215610bde575f5ffd5b8135610bb381610bba565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f610c3560e0830189610be9565b8281036040840152610c478189610be9565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015610c9c578351835260209384019390920191600101610c7e565b50909b9a5050505050505050505050565b5f5f5f60408486031215610cbf575f5ffd5b833567ffffffffffffffff811115610cd5575f5ffd5b8401601f81018613610ce5575f5ffd5b803567ffffffffffffffff811115610cfb575f5ffd5b8660208260051b8401011115610d0f575f5ffd5b602091820194509250840135610d2481610bba565b809150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f823560de19833603018112610d57575f5ffd5b9190910192915050565b8082018082111561087657634e487b7160e01b5f52601160045260245ffd5b5f60208284031215610d90575f5ffd5b813565ffffffffffff81168114610bb3575f5ffd5b5f5f8335601e19843603018112610dba575f5ffd5b83018035915067ffffffffffffffff821115610dd4575f5ffd5b602001915036819003821315610de8575f5ffd5b9250929050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b818382375f9101908152919050565b634e487b7160e01b5f52602160045260245ffd5b600181811c90821680610e4c57607f821691505b602082108103610e6a57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f82610e8a57634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212200d2bce2d4483dbb893d901bbdfd0f6ea06af3b33e8bc30213fd8a2a73af114b164736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2981.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2981.json new file mode 100644 index 00000000..641b450f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC2981.json @@ -0,0 +1,123 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2981", + "sourceName": "contracts/token/common/ERC2981.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidDefaultRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidDefaultRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidTokenRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidTokenRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC4337Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC4337Utils.json new file mode 100644 index 00000000..b56050ea --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC4337Utils.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC4337Utils", + "sourceName": "contracts/account/utils/draft-ERC4337Utils.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209480fcae7ac436c978dd536e828e17c51ea2bebdde6a3f22797896f8de7416ee64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209480fcae7ac436c978dd536e828e17c51ea2bebdde6a3f22797896f8de7416ee64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC4626.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC4626.json similarity index 80% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC4626.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC4626.json index 964af1c6..02cfeabf 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC4626.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC4626.json @@ -3,6 +3,187 @@ "contractName": "ERC4626", "sourceName": "contracts/token/ERC20/extensions/ERC4626.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxRedeem", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxWithdraw", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -154,7 +335,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -252,30 +433,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -300,30 +457,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -590,7 +723,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -619,7 +752,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909.json new file mode 100644 index 00000000..ff3ec1c0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909.json @@ -0,0 +1,412 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909", + "sourceName": "contracts/token/ERC6909/ERC6909.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b506108368061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610084575f3560e01c8063558a729711610058578063558a7297146100f7578063598af9e71461010a578063b6363cf214610149578063fe99049a14610184575f5ffd5b8062fdd58e1461008857806301ffc9a7146100ae578063095bcdb6146100d1578063426a8493146100e4575b5f5ffd5b61009b610096366004610678565b610197565b6040519081526020015b60405180910390f35b6100c16100bc3660046106a0565b6101bf565b60405190151581526020016100a5565b6100c16100df3660046106ce565b6101f3565b6100c16100f23660046106ce565b61020a565b6100c16101053660046106fe565b610217565b61009b610118366004610737565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6100c1610157366004610771565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b6100c16101923660046107a2565b61022c565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b03198216630f632fb360e01b14806101b957506301ffc9a760e01b6001600160e01b03198316146101b9565b5f61020033858585610295565b5060019392505050565b5f610200338585856102fe565b5f6102233384846103bd565b50600192915050565b5f336001600160a01b038616811480159061026c57506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b1561027d5761027d8682868661047b565b61028986868686610295565b50600195945050505050565b6001600160a01b0384166102c3576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b0383166102ec57604051630b8bbd6160e41b81525f60048201526024016102ba565b6102f88484848461052b565b50505050565b6001600160a01b0384166103275760405163198ecd5360e31b81525f60048201526024016102ba565b6001600160a01b03831661035057604051636f65f46560e01b81525f60048201526024016102ba565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166103e65760405163198ecd5360e31b81525f60048201526024016102ba565b6001600160a01b03821661040f57604051636f65f46560e01b81525f60048201526024016102ba565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f1981101561052457818110156104f257604051632c51fead60e11b81526001600160a01b03851660048201526024810182905260448101839052606481018490526084016102ba565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b336001600160a01b038516156105c4576001600160a01b0385165f908152602081815260408083208684529091529020548281101561059d576040516302c6d3fb60e61b81526001600160a01b03871660048201526024810182905260448101849052606481018590526084016102ba565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b03841615610609576001600160a01b0384165f90815260208181526040808320868452909152812080548492906106039084906107e1565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b80356001600160a01b0381168114610673575f5ffd5b919050565b5f5f60408385031215610689575f5ffd5b6106928361065d565b946020939093013593505050565b5f602082840312156106b0575f5ffd5b81356001600160e01b0319811681146106c7575f5ffd5b9392505050565b5f5f5f606084860312156106e0575f5ffd5b6106e98461065d565b95602085013595506040909401359392505050565b5f5f6040838503121561070f575f5ffd5b6107188361065d565b91506020830135801515811461072c575f5ffd5b809150509250929050565b5f5f5f60608486031215610749575f5ffd5b6107528461065d565b92506107606020850161065d565b929592945050506040919091013590565b5f5f60408385031215610782575f5ffd5b61078b8361065d565b91506107996020840161065d565b90509250929050565b5f5f5f5f608085870312156107b5575f5ffd5b6107be8561065d565b93506107cc6020860161065d565b93969395505050506040820135916060013590565b808201808211156101b957634e487b7160e01b5f52601160045260245ffdfea2646970667358221220641826341ee518b3eafa9c1466f942144173a0d3f5bd2ab1e6ecdcf6dfe7458264736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610084575f3560e01c8063558a729711610058578063558a7297146100f7578063598af9e71461010a578063b6363cf214610149578063fe99049a14610184575f5ffd5b8062fdd58e1461008857806301ffc9a7146100ae578063095bcdb6146100d1578063426a8493146100e4575b5f5ffd5b61009b610096366004610678565b610197565b6040519081526020015b60405180910390f35b6100c16100bc3660046106a0565b6101bf565b60405190151581526020016100a5565b6100c16100df3660046106ce565b6101f3565b6100c16100f23660046106ce565b61020a565b6100c16101053660046106fe565b610217565b61009b610118366004610737565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6100c1610157366004610771565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b6100c16101923660046107a2565b61022c565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b03198216630f632fb360e01b14806101b957506301ffc9a760e01b6001600160e01b03198316146101b9565b5f61020033858585610295565b5060019392505050565b5f610200338585856102fe565b5f6102233384846103bd565b50600192915050565b5f336001600160a01b038616811480159061026c57506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b1561027d5761027d8682868661047b565b61028986868686610295565b50600195945050505050565b6001600160a01b0384166102c3576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b0383166102ec57604051630b8bbd6160e41b81525f60048201526024016102ba565b6102f88484848461052b565b50505050565b6001600160a01b0384166103275760405163198ecd5360e31b81525f60048201526024016102ba565b6001600160a01b03831661035057604051636f65f46560e01b81525f60048201526024016102ba565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166103e65760405163198ecd5360e31b81525f60048201526024016102ba565b6001600160a01b03821661040f57604051636f65f46560e01b81525f60048201526024016102ba565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f1981101561052457818110156104f257604051632c51fead60e11b81526001600160a01b03851660048201526024810182905260448101839052606481018490526084016102ba565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b336001600160a01b038516156105c4576001600160a01b0385165f908152602081815260408083208684529091529020548281101561059d576040516302c6d3fb60e61b81526001600160a01b03871660048201526024810182905260448101849052606481018590526084016102ba565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b03841615610609576001600160a01b0384165f90815260208181526040808320868452909152812080548492906106039084906107e1565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b80356001600160a01b0381168114610673575f5ffd5b919050565b5f5f60408385031215610689575f5ffd5b6106928361065d565b946020939093013593505050565b5f602082840312156106b0575f5ffd5b81356001600160e01b0319811681146106c7575f5ffd5b9392505050565b5f5f5f606084860312156106e0575f5ffd5b6106e98461065d565b95602085013595506040909401359392505050565b5f5f6040838503121561070f575f5ffd5b6107188361065d565b91506020830135801515811461072c575f5ffd5b809150509250929050565b5f5f5f60608486031215610749575f5ffd5b6107528461065d565b92506107606020850161065d565b929592945050506040919091013590565b5f5f60408385031215610782575f5ffd5b61078b8361065d565b91506107996020840161065d565b90509250929050565b5f5f5f5f608085870312156107b5575f5ffd5b6107be8561065d565b93506107cc6020860161065d565b93969395505050506040820135916060013590565b808201808211156101b957634e487b7160e01b5f52601160045260245ffdfea2646970667358221220641826341ee518b3eafa9c1466f942144173a0d3f5bd2ab1e6ecdcf6dfe7458264736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909ContentURI.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909ContentURI.json new file mode 100644 index 00000000..0aefb32a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909ContentURI.json @@ -0,0 +1,469 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909ContentURI", + "sourceName": "contracts/token/ERC6909/extensions/ERC6909ContentURI.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ContractURIUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "contractURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610a4b8061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061009a575f3560e01c8063598af9e711610063578063598af9e714610120578063b6363cf21461015f578063c87b56dd1461019a578063e8a3d485146101ba578063fe99049a146101c2575f5ffd5b8062fdd58e1461009e57806301ffc9a7146100c4578063095bcdb6146100e7578063426a8493146100fa578063558a72971461010d575b5f5ffd5b6100b16100ac366004610809565b6101d5565b6040519081526020015b60405180910390f35b6100d76100d2366004610831565b6101fd565b60405190151581526020016100bb565b6100d76100f536600461085f565b610221565b6100d761010836600461085f565b610238565b6100d761011b36600461088f565b610245565b6100b161012e3660046108c8565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6100d761016d366004610902565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b6101ad6101a8366004610933565b61025a565b6040516100bb919061094a565b6101ad6102f9565b6100d76101d036600461097f565b610389565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663041b104b60e31b14806101f757506101f7826103f2565b5f61022e33858585610426565b5060019392505050565b5f61022e3385858561048f565b5f61025133848461054e565b50600192915050565b5f818152600460205260409020805460609190610276906109be565b80601f01602080910402602001604051908101604052809291908181526020018280546102a2906109be565b80156102ed5780601f106102c4576101008083540402835291602001916102ed565b820191905f5260205f20905b8154815290600101906020018083116102d057829003601f168201915b50505050509050919050565b606060038054610308906109be565b80601f0160208091040260200160405190810160405280929190818152602001828054610334906109be565b801561037f5780601f106103565761010080835404028352916020019161037f565b820191905f5260205f20905b81548152906001019060200180831161036257829003601f168201915b5050505050905090565b5f336001600160a01b03861681148015906103c957506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b156103da576103da8682868661060c565b6103e686868686610426565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101f757506301ffc9a760e01b6001600160e01b03198316146101f7565b6001600160a01b038416610454576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661047d57604051630b8bbd6160e41b81525f600482015260240161044b565b610489848484846106bc565b50505050565b6001600160a01b0384166104b85760405163198ecd5360e31b81525f600482015260240161044b565b6001600160a01b0383166104e157604051636f65f46560e01b81525f600482015260240161044b565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166105775760405163198ecd5360e31b81525f600482015260240161044b565b6001600160a01b0382166105a057604051636f65f46560e01b81525f600482015260240161044b565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f198110156106b5578181101561068357604051632c51fead60e11b81526001600160a01b038516600482015260248101829052604481018390526064810184905260840161044b565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b336001600160a01b03851615610755576001600160a01b0385165f908152602081815260408083208684529091529020548281101561072e576040516302c6d3fb60e61b81526001600160a01b038716600482015260248101829052604481018490526064810185905260840161044b565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b0384161561079a576001600160a01b0384165f90815260208181526040808320868452909152812080548492906107949084906109f6565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b80356001600160a01b0381168114610804575f5ffd5b919050565b5f5f6040838503121561081a575f5ffd5b610823836107ee565b946020939093013593505050565b5f60208284031215610841575f5ffd5b81356001600160e01b031981168114610858575f5ffd5b9392505050565b5f5f5f60608486031215610871575f5ffd5b61087a846107ee565b95602085013595506040909401359392505050565b5f5f604083850312156108a0575f5ffd5b6108a9836107ee565b9150602083013580151581146108bd575f5ffd5b809150509250929050565b5f5f5f606084860312156108da575f5ffd5b6108e3846107ee565b92506108f1602085016107ee565b929592945050506040919091013590565b5f5f60408385031215610913575f5ffd5b61091c836107ee565b915061092a602084016107ee565b90509250929050565b5f60208284031215610943575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f5f60808587031215610992575f5ffd5b61099b856107ee565b93506109a9602086016107ee565b93969395505050506040820135916060013590565b600181811c908216806109d257607f821691505b6020821081036109f057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156101f757634e487b7160e01b5f52601160045260245ffdfea26469706673582212202fda48e8cd16f8452e08b204fba334358d93196ec32f6027a6d2ec4d1d8abd3164736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b506004361061009a575f3560e01c8063598af9e711610063578063598af9e714610120578063b6363cf21461015f578063c87b56dd1461019a578063e8a3d485146101ba578063fe99049a146101c2575f5ffd5b8062fdd58e1461009e57806301ffc9a7146100c4578063095bcdb6146100e7578063426a8493146100fa578063558a72971461010d575b5f5ffd5b6100b16100ac366004610809565b6101d5565b6040519081526020015b60405180910390f35b6100d76100d2366004610831565b6101fd565b60405190151581526020016100bb565b6100d76100f536600461085f565b610221565b6100d761010836600461085f565b610238565b6100d761011b36600461088f565b610245565b6100b161012e3660046108c8565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6100d761016d366004610902565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b6101ad6101a8366004610933565b61025a565b6040516100bb919061094a565b6101ad6102f9565b6100d76101d036600461097f565b610389565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663041b104b60e31b14806101f757506101f7826103f2565b5f61022e33858585610426565b5060019392505050565b5f61022e3385858561048f565b5f61025133848461054e565b50600192915050565b5f818152600460205260409020805460609190610276906109be565b80601f01602080910402602001604051908101604052809291908181526020018280546102a2906109be565b80156102ed5780601f106102c4576101008083540402835291602001916102ed565b820191905f5260205f20905b8154815290600101906020018083116102d057829003601f168201915b50505050509050919050565b606060038054610308906109be565b80601f0160208091040260200160405190810160405280929190818152602001828054610334906109be565b801561037f5780601f106103565761010080835404028352916020019161037f565b820191905f5260205f20905b81548152906001019060200180831161036257829003601f168201915b5050505050905090565b5f336001600160a01b03861681148015906103c957506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b156103da576103da8682868661060c565b6103e686868686610426565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101f757506301ffc9a760e01b6001600160e01b03198316146101f7565b6001600160a01b038416610454576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661047d57604051630b8bbd6160e41b81525f600482015260240161044b565b610489848484846106bc565b50505050565b6001600160a01b0384166104b85760405163198ecd5360e31b81525f600482015260240161044b565b6001600160a01b0383166104e157604051636f65f46560e01b81525f600482015260240161044b565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166105775760405163198ecd5360e31b81525f600482015260240161044b565b6001600160a01b0382166105a057604051636f65f46560e01b81525f600482015260240161044b565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f198110156106b5578181101561068357604051632c51fead60e11b81526001600160a01b038516600482015260248101829052604481018390526064810184905260840161044b565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b336001600160a01b03851615610755576001600160a01b0385165f908152602081815260408083208684529091529020548281101561072e576040516302c6d3fb60e61b81526001600160a01b038716600482015260248101829052604481018490526064810185905260840161044b565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b0384161561079a576001600160a01b0384165f90815260208181526040808320868452909152812080548492906107949084906109f6565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b80356001600160a01b0381168114610804575f5ffd5b919050565b5f5f6040838503121561081a575f5ffd5b610823836107ee565b946020939093013593505050565b5f60208284031215610841575f5ffd5b81356001600160e01b031981168114610858575f5ffd5b9392505050565b5f5f5f60608486031215610871575f5ffd5b61087a846107ee565b95602085013595506040909401359392505050565b5f5f604083850312156108a0575f5ffd5b6108a9836107ee565b9150602083013580151581146108bd575f5ffd5b809150509250929050565b5f5f5f606084860312156108da575f5ffd5b6108e3846107ee565b92506108f1602085016107ee565b929592945050506040919091013590565b5f5f60408385031215610913575f5ffd5b61091c836107ee565b915061092a602084016107ee565b90509250929050565b5f60208284031215610943575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f5f60808587031215610992575f5ffd5b61099b856107ee565b93506109a9602086016107ee565b93969395505050506040820135916060013590565b600181811c908216806109d257607f821691505b6020821081036109f057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156101f757634e487b7160e01b5f52601160045260245ffdfea26469706673582212202fda48e8cd16f8452e08b204fba334358d93196ec32f6027a6d2ec4d1d8abd3164736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909Metadata.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909Metadata.json new file mode 100644 index 00000000..522c71c7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909Metadata.json @@ -0,0 +1,526 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909Metadata", + "sourceName": "contracts/token/ERC6909/extensions/ERC6909Metadata.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "newDecimals", + "type": "uint8" + } + ], + "name": "ERC6909DecimalsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "newName", + "type": "string" + } + ], + "name": "ERC6909NameUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "newSymbol", + "type": "string" + } + ], + "name": "ERC6909SymbolUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610a2a8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100a4575f3560e01c8063426a84931161006e578063426a84931461015f5780634e41a1fb14610172578063558a729714610185578063598af9e714610198578063b6363cf2146101d7578063fe99049a14610212575f5ffd5b8062ad800c146100a8578062fdd58e146100d157806301ffc9a7146100f2578063095bcdb6146101155780633f47e66214610128575b5f5ffd5b6100bb6100b63660046107cd565b610225565b6040516100c891906107e4565b60405180910390f35b6100e46100df366004610834565b6102c4565b6040519081526020016100c8565b61010561010036600461085c565b6102ec565b60405190151581526020016100c8565b61010561012336600461088a565b610310565b61014d6101363660046107cd565b5f9081526003602052604090206002015460ff1690565b60405160ff90911681526020016100c8565b61010561016d36600461088a565b610327565b6100bb6101803660046107cd565b610334565b6101056101933660046108ba565b610353565b6100e46101a63660046108f3565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6101056101e536600461092d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b61010561022036600461095e565b610368565b5f8181526003602052604090208054606091906102419061099d565b80601f016020809104026020016040519081016040528092919081815260200182805461026d9061099d565b80156102b85780601f1061028f576101008083540402835291602001916102b8565b820191905f5260205f20905b81548152906001019060200180831161029b57829003601f168201915b50505050509050919050565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b031982166371abc79560e01b14806102e657506102e6826103d1565b5f61031d33858585610405565b5060019392505050565b5f61031d3385858561046e565b5f8181526003602052604090206001018054606091906102419061099d565b5f61035f33848461052d565b50600192915050565b5f336001600160a01b03861681148015906103a857506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b156103b9576103b9868286866105eb565b6103c586868686610405565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806102e657506301ffc9a760e01b6001600160e01b03198316146102e6565b6001600160a01b038416610433576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661045c57604051630b8bbd6160e41b81525f600482015260240161042a565b6104688484848461069b565b50505050565b6001600160a01b0384166104975760405163198ecd5360e31b81525f600482015260240161042a565b6001600160a01b0383166104c057604051636f65f46560e01b81525f600482015260240161042a565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166105565760405163198ecd5360e31b81525f600482015260240161042a565b6001600160a01b03821661057f57604051636f65f46560e01b81525f600482015260240161042a565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f19811015610694578181101561066257604051632c51fead60e11b81526001600160a01b038516600482015260248101829052604481018390526064810184905260840161042a565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b336001600160a01b03851615610734576001600160a01b0385165f908152602081815260408083208684529091529020548281101561070d576040516302c6d3fb60e61b81526001600160a01b038716600482015260248101829052604481018490526064810185905260840161042a565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b03841615610779576001600160a01b0384165f90815260208181526040808320868452909152812080548492906107739084906109d5565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b5f602082840312156107dd575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b038116811461082f575f5ffd5b919050565b5f5f60408385031215610845575f5ffd5b61084e83610819565b946020939093013593505050565b5f6020828403121561086c575f5ffd5b81356001600160e01b031981168114610883575f5ffd5b9392505050565b5f5f5f6060848603121561089c575f5ffd5b6108a584610819565b95602085013595506040909401359392505050565b5f5f604083850312156108cb575f5ffd5b6108d483610819565b9150602083013580151581146108e8575f5ffd5b809150509250929050565b5f5f5f60608486031215610905575f5ffd5b61090e84610819565b925061091c60208501610819565b929592945050506040919091013590565b5f5f6040838503121561093e575f5ffd5b61094783610819565b915061095560208401610819565b90509250929050565b5f5f5f5f60808587031215610971575f5ffd5b61097a85610819565b935061098860208601610819565b93969395505050506040820135916060013590565b600181811c908216806109b157607f821691505b6020821081036109cf57634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156102e657634e487b7160e01b5f52601160045260245ffdfea26469706673582212203ad1012afc2b848a7a3912cb41db2dedb83967bab9226c4e81afa5aa13d187db64736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100a4575f3560e01c8063426a84931161006e578063426a84931461015f5780634e41a1fb14610172578063558a729714610185578063598af9e714610198578063b6363cf2146101d7578063fe99049a14610212575f5ffd5b8062ad800c146100a8578062fdd58e146100d157806301ffc9a7146100f2578063095bcdb6146101155780633f47e66214610128575b5f5ffd5b6100bb6100b63660046107cd565b610225565b6040516100c891906107e4565b60405180910390f35b6100e46100df366004610834565b6102c4565b6040519081526020016100c8565b61010561010036600461085c565b6102ec565b60405190151581526020016100c8565b61010561012336600461088a565b610310565b61014d6101363660046107cd565b5f9081526003602052604090206002015460ff1690565b60405160ff90911681526020016100c8565b61010561016d36600461088a565b610327565b6100bb6101803660046107cd565b610334565b6101056101933660046108ba565b610353565b6100e46101a63660046108f3565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6101056101e536600461092d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b61010561022036600461095e565b610368565b5f8181526003602052604090208054606091906102419061099d565b80601f016020809104026020016040519081016040528092919081815260200182805461026d9061099d565b80156102b85780601f1061028f576101008083540402835291602001916102b8565b820191905f5260205f20905b81548152906001019060200180831161029b57829003601f168201915b50505050509050919050565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b031982166371abc79560e01b14806102e657506102e6826103d1565b5f61031d33858585610405565b5060019392505050565b5f61031d3385858561046e565b5f8181526003602052604090206001018054606091906102419061099d565b5f61035f33848461052d565b50600192915050565b5f336001600160a01b03861681148015906103a857506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b156103b9576103b9868286866105eb565b6103c586868686610405565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806102e657506301ffc9a760e01b6001600160e01b03198316146102e6565b6001600160a01b038416610433576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661045c57604051630b8bbd6160e41b81525f600482015260240161042a565b6104688484848461069b565b50505050565b6001600160a01b0384166104975760405163198ecd5360e31b81525f600482015260240161042a565b6001600160a01b0383166104c057604051636f65f46560e01b81525f600482015260240161042a565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166105565760405163198ecd5360e31b81525f600482015260240161042a565b6001600160a01b03821661057f57604051636f65f46560e01b81525f600482015260240161042a565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f19811015610694578181101561066257604051632c51fead60e11b81526001600160a01b038516600482015260248101829052604481018390526064810184905260840161042a565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b336001600160a01b03851615610734576001600160a01b0385165f908152602081815260408083208684529091529020548281101561070d576040516302c6d3fb60e61b81526001600160a01b038716600482015260248101829052604481018490526064810185905260840161042a565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b03841615610779576001600160a01b0384165f90815260208181526040808320868452909152812080548492906107739084906109d5565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b5f602082840312156107dd575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b038116811461082f575f5ffd5b919050565b5f5f60408385031215610845575f5ffd5b61084e83610819565b946020939093013593505050565b5f6020828403121561086c575f5ffd5b81356001600160e01b031981168114610883575f5ffd5b9392505050565b5f5f5f6060848603121561089c575f5ffd5b6108a584610819565b95602085013595506040909401359392505050565b5f5f604083850312156108cb575f5ffd5b6108d483610819565b9150602083013580151581146108e8575f5ffd5b809150509250929050565b5f5f5f60608486031215610905575f5ffd5b61090e84610819565b925061091c60208501610819565b929592945050506040919091013590565b5f5f6040838503121561093e575f5ffd5b61094783610819565b915061095560208401610819565b90509250929050565b5f5f5f5f60808587031215610971575f5ffd5b61097a85610819565b935061098860208601610819565b93969395505050506040820135916060013590565b600181811c908216806109b157607f821691505b6020821081036109cf57634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156102e657634e487b7160e01b5f52601160045260245ffdfea26469706673582212203ad1012afc2b848a7a3912cb41db2dedb83967bab9226c4e81afa5aa13d187db64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909TokenSupply.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909TokenSupply.json new file mode 100644 index 00000000..3c503fbe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC6909TokenSupply.json @@ -0,0 +1,431 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909TokenSupply", + "sourceName": "contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b506109008061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061008f575f3560e01c8063558a729711610063578063558a729714610102578063598af9e714610115578063b6363cf214610154578063bd85b0391461018f578063fe99049a146101ae575f5ffd5b8062fdd58e1461009357806301ffc9a7146100b9578063095bcdb6146100dc578063426a8493146100ef575b5f5ffd5b6100a66100a136600461072b565b6101c1565b6040519081526020015b60405180910390f35b6100cc6100c7366004610753565b6101e9565b60405190151581526020016100b0565b6100cc6100ea366004610781565b61020d565b6100cc6100fd366004610781565b610224565b6100cc6101103660046107b1565b610231565b6100a66101233660046107ea565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6100cc610162366004610824565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b6100a661019d366004610855565b5f9081526003602052604090205490565b6100cc6101bc36600461086c565b610246565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663bd85b03960e01b14806101e357506101e3826102af565b5f61021a338585856102e3565b5060019392505050565b5f61021a3385858561034c565b5f61023d33848461040b565b50600192915050565b5f336001600160a01b038616811480159061028657506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b1561029757610297868286866104c9565b6102a3868686866102e3565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101e357506301ffc9a760e01b6001600160e01b03198316146101e3565b6001600160a01b038416610311576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661033a57604051630b8bbd6160e41b81525f6004820152602401610308565b61034684848484610579565b50505050565b6001600160a01b0384166103755760405163198ecd5360e31b81525f6004820152602401610308565b6001600160a01b03831661039e57604051636f65f46560e01b81525f6004820152602401610308565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166104345760405163198ecd5360e31b81525f6004820152602401610308565b6001600160a01b03821661045d57604051636f65f46560e01b81525f6004820152602401610308565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f19811015610572578181101561054057604051632c51fead60e11b81526001600160a01b0385166004820152602481018290526044810183905260648101849052608401610308565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b610585848484846105de565b6001600160a01b0384166105b6575f82815260036020526040812080548392906105b09084906108ab565b90915550505b6001600160a01b038316610346575f8281526003602052604090208054829003905550505050565b336001600160a01b03851615610677576001600160a01b0385165f9081526020818152604080832086845290915290205482811015610650576040516302c6d3fb60e61b81526001600160a01b0387166004820152602481018290526044810184905260648101859052608401610308565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b038416156106bc576001600160a01b0384165f90815260208181526040808320868452909152812080548492906106b69084906108ab565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b80356001600160a01b0381168114610726575f5ffd5b919050565b5f5f6040838503121561073c575f5ffd5b61074583610710565b946020939093013593505050565b5f60208284031215610763575f5ffd5b81356001600160e01b03198116811461077a575f5ffd5b9392505050565b5f5f5f60608486031215610793575f5ffd5b61079c84610710565b95602085013595506040909401359392505050565b5f5f604083850312156107c2575f5ffd5b6107cb83610710565b9150602083013580151581146107df575f5ffd5b809150509250929050565b5f5f5f606084860312156107fc575f5ffd5b61080584610710565b925061081360208501610710565b929592945050506040919091013590565b5f5f60408385031215610835575f5ffd5b61083e83610710565b915061084c60208401610710565b90509250929050565b5f60208284031215610865575f5ffd5b5035919050565b5f5f5f5f6080858703121561087f575f5ffd5b61088885610710565b935061089660208601610710565b93969395505050506040820135916060013590565b808201808211156101e357634e487b7160e01b5f52601160045260245ffdfea26469706673582212203fb7962a7b4605514e7a17759c34d08ebd80bc662977b8d1d173affbe81bbac564736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b506004361061008f575f3560e01c8063558a729711610063578063558a729714610102578063598af9e714610115578063b6363cf214610154578063bd85b0391461018f578063fe99049a146101ae575f5ffd5b8062fdd58e1461009357806301ffc9a7146100b9578063095bcdb6146100dc578063426a8493146100ef575b5f5ffd5b6100a66100a136600461072b565b6101c1565b6040519081526020015b60405180910390f35b6100cc6100c7366004610753565b6101e9565b60405190151581526020016100b0565b6100cc6100ea366004610781565b61020d565b6100cc6100fd366004610781565b610224565b6100cc6101103660046107b1565b610231565b6100a66101233660046107ea565b6001600160a01b039283165f9081526002602090815260408083209490951682529283528381209181529152205490565b6100cc610162366004610824565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b6100a661019d366004610855565b5f9081526003602052604090205490565b6100cc6101bc36600461086c565b610246565b6001600160a01b0382165f908152602081815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663bd85b03960e01b14806101e357506101e3826102af565b5f61021a338585856102e3565b5060019392505050565b5f61021a3385858561034c565b5f61023d33848461040b565b50600192915050565b5f336001600160a01b038616811480159061028657506001600160a01b038087165f9081526001602090815260408083209385168352929052205460ff16155b1561029757610297868286866104c9565b6102a3868686866102e3565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101e357506301ffc9a760e01b6001600160e01b03198316146101e3565b6001600160a01b038416610311576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661033a57604051630b8bbd6160e41b81525f6004820152602401610308565b61034684848484610579565b50505050565b6001600160a01b0384166103755760405163198ecd5360e31b81525f6004820152602401610308565b6001600160a01b03831661039e57604051636f65f46560e01b81525f6004820152602401610308565b6001600160a01b038481165f8181526002602090815260408083209488168084529482528083208784528252918290208590559051848152859392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a450505050565b6001600160a01b0383166104345760405163198ecd5360e31b81525f6004820152602401610308565b6001600160a01b03821661045d57604051636f65f46560e01b81525f6004820152602401610308565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a3505050565b6001600160a01b038481165f9081526002602090815260408083209387168352928152828220858352905220545f19811015610572578181101561054057604051632c51fead60e11b81526001600160a01b0385166004820152602481018290526044810183905260648101849052608401610308565b6001600160a01b038086165f908152600260209081526040808320938816835292815282822086835290522082820390555b5050505050565b610585848484846105de565b6001600160a01b0384166105b6575f82815260036020526040812080548392906105b09084906108ab565b90915550505b6001600160a01b038316610346575f8281526003602052604090208054829003905550505050565b336001600160a01b03851615610677576001600160a01b0385165f9081526020818152604080832086845290915290205482811015610650576040516302c6d3fb60e61b81526001600160a01b0387166004820152602481018290526044810184905260648101859052608401610308565b6001600160a01b0386165f9081526020818152604080832087845290915290209083900390555b6001600160a01b038416156106bc576001600160a01b0384165f90815260208181526040808320868452909152812080548492906106b69084906108ab565b90915550505b604080516001600160a01b03838116825260208201859052859281881692918916917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a45050505050565b80356001600160a01b0381168114610726575f5ffd5b919050565b5f5f6040838503121561073c575f5ffd5b61074583610710565b946020939093013593505050565b5f60208284031215610763575f5ffd5b81356001600160e01b03198116811461077a575f5ffd5b9392505050565b5f5f5f60608486031215610793575f5ffd5b61079c84610710565b95602085013595506040909401359392505050565b5f5f604083850312156107c2575f5ffd5b6107cb83610710565b9150602083013580151581146107df575f5ffd5b809150509250929050565b5f5f5f606084860312156107fc575f5ffd5b61080584610710565b925061081360208501610710565b929592945050506040919091013590565b5f5f60408385031215610835575f5ffd5b61083e83610710565b915061084c60208401610710565b90509250929050565b5f60208284031215610865575f5ffd5b5035919050565b5f5f5f5f6080858703121561087f575f5ffd5b61088885610710565b935061089660208601610710565b93969395505050506040820135916060013590565b808201808211156101e357634e487b7160e01b5f52601160045260245ffdfea26469706673582212203fb7962a7b4605514e7a17759c34d08ebd80bc662977b8d1d173affbe81bbac564736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721.json similarity index 81% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721.json index 52ba86a2..c546e806 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721RoyaltyUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721.json @@ -1,8 +1,111 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC721RoyaltyUpgradeable", - "sourceName": "contracts/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol", + "contractName": "ERC721", + "sourceName": "contracts/token/ERC721/ERC721.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -53,19 +156,6 @@ "name": "ApprovalForAll", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -203,35 +293,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "salePrice", - "type": "uint256" - } - ], - "name": "royaltyInfo", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Burnable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Burnable.json similarity index 78% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Burnable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Burnable.json index e115eb4f..8aaeaaa7 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Burnable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Burnable.json @@ -3,6 +3,109 @@ "contractName": "ERC721Burnable", "sourceName": "contracts/token/ERC721/extensions/ERC721Burnable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Consecutive.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Consecutive.json similarity index 74% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Consecutive.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Consecutive.json index f5789cc9..d6de42cc 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Consecutive.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Consecutive.json @@ -3,6 +3,140 @@ "contractName": "ERC721Consecutive", "sourceName": "contracts/token/ERC721/extensions/ERC721Consecutive.sol", "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "batchSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxBatch", + "type": "uint256" + } + ], + "name": "ERC721ExceededMaxBatchMint", + "type": "error" + }, + { + "inputs": [], + "name": "ERC721ForbiddenBatchBurn", + "type": "error" + }, + { + "inputs": [], + "name": "ERC721ForbiddenBatchMint", + "type": "error" + }, + { + "inputs": [], + "name": "ERC721ForbiddenMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Enumerable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Enumerable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Enumerable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Enumerable.json index 364360e4..adfbaaaf 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Enumerable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Enumerable.json @@ -3,6 +3,130 @@ "contractName": "ERC721Enumerable", "sourceName": "contracts/token/ERC721/extensions/ERC721Enumerable.sol", "abi": [ + { + "inputs": [], + "name": "ERC721EnumerableForbiddenBatchMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "ERC721OutOfBoundsIndex", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Holder.json similarity index 76% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Holder.json index a5d144f4..869877c3 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721ReceiverUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Holder.json @@ -1,28 +1,28 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC721ReceiverUpgradeable", - "sourceName": "contracts/token/ERC721/IERC721ReceiverUpgradeable.sol", + "contractName": "ERC721Holder", + "sourceName": "contracts/token/ERC721/utils/ERC721Holder.sol", "abi": [ { "inputs": [ { "internalType": "address", - "name": "operator", + "name": "", "type": "address" }, { "internalType": "address", - "name": "from", + "name": "", "type": "address" }, { "internalType": "uint256", - "name": "tokenId", + "name": "", "type": "uint256" }, { "internalType": "bytes", - "name": "data", + "name": "", "type": "bytes" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Pausable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Pausable.json similarity index 77% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Pausable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Pausable.json index 566f11ca..099a81a1 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Pausable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Pausable.json @@ -3,6 +3,119 @@ "contractName": "ERC721Pausable", "sourceName": "contracts/token/ERC721/extensions/ERC721Pausable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Royalty.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Royalty.json similarity index 68% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Royalty.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Royalty.json index a257c0d8..d86a1624 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Royalty.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Royalty.json @@ -3,6 +3,173 @@ "contractName": "ERC721Royalty", "sourceName": "contracts/token/ERC721/extensions/ERC721Royalty.sol", "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidDefaultRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidDefaultRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidTokenRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidTokenRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -207,12 +374,12 @@ "outputs": [ { "internalType": "address", - "name": "", + "name": "receiver", "type": "address" }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721URIStorage.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721URIStorage.json similarity index 78% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721URIStorage.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721URIStorage.json index 03bbb5d6..253fd9db 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721URIStorage.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721URIStorage.json @@ -3,6 +3,109 @@ "contractName": "ERC721URIStorage", "sourceName": "contracts/token/ERC721/extensions/ERC721URIStorage.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Utils.json new file mode 100644 index 00000000..1f2c55fb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Utils.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721Utils", + "sourceName": "contracts/token/ERC721/utils/ERC721Utils.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122001894baa3bd1f234d3d006f5c906996c558d4d1f70fa8a75fa3c56d4cd14410364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122001894baa3bd1f234d3d006f5c906996c558d4d1f70fa8a75fa3c56d4cd14410364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Votes.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Votes.json similarity index 77% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Votes.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Votes.json index 6080809c..a11f4911 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Votes.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Votes.json @@ -3,11 +3,199 @@ "contractName": "ERC721Votes", "sourceName": "contracts/token/ERC721/extensions/ERC721Votes.sol", "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "clock", + "type": "uint48" + } + ], + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, { "inputs": [], "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -19,6 +207,17 @@ "name": "StringTooLong", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -106,13 +305,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], @@ -163,19 +362,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Wrapper.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Wrapper.json similarity index 79% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Wrapper.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Wrapper.json index bbff5fc2..b2386224 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC721Wrapper.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC721Wrapper.json @@ -3,6 +3,120 @@ "contractName": "ERC721Wrapper", "sourceName": "contracts/token/ERC721/extensions/ERC721Wrapper.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "ERC721UnsupportedToken", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7579Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7579Utils.json new file mode 100644 index 00000000..28e6caf1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7579Utils.json @@ -0,0 +1,116 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7579Utils", + "sourceName": "contracts/account/utils/draft-ERC7579Utils.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579AlreadyInstalledModule", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579DecodingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579MismatchedModuleTypeId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579UninstalledModule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "CallType", + "name": "callType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedCallType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ExecType", + "name": "execType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedExecType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "ERC7579UnsupportedModuleType", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "batchExecutionIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "ERC7579TryExecuteFail", + "type": "event" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205c84ef868e9e1b9bc596f2ec1b7ce12d975be850814fd90480cd66c95f6f339364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205c84ef868e9e1b9bc596f2ec1b7ce12d975be850814fd90480cd66c95f6f339364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7739.json similarity index 58% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7739.json index d4105c2b..5fbd1968 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5267Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7739.json @@ -1,8 +1,24 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC5267Upgradeable", - "sourceName": "contracts/interfaces/IERC5267Upgradeable.sol", + "contractName": "ERC7739", + "sourceName": "contracts/utils/cryptography/signers/draft-ERC7739.sol", "abi": [ + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, { "anonymous": false, "inputs": [], @@ -51,6 +67,30 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "result", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7739Utils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7739Utils.json new file mode 100644 index 00000000..d85819dc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7739Utils.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7739Utils", + "sourceName": "contracts/utils/cryptography/draft-ERC7739Utils.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206334431cfd262ad96c2a24c7e72545d1455ba38678cfbca7881184bb3d09eb5264736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206334431cfd262ad96c2a24c7e72545d1455ba38678cfbca7881184bb3d09eb5264736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7786Recipient.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7786Recipient.json new file mode 100644 index 00000000..47b05cb3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7786Recipient.json @@ -0,0 +1,56 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7786Recipient", + "sourceName": "contracts/crosschain/ERC7786Recipient.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7821.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7821.json new file mode 100644 index 00000000..6f31d16c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7821.json @@ -0,0 +1,109 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7821", + "sourceName": "contracts/account/extensions/draft-ERC7821.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "AccountUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579DecodingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ExecType", + "name": "execType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedExecType", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfRangeAccess", + "type": "error" + }, + { + "inputs": [], + "name": "UnsupportedExecutionMode", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "batchExecutionIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "ERC7579TryExecuteFail", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionData", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ + { + "internalType": "bool", + "name": "result", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913P256Verifier.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913P256Verifier.json new file mode 100644 index 00000000..22cd3cd2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913P256Verifier.json @@ -0,0 +1,40 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7913P256Verifier", + "sourceName": "contracts/utils/cryptography/verifiers/ERC7913P256Verifier.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "key", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610c0e8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063024ad3181461002d575b5f5ffd5b61004061003b366004610ac8565b61005d565b6040516001600160e01b0319909116815260200160405180910390f35b5f60408514801561006f575060408210155b15610104575f610082602082888a610b41565b61008b91610b68565b90505f61009c60406020898b610b41565b6100a591610b68565b90505f6100b56020828789610b41565b6100be91610b68565b90505f6100cf60406020888a610b41565b6100d891610b68565b90506100e78883838787610118565b156100ff575062495a6360e31b935061010f92505050565b505050505b506001600160e01b03195b95945050505050565b5f5f5f6101288888888888610151565b91509150806101435761013e888888888861022c565b610145565b815b98975050505050505050565b5f5f61015d86866102dc565b1580610170575061016e8484610338565b155b1561018057505f90506001610222565b61018d878787878761039c565b1561019d57506001905080610222565b61020c7fbb5a52f42f9c9261ed4361f59422a1e30036e7c32b270c8807a419feca605023600560017fa71af64de5126a4a4e02b7922d66ce9415ce88a4c9d25514d91082c8725ac9577f5d47723c8fbe580bb369fec9c2665d8e30a435b9932645482e7c9f11e872296b61039c565b1561021c57505f90506001610222565b505f9050805b9550959350505050565b5f61023785856102dc565b158061024a57506102488383610338565b155b1561025657505f61010f565b5f61026184846103dc565b90505f61027b865f516020610bb95f395f51905f526105cf565b90505f5f516020610bb95f395f51905f52828a0990505f5f516020610bb95f395f51905f52838a0990505f6102b18584846105de565b509050896102cc5f516020610bb95f395f51905f5283610b85565b149b9a5050505050505050505050565b5f82158015906102f857505f516020610bb95f395f51905f5283105b801561030357508115155b801561032f57507f7fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e3192a88211155b90505b92915050565b5f600160601b63ffffffff60c01b031980838409817f5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b8387856003600160601b0363ffffffff60c01b0319878b8c0908090894821191909310169190921416919050565b5f6040518681528560208201528460408201528360608201528260808201525f5f5260205f60a0836101005afa6103cf57fe5b50505f5195945050505050565b6103e4610a3c565b60405180606001604052805f81526020015f81526020015f815250815f6010811061041157610411610ba4565b6020020181905250604051806060016040528084815260200183815260200160018152508160016010811061044857610448610ba4565b602002018190525060405180606001604052807f6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c29681526020017f4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f581526020016001815250816004601081106104bf576104bf610ba4565b60200201526104d58160015b6020020151610702565b60408201526104e58160046104cb565b6101008201526020810151610502908260025b602002015161075e565b606082015261051b8160015b60200201518260046104f8565b60a082015261052b81600261050e565b60c082015261053b81600361050e565b60e08201526105548160015b60200201518260086104f8565b610120820152610565816002610547565b610140820152610576816003610547565b610160820152610587816004610547565b6101808201526105a18160015b602002015182600c6104f8565b6101a08201526105b2816002610594565b6101c08201526105c3816003610594565b6101e082015292915050565b5f61032f8360028403846107bc565b5f80808080805b60808110156106e6578115610619576105ff8484846107dd565b919550935091506106118484846107dd565b919550935091505b600c60fc89901c1660fe88901c1789816010811061063957610639610ba4565b602002015160400151156106d257825f036106a85789816010811061066057610660610ba4565b6020020151518a826010811061067857610678610ba4565b6020020151602001518b836010811061069357610693610ba4565b602002015160400151919650945092506106d2565b6106ca8a82601081106106bd576106bd610ba4565b6020020151868686610860565b919650945092505b50600297881b979690961b956001016105e5565b506106f283838361098c565b945094505050505b935093915050565b61072360405180606001604052805f81526020015f81526020015f81525090565b5f5f5f61073c855f0151866020015187604001516107dd565b6040805160608101825293845260208401929092529082015295945050505050565b61077f60405180606001604052805f81526020015f81526020015f81525090565b5f5f5f61079986865f015187602001518860400151610860565b604080516060810182529384526020840192909252908201529695505050505050565b5f5f5f6107ca8686866109d9565b915091508161010f5761010f6012610a2b565b5f5f5f600160601b63ffffffff60c01b031980868709818687098283848384096003600160601b0363ffffffff60c01b03190984858c8d096003090890508283838b09600409838482600209850385848509089650838485858609600809850385868a880385088509089550505050808186880960020991505093509350939050565b5f5f5f600160601b63ffffffff60c01b0319604088015181818209828388858a8b090960208c0151098381850385868686098c090884858a8b098d51098581870387868f09089350811584151680156108c057600181146109065761097b565b868586098788898386096002098903898a848a098b038b88890908089a5087888983890987098903898a8e8c038c8689090887090899505086878c88098609975061097b565b8c8c8c898283098a8283098b8c8d8384096003600160601b0363ffffffff60c01b0319098d8e8889096003090890508b8c83870960040994508b8c866002098d038d838409089e508b8c8384096008098c0391508b8f8d03860894508b828d878409089d505050898a8284096002099a505050505b505050505050509450945094915050565b5f5f825f0361099f57505f9050806106fa565b600160601b63ffffffff60c01b03195f6109b985836105cf565b905081818209828189099450828383830988099350505050935093915050565b5f5f825f036109ec57505f9050806106fa565b60405160208152602080820152602060408201528560608201528460808201528360a082015260205f60c08360055afa9250505f519050935093915050565b634e487b715f52806020526024601cfd5b6040518061020001604052806010905b610a6d60405180606001604052805f81526020015f81526020015f81525090565b815260200190600190039081610a4c5790505090565b5f5f83601f840112610a93575f5ffd5b50813567ffffffffffffffff811115610aaa575f5ffd5b602083019150836020828501011115610ac1575f5ffd5b9250929050565b5f5f5f5f5f60608688031215610adc575f5ffd5b853567ffffffffffffffff811115610af2575f5ffd5b610afe88828901610a83565b90965094505060208601359250604086013567ffffffffffffffff811115610b24575f5ffd5b610b3088828901610a83565b969995985093965092949392505050565b5f5f85851115610b4f575f5ffd5b83861115610b5b575f5ffd5b5050820193919092039150565b80356020831015610332575f19602084900360031b1b1692915050565b5f82610b9f57634e487b7160e01b5f52601260045260245ffd5b500690565b634e487b7160e01b5f52603260045260245ffdfeffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551a2646970667358221220177bea9903f0dc492f7c39f7bbc238b4ba50395f665d183d5322da089dd184ec64736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063024ad3181461002d575b5f5ffd5b61004061003b366004610ac8565b61005d565b6040516001600160e01b0319909116815260200160405180910390f35b5f60408514801561006f575060408210155b15610104575f610082602082888a610b41565b61008b91610b68565b90505f61009c60406020898b610b41565b6100a591610b68565b90505f6100b56020828789610b41565b6100be91610b68565b90505f6100cf60406020888a610b41565b6100d891610b68565b90506100e78883838787610118565b156100ff575062495a6360e31b935061010f92505050565b505050505b506001600160e01b03195b95945050505050565b5f5f5f6101288888888888610151565b91509150806101435761013e888888888861022c565b610145565b815b98975050505050505050565b5f5f61015d86866102dc565b1580610170575061016e8484610338565b155b1561018057505f90506001610222565b61018d878787878761039c565b1561019d57506001905080610222565b61020c7fbb5a52f42f9c9261ed4361f59422a1e30036e7c32b270c8807a419feca605023600560017fa71af64de5126a4a4e02b7922d66ce9415ce88a4c9d25514d91082c8725ac9577f5d47723c8fbe580bb369fec9c2665d8e30a435b9932645482e7c9f11e872296b61039c565b1561021c57505f90506001610222565b505f9050805b9550959350505050565b5f61023785856102dc565b158061024a57506102488383610338565b155b1561025657505f61010f565b5f61026184846103dc565b90505f61027b865f516020610bb95f395f51905f526105cf565b90505f5f516020610bb95f395f51905f52828a0990505f5f516020610bb95f395f51905f52838a0990505f6102b18584846105de565b509050896102cc5f516020610bb95f395f51905f5283610b85565b149b9a5050505050505050505050565b5f82158015906102f857505f516020610bb95f395f51905f5283105b801561030357508115155b801561032f57507f7fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e3192a88211155b90505b92915050565b5f600160601b63ffffffff60c01b031980838409817f5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b8387856003600160601b0363ffffffff60c01b0319878b8c0908090894821191909310169190921416919050565b5f6040518681528560208201528460408201528360608201528260808201525f5f5260205f60a0836101005afa6103cf57fe5b50505f5195945050505050565b6103e4610a3c565b60405180606001604052805f81526020015f81526020015f815250815f6010811061041157610411610ba4565b6020020181905250604051806060016040528084815260200183815260200160018152508160016010811061044857610448610ba4565b602002018190525060405180606001604052807f6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c29681526020017f4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f581526020016001815250816004601081106104bf576104bf610ba4565b60200201526104d58160015b6020020151610702565b60408201526104e58160046104cb565b6101008201526020810151610502908260025b602002015161075e565b606082015261051b8160015b60200201518260046104f8565b60a082015261052b81600261050e565b60c082015261053b81600361050e565b60e08201526105548160015b60200201518260086104f8565b610120820152610565816002610547565b610140820152610576816003610547565b610160820152610587816004610547565b6101808201526105a18160015b602002015182600c6104f8565b6101a08201526105b2816002610594565b6101c08201526105c3816003610594565b6101e082015292915050565b5f61032f8360028403846107bc565b5f80808080805b60808110156106e6578115610619576105ff8484846107dd565b919550935091506106118484846107dd565b919550935091505b600c60fc89901c1660fe88901c1789816010811061063957610639610ba4565b602002015160400151156106d257825f036106a85789816010811061066057610660610ba4565b6020020151518a826010811061067857610678610ba4565b6020020151602001518b836010811061069357610693610ba4565b602002015160400151919650945092506106d2565b6106ca8a82601081106106bd576106bd610ba4565b6020020151868686610860565b919650945092505b50600297881b979690961b956001016105e5565b506106f283838361098c565b945094505050505b935093915050565b61072360405180606001604052805f81526020015f81526020015f81525090565b5f5f5f61073c855f0151866020015187604001516107dd565b6040805160608101825293845260208401929092529082015295945050505050565b61077f60405180606001604052805f81526020015f81526020015f81525090565b5f5f5f61079986865f015187602001518860400151610860565b604080516060810182529384526020840192909252908201529695505050505050565b5f5f5f6107ca8686866109d9565b915091508161010f5761010f6012610a2b565b5f5f5f600160601b63ffffffff60c01b031980868709818687098283848384096003600160601b0363ffffffff60c01b03190984858c8d096003090890508283838b09600409838482600209850385848509089650838485858609600809850385868a880385088509089550505050808186880960020991505093509350939050565b5f5f5f600160601b63ffffffff60c01b0319604088015181818209828388858a8b090960208c0151098381850385868686098c090884858a8b098d51098581870387868f09089350811584151680156108c057600181146109065761097b565b868586098788898386096002098903898a848a098b038b88890908089a5087888983890987098903898a8e8c038c8689090887090899505086878c88098609975061097b565b8c8c8c898283098a8283098b8c8d8384096003600160601b0363ffffffff60c01b0319098d8e8889096003090890508b8c83870960040994508b8c866002098d038d838409089e508b8c8384096008098c0391508b8f8d03860894508b828d878409089d505050898a8284096002099a505050505b505050505050509450945094915050565b5f5f825f0361099f57505f9050806106fa565b600160601b63ffffffff60c01b03195f6109b985836105cf565b905081818209828189099450828383830988099350505050935093915050565b5f5f825f036109ec57505f9050806106fa565b60405160208152602080820152602060408201528560608201528460808201528360a082015260205f60c08360055afa9250505f519050935093915050565b634e487b715f52806020526024601cfd5b6040518061020001604052806010905b610a6d60405180606001604052805f81526020015f81526020015f81525090565b815260200190600190039081610a4c5790505090565b5f5f83601f840112610a93575f5ffd5b50813567ffffffffffffffff811115610aaa575f5ffd5b602083019150836020828501011115610ac1575f5ffd5b9250929050565b5f5f5f5f5f60608688031215610adc575f5ffd5b853567ffffffffffffffff811115610af2575f5ffd5b610afe88828901610a83565b90965094505060208601359250604086013567ffffffffffffffff811115610b24575f5ffd5b610b3088828901610a83565b969995985093965092949392505050565b5f5f85851115610b4f575f5ffd5b83861115610b5b575f5ffd5b5050820193919092039150565b80356020831015610332575f19602084900360031b1b1692915050565b5f82610b9f57634e487b7160e01b5f52601260045260245ffd5b500690565b634e487b7160e01b5f52603260045260245ffdfeffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551a2646970667358221220177bea9903f0dc492f7c39f7bbc238b4ba50395f665d183d5322da089dd184ec64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913RSAVerifier.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913RSAVerifier.json new file mode 100644 index 00000000..04a1faeb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913RSAVerifier.json @@ -0,0 +1,40 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7913RSAVerifier", + "sourceName": "contracts/utils/cryptography/verifiers/ERC7913RSAVerifier.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "key", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b506107128061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063024ad3181461002d575b5f5ffd5b61004061003b3660046104b9565b61005d565b6040516001600160e01b0319909116815260200160405180910390f35b5f808061006c878901896105d1565b915091506100cd8660405160200161008691815260200190565b60408051601f198184030181526020601f8901819004810284018101909252878352919088908890819084018382808284375f920191909152508792508691506100f39050565b6100df576001600160e01b03196100e7565b62495a6360e31b5b98975050505050505050565b5f61014d600286604051610107919061064d565b602060405180830381855afa158015610122573d5f5f3e3d5ffd5b5050506040513d601f19601f820116820180604052508101906101459190610658565b858585610158565b90505b949350505050565b80515f9061010081108061016d575084518114155b1561017b575f915050610150565b5f5b818110156101f2575f610193826020850361033c565b90505f6101a38883016020015190565b90505f6101b38784016020015190565b9050808210156101c5575050506101f2565b808211806101d557506020850383145b156101e7575f95505050505050610150565b50505060200161017d565b505f6101ff868686610350565b90505f5f5f6102148460328703016020015190565b6001600160f81b031916603160f81b036102595750720181898068304b0432400b281820100828002160651b91506bffffffffffffffffffffffff19905060346102b3565b600f1985850101516001600160f81b031916602f60f81b036102a65750700181798058304b0432400b28182010082160751b91506dffffffffffffffffffffffffffff19905060326102b3565b5f95505050505050610150565b80850360025b818110156102f057602081870101516001600160f81b0319908116146102e8575f975050505050505050610150565b6001016102b9565b5060208501516001600160f01b031916600160f01b14801561031f57508261031b8683016020015190565b1684145b801561032d5750858501518b145b9b9a5050505050505050505050565b5f8282188284100282185b90505b92915050565b60605f5f61035f86868661037b565b91509150816103725761037260126103f2565b95945050505050565b5f606061038783610403565b156103a2575050604080515f808252602082019092526103ea565b8251855185516040516103c192919084908a908a908a9060200161066f565b604051602081830303815290604052915060208201818184518360055afa828452910160405291505b935093915050565b634e487b715f52806020526024601cfd5b5f80805b835181101561046a5780602085010151915061043c81602061042991906106b2565b85515f8082840384811115908102610372565b6104479060086106c5565b82901c1561045857505f9392505050565b6104636020826106b2565b9050610407565b5060019392505050565b5f5f83601f840112610484575f5ffd5b50813567ffffffffffffffff81111561049b575f5ffd5b6020830191508360208285010111156104b2575f5ffd5b9250929050565b5f5f5f5f5f606086880312156104cd575f5ffd5b853567ffffffffffffffff8111156104e3575f5ffd5b6104ef88828901610474565b90965094505060208601359250604086013567ffffffffffffffff811115610515575f5ffd5b61052188828901610474565b969995985093965092949392505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112610555575f5ffd5b813567ffffffffffffffff81111561056f5761056f610532565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561059e5761059e610532565b6040528181528382016020018510156105b5575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f604083850312156105e2575f5ffd5b823567ffffffffffffffff8111156105f8575f5ffd5b61060485828601610546565b925050602083013567ffffffffffffffff811115610620575f5ffd5b61062c85828601610546565b9150509250929050565b5f81518060208401855e5f93019283525090919050565b5f6103478284610636565b5f60208284031215610668575f5ffd5b5051919050565b8681528560208201528460408201525f6100e76106986106926060850188610636565b86610636565b84610636565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561034a5761034a61069e565b808202811582820484141761034a5761034a61069e56fea264697066735822122077396f9216a8bccf3144c91442c82d6f0c328d9c758fa1d9b18f5dd9ee16132964736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063024ad3181461002d575b5f5ffd5b61004061003b3660046104b9565b61005d565b6040516001600160e01b0319909116815260200160405180910390f35b5f808061006c878901896105d1565b915091506100cd8660405160200161008691815260200190565b60408051601f198184030181526020601f8901819004810284018101909252878352919088908890819084018382808284375f920191909152508792508691506100f39050565b6100df576001600160e01b03196100e7565b62495a6360e31b5b98975050505050505050565b5f61014d600286604051610107919061064d565b602060405180830381855afa158015610122573d5f5f3e3d5ffd5b5050506040513d601f19601f820116820180604052508101906101459190610658565b858585610158565b90505b949350505050565b80515f9061010081108061016d575084518114155b1561017b575f915050610150565b5f5b818110156101f2575f610193826020850361033c565b90505f6101a38883016020015190565b90505f6101b38784016020015190565b9050808210156101c5575050506101f2565b808211806101d557506020850383145b156101e7575f95505050505050610150565b50505060200161017d565b505f6101ff868686610350565b90505f5f5f6102148460328703016020015190565b6001600160f81b031916603160f81b036102595750720181898068304b0432400b281820100828002160651b91506bffffffffffffffffffffffff19905060346102b3565b600f1985850101516001600160f81b031916602f60f81b036102a65750700181798058304b0432400b28182010082160751b91506dffffffffffffffffffffffffffff19905060326102b3565b5f95505050505050610150565b80850360025b818110156102f057602081870101516001600160f81b0319908116146102e8575f975050505050505050610150565b6001016102b9565b5060208501516001600160f01b031916600160f01b14801561031f57508261031b8683016020015190565b1684145b801561032d5750858501518b145b9b9a5050505050505050505050565b5f8282188284100282185b90505b92915050565b60605f5f61035f86868661037b565b91509150816103725761037260126103f2565b95945050505050565b5f606061038783610403565b156103a2575050604080515f808252602082019092526103ea565b8251855185516040516103c192919084908a908a908a9060200161066f565b604051602081830303815290604052915060208201818184518360055afa828452910160405291505b935093915050565b634e487b715f52806020526024601cfd5b5f80805b835181101561046a5780602085010151915061043c81602061042991906106b2565b85515f8082840384811115908102610372565b6104479060086106c5565b82901c1561045857505f9392505050565b6104636020826106b2565b9050610407565b5060019392505050565b5f5f83601f840112610484575f5ffd5b50813567ffffffffffffffff81111561049b575f5ffd5b6020830191508360208285010111156104b2575f5ffd5b9250929050565b5f5f5f5f5f606086880312156104cd575f5ffd5b853567ffffffffffffffff8111156104e3575f5ffd5b6104ef88828901610474565b90965094505060208601359250604086013567ffffffffffffffff811115610515575f5ffd5b61052188828901610474565b969995985093965092949392505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112610555575f5ffd5b813567ffffffffffffffff81111561056f5761056f610532565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561059e5761059e610532565b6040528181528382016020018510156105b5575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f604083850312156105e2575f5ffd5b823567ffffffffffffffff8111156105f8575f5ffd5b61060485828601610546565b925050602083013567ffffffffffffffff811115610620575f5ffd5b61062c85828601610546565b9150509250929050565b5f81518060208401855e5f93019283525090919050565b5f6103478284610636565b5f60208284031215610668575f5ffd5b5051919050565b8681528560208201528460408201525f6100e76106986106926060850188610636565b86610636565b84610636565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561034a5761034a61069e565b808202811582820484141761034a5761034a61069e56fea264697066735822122077396f9216a8bccf3144c91442c82d6f0c328d9c758fa1d9b18f5dd9ee16132964736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913WebAuthnVerifier.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913WebAuthnVerifier.json new file mode 100644 index 00000000..0fb95f51 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ERC7913WebAuthnVerifier.json @@ -0,0 +1,40 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7913WebAuthnVerifier", + "sourceName": "contracts/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "key", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5061141e8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063024ad3181461002d575b5f5ffd5b61004061003b366004611085565b61005d565b6040516001600160e01b0319909116815260200160405180910390f35b5f5f3661006a858561010b565b9150915081801561007b5750604087145b80156100e357506100e38660405160200161009891815260200190565b604051602081830303815290604052826100b1906111cc565b6100be60205f8c8e611262565b6100c791611289565b6100d5604060208d8f611262565b6100de91611289565b610208565b6100f5576001600160e01b03196100fd565b62495a6360e31b5b925050505b95945050505050565b5f8260c083101561011e575f9150610201565b5f61012c8460808188611262565b61013591611289565b90505f6101458560a08189611262565b61014e91611289565b90508161015c6020876112ba565b108061017157508061016f6020876112ba565b105b15610180575f93505050610201565b5f61018d8684818a611262565b61019691611289565b90505f6101a58784818b611262565b6101ae91611289565b90508160206101bd868a6112ba565b6101c791906112ba565b10806101e757508060206101db858a6112ba565b6101e591906112ba565b105b156101f8575f955050505050610201565b60019550505050505b9250929050565b5f6101028585858560015f602485608001515111801561026e575061026e8560a0015186606001518181016020015191516014909101106affffffffffffffffffffff199190911674113a3cb832911d113bb2b130baba34371733b2ba1160591b141690565b801561028857506102888560a0015186604001518861040d565b80156102ba57506102ba85608001516020815181106102a9576102a96112cd565b0160200151600160f81b9081161490565b80156102f457508115806102f457506102f485608001516020815181106102e3576102e36112cd565b0160200151600160fa1b9081161490565b801561032957506103298560800151602081518110610315576103156112cd565b01602001516001600160f81b03191661045b565b801561040357506104036002866080015160028860a0015160405161034e91906112f8565b602060405180830381855afa158015610369573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061038c9190611303565b60405160200161039d92919061131a565b60408051601f19818403018152908290526103b7916112f8565b602060405180830381855afa1580156103d2573d5f5f3e3d5ffd5b5050506040513d601f19601f820116820180604052508101906103f59190611303565b86516020880151878761047a565b9695505050505050565b5f5f610418836104b0565b6040516020016104289190611332565b60405160208183030381529060405290505f61044f868661044a8886516104bd565b6104d5565b90506104038183610556565b5f600160fb1b82811614806104745750600160fc1b8216155b92915050565b5f5f5f61048a8888888888610568565b91509150806104a5576104a08888888888610643565b6100fd565b509695505050505050565b60606104748260016106f3565b5f828201838110159081025f19808218830218610102565b60606104e2828551610872565b91506104ee8383610872565b92505f6104fb84846112ba565b67ffffffffffffffff811115610513576105136110fe565b6040519080825280601f01601f19166020018201604052801561053d576020820181803683370190505b509050838303846020870101602083015e949350505050565b5f6105618383610881565b9392505050565b5f5f61057486866108a5565b1580610587575061058584846108fc565b155b1561059757505f90506001610639565b6105a48787878787610960565b156105b457506001905080610639565b6106237fbb5a52f42f9c9261ed4361f59422a1e30036e7c32b270c8807a419feca605023600560017fa71af64de5126a4a4e02b7922d66ce9415ce88a4c9d25514d91082c8725ac9577f5d47723c8fbe580bb369fec9c2665d8e30a435b9932645482e7c9f11e872296b610960565b1561063357505f90506001610639565b505f9050805b9550959350505050565b5f61064e85856108a5565b1580610661575061065f83836108fc565b155b1561066d57505f610102565b5f61067884846109a0565b90505f610692865f5160206113c95f395f51905f52610b93565b90505f5f5160206113c95f395f51905f52828a0990505f5f5160206113c95f395f51905f52838a0990505f6106c8858484610ba2565b509050896106e35f5160206113c95f395f51905f5283611378565b149b9a5050505050505050505050565b606082515f03610711575060408051602081019091525f8152610474565b5f8261074157600384516002610727919061138b565b610731919061139e565b61073c9060046113b1565b610766565b60038451600461075191906113b1565b61075c90600261138b565b610766919061139e565b905060405191507f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f5261067083027f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f18603f526020820181810185865187016020810180515f82525b82841015610824576003840193508351603f8160121c16518753600187019650603f81600c1c16518753600187019650603f8160061c16518753600187019650603f8116518753506001860195506107d1565b90525085905061086557600386510660018114610848576002811461085b57610863565b603d6001840353603d6002840353610863565b603d60018403535b505b9183525060405292915050565b5f828218828410028218610561565b5f815183511480156105615750508051602091820120825192909101919091201490565b5f82158015906108c157505f5160206113c95f395f51905f5283105b80156108cc57508115155b80156105615750507f7fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e3192a81015919050565b5f600160601b63ffffffff60c01b031980838409817f5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b8387856003600160601b0363ffffffff60c01b0319878b8c0908090894821191909310169190921416919050565b5f6040518681528560208201528460408201528360608201528260808201525f5f5260205f60a0836101005afa61099357fe5b50505f5195945050505050565b6109a8611000565b60405180606001604052805f81526020015f81526020015f815250815f601081106109d5576109d56112cd565b60200201819052506040518060600160405280848152602001838152602001600181525081600160108110610a0c57610a0c6112cd565b602002018190525060405180606001604052807f6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c29681526020017f4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f58152602001600181525081600460108110610a8357610a836112cd565b6020020152610a998160015b6020020151610cc6565b6040820152610aa9816004610a8f565b6101008201526020810151610ac6908260025b6020020151610d22565b6060820152610adf8160015b6020020151826004610abc565b60a0820152610aef816002610ad2565b60c0820152610aff816003610ad2565b60e0820152610b188160015b6020020151826008610abc565b610120820152610b29816002610b0b565b610140820152610b3a816003610b0b565b610160820152610b4b816004610b0b565b610180820152610b658160015b602002015182600c610abc565b6101a0820152610b76816002610b58565b6101c0820152610b87816003610b58565b6101e082015292915050565b5f610561836002840384610d80565b5f80808080805b6080811015610caa578115610bdd57610bc3848484610da1565b91955093509150610bd5848484610da1565b919550935091505b600c60fc89901c1660fe88901c17898160108110610bfd57610bfd6112cd565b60200201516040015115610c9657825f03610c6c57898160108110610c2457610c246112cd565b6020020151518a8260108110610c3c57610c3c6112cd565b6020020151602001518b8360108110610c5757610c576112cd565b60200201516040015191965094509250610c96565b610c8e8a8260108110610c8157610c816112cd565b6020020151868686610e24565b919650945092505b50600297881b979690961b95600101610ba9565b50610cb6838383610f50565b945094505050505b935093915050565b610ce760405180606001604052805f81526020015f81526020015f81525090565b5f5f5f610d00855f015186602001518760400151610da1565b6040805160608101825293845260208401929092529082015295945050505050565b610d4360405180606001604052805f81526020015f81526020015f81525090565b5f5f5f610d5d86865f015187602001518860400151610e24565b604080516060810182529384526020840192909252908201529695505050505050565b5f5f5f610d8e868686610f9d565b9150915081610102576101026012610fef565b5f5f5f600160601b63ffffffff60c01b031980868709818687098283848384096003600160601b0363ffffffff60c01b03190984858c8d096003090890508283838b09600409838482600209850385848509089650838485858609600809850385868a880385088509089550505050808186880960020991505093509350939050565b5f5f5f600160601b63ffffffff60c01b0319604088015181818209828388858a8b090960208c0151098381850385868686098c090884858a8b098d51098581870387868f0908935081158415168015610e845760018114610eca57610f3f565b868586098788898386096002098903898a848a098b038b88890908089a5087888983890987098903898a8e8c038c8689090887090899505086878c880986099750610f3f565b8c8c8c898283098a8283098b8c8d8384096003600160601b0363ffffffff60c01b0319098d8e8889096003090890508b8c83870960040994508b8c866002098d038d838409089e508b8c8384096008098c0391508b8f8d03860894508b828d878409089d505050898a8284096002099a505050505b505050505050509450945094915050565b5f5f825f03610f6357505f905080610cbe565b600160601b63ffffffff60c01b03195f610f7d8583610b93565b905081818209828189099450828383830988099350505050935093915050565b5f5f825f03610fb057505f905080610cbe565b60405160208152602080820152602060408201528560608201528460808201528360a082015260205f60c08360055afa9250505f519050935093915050565b634e487b715f52806020526024601cfd5b6040518061020001604052806010905b61103160405180606001604052805f81526020015f81526020015f81525090565b8152602001906001900390816110105790505090565b5f5f83601f840112611057575f5ffd5b50813567ffffffffffffffff81111561106e575f5ffd5b602083019150836020828501011115610201575f5ffd5b5f5f5f5f5f60608688031215611099575f5ffd5b853567ffffffffffffffff8111156110af575f5ffd5b6110bb88828901611047565b90965094505060208601359250604086013567ffffffffffffffff8111156110e1575f5ffd5b6110ed88828901611047565b969995985093965092949392505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715611135576111356110fe565b60405290565b5f82601f83011261114a575f5ffd5b8135602083015f5f67ffffffffffffffff84111561116a5761116a6110fe565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff82111715611199576111996110fe565b6040528381529050808284018710156111b0575f5ffd5b838360208301375f602085830101528094505050505092915050565b5f60c082360312156111dc575f5ffd5b6111e4611112565b82358152602080840135908201526040808401359082015260608084013590820152608083013567ffffffffffffffff81111561121f575f5ffd5b61122b3682860161113b565b60808301525060a083013567ffffffffffffffff81111561124a575f5ffd5b6112563682860161113b565b60a08301525092915050565b5f5f85851115611270575f5ffd5b8386111561127c575f5ffd5b5050820193919092039150565b80356020831015610474575f19602084900360031b1b1692915050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610474576104746112a6565b634e487b7160e01b5f52603260045260245ffd5b5f81518060208401855e5f93019283525090919050565b5f61056182846112e1565b5f60208284031215611313575f5ffd5b5051919050565b5f61132582856112e1565b9283525050602001919050565b6c1131b430b63632b733b2911d1160991b81525f611353600d8301846112e1565b601160f91b81526001019392505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261138657611386611364565b500690565b80820180821115610474576104746112a6565b5f826113ac576113ac611364565b500490565b8082028115828204841417610474576104746112a656feffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551a2646970667358221220706f6c522a2d6d87c0084245a121b056a29e28cfb62ae3e607f31bdf82fa9ecc64736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063024ad3181461002d575b5f5ffd5b61004061003b366004611085565b61005d565b6040516001600160e01b0319909116815260200160405180910390f35b5f5f3661006a858561010b565b9150915081801561007b5750604087145b80156100e357506100e38660405160200161009891815260200190565b604051602081830303815290604052826100b1906111cc565b6100be60205f8c8e611262565b6100c791611289565b6100d5604060208d8f611262565b6100de91611289565b610208565b6100f5576001600160e01b03196100fd565b62495a6360e31b5b925050505b95945050505050565b5f8260c083101561011e575f9150610201565b5f61012c8460808188611262565b61013591611289565b90505f6101458560a08189611262565b61014e91611289565b90508161015c6020876112ba565b108061017157508061016f6020876112ba565b105b15610180575f93505050610201565b5f61018d8684818a611262565b61019691611289565b90505f6101a58784818b611262565b6101ae91611289565b90508160206101bd868a6112ba565b6101c791906112ba565b10806101e757508060206101db858a6112ba565b6101e591906112ba565b105b156101f8575f955050505050610201565b60019550505050505b9250929050565b5f6101028585858560015f602485608001515111801561026e575061026e8560a0015186606001518181016020015191516014909101106affffffffffffffffffffff199190911674113a3cb832911d113bb2b130baba34371733b2ba1160591b141690565b801561028857506102888560a0015186604001518861040d565b80156102ba57506102ba85608001516020815181106102a9576102a96112cd565b0160200151600160f81b9081161490565b80156102f457508115806102f457506102f485608001516020815181106102e3576102e36112cd565b0160200151600160fa1b9081161490565b801561032957506103298560800151602081518110610315576103156112cd565b01602001516001600160f81b03191661045b565b801561040357506104036002866080015160028860a0015160405161034e91906112f8565b602060405180830381855afa158015610369573d5f5f3e3d5ffd5b5050506040513d601f19601f8201168201806040525081019061038c9190611303565b60405160200161039d92919061131a565b60408051601f19818403018152908290526103b7916112f8565b602060405180830381855afa1580156103d2573d5f5f3e3d5ffd5b5050506040513d601f19601f820116820180604052508101906103f59190611303565b86516020880151878761047a565b9695505050505050565b5f5f610418836104b0565b6040516020016104289190611332565b60405160208183030381529060405290505f61044f868661044a8886516104bd565b6104d5565b90506104038183610556565b5f600160fb1b82811614806104745750600160fc1b8216155b92915050565b5f5f5f61048a8888888888610568565b91509150806104a5576104a08888888888610643565b6100fd565b509695505050505050565b60606104748260016106f3565b5f828201838110159081025f19808218830218610102565b60606104e2828551610872565b91506104ee8383610872565b92505f6104fb84846112ba565b67ffffffffffffffff811115610513576105136110fe565b6040519080825280601f01601f19166020018201604052801561053d576020820181803683370190505b509050838303846020870101602083015e949350505050565b5f6105618383610881565b9392505050565b5f5f61057486866108a5565b1580610587575061058584846108fc565b155b1561059757505f90506001610639565b6105a48787878787610960565b156105b457506001905080610639565b6106237fbb5a52f42f9c9261ed4361f59422a1e30036e7c32b270c8807a419feca605023600560017fa71af64de5126a4a4e02b7922d66ce9415ce88a4c9d25514d91082c8725ac9577f5d47723c8fbe580bb369fec9c2665d8e30a435b9932645482e7c9f11e872296b610960565b1561063357505f90506001610639565b505f9050805b9550959350505050565b5f61064e85856108a5565b1580610661575061065f83836108fc565b155b1561066d57505f610102565b5f61067884846109a0565b90505f610692865f5160206113c95f395f51905f52610b93565b90505f5f5160206113c95f395f51905f52828a0990505f5f5160206113c95f395f51905f52838a0990505f6106c8858484610ba2565b509050896106e35f5160206113c95f395f51905f5283611378565b149b9a5050505050505050505050565b606082515f03610711575060408051602081019091525f8152610474565b5f8261074157600384516002610727919061138b565b610731919061139e565b61073c9060046113b1565b610766565b60038451600461075191906113b1565b61075c90600261138b565b610766919061139e565b905060405191507f4142434445464748494a4b4c4d4e4f505152535455565758595a616263646566601f5261067083027f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f18603f526020820181810185865187016020810180515f82525b82841015610824576003840193508351603f8160121c16518753600187019650603f81600c1c16518753600187019650603f8160061c16518753600187019650603f8116518753506001860195506107d1565b90525085905061086557600386510660018114610848576002811461085b57610863565b603d6001840353603d6002840353610863565b603d60018403535b505b9183525060405292915050565b5f828218828410028218610561565b5f815183511480156105615750508051602091820120825192909101919091201490565b5f82158015906108c157505f5160206113c95f395f51905f5283105b80156108cc57508115155b80156105615750507f7fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e3192a81015919050565b5f600160601b63ffffffff60c01b031980838409817f5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b8387856003600160601b0363ffffffff60c01b0319878b8c0908090894821191909310169190921416919050565b5f6040518681528560208201528460408201528360608201528260808201525f5f5260205f60a0836101005afa61099357fe5b50505f5195945050505050565b6109a8611000565b60405180606001604052805f81526020015f81526020015f815250815f601081106109d5576109d56112cd565b60200201819052506040518060600160405280848152602001838152602001600181525081600160108110610a0c57610a0c6112cd565b602002018190525060405180606001604052807f6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c29681526020017f4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f58152602001600181525081600460108110610a8357610a836112cd565b6020020152610a998160015b6020020151610cc6565b6040820152610aa9816004610a8f565b6101008201526020810151610ac6908260025b6020020151610d22565b6060820152610adf8160015b6020020151826004610abc565b60a0820152610aef816002610ad2565b60c0820152610aff816003610ad2565b60e0820152610b188160015b6020020151826008610abc565b610120820152610b29816002610b0b565b610140820152610b3a816003610b0b565b610160820152610b4b816004610b0b565b610180820152610b658160015b602002015182600c610abc565b6101a0820152610b76816002610b58565b6101c0820152610b87816003610b58565b6101e082015292915050565b5f610561836002840384610d80565b5f80808080805b6080811015610caa578115610bdd57610bc3848484610da1565b91955093509150610bd5848484610da1565b919550935091505b600c60fc89901c1660fe88901c17898160108110610bfd57610bfd6112cd565b60200201516040015115610c9657825f03610c6c57898160108110610c2457610c246112cd565b6020020151518a8260108110610c3c57610c3c6112cd565b6020020151602001518b8360108110610c5757610c576112cd565b60200201516040015191965094509250610c96565b610c8e8a8260108110610c8157610c816112cd565b6020020151868686610e24565b919650945092505b50600297881b979690961b95600101610ba9565b50610cb6838383610f50565b945094505050505b935093915050565b610ce760405180606001604052805f81526020015f81526020015f81525090565b5f5f5f610d00855f015186602001518760400151610da1565b6040805160608101825293845260208401929092529082015295945050505050565b610d4360405180606001604052805f81526020015f81526020015f81525090565b5f5f5f610d5d86865f015187602001518860400151610e24565b604080516060810182529384526020840192909252908201529695505050505050565b5f5f5f610d8e868686610f9d565b9150915081610102576101026012610fef565b5f5f5f600160601b63ffffffff60c01b031980868709818687098283848384096003600160601b0363ffffffff60c01b03190984858c8d096003090890508283838b09600409838482600209850385848509089650838485858609600809850385868a880385088509089550505050808186880960020991505093509350939050565b5f5f5f600160601b63ffffffff60c01b0319604088015181818209828388858a8b090960208c0151098381850385868686098c090884858a8b098d51098581870387868f0908935081158415168015610e845760018114610eca57610f3f565b868586098788898386096002098903898a848a098b038b88890908089a5087888983890987098903898a8e8c038c8689090887090899505086878c880986099750610f3f565b8c8c8c898283098a8283098b8c8d8384096003600160601b0363ffffffff60c01b0319098d8e8889096003090890508b8c83870960040994508b8c866002098d038d838409089e508b8c8384096008098c0391508b8f8d03860894508b828d878409089d505050898a8284096002099a505050505b505050505050509450945094915050565b5f5f825f03610f6357505f905080610cbe565b600160601b63ffffffff60c01b03195f610f7d8583610b93565b905081818209828189099450828383830988099350505050935093915050565b5f5f825f03610fb057505f905080610cbe565b60405160208152602080820152602060408201528560608201528460808201528360a082015260205f60c08360055afa9250505f519050935093915050565b634e487b715f52806020526024601cfd5b6040518061020001604052806010905b61103160405180606001604052805f81526020015f81526020015f81525090565b8152602001906001900390816110105790505090565b5f5f83601f840112611057575f5ffd5b50813567ffffffffffffffff81111561106e575f5ffd5b602083019150836020828501011115610201575f5ffd5b5f5f5f5f5f60608688031215611099575f5ffd5b853567ffffffffffffffff8111156110af575f5ffd5b6110bb88828901611047565b90965094505060208601359250604086013567ffffffffffffffff8111156110e1575f5ffd5b6110ed88828901611047565b969995985093965092949392505050565b634e487b7160e01b5f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715611135576111356110fe565b60405290565b5f82601f83011261114a575f5ffd5b8135602083015f5f67ffffffffffffffff84111561116a5761116a6110fe565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff82111715611199576111996110fe565b6040528381529050808284018710156111b0575f5ffd5b838360208301375f602085830101528094505050505092915050565b5f60c082360312156111dc575f5ffd5b6111e4611112565b82358152602080840135908201526040808401359082015260608084013590820152608083013567ffffffffffffffff81111561121f575f5ffd5b61122b3682860161113b565b60808301525060a083013567ffffffffffffffff81111561124a575f5ffd5b6112563682860161113b565b60a08301525092915050565b5f5f85851115611270575f5ffd5b8386111561127c575f5ffd5b5050820193919092039150565b80356020831015610474575f19602084900360031b1b1692915050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610474576104746112a6565b634e487b7160e01b5f52603260045260245ffd5b5f81518060208401855e5f93019283525090919050565b5f61056182846112e1565b5f60208284031215611313575f5ffd5b5051919050565b5f61132582856112e1565b9283525050602001919050565b6c1131b430b63632b733b2911d1160991b81525f611353600d8301846112e1565b601160f91b81526001019392505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261138657611386611364565b500690565b80820180821115610474576104746112a6565b5f826113ac576113ac611364565b500490565b8082028115828204841417610474576104746112a656feffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551a2646970667358221220706f6c522a2d6d87c0084245a121b056a29e28cfb62ae3e607f31bdf82fa9ecc64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableMap.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableMap.json new file mode 100644 index 00000000..a70fe61d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableMap.json @@ -0,0 +1,33 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EnumerableMap", + "sourceName": "contracts/utils/structs/EnumerableMap.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "key", + "type": "bytes" + } + ], + "name": "EnumerableMapNonexistentBytesKey", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "EnumerableMapNonexistentKey", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d3434fa572572660ccf19e9fecb8d379816a66cb22c037db55609427fc1f3c7464736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d3434fa572572660ccf19e9fecb8d379816a66cb22c037db55609427fc1f3c7464736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableSet.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableSet.json new file mode 100644 index 00000000..7cb59ef3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/EnumerableSet.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "EnumerableSet", + "sourceName": "contracts/utils/structs/EnumerableSet.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201ec280238ccbdfe647587f1f22482e158e52271c03e4f1387b05a932bf4ead8a64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201ec280238ccbdfe647587f1f22482e158e52271c03e4f1387b05a932bf4ead8a64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Errors.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Errors.json new file mode 100644 index 00000000..116542c8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Errors.json @@ -0,0 +1,48 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Errors", + "sourceName": "contracts/utils/Errors.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "FailedDeployment", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "MissingPrecompile", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122048594ab5c5ed0cca64258cf646fa7049e4dd9061de113d951d5fadc20a23176064736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122048594ab5c5ed0cca64258cf646fa7049e4dd9061de113d951d5fadc20a23176064736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Governor.json similarity index 88% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Governor.json index feb7ad91..0925fc70 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorCompatibilityBravo.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Governor.json @@ -1,11 +1,214 @@ { "_format": "hh-sol-artifact-1", - "contractName": "GovernorCompatibilityBravo", - "sourceName": "contracts/governance/compatibility/GovernorCompatibilityBravo.sol", + "contractName": "Governor", + "sourceName": "contracts/governance/Governor.sol", "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", "type": "error" }, { @@ -13,6 +216,22 @@ "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -129,7 +348,7 @@ { "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "etaSeconds", "type": "uint256" } ], @@ -252,7 +471,7 @@ "type": "string" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { @@ -268,19 +487,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -352,19 +558,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -453,6 +654,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -464,19 +670,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -582,27 +778,6 @@ }, { "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getActions", - "outputs": [ { "internalType": "address[]", "name": "targets", @@ -613,56 +788,23 @@ "name": "values", "type": "uint256[]" }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, { "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" }, { - "internalType": "address", - "name": "voter", - "type": "address" + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" } ], - "name": "getReceipt", + "name": "getProposalId", "outputs": [ { - "components": [ - { - "internalType": "bool", - "name": "hasVoted", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "internalType": "struct IGovernorCompatibilityBravo.Receipt", + "internalType": "uint256", "name": "", - "type": "tuple" + "type": "uint256" } ], "stateMutability": "view", @@ -792,6 +934,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -946,16 +1107,16 @@ "inputs": [ { "internalType": "uint256", - "name": "proposalId", + "name": "", "type": "uint256" } ], - "name": "proposalProposer", + "name": "proposalNeedsQueuing", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", @@ -969,25 +1130,12 @@ "type": "uint256" } ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", + "name": "proposalProposer", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -1001,86 +1149,20 @@ "type": "uint256" } ], - "name": "proposals", + "name": "proposalSnapshot", "outputs": [ { "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "abstainVotes", + "name": "", "type": "uint256" - }, - { - "internalType": "bool", - "name": "canceled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", + "inputs": [], + "name": "proposalThreshold", "outputs": [ { "internalType": "uint256", @@ -1088,7 +1170,7 @@ "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -1103,11 +1185,6 @@ "name": "values", "type": "uint256[]" }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, { "internalType": "bytes[]", "name": "calldatas", @@ -1157,23 +1234,10 @@ "outputs": [ { "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", + "name": "", "type": "uint256" } ], - "name": "queue", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -1196,19 +1260,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "quorumVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -1270,19 +1321,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "timelock", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "version", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingFractional.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingFractional.json new file mode 100644 index 00000000..b1f0de3a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingFractional.json @@ -0,0 +1,1446 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingFractional", + "sourceName": "contracts/governance/extensions/GovernorCountingFractional.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "usedVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingWeight", + "type": "uint256" + } + ], + "name": "GovernorExceedRemainingWeight", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "usedVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingOverridable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingOverridable.json new file mode 100644 index 00000000..56c0e83a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingOverridable.json @@ -0,0 +1,1598 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingOverridable", + "sourceName": "contracts/governance/extensions/GovernorCountingOverridable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorAlreadyOverriddenVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "OverrideVoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "VoteReduced", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OVERRIDE_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castOverrideVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castOverrideVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVotedOverride", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingSimple.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingSimple.json new file mode 100644 index 00000000..f5c5c2fe --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorCountingSimple.json @@ -0,0 +1,1401 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingSimple", + "sourceName": "contracts/governance/extensions/GovernorCountingSimple.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorNoncesKeyed.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorNoncesKeyed.json new file mode 100644 index 00000000..82ca96e9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorNoncesKeyed.json @@ -0,0 +1,1396 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorNoncesKeyed", + "sourceName": "contracts/governance/extensions/GovernorNoncesKeyed.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorPreventLateQuorum.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorPreventLateQuorum.json similarity index 74% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorPreventLateQuorum.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorPreventLateQuorum.json index dbbc893e..1cbb4fd1 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorPreventLateQuorum.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorPreventLateQuorum.json @@ -5,7 +5,210 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", "type": "error" }, { @@ -13,6 +216,22 @@ "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -155,6 +374,25 @@ "name": "ProposalExtended", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -358,19 +596,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -459,6 +692,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -470,19 +708,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -586,6 +814,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -702,9 +964,9 @@ "name": "lateQuorumVoteExtension", "outputs": [ { - "internalType": "uint64", + "internalType": "uint48", "name": "", - "type": "uint64" + "type": "uint48" } ], "stateMutability": "view", @@ -723,6 +985,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -854,6 +1135,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -939,6 +1258,40 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -984,9 +1337,9 @@ { "inputs": [ { - "internalType": "uint64", + "internalType": "uint48", "name": "newVoteExtension", - "type": "uint64" + "type": "uint48" } ], "name": "setLateQuorumVoteExtension", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorProposalGuardian.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorProposalGuardian.json new file mode 100644 index 00000000..153b1e05 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorProposalGuardian.json @@ -0,0 +1,1417 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorProposalGuardian", + "sourceName": "contracts/governance/extensions/GovernorProposalGuardian.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldProposalGuardian", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newProposalGuardian", + "type": "address" + } + ], + "name": "ProposalGuardianSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newProposalGuardian", + "type": "address" + } + ], + "name": "setProposalGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSequentialProposalId.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSequentialProposalId.json new file mode 100644 index 00000000..85ca25ab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSequentialProposalId.json @@ -0,0 +1,1390 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorSequentialProposalId", + "sourceName": "contracts/governance/extensions/GovernorSequentialProposalId.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorAlreadyInitializedLatestProposalId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "latestProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorSettings.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSettings.json similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorSettings.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSettings.json index aa6e2a95..9c5068b2 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorSettings.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSettings.json @@ -5,7 +5,210 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", "type": "error" }, { @@ -13,6 +216,22 @@ "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -117,6 +336,25 @@ "name": "ProposalExecuted", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -377,19 +615,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -478,6 +711,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -489,19 +727,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -605,6 +833,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -729,6 +991,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -860,6 +1141,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -945,6 +1264,40 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1003,9 +1356,9 @@ { "inputs": [ { - "internalType": "uint256", + "internalType": "uint48", "name": "newVotingDelay", - "type": "uint256" + "type": "uint48" } ], "name": "setVotingDelay", @@ -1016,9 +1369,9 @@ { "inputs": [ { - "internalType": "uint256", + "internalType": "uint32", "name": "newVotingPeriod", - "type": "uint256" + "type": "uint32" } ], "name": "setVotingPeriod", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorStorage.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorStorage.json new file mode 100644 index 00000000..2c229dd0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorStorage.json @@ -0,0 +1,1497 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorStorage", + "sourceName": "contracts/governance/extensions/GovernorStorage.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proposalCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDetails", + "outputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "proposalDetailsAt", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSuperQuorum.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSuperQuorum.json new file mode 100644 index 00000000..dfa180b8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorSuperQuorum.json @@ -0,0 +1,1420 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorSuperQuorum", + "sourceName": "contracts/governance/extensions/GovernorSuperQuorum.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "superQuorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockAccess.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockAccess.json new file mode 100644 index 00000000..a67165c9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockAccess.json @@ -0,0 +1,1573 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorTimelockAccess", + "sourceName": "contracts/governance/extensions/GovernorTimelockAccess.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorLockedIgnore", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actualNonce", + "type": "uint256" + } + ], + "name": "GovernorMismatchedNonce", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "neededTimestamp", + "type": "uint256" + } + ], + "name": "GovernorUnmetDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ignored", + "type": "bool" + } + ], + "name": "AccessManagerIgnoredSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "oldBaseDelaySeconds", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "newBaseDelaySeconds", + "type": "uint32" + } + ], + "name": "BaseDelaySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessManager", + "outputs": [ + { + "internalType": "contract IAccessManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseDelaySeconds", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "isAccessManagerIgnored", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalExecutionPlan", + "outputs": [ + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "internalType": "bool[]", + "name": "indirect", + "type": "bool[]" + }, + { + "internalType": "bool[]", + "name": "withDelay", + "type": "bool[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + }, + { + "internalType": "bool", + "name": "ignored", + "type": "bool" + } + ], + "name": "setAccessManagerIgnored", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "newBaseDelay", + "type": "uint32" + } + ], + "name": "setBaseDelaySeconds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockCompound.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockCompound.json similarity index 78% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockCompound.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockCompound.json index 653aa0e7..01eb92ea 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockCompound.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockCompound.json @@ -5,7 +5,226 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", "type": "error" }, { @@ -13,6 +232,22 @@ "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -129,7 +364,7 @@ { "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "etaSeconds", "type": "uint256" } ], @@ -365,19 +600,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -466,6 +696,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -477,19 +712,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -593,6 +818,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -717,6 +976,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -867,6 +1145,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockControl.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockControl.json similarity index 79% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockControl.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockControl.json index b1689789..4014f0ae 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorTimelockControl.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorTimelockControl.json @@ -5,7 +5,210 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", "type": "error" }, { @@ -13,6 +216,22 @@ "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -129,7 +348,7 @@ { "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "etaSeconds", "type": "uint256" } ], @@ -358,19 +577,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -459,6 +673,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -470,19 +689,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -586,6 +795,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -710,6 +953,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -860,6 +1122,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotes.json similarity index 77% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotes.json index d184ed13..02b7c87a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/GovernorVotesQuorumFraction.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotes.json @@ -1,11 +1,214 @@ { "_format": "hh-sol-artifact-1", - "contractName": "GovernorVotesQuorumFraction", - "sourceName": "contracts/governance/extensions/GovernorVotesQuorumFraction.sol", + "contractName": "GovernorVotes", + "sourceName": "contracts/governance/extensions/GovernorVotes.sol", "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", "type": "error" }, { @@ -13,6 +216,22 @@ "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -123,17 +342,17 @@ { "indexed": false, "internalType": "uint256", - "name": "oldQuorumNumerator", + "name": "proposalId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newQuorumNumerator", + "name": "etaSeconds", "type": "uint256" } ], - "name": "QuorumNumeratorUpdated", + "name": "ProposalQueued", "type": "event" }, { @@ -339,19 +558,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -440,6 +654,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -451,19 +670,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -567,6 +776,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -691,6 +934,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -822,6 +1084,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -910,25 +1210,27 @@ { "inputs": [ { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quorumDenominator", + "name": "queue", "outputs": [ { "internalType": "uint256", @@ -936,7 +1238,7 @@ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -947,20 +1249,7 @@ "type": "uint256" } ], - "name": "quorumNumerator", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quorumNumerator", + "name": "quorum", "outputs": [ { "internalType": "uint256", @@ -1045,19 +1334,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newQuorumNumerator", - "type": "uint256" - } - ], - "name": "updateQuorumNumerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "version", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesQuorumFraction.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesQuorumFraction.json new file mode 100644 index 00000000..4d221704 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesQuorumFraction.json @@ -0,0 +1,1483 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesQuorumFraction", + "sourceName": "contracts/governance/extensions/GovernorVotesQuorumFraction.sol", + "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quorumDenominator", + "type": "uint256" + } + ], + "name": "GovernorInvalidQuorumFraction", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumDenominator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesSuperQuorumFraction.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesSuperQuorumFraction.json new file mode 100644 index 00000000..e20bfeaa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/GovernorVotesSuperQuorumFraction.json @@ -0,0 +1,1643 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesSuperQuorumFraction", + "sourceName": "contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol", + "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quorumDenominator", + "type": "uint256" + } + ], + "name": "GovernorInvalidQuorumFraction", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "superQuorumNumerator", + "type": "uint256" + } + ], + "name": "GovernorInvalidQuorumTooLarge", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "superQuorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "GovernorInvalidSuperQuorumFraction", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "superQuorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + } + ], + "name": "GovernorInvalidSuperQuorumTooSmall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldSuperQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSuperQuorumNumerator", + "type": "uint256" + } + ], + "name": "SuperQuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumDenominator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "superQuorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "superQuorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "superQuorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSuperQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateSuperQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Hashes.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Hashes.json new file mode 100644 index 00000000..1dda3079 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Hashes.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Hashes", + "sourceName": "contracts/utils/cryptography/Hashes.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205079cc4d58cd4e0a984717986c677ec86747daef351b63cbe5234ce982909cca64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212205079cc4d58cd4e0a984717986c677ec86747daef351b63cbe5234ce982909cca64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Heap.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Heap.json new file mode 100644 index 00000000..5e05562d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Heap.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Heap", + "sourceName": "contracts/utils/structs/Heap.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220146224bb6e2e711b401c2395fbd5a1a06100147e673bd6f2be51037d23ab5ef064736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220146224bb6e2e711b401c2395fbd5a1a06100147e673bd6f2be51037d23ab5ef064736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControl.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControl.json similarity index 89% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControl.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControl.json index dc7348ca..053c7acb 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControl.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControl.json @@ -3,6 +3,27 @@ "contractName": "IAccessControl", "sourceName": "contracts/access/IAccessControl.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -148,7 +169,7 @@ }, { "internalType": "address", - "name": "account", + "name": "callerConfirmation", "type": "address" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlDefaultAdminRules.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControlDefaultAdminRules.json similarity index 87% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlDefaultAdminRules.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControlDefaultAdminRules.json index 14d57745..ccf48bb1 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlDefaultAdminRules.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControlDefaultAdminRules.json @@ -1,8 +1,56 @@ { "_format": "hh-sol-artifact-1", "contractName": "IAccessControlDefaultAdminRules", - "sourceName": "contracts/access/IAccessControlDefaultAdminRules.sol", + "sourceName": "contracts/access/extensions/IAccessControlDefaultAdminRules.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "name": "AccessControlEnforcedDefaultAdminDelay", + "type": "error" + }, + { + "inputs": [], + "name": "AccessControlEnforcedDefaultAdminRules", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "defaultAdmin", + "type": "address" + } + ], + "name": "AccessControlInvalidDefaultAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [], @@ -313,7 +361,7 @@ }, { "internalType": "address", - "name": "account", + "name": "callerConfirmation", "type": "address" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlEnumerable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControlEnumerable.json similarity index 89% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlEnumerable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControlEnumerable.json index 3a81d13d..a11f9cac 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IAccessControlEnumerable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessControlEnumerable.json @@ -1,8 +1,29 @@ { "_format": "hh-sol-artifact-1", "contractName": "IAccessControlEnumerable", - "sourceName": "contracts/access/IAccessControlEnumerable.sol", + "sourceName": "contracts/access/extensions/IAccessControlEnumerable.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -191,7 +212,7 @@ }, { "internalType": "address", - "name": "account", + "name": "callerConfirmation", "type": "address" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManaged.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManaged.json new file mode 100644 index 00000000..3691db30 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManaged.json @@ -0,0 +1,101 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessManaged", + "sourceName": "contracts/access/manager/IAccessManaged.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AccessManagedInvalidAuthority", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "name": "AccessManagedRequiredDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "AccessManagedUnauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isConsumingScheduledOp", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManager.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManager.json new file mode 100644 index 00000000..e0d18f70 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccessManager.json @@ -0,0 +1,1071 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccessManager", + "sourceName": "contracts/access/manager/IAccessManager.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerAlreadyScheduled", + "type": "error" + }, + { + "inputs": [], + "name": "AccessManagerBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerExpired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialAdmin", + "type": "address" + } + ], + "name": "AccessManagerInvalidInitialAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "AccessManagerLockedRole", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerNotReady", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerNotScheduled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgsender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "AccessManagerUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "AccessManagerUnauthorizedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgsender", + "type": "address" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "AccessManagerUnauthorizedCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AccessManagerUnauthorizedConsume", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "OperationCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "admin", + "type": "uint64" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + } + ], + "name": "RoleGrantDelayChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newMember", + "type": "bool" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "guardian", + "type": "uint64" + } + ], + "name": "RoleGuardianChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "RoleLabel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + } + ], + "name": "TargetAdminDelayUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "closed", + "type": "bool" + } + ], + "name": "TargetClosed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "TargetFunctionRoleUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "canCall", + "outputs": [ + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "consumeScheduledOp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "expiration", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccess", + "outputs": [ + { + "internalType": "uint48", + "name": "since", + "type": "uint48" + }, + { + "internalType": "uint32", + "name": "currentDelay", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "pendingDelay", + "type": "uint32" + }, + { + "internalType": "uint48", + "name": "effect", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleGrantDelay", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleGuardian", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getSchedule", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "getTargetAdminDelay", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getTargetFunctionRole", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "executionDelay", + "type": "uint32" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "isMember", + "type": "bool" + }, + { + "internalType": "uint32", + "name": "executionDelay", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "isTargetClosed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "labelRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "minSetback", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint48", + "name": "when", + "type": "uint48" + } + ], + "name": "schedule", + "outputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "newDelay", + "type": "uint32" + } + ], + "name": "setGrantDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "admin", + "type": "uint64" + } + ], + "name": "setRoleAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "guardian", + "type": "uint64" + } + ], + "name": "setRoleGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint32", + "name": "newDelay", + "type": "uint32" + } + ], + "name": "setTargetAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bool", + "name": "closed", + "type": "bool" + } + ], + "name": "setTargetClosed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + }, + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "setTargetFunctionRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "address", + "name": "newAuthority", + "type": "address" + } + ], + "name": "updateAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccount.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccount.json new file mode 100644 index 00000000..7133e434 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccount.json @@ -0,0 +1,87 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccount", + "sourceName": "contracts/interfaces/draft-IERC4337.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "validationData", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccountExecute.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccountExecute.json new file mode 100644 index 00000000..750f602d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAccountExecute.json @@ -0,0 +1,76 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAccountExecute", + "sourceName": "contracts/interfaces/draft-IERC4337.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + } + ], + "name": "executeUserOp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAggregator.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAggregator.json new file mode 100644 index 00000000..cc320ad2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAggregator.json @@ -0,0 +1,208 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IAggregator", + "sourceName": "contracts/interfaces/draft-IERC4337.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation[]", + "name": "userOps", + "type": "tuple[]" + } + ], + "name": "aggregateSignatures", + "outputs": [ + { + "internalType": "bytes", + "name": "aggregatesSignature", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation[]", + "name": "userOps", + "type": "tuple[]" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "validateSignatures", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + } + ], + "name": "validateUserOpSignature", + "outputs": [ + { + "internalType": "bytes", + "name": "sigForUserOp", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAuthority.json similarity index 52% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAuthority.json index b3934f4c..06983267 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363ReceiverUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IAuthority.json @@ -1,40 +1,35 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC1363ReceiverUpgradeable", - "sourceName": "contracts/interfaces/IERC1363ReceiverUpgradeable.sol", + "contractName": "IAuthority", + "sourceName": "contracts/access/manager/IAuthority.sol", "abi": [ { "inputs": [ { "internalType": "address", - "name": "operator", + "name": "caller", "type": "address" }, { "internalType": "address", - "name": "from", + "name": "target", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" } ], - "name": "onTransferReceived", + "name": "canCall", "outputs": [ { - "internalType": "bytes4", - "name": "", - "type": "bytes4" + "internalType": "bool", + "name": "allowed", + "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBeacon.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IBeacon.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBeacon.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IBeacon.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICompoundTimelock.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ICompoundTimelock.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICompoundTimelock.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ICompoundTimelock.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155.json similarity index 99% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155.json index 465dfffa..871f465a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155.json @@ -212,7 +212,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -245,7 +245,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155Errors.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155Errors.json new file mode 100644 index 00000000..a8fd8614 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155Errors.json @@ -0,0 +1,113 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC1155Errors", + "sourceName": "contracts/interfaces/draft-IERC6093.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155MetadataURI.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155MetadataURI.json similarity index 99% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155MetadataURI.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155MetadataURI.json index 130bd7a0..aaca2243 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155MetadataURI.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155MetadataURI.json @@ -212,7 +212,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -245,7 +245,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155Receiver.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155Receiver.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1155Receiver.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1155Receiver.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1271.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1271.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1271.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1271.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363.json similarity index 96% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363.json index caf5ad82..03df25ce 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363.json @@ -86,7 +86,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -110,7 +110,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -134,7 +134,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { @@ -214,7 +214,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -238,7 +238,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -262,7 +262,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { @@ -296,7 +296,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -325,7 +325,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { @@ -359,7 +359,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Receiver.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363Receiver.json similarity index 97% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Receiver.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363Receiver.json index 6ba8b114..13fac203 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Receiver.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363Receiver.json @@ -17,7 +17,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Spender.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363Spender.json similarity index 96% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Spender.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363Spender.json index 7be114c2..8d15a158 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1363Spender.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1363Spender.json @@ -12,7 +12,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC165.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC165.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC165.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC165.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Implementer.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1820Implementer.json similarity index 90% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Implementer.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1820Implementer.json index 8eb5f6f2..2f133187 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Implementer.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1820Implementer.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", "contractName": "IERC1820Implementer", - "sourceName": "contracts/utils/introspection/IERC1820Implementer.sol", + "sourceName": "contracts/interfaces/IERC1820Implementer.sol", "abi": [ { "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Registry.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1820Registry.json similarity index 98% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Registry.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1820Registry.json index 0adaf5cc..219465ae 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1820Registry.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1820Registry.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", "contractName": "IERC1820Registry", - "sourceName": "contracts/utils/introspection/IERC1820Registry.sol", + "sourceName": "contracts/interfaces/IERC1820Registry.sol", "abi": [ { "anonymous": false, diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1822Proxiable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1822Proxiable.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1822Proxiable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1822Proxiable.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1967.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1967.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC1967.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC1967.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20.json similarity index 97% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20.json index 1eaa0141..6dad1476 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20.json @@ -86,7 +86,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -142,7 +142,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -171,7 +171,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Errors.json similarity index 51% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Errors.json index 4c639e69..df9b5fb1 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashLenderUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Errors.json @@ -1,84 +1,93 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC3156FlashLenderUpgradeable", - "sourceName": "contracts/interfaces/IERC3156FlashLenderUpgradeable.sol", + "contractName": "IERC20Errors", + "sourceName": "contracts/interfaces/draft-IERC6093.sol", "abi": [ { "inputs": [ { "internalType": "address", - "name": "token", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "allowance", "type": "uint256" - } - ], - "name": "flashFee", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "needed", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "ERC20InsufficientAllowance", + "type": "error" }, { "inputs": [ - { - "internalType": "contract IERC3156FlashBorrowerUpgradeable", - "name": "receiver", - "type": "address" - }, { "internalType": "address", - "name": "token", + "name": "sender", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "balance", "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" } ], - "name": "flashLoan", - "outputs": [ + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "receiver", + "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "ERC20InvalidReceiver", + "type": "error" }, { "inputs": [ { "internalType": "address", - "name": "token", + "name": "sender", "type": "address" } ], - "name": "maxFlashLoan", - "outputs": [ + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "ERC20InvalidSpender", + "type": "error" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Metadata.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Metadata.json similarity index 98% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Metadata.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Metadata.json index 4700d188..8979e3ab 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Metadata.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Metadata.json @@ -86,7 +86,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -181,7 +181,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -210,7 +210,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Permit.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Permit.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC20Permit.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC20Permit.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2309.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC2309.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2309.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC2309.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2612.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC2612.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2612.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC2612.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2981.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC2981.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC2981.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC2981.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashBorrower.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC3156FlashBorrower.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashBorrower.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC3156FlashBorrower.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashLender.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC3156FlashLender.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC3156FlashLender.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC3156FlashLender.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4626.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC4626.json similarity index 99% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4626.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC4626.json index 454effc7..c333c6c0 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4626.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC4626.json @@ -154,7 +154,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -542,7 +542,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -571,7 +571,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4906.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC4906.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC4906.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC4906.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5267.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC5267.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5267.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC5267.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5313.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC5313.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5313.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC5313.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5805.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC5805.json similarity index 94% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5805.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC5805.json index 5ac1da20..2f6c3445 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC5805.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC5805.json @@ -3,6 +3,17 @@ "contractName": "IERC5805", "sourceName": "contracts/interfaces/IERC5805.sol", "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -40,13 +51,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC6372.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6372.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC6372.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6372.json diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909.json new file mode 100644 index 00000000..2551858b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909.json @@ -0,0 +1,316 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC6909", + "sourceName": "contracts/interfaces/IERC6909.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909ContentURI.json similarity index 75% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909ContentURI.json index c9964459..d272b83c 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909ContentURI.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC1363Upgradeable", - "sourceName": "contracts/interfaces/IERC1363Upgradeable.sol", + "contractName": "IERC6909ContentURI", + "sourceName": "contracts/interfaces/IERC6909.sol", "abi": [ { "anonymous": false, @@ -18,10 +18,16 @@ "name": "spender", "type": "address" }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -34,75 +40,69 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "Transfer", + "name": "OperatorSet", "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "owner", + "name": "caller", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "spender", + "name": "sender", "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "spender", + "name": "receiver", "type": "address" }, { + "indexed": true, "internalType": "uint256", - "name": "amount", + "name": "id", "type": "uint256" - } - ], - "name": "approve", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, { "internalType": "address", "name": "spender", @@ -110,19 +110,19 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "id", "type": "uint256" } ], - "name": "approveAndCall", + "name": "allowance", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -134,16 +134,16 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "id", "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "approveAndCall", + "name": "approve", "outputs": [ { "internalType": "bool", @@ -158,35 +158,21 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "owner", "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "id", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", + "name": "balanceOf", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -194,12 +180,12 @@ }, { "inputs": [], - "name": "totalSupply", + "name": "contractURI", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", @@ -209,16 +195,16 @@ "inputs": [ { "internalType": "address", - "name": "to", + "name": "owner", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "transfer", + "name": "isOperator", "outputs": [ { "internalType": "bool", @@ -226,23 +212,23 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "transferAndCall", + "name": "setOperator", "outputs": [ { "internalType": "bool", @@ -256,22 +242,12 @@ { "inputs": [ { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "transferAndCall", + "name": "supportsInterface", "outputs": [ { "internalType": "bool", @@ -279,62 +255,47 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "id", "type": "uint256" } ], - "name": "transferFrom", + "name": "tokenURI", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "from", + "name": "receiver", "type": "address" }, { - "internalType": "address", - "name": "to", - "type": "address" + "internalType": "uint256", + "name": "id", + "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "transferFromAndCall", + "name": "transfer", "outputs": [ { "internalType": "bool", @@ -349,21 +310,26 @@ "inputs": [ { "internalType": "address", - "name": "from", + "name": "sender", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "receiver", "type": "address" }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], - "name": "transferFromAndCall", + "name": "transferFrom", "outputs": [ { "internalType": "bool", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909Metadata.json similarity index 80% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909Metadata.json index 2e2011f1..d63ea7b4 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20FlashMintUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909Metadata.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC20FlashMintUpgradeable", - "sourceName": "contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol", + "contractName": "IERC6909Metadata", + "sourceName": "contracts/interfaces/IERC6909.sol", "abi": [ { "anonymous": false, @@ -18,10 +18,16 @@ "name": "spender", "type": "address" }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -31,35 +37,59 @@ { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, { "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "Initialized", + "name": "OperatorSet", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, { "indexed": true, "internalType": "address", - "name": "from", + "name": "sender", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "to", + "name": "receiver", "type": "address" }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], @@ -77,6 +107,11 @@ "internalType": "address", "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" } ], "name": "allowance", @@ -97,6 +132,11 @@ "name": "spender", "type": "address" }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { "internalType": "uint256", "name": "amount", @@ -118,8 +158,13 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "owner", "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" } ], "name": "balanceOf", @@ -134,7 +179,13 @@ "type": "function" }, { - "inputs": [], + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], "name": "decimals", "outputs": [ { @@ -150,16 +201,16 @@ "inputs": [ { "internalType": "address", - "name": "spender", + "name": "owner", "type": "address" }, { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "decreaseAllowance", + "name": "isOperator", "outputs": [ { "internalType": "bool", @@ -167,28 +218,23 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "id", "type": "uint256" } ], - "name": "flashFee", + "name": "name", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", @@ -196,28 +242,18 @@ }, { "inputs": [ - { - "internalType": "contract IERC3156FlashBorrowerUpgradeable", - "name": "receiver", - "type": "address" - }, { "internalType": "address", - "name": "token", + "name": "spender", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "flashLoan", + "name": "setOperator", "outputs": [ { "internalType": "bool", @@ -231,17 +267,12 @@ { "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "increaseAllowance", + "name": "supportsInterface", "outputs": [ { "internalType": "bool", @@ -249,43 +280,17 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "maxFlashLoan", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "id", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], "name": "symbol", "outputs": [ { @@ -297,26 +302,18 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "to", + "name": "receiver", "type": "address" }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { "internalType": "uint256", "name": "amount", @@ -338,14 +335,19 @@ "inputs": [ { "internalType": "address", - "name": "from", + "name": "sender", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "receiver", "type": "address" }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { "internalType": "uint256", "name": "amount", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909TokenSupply.json similarity index 74% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909TokenSupply.json index 7c77c8fc..4a09a198 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4906Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC6909TokenSupply.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC4906Upgradeable", - "sourceName": "contracts/interfaces/IERC4906Upgradeable.sol", + "contractName": "IERC6909TokenSupply", + "sourceName": "contracts/interfaces/IERC6909.sol", "abi": [ { "anonymous": false, @@ -15,13 +15,19 @@ { "indexed": true, "internalType": "address", - "name": "approved", + "name": "spender", "type": "address" }, { "indexed": true, "internalType": "uint256", - "name": "tokenId", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", "type": "uint256" } ], @@ -40,7 +46,7 @@ { "indexed": true, "internalType": "address", - "name": "operator", + "name": "spender", "type": "address" }, { @@ -50,7 +56,7 @@ "type": "bool" } ], - "name": "ApprovalForAll", + "name": "OperatorSet", "type": "event" }, { @@ -58,73 +64,93 @@ "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "_fromTokenId", - "type": "uint256" + "internalType": "address", + "name": "caller", + "type": "address" }, { - "indexed": false, + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, "internalType": "uint256", - "name": "_toTokenId", + "name": "id", "type": "uint256" - } - ], - "name": "BatchMetadataUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { "indexed": false, "internalType": "uint256", - "name": "_tokenId", + "name": "amount", "type": "uint256" } ], - "name": "MetadataUpdate", + "name": "Transfer", "type": "event" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "from", + "name": "owner", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { - "indexed": true, "internalType": "uint256", - "name": "tokenId", + "name": "id", "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "tokenId", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", "type": "uint256" } ], "name": "approve", - "outputs": [], + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "nonpayable", "type": "function" }, @@ -134,13 +160,18 @@ "internalType": "address", "name": "owner", "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", - "name": "balance", + "name": "", "type": "uint256" } ], @@ -150,17 +181,22 @@ { "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "getApproved", + "name": "isOperator", "outputs": [ { - "internalType": "address", - "name": "operator", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "view", @@ -170,16 +206,16 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" }, { - "internalType": "address", - "name": "operator", - "type": "address" + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "isApprovedForAll", + "name": "setOperator", "outputs": [ { "internalType": "bool", @@ -187,23 +223,23 @@ "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "ownerOf", + "name": "supportsInterface", "outputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "view", @@ -211,82 +247,42 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, { "internalType": "uint256", - "name": "tokenId", + "name": "id", "type": "uint256" } ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, + "name": "totalSupply", + "outputs": [ { "internalType": "uint256", - "name": "tokenId", + "name": "", "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "operator", + "name": "receiver", "type": "address" }, { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "supportsInterface", + "name": "transfer", "outputs": [ { "internalType": "bool", @@ -294,29 +290,40 @@ "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "from", + "name": "sender", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "receiver", "type": "address" }, { "internalType": "uint256", - "name": "tokenId", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", "type": "uint256" } ], "name": "transferFrom", - "outputs": [], + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "nonpayable", "type": "function" } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Enumerable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Enumerable.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Enumerable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Enumerable.json diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Errors.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Errors.json new file mode 100644 index 00000000..12f73984 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Errors.json @@ -0,0 +1,114 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC721Errors", + "sourceName": "contracts/interfaces/draft-IERC6093.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Metadata.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Metadata.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Metadata.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Metadata.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Receiver.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Receiver.json similarity index 100% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC721Receiver.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC721Receiver.json diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579AccountConfig.json similarity index 51% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579AccountConfig.json index 764cab4d..f3cd1318 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC2981.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579AccountConfig.json @@ -1,32 +1,35 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC2981", - "sourceName": "contracts/token/common/ERC2981.sol", + "contractName": "IERC7579AccountConfig", + "sourceName": "contracts/interfaces/draft-IERC7579.sol", "abi": [ { - "inputs": [ + "inputs": [], + "name": "accountId", + "outputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, + "internalType": "string", + "name": "accountImplementationId", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "salePrice", - "type": "uint256" + "internalType": "bytes32", + "name": "encodedMode", + "type": "bytes32" } ], - "name": "royaltyInfo", + "name": "supportsExecutionMode", "outputs": [ { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", @@ -35,12 +38,12 @@ { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" } ], - "name": "supportsInterface", + "name": "supportsModule", "outputs": [ { "internalType": "bool", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Execution.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Execution.json new file mode 100644 index 00000000..a3946d3e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Execution.json @@ -0,0 +1,53 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC7579Execution", + "sourceName": "contracts/interfaces/draft-IERC7579.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "executeFromExecutor", + "outputs": [ + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Hook.json similarity index 50% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Hook.json index 89672a6b..7d076ccb 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155ReceiverUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Hook.json @@ -1,64 +1,73 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC1155ReceiverUpgradeable", - "sourceName": "contracts/token/ERC1155/IERC1155ReceiverUpgradeable.sol", + "contractName": "IERC7579Hook", + "sourceName": "contracts/interfaces/draft-IERC7579.sol", "abi": [ { "inputs": [ { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "isModuleType", + "outputs": [ { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "bytes", "name": "data", "type": "bytes" } ], - "name": "onERC1155BatchReceived", - "outputs": [ + "name": "onInstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bytes4", - "name": "", - "type": "bytes4" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], + "name": "onUninstall", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "operator", - "type": "address" - }, + "internalType": "bytes", + "name": "hookData", + "type": "bytes" + } + ], + "name": "postCheck", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "from", + "name": "msgSender", "type": "address" }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, { "internalType": "uint256", "name": "value", @@ -66,39 +75,20 @@ }, { "internalType": "bytes", - "name": "data", + "name": "msgData", "type": "bytes" } ], - "name": "onERC1155Received", + "name": "preCheck", "outputs": [ { - "internalType": "bytes4", - "name": "", - "type": "bytes4" + "internalType": "bytes", + "name": "hookData", + "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Module.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Module.json new file mode 100644 index 00000000..9c3acbdf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Module.json @@ -0,0 +1,56 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC7579Module", + "sourceName": "contracts/interfaces/draft-IERC7579.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "isModuleType", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onInstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onUninstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579ModuleConfig.json similarity index 54% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579ModuleConfig.json index 009a9c64..08eeb03e 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICrossDomainMessengerUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579ModuleConfig.json @@ -1,105 +1,119 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ICrossDomainMessengerUpgradeable", - "sourceName": "contracts/vendor/optimism/ICrossDomainMessengerUpgradeable.sol", + "contractName": "IERC7579ModuleConfig", + "sourceName": "contracts/interfaces/draft-IERC7579.sol", "abi": [ { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" } ], - "name": "FailedRelayedMessage", + "name": "ModuleInstalled", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" } ], - "name": "RelayedMessage", + "name": "ModuleUninstalled", "type": "event" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" }, { - "indexed": false, "internalType": "address", - "name": "sender", + "name": "module", "type": "address" }, { - "indexed": false, "internalType": "bytes", - "name": "message", + "name": "initData", "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "messageNonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" } ], - "name": "SentMessage", - "type": "event" + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, { "internalType": "address", - "name": "_target", + "name": "module", "type": "address" }, { "internalType": "bytes", - "name": "_message", + "name": "additionalContext", "type": "bytes" - }, + } + ], + "name": "isModuleInstalled", + "outputs": [ { - "internalType": "uint32", - "name": "_gasLimit", - "type": "uint32" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "sendMessage", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "xDomainMessageSender", - "outputs": [ + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, { "internalType": "address", - "name": "", + "name": "module", "type": "address" + }, + { + "internalType": "bytes", + "name": "deInitData", + "type": "bytes" } ], - "stateMutability": "view", + "name": "uninstallModule", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Validator.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Validator.json new file mode 100644 index 00000000..2b75cdd5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7579Validator.json @@ -0,0 +1,156 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC7579Validator", + "sourceName": "contracts/interfaces/draft-IERC7579.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "isModuleType", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignatureWithSender", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onInstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onUninstall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7674.json similarity index 85% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7674.json index caa613b9..8a5b080c 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7674.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC20Upgradeable", - "sourceName": "contracts/token/ERC20/IERC20Upgradeable.sol", + "contractName": "IERC7674", + "sourceName": "contracts/interfaces/draft-IERC7674.sol", "abi": [ { "anonymous": false, @@ -86,7 +86,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -120,6 +120,30 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "temporaryApprove", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "totalSupply", @@ -142,7 +166,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -171,7 +195,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7751.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7751.json new file mode 100644 index 00000000..d2d73607 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7751.json @@ -0,0 +1,37 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC7751", + "sourceName": "contracts/interfaces/IERC7751.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "reason", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "details", + "type": "bytes" + } + ], + "name": "WrappedError", + "type": "error" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777.json similarity index 99% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777.json index 76bdbdf4..2adb9d15 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", "contractName": "IERC777", - "sourceName": "contracts/token/ERC777/IERC777.sol", + "sourceName": "contracts/interfaces/IERC777.sol", "abi": [ { "anonymous": false, diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Recipient.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777Recipient.json similarity index 94% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Recipient.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777Recipient.json index 5741c586..dfd4a19f 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Recipient.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777Recipient.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", "contractName": "IERC777Recipient", - "sourceName": "contracts/token/ERC777/IERC777Recipient.sol", + "sourceName": "contracts/interfaces/IERC777Recipient.sol", "abi": [ { "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Sender.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777Sender.json similarity index 94% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Sender.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777Sender.json index 0419a025..4edd8a77 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IERC777Sender.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC777Sender.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", "contractName": "IERC777Sender", - "sourceName": "contracts/token/ERC777/IERC777Sender.sol", + "sourceName": "contracts/interfaces/IERC777Sender.sol", "abi": [ { "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7786GatewaySource.json similarity index 51% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7786GatewaySource.json index cfbbb327..600b4c33 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ICrossDomainMessenger.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7786GatewaySource.json @@ -1,20 +1,18 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ICrossDomainMessenger", - "sourceName": "contracts/vendor/optimism/ICrossDomainMessenger.sol", + "contractName": "IERC7786GatewaySource", + "sourceName": "contracts/interfaces/draft-IERC7786.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" } ], - "name": "FailedRelayedMessage", - "type": "event" + "name": "UnsupportedAttribute", + "type": "error" }, { "anonymous": false, @@ -22,81 +20,86 @@ { "indexed": true, "internalType": "bytes32", - "name": "msgHash", + "name": "sendId", "type": "bytes32" - } - ], - "name": "RelayedMessage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" }, { "indexed": false, - "internalType": "address", + "internalType": "bytes", "name": "sender", - "type": "address" + "type": "bytes" }, { "indexed": false, "internalType": "bytes", - "name": "message", + "name": "recipient", "type": "bytes" }, { "indexed": false, - "internalType": "uint256", - "name": "messageNonce", - "type": "uint256" + "internalType": "bytes", + "name": "payload", + "type": "bytes" }, { "indexed": false, "internalType": "uint256", - "name": "gasLimit", + "name": "value", "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "attributes", + "type": "bytes[]" } ], - "name": "SentMessage", + "name": "MessageSent", "type": "event" }, { "inputs": [ { - "internalType": "address", - "name": "_target", - "type": "address" + "internalType": "bytes", + "name": "recipient", + "type": "bytes" }, { "internalType": "bytes", - "name": "_message", + "name": "payload", "type": "bytes" }, { - "internalType": "uint32", - "name": "_gasLimit", - "type": "uint32" + "internalType": "bytes[]", + "name": "attributes", + "type": "bytes[]" } ], "name": "sendMessage", - "outputs": [], - "stateMutability": "nonpayable", + "outputs": [ + { + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" + } + ], + "stateMutability": "payable", "type": "function" }, { - "inputs": [], - "name": "xDomainMessageSender", + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "supportsAttribute", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7786Recipient.json similarity index 54% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7786Recipient.json index a87aede0..40e44858 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1363SpenderUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7786Recipient.json @@ -1,27 +1,27 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC1363SpenderUpgradeable", - "sourceName": "contracts/interfaces/IERC1363SpenderUpgradeable.sol", + "contractName": "IERC7786Recipient", + "sourceName": "contracts/interfaces/draft-IERC7786.sol", "abi": [ { "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "bytes", + "name": "sender", + "type": "bytes" }, { "internalType": "bytes", - "name": "data", + "name": "payload", "type": "bytes" } ], - "name": "onApprovalReceived", + "name": "receiveMessage", "outputs": [ { "internalType": "bytes4", @@ -29,7 +29,7 @@ "type": "bytes4" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7802.json similarity index 57% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7802.json index 150168d8..5636f43b 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155ReceiverUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7802.json @@ -1,57 +1,73 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC1155ReceiverUpgradeable", - "sourceName": "contracts/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol", + "contractName": "IERC7802", + "sourceName": "contracts/interfaces/draft-IERC7802.sol", "abi": [ { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, { "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "Initialized", + "name": "CrosschainBurn", "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", + "name": "to", "type": "address" }, { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "onERC1155BatchReceived", - "outputs": [ + "name": "CrosschainMint", + "type": "event" + }, + { + "inputs": [ { - "internalType": "bytes4", - "name": "", - "type": "bytes4" + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" } ], + "name": "crosschainBurn", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -59,38 +75,17 @@ "inputs": [ { "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", + "name": "_to", "type": "address" }, { "internalType": "uint256", - "name": "id", + "name": "_amount", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" } ], + "name": "crosschainMint", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7821.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7821.json new file mode 100644 index 00000000..52d445c9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7821.json @@ -0,0 +1,48 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC7821", + "sourceName": "contracts/interfaces/draft-IERC7821.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionData", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7913SignatureVerifier.json similarity index 69% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7913SignatureVerifier.json index dfed5226..8ae1eb53 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1271Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IERC7913SignatureVerifier.json @@ -1,10 +1,15 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC1271Upgradeable", - "sourceName": "contracts/interfaces/IERC1271Upgradeable.sol", + "contractName": "IERC7913SignatureVerifier", + "sourceName": "contracts/interfaces/IERC7913.sol", "abi": [ { "inputs": [ + { + "internalType": "bytes", + "name": "key", + "type": "bytes" + }, { "internalType": "bytes32", "name": "hash", @@ -16,11 +21,11 @@ "type": "bytes" } ], - "name": "isValidSignature", + "name": "verify", "outputs": [ { "internalType": "bytes4", - "name": "magicValue", + "name": "", "type": "bytes4" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPoint.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPoint.json new file mode 100644 index 00000000..4842a20f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPoint.json @@ -0,0 +1,302 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IEntryPoint", + "sourceName": "contracts/interfaces/draft-IERC4337.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "opIndex", + "type": "uint256" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "FailedOp", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "opIndex", + "type": "uint256" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "inner", + "type": "bytes" + } + ], + "name": "FailedOpWithRevert", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation[]", + "name": "userOps", + "type": "tuple[]" + }, + { + "internalType": "contract IAggregator", + "name": "aggregator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct IEntryPoint.UserOpsPerAggregator[]", + "name": "opsPerAggregator", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + } + ], + "name": "handleAggregatedOps", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation[]", + "name": "ops", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "beneficiary", + "type": "address" + } + ], + "name": "handleOps", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointExtra.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointExtra.json new file mode 100644 index 00000000..82b273ce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointExtra.json @@ -0,0 +1,77 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IEntryPointExtra", + "sourceName": "contracts/account/utils/draft-ERC4337Utils.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + } + ], + "name": "getUserOpHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointNonces.json similarity index 51% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointNonces.json index 6cbd1bde..6a95c7e0 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IFxMessageProcessor.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointNonces.json @@ -1,29 +1,30 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IFxMessageProcessor", - "sourceName": "contracts/vendor/polygon/IFxMessageProcessor.sol", + "contractName": "IEntryPointNonces", + "sourceName": "contracts/interfaces/draft-IERC4337.sol", "abi": [ { "inputs": [ - { - "internalType": "uint256", - "name": "stateId", - "type": "uint256" - }, { "internalType": "address", - "name": "rootMessageSender", + "name": "sender", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" } ], - "name": "processMessageFromRoot", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointStake.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointStake.json new file mode 100644 index 00000000..13b3cdb1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IEntryPointStake.json @@ -0,0 +1,94 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IEntryPointStake", + "sourceName": "contracts/interfaces/draft-IERC4337.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint32", + "name": "unstakeDelaySec", + "type": "uint32" + } + ], + "name": "addStake", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "unlockStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IGovernor.json similarity index 84% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IGovernor.json index 5cc5c5e1..2cb39786 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorCompatibilityBravoUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IGovernor.json @@ -1,20 +1,194 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IGovernorCompatibilityBravoUpgradeable", - "sourceName": "contracts/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol", + "contractName": "IGovernor", + "sourceName": "contracts/governance/IGovernor.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" } ], - "name": "Initialized", - "type": "event" + "name": "GovernorUnexpectedProposalState", + "type": "error" }, { "anonymous": false, @@ -103,6 +277,25 @@ "name": "ProposalExecuted", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -209,19 +402,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -293,19 +473,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -394,6 +569,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -405,19 +585,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -480,27 +650,6 @@ }, { "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getActions", - "outputs": [ { "internalType": "address[]", "name": "targets", @@ -511,56 +660,23 @@ "name": "values", "type": "uint256[]" }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, { "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" }, { - "internalType": "address", - "name": "voter", - "type": "address" + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" } ], - "name": "getReceipt", + "name": "getProposalId", "outputs": [ { - "components": [ - { - "internalType": "bool", - "name": "hasVoted", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "internalType": "struct IGovernorCompatibilityBravoUpgradeable.Receipt", + "internalType": "uint256", "name": "", - "type": "tuple" + "type": "uint256" } ], "stateMutability": "view", @@ -717,12 +833,12 @@ "type": "uint256" } ], - "name": "proposalProposer", + "name": "proposalEta", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -736,12 +852,12 @@ "type": "uint256" } ], - "name": "proposalSnapshot", + "name": "proposalNeedsQueuing", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", @@ -751,61 +867,48 @@ "inputs": [ { "internalType": "uint256", - "name": "", + "name": "proposalId", "type": "uint256" } ], - "name": "proposals", + "name": "proposalProposer", "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, { "internalType": "address", - "name": "proposer", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "forVotes", + "name": "proposalId", "type": "uint256" - }, + } + ], + "name": "proposalSnapshot", + "outputs": [ { "internalType": "uint256", - "name": "againstVotes", + "name": "", "type": "uint256" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ { "internalType": "uint256", - "name": "abstainVotes", + "name": "", "type": "uint256" - }, - { - "internalType": "bool", - "name": "canceled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" } ], "stateMutability": "view", @@ -857,43 +960,25 @@ "name": "values", "type": "uint256[]" }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, { "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" }, { - "internalType": "string", - "name": "description", - "type": "string" + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" } ], - "name": "propose", + "name": "queue", "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ { "internalType": "uint256", "name": "proposalId", "type": "uint256" } ], - "name": "queue", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -916,19 +1001,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "quorumVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -940,7 +1012,7 @@ "name": "state", "outputs": [ { - "internalType": "enum IGovernorUpgradeable.ProposalState", + "internalType": "enum IGovernor.ProposalState", "name": "", "type": "uint8" } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IPaymaster.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IPaymaster.json new file mode 100644 index 00000000..b3d046ca --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IPaymaster.json @@ -0,0 +1,120 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IPaymaster", + "sourceName": "contracts/interfaces/draft-IERC4337.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "enum IPaymaster.PostOpMode", + "name": "mode", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "context", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "actualGasCost", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actualUserOpFeePerGas", + "type": "uint256" + } + ], + "name": "postOp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "maxCost", + "type": "uint256" + } + ], + "name": "validatePaymasterUserOp", + "outputs": [ + { + "internalType": "bytes", + "name": "context", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "validationData", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ITransparentUpgradeableProxy.json similarity index 71% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ITransparentUpgradeableProxy.json index f22e5ec1..a801a532 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1967UpgradeUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ITransparentUpgradeableProxy.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC1967UpgradeUpgradeable", - "sourceName": "contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol", + "contractName": "ITransparentUpgradeableProxy", + "sourceName": "contracts/proxy/transparent/TransparentUpgradeableProxy.sol", "abi": [ { "anonymous": false, @@ -39,27 +39,32 @@ "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "name": "Initialized", + "name": "Upgraded", "type": "event" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "newImplementation", "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Upgraded", - "type": "event" + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IVotes.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IVotes.json similarity index 93% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IVotes.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IVotes.json index 89161d90..b721d260 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IVotes.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/IVotes.json @@ -3,6 +3,17 @@ "contractName": "IVotes", "sourceName": "contracts/governance/utils/IVotes.sol", "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -40,13 +51,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Initializable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Initializable.json similarity index 64% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Initializable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Initializable.json index 96741fd2..f08da888 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Initializable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Initializable.json @@ -3,14 +3,24 @@ "contractName": "Initializable", "sourceName": "contracts/proxy/utils/Initializable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/InteroperableAddress.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/InteroperableAddress.json new file mode 100644 index 00000000..a9819e47 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/InteroperableAddress.json @@ -0,0 +1,27 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "InteroperableAddress", + "sourceName": "contracts/utils/draft-InteroperableAddress.sol", + "abi": [ + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220721d95aef70757eae681d4f155ef3a0953b2a5a45e155933284b98b1142896a064736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220721d95aef70757eae681d4f155ef3a0953b2a5a45e155933284b98b1142896a064736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/LowLevelCall.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/LowLevelCall.json new file mode 100644 index 00000000..0de5b218 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/LowLevelCall.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LowLevelCall", + "sourceName": "contracts/utils/LowLevelCall.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220088d665db3ff81308c35c10547d4062045a384328b14d7b8098586080348823664736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220088d665db3ff81308c35c10547d4062045a384328b14d7b8098586080348823664736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Math.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Math.json new file mode 100644 index 00000000..9442dbd0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Math.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Math", + "sourceName": "contracts/utils/math/Math.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d99e72cb96ada594598c56634c4ce786b5e8105f7ec1dec2189b758a1d0b4dd464736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d99e72cb96ada594598c56634c4ce786b5e8105f7ec1dec2189b758a1d0b4dd464736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Memory.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Memory.json new file mode 100644 index 00000000..27ddf076 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Memory.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Memory", + "sourceName": "contracts/utils/Memory.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220a025997d12876fafcd45dfaabea5386aa2a5213a1dba830929c51831bfa8133764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220a025997d12876fafcd45dfaabea5386aa2a5213a1dba830929c51831bfa8133764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleProof.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleProof.json new file mode 100644 index 00000000..22084b34 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleProof.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MerkleProof", + "sourceName": "contracts/utils/cryptography/MerkleProof.sol", + "abi": [ + { + "inputs": [], + "name": "MerkleProofInvalidMultiproof", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220dded953398f62766bde24323b65335ccd313e65e1d9f1c85d7119d48a253e86764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220dded953398f62766bde24323b65335ccd313e65e1d9f1c85d7119d48a253e86764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleTree.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleTree.json new file mode 100644 index 00000000..5c5eaaef --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MerkleTree.json @@ -0,0 +1,32 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MerkleTree", + "sourceName": "contracts/utils/structs/MerkleTree.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "MerkleTreeUpdateInvalidIndex", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleTreeUpdateInvalidProof", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220e20dc3b0968f7ccb218278c1c36c91ce5004354e1538507d3357a54fc1e104de64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220e20dc3b0968f7ccb218278c1c36c91ce5004354e1538507d3357a54fc1e104de64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MessageHashUtils.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MessageHashUtils.json new file mode 100644 index 00000000..8362e7f2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MessageHashUtils.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MessageHashUtils", + "sourceName": "contracts/utils/cryptography/MessageHashUtils.sol", + "abi": [ + { + "inputs": [], + "name": "ERC5267ExtensionsNotSupported", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122090ae6b0fabce9e1fb9a8af9d72b644ef661e0bd9b94fb05df5fc553c8facd5eb64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122090ae6b0fabce9e1fb9a8af9d72b644ef661e0bd9b94fb05df5fc553c8facd5eb64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913.json new file mode 100644 index 00000000..59dc7c23 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913.json @@ -0,0 +1,173 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MultiSignerERC7913", + "sourceName": "contracts/utils/cryptography/signers/MultiSignerERC7913.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913AlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913NonexistentSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "signers", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "MultiSignerERC7913UnreachableThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "MultiSignerERC7913ZeroThreshold", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "ERC7913ThresholdSet", + "type": "event" + }, + { + "inputs": [], + "name": "getSignerCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "start", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "end", + "type": "uint64" + } + ], + "name": "getSigners", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "isSigner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913Weighted.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913Weighted.json new file mode 100644 index 00000000..5443b4da --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/MultiSignerERC7913Weighted.json @@ -0,0 +1,261 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MultiSignerERC7913Weighted", + "sourceName": "contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913AlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913NonexistentSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "signers", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "MultiSignerERC7913UnreachableThreshold", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "weight", + "type": "uint64" + } + ], + "name": "MultiSignerERC7913WeightedInvalidWeight", + "type": "error" + }, + { + "inputs": [], + "name": "MultiSignerERC7913WeightedMismatchedLength", + "type": "error" + }, + { + "inputs": [], + "name": "MultiSignerERC7913ZeroThreshold", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signer", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "weight", + "type": "uint64" + } + ], + "name": "ERC7913SignerWeightChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "ERC7913ThresholdSet", + "type": "event" + }, + { + "inputs": [], + "name": "getSignerCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "start", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "end", + "type": "uint64" + } + ], + "name": "getSigners", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "isSigner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "signerWeight", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalWeight", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Multicall.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Multicall.json similarity index 67% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Multicall.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Multicall.json index f0f3ba9b..2377d3eb 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Multicall.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Multicall.json @@ -3,6 +3,22 @@ "contractName": "Multicall", "sourceName": "contracts/utils/Multicall.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Nonces.json similarity index 60% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Nonces.json index 319480a6..a7c6280a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/PullPayment.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Nonces.json @@ -1,38 +1,41 @@ { "_format": "hh-sol-artifact-1", - "contractName": "PullPayment", - "sourceName": "contracts/security/PullPayment.sol", + "contractName": "Nonces", + "sourceName": "contracts/utils/Nonces.sol", "abi": [ { "inputs": [ { "internalType": "address", - "name": "dest", + "name": "account", "type": "address" - } - ], - "name": "payments", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "currentNonce", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "InvalidAccountNonce", + "type": "error" }, { "inputs": [ { - "internalType": "address payable", - "name": "payee", + "internalType": "address", + "name": "owner", "type": "address" } ], - "name": "withdrawPayments", - "outputs": [], - "stateMutability": "nonpayable", + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/NoncesKeyed.json similarity index 59% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/NoncesKeyed.json index 03fd5447..2a556702 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2981Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/NoncesKeyed.json @@ -1,41 +1,34 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC2981Upgradeable", - "sourceName": "contracts/token/common/ERC2981Upgradeable.sol", + "contractName": "NoncesKeyed", + "sourceName": "contracts/utils/NoncesKeyed.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" }, { "internalType": "uint256", - "name": "salePrice", + "name": "currentNonce", "type": "uint256" } ], - "name": "royaltyInfo", - "outputs": [ + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" - }, + } + ], + "name": "nonces", + "outputs": [ { "internalType": "uint256", "name": "", @@ -48,17 +41,22 @@ { "inputs": [ { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint192", + "name": "key", + "type": "uint192" } ], - "name": "supportsInterface", + "name": "nonces", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Ownable.json similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Ownable.json index 58c474d6..c8e73f73 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Ownable.json @@ -3,6 +3,28 @@ "contractName": "Ownable", "sourceName": "contracts/access/Ownable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable2Step.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Ownable2Step.json similarity index 83% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable2Step.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Ownable2Step.json index 9aef3478..ab057311 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Ownable2Step.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Ownable2Step.json @@ -3,6 +3,28 @@ "contractName": "Ownable2Step", "sourceName": "contracts/access/Ownable2Step.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/P256.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/P256.json new file mode 100644 index 00000000..9a85b621 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/P256.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "P256", + "sourceName": "contracts/utils/cryptography/P256.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220195054613876a45dfd0239e68b8f96e0a38dbb33ec3d5b8b1841d2d979cdc13164736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220195054613876a45dfd0239e68b8f96e0a38dbb33ec3d5b8b1841d2d979cdc13164736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Packing.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Packing.json new file mode 100644 index 00000000..85deaa64 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Packing.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Packing", + "sourceName": "contracts/utils/Packing.sol", + "abi": [ + { + "inputs": [], + "name": "OutOfRangeAccess", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b7500cc7e6376eef925684f98da5c0b9bb2e8e52a542ac4463c39944e7b8071f64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b7500cc7e6376eef925684f98da5c0b9bb2e8e52a542ac4463c39944e7b8071f64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Panic.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Panic.json new file mode 100644 index 00000000..86ba99ee --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Panic.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Panic", + "sourceName": "contracts/utils/Panic.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cf66c3fdbd6ee7f5941408dcea64d0394bae6a164a552c2621f79ecab543a43c64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cf66c3fdbd6ee7f5941408dcea64d0394bae6a164a552c2621f79ecab543a43c64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Pausable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Pausable.json similarity index 81% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Pausable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Pausable.json index a9dfd35e..2c1205fc 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Pausable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Pausable.json @@ -1,8 +1,18 @@ { "_format": "hh-sol-artifact-1", "contractName": "Pausable", - "sourceName": "contracts/security/Pausable.sol", + "sourceName": "contracts/utils/Pausable.sol", "abi": [ + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, { "anonymous": false, "inputs": [ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Proxy.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Proxy.json similarity index 80% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Proxy.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Proxy.json index a2b195d4..947ef63b 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Proxy.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Proxy.json @@ -6,10 +6,6 @@ { "stateMutability": "payable", "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ProxyAdmin.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ProxyAdmin.json new file mode 100644 index 00000000..ada1f5ad --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ProxyAdmin.json @@ -0,0 +1,132 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ProxyAdmin", + "sourceName": "contracts/proxy/transparent/ProxyAdmin.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "UPGRADE_INTERFACE_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ITransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b506040516104e63803806104e6833981016040819052602b9160b4565b806001600160a01b038116605857604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b605f816065565b505060df565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020828403121560c3575f5ffd5b81516001600160a01b038116811460d8575f5ffd5b9392505050565b6103fa806100ec5f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f5ffd5b348015610058575f5ffd5b506100616100fd565b005b34801561006e575f5ffd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f5ffd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610365565b3480156100e9575f5ffd5b506100616100f836600461037e565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906101489086908690600401610399565b5f604051808303818588803b15801561015f575f5ffd5b505af1158015610171573d5f5f3e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b5f5f5f60608486031215610272575f5ffd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff8111156102a8575f5ffd5b8401601f810186136102b8575f5ffd5b803567ffffffffffffffff8111156102d2576102d261024c565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156103015761030161024c565b604052818152828201602001881015610318575f5ffd5b816020840160208301375f602083830101528093505050509250925092565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6103776020830184610337565b9392505050565b5f6020828403121561038e575f5ffd5b813561037781610238565b6001600160a01b03831681526040602082018190525f906103bc90830184610337565b94935050505056fea2646970667358221220767bf68f5ff9871c0d3016f690cfe21595e50ff44f7c9cd9f488c75c901bbe1f64736f6c634300081f0033", + "deployedBytecode": "0x608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f5ffd5b348015610058575f5ffd5b506100616100fd565b005b34801561006e575f5ffd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f5ffd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610365565b3480156100e9575f5ffd5b506100616100f836600461037e565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906101489086908690600401610399565b5f604051808303818588803b15801561015f575f5ffd5b505af1158015610171573d5f5f3e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b5f5f5f60608486031215610272575f5ffd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff8111156102a8575f5ffd5b8401601f810186136102b8575f5ffd5b803567ffffffffffffffff8111156102d2576102d261024c565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156103015761030161024c565b604052818152828201602001881015610318575f5ffd5b816020840160208301375f602083830101528093505050509250925092565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6103776020830184610337565b9392505050565b5f6020828403121561038e575f5ffd5b813561037781610238565b6001600160a01b03831681526040602082018190525f906103bc90830184610337565b94935050505056fea2646970667358221220767bf68f5ff9871c0d3016f690cfe21595e50ff44f7c9cd9f488c75c901bbe1f64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RLP.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RLP.json new file mode 100644 index 00000000..e6d4391b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RLP.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RLP", + "sourceName": "contracts/utils/RLP.sol", + "abi": [ + { + "inputs": [], + "name": "RLPInvalidEncoding", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212207e5034fc2f125552971395711c6ad60246985361b1070925a94d1025e48cd7c664736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212207e5034fc2f125552971395711c6ad60246985361b1070925a94d1025e48cd7c664736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RSA.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RSA.json new file mode 100644 index 00000000..0af15b38 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RSA.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RSA", + "sourceName": "contracts/utils/cryptography/RSA.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220e3cc1287ea0c955c94549f551b988aae4b86cbd6f47c7358111dfa5c1d5bb48a64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220e3cc1287ea0c955c94549f551b988aae4b86cbd6f47c7358111dfa5c1d5bb48a64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuard.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuard.json new file mode 100644 index 00000000..a4ca031d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuard.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ReentrancyGuard", + "sourceName": "contracts/utils/ReentrancyGuard.sol", + "abi": [ + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuardTransient.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuardTransient.json new file mode 100644 index 00000000..f3288c42 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ReentrancyGuardTransient.json @@ -0,0 +1,16 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ReentrancyGuardTransient", + "sourceName": "contracts/utils/ReentrancyGuardTransient.sol", + "abi": [ + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RelayedCall.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RelayedCall.json new file mode 100644 index 00000000..3c393f8b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/RelayedCall.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "RelayedCall", + "sourceName": "contracts/utils/RelayedCall.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201b442e75dd9a31e2baf73a96174399b3a119cd61832e6ad7502d67c28e2fcfcd64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201b442e75dd9a31e2baf73a96174399b3a119cd61832e6ad7502d67c28e2fcfcd64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeCast.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeCast.json new file mode 100644 index 00000000..a9808911 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeCast.json @@ -0,0 +1,65 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeCast", + "sourceName": "contracts/utils/math/SafeCast.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "value", + "type": "int256" + } + ], + "name": "SafeCastOverflowedIntToUint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintToInt", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220ce508b420c41712f65b21e263f077f66c26651b17109fcc13cb44ba41699c57464736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220ce508b420c41712f65b21e263f077f66c26651b17109fcc13cb44ba41699c57464736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeERC20.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeERC20.json new file mode 100644 index 00000000..06d2a888 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SafeERC20.json @@ -0,0 +1,43 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SafeERC20", + "sourceName": "contracts/token/ERC20/utils/SafeERC20.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentAllowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestedDecrease", + "type": "uint256" + } + ], + "name": "SafeERC20FailedDecreaseAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201b15403788973e3e4c64cacdf25424a98d63999e202414edf5795c256bf9b2a564736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201b15403788973e3e4c64cacdf25424a98d63999e202414edf5795c256bf9b2a564736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ShortStrings.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ShortStrings.json similarity index 55% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ShortStrings.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ShortStrings.json index 196d0a23..362e52d1 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ShortStrings.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/ShortStrings.json @@ -20,8 +20,8 @@ "type": "error" } ], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d0db41542d31ccd96c0c2e6e7f432a62af284bce7400577ffbcc43205fb5825264736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d0db41542d31ccd96c0c2e6e7f432a62af284bce7400577ffbcc43205fb5825264736f6c634300080d0033", + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209f5dcf58aa24194dc423452db9f2a4c1942c4215c9383ed9b2a9a229b405809b64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209f5dcf58aa24194dc423452db9f2a4c1942c4215c9383ed9b2a9a229b405809b64736f6c634300081f0033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignatureChecker.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignatureChecker.json new file mode 100644 index 00000000..62a71e49 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignatureChecker.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignatureChecker", + "sourceName": "contracts/utils/cryptography/SignatureChecker.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203e1eb1a692c616bec2e5f6887e33c8617637acd5dac4453bb42771ad1e64814364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203e1eb1a692c616bec2e5f6887e33c8617637acd5dac4453bb42771ad1e64814364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignedMath.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignedMath.json new file mode 100644 index 00000000..34efc742 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignedMath.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignedMath", + "sourceName": "contracts/utils/math/SignedMath.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122062c2b27aa17fc9c6d2f7f3e4c8b6ddffef402561dbef0c93333dd961c730227764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122062c2b27aa17fc9c6d2f7f3e4c8b6ddffef402561dbef0c93333dd961c730227764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerECDSA.json similarity index 74% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerECDSA.json index 402cb57d..a1ed938e 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5313Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerECDSA.json @@ -1,11 +1,11 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC5313Upgradeable", - "sourceName": "contracts/interfaces/IERC5313Upgradeable.sol", + "contractName": "SignerECDSA", + "sourceName": "contracts/utils/cryptography/signers/SignerECDSA.sol", "abi": [ { "inputs": [], - "name": "owner", + "name": "signer", "outputs": [ { "internalType": "address", diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerEIP7702.json similarity index 58% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerEIP7702.json index 94e98be0..5025e130 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/CrossChainEnabled.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerEIP7702.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabled", - "sourceName": "contracts/crosschain/CrossChainEnabled.sol", + "contractName": "SignerEIP7702", + "sourceName": "contracts/utils/cryptography/signers/SignerEIP7702.sol", "abi": [], "bytecode": "0x", "deployedBytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerERC7913.json similarity index 61% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerERC7913.json index 3a8085f0..bb33426c 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IBeaconUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerERC7913.json @@ -1,16 +1,16 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IBeaconUpgradeable", - "sourceName": "contracts/proxy/beacon/IBeaconUpgradeable.sol", + "contractName": "SignerERC7913", + "sourceName": "contracts/utils/cryptography/signers/SignerERC7913.sol", "abi": [ { "inputs": [], - "name": "implementation", + "name": "signer", "outputs": [ { - "internalType": "address", + "internalType": "bytes", "name": "", - "type": "address" + "type": "bytes" } ], "stateMutability": "view", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerP256.json similarity index 50% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerP256.json index 917bde62..a3b7962e 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820ImplementerUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerP256.json @@ -1,26 +1,36 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC1820ImplementerUpgradeable", - "sourceName": "contracts/utils/introspection/IERC1820ImplementerUpgradeable.sol", + "contractName": "SignerP256", + "sourceName": "contracts/utils/cryptography/signers/SignerP256.sol", "abi": [ { "inputs": [ { "internalType": "bytes32", - "name": "interfaceHash", + "name": "qx", "type": "bytes32" }, { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "bytes32", + "name": "qy", + "type": "bytes32" } ], - "name": "canImplementInterfaceForAddress", + "name": "SignerP256InvalidPublicKey", + "type": "error" + }, + { + "inputs": [], + "name": "signer", "outputs": [ { "internalType": "bytes32", - "name": "", + "name": "qx", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "qy", "type": "bytes32" } ], diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerRSA.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerRSA.json new file mode 100644 index 00000000..876899e3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerRSA.json @@ -0,0 +1,29 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignerRSA", + "sourceName": "contracts/utils/cryptography/signers/SignerRSA.sol", + "abi": [ + { + "inputs": [], + "name": "signer", + "outputs": [ + { + "internalType": "bytes", + "name": "e", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "n", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerWebAuthn.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerWebAuthn.json new file mode 100644 index 00000000..69c3242c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SignerWebAuthn.json @@ -0,0 +1,45 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignerWebAuthn", + "sourceName": "contracts/utils/cryptography/signers/SignerWebAuthn.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "qx", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "qy", + "type": "bytes32" + } + ], + "name": "SignerP256InvalidPublicKey", + "type": "error" + }, + { + "inputs": [], + "name": "signer", + "outputs": [ + { + "internalType": "bytes32", + "name": "qx", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "qy", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SlotDerivation.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SlotDerivation.json new file mode 100644 index 00000000..e01d64db --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/SlotDerivation.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SlotDerivation", + "sourceName": "contracts/utils/SlotDerivation.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203ee1ce45fb83b97586ff17ab2f756c2c9678002bec2743cfa30558a7c7d1e36d64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203ee1ce45fb83b97586ff17ab2f756c2c9678002bec2743cfa30558a7c7d1e36d64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/StorageSlot.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/StorageSlot.json new file mode 100644 index 00000000..5a264918 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/StorageSlot.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "StorageSlot", + "sourceName": "contracts/utils/StorageSlot.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220f977c09bc7975258a22b813aacf201a933389def2f98e4f03a5f3d536bf9d4c364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220f977c09bc7975258a22b813aacf201a933389def2f98e4f03a5f3d536bf9d4c364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Strings.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Strings.json new file mode 100644 index 00000000..f538f295 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Strings.json @@ -0,0 +1,37 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Strings", + "sourceName": "contracts/utils/Strings.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "StringsInsufficientHexLength", + "type": "error" + }, + { + "inputs": [], + "name": "StringsInvalidAddressFormat", + "type": "error" + }, + { + "inputs": [], + "name": "StringsInvalidChar", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cfb7974fce2c8c51c31feca590845c425175020a2630edaf1f13c50989a352a764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220cfb7974fce2c8c51c31feca590845c425175020a2630edaf1f13c50989a352a764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Time.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Time.json new file mode 100644 index 00000000..e4c9dedf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Time.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Time", + "sourceName": "contracts/utils/types/Time.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206db8be8fdab65e9963331e23b6250fa144c420937eebacd35e6ec8541600843c64736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206db8be8fdab65e9963331e23b6250fa144c420937eebacd35e6ec8541600843c64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TimelockController.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TimelockController.json new file mode 100644 index 00000000..e2bcf7fc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TimelockController.json @@ -0,0 +1,1007 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TimelockController", + "sourceName": "contracts/governance/TimelockController.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "minDelay", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "proposers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "executors", + "type": "address[]" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minDelay", + "type": "uint256" + } + ], + "name": "TimelockInsufficientDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloads", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "TimelockInvalidOperationLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TimelockUnauthorizedCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "predecessorId", + "type": "bytes32" + } + ], + "name": "TimelockUnexecutedPredecessor", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "TimelockUnexpectedOperationState", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "CallExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "CallSalt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "CallScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "Cancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDuration", + "type": "uint256" + } + ], + "name": "MinDelayChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "CANCELLER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PROPOSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "executeBatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getMinDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getOperationState", + "outputs": [ + { + "internalType": "enum TimelockController.OperationState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperationBatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationDone", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationPending", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationReady", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "schedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "scheduleBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405234801561000f575f5ffd5b50604051611d2c380380611d2c83398101604081905261002e916102f6565b6100385f3061017b565b506001600160a01b03811615610054576100525f8261017b565b505b5f5b83518110156100e8576100a87fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc185838151811061009557610095610375565b602002602001015161017b60201b60201c565b506100df7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78385838151811061009557610095610375565b50600101610056565b505f5b82518110156101335761012a7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6384838151811061009557610095610375565b506001016100eb565b506002849055604080515f8152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050610389565b5f828152602081815260408083206001600160a01b038516845290915281205460ff1661021b575f838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556101d33390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161021e565b505f5b92915050565b634e487b7160e01b5f52604160045260245ffd5b80516001600160a01b038116811461024e575f5ffd5b919050565b5f82601f830112610262575f5ffd5b81516001600160401b0381111561027b5761027b610224565b604051600582901b90603f8201601f191681016001600160401b03811182821017156102a9576102a9610224565b6040529182526020818501810192908101868411156102c6575f5ffd5b6020860192505b838310156102ec576102de83610238565b8152602092830192016102cd565b5095945050505050565b5f5f5f5f60808587031215610309575f5ffd5b845160208601519094506001600160401b03811115610326575f5ffd5b61033287828801610253565b604087015190945090506001600160401b0381111561034f575f5ffd5b61035b87828801610253565b92505061036a60608601610238565b905092959194509250565b634e487b7160e01b5f52603260045260245ffd5b611996806103965f395ff3fe6080604052600436106101b2575f3560e01c80638065657f116100e7578063bc197c8111610087578063d547741f11610062578063d547741f14610546578063e38335e514610565578063f23a6e6114610578578063f27a0c92146105a3575f5ffd5b8063bc197c81146104d1578063c4d252f5146104fc578063d45c44351461051b575f5ffd5b806391d14854116100c257806391d148541461044d578063a217fddf1461046c578063b08e51c01461047f578063b1c5f427146104b2575f5ffd5b80638065657f146103dc5780638f2a0bb0146103fb5780638f61f4f51461041a575f5ffd5b80632ab0f5291161015257806336568abe1161012d57806336568abe14610353578063584b153e1461037257806364d62353146103915780637958004c146103b0575f5ffd5b80632ab0f529146102f65780632f2ff15d1461031557806331d5075014610334575f5ffd5b8063134008d31161018d578063134008d31461025357806313bc9f2014610266578063150b7a0214610285578063248a9ca3146102c8575f5ffd5b806301d5062a146101bd57806301ffc9a7146101de57806307bd026514610212575f5ffd5b366101b957005b5f5ffd5b3480156101c8575f5ffd5b506101dc6101d7366004611163565b6105b7565b005b3480156101e9575f5ffd5b506101fd6101f83660046111d1565b61068b565b60405190151581526020015b60405180910390f35b34801561021d575f5ffd5b506102457fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610209565b6101dc6102613660046111f8565b61069b565b348015610271575f5ffd5b506101fd61028036600461125e565b61074d565b348015610290575f5ffd5b506102af61029f366004611324565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610209565b3480156102d3575f5ffd5b506102456102e236600461125e565b5f9081526020819052604090206001015490565b348015610301575f5ffd5b506101fd61031036600461125e565b610772565b348015610320575f5ffd5b506101dc61032f366004611387565b61077a565b34801561033f575f5ffd5b506101fd61034e36600461125e565b6107a4565b34801561035e575f5ffd5b506101dc61036d366004611387565b6107c8565b34801561037d575f5ffd5b506101fd61038c36600461125e565b610800565b34801561039c575f5ffd5b506101dc6103ab36600461125e565b610845565b3480156103bb575f5ffd5b506103cf6103ca36600461125e565b6108b8565b60405161020991906113c5565b3480156103e7575f5ffd5b506102456103f63660046111f8565b610900565b348015610406575f5ffd5b506101dc61041536600461142b565b61093e565b348015610425575f5ffd5b506102457fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b348015610458575f5ffd5b506101fd610467366004611387565b610aca565b348015610477575f5ffd5b506102455f81565b34801561048a575f5ffd5b506102457ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104bd575f5ffd5b506102456104cc3660046114dd565b610af2565b3480156104dc575f5ffd5b506102af6104eb366004611606565b63bc197c8160e01b95945050505050565b348015610507575f5ffd5b506101dc61051636600461125e565b610b36565b348015610526575f5ffd5b5061024561053536600461125e565b5f9081526001602052604090205490565b348015610551575f5ffd5b506101dc610560366004611387565b610be0565b6101dc6105733660046114dd565b610c04565b348015610583575f5ffd5b506102af6105923660046116b2565b63f23a6e6160e01b95945050505050565b3480156105ae575f5ffd5b50600254610245565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16105e181610d85565b5f6105f0898989898989610900565b90506105fc8184610d92565b5f817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a6040516106379695949392919061172d565b60405180910390a3831561068057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161067791815260200190565b60405180910390a25b505050505050505050565b5f61069582610e23565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636106c6815f610aca565b6106d4576106d48133610e47565b5f6106e3888888888888610900565b90506106ef8185610e84565b6106fb88888888610ed2565b5f817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107329493929190611769565b60405180910390a361074381610f46565b5050505050505050565b5f60025b61075a836108b8565b600381111561076b5761076b6113b1565b1492915050565b5f6003610751565b5f8281526020819052604090206001015461079481610d85565b61079e8383610f71565b50505050565b5f806107af836108b8565b60038111156107c0576107c06113b1565b141592915050565b6001600160a01b03811633146107f15760405163334bd91960e11b815260040160405180910390fd5b6107fb8282611000565b505050565b5f5f61080b836108b8565b90506001816003811115610821576108216113b1565b148061083e5750600281600381111561083c5761083c6113b1565b145b9392505050565b333081146108765760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b60025460408051918252602082018490527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150600255565b5f81815260016020526040812054805f036108d557505f92915050565b600181036108e65750600392915050565b428111156108f75750600192915050565b50600292915050565b5f86868686868660405160200161091c9695949392919061172d565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161096881610d85565b88871415806109775750888514155b156109a9576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161086d565b5f6109ba8b8b8b8b8b8b8b8b610af2565b90506109c68184610d92565b5f5b8a811015610a7b5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a0557610a05611790565b9050602002016020810190610a1a91906117a4565b8d8d86818110610a2c57610a2c611790565b905060200201358c8c87818110610a4557610a45611790565b9050602002810190610a5791906117bd565b8c8b604051610a6b9695949392919061172d565b60405180910390a36001016109c8565b508315610abd57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610ab491815260200190565b60405180910390a25b5050505050505050505050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8888888888888888604051602001610b12989796959493929190611893565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610b6081610d85565b610b6982610800565b610ba55781610b786002611069565b610b826001611069565b604051635ead8eb560e01b8152600481019390935217602482015260440161086d565b5f828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b5f82815260208190526040902060010154610bfa81610d85565b61079e8383611000565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610c2f815f610aca565b610c3d57610c3d8133610e47565b8786141580610c4c5750878414155b15610c7e576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161086d565b5f610c8f8a8a8a8a8a8a8a8a610af2565b9050610c9b8185610e84565b5f5b89811015610d6f575f8b8b83818110610cb857610cb8611790565b9050602002016020810190610ccd91906117a4565b90505f8a8a84818110610ce257610ce2611790565b905060200201359050365f8a8a86818110610cff57610cff611790565b9050602002810190610d1191906117bd565b91509150610d2184848484610ed2565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610d589493929190611769565b60405180910390a350505050806001019050610c9d565b50610d7981610f46565b50505050505050505050565b610d8f8133610e47565b50565b610d9b826107a4565b15610dcc5781610daa5f611069565b604051635ead8eb560e01b81526004810192909252602482015260440161086d565b5f610dd660025490565b905080821015610e0357604051635433660960e01b8152600481018390526024810182905260440161086d565b610e0d8242611932565b5f93845260016020526040909320929092555050565b5f6001600160e01b03198216630271189760e51b148061069557506106958261108b565b610e518282610aca565b610e805760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161086d565b5050565b610e8d8261074d565b610e9c5781610daa6002611069565b8015801590610eb15750610eaf81610772565b155b15610e805760405163121534c360e31b81526004810182905260240161086d565b5f5f856001600160a01b0316858585604051610eef929190611951565b5f6040518083038185875af1925050503d805f8114610f29576040519150601f19603f3d011682016040523d82523d5f602084013e610f2e565b606091505b5091509150610f3d82826110bf565b50505050505050565b610f4f8161074d565b610f5e5780610daa6002611069565b5f90815260016020819052604090912055565b5f610f7c8383610aca565b610ff9575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610fb13390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610695565b505f610695565b5f61100b8383610aca565b15610ff9575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610695565b5f81600381111561107c5761107c6113b1565b600160ff919091161b92915050565b5f6001600160e01b03198216637965db0b60e01b148061069557506301ffc9a760e01b6001600160e01b0319831614610695565b606082156110ce575080610695565b8151156110e3576110de826110fc565b610695565b60405163d6bda27560e01b815260040160405180910390fd5b805160208201fd5b80356001600160a01b038116811461111a575f5ffd5b919050565b5f5f83601f84011261112f575f5ffd5b5081356001600160401b03811115611145575f5ffd5b60208301915083602082850101111561115c575f5ffd5b9250929050565b5f5f5f5f5f5f5f60c0888a031215611179575f5ffd5b61118288611104565b96506020880135955060408801356001600160401b038111156111a3575f5ffd5b6111af8a828b0161111f565b989b979a50986060810135976080820135975060a09091013595509350505050565b5f602082840312156111e1575f5ffd5b81356001600160e01b03198116811461083e575f5ffd5b5f5f5f5f5f5f60a0878903121561120d575f5ffd5b61121687611104565b95506020870135945060408701356001600160401b03811115611237575f5ffd5b61124389828a0161111f565b979a9699509760608101359660809091013595509350505050565b5f6020828403121561126e575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156112b1576112b1611275565b604052919050565b5f82601f8301126112c8575f5ffd5b81356001600160401b038111156112e1576112e1611275565b6112f4601f8201601f1916602001611289565b818152846020838601011115611308575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f60808587031215611337575f5ffd5b61134085611104565b935061134e60208601611104565b92506040850135915060608501356001600160401b0381111561136f575f5ffd5b61137b878288016112b9565b91505092959194509250565b5f5f60408385031215611398575f5ffd5b823591506113a860208401611104565b90509250929050565b634e487b7160e01b5f52602160045260245ffd5b60208101600483106113e557634e487b7160e01b5f52602160045260245ffd5b91905290565b5f5f83601f8401126113fb575f5ffd5b5081356001600160401b03811115611411575f5ffd5b6020830191508360208260051b850101111561115c575f5ffd5b5f5f5f5f5f5f5f5f5f60c08a8c031215611443575f5ffd5b89356001600160401b03811115611458575f5ffd5b6114648c828d016113eb565b909a5098505060208a01356001600160401b03811115611482575f5ffd5b61148e8c828d016113eb565b90985096505060408a01356001600160401b038111156114ac575f5ffd5b6114b88c828d016113eb565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b5f5f5f5f5f5f5f5f60a0898b0312156114f4575f5ffd5b88356001600160401b03811115611509575f5ffd5b6115158b828c016113eb565b90995097505060208901356001600160401b03811115611533575f5ffd5b61153f8b828c016113eb565b90975095505060408901356001600160401b0381111561155d575f5ffd5b6115698b828c016113eb565b999c989b509699959896976060870135966080013595509350505050565b5f82601f830112611596575f5ffd5b81356001600160401b038111156115af576115af611275565b8060051b6115bf60208201611289565b918252602081850181019290810190868411156115da575f5ffd5b6020860192505b838310156115fc5782358252602092830192909101906115e1565b9695505050505050565b5f5f5f5f5f60a0868803121561161a575f5ffd5b61162386611104565b945061163160208701611104565b935060408601356001600160401b0381111561164b575f5ffd5b61165788828901611587565b93505060608601356001600160401b03811115611672575f5ffd5b61167e88828901611587565b92505060808601356001600160401b03811115611699575f5ffd5b6116a5888289016112b9565b9150509295509295909350565b5f5f5f5f5f60a086880312156116c6575f5ffd5b6116cf86611104565b94506116dd60208701611104565b9350604086013592506060860135915060808601356001600160401b03811115611699575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201525f61175460a083018688611705565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201525f6115fc606083018486611705565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156117b4575f5ffd5b61083e82611104565b5f5f8335601e198436030181126117d2575f5ffd5b8301803591506001600160401b038211156117eb575f5ffd5b60200191503681900382131561115c575f5ffd5b5f8383855260208501945060208460051b820101835f5b8681101561188757838303601f19018852813536879003601e1901811261183b575f5ffd5b86016020810190356001600160401b03811115611856575f5ffd5b803603821315611864575f5ffd5b61186f858284611705565b60209a8b019a90955093909301925050600101611816565b50909695505050505050565b60a080825281018890525f8960c08301825b8b8110156118d3576001600160a01b036118be84611104565b168252602092830192909101906001016118a5565b5083810360208501528881526001600160fb1b038911156118f2575f5ffd5b8860051b9150818a6020830137018281036020908101604085015261191a90820187896117ff565b60608401959095525050608001529695505050505050565b8082018082111561069557634e487b7160e01b5f52601160045260245ffd5b818382375f910190815291905056fea2646970667358221220c7b86ecf035b4b1b17ad596e60aecb3bc7e485225444d1162bf12a946793f26364736f6c634300081f0033", + "deployedBytecode": "0x6080604052600436106101b2575f3560e01c80638065657f116100e7578063bc197c8111610087578063d547741f11610062578063d547741f14610546578063e38335e514610565578063f23a6e6114610578578063f27a0c92146105a3575f5ffd5b8063bc197c81146104d1578063c4d252f5146104fc578063d45c44351461051b575f5ffd5b806391d14854116100c257806391d148541461044d578063a217fddf1461046c578063b08e51c01461047f578063b1c5f427146104b2575f5ffd5b80638065657f146103dc5780638f2a0bb0146103fb5780638f61f4f51461041a575f5ffd5b80632ab0f5291161015257806336568abe1161012d57806336568abe14610353578063584b153e1461037257806364d62353146103915780637958004c146103b0575f5ffd5b80632ab0f529146102f65780632f2ff15d1461031557806331d5075014610334575f5ffd5b8063134008d31161018d578063134008d31461025357806313bc9f2014610266578063150b7a0214610285578063248a9ca3146102c8575f5ffd5b806301d5062a146101bd57806301ffc9a7146101de57806307bd026514610212575f5ffd5b366101b957005b5f5ffd5b3480156101c8575f5ffd5b506101dc6101d7366004611163565b6105b7565b005b3480156101e9575f5ffd5b506101fd6101f83660046111d1565b61068b565b60405190151581526020015b60405180910390f35b34801561021d575f5ffd5b506102457fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610209565b6101dc6102613660046111f8565b61069b565b348015610271575f5ffd5b506101fd61028036600461125e565b61074d565b348015610290575f5ffd5b506102af61029f366004611324565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610209565b3480156102d3575f5ffd5b506102456102e236600461125e565b5f9081526020819052604090206001015490565b348015610301575f5ffd5b506101fd61031036600461125e565b610772565b348015610320575f5ffd5b506101dc61032f366004611387565b61077a565b34801561033f575f5ffd5b506101fd61034e36600461125e565b6107a4565b34801561035e575f5ffd5b506101dc61036d366004611387565b6107c8565b34801561037d575f5ffd5b506101fd61038c36600461125e565b610800565b34801561039c575f5ffd5b506101dc6103ab36600461125e565b610845565b3480156103bb575f5ffd5b506103cf6103ca36600461125e565b6108b8565b60405161020991906113c5565b3480156103e7575f5ffd5b506102456103f63660046111f8565b610900565b348015610406575f5ffd5b506101dc61041536600461142b565b61093e565b348015610425575f5ffd5b506102457fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b348015610458575f5ffd5b506101fd610467366004611387565b610aca565b348015610477575f5ffd5b506102455f81565b34801561048a575f5ffd5b506102457ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104bd575f5ffd5b506102456104cc3660046114dd565b610af2565b3480156104dc575f5ffd5b506102af6104eb366004611606565b63bc197c8160e01b95945050505050565b348015610507575f5ffd5b506101dc61051636600461125e565b610b36565b348015610526575f5ffd5b5061024561053536600461125e565b5f9081526001602052604090205490565b348015610551575f5ffd5b506101dc610560366004611387565b610be0565b6101dc6105733660046114dd565b610c04565b348015610583575f5ffd5b506102af6105923660046116b2565b63f23a6e6160e01b95945050505050565b3480156105ae575f5ffd5b50600254610245565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16105e181610d85565b5f6105f0898989898989610900565b90506105fc8184610d92565b5f817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a6040516106379695949392919061172d565b60405180910390a3831561068057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161067791815260200190565b60405180910390a25b505050505050505050565b5f61069582610e23565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e636106c6815f610aca565b6106d4576106d48133610e47565b5f6106e3888888888888610900565b90506106ef8185610e84565b6106fb88888888610ed2565b5f817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107329493929190611769565b60405180910390a361074381610f46565b5050505050505050565b5f60025b61075a836108b8565b600381111561076b5761076b6113b1565b1492915050565b5f6003610751565b5f8281526020819052604090206001015461079481610d85565b61079e8383610f71565b50505050565b5f806107af836108b8565b60038111156107c0576107c06113b1565b141592915050565b6001600160a01b03811633146107f15760405163334bd91960e11b815260040160405180910390fd5b6107fb8282611000565b505050565b5f5f61080b836108b8565b90506001816003811115610821576108216113b1565b148061083e5750600281600381111561083c5761083c6113b1565b145b9392505050565b333081146108765760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b60025460408051918252602082018490527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150600255565b5f81815260016020526040812054805f036108d557505f92915050565b600181036108e65750600392915050565b428111156108f75750600192915050565b50600292915050565b5f86868686868660405160200161091c9695949392919061172d565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161096881610d85565b88871415806109775750888514155b156109a9576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161086d565b5f6109ba8b8b8b8b8b8b8b8b610af2565b90506109c68184610d92565b5f5b8a811015610a7b5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a0557610a05611790565b9050602002016020810190610a1a91906117a4565b8d8d86818110610a2c57610a2c611790565b905060200201358c8c87818110610a4557610a45611790565b9050602002810190610a5791906117bd565b8c8b604051610a6b9695949392919061172d565b60405180910390a36001016109c8565b508315610abd57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610ab491815260200190565b60405180910390a25b5050505050505050505050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8888888888888888604051602001610b12989796959493929190611893565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610b6081610d85565b610b6982610800565b610ba55781610b786002611069565b610b826001611069565b604051635ead8eb560e01b8152600481019390935217602482015260440161086d565b5f828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b5f82815260208190526040902060010154610bfa81610d85565b61079e8383611000565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610c2f815f610aca565b610c3d57610c3d8133610e47565b8786141580610c4c5750878414155b15610c7e576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161086d565b5f610c8f8a8a8a8a8a8a8a8a610af2565b9050610c9b8185610e84565b5f5b89811015610d6f575f8b8b83818110610cb857610cb8611790565b9050602002016020810190610ccd91906117a4565b90505f8a8a84818110610ce257610ce2611790565b905060200201359050365f8a8a86818110610cff57610cff611790565b9050602002810190610d1191906117bd565b91509150610d2184848484610ed2565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610d589493929190611769565b60405180910390a350505050806001019050610c9d565b50610d7981610f46565b50505050505050505050565b610d8f8133610e47565b50565b610d9b826107a4565b15610dcc5781610daa5f611069565b604051635ead8eb560e01b81526004810192909252602482015260440161086d565b5f610dd660025490565b905080821015610e0357604051635433660960e01b8152600481018390526024810182905260440161086d565b610e0d8242611932565b5f93845260016020526040909320929092555050565b5f6001600160e01b03198216630271189760e51b148061069557506106958261108b565b610e518282610aca565b610e805760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161086d565b5050565b610e8d8261074d565b610e9c5781610daa6002611069565b8015801590610eb15750610eaf81610772565b155b15610e805760405163121534c360e31b81526004810182905260240161086d565b5f5f856001600160a01b0316858585604051610eef929190611951565b5f6040518083038185875af1925050503d805f8114610f29576040519150601f19603f3d011682016040523d82523d5f602084013e610f2e565b606091505b5091509150610f3d82826110bf565b50505050505050565b610f4f8161074d565b610f5e5780610daa6002611069565b5f90815260016020819052604090912055565b5f610f7c8383610aca565b610ff9575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610fb13390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610695565b505f610695565b5f61100b8383610aca565b15610ff9575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610695565b5f81600381111561107c5761107c6113b1565b600160ff919091161b92915050565b5f6001600160e01b03198216637965db0b60e01b148061069557506301ffc9a760e01b6001600160e01b0319831614610695565b606082156110ce575080610695565b8151156110e3576110de826110fc565b610695565b60405163d6bda27560e01b815260040160405180910390fd5b805160208201fd5b80356001600160a01b038116811461111a575f5ffd5b919050565b5f5f83601f84011261112f575f5ffd5b5081356001600160401b03811115611145575f5ffd5b60208301915083602082850101111561115c575f5ffd5b9250929050565b5f5f5f5f5f5f5f60c0888a031215611179575f5ffd5b61118288611104565b96506020880135955060408801356001600160401b038111156111a3575f5ffd5b6111af8a828b0161111f565b989b979a50986060810135976080820135975060a09091013595509350505050565b5f602082840312156111e1575f5ffd5b81356001600160e01b03198116811461083e575f5ffd5b5f5f5f5f5f5f60a0878903121561120d575f5ffd5b61121687611104565b95506020870135945060408701356001600160401b03811115611237575f5ffd5b61124389828a0161111f565b979a9699509760608101359660809091013595509350505050565b5f6020828403121561126e575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156112b1576112b1611275565b604052919050565b5f82601f8301126112c8575f5ffd5b81356001600160401b038111156112e1576112e1611275565b6112f4601f8201601f1916602001611289565b818152846020838601011115611308575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f60808587031215611337575f5ffd5b61134085611104565b935061134e60208601611104565b92506040850135915060608501356001600160401b0381111561136f575f5ffd5b61137b878288016112b9565b91505092959194509250565b5f5f60408385031215611398575f5ffd5b823591506113a860208401611104565b90509250929050565b634e487b7160e01b5f52602160045260245ffd5b60208101600483106113e557634e487b7160e01b5f52602160045260245ffd5b91905290565b5f5f83601f8401126113fb575f5ffd5b5081356001600160401b03811115611411575f5ffd5b6020830191508360208260051b850101111561115c575f5ffd5b5f5f5f5f5f5f5f5f5f60c08a8c031215611443575f5ffd5b89356001600160401b03811115611458575f5ffd5b6114648c828d016113eb565b909a5098505060208a01356001600160401b03811115611482575f5ffd5b61148e8c828d016113eb565b90985096505060408a01356001600160401b038111156114ac575f5ffd5b6114b88c828d016113eb565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b5f5f5f5f5f5f5f5f60a0898b0312156114f4575f5ffd5b88356001600160401b03811115611509575f5ffd5b6115158b828c016113eb565b90995097505060208901356001600160401b03811115611533575f5ffd5b61153f8b828c016113eb565b90975095505060408901356001600160401b0381111561155d575f5ffd5b6115698b828c016113eb565b999c989b509699959896976060870135966080013595509350505050565b5f82601f830112611596575f5ffd5b81356001600160401b038111156115af576115af611275565b8060051b6115bf60208201611289565b918252602081850181019290810190868411156115da575f5ffd5b6020860192505b838310156115fc5782358252602092830192909101906115e1565b9695505050505050565b5f5f5f5f5f60a0868803121561161a575f5ffd5b61162386611104565b945061163160208701611104565b935060408601356001600160401b0381111561164b575f5ffd5b61165788828901611587565b93505060608601356001600160401b03811115611672575f5ffd5b61167e88828901611587565b92505060808601356001600160401b03811115611699575f5ffd5b6116a5888289016112b9565b9150509295509295909350565b5f5f5f5f5f60a086880312156116c6575f5ffd5b6116cf86611104565b94506116dd60208701611104565b9350604086013592506060860135915060808601356001600160401b03811115611699575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201525f61175460a083018688611705565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201525f6115fc606083018486611705565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156117b4575f5ffd5b61083e82611104565b5f5f8335601e198436030181126117d2575f5ffd5b8301803591506001600160401b038211156117eb575f5ffd5b60200191503681900382131561115c575f5ffd5b5f8383855260208501945060208460051b820101835f5b8681101561188757838303601f19018852813536879003601e1901811261183b575f5ffd5b86016020810190356001600160401b03811115611856575f5ffd5b803603821315611864575f5ffd5b61186f858284611705565b60209a8b019a90955093909301925050600101611816565b50909695505050505050565b60a080825281018890525f8960c08301825b8b8110156118d3576001600160a01b036118be84611104565b168252602092830192909101906001016118a5565b5083810360208501528881526001600160fb1b038911156118f2575f5ffd5b8860051b9150818a6020830137018281036020908101604085015261191a90820187896117ff565b60608401959095525050608001529695505050505050565b8082018082111561069557634e487b7160e01b5f52601160045260245ffd5b818382375f910190815291905056fea2646970667358221220c7b86ecf035b4b1b17ad596e60aecb3bc7e485225444d1162bf12a946793f26364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransientSlot.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransientSlot.json new file mode 100644 index 00000000..edb070a7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransientSlot.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TransientSlot", + "sourceName": "contracts/utils/TransientSlot.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201847e50ee6c48d5893f0cf45542529a4849ddc1ab71a57f6c8e5aa7cf8510dc364736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201847e50ee6c48d5893f0cf45542529a4849ddc1ab71a57f6c8e5aa7cf8510dc364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransparentUpgradeableProxy.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransparentUpgradeableProxy.json new file mode 100644 index 00000000..b89b038c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TransparentUpgradeableProxy.json @@ -0,0 +1,121 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TransparentUpgradeableProxy", + "sourceName": "contracts/proxy/transparent/TransparentUpgradeableProxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "ERC1967InvalidAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967ProxyUninitialized", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "ProxyDeniedAdminAccess", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + } + ], + "bytecode": "0x60a0604052604051610d77380380610d7783398101604081905261002291610366565b82818051610043576040516330a289cf60e21b815260040160405180910390fd5b61004d82826100ab565b50508160405161005c9061032a565b6001600160a01b039091168152602001604051809103905ff080158015610085573d5f5f3e3d5ffd5b506001600160a01b03166080526100a361009e60805190565b610109565b505050610437565b6100b482610176565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156100fd576100f882826101f4565b505050565b610105610295565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6101485f516020610d575f395f51905f52546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1610173816102b6565b50565b806001600160a01b03163b5f036101b057604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b60605f61020184846102f3565b905080801561022257505f3d118061022257505f846001600160a01b03163b115b156102375761022f610306565b91505061028f565b801561026157604051639996b31560e01b81526001600160a01b03851660048201526024016101a7565b3d156102745761026f61031f565b61028d565b60405163d6bda27560e01b815260040160405180910390fd5b505b92915050565b34156102b45760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b0381166102df57604051633173bdd160e11b81525f60048201526024016101a7565b805f516020610d575f395f51905f526101d3565b5f5f5f835160208501865af49392505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b6104e68061087183390190565b80516001600160a01b038116811461034d575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f60608486031215610378575f5ffd5b61038184610337565b925061038f60208501610337565b60408501519092506001600160401b038111156103aa575f5ffd5b8401601f810186136103ba575f5ffd5b80516001600160401b038111156103d3576103d3610352565b604051601f8201601f19908116603f011681016001600160401b038111828210171561040157610401610352565b604052818152828201602001881015610418575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b60805161042361044e5f395f601001526104235ff3fe608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007a575f356001600160e01b03191663278f794360e11b14610070576040516334ad5dbb60e21b815260040160405180910390fd5b610078610082565b565b6100786100b0565b5f8061009136600481846102e1565b81019061009e919061031c565b915091506100ac82826100c0565b5050565b6100786100bb61011a565b610151565b6100c98261016f565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101125761010d82826101ea565b505050565b6100ac61028b565b5f61014c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e80801561016b573d5ff35b3d5ffd5b806001600160a01b03163b5f036101a957604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f6101f784846102aa565b905080801561021857505f3d118061021857505f846001600160a01b03163b115b1561022d576102256102bd565b915050610285565b801561025757604051639996b31560e01b81526001600160a01b03851660048201526024016101a0565b3d1561026a576102656102d6565b610283565b60405163d6bda27560e01b815260040160405180910390fd5b505b92915050565b34156100785760405163b398979f60e01b815260040160405180910390fd5b5f5f5f835160208501865af49392505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f5f858511156102ef575f5ffd5b838611156102fb575f5ffd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561032d575f5ffd5b82356001600160a01b0381168114610343575f5ffd5b9150602083013567ffffffffffffffff81111561035e575f5ffd5b8301601f8101851361036e575f5ffd5b803567ffffffffffffffff81111561038857610388610308565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156103b7576103b7610308565b6040528181528282016020018710156103ce575f5ffd5b816020840160208301375f60208383010152809350505050925092905056fea264697066735822122041aa738378e8deb3043c60b5c2ef92cb17f172c498e0b25387b0e58f00f20f3164736f6c634300081f00336080604052348015600e575f5ffd5b506040516104e63803806104e6833981016040819052602b9160b4565b806001600160a01b038116605857604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b605f816065565b505060df565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f6020828403121560c3575f5ffd5b81516001600160a01b038116811460d8575f5ffd5b9392505050565b6103fa806100ec5f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f5ffd5b348015610058575f5ffd5b506100616100fd565b005b34801561006e575f5ffd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f5ffd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610365565b3480156100e9575f5ffd5b506100616100f836600461037e565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906101489086908690600401610399565b5f604051808303818588803b15801561015f575f5ffd5b505af1158015610171573d5f5f3e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b5f5f5f60608486031215610272575f5ffd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff8111156102a8575f5ffd5b8401601f810186136102b8575f5ffd5b803567ffffffffffffffff8111156102d2576102d261024c565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156103015761030161024c565b604052818152828201602001881015610318575f5ffd5b816020840160208301375f602083830101528093505050509250925092565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6103776020830184610337565b9392505050565b5f6020828403121561038e575f5ffd5b813561037781610238565b6001600160a01b03831681526040602082018190525f906103bc90830184610337565b94935050505056fea2646970667358221220767bf68f5ff9871c0d3016f690cfe21595e50ff44f7c9cd9f488c75c901bbe1f64736f6c634300081f0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007a575f356001600160e01b03191663278f794360e11b14610070576040516334ad5dbb60e21b815260040160405180910390fd5b610078610082565b565b6100786100b0565b5f8061009136600481846102e1565b81019061009e919061031c565b915091506100ac82826100c0565b5050565b6100786100bb61011a565b610151565b6100c98261016f565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101125761010d82826101ea565b505050565b6100ac61028b565b5f61014c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b365f5f375f5f365f845af43d5f5f3e80801561016b573d5ff35b3d5ffd5b806001600160a01b03163b5f036101a957604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f6101f784846102aa565b905080801561021857505f3d118061021857505f846001600160a01b03163b115b1561022d576102256102bd565b915050610285565b801561025757604051639996b31560e01b81526001600160a01b03851660048201526024016101a0565b3d1561026a576102656102d6565b610283565b60405163d6bda27560e01b815260040160405180910390fd5b505b92915050565b34156100785760405163b398979f60e01b815260040160405180910390fd5b5f5f5f835160208501865af49392505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f5f858511156102ef575f5ffd5b838611156102fb575f5ffd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561032d575f5ffd5b82356001600160a01b0381168114610343575f5ffd5b9150602083013567ffffffffffffffff81111561035e575f5ffd5b8301601f8101851361036e575f5ffd5b803567ffffffffffffffff81111561038857610388610308565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156103b7576103b7610308565b6040528181528282016020018710156103ce575f5ffd5b816020840160208301375f60208383010152809350505050925092905056fea264697066735822122041aa738378e8deb3043c60b5c2ef92cb17f172c498e0b25387b0e58f00f20f3164736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TrieProof.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TrieProof.json new file mode 100644 index 00000000..1192fd4e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/TrieProof.json @@ -0,0 +1,22 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TrieProof", + "sourceName": "contracts/utils/cryptography/TrieProof.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "enum TrieProof.ProofError", + "name": "err", + "type": "uint8" + } + ], + "name": "TrieProofTraversalError", + "type": "error" + } + ], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220a65d85396bfb2a85c12c3dd370bf217b91b2980fbc5c69fa12b0b8059535c69764736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220a65d85396bfb2a85c12c3dd370bf217b91b2980fbc5c69fa12b0b8059535c69764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/UUPSUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/UUPSUpgradeable.json similarity index 65% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/UUPSUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/UUPSUpgradeable.json index f373b85e..54382c74 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/UUPSUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/UUPSUpgradeable.json @@ -4,49 +4,52 @@ "sourceName": "contracts/proxy/utils/UUPSUpgradeable.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "target", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "name": "AddressEmptyCode", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "beacon", + "name": "implementation", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "name": "ERC1967InvalidImplementation", + "type": "error" + }, + { + "inputs": [], + "name": "ERC1967NonPayable", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "UUPSUnauthorizedCallContext", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bytes32", + "name": "slot", + "type": "bytes32" } ], - "name": "Initialized", - "type": "event" + "name": "UUPSUnsupportedProxiableUUID", + "type": "error" }, { "anonymous": false, @@ -63,28 +66,28 @@ }, { "inputs": [], - "name": "proxiableUUID", + "name": "UPGRADE_INTERFACE_VERSION", "outputs": [ { - "internalType": "bytes32", + "internalType": "string", "name": "", - "type": "bytes32" + "type": "string" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "proxiableUUID", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/UpgradeableBeacon.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/UpgradeableBeacon.json new file mode 100644 index 00000000..e464fa72 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/UpgradeableBeacon.json @@ -0,0 +1,151 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "UpgradeableBeacon", + "sourceName": "contracts/proxy/beacon/UpgradeableBeacon.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "BeaconInvalidImplementation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561000f575f5ffd5b5060405161042138038061042183398101604081905261002e9161015f565b806001600160a01b03811661005d57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61006681610077565b50610070826100c6565b5050610190565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b806001600160a01b03163b5f036100fb5760405163211eb15960e21b81526001600160a01b0382166004820152602401610054565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b80516001600160a01b038116811461015a575f5ffd5b919050565b5f5f60408385031215610170575f5ffd5b61017983610144565b915061018760208401610144565b90509250929050565b6102848061019d5f395ff3fe608060405234801561000f575f5ffd5b5060043610610055575f3560e01c80633659cfe6146100595780635c60da1b1461006e578063715018a6146100975780638da5cb5b1461009f578063f2fde38b146100af575b5f5ffd5b61006c610067366004610221565b6100c2565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006c6100d6565b5f546001600160a01b031661007b565b61006c6100bd366004610221565b6100e9565b6100ca610128565b6100d381610154565b50565b6100de610128565b6100e75f6101d2565b565b6100f1610128565b6001600160a01b03811661011f57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6100d3816101d2565b5f546001600160a01b031633146100e75760405163118cdaa760e01b8152336004820152602401610116565b806001600160a01b03163b5f036101895760405163211eb15960e21b81526001600160a01b0382166004820152602401610116565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208284031215610231575f5ffd5b81356001600160a01b0381168114610247575f5ffd5b939250505056fea26469706673582212205ad2d0710b781c05056a59642a8afb62929b4aa49c97eba66a8242c077e0ff0164736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610055575f3560e01c80633659cfe6146100595780635c60da1b1461006e578063715018a6146100975780638da5cb5b1461009f578063f2fde38b146100af575b5f5ffd5b61006c610067366004610221565b6100c2565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b61006c6100d6565b5f546001600160a01b031661007b565b61006c6100bd366004610221565b6100e9565b6100ca610128565b6100d381610154565b50565b6100de610128565b6100e75f6101d2565b565b6100f1610128565b6001600160a01b03811661011f57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6100d3816101d2565b5f546001600160a01b031633146100e75760405163118cdaa760e01b8152336004820152602401610116565b806001600160a01b03163b5f036101895760405163211eb15960e21b81526001600160a01b0382166004820152602401610116565b600180546001600160a01b0319166001600160a01b0383169081179091556040517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60208284031215610231575f5ffd5b81356001600160a01b0381168114610247575f5ffd5b939250505056fea26469706673582212205ad2d0710b781c05056a59642a8afb62929b4aa49c97eba66a8242c077e0ff0164736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWallet.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWallet.json new file mode 100644 index 00000000..d3fd70a1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWallet.json @@ -0,0 +1,340 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VestingWallet", + "sourceName": "contracts/finance/VestingWallet.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "uint64", + "name": "startTimestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "durationSeconds", + "type": "uint64" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20Released", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EtherReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "end", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60c0604052604051610a66380380610a66833981016040819052610022916100dc565b826001600160a01b03811661005057604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b61005981610072565b506001600160401b039182166080521660a05250610129565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160401b03811681146100d7575f5ffd5b919050565b5f5f5f606084860312156100ee575f5ffd5b83516001600160a01b0381168114610104575f5ffd5b9250610112602085016100c1565b9150610120604085016100c1565b90509250925092565b60805160a05161090e6101585f395f8181610127015281816104d401526105b201525f6104ae015261090e5ff3fe6080604052600436106100dc575f3560e01c8063961325211161007c578063be9a655511610057578063be9a65551461024a578063efbe1c1c1461025e578063f2fde38b14610272578063fbccedae14610291575f5ffd5b806396132521146101e35780639852595c146101f7578063a3f8eace1461022b575f5ffd5b8063715018a6116100b7578063715018a614610176578063810ec23b1461018a57806386d1a69f146101a95780638da5cb5b146101bd575f5ffd5b80630a17b06b146100e75780630fb5a6b4146101195780631916558714610155575f5ffd5b366100e357005b5f5ffd5b3480156100f2575f5ffd5b506101066101013660046107d8565b6102a5565b6040519081526020015b60405180910390f35b348015610124575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16610106565b348015610160575f5ffd5b5061017461016f366004610807565b6102c8565b005b348015610181575f5ffd5b50610174610360565b348015610195575f5ffd5b506101066101a4366004610820565b610373565b3480156101b4575f5ffd5b50610174610406565b3480156101c8575f5ffd5b505f546040516001600160a01b039091168152602001610110565b3480156101ee575f5ffd5b50600154610106565b348015610202575f5ffd5b50610106610211366004610807565b6001600160a01b03165f9081526002602052604090205490565b348015610236575f5ffd5b50610106610245366004610807565b610477565b348015610255575f5ffd5b506101066104a3565b348015610269575f5ffd5b506101066104d1565b34801561027d575f5ffd5b5061017461028c366004610807565b610514565b34801561029c575f5ffd5b50610106610553565b5f6102c26102b260015490565b6102bc9047610865565b83610570565b92915050565b5f6102d282610477565b6001600160a01b0383165f908152600260205260408120805492935083929091906102fe908490610865565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a261035c826103565f546001600160a01b031690565b83610612565b5050565b61036861064c565b6103715f610678565b565b6001600160a01b0382165f908152600260205260408120546103ff906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156103d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103f59190610878565b6102bc9190610865565b9392505050565b5f61040f610553565b90508060015f8282546104229190610865565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a161047461046e5f546001600160a01b031690565b826106c7565b50565b6001600160a01b0381165f908152600260205260408120546104998342610373565b6102c2919061088f565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690565b5f7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166105056104a3565b61050f9190610865565b905090565b61051c61064c565b6001600160a01b03811661054a57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61047481610678565b5f61055d60015490565b610566426102a5565b61050f919061088f565b5f6105796104a3565b8267ffffffffffffffff16101561059157505f6102c2565b6105996104d1565b8267ffffffffffffffff16106105b05750816102c2565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166105e36104a3565b6105f79067ffffffffffffffff851661088f565b61060190856108a2565b61060b91906108b9565b90506102c2565b61061f838383600161073a565b61064757604051635274afe760e01b81526001600160a01b0384166004820152602401610541565b505050565b5f546001600160a01b031633146103715760405163118cdaa760e01b8152336004820152602401610541565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b804710156106f15760405163cf47918160e01b815247600482015260248101829052604401610541565b61070a828260405180602001604052805f81525061079c565b15610713575050565b3d156107215761035c6107b1565b60405163d6bda27560e01b815260040160405180910390fd5b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610790578383151615610784573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b803567ffffffffffffffff811681146107d3575f5ffd5b919050565b5f602082840312156107e8575f5ffd5b6103ff826107bc565b80356001600160a01b03811681146107d3575f5ffd5b5f60208284031215610817575f5ffd5b6103ff826107f1565b5f5f60408385031215610831575f5ffd5b61083a836107f1565b9150610848602084016107bc565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b808201808211156102c2576102c2610851565b5f60208284031215610888575f5ffd5b5051919050565b818103818111156102c2576102c2610851565b80820281158282048414176102c2576102c2610851565b5f826108d357634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212209fb6bed22a73faea1a7b3c2ce2fbb3659146062c94438a8904b26c4a93774b1964736f6c634300081f0033", + "deployedBytecode": "0x6080604052600436106100dc575f3560e01c8063961325211161007c578063be9a655511610057578063be9a65551461024a578063efbe1c1c1461025e578063f2fde38b14610272578063fbccedae14610291575f5ffd5b806396132521146101e35780639852595c146101f7578063a3f8eace1461022b575f5ffd5b8063715018a6116100b7578063715018a614610176578063810ec23b1461018a57806386d1a69f146101a95780638da5cb5b146101bd575f5ffd5b80630a17b06b146100e75780630fb5a6b4146101195780631916558714610155575f5ffd5b366100e357005b5f5ffd5b3480156100f2575f5ffd5b506101066101013660046107d8565b6102a5565b6040519081526020015b60405180910390f35b348015610124575f5ffd5b507f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16610106565b348015610160575f5ffd5b5061017461016f366004610807565b6102c8565b005b348015610181575f5ffd5b50610174610360565b348015610195575f5ffd5b506101066101a4366004610820565b610373565b3480156101b4575f5ffd5b50610174610406565b3480156101c8575f5ffd5b505f546040516001600160a01b039091168152602001610110565b3480156101ee575f5ffd5b50600154610106565b348015610202575f5ffd5b50610106610211366004610807565b6001600160a01b03165f9081526002602052604090205490565b348015610236575f5ffd5b50610106610245366004610807565b610477565b348015610255575f5ffd5b506101066104a3565b348015610269575f5ffd5b506101066104d1565b34801561027d575f5ffd5b5061017461028c366004610807565b610514565b34801561029c575f5ffd5b50610106610553565b5f6102c26102b260015490565b6102bc9047610865565b83610570565b92915050565b5f6102d282610477565b6001600160a01b0383165f908152600260205260408120805492935083929091906102fe908490610865565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a261035c826103565f546001600160a01b031690565b83610612565b5050565b61036861064c565b6103715f610678565b565b6001600160a01b0382165f908152600260205260408120546103ff906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156103d1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103f59190610878565b6102bc9190610865565b9392505050565b5f61040f610553565b90508060015f8282546104229190610865565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a161047461046e5f546001600160a01b031690565b826106c7565b50565b6001600160a01b0381165f908152600260205260408120546104998342610373565b6102c2919061088f565b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690565b5f7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166105056104a3565b61050f9190610865565b905090565b61051c61064c565b6001600160a01b03811661054a57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b61047481610678565b5f61055d60015490565b610566426102a5565b61050f919061088f565b5f6105796104a3565b8267ffffffffffffffff16101561059157505f6102c2565b6105996104d1565b8267ffffffffffffffff16106105b05750816102c2565b7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff166105e36104a3565b6105f79067ffffffffffffffff851661088f565b61060190856108a2565b61060b91906108b9565b90506102c2565b61061f838383600161073a565b61064757604051635274afe760e01b81526001600160a01b0384166004820152602401610541565b505050565b5f546001600160a01b031633146103715760405163118cdaa760e01b8152336004820152602401610541565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b804710156106f15760405163cf47918160e01b815247600482015260248101829052604401610541565b61070a828260405180602001604052805f81525061079c565b15610713575050565b3d156107215761035c6107b1565b60405163d6bda27560e01b815260040160405180910390fd5b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f51148316610790578383151615610784573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b803567ffffffffffffffff811681146107d3575f5ffd5b919050565b5f602082840312156107e8575f5ffd5b6103ff826107bc565b80356001600160a01b03811681146107d3575f5ffd5b5f60208284031215610817575f5ffd5b6103ff826107f1565b5f5f60408385031215610831575f5ffd5b61083a836107f1565b9150610848602084016107bc565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b808201808211156102c2576102c2610851565b5f60208284031215610888575f5ffd5b5051919050565b818103818111156102c2576102c2610851565b80820281158282048414176102c2576102c2610851565b5f826108d357634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212209fb6bed22a73faea1a7b3c2ce2fbb3659146062c94438a8904b26c4a93774b1964736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWalletCliff.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWalletCliff.json new file mode 100644 index 00000000..adda7b3e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VestingWalletCliff.json @@ -0,0 +1,364 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VestingWalletCliff", + "sourceName": "contracts/finance/VestingWalletCliff.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "cliffSeconds", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "durationSeconds", + "type": "uint64" + } + ], + "name": "InvalidCliffDuration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20Released", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EtherReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "cliff", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "end", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Votes.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Votes.json similarity index 77% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Votes.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Votes.json index 490ced83..1950028f 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/Votes.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/Votes.json @@ -3,11 +3,96 @@ "contractName": "Votes", "sourceName": "contracts/governance/utils/Votes.sol", "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "clock", + "type": "uint48" + } + ], + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, { "inputs": [], "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "inputs": [ { @@ -19,6 +104,17 @@ "name": "StringTooLong", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -56,13 +152,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], @@ -88,19 +184,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "clock", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VotesExtended.json similarity index 60% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json rename to dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VotesExtended.json index 564604b8..7ae99517 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ICompoundTimelockUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/VotesExtended.json @@ -1,119 +1,119 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ICompoundTimelockUpgradeable", - "sourceName": "contracts/vendor/compound/ICompoundTimelockUpgradeable.sol", + "contractName": "VotesExtended", + "sourceName": "contracts/governance/utils/VotesExtended.sol", "abi": [ { - "anonymous": false, + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { "inputs": [ { - "indexed": true, "internalType": "bytes32", - "name": "txHash", + "name": "s", "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "timepoint", "type": "uint256" }, { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" + "internalType": "uint48", + "name": "clock", + "type": "uint48" } ], - "name": "CancelTransaction", - "type": "event" + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": true, "internalType": "address", - "name": "target", + "name": "account", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "currentNonce", "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint8", + "name": "bits", + "type": "uint8" }, { - "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "value", "type": "uint256" } ], - "name": "ExecuteTransaction", - "type": "event" + "name": "SafeCastOverflowedUintDowncast", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "string", + "name": "str", + "type": "string" } ], - "name": "NewAdmin", - "type": "event" + "name": "StringTooLong", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "newDelay", + "name": "expiry", "type": "uint256" } ], - "name": "NewDelay", - "type": "event" + "name": "VotesExpiredSignature", + "type": "error" }, { "anonymous": false, @@ -121,77 +121,64 @@ { "indexed": true, "internalType": "address", - "name": "newPendingAdmin", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", "type": "address" } ], - "name": "NewPendingAdmin", + "name": "DelegateChanged", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, { "indexed": true, "internalType": "address", - "name": "target", + "name": "delegate", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "previousVotes", "type": "uint256" }, - { - "indexed": false, - "internalType": "string", - "name": "signature", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, { "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "newVotes", "type": "uint256" } ], - "name": "QueueTransaction", + "name": "DelegateVotesChanged", "type": "event" }, { + "anonymous": false, "inputs": [], - "name": "GRACE_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "EIP712DomainChanged", + "type": "event" }, { "inputs": [], - "name": "MAXIMUM_DELAY", + "name": "CLOCK_MODE", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", @@ -199,130 +186,149 @@ }, { "inputs": [], - "name": "MINIMUM_DELAY", + "name": "clock", "outputs": [ { - "internalType": "uint256", + "internalType": "uint48", "name": "", - "type": "uint256" + "type": "uint48" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "delegatee", "type": "address" } ], - "stateMutability": "view", + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "target", + "name": "delegatee", "type": "address" }, { "internalType": "uint256", - "name": "value", + "name": "nonce", "type": "uint256" }, { - "internalType": "string", - "name": "signature", - "type": "string" + "internalType": "uint256", + "name": "expiry", + "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint8", + "name": "v", + "type": "uint8" }, { - "internalType": "uint256", - "name": "eta", - "type": "uint256" + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "name": "cancelTransaction", + "name": "delegateBySig", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "delay", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, + "inputs": [], + "name": "eip712Domain", + "outputs": [ { - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" }, { "internalType": "string", - "name": "signature", + "name": "name", "type": "string" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "string", + "name": "version", + "type": "string" }, { "internalType": "uint256", - "name": "eta", + "name": "chainId", "type": "uint256" - } - ], - "name": "executeTransaction", - "outputs": [ + }, { - "internalType": "bytes", - "name": "", - "type": "bytes" + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" } ], - "stateMutability": "payable", + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", @@ -332,55 +338,64 @@ "inputs": [ { "internalType": "address", - "name": "target", + "name": "account", "type": "address" }, { "internalType": "uint256", - "name": "value", + "name": "timepoint", "type": "uint256" - }, - { - "internalType": "string", - "name": "signature", - "type": "string" - }, + } + ], + "name": "getPastDelegate", + "outputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "eta", + "name": "timepoint", "type": "uint256" } ], - "name": "queueTransaction", + "name": "getPastTotalSupply", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" } ], - "name": "queuedTransactions", + "name": "getPastVotes", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -388,33 +403,41 @@ }, { "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "setDelay", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" } ], - "name": "setPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/WebAuthn.json b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/WebAuthn.json new file mode 100644 index 00000000..f332ff1e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/build/contracts/WebAuthn.json @@ -0,0 +1,10 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "WebAuthn", + "sourceName": "contracts/utils/cryptography/WebAuthn.sol", + "abi": [], + "bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220404921d2d8a474e435a523abf215efaf43253bf78d02eee9867cc898612b91d964736f6c634300081f0033", + "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220404921d2d8a474e435a523abf215efaf43253bf78d02eee9867cc898612b91d964736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/crosschain/CrosschainLinked.sol b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/CrosschainLinked.sol new file mode 100644 index 00000000..837f1004 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/CrosschainLinked.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/CrosschainLinked.sol) + +pragma solidity ^0.8.26; + +import {IERC7786GatewaySource} from "../interfaces/draft-IERC7786.sol"; +import {InteroperableAddress} from "../utils/draft-InteroperableAddress.sol"; +import {Bytes} from "../utils/Bytes.sol"; +import {ERC7786Recipient} from "./ERC7786Recipient.sol"; + +/** + * @dev Core bridging mechanism. + * + * This contract contains the logic to register and send messages to counterparts on remote chains using ERC-7786 + * gateways. It ensure received messages originate from a counterpart. This is the base of token bridges such as + * {BridgeFungible}. + * + * Contracts that inherit from this contract can use the internal {_sendMessageToCounterpart} to send messages to their + * counterpart on a foreign chain. They must override the {_processMessage} function to handle messages that have + * been verified. + */ +abstract contract CrosschainLinked is ERC7786Recipient { + using Bytes for bytes; + using InteroperableAddress for bytes; + + struct Link { + address gateway; + bytes counterpart; // Full InteroperableAddress (chain ref + address) + } + mapping(bytes chain => Link) private _links; + + /** + * @dev Emitted when a new link is registered. + * + * Note: the `counterpart` argument is a full InteroperableAddress (chain ref + address). + */ + event LinkRegistered(address gateway, bytes counterpart); + + /** + * @dev Reverted when trying to register a link for a chain that is already registered. + * + * Note: the `chain` argument is a "chain-only" InteroperableAddress (empty address). + */ + error LinkAlreadyRegistered(bytes chain); + + constructor(Link[] memory links) { + for (uint256 i = 0; i < links.length; ++i) { + _setLink(links[i].gateway, links[i].counterpart, false); + } + } + + /** + * @dev Returns the ERC-7786 gateway used for sending and receiving cross-chain messages to a given chain. + * + * Note: The `chain` parameter is a "chain-only" InteroperableAddress (empty address) and the `counterpart` returns + * the full InteroperableAddress (chain ref + address) that is on `chain`. + */ + function getLink(bytes memory chain) public view virtual returns (address gateway, bytes memory counterpart) { + Link storage self = _links[chain]; + return (self.gateway, self.counterpart); + } + + /** + * @dev Internal setter to change the ERC-7786 gateway and counterpart for a given chain. Called at construction. + * + * Note: The `counterpart` parameter is the full InteroperableAddress (chain ref + address). + */ + function _setLink(address gateway, bytes memory counterpart, bool allowOverride) internal virtual { + // Sanity check, this should revert if gateway is not an ERC-7786 implementation. Note that since + // supportsAttribute returns data, an EOA would fail that test (nothing returned). + IERC7786GatewaySource(gateway).supportsAttribute(bytes4(0)); + + bytes memory chain = _extractChain(counterpart); + if (allowOverride || _links[chain].gateway == address(0)) { + _links[chain] = Link(gateway, counterpart); + emit LinkRegistered(gateway, counterpart); + } else { + revert LinkAlreadyRegistered(chain); + } + } + + /** + * @dev Internal messaging function + * + * Note: The `chain` parameter is a "chain-only" InteroperableAddress (empty address). + */ + function _sendMessageToCounterpart( + bytes memory chain, + bytes memory payload, + bytes[] memory attributes + ) internal virtual returns (bytes32) { + (address gateway, bytes memory counterpart) = getLink(chain); + return IERC7786GatewaySource(gateway).sendMessage(counterpart, payload, attributes); + } + + /// @inheritdoc ERC7786Recipient + function _isAuthorizedGateway( + address instance, + bytes calldata sender + ) internal view virtual override returns (bool) { + (address gateway, bytes memory router) = getLink(_extractChain(sender)); + return instance == gateway && sender.equal(router); + } + + function _extractChain(bytes memory self) private pure returns (bytes memory) { + (bytes2 chainType, bytes memory chainReference, ) = self.parseV1(); + return InteroperableAddress.formatV1(chainType, chainReference, hex""); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/crosschain/ERC7786Recipient.sol b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/ERC7786Recipient.sol new file mode 100644 index 00000000..2b8670cf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/ERC7786Recipient.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/ERC7786Recipient.sol) + +pragma solidity ^0.8.20; + +import {IERC7786Recipient} from "../interfaces/draft-IERC7786.sol"; + +/** + * @dev Base implementation of an ERC-7786 compliant cross-chain message receiver. + * + * This abstract contract exposes the `receiveMessage` function that is used for communication with (one or multiple) + * destination gateways. This contract leaves two functions unimplemented: + * + * * {_isAuthorizedGateway}, an internal getter used to verify whether an address is recognised by the contract as a + * valid ERC-7786 destination gateway. One or multiple gateway can be supported. Note that any malicious address for + * which this function returns true would be able to impersonate any account on any other chain sending any message. + * + * * {_processMessage}, the internal function that will be called with any message that has been validated. + * + * ERC-7786 requires the gateway to ensure messages are not delivered more than once. Therefore, we don't need to keep + * track of the processed receiveId. + * + * @custom:stateless + */ +abstract contract ERC7786Recipient is IERC7786Recipient { + /// @dev Error thrown if the gateway is not authorized to send messages to this contract on behalf of the sender. + error ERC7786RecipientUnauthorizedGateway(address gateway, bytes sender); + + /// @inheritdoc IERC7786Recipient + function receiveMessage( + bytes32 receiveId, + bytes calldata sender, // Binary Interoperable Address + bytes calldata payload + ) external payable returns (bytes4) { + // Check authorization + if (!_isAuthorizedGateway(msg.sender, sender)) { + revert ERC7786RecipientUnauthorizedGateway(msg.sender, sender); + } + + _processMessage(msg.sender, receiveId, sender, payload); + + return IERC7786Recipient.receiveMessage.selector; + } + + /** + * @dev Virtual getter that returns whether an address is a valid ERC-7786 gateway for a given sender. + * + * The `sender` parameter is an interoperable address that include the source chain. The chain part can be + * extracted using the {InteroperableAddress} library to selectively authorize gateways based on the origin chain + * of a message. + */ + function _isAuthorizedGateway(address gateway, bytes calldata sender) internal view virtual returns (bool); + + /** + * @dev Virtual function that should contain the logic to execute when a cross-chain message is received. + * + * NOTE: This function should revert on failure. Any silent failure from this function will result in the message + * being marked as received and not being retryable. + */ + function _processMessage( + address gateway, + bytes32 receiveId, + bytes calldata sender, + bytes calldata payload + ) internal virtual; +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC20.sol b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC20.sol new file mode 100644 index 00000000..7caf125f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC20.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/BridgeERC20.sol) + +pragma solidity ^0.8.26; + +import {IERC20, SafeERC20} from "../../token/ERC20/utils/SafeERC20.sol"; +import {BridgeFungible} from "./abstract/BridgeFungible.sol"; + +/** + * @dev This is a variant of {BridgeFungible} that implements the bridge logic for ERC-20 tokens that do not expose a + * crosschain mint and burn mechanism. Instead, it takes custody of bridged assets. + */ +// slither-disable-next-line locked-ether +abstract contract BridgeERC20 is BridgeFungible { + using SafeERC20 for IERC20; + + IERC20 private immutable _token; + + constructor(IERC20 token_) { + _token = token_; + } + + /// @dev Return the address of the ERC20 token this bridge operates on. + function token() public view virtual returns (IERC20) { + return _token; + } + + /// @dev "Locking" tokens is done by taking custody + function _onSend(address from, uint256 amount) internal virtual override { + token().safeTransferFrom(from, address(this), amount); + } + + /// @dev "Unlocking" tokens is done by releasing custody + function _onReceive(address to, uint256 amount) internal virtual override { + token().safeTransfer(to, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC7802.sol b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC7802.sol new file mode 100644 index 00000000..76a0ff96 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/BridgeERC7802.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/BridgeERC7802.sol) + +pragma solidity ^0.8.26; + +import {IERC7802} from "../../interfaces/draft-IERC7802.sol"; +import {BridgeFungible} from "./abstract/BridgeFungible.sol"; + +/** + * @dev This is a variant of {BridgeFungible} that implements the bridge logic for ERC-7802 compliant tokens. + */ +// slither-disable-next-line locked-ether +abstract contract BridgeERC7802 is BridgeFungible { + IERC7802 private immutable _token; + + constructor(IERC7802 token_) { + _token = token_; + } + + /// @dev Return the address of the ERC20 token this bridge operates on. + function token() public view virtual returns (IERC7802) { + return _token; + } + + /// @dev "Locking" tokens using an ERC-7802 crosschain burn + function _onSend(address from, uint256 amount) internal virtual override { + token().crosschainBurn(from, amount); + } + + /// @dev "Unlocking" tokens using an ERC-7802 crosschain mint + function _onReceive(address to, uint256 amount) internal virtual override { + token().crosschainMint(to, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/abstract/BridgeFungible.sol b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/abstract/BridgeFungible.sol new file mode 100644 index 00000000..ef11dbe5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/crosschain/bridges/abstract/BridgeFungible.sol @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/abstract/BridgeFungible.sol) + +pragma solidity ^0.8.26; + +import {InteroperableAddress} from "../../../utils/draft-InteroperableAddress.sol"; +import {Context} from "../../../utils/Context.sol"; +import {ERC7786Recipient} from "../../ERC7786Recipient.sol"; +import {CrosschainLinked} from "../../CrosschainLinked.sol"; + +/** + * @dev Base contract for bridging ERC-20 between chains using an ERC-7786 gateway. + * + * In order to use this contract, two functions must be implemented to link it to the token: + * * {_onSend}: called when a crosschain transfer is going out. Must take the sender tokens or revert. + * * {_onReceive}: called when a crosschain transfer is coming in. Must give tokens to the receiver. + * + * This base contract is used by the {BridgeERC20}, which interfaces with legacy ERC-20 tokens, and {BridgeERC7802}, + * which interface with ERC-7802 to provide an approve-free user experience. It is also used by the {ERC20Crosschain} + * extension, which embeds the bridge logic directly in the token contract. + */ +abstract contract BridgeFungible is Context, CrosschainLinked { + using InteroperableAddress for bytes; + + event CrosschainFungibleTransferSent(bytes32 indexed sendId, address indexed from, bytes to, uint256 amount); + event CrosschainFungibleTransferReceived(bytes32 indexed receiveId, bytes from, address indexed to, uint256 amount); + + /** + * @dev Transfer `amount` tokens to a crosschain receiver. + * + * Note: The `to` parameter is the full InteroperableAddress (chain ref + address). + */ + function crosschainTransfer(bytes memory to, uint256 amount) public virtual returns (bytes32) { + return _crosschainTransfer(_msgSender(), to, amount); + } + + /** + * @dev Internal crosschain transfer function. + * + * Note: The `to` parameter is the full InteroperableAddress (chain ref + address). + */ + function _crosschainTransfer(address from, bytes memory to, uint256 amount) internal virtual returns (bytes32) { + _onSend(from, amount); + + (bytes2 chainType, bytes memory chainReference, bytes memory addr) = to.parseV1(); + bytes memory chain = InteroperableAddress.formatV1(chainType, chainReference, hex""); + + bytes32 sendId = _sendMessageToCounterpart( + chain, + abi.encode(InteroperableAddress.formatEvmV1(block.chainid, from), addr, amount), + new bytes[](0) + ); + + emit CrosschainFungibleTransferSent(sendId, from, to, amount); + + return sendId; + } + + /// @inheritdoc ERC7786Recipient + function _processMessage( + address /*gateway*/, + bytes32 receiveId, + bytes calldata /*sender*/, + bytes calldata payload + ) internal virtual override { + // split payload + (bytes memory from, bytes memory toBinary, uint256 amount) = abi.decode(payload, (bytes, bytes, uint256)); + address to = address(bytes20(toBinary)); + + _onReceive(to, amount); + + emit CrosschainFungibleTransferReceived(receiveId, from, to, amount); + } + + /// @dev Virtual function: implementation is required to handle token being burnt or locked on the source chain. + function _onSend(address from, uint256 amount) internal virtual; + + /// @dev Virtual function: implementation is required to handle token being minted or unlocked on the destination chain. + function _onReceive(address to, uint256 amount) internal virtual; +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/finance/VestingWallet.sol b/dependencies/@openzeppelin-contracts-5.6.1/finance/VestingWallet.sol similarity index 57% rename from dependencies/@openzeppelin-contracts-4.9.6/finance/VestingWallet.sol rename to dependencies/@openzeppelin-contracts-5.6.1/finance/VestingWallet.sol index 45cf9ce5..eabf8859 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/finance/VestingWallet.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/finance/VestingWallet.sol @@ -1,37 +1,52 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (finance/VestingWallet.sol) -pragma solidity ^0.8.0; +// OpenZeppelin Contracts (last updated v5.6.0) (finance/VestingWallet.sol) -import "../token/ERC20/utils/SafeERC20.sol"; -import "../utils/Address.sol"; -import "../utils/Context.sol"; +pragma solidity ^0.8.20; + +import {IERC20} from "../token/ERC20/IERC20.sol"; +import {SafeERC20} from "../token/ERC20/utils/SafeERC20.sol"; +import {Address} from "../utils/Address.sol"; +import {Context} from "../utils/Context.sol"; +import {Ownable} from "../access/Ownable.sol"; /** - * @title VestingWallet - * @dev This contract handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens - * can be given to this contract, which will release the token to the beneficiary following a given vesting schedule. - * The vesting schedule is customizable through the {vestedAmount} function. + * @dev A vesting wallet is an ownable contract that can receive native currency and ERC-20 tokens, and release these + * assets to the wallet owner, also referred to as "beneficiary", according to a vesting schedule. * - * Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning. + * Any assets transferred to this contract will follow the vesting schedule as if they were locked from the beginning. * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly) * be immediately releasable. + * + * By setting the duration to 0, one can configure this contract to behave like an asset timelock that holds tokens for + * a beneficiary until a specified time. + * + * NOTE: Since the wallet is {Ownable}, and ownership can be transferred, it is possible to sell unvested tokens. + * Preventing this in a smart contract is difficult, considering that: 1) a beneficiary address could be a + * counterfactually deployed contract, 2) there is likely to be a migration path for EOAs to become contracts in the + * near future. + * + * NOTE: When using this contract with any token whose balance is adjusted automatically (i.e. a rebase token), make + * sure to account the supply/balance adjustment in the vesting schedule to ensure the vested amount is as intended. + * + * NOTE: Chains with support for native ERC20s may allow the vesting wallet to withdraw the underlying asset as both an + * ERC20 and as native currency. For example, if chain C supports token A and the wallet gets deposited 100 A, then + * at 50% of the vesting period, the beneficiary can withdraw 50 A as ERC20 and 25 A as native currency (totaling 75 A). + * Consider disabling one of the withdrawal methods. */ -contract VestingWallet is Context { +contract VestingWallet is Context, Ownable { event EtherReleased(uint256 amount); event ERC20Released(address indexed token, uint256 amount); uint256 private _released; - mapping(address => uint256) private _erc20Released; - address private immutable _beneficiary; + mapping(address token => uint256) private _erc20Released; uint64 private immutable _start; uint64 private immutable _duration; /** - * @dev Set the beneficiary, start timestamp and vesting duration of the vesting wallet. + * @dev Sets the beneficiary (owner), the start timestamp and the vesting duration (in seconds) of the vesting + * wallet. */ - constructor(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) payable { - require(beneficiaryAddress != address(0), "VestingWallet: beneficiary is zero address"); - _beneficiary = beneficiaryAddress; + constructor(address beneficiary, uint64 startTimestamp, uint64 durationSeconds) payable Ownable(beneficiary) { _start = startTimestamp; _duration = durationSeconds; } @@ -41,13 +56,6 @@ contract VestingWallet is Context { */ receive() external payable virtual {} - /** - * @dev Getter for the beneficiary address. - */ - function beneficiary() public view virtual returns (address) { - return _beneficiary; - } - /** * @dev Getter for the start timestamp. */ @@ -62,6 +70,13 @@ contract VestingWallet is Context { return _duration; } + /** + * @dev Getter for the end timestamp. + */ + function end() public view virtual returns (uint256) { + return start() + duration(); + } + /** * @dev Amount of eth already released */ @@ -85,14 +100,14 @@ contract VestingWallet is Context { /** * @dev Getter for the amount of releasable `token` tokens. `token` should be the address of an - * IERC20 contract. + * {IERC20} contract. */ function releasable(address token) public view virtual returns (uint256) { return vestedAmount(token, uint64(block.timestamp)) - released(token); } /** - * @dev Release the native token (ether) that have already vested. + * @dev Release the native tokens (ether) that have already vested. * * Emits a {EtherReleased} event. */ @@ -100,7 +115,7 @@ contract VestingWallet is Context { uint256 amount = releasable(); _released += amount; emit EtherReleased(amount); - Address.sendValue(payable(beneficiary()), amount); + Address.sendValue(payable(owner()), amount); } /** @@ -112,7 +127,7 @@ contract VestingWallet is Context { uint256 amount = releasable(token); _erc20Released[token] += amount; emit ERC20Released(token, amount); - SafeERC20.safeTransfer(IERC20(token), beneficiary(), amount); + SafeERC20.safeTransfer(IERC20(token), owner(), amount); } /** @@ -136,7 +151,7 @@ contract VestingWallet is Context { function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) { if (timestamp < start()) { return 0; - } else if (timestamp > start() + duration()) { + } else if (timestamp >= end()) { return totalAllocation; } else { return (totalAllocation * (timestamp - start())) / duration(); diff --git a/dependencies/@openzeppelin-contracts-5.6.1/finance/VestingWalletCliff.sol b/dependencies/@openzeppelin-contracts-5.6.1/finance/VestingWalletCliff.sol new file mode 100644 index 00000000..dd1da658 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/finance/VestingWalletCliff.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (finance/VestingWalletCliff.sol) + +pragma solidity ^0.8.20; + +import {SafeCast} from "../utils/math/SafeCast.sol"; +import {VestingWallet} from "./VestingWallet.sol"; + +/** + * @dev Extension of {VestingWallet} that adds a cliff to the vesting schedule. + * + * _Available since v5.1._ + */ +abstract contract VestingWalletCliff is VestingWallet { + using SafeCast for *; + + uint64 private immutable _cliff; + + /// @dev The specified cliff duration is larger than the vesting duration. + error InvalidCliffDuration(uint64 cliffSeconds, uint64 durationSeconds); + + /** + * @dev Set the duration of the cliff, in seconds. The cliff starts vesting schedule (see {VestingWallet}'s + * constructor) and ends `cliffSeconds` later. + */ + constructor(uint64 cliffSeconds) { + if (cliffSeconds > duration()) { + revert InvalidCliffDuration(cliffSeconds, duration().toUint64()); + } + _cliff = start().toUint64() + cliffSeconds; + } + + /** + * @dev Getter for the cliff timestamp. + */ + function cliff() public view virtual returns (uint256) { + return _cliff; + } + + /** + * @dev Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for + * an asset given its total historical allocation. Returns 0 if the {cliff} timestamp is not met. + * + * IMPORTANT: The cliff not only makes the schedule return 0, but it also ignores every possible side + * effect from calling the inherited implementation (i.e. `super._vestingSchedule`). Carefully consider + * this caveat if the overridden implementation of this function has any (e.g. writing to memory or reverting). + */ + function _vestingSchedule( + uint256 totalAllocation, + uint64 timestamp + ) internal view virtual override returns (uint256) { + return timestamp < cliff() ? 0 : super._vestingSchedule(totalAllocation, timestamp); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/Governor.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/Governor.sol new file mode 100644 index 00000000..baffd23e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/Governor.sol @@ -0,0 +1,819 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (governance/Governor.sol) + +pragma solidity ^0.8.24; + +import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol"; +import {IERC1155Receiver} from "../token/ERC1155/IERC1155Receiver.sol"; +import {EIP712} from "../utils/cryptography/EIP712.sol"; +import {SignatureChecker} from "../utils/cryptography/SignatureChecker.sol"; +import {IERC165, ERC165} from "../utils/introspection/ERC165.sol"; +import {SafeCast} from "../utils/math/SafeCast.sol"; +import {DoubleEndedQueue} from "../utils/structs/DoubleEndedQueue.sol"; +import {Address} from "../utils/Address.sol"; +import {Context} from "../utils/Context.sol"; +import {Nonces} from "../utils/Nonces.sol"; +import {Strings} from "../utils/Strings.sol"; +import {IGovernor, IERC6372} from "./IGovernor.sol"; + +/** + * @dev Core of the governance system, designed to be extended through various modules. + * + * This contract is abstract and requires several functions to be implemented in various modules: + * + * - A counting module must implement {_quorumReached}, {_voteSucceeded} and {_countVote} + * - A voting module must implement {_getVotes} + * - Additionally, {votingPeriod}, {votingDelay}, and {quorum} must also be implemented + */ +abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC721Receiver, IERC1155Receiver { + using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; + + bytes32 public constant BALLOT_TYPEHASH = + keccak256("Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)"); + bytes32 public constant EXTENDED_BALLOT_TYPEHASH = + keccak256( + "ExtendedBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason,bytes params)" + ); + + struct ProposalCore { + address proposer; + uint48 voteStart; + uint32 voteDuration; + bool executed; + bool canceled; + uint48 etaSeconds; + } + + bytes32 private constant ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1); + string private _name; + + mapping(uint256 proposalId => ProposalCore) private _proposals; + + // This queue keeps track of the governor operating on itself. Calls to functions protected by the {onlyGovernance} + // modifier needs to be whitelisted in this queue. Whitelisting is set in {execute}, consumed by the + // {onlyGovernance} modifier and eventually reset after {_executeOperations} completes. This ensures that the + // execution of {onlyGovernance} protected calls can only be achieved through successful proposals. + DoubleEndedQueue.Bytes32Deque private _governanceCall; + + /** + * @dev Restricts a function so it can only be executed through governance proposals. For example, governance + * parameter setters in {GovernorSettings} are protected using this modifier. + * + * The governance executing address may be different from the Governor's own address, for example it could be a + * timelock. This can be customized by modules by overriding {_executor}. The executor is only able to invoke these + * functions during the execution of the governor's {execute} function, and not under any other circumstances. Thus, + * for example, additional timelock proposers are not able to change governance parameters without going through the + * governance protocol (since v4.6). + */ + modifier onlyGovernance() { + _checkGovernance(); + _; + } + + /** + * @dev Sets the value for {name} and {version} + */ + constructor(string memory name_) EIP712(name_, version()) { + _name = name_; + } + + /** + * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) + */ + receive() external payable virtual { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { + return + interfaceId == type(IGovernor).interfaceId || + interfaceId == type(IGovernor).interfaceId ^ IGovernor.getProposalId.selector || + interfaceId == type(IERC1155Receiver).interfaceId || + super.supportsInterface(interfaceId); + } + + /// @inheritdoc IGovernor + function name() public view virtual returns (string memory) { + return _name; + } + + /// @inheritdoc IGovernor + function version() public view virtual returns (string memory) { + return "1"; + } + + /** + * @dev See {IGovernor-hashProposal}. + * + * The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array + * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id + * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in + * advance, before the proposal is submitted. + * + * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the + * same proposal (with same operation and same description) will have the same id if submitted on multiple governors + * across multiple networks. This also means that in order to execute the same operation twice (on the same + * governor) the proposer will have to change the description in order to avoid proposal id conflicts. + */ + function hashProposal( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public pure virtual returns (uint256) { + return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); + } + + /// @inheritdoc IGovernor + function getProposalId( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public view virtual returns (uint256) { + return hashProposal(targets, values, calldatas, descriptionHash); + } + + /// @inheritdoc IGovernor + function state(uint256 proposalId) public view virtual returns (ProposalState) { + // We read the struct fields into the stack at once so Solidity emits a single SLOAD + ProposalCore storage proposal = _proposals[proposalId]; + bool proposalExecuted = proposal.executed; + bool proposalCanceled = proposal.canceled; + + if (proposalExecuted) { + return ProposalState.Executed; + } + + if (proposalCanceled) { + return ProposalState.Canceled; + } + + uint256 snapshot = proposalSnapshot(proposalId); + + if (snapshot == 0) { + revert GovernorNonexistentProposal(proposalId); + } + + uint256 currentTimepoint = clock(); + + if (snapshot >= currentTimepoint) { + return ProposalState.Pending; + } + + uint256 deadline = proposalDeadline(proposalId); + + if (deadline >= currentTimepoint) { + return ProposalState.Active; + } else if (!_quorumReached(proposalId) || !_voteSucceeded(proposalId)) { + return ProposalState.Defeated; + } else if (proposalEta(proposalId) == 0) { + return ProposalState.Succeeded; + } else { + return ProposalState.Queued; + } + } + + /// @inheritdoc IGovernor + function proposalThreshold() public view virtual returns (uint256) { + return 0; + } + + /// @inheritdoc IGovernor + function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256) { + return _proposals[proposalId].voteStart; + } + + /// @inheritdoc IGovernor + function proposalDeadline(uint256 proposalId) public view virtual returns (uint256) { + return _proposals[proposalId].voteStart + _proposals[proposalId].voteDuration; + } + + /// @inheritdoc IGovernor + function proposalProposer(uint256 proposalId) public view virtual returns (address) { + return _proposals[proposalId].proposer; + } + + /// @inheritdoc IGovernor + function proposalEta(uint256 proposalId) public view virtual returns (uint256) { + return _proposals[proposalId].etaSeconds; + } + + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256) public view virtual returns (bool) { + return false; + } + + /** + * @dev Reverts if the `msg.sender` is not the executor. In case the executor is not this contract + * itself, the function reverts if `msg.data` is not whitelisted as a result of an {execute} + * operation. See {onlyGovernance}. + */ + function _checkGovernance() internal virtual { + if (_executor() != _msgSender()) { + revert GovernorOnlyExecutor(_msgSender()); + } + if (_executor() != address(this)) { + bytes32 msgDataHash = keccak256(_msgData()); + // loop until popping the expected operation - throw if deque is empty (operation not authorized) + while (_governanceCall.popFront() != msgDataHash) {} + } + } + + /** + * @dev Amount of votes already cast passes the threshold limit. + */ + function _quorumReached(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Is the proposal successful or not. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Get the voting weight of `account` at a specific `timepoint`, for a vote as described by `params`. + */ + function _getVotes(address account, uint256 timepoint, bytes memory params) internal view virtual returns (uint256); + + /** + * @dev Register a vote for `proposalId` by `account` with a given `support`, voting `weight` and voting `params`. + * + * Note: Support is generic and can represent various things depending on the voting system used. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 totalWeight, + bytes memory params + ) internal virtual returns (uint256); + + /** + * @dev Hook that should be called every time the tally for a proposal is updated. + * + * Note: This function must run successfully. Reverts will result in the bricking of governance + */ + function _tallyUpdated(uint256 proposalId) internal virtual {} + + /** + * @dev Default additional encoded parameters used by castVote methods that don't include them + * + * Note: Should be overridden by specific implementations to use an appropriate value, the + * meaning of the additional params, in the context of that implementation + */ + function _defaultParams() internal view virtual returns (bytes memory) { + return ""; + } + + /** + * @dev See {IGovernor-propose}. This function has opt-in frontrunning protection, described in {_isValidDescriptionForProposer}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual returns (uint256) { + address proposer = _msgSender(); + + // check description restriction + if (!_isValidDescriptionForProposer(proposer, description)) { + revert GovernorRestrictedProposer(proposer); + } + + // check proposal threshold + uint256 votesThreshold = proposalThreshold(); + if (votesThreshold > 0) { + uint256 proposerVotes = getVotes(proposer, clock() - 1); + if (proposerVotes < votesThreshold) { + revert GovernorInsufficientProposerVotes(proposer, proposerVotes, votesThreshold); + } + } + + return _propose(targets, values, calldatas, description, proposer); + } + + /** + * @dev Internal propose mechanism. Can be overridden to add more logic on proposal creation. + * + * Emits a {IGovernor-ProposalCreated} event. + */ + function _propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description, + address proposer + ) internal virtual returns (uint256 proposalId) { + proposalId = getProposalId(targets, values, calldatas, keccak256(bytes(description))); + + if (targets.length != values.length || targets.length != calldatas.length || targets.length == 0) { + revert GovernorInvalidProposalLength(targets.length, calldatas.length, values.length); + } + if (_proposals[proposalId].voteStart != 0) { + revert GovernorUnexpectedProposalState(proposalId, state(proposalId), bytes32(0)); + } + + uint256 snapshot = clock() + votingDelay(); + uint256 duration = votingPeriod(); + + ProposalCore storage proposal = _proposals[proposalId]; + proposal.proposer = proposer; + proposal.voteStart = SafeCast.toUint48(snapshot); + proposal.voteDuration = SafeCast.toUint32(duration); + + emit ProposalCreated( + proposalId, + proposer, + targets, + values, + new string[](targets.length), + calldatas, + snapshot, + snapshot + duration, + description + ); + + // Using a named return variable to avoid stack too deep errors + } + + /// @inheritdoc IGovernor + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256) { + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Succeeded)); + + uint48 etaSeconds = _queueOperations(proposalId, targets, values, calldatas, descriptionHash); + + if (etaSeconds != 0) { + _proposals[proposalId].etaSeconds = etaSeconds; + emit ProposalQueued(proposalId, etaSeconds); + } else { + revert GovernorQueueNotImplemented(); + } + + return proposalId; + } + + /** + * @dev Internal queuing mechanism. Can be overridden (without a super call) to modify the way queuing is + * performed (for example adding a vault/timelock). + * + * This is empty by default, and must be overridden to implement queuing. + * + * This function returns a timestamp that describes the expected ETA for execution. If the returned value is 0 + * (which is the default value), the core will consider queueing did not succeed, and the public {queue} function + * will revert. + * + * NOTE: Calling this function directly will NOT check the current state of the proposal, or emit the + * `ProposalQueued` event. Queuing a proposal should be done using {queue}. + */ + function _queueOperations( + uint256 /*proposalId*/, + address[] memory /*targets*/, + uint256[] memory /*values*/, + bytes[] memory /*calldatas*/, + bytes32 /*descriptionHash*/ + ) internal virtual returns (uint48) { + return 0; + } + + /// @inheritdoc IGovernor + function execute( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public payable virtual returns (uint256) { + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + _validateStateBitmap( + proposalId, + _encodeStateBitmap(ProposalState.Succeeded) | _encodeStateBitmap(ProposalState.Queued) + ); + + // mark as executed before calls to avoid reentrancy + _proposals[proposalId].executed = true; + + // before execute: register governance call in queue. + if (_executor() != address(this)) { + for (uint256 i = 0; i < targets.length; ++i) { + if (targets[i] == address(this)) { + _governanceCall.pushBack(keccak256(calldatas[i])); + } + } + } + + _executeOperations(proposalId, targets, values, calldatas, descriptionHash); + + // after execute: cleanup governance call queue. + if (_executor() != address(this) && !_governanceCall.empty()) { + _governanceCall.clear(); + } + + emit ProposalExecuted(proposalId); + + return proposalId; + } + + /** + * @dev Internal execution mechanism. Can be overridden (without a super call) to modify the way execution is + * performed (for example adding a vault/timelock). + * + * NOTE: Calling this function directly will NOT check the current state of the proposal, set the executed flag to + * true or emit the `ProposalExecuted` event. Executing a proposal should be done using {execute}. + */ + function _executeOperations( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual { + for (uint256 i = 0; i < targets.length; ++i) { + (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); + Address.verifyCallResult(success, returndata); + } + } + + /// @inheritdoc IGovernor + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256) { + // The proposalId will be recomputed in the `_cancel` call further down. However we need the value before we + // do the internal call, because we need to check the proposal state BEFORE the internal `_cancel` call + // changes it. The `getProposalId` duplication has a cost that is limited, and that we accept. + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + address caller = _msgSender(); + if (!_validateCancel(proposalId, caller)) revert GovernorUnableToCancel(proposalId, caller); + + return _cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Internal cancel mechanism with minimal restrictions. A proposal can be cancelled in any state other than + * Canceled, Expired, or Executed. Once cancelled a proposal can't be re-submitted. + * + * Emits a {IGovernor-ProposalCanceled} event. + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual returns (uint256) { + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + _validateStateBitmap( + proposalId, + ALL_PROPOSAL_STATES_BITMAP ^ + _encodeStateBitmap(ProposalState.Canceled) ^ + _encodeStateBitmap(ProposalState.Expired) ^ + _encodeStateBitmap(ProposalState.Executed) + ); + + _proposals[proposalId].canceled = true; + emit ProposalCanceled(proposalId); + + return proposalId; + } + + /// @inheritdoc IGovernor + function getVotes(address account, uint256 timepoint) public view virtual returns (uint256) { + return _getVotes(account, timepoint, _defaultParams()); + } + + /// @inheritdoc IGovernor + function getVotesWithParams( + address account, + uint256 timepoint, + bytes memory params + ) public view virtual returns (uint256) { + return _getVotes(account, timepoint, params); + } + + /// @inheritdoc IGovernor + function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, ""); + } + + /// @inheritdoc IGovernor + function castVoteWithReason( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason); + } + + /// @inheritdoc IGovernor + function castVoteWithReasonAndParams( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params + ) public virtual returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason, params); + } + + /// @inheritdoc IGovernor + function castVoteBySig( + uint256 proposalId, + uint8 support, + address voter, + bytes memory signature + ) public virtual returns (uint256) { + if (!_validateVoteSig(proposalId, support, voter, signature)) { + revert GovernorInvalidSignature(voter); + } + return _castVote(proposalId, voter, support, ""); + } + + /// @inheritdoc IGovernor + function castVoteWithReasonAndParamsBySig( + uint256 proposalId, + uint8 support, + address voter, + string calldata reason, + bytes memory params, + bytes memory signature + ) public virtual returns (uint256) { + if (!_validateExtendedVoteSig(proposalId, support, voter, reason, params, signature)) { + revert GovernorInvalidSignature(voter); + } + return _castVote(proposalId, voter, support, reason, params); + } + + /// @dev Validate the `signature` used in {castVoteBySig} function. + function _validateVoteSig( + uint256 proposalId, + uint8 support, + address voter, + bytes memory signature + ) internal virtual returns (bool) { + return + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support, voter, _useNonce(voter)))), + signature + ); + } + + /// @dev Validate the `signature` used in {castVoteWithReasonAndParamsBySig} function. + function _validateExtendedVoteSig( + uint256 proposalId, + uint8 support, + address voter, + string memory reason, + bytes memory params, + bytes memory signature + ) internal virtual returns (bool) { + return + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode( + EXTENDED_BALLOT_TYPEHASH, + proposalId, + support, + voter, + _useNonce(voter), + keccak256(bytes(reason)), + keccak256(params) + ) + ) + ), + signature + ); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. Uses the _defaultParams(). + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason + ) internal virtual returns (uint256) { + return _castVote(proposalId, account, support, reason, _defaultParams()); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason, + bytes memory params + ) internal virtual returns (uint256) { + _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Active)); + + uint256 totalWeight = _getVotes(account, proposalSnapshot(proposalId), params); + uint256 votedWeight = _countVote(proposalId, account, support, totalWeight, params); + + if (params.length == 0) { + emit VoteCast(account, proposalId, support, votedWeight, reason); + } else { + emit VoteCastWithParams(account, proposalId, support, votedWeight, reason, params); + } + + _tallyUpdated(proposalId); + + return votedWeight; + } + + /** + * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor + * is some contract other than the governor itself, like when using a timelock, this function can be invoked + * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. + * Note that if the executor is simply the governor itself, use of `relay` is redundant. + */ + function relay(address target, uint256 value, bytes calldata data) public payable virtual onlyGovernance { + (bool success, bytes memory returndata) = target.call{value: value}(data); + Address.verifyCallResult(success, returndata); + } + + /** + * @dev Address through which the governor executes action. Will be overloaded by module that executes actions + * through another contract such as a timelock. + */ + function _executor() internal view virtual returns (address) { + return address(this); + } + + /** + * @dev See {IERC721Receiver-onERC721Received}. + * Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock). + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + return this.onERC721Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155Received}. + * Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock). + */ + function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual returns (bytes4) { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + return this.onERC1155Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + * Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock). + */ + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual returns (bytes4) { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + return this.onERC1155BatchReceived.selector; + } + + /** + * @dev Encodes a `ProposalState` into a `bytes32` representation where each bit enabled corresponds to + * the underlying position in the `ProposalState` enum. For example: + * + * 0x000...10000 + * ^^^^^^------ ... + * ^----- Succeeded + * ^---- Defeated + * ^--- Canceled + * ^-- Active + * ^- Pending + */ + function _encodeStateBitmap(ProposalState proposalState) internal pure returns (bytes32) { + return bytes32(1 << uint8(proposalState)); + } + + /** + * @dev Check that the current state of a proposal matches the requirements described by the `allowedStates` bitmap. + * This bitmap should be built using `_encodeStateBitmap`. + * + * If requirements are not met, reverts with a {GovernorUnexpectedProposalState} error. + */ + function _validateStateBitmap(uint256 proposalId, bytes32 allowedStates) internal view returns (ProposalState) { + ProposalState currentState = state(proposalId); + if (_encodeStateBitmap(currentState) & allowedStates == bytes32(0)) { + revert GovernorUnexpectedProposalState(proposalId, currentState, allowedStates); + } + return currentState; + } + + /** + * @dev Check if the proposer is authorized to submit a proposal with the given description. + * + * If the proposal description ends with `#proposer=0x???`, where `0x???` is an address written as a hex string + * (case insensitive), then the submission of this proposal will only be authorized to said address. + * + * This is used for frontrunning protection. By adding this pattern at the end of their proposal, one can ensure + * that no other address can submit the same proposal. An attacker would have to either remove or change that part, + * which would result in a different proposal id. + * + * If the description does not match this pattern, it is unrestricted and anyone can submit it. This includes: + * + * - If the `0x???` part is not a valid hex string. + * - If the `0x???` part is a valid hex string, but does not contain exactly 40 hex digits. + * - If it ends with the expected suffix followed by newlines or other whitespace. + * - If it ends with some other similar suffix, e.g. `#other=abc`. + * - If it does not end with any such suffix. + */ + function _isValidDescriptionForProposer( + address proposer, + string memory description + ) internal view virtual returns (bool) { + unchecked { + uint256 length = bytes(description).length; + + // Length is too short to contain a valid proposer suffix + if (length < 52) { + return true; + } + + // Extract what would be the `#proposer=` marker beginning the suffix + bytes10 marker = bytes10(_unsafeReadBytesOffset(bytes(description), length - 52)); + + // If the marker is not found, there is no proposer suffix to check + if (marker != bytes10("#proposer=")) { + return true; + } + + // Check that the last 42 characters (after the marker) are a properly formatted address. + (bool success, address recovered) = Strings.tryParseAddress(description, length - 42, length); + return !success || recovered == proposer; + } + } + + /** + * @dev Check if the `caller` can cancel the proposal with the given `proposalId`. + * + * The default implementation allows the proposal proposer to cancel the proposal during the pending state. + */ + function _validateCancel(uint256 proposalId, address caller) internal view virtual returns (bool) { + return (state(proposalId) == ProposalState.Pending) && caller == proposalProposer(proposalId); + } + + /// @inheritdoc IERC6372 + function clock() public view virtual returns (uint48); + + /// @inheritdoc IERC6372 + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual returns (string memory); + + /// @inheritdoc IGovernor + function votingDelay() public view virtual returns (uint256); + + /// @inheritdoc IGovernor + function votingPeriod() public view virtual returns (uint256); + + /// @inheritdoc IGovernor + function quorum(uint256 timepoint) public view virtual returns (uint256); + + /** + * @dev Reads a bytes32 from a bytes array without bounds checking. + * + * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the + * assembly block as such would prevent some optimizations. + */ + function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) { + // This is not memory safe in the general case, but all calls to this private function are within bounds. + assembly ("memory-safe") { + value := mload(add(add(buffer, 0x20), offset)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/IGovernor.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/IGovernor.sol new file mode 100644 index 00000000..0988b4e9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/IGovernor.sol @@ -0,0 +1,454 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/IGovernor.sol) + +pragma solidity >=0.8.4; + +import {IERC165} from "../interfaces/IERC165.sol"; +import {IERC6372} from "../interfaces/IERC6372.sol"; + +/** + * @dev Interface of the {Governor} core. + * + * NOTE: Event parameters lack the `indexed` keyword for compatibility with GovernorBravo events. + * Making event parameters `indexed` affects how events are decoded, potentially breaking existing indexers. + */ +interface IGovernor is IERC165, IERC6372 { + enum ProposalState { + Pending, + Active, + Canceled, + Defeated, + Succeeded, + Queued, + Expired, + Executed + } + + /** + * @dev Empty proposal or a mismatch between the parameters length for a proposal call. + */ + error GovernorInvalidProposalLength(uint256 targets, uint256 calldatas, uint256 values); + + /** + * @dev The vote was already cast. + */ + error GovernorAlreadyCastVote(address voter); + + /** + * @dev Token deposits are disabled in this contract. + */ + error GovernorDisabledDeposit(); + + /** + * @dev The `account` is not the governance executor. + */ + error GovernorOnlyExecutor(address account); + + /** + * @dev The `proposalId` doesn't exist. + */ + error GovernorNonexistentProposal(uint256 proposalId); + + /** + * @dev The current state of a proposal is not the required for performing an operation. + * The `expectedStates` is a bitmap with the bits enabled for each ProposalState enum position + * counting from right to left. + * + * NOTE: If `expectedState` is `bytes32(0)`, the proposal is expected to not be in any state (i.e. not exist). + * This is the case when a proposal that is expected to be unset is already initiated (the proposal is duplicated). + * + * See {Governor-_encodeStateBitmap}. + */ + error GovernorUnexpectedProposalState(uint256 proposalId, ProposalState current, bytes32 expectedStates); + + /** + * @dev The voting period set is not a valid period. + */ + error GovernorInvalidVotingPeriod(uint256 votingPeriod); + + /** + * @dev The `proposer` does not have the required votes to create a proposal. + */ + error GovernorInsufficientProposerVotes(address proposer, uint256 votes, uint256 threshold); + + /** + * @dev The `proposer` is not allowed to create a proposal. + */ + error GovernorRestrictedProposer(address proposer); + + /** + * @dev The vote type used is not valid for the corresponding counting module. + */ + error GovernorInvalidVoteType(); + + /** + * @dev The provided params buffer is not supported by the counting module. + */ + error GovernorInvalidVoteParams(); + + /** + * @dev Queue operation is not implemented for this governor. Execute should be called directly. + */ + error GovernorQueueNotImplemented(); + + /** + * @dev The proposal hasn't been queued yet. + */ + error GovernorNotQueuedProposal(uint256 proposalId); + + /** + * @dev The proposal has already been queued. + */ + error GovernorAlreadyQueuedProposal(uint256 proposalId); + + /** + * @dev The provided signature is not valid for the expected `voter`. + * If the `voter` is a contract, the signature is not valid using {IERC1271-isValidSignature}. + */ + error GovernorInvalidSignature(address voter); + + /** + * @dev The given `account` is unable to cancel the proposal with given `proposalId`. + */ + error GovernorUnableToCancel(uint256 proposalId, address account); + + /** + * @dev Emitted when a proposal is created. + */ + event ProposalCreated( + uint256 proposalId, + address proposer, + address[] targets, + uint256[] values, + string[] signatures, + bytes[] calldatas, + uint256 voteStart, + uint256 voteEnd, + string description + ); + + /** + * @dev Emitted when a proposal is queued. + */ + event ProposalQueued(uint256 proposalId, uint256 etaSeconds); + + /** + * @dev Emitted when a proposal is executed. + */ + event ProposalExecuted(uint256 proposalId); + + /** + * @dev Emitted when a proposal is canceled. + */ + event ProposalCanceled(uint256 proposalId); + + /** + * @dev Emitted when a vote is cast without params. + * + * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. + */ + event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); + + /** + * @dev Emitted when a vote is cast with params. + * + * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. + * `params` are additional encoded parameters. Their interpretation also depends on the voting module used. + */ + event VoteCastWithParams( + address indexed voter, + uint256 proposalId, + uint8 support, + uint256 weight, + string reason, + bytes params + ); + + /** + * @notice module:core + * @dev Name of the governor instance (used in building the EIP-712 domain separator). + */ + function name() external view returns (string memory); + + /** + * @notice module:core + * @dev Version of the governor instance (used in building the EIP-712 domain separator). Default: "1" + */ + function version() external view returns (string memory); + + /** + * @notice module:voting + * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to + * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of + * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`. + * + * There are 2 standard keys: `support` and `quorum`. + * + * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`. + * - `quorum=bravo` means that only For votes are counted towards quorum. + * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum. + * + * If a counting module makes use of encoded `params`, it should include this under a `params` key with a unique + * name that describes the behavior. For example: + * + * - `params=fractional` might refer to a scheme where votes are divided fractionally between for/against/abstain. + * - `params=erc721` might refer to a scheme where specific NFTs are delegated to vote. + * + * NOTE: The string can be decoded by the standard + * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`] + * JavaScript class. + */ + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() external view returns (string memory); + + /** + * @notice module:core + * @dev Hashing function used to (re)build the proposal id from the proposal details. + * + * NOTE: For all off-chain and external calls, use {getProposalId}. + */ + function hashProposal( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) external pure returns (uint256); + + /** + * @notice module:core + * @dev Function used to get the proposal id from the proposal details. + */ + function getProposalId( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) external view returns (uint256); + + /** + * @notice module:core + * @dev Current state of a proposal, following Compound's convention + */ + function state(uint256 proposalId) external view returns (ProposalState); + + /** + * @notice module:core + * @dev The number of votes required in order for a voter to become a proposer. + */ + function proposalThreshold() external view returns (uint256); + + /** + * @notice module:core + * @dev Timepoint used to retrieve user's votes and quorum. If using block number (as per Compound's Comp), the + * snapshot is performed at the end of this block. Hence, voting for this proposal starts at the beginning of the + * following block. + */ + function proposalSnapshot(uint256 proposalId) external view returns (uint256); + + /** + * @notice module:core + * @dev Timepoint at which votes close. If using block number, votes close at the end of this block, so it is + * possible to cast a vote during this block. + */ + function proposalDeadline(uint256 proposalId) external view returns (uint256); + + /** + * @notice module:core + * @dev The account that created a proposal. + */ + function proposalProposer(uint256 proposalId) external view returns (address); + + /** + * @notice module:core + * @dev The time when a queued proposal becomes executable ("ETA"). Unlike {proposalSnapshot} and + * {proposalDeadline}, this doesn't use the governor clock, and instead relies on the executor's clock which may be + * different. In most cases this will be a timestamp. + */ + function proposalEta(uint256 proposalId) external view returns (uint256); + + /** + * @notice module:core + * @dev Whether a proposal needs to be queued before execution. + */ + function proposalNeedsQueuing(uint256 proposalId) external view returns (bool); + + /** + * @notice module:user-config + * @dev Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends + * on the clock (see ERC-6372) this contract uses. + * + * This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a + * proposal starts. + * + * NOTE: While this interface returns a uint256, timepoints are stored as uint48 following the ERC-6372 clock type. + * Consequently this value must fit in a uint48 (when added to the current clock). See {IERC6372-clock}. + */ + function votingDelay() external view returns (uint256); + + /** + * @notice module:user-config + * @dev Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock + * (see ERC-6372) this contract uses. + * + * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting + * duration compared to the voting delay. + * + * NOTE: This value is stored when the proposal is submitted so that possible changes to the value do not affect + * proposals that have already been submitted. The type used to save it is a uint32. Consequently, while this + * interface returns a uint256, the value it returns should fit in a uint32. + */ + function votingPeriod() external view returns (uint256); + + /** + * @notice module:user-config + * @dev Minimum number of cast voted required for a proposal to be successful. + * + * NOTE: The `timepoint` parameter corresponds to the snapshot used for counting vote. This allows to scale the + * quorum depending on values such as the totalSupply of a token at this timepoint (see {ERC20Votes}). + */ + function quorum(uint256 timepoint) external view returns (uint256); + + /** + * @notice module:reputation + * @dev Voting power of an `account` at a specific `timepoint`. + * + * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or + * multiple), {ERC20Votes} tokens. + */ + function getVotes(address account, uint256 timepoint) external view returns (uint256); + + /** + * @notice module:reputation + * @dev Voting power of an `account` at a specific `timepoint` given additional encoded parameters. + */ + function getVotesWithParams( + address account, + uint256 timepoint, + bytes memory params + ) external view returns (uint256); + + /** + * @notice module:voting + * @dev Returns whether `account` has cast a vote on `proposalId`. + */ + function hasVoted(uint256 proposalId, address account) external view returns (bool); + + /** + * @dev Create a new proposal. Vote starts after a delay specified by {IGovernor-votingDelay} and lasts for a + * duration specified by {IGovernor-votingPeriod}. + * + * Emits a {ProposalCreated} event. + * + * NOTE: The state of the Governor and `targets` may change between the proposal creation and its execution. + * This may be the result of third party actions on the targeted contracts, or other governor proposals. + * For example, the balance of this contract could be updated or its access control permissions may be modified, + * possibly compromising the proposal's ability to execute successfully (e.g. the governor doesn't have enough + * value to cover a proposal with multiple transfers). + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) external returns (uint256 proposalId); + + /** + * @dev Queue a proposal. Some governors require this step to be performed before execution can happen. If queuing + * is not necessary, this function may revert. + * Queuing a proposal requires the quorum to be reached, the vote to be successful, and the deadline to be reached. + * + * Emits a {ProposalQueued} event. + */ + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) external returns (uint256 proposalId); + + /** + * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the + * deadline to be reached. Depending on the governor it might also be required that the proposal was queued and + * that some delay passed. + * + * Emits a {ProposalExecuted} event. + * + * NOTE: Some modules can modify the requirements for execution, for example by adding an additional timelock. + */ + function execute( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) external payable returns (uint256 proposalId); + + /** + * @dev Cancel a proposal. A proposal is cancellable by the proposer, but only while it is Pending state, i.e. + * before the vote starts. + * + * Emits a {ProposalCanceled} event. + */ + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) external returns (uint256 proposalId); + + /** + * @dev Cast a vote + * + * Emits a {VoteCast} event. + */ + function castVote(uint256 proposalId, uint8 support) external returns (uint256 balance); + + /** + * @dev Cast a vote with a reason + * + * Emits a {VoteCast} event. + */ + function castVoteWithReason( + uint256 proposalId, + uint8 support, + string calldata reason + ) external returns (uint256 balance); + + /** + * @dev Cast a vote with a reason and additional encoded parameters + * + * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. + */ + function castVoteWithReasonAndParams( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params + ) external returns (uint256 balance); + + /** + * @dev Cast a vote using the voter's signature, including ERC-1271 signature support. + * + * Emits a {VoteCast} event. + */ + function castVoteBySig( + uint256 proposalId, + uint8 support, + address voter, + bytes memory signature + ) external returns (uint256 balance); + + /** + * @dev Cast a vote with a reason and additional encoded parameters using the voter's signature, + * including ERC-1271 signature support. + * + * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. + */ + function castVoteWithReasonAndParamsBySig( + uint256 proposalId, + uint8 support, + address voter, + string calldata reason, + bytes memory params, + bytes memory signature + ) external returns (uint256 balance); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/TimelockController.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/TimelockController.sol similarity index 64% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/TimelockController.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/TimelockController.sol index f70a7d11..f39d12ae 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/TimelockController.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/TimelockController.sol @@ -1,11 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/TimelockController.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (governance/TimelockController.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../access/AccessControl.sol"; -import "../token/ERC721/IERC721Receiver.sol"; -import "../token/ERC1155/IERC1155Receiver.sol"; +import {AccessControl} from "../access/AccessControl.sol"; +import {ERC721Holder} from "../token/ERC721/utils/ERC721Holder.sol"; +import {ERC1155Holder} from "../token/ERC1155/utils/ERC1155Holder.sol"; +import {Address} from "../utils/Address.sol"; /** * @dev Contract module which acts as a timelocked controller. When set as the @@ -19,19 +20,52 @@ import "../token/ERC1155/IERC1155Receiver.sol"; * is in charge of proposing (resp executing) operations. A common use case is * to position this {TimelockController} as the owner of a smart contract, with * a multisig or a DAO as the sole proposer. - * - * _Available since v3.3._ */ -contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver { - bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); +contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder { bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); bytes32 public constant CANCELLER_ROLE = keccak256("CANCELLER_ROLE"); - uint256 internal constant _DONE_TIMESTAMP = uint256(1); + uint256 internal constant DONE_TIMESTAMP = uint256(1); - mapping(bytes32 => uint256) private _timestamps; + mapping(bytes32 id => uint256) private _timestamps; uint256 private _minDelay; + enum OperationState { + Unset, + Waiting, + Ready, + Done + } + + /** + * @dev Mismatch between the parameters length for an operation call. + */ + error TimelockInvalidOperationLength(uint256 targets, uint256 payloads, uint256 values); + + /** + * @dev The schedule operation doesn't meet the minimum delay. + */ + error TimelockInsufficientDelay(uint256 delay, uint256 minDelay); + + /** + * @dev The current state of an operation is not as required. + * The `expectedStates` is a bitmap with the bits enabled for each OperationState enum position + * counting from right to left. + * + * See {_encodeStateBitmap}. + */ + error TimelockUnexpectedOperationState(bytes32 operationId, bytes32 expectedStates); + + /** + * @dev The predecessor to an operation not yet done. + */ + error TimelockUnexecutedPredecessor(bytes32 predecessorId); + + /** + * @dev The caller account is not authorized. + */ + error TimelockUnauthorizedCaller(address caller); + /** * @dev Emitted when a call is scheduled as part of operation `id`. */ @@ -68,7 +102,7 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver /** * @dev Initializes the contract with the following parameters: * - * - `minDelay`: initial minimum delay for operations + * - `minDelay`: initial minimum delay in seconds for operations * - `proposers`: accounts to be granted proposer and canceller roles * - `executors`: accounts to be granted executor role * - `admin`: optional account to be granted admin role; disable with zero address @@ -79,28 +113,23 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver * this admin to the deployer automatically and should be renounced as well. */ constructor(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) { - _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE); - _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE); - _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE); - _setRoleAdmin(CANCELLER_ROLE, TIMELOCK_ADMIN_ROLE); - // self administration - _setupRole(TIMELOCK_ADMIN_ROLE, address(this)); + _grantRole(DEFAULT_ADMIN_ROLE, address(this)); // optional admin if (admin != address(0)) { - _setupRole(TIMELOCK_ADMIN_ROLE, admin); + _grantRole(DEFAULT_ADMIN_ROLE, admin); } // register proposers and cancellers for (uint256 i = 0; i < proposers.length; ++i) { - _setupRole(PROPOSER_ROLE, proposers[i]); - _setupRole(CANCELLER_ROLE, proposers[i]); + _grantRole(PROPOSER_ROLE, proposers[i]); + _grantRole(CANCELLER_ROLE, proposers[i]); } // register executors for (uint256 i = 0; i < executors.length; ++i) { - _setupRole(EXECUTOR_ROLE, executors[i]); + _grantRole(EXECUTOR_ROLE, executors[i]); } _minDelay = minDelay; @@ -123,43 +152,43 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver /** * @dev Contract might receive/hold ETH as part of the maintenance process. */ - receive() external payable {} + receive() external payable virtual {} - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, AccessControl) returns (bool) { - return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); + /// @inheritdoc AccessControl + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(AccessControl, ERC1155Holder) returns (bool) { + return super.supportsInterface(interfaceId); } /** - * @dev Returns whether an id correspond to a registered operation. This - * includes both Pending, Ready and Done operations. + * @dev Returns whether an id corresponds to a registered operation. This + * includes both Waiting, Ready, and Done operations. */ - function isOperation(bytes32 id) public view virtual returns (bool) { - return getTimestamp(id) > 0; + function isOperation(bytes32 id) public view returns (bool) { + return getOperationState(id) != OperationState.Unset; } /** * @dev Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready". */ - function isOperationPending(bytes32 id) public view virtual returns (bool) { - return getTimestamp(id) > _DONE_TIMESTAMP; + function isOperationPending(bytes32 id) public view returns (bool) { + OperationState state = getOperationState(id); + return state == OperationState.Waiting || state == OperationState.Ready; } /** * @dev Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending". */ - function isOperationReady(bytes32 id) public view virtual returns (bool) { - uint256 timestamp = getTimestamp(id); - return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp; + function isOperationReady(bytes32 id) public view returns (bool) { + return getOperationState(id) == OperationState.Ready; } /** * @dev Returns whether an operation is done or not. */ - function isOperationDone(bytes32 id) public view virtual returns (bool) { - return getTimestamp(id) == _DONE_TIMESTAMP; + function isOperationDone(bytes32 id) public view returns (bool) { + return getOperationState(id) == OperationState.Done; } /** @@ -171,7 +200,23 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver } /** - * @dev Returns the minimum delay for an operation to become valid. + * @dev Returns operation state. + */ + function getOperationState(bytes32 id) public view virtual returns (OperationState) { + uint256 timestamp = getTimestamp(id); + if (timestamp == 0) { + return OperationState.Unset; + } else if (timestamp == DONE_TIMESTAMP) { + return OperationState.Done; + } else if (timestamp > block.timestamp) { + return OperationState.Waiting; + } else { + return OperationState.Ready; + } + } + + /** + * @dev Returns the minimum delay in seconds for an operation to become valid. * * This value can be changed by executing an operation that calls `updateDelay`. */ @@ -249,8 +294,9 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { - require(targets.length == values.length, "TimelockController: length mismatch"); - require(targets.length == payloads.length, "TimelockController: length mismatch"); + if (targets.length != values.length || targets.length != payloads.length) { + revert TimelockInvalidOperationLength(targets.length, payloads.length, values.length); + } bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); _schedule(id, delay); @@ -266,8 +312,13 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver * @dev Schedule an operation that is to become valid after a given delay. */ function _schedule(bytes32 id, uint256 delay) private { - require(!isOperation(id), "TimelockController: operation already scheduled"); - require(delay >= getMinDelay(), "TimelockController: insufficient delay"); + if (isOperation(id)) { + revert TimelockUnexpectedOperationState(id, _encodeStateBitmap(OperationState.Unset)); + } + uint256 minDelay = getMinDelay(); + if (delay < minDelay) { + revert TimelockInsufficientDelay(delay, minDelay); + } _timestamps[id] = block.timestamp + delay; } @@ -279,14 +330,19 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver * - the caller must have the 'canceller' role. */ function cancel(bytes32 id) public virtual onlyRole(CANCELLER_ROLE) { - require(isOperationPending(id), "TimelockController: operation cannot be cancelled"); + if (!isOperationPending(id)) { + revert TimelockUnexpectedOperationState( + id, + _encodeStateBitmap(OperationState.Waiting) | _encodeStateBitmap(OperationState.Ready) + ); + } delete _timestamps[id]; emit Cancelled(id); } /** - * @dev Execute an (ready) operation containing a single transaction. + * @dev Execute a ready operation containing a single transaction. * * Emits a {CallExecuted} event. * @@ -313,7 +369,7 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver } /** - * @dev Execute an (ready) operation containing a batch of transactions. + * @dev Execute a ready operation containing a batch of transactions. * * Emits one {CallExecuted} event per transaction in the batch. * @@ -331,8 +387,9 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { - require(targets.length == values.length, "TimelockController: length mismatch"); - require(targets.length == payloads.length, "TimelockController: length mismatch"); + if (targets.length != values.length || targets.length != payloads.length) { + revert TimelockInvalidOperationLength(targets.length, payloads.length, values.length); + } bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); @@ -351,24 +408,30 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver * @dev Execute an operation's call. */ function _execute(address target, uint256 value, bytes calldata data) internal virtual { - (bool success, ) = target.call{value: value}(data); - require(success, "TimelockController: underlying transaction reverted"); + (bool success, bytes memory returndata) = target.call{value: value}(data); + Address.verifyCallResult(success, returndata); } /** * @dev Checks before execution of an operation's calls. */ function _beforeCall(bytes32 id, bytes32 predecessor) private view { - require(isOperationReady(id), "TimelockController: operation is not ready"); - require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency"); + if (!isOperationReady(id)) { + revert TimelockUnexpectedOperationState(id, _encodeStateBitmap(OperationState.Ready)); + } + if (predecessor != bytes32(0) && !isOperationDone(predecessor)) { + revert TimelockUnexecutedPredecessor(predecessor); + } } /** * @dev Checks after execution of an operation's calls. */ function _afterCall(bytes32 id) private { - require(isOperationReady(id), "TimelockController: operation is not ready"); - _timestamps[id] = _DONE_TIMESTAMP; + if (!isOperationReady(id)) { + revert TimelockUnexpectedOperationState(id, _encodeStateBitmap(OperationState.Ready)); + } + _timestamps[id] = DONE_TIMESTAMP; } /** @@ -381,42 +444,27 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing * an operation where the timelock is the target and the data is the ABI-encoded call to this function. */ - function updateDelay(uint256 newDelay) external virtual { - require(msg.sender == address(this), "TimelockController: caller must be timelock"); + function updateDelay(uint256 newDelay) public virtual { + address sender = _msgSender(); + if (sender != address(this)) { + revert TimelockUnauthorizedCaller(sender); + } emit MinDelayChange(_minDelay, newDelay); _minDelay = newDelay; } /** - * @dev See {IERC721Receiver-onERC721Received}. - */ - function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { - return this.onERC721Received.selector; - } - - /** - * @dev See {IERC1155Receiver-onERC1155Received}. - */ - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155Received.selector; - } - - /** - * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + * @dev Encodes a `OperationState` into a `bytes32` representation where each bit enabled corresponds to + * the underlying position in the `OperationState` enum. For example: + * + * 0x000...1000 + * ^^^^^^----- ... + * ^---- Done + * ^--- Ready + * ^-- Waiting + * ^- Unset */ - function onERC1155BatchReceived( - address, - address, - uint256[] memory, - uint256[] memory, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155BatchReceived.selector; + function _encodeStateBitmap(OperationState operationState) internal pure returns (bytes32) { + return bytes32(1 << uint8(operationState)); } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingFractional.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingFractional.sol new file mode 100644 index 00000000..1460d2dd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingFractional.sol @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorCountingFractional.sol) + +pragma solidity ^0.8.24; + +import {IGovernor, Governor} from "../Governor.sol"; +import {GovernorCountingSimple} from "./GovernorCountingSimple.sol"; +import {Math} from "../../utils/math/Math.sol"; + +/** + * @dev Extension of {Governor} for fractional voting. + * + * Similar to {GovernorCountingSimple}, this contract is a votes counting module for {Governor} that supports 3 options: + * Against, For, Abstain. Additionally, it includes a fourth option: Fractional, which allows voters to split their voting + * power amongst the other 3 options. + * + * Votes cast with the Fractional support must be accompanied by a `params` argument that is three packed `uint128` values + * representing the weight the delegate assigns to Against, For, and Abstain respectively. For those votes cast for the other + * 3 options, the `params` argument must be empty. + * + * This is mostly useful when the delegate is a contract that implements its own rules for voting. These delegate-contracts + * can cast fractional votes according to the preferences of multiple entities delegating their voting power. + * + * Some example use cases include: + * + * * Voting from tokens that are held by a DeFi pool + * * Voting from an L2 with tokens held by a bridge + * * Voting privately from a shielded pool using zero knowledge proofs. + * + * Based on ScopeLift's https://github.com/ScopeLift/flexible-voting/blob/e5de2efd1368387b840931f19f3c184c85842761/src/GovernorCountingFractional.sol[`GovernorCountingFractional`] + * + * _Available since v5.1._ + */ +abstract contract GovernorCountingFractional is Governor { + using Math for *; + + uint8 internal constant VOTE_TYPE_FRACTIONAL = 255; + + struct ProposalVote { + uint256 againstVotes; + uint256 forVotes; + uint256 abstainVotes; + mapping(address voter => uint256) usedVotes; + } + + /** + * @dev Mapping from proposal ID to vote tallies for that proposal. + */ + mapping(uint256 proposalId => ProposalVote) private _proposalVotes; + + /** + * @dev A fractional vote params uses more votes than are available for that user. + */ + error GovernorExceedRemainingWeight(address voter, uint256 usedVotes, uint256 remainingWeight); + + /// @inheritdoc IGovernor + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo,fractional&quorum=for,abstain¶ms=fractional"; + } + + /// @inheritdoc IGovernor + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + return usedVotes(proposalId, account) > 0; + } + + /** + * @dev Get the number of votes already cast by `account` for a proposal with `proposalId`. Useful for + * integrations that allow delegates to cast rolling, partial votes. + */ + function usedVotes(uint256 proposalId, address account) public view virtual returns (uint256) { + return _proposalVotes[proposalId].usedVotes[account]; + } + + /** + * @dev Get current distribution of votes for a given proposal. + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); + } + + /// @inheritdoc Governor + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, forVotes must be > againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + return proposalVote.forVotes > proposalVote.againstVotes; + } + + /** + * @dev See {Governor-_countVote}. Function that records the delegate's votes. + * + * Executing this function consumes (part of) the delegate's weight on the proposal. This weight can be + * distributed amongst the 3 options (Against, For, Abstain) by specifying a fractional `support`. + * + * This counting module supports two vote casting modes: nominal and fractional. + * + * - Nominal: A nominal vote is cast by setting `support` to one of the 3 bravo options (Against, For, Abstain). + * - Fractional: A fractional vote is cast by setting `support` to `type(uint8).max` (255). + * + * Casting a nominal vote requires `params` to be empty and consumes the delegate's full remaining weight on the + * proposal for the specified `support` option. This is similar to the {GovernorCountingSimple} module and follows + * the `VoteType` enum from Governor Bravo. As a consequence, no vote weight remains unspent so no further voting + * is possible (for this `proposalId` and this `account`). + * + * Casting a fractional vote consumes a fraction of the delegate's remaining weight on the proposal according to the + * weights the delegate assigns to each support option (Against, For, Abstain respectively). The sum total of the + * three decoded vote weights _must_ be less than or equal to the delegate's remaining weight on the proposal (i.e. + * their checkpointed total weight minus votes already cast on the proposal). This format can be produced using: + * + * `abi.encodePacked(uint128(againstVotes), uint128(forVotes), uint128(abstainVotes))` + * + * NOTE: Consider that fractional voting restricts the number of casted votes (in each category) to 128 bits. + * Depending on how many decimals the underlying token has, a single voter may require to split their vote into + * multiple vote operations. For precision higher than ~30 decimals, large token holders may require a + * potentially large number of calls to cast all their votes. The voter has the possibility to cast all the + * remaining votes in a single operation using the traditional "bravo" vote. + */ + // slither-disable-next-line cyclomatic-complexity + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 totalWeight, + bytes memory params + ) internal virtual override returns (uint256) { + // Compute number of remaining votes. Returns 0 on overflow. + (, uint256 remainingWeight) = totalWeight.trySub(usedVotes(proposalId, account)); + if (remainingWeight == 0) { + revert GovernorAlreadyCastVote(account); + } + + uint256 againstVotes = 0; + uint256 forVotes = 0; + uint256 abstainVotes = 0; + uint256 usedWeight = 0; + + // For clarity of event indexing, fractional voting must be clearly advertised in the "support" field. + // + // Supported `support` value must be: + // - "Full" voting: `support = 0` (Against), `1` (For) or `2` (Abstain), with empty params. + // - "Fractional" voting: `support = 255`, with 48 bytes params. + if (support == uint8(GovernorCountingSimple.VoteType.Against)) { + if (params.length != 0) revert GovernorInvalidVoteParams(); + usedWeight = againstVotes = remainingWeight; + } else if (support == uint8(GovernorCountingSimple.VoteType.For)) { + if (params.length != 0) revert GovernorInvalidVoteParams(); + usedWeight = forVotes = remainingWeight; + } else if (support == uint8(GovernorCountingSimple.VoteType.Abstain)) { + if (params.length != 0) revert GovernorInvalidVoteParams(); + usedWeight = abstainVotes = remainingWeight; + } else if (support == VOTE_TYPE_FRACTIONAL) { + // The `params` argument is expected to be three packed `uint128`: + // `abi.encodePacked(uint128(againstVotes), uint128(forVotes), uint128(abstainVotes))` + if (params.length != 0x30) revert GovernorInvalidVoteParams(); + + assembly ("memory-safe") { + againstVotes := shr(128, mload(add(params, 0x20))) + forVotes := shr(128, mload(add(params, 0x30))) + abstainVotes := shr(128, mload(add(params, 0x40))) + usedWeight := add(add(againstVotes, forVotes), abstainVotes) // inputs are uint128: cannot overflow + } + + // check parsed arguments are valid + if (usedWeight > remainingWeight) { + revert GovernorExceedRemainingWeight(account, usedWeight, remainingWeight); + } + } else { + revert GovernorInvalidVoteType(); + } + + // update votes tracking + ProposalVote storage details = _proposalVotes[proposalId]; + if (againstVotes > 0) details.againstVotes += againstVotes; + if (forVotes > 0) details.forVotes += forVotes; + if (abstainVotes > 0) details.abstainVotes += abstainVotes; + details.usedVotes[account] += usedWeight; + + return usedWeight; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingOverridable.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingOverridable.sol new file mode 100644 index 00000000..45a72ea7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingOverridable.sol @@ -0,0 +1,222 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorCountingOverridable.sol) + +pragma solidity ^0.8.24; + +import {SignatureChecker} from "../../utils/cryptography/SignatureChecker.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {VotesExtended} from "../utils/VotesExtended.sol"; +import {GovernorVotes} from "./GovernorVotes.sol"; +import {IGovernor, Governor} from "../Governor.sol"; + +/** + * @dev Extension of {Governor} which enables delegators to override the vote of their delegates. This module requires a + * token that inherits {VotesExtended}. + */ +abstract contract GovernorCountingOverridable is GovernorVotes { + bytes32 public constant OVERRIDE_BALLOT_TYPEHASH = + keccak256("OverrideBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason)"); + + /** + * @dev Supported vote types. Matches Governor Bravo ordering. + */ + enum VoteType { + Against, + For, + Abstain + } + + struct VoteReceipt { + uint8 casted; // 0 if vote was not casted. Otherwise: support + 1 + bool hasOverridden; + uint208 overriddenWeight; + } + + struct ProposalVote { + uint256[3] votes; + mapping(address voter => VoteReceipt) voteReceipt; + } + + /// @dev The votes casted by `delegate` were reduced by `weight` after an override vote was casted by the original token holder + event VoteReduced(address indexed delegate, uint256 proposalId, uint8 support, uint256 weight); + + /// @dev A delegated vote on `proposalId` was overridden by `weight` + event OverrideVoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); + + error GovernorAlreadyOverriddenVote(address account); + + mapping(uint256 proposalId => ProposalVote) private _proposalVotes; + + /// @inheritdoc IGovernor + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo,override&quorum=for,abstain&overridable=true"; + } + + /** + * @dev See {IGovernor-hasVoted}. + * + * NOTE: Calling {castVote} (or similar) casts a vote using the voting power that is delegated to the voter. + * Conversely, calling {castOverrideVote} (or similar) uses the voting power of the account itself, from its asset + * balances. Casting an "override vote" does not count as voting and won't be reflected by this getter. Consider + * using {hasVotedOverride} to check if an account has casted an "override vote" for a given proposal id. + */ + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + return _proposalVotes[proposalId].voteReceipt[account].casted != 0; + } + + /** + * @dev Check if an `account` has overridden their delegate for a proposal. + */ + function hasVotedOverride(uint256 proposalId, address account) public view virtual returns (bool) { + return _proposalVotes[proposalId].voteReceipt[account].hasOverridden; + } + + /** + * @dev Accessor to the internal vote counts. + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { + uint256[3] storage votes = _proposalVotes[proposalId].votes; + return (votes[uint8(VoteType.Against)], votes[uint8(VoteType.For)], votes[uint8(VoteType.Abstain)]); + } + + /// @inheritdoc Governor + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + uint256[3] storage votes = _proposalVotes[proposalId].votes; + return quorum(proposalSnapshot(proposalId)) <= votes[uint8(VoteType.For)] + votes[uint8(VoteType.Abstain)]; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + uint256[3] storage votes = _proposalVotes[proposalId].votes; + return votes[uint8(VoteType.For)] > votes[uint8(VoteType.Against)]; + } + + /** + * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo). + * + * NOTE: called by {Governor-_castVote} which emits the {IGovernor-VoteCast} (or {IGovernor-VoteCastWithParams}) + * event. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 totalWeight, + bytes memory /*params*/ + ) internal virtual override returns (uint256) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + if (support > uint8(VoteType.Abstain)) { + revert GovernorInvalidVoteType(); + } + + if (proposalVote.voteReceipt[account].casted != 0) { + revert GovernorAlreadyCastVote(account); + } + + totalWeight -= proposalVote.voteReceipt[account].overriddenWeight; + proposalVote.votes[support] += totalWeight; + proposalVote.voteReceipt[account].casted = support + 1; + + return totalWeight; + } + + /** + * @dev Variant of {Governor-_countVote} that deals with vote overrides. + * + * NOTE: See {hasVoted} for more details about the difference between {castVote} and {castOverrideVote}. + */ + function _countOverride(uint256 proposalId, address account, uint8 support) internal virtual returns (uint256) { + ProposalVote storage proposalVote = _proposalVotes[proposalId]; + + if (support > uint8(VoteType.Abstain)) { + revert GovernorInvalidVoteType(); + } + + if (proposalVote.voteReceipt[account].hasOverridden) { + revert GovernorAlreadyOverriddenVote(account); + } + + uint256 snapshot = proposalSnapshot(proposalId); + uint256 overriddenWeight = VotesExtended(address(token())).getPastBalanceOf(account, snapshot); + address delegate = VotesExtended(address(token())).getPastDelegate(account, snapshot); + uint8 delegateCasted = proposalVote.voteReceipt[delegate].casted; + + proposalVote.voteReceipt[account].hasOverridden = true; + proposalVote.votes[support] += overriddenWeight; + if (delegateCasted == 0) { + proposalVote.voteReceipt[delegate].overriddenWeight += SafeCast.toUint208(overriddenWeight); + } else { + uint8 delegateSupport = delegateCasted - 1; + proposalVote.votes[delegateSupport] -= overriddenWeight; + emit VoteReduced(delegate, proposalId, delegateSupport, overriddenWeight); + } + + return overriddenWeight; + } + + /// @dev Variant of {Governor-_castVote} that deals with vote overrides. Returns the overridden weight. + function _castOverride( + uint256 proposalId, + address account, + uint8 support, + string calldata reason + ) internal virtual returns (uint256) { + _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Active)); + + uint256 overriddenWeight = _countOverride(proposalId, account, support); + + emit OverrideVoteCast(account, proposalId, support, overriddenWeight, reason); + + _tallyUpdated(proposalId); + + return overriddenWeight; + } + + /// @dev Public function for casting an override vote. Returns the overridden weight. + function castOverrideVote( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual returns (uint256) { + address voter = _msgSender(); + return _castOverride(proposalId, voter, support, reason); + } + + /// @dev Public function for casting an override vote using a voter's signature. Returns the overridden weight. + function castOverrideVoteBySig( + uint256 proposalId, + uint8 support, + address voter, + string calldata reason, + bytes calldata signature + ) public virtual returns (uint256) { + bool valid = SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode( + OVERRIDE_BALLOT_TYPEHASH, + proposalId, + support, + voter, + _useNonce(voter), + keccak256(bytes(reason)) + ) + ) + ), + signature + ); + + if (!valid) { + revert GovernorInvalidSignature(voter); + } + + return _castOverride(proposalId, voter, support, reason); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorCountingSimple.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingSimple.sol similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorCountingSimple.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingSimple.sol index b9517445..3f24a657 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorCountingSimple.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorCountingSimple.sol @@ -1,14 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorCountingSimple.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorCountingSimple.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../Governor.sol"; +import {IGovernor, Governor} from "../Governor.sol"; /** * @dev Extension of {Governor} for simple, 3 options, vote counting. - * - * _Available since v4.3._ */ abstract contract GovernorCountingSimple is Governor { /** @@ -24,22 +22,18 @@ abstract contract GovernorCountingSimple is Governor { uint256 againstVotes; uint256 forVotes; uint256 abstainVotes; - mapping(address => bool) hasVoted; + mapping(address voter => bool) hasVoted; } - mapping(uint256 => ProposalVote) private _proposalVotes; + mapping(uint256 proposalId => ProposalVote) private _proposalVotes; - /** - * @dev See {IGovernor-COUNTING_MODE}. - */ + /// @inheritdoc IGovernor // solhint-disable-next-line func-name-mixedcase function COUNTING_MODE() public pure virtual override returns (string memory) { return "support=bravo&quorum=for,abstain"; } - /** - * @dev See {IGovernor-hasVoted}. - */ + /// @inheritdoc IGovernor function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { return _proposalVotes[proposalId].hasVoted[account]; } @@ -54,9 +48,7 @@ abstract contract GovernorCountingSimple is Governor { return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); } - /** - * @dev See {Governor-_quorumReached}. - */ + /// @inheritdoc Governor function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { ProposalVote storage proposalVote = _proposalVotes[proposalId]; @@ -79,22 +71,26 @@ abstract contract GovernorCountingSimple is Governor { uint256 proposalId, address account, uint8 support, - uint256 weight, + uint256 totalWeight, bytes memory // params - ) internal virtual override { + ) internal virtual override returns (uint256) { ProposalVote storage proposalVote = _proposalVotes[proposalId]; - require(!proposalVote.hasVoted[account], "GovernorVotingSimple: vote already cast"); + if (proposalVote.hasVoted[account]) { + revert GovernorAlreadyCastVote(account); + } proposalVote.hasVoted[account] = true; if (support == uint8(VoteType.Against)) { - proposalVote.againstVotes += weight; + proposalVote.againstVotes += totalWeight; } else if (support == uint8(VoteType.For)) { - proposalVote.forVotes += weight; + proposalVote.forVotes += totalWeight; } else if (support == uint8(VoteType.Abstain)) { - proposalVote.abstainVotes += weight; + proposalVote.abstainVotes += totalWeight; } else { - revert("GovernorVotingSimple: invalid value for enum VoteType"); + revert GovernorInvalidVoteType(); } + + return totalWeight; } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorNoncesKeyed.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorNoncesKeyed.sol new file mode 100644 index 00000000..c506b7e3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorNoncesKeyed.sol @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorNoncesKeyed.sol) + +pragma solidity ^0.8.24; + +import {Governor} from "../Governor.sol"; +import {Nonces} from "../../utils/Nonces.sol"; +import {NoncesKeyed} from "../../utils/NoncesKeyed.sol"; +import {SignatureChecker} from "../../utils/cryptography/SignatureChecker.sol"; + +/** + * @dev An extension of {Governor} that extends existing nonce management to use {NoncesKeyed}, where the key is the low-order 192 bits of the `proposalId`. + * This is useful for voting by signature while maintaining separate sequences of nonces for each proposal. + * + * NOTE: Traditional (un-keyed) nonces are still supported and can continue to be used as if this extension was not present. + */ +abstract contract GovernorNoncesKeyed is Governor, NoncesKeyed { + function _useCheckedNonce(address owner, uint256 nonce) internal virtual override(Nonces, NoncesKeyed) { + super._useCheckedNonce(owner, nonce); + } + + /** + * @dev Check the signature against keyed nonce and falls back to the traditional nonce. + * + * NOTE: This function won't call `super._validateVoteSig` if the keyed nonce is valid. + * Side effects may be skipped depending on the linearization of the function. + */ + function _validateVoteSig( + uint256 proposalId, + uint8 support, + address voter, + bytes memory signature + ) internal virtual override returns (bool) { + if ( + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode(BALLOT_TYPEHASH, proposalId, support, voter, nonces(voter, uint192(proposalId))) + ) + ), + signature + ) + ) { + _useNonce(voter, uint192(proposalId)); + return true; + } else { + return super._validateVoteSig(proposalId, support, voter, signature); + } + } + + /** + * @dev Check the signature against keyed nonce and falls back to the traditional nonce. + * + * NOTE: This function won't call `super._validateExtendedVoteSig` if the keyed nonce is valid. + * Side effects may be skipped depending on the linearization of the function. + */ + function _validateExtendedVoteSig( + uint256 proposalId, + uint8 support, + address voter, + string memory reason, + bytes memory params, + bytes memory signature + ) internal virtual override returns (bool) { + if ( + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode( + EXTENDED_BALLOT_TYPEHASH, + proposalId, + support, + voter, + nonces(voter, uint192(proposalId)), + keccak256(bytes(reason)), + keccak256(params) + ) + ) + ), + signature + ) + ) { + _useNonce(voter, uint192(proposalId)); + return true; + } else { + return super._validateExtendedVoteSig(proposalId, support, voter, reason, params, signature); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorPreventLateQuorum.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorPreventLateQuorum.sol similarity index 69% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorPreventLateQuorum.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorPreventLateQuorum.sol index 752a92cf..581f96e5 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorPreventLateQuorum.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorPreventLateQuorum.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorPreventLateQuorum.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorPreventLateQuorum.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../Governor.sol"; -import "../../utils/math/Math.sol"; +import {Governor} from "../Governor.sol"; +import {Math} from "../../utils/math/Math.sol"; /** * @dev A module that ensures there is a minimum voting period after quorum is reached. This prevents a large voter from @@ -14,14 +14,11 @@ import "../../utils/math/Math.sol"; * If a vote causes quorum to be reached, the proposal's voting period may be extended so that it does not end before at * least a specified time has passed (the "vote extension" parameter). This parameter can be set through a governance * proposal. - * - * _Available since v4.5._ */ abstract contract GovernorPreventLateQuorum is Governor { - uint64 private _voteExtension; + uint48 private _voteExtension; - /// @custom:oz-retyped-from mapping(uint256 => Timers.BlockNumber) - mapping(uint256 => uint64) private _extendedDeadlines; + mapping(uint256 proposalId => uint48) private _extendedDeadlines; /// @dev Emitted when a proposal deadline is pushed back due to reaching quorum late in its voting period. event ProposalExtended(uint256 indexed proposalId, uint64 extendedDeadline); @@ -30,11 +27,11 @@ abstract contract GovernorPreventLateQuorum is Governor { event LateQuorumVoteExtensionSet(uint64 oldVoteExtension, uint64 newVoteExtension); /** - * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the governor - * clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period ends. If - * necessary the voting period will be extended beyond the one set during proposal creation. + * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the + * governor clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period + * ends. If necessary the voting period will be extended beyond the one set during proposal creation. */ - constructor(uint64 initialVoteExtension) { + constructor(uint48 initialVoteExtension) { _setLateQuorumVoteExtension(initialVoteExtension); } @@ -47,22 +44,14 @@ abstract contract GovernorPreventLateQuorum is Governor { } /** - * @dev Casts a vote and detects if it caused quorum to be reached, potentially extending the voting period. See - * {Governor-_castVote}. + * @dev Vote tally updated and detects if it caused quorum to be reached, potentially extending the voting period. * * May emit a {ProposalExtended} event. */ - function _castVote( - uint256 proposalId, - address account, - uint8 support, - string memory reason, - bytes memory params - ) internal virtual override returns (uint256) { - uint256 result = super._castVote(proposalId, account, support, reason, params); - + function _tallyUpdated(uint256 proposalId) internal virtual override { + super._tallyUpdated(proposalId); if (_extendedDeadlines[proposalId] == 0 && _quorumReached(proposalId)) { - uint64 extendedDeadline = clock() + lateQuorumVoteExtension(); + uint48 extendedDeadline = clock() + lateQuorumVoteExtension(); if (extendedDeadline > proposalDeadline(proposalId)) { emit ProposalExtended(proposalId, extendedDeadline); @@ -70,15 +59,13 @@ abstract contract GovernorPreventLateQuorum is Governor { _extendedDeadlines[proposalId] = extendedDeadline; } - - return result; } /** * @dev Returns the current value of the vote extension parameter: the number of blocks that are required to pass * from the time a proposal reaches quorum until its voting period ends. */ - function lateQuorumVoteExtension() public view virtual returns (uint64) { + function lateQuorumVoteExtension() public view virtual returns (uint48) { return _voteExtension; } @@ -88,7 +75,7 @@ abstract contract GovernorPreventLateQuorum is Governor { * * Emits a {LateQuorumVoteExtensionSet} event. */ - function setLateQuorumVoteExtension(uint64 newVoteExtension) public virtual onlyGovernance { + function setLateQuorumVoteExtension(uint48 newVoteExtension) public virtual onlyGovernance { _setLateQuorumVoteExtension(newVoteExtension); } @@ -98,7 +85,7 @@ abstract contract GovernorPreventLateQuorum is Governor { * * Emits a {LateQuorumVoteExtensionSet} event. */ - function _setLateQuorumVoteExtension(uint64 newVoteExtension) internal virtual { + function _setLateQuorumVoteExtension(uint48 newVoteExtension) internal virtual { emit LateQuorumVoteExtensionSet(_voteExtension, newVoteExtension); _voteExtension = newVoteExtension; } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorProposalGuardian.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorProposalGuardian.sol new file mode 100644 index 00000000..618f66c8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorProposalGuardian.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorProposalGuardian.sol) + +pragma solidity ^0.8.24; + +import {Governor} from "../Governor.sol"; + +/** + * @dev Extension of {Governor} which adds a proposal guardian that can cancel proposals at any stage in the proposal's lifecycle. + * + * NOTE: if the proposal guardian is not configured, then proposers take this role for their proposals. + */ +abstract contract GovernorProposalGuardian is Governor { + address private _proposalGuardian; + + event ProposalGuardianSet(address oldProposalGuardian, address newProposalGuardian); + + /** + * @dev Getter that returns the address of the proposal guardian. + */ + function proposalGuardian() public view virtual returns (address) { + return _proposalGuardian; + } + + /** + * @dev Update the proposal guardian's address. This operation can only be performed through a governance proposal. + * + * Emits a {ProposalGuardianSet} event. + */ + function setProposalGuardian(address newProposalGuardian) public virtual onlyGovernance { + _setProposalGuardian(newProposalGuardian); + } + + /** + * @dev Internal setter for the proposal guardian. + * + * Emits a {ProposalGuardianSet} event. + */ + function _setProposalGuardian(address newProposalGuardian) internal virtual { + emit ProposalGuardianSet(_proposalGuardian, newProposalGuardian); + _proposalGuardian = newProposalGuardian; + } + + /** + * @dev Override {Governor-_validateCancel} to implement the extended cancellation logic. + * + * * The {proposalGuardian} can cancel any proposal at any point. + * * If no proposal guardian is set, the {IGovernor-proposalProposer} can cancel their proposals at any point. + * * In any case, permissions defined in {Governor-_validateCancel} (or another override) remains valid. + */ + function _validateCancel(uint256 proposalId, address caller) internal view virtual override returns (bool) { + address guardian = proposalGuardian(); + + return + guardian == caller || + (guardian == address(0) && caller == proposalProposer(proposalId)) || + super._validateCancel(proposalId, caller); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSequentialProposalId.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSequentialProposalId.sol new file mode 100644 index 00000000..d6869bbd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSequentialProposalId.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorSequentialProposalId.sol) + +pragma solidity ^0.8.24; + +import {IGovernor, Governor} from "../Governor.sol"; + +/** + * @dev Extension of {Governor} that changes the numbering of proposal ids from the default hash-based approach to + * sequential ids. + */ +abstract contract GovernorSequentialProposalId is Governor { + uint256 private _latestProposalId; + mapping(uint256 proposalHash => uint256 proposalId) private _proposalIds; + + /** + * @dev The {latestProposalId} may only be initialized if it hasn't been set yet + * (through initialization or the creation of a proposal). + */ + error GovernorAlreadyInitializedLatestProposalId(); + + /// @inheritdoc IGovernor + function getProposalId( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public view virtual override returns (uint256) { + uint256 proposalHash = hashProposal(targets, values, calldatas, descriptionHash); + uint256 storedProposalId = _proposalIds[proposalHash]; + if (storedProposalId == 0) { + revert GovernorNonexistentProposal(0); + } + return storedProposalId; + } + + /** + * @dev Returns the latest proposal id. A return value of 0 means no proposals have been created yet. + */ + function latestProposalId() public view virtual returns (uint256) { + return _latestProposalId; + } + + /** + * @dev See {IGovernor-_propose}. + * Hook into the proposing mechanism to increment proposal count. + */ + function _propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description, + address proposer + ) internal virtual override returns (uint256) { + uint256 proposalHash = hashProposal(targets, values, calldatas, keccak256(bytes(description))); + uint256 storedProposalId = _proposalIds[proposalHash]; + if (storedProposalId == 0) { + _proposalIds[proposalHash] = ++_latestProposalId; + } + return super._propose(targets, values, calldatas, description, proposer); + } + + /** + * @dev Internal function to set the {latestProposalId}. This function is helpful when transitioning + * from another governance system. The next proposal id will be `newLatestProposalId` + 1. + * + * May only call this function if the current value of {latestProposalId} is 0. + */ + function _initializeLatestProposalId(uint256 newLatestProposalId) internal virtual { + if (_latestProposalId != 0) { + revert GovernorAlreadyInitializedLatestProposalId(); + } + _latestProposalId = newLatestProposalId; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorSettings.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSettings.sol similarity index 73% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorSettings.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSettings.sol index ec6a9830..5f3cef77 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorSettings.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSettings.sol @@ -1,19 +1,20 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorSettings.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorSettings.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../Governor.sol"; +import {IGovernor, Governor} from "../Governor.sol"; /** * @dev Extension of {Governor} for settings updatable through governance. - * - * _Available since v4.4._ */ abstract contract GovernorSettings is Governor { - uint256 private _votingDelay; - uint256 private _votingPeriod; + // amount of token uint256 private _proposalThreshold; + // timepoint: limited to uint48 in core (same as clock() type) + uint48 private _votingDelay; + // duration: limited to uint32 in core + uint32 private _votingPeriod; event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay); event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod); @@ -22,29 +23,23 @@ abstract contract GovernorSettings is Governor { /** * @dev Initialize the governance parameters. */ - constructor(uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold) { + constructor(uint48 initialVotingDelay, uint32 initialVotingPeriod, uint256 initialProposalThreshold) { _setVotingDelay(initialVotingDelay); _setVotingPeriod(initialVotingPeriod); _setProposalThreshold(initialProposalThreshold); } - /** - * @dev See {IGovernor-votingDelay}. - */ + /// @inheritdoc IGovernor function votingDelay() public view virtual override returns (uint256) { return _votingDelay; } - /** - * @dev See {IGovernor-votingPeriod}. - */ + /// @inheritdoc IGovernor function votingPeriod() public view virtual override returns (uint256) { return _votingPeriod; } - /** - * @dev See {Governor-proposalThreshold}. - */ + /// @inheritdoc Governor function proposalThreshold() public view virtual override returns (uint256) { return _proposalThreshold; } @@ -54,7 +49,7 @@ abstract contract GovernorSettings is Governor { * * Emits a {VotingDelaySet} event. */ - function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance { + function setVotingDelay(uint48 newVotingDelay) public virtual onlyGovernance { _setVotingDelay(newVotingDelay); } @@ -63,7 +58,7 @@ abstract contract GovernorSettings is Governor { * * Emits a {VotingPeriodSet} event. */ - function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance { + function setVotingPeriod(uint32 newVotingPeriod) public virtual onlyGovernance { _setVotingPeriod(newVotingPeriod); } @@ -81,7 +76,7 @@ abstract contract GovernorSettings is Governor { * * Emits a {VotingDelaySet} event. */ - function _setVotingDelay(uint256 newVotingDelay) internal virtual { + function _setVotingDelay(uint48 newVotingDelay) internal virtual { emit VotingDelaySet(_votingDelay, newVotingDelay); _votingDelay = newVotingDelay; } @@ -91,9 +86,10 @@ abstract contract GovernorSettings is Governor { * * Emits a {VotingPeriodSet} event. */ - function _setVotingPeriod(uint256 newVotingPeriod) internal virtual { - // voting period must be at least one block long - require(newVotingPeriod > 0, "GovernorSettings: voting period too low"); + function _setVotingPeriod(uint32 newVotingPeriod) internal virtual { + if (newVotingPeriod == 0) { + revert GovernorInvalidVotingPeriod(0); + } emit VotingPeriodSet(_votingPeriod, newVotingPeriod); _votingPeriod = newVotingPeriod; } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorStorage.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorStorage.sol new file mode 100644 index 00000000..d833c5d8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorStorage.sol @@ -0,0 +1,134 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (governance/extensions/GovernorStorage.sol) + +pragma solidity ^0.8.24; + +import {Governor} from "../Governor.sol"; + +/** + * @dev Extension of {Governor} that implements storage of proposal details. This module also provides primitives for + * the enumerability of proposals. + * + * Use cases for this module include: + * - UIs that explore the proposal state without relying on event indexing. + * - Using only the proposalId as an argument in the {Governor-queue} and {Governor-execute} functions for L2 chains + * where storage is cheap compared to calldata. + */ +abstract contract GovernorStorage is Governor { + struct ProposalDetails { + address[] targets; + uint256[] values; + bytes[] calldatas; + bytes32 descriptionHash; + } + + uint256[] private _proposalIds; + mapping(uint256 proposalId => ProposalDetails) private _proposalDetails; + + /** + * @dev Hook into the proposing mechanism + */ + function _propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description, + address proposer + ) internal virtual override returns (uint256) { + uint256 proposalId = super._propose(targets, values, calldatas, description, proposer); + + // store + _proposalIds.push(proposalId); + _proposalDetails[proposalId] = ProposalDetails({ + targets: targets, + values: values, + calldatas: calldatas, + descriptionHash: keccak256(bytes(description)) + }); + + return proposalId; + } + + /** + * @dev Version of {IGovernor-queue} with only `proposalId` as an argument. + */ + function queue(uint256 proposalId) public virtual { + // here, using storage is more efficient than memory + ProposalDetails storage details = _proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + queue(details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev Version of {IGovernor-execute} with only `proposalId` as an argument. + */ + function execute(uint256 proposalId) public payable virtual { + // here, using storage is more efficient than memory + ProposalDetails storage details = _proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + execute(details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev ProposalId version of {IGovernor-cancel}. + */ + function cancel(uint256 proposalId) public virtual { + // here, using storage is more efficient than memory + ProposalDetails storage details = _proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + cancel(details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev Returns the number of stored proposals. + */ + function proposalCount() public view virtual returns (uint256) { + return _proposalIds.length; + } + + /** + * @dev Returns the details of a proposalId. Reverts if `proposalId` is not a known proposal. + */ + function proposalDetails( + uint256 proposalId + ) + public + view + virtual + returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash) + { + // here, using memory is more efficient than storage + ProposalDetails memory details = _proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + return (details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev Returns the details (including the proposalId) of a proposal given its sequential index. + */ + function proposalDetailsAt( + uint256 index + ) + public + view + virtual + returns ( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) + { + proposalId = _proposalIds[index]; + (targets, values, calldatas, descriptionHash) = proposalDetails(proposalId); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSuperQuorum.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSuperQuorum.sol new file mode 100644 index 00000000..293f61a1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorSuperQuorum.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorSuperQuorum.sol) + +pragma solidity ^0.8.24; + +import {Governor} from "../Governor.sol"; + +/** + * @dev Extension of {Governor} with a super quorum. Proposals that meet the super quorum (and have a majority of for + * votes) advance to the `Succeeded` state before the proposal deadline. Counting modules that want to use this + * extension must implement {proposalVotes}. + */ +abstract contract GovernorSuperQuorum is Governor { + /** + * @dev Minimum number of cast votes required for a proposal to reach super quorum. Only FOR votes are counted + * towards the super quorum. Once the super quorum is reached, an active proposal can proceed to the next state + * without waiting for the proposal deadline. + * + * NOTE: The `timepoint` parameter corresponds to the snapshot used for counting the vote. This enables scaling of the + * quorum depending on values such as the `totalSupply` of a token at this timepoint (see {ERC20Votes}). + * + * NOTE: Make sure the value specified for the super quorum is greater than {quorum}, otherwise, it may be + * possible to pass a proposal with less votes than the default quorum. + */ + function superQuorum(uint256 timepoint) public view virtual returns (uint256); + + /** + * @dev Accessor to the internal vote counts. This must be implemented by the counting module. Counting modules + * that don't implement this function are incompatible with this module + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes); + + /** + * @dev Overridden version of the {Governor-state} function that checks if the proposal has reached the super + * quorum. + * + * NOTE: If the proposal reaches super quorum but {_voteSucceeded} returns false, eg, assuming the super quorum + * has been set low enough that both FOR and AGAINST votes have exceeded it and AGAINST votes exceed FOR votes, + * the proposal continues to be active until {_voteSucceeded} returns true or the proposal deadline is reached. + * This means that with a low super quorum it is also possible that a vote can succeed prematurely before enough + * AGAINST voters have a chance to vote. Hence, it is recommended to set a high enough super quorum to avoid these + * types of scenarios. + */ + function state(uint256 proposalId) public view virtual override returns (ProposalState) { + ProposalState currentState = super.state(proposalId); + if (currentState != ProposalState.Active) return currentState; + + (, uint256 forVotes, ) = proposalVotes(proposalId); + if (forVotes < superQuorum(proposalSnapshot(proposalId)) || !_voteSucceeded(proposalId)) { + return ProposalState.Active; + } else if (proposalEta(proposalId) == 0) { + return ProposalState.Succeeded; + } else { + return ProposalState.Queued; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockAccess.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockAccess.sol new file mode 100644 index 00000000..14823d90 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockAccess.sol @@ -0,0 +1,346 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorTimelockAccess.sol) + +pragma solidity ^0.8.24; + +import {IGovernor, Governor} from "../Governor.sol"; +import {AuthorityUtils} from "../../access/manager/AuthorityUtils.sol"; +import {IAccessManager} from "../../access/manager/IAccessManager.sol"; +import {Address} from "../../utils/Address.sol"; +import {Math} from "../../utils/math/Math.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {Time} from "../../utils/types/Time.sol"; + +/** + * @dev This module connects a {Governor} instance to an {AccessManager} instance, allowing the governor to make calls + * that are delay-restricted by the manager using the normal {queue} workflow. An optional base delay is applied to + * operations that are not delayed externally by the manager. Execution of a proposal will be delayed as much as + * necessary to meet the required delays of all of its operations. + * + * This extension allows the governor to hold and use its own assets and permissions, unlike {GovernorTimelockControl} + * and {GovernorTimelockCompound}, where the timelock is a separate contract that must be the one to hold assets and + * permissions. Operations that are delay-restricted by the manager, however, will be executed through the + * {AccessManager-execute} function. + * + * ==== Security Considerations + * + * Some operations may be cancelable in the `AccessManager` by the admin or a set of guardians, depending on the + * restricted function being invoked. Since proposals are atomic, the cancellation by a guardian of a single operation + * in a proposal will cause all of the proposal to become unable to execute. Consider proposing cancellable operations + * separately. + * + * By default, function calls will be routed through the associated `AccessManager` whenever it claims the target + * function to be restricted by it. However, admins may configure the manager to make that claim for functions that a + * governor would want to call directly (e.g., token transfers) in an attempt to deny it access to those functions. To + * mitigate this attack vector, the governor is able to ignore the restrictions claimed by the `AccessManager` using + * {setAccessManagerIgnored}. While permanent denial of service is mitigated, temporary DoS may still be technically + * possible. All of the governor's own functions (e.g., {setBaseDelaySeconds}) ignore the `AccessManager` by default. + * + * NOTE: `AccessManager` does not support scheduling more than one operation with the same target and calldata at + * the same time. See {AccessManager-schedule} for a workaround. + */ +abstract contract GovernorTimelockAccess is Governor { + // An execution plan is produced at the moment a proposal is created, in order to fix at that point the exact + // execution semantics of the proposal, namely whether a call will go through {AccessManager-execute}. + struct ExecutionPlan { + uint16 length; + uint32 delay; + // We use mappings instead of arrays because it allows us to pack values in storage more tightly without + // storing the length redundantly. + // We pack 8 operations' data in each bucket. Each uint32 value is set to 1 upon proposal creation if it has + // to be scheduled and executed through the manager. Upon queuing, the value is set to nonce + 2, where the + // nonce is received from the manager when scheduling the operation. + mapping(uint256 operationBucket => uint32[8]) managerData; + } + + // The meaning of the "toggle" set to true depends on the target contract. + // If target == address(this), the manager is ignored by default, and a true toggle means it won't be ignored. + // For all other target contracts, the manager is used by default, and a true toggle means it will be ignored. + mapping(address target => mapping(bytes4 selector => bool)) private _ignoreToggle; + + mapping(uint256 proposalId => ExecutionPlan) private _executionPlan; + + uint32 private _baseDelay; + + IAccessManager private immutable _manager; + + error GovernorUnmetDelay(uint256 proposalId, uint256 neededTimestamp); + error GovernorMismatchedNonce(uint256 proposalId, uint256 expectedNonce, uint256 actualNonce); + error GovernorLockedIgnore(); + + event BaseDelaySet(uint32 oldBaseDelaySeconds, uint32 newBaseDelaySeconds); + event AccessManagerIgnoredSet(address target, bytes4 selector, bool ignored); + + /** + * @dev Initialize the governor with an {AccessManager} and initial base delay. + */ + constructor(address manager, uint32 initialBaseDelay) { + _manager = IAccessManager(manager); + _setBaseDelaySeconds(initialBaseDelay); + } + + /** + * @dev Returns the {AccessManager} instance associated to this governor. + */ + function accessManager() public view virtual returns (IAccessManager) { + return _manager; + } + + /** + * @dev Base delay that will be applied to all function calls. Some may be further delayed by their associated + * `AccessManager` authority; in this case the final delay will be the maximum of the base delay and the one + * demanded by the authority. + * + * NOTE: Execution delays are processed by the `AccessManager` contracts, and according to that contract are + * expressed in seconds. Therefore, the base delay is also in seconds, regardless of the governor's clock mode. + */ + function baseDelaySeconds() public view virtual returns (uint32) { + return _baseDelay; + } + + /** + * @dev Change the value of {baseDelaySeconds}. This operation can only be invoked through a governance proposal. + */ + function setBaseDelaySeconds(uint32 newBaseDelay) public virtual onlyGovernance { + _setBaseDelaySeconds(newBaseDelay); + } + + /** + * @dev Change the value of {baseDelaySeconds}. Internal function without access control. + */ + function _setBaseDelaySeconds(uint32 newBaseDelay) internal virtual { + emit BaseDelaySet(_baseDelay, newBaseDelay); + _baseDelay = newBaseDelay; + } + + /** + * @dev Check if restrictions from the associated {AccessManager} are ignored for a target function. Returns true + * when the target function will be invoked directly regardless of `AccessManager` settings for the function. + * See {setAccessManagerIgnored} and Security Considerations above. + */ + function isAccessManagerIgnored(address target, bytes4 selector) public view virtual returns (bool) { + bool isGovernor = target == address(this); + return _ignoreToggle[target][selector] != isGovernor; // equivalent to: isGovernor ? !toggle : toggle + } + + /** + * @dev Configure whether restrictions from the associated {AccessManager} are ignored for a target function. + * See Security Considerations above. + */ + function setAccessManagerIgnored( + address target, + bytes4[] calldata selectors, + bool ignored + ) public virtual onlyGovernance { + for (uint256 i = 0; i < selectors.length; ++i) { + _setAccessManagerIgnored(target, selectors[i], ignored); + } + } + + /** + * @dev Internal version of {setAccessManagerIgnored} without access restriction. + */ + function _setAccessManagerIgnored(address target, bytes4 selector, bool ignored) internal virtual { + bool isGovernor = target == address(this); + if (isGovernor && selector == this.setAccessManagerIgnored.selector) { + revert GovernorLockedIgnore(); + } + _ignoreToggle[target][selector] = ignored != isGovernor; // equivalent to: isGovernor ? !ignored : ignored + emit AccessManagerIgnoredSet(target, selector, ignored); + } + + /** + * @dev Public accessor to check the execution plan, including the number of seconds that the proposal will be + * delayed since queuing, an array indicating which of the proposal actions will be executed indirectly through + * the associated {AccessManager}, and another indicating which will be scheduled in {queue}. Note that + * those that must be scheduled are cancellable by `AccessManager` guardians. + */ + function proposalExecutionPlan( + uint256 proposalId + ) public view returns (uint32 delay, bool[] memory indirect, bool[] memory withDelay) { + ExecutionPlan storage plan = _executionPlan[proposalId]; + + uint32 length = plan.length; + delay = plan.delay; + indirect = new bool[](length); + withDelay = new bool[](length); + for (uint256 i = 0; i < length; ++i) { + (indirect[i], withDelay[i], ) = _getManagerData(plan, i); + } + + return (delay, indirect, withDelay); + } + + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256 proposalId) public view virtual override returns (bool) { + return _executionPlan[proposalId].delay > 0; + } + + /// @inheritdoc IGovernor + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + uint256 proposalId = super.propose(targets, values, calldatas, description); + + uint32 neededDelay = baseDelaySeconds(); + + ExecutionPlan storage plan = _executionPlan[proposalId]; + plan.length = SafeCast.toUint16(targets.length); + + for (uint256 i = 0; i < targets.length; ++i) { + if (calldatas[i].length < 4) { + continue; + } + address target = targets[i]; + bytes4 selector = bytes4(calldatas[i]); + (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( + address(_manager), + address(this), + target, + selector + ); + if ((immediate || delay > 0) && !isAccessManagerIgnored(target, selector)) { + _setManagerData(plan, i, !immediate, 0); + // downcast is safe because both arguments are uint32 + neededDelay = uint32(Math.max(delay, neededDelay)); + } + } + + plan.delay = neededDelay; + + return proposalId; + } + + /** + * @dev Mechanism to queue a proposal, potentially scheduling some of its operations in the AccessManager. + * + * NOTE: The execution delay is chosen based on the delay information retrieved in {propose}. This value may be + * off if the delay was updated since proposal creation. In this case, the proposal needs to be recreated. + */ + function _queueOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory /* values */, + bytes[] memory calldatas, + bytes32 /* descriptionHash */ + ) internal virtual override returns (uint48) { + ExecutionPlan storage plan = _executionPlan[proposalId]; + uint48 etaSeconds = Time.timestamp() + plan.delay; + + for (uint256 i = 0; i < targets.length; ++i) { + (, bool withDelay, ) = _getManagerData(plan, i); + if (withDelay) { + // This function can reenter when calling `_manager.schedule` before performing state updates in `_setManagerData`. + // However, the `manager` is a trusted contract in the current context's security model (e.g. an `AccessManager`). + // slither-disable-next-line reentrancy-no-eth + (, uint32 nonce) = _manager.schedule(targets[i], calldatas[i], etaSeconds); + _setManagerData(plan, i, true, nonce); + } + } + + return etaSeconds; + } + + /** + * @dev Mechanism to execute a proposal, potentially going through {AccessManager-execute} for delayed operations. + */ + function _executeOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /* descriptionHash */ + ) internal virtual override { + uint48 etaSeconds = SafeCast.toUint48(proposalEta(proposalId)); + if (block.timestamp < etaSeconds) { + revert GovernorUnmetDelay(proposalId, etaSeconds); + } + + ExecutionPlan storage plan = _executionPlan[proposalId]; + + for (uint256 i = 0; i < targets.length; ++i) { + (bool controlled, bool withDelay, uint32 nonce) = _getManagerData(plan, i); + if (controlled) { + uint32 executedNonce = _manager.execute{value: values[i]}(targets[i], calldatas[i]); + if (withDelay && executedNonce != nonce) { + revert GovernorMismatchedNonce(proposalId, nonce, executedNonce); + } + } else { + (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); + Address.verifyCallResult(success, returndata); + } + } + } + + /// @inheritdoc Governor + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + uint48 etaSeconds = SafeCast.toUint48(proposalEta(proposalId)); + + ExecutionPlan storage plan = _executionPlan[proposalId]; + + // If the proposal has been scheduled it will have an ETA and we may have to externally cancel + if (etaSeconds != 0) { + for (uint256 i = 0; i < targets.length; ++i) { + (, bool withDelay, uint32 nonce) = _getManagerData(plan, i); + // Only attempt to cancel if the execution plan included a delay + if (withDelay) { + bytes32 operationId = _manager.hashOperation(address(this), targets[i], calldatas[i]); + // Check first if the current operation nonce is the one that we observed previously. It could + // already have been cancelled and rescheduled. We don't want to cancel unless it is exactly the + // instance that we previously scheduled. + if (nonce == _manager.getNonce(operationId)) { + // It is important that all calls have an opportunity to be cancelled. We chose to ignore + // potential failures of some of the cancel operations to give the other operations a chance to + // be properly cancelled. In particular cancel might fail if the operation was already cancelled + // by guardians previously. We don't match on the revert reason to avoid encoding assumptions + // about specific errors. + try _manager.cancel(address(this), targets[i], calldatas[i]) {} catch {} + } + } + } + } + + return proposalId; + } + + /** + * @dev Returns whether the operation at an index is delayed by the manager, and its scheduling nonce once queued. + */ + function _getManagerData( + ExecutionPlan storage plan, + uint256 index + ) private view returns (bool controlled, bool withDelay, uint32 nonce) { + (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); + uint32 value = plan.managerData[bucket][subindex]; + unchecked { + return (value > 0, value > 1, value > 1 ? value - 2 : 0); + } + } + + /** + * @dev Marks an operation at an index as permissioned by the manager, potentially delayed, and + * when delayed sets its scheduling nonce. + */ + function _setManagerData(ExecutionPlan storage plan, uint256 index, bool withDelay, uint32 nonce) private { + (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); + plan.managerData[bucket][subindex] = withDelay ? nonce + 2 : 1; + } + + /** + * @dev Returns bucket and subindex for reading manager data from the packed array mapping. + */ + function _getManagerDataIndices(uint256 index) private pure returns (uint256 bucket, uint256 subindex) { + bucket = index >> 3; // index / 8 + subindex = index & 7; // index % 8 + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockCompound.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockCompound.sol similarity index 56% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockCompound.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockCompound.sol index a706da6a..8f6183e8 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockCompound.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockCompound.sol @@ -1,31 +1,26 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockCompound.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorTimelockCompound.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "./IGovernorTimelock.sol"; -import "../Governor.sol"; -import "../../utils/math/SafeCast.sol"; -import "../../vendor/compound/ICompoundTimelock.sol"; +import {IGovernor, Governor} from "../Governor.sol"; +import {ICompoundTimelock} from "../../vendor/compound/ICompoundTimelock.sol"; +import {Address} from "../../utils/Address.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; /** * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by - * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be + * the external timelock to all successful proposals (in addition to the voting duration). The {Governor} needs to be * the admin of the timelock for any operation to be performed. A public, unrestricted, * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock. * * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be - * inaccessible. - * - * _Available since v4.3._ + * inaccessible from a proposal, unless executed via {Governor-relay}. */ -abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor { +abstract contract GovernorTimelockCompound is Governor { ICompoundTimelock private _timelock; - /// @custom:oz-retyped-from mapping(uint256 => GovernorTimelockCompound.ProposalTimelock) - mapping(uint256 => uint64) private _proposalTimelocks; - /** * @dev Emitted when the timelock controller used for proposal execution is modified. */ @@ -39,95 +34,77 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor { } /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) { - return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev Overridden version of the {Governor-state} function with added support for the `Queued` and `Expired` state. + * @dev Overridden version of the {Governor-state} function with added support for the `Expired` state. */ - function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) { + function state(uint256 proposalId) public view virtual override returns (ProposalState) { ProposalState currentState = super.state(proposalId); - if (currentState != ProposalState.Succeeded) { - return currentState; - } - - uint256 eta = proposalEta(proposalId); - if (eta == 0) { - return currentState; - } else if (block.timestamp >= eta + _timelock.GRACE_PERIOD()) { - return ProposalState.Expired; - } else { - return ProposalState.Queued; - } + return + (currentState == ProposalState.Queued && + block.timestamp >= proposalEta(proposalId) + _timelock.GRACE_PERIOD()) + ? ProposalState.Expired + : currentState; } /** * @dev Public accessor to check the address of the timelock */ - function timelock() public view virtual override returns (address) { + function timelock() public view virtual returns (address) { return address(_timelock); } - /** - * @dev Public accessor to check the eta of a queued proposal - */ - function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { - return _proposalTimelocks[proposalId]; + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { + return true; } /** * @dev Function to queue a proposal to the timelock. */ - function queue( + function _queueOperations( + uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); - - uint256 eta = block.timestamp + _timelock.delay(); - _proposalTimelocks[proposalId] = SafeCast.toUint64(eta); + bytes32 /*descriptionHash*/ + ) internal virtual override returns (uint48) { + uint48 etaSeconds = SafeCast.toUint48(block.timestamp + _timelock.delay()); for (uint256 i = 0; i < targets.length; ++i) { - require( - !_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], eta))), - "GovernorTimelockCompound: identical proposal action already queued" - ); - _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], eta); + if ( + _timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], etaSeconds))) + ) { + revert GovernorAlreadyQueuedProposal(proposalId); + } + _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); } - emit ProposalQueued(proposalId, eta); - - return proposalId; + return etaSeconds; } /** - * @dev Overridden execute function that run the already queued proposal through the timelock. + * @dev Overridden version of the {Governor-_executeOperations} function that run the already queued proposal + * through the timelock. */ - function _execute( + function _executeOperations( uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual override { - uint256 eta = proposalEta(proposalId); - require(eta > 0, "GovernorTimelockCompound: proposal not yet queued"); + uint256 etaSeconds = proposalEta(proposalId); + if (etaSeconds == 0) { + revert GovernorNotQueuedProposal(proposalId); + } Address.sendValue(payable(_timelock), msg.value); for (uint256 i = 0; i < targets.length; ++i) { - _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta); + _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); } } /** - * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it has already * been queued. */ function _cancel( @@ -138,13 +115,11 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor { ) internal virtual override returns (uint256) { uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); - uint256 eta = proposalEta(proposalId); - if (eta > 0) { - // update state first - delete _proposalTimelocks[proposalId]; + uint256 etaSeconds = proposalEta(proposalId); + if (etaSeconds > 0) { // do external call later for (uint256 i = 0; i < targets.length; ++i) { - _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], eta); + _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); } } @@ -161,7 +136,7 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor { /** * @dev Accept admin right over the timelock. */ - // solhint-disable-next-line private-vars-leading-underscore + // solhint-disable-next-line openzeppelin/leading-underscore function __acceptAdmin() public { _timelock.acceptAdmin(); } @@ -179,7 +154,7 @@ abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor { * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. */ - function updateTimelock(ICompoundTimelock newTimelock) external virtual onlyGovernance { + function updateTimelock(ICompoundTimelock newTimelock) public virtual onlyGovernance { _updateTimelock(newTimelock); } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockControl.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockControl.sol similarity index 54% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockControl.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockControl.sol index 7cb60bab..082952ae 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorTimelockControl.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorTimelockControl.sol @@ -1,31 +1,29 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockControl.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorTimelockControl.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "./IGovernorTimelock.sol"; -import "../Governor.sol"; -import "../TimelockController.sol"; +import {IGovernor, Governor} from "../Governor.sol"; +import {TimelockController} from "../TimelockController.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; /** * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a - * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The - * {Governor} needs the proposer (and ideally the executor) roles for the {Governor} to work properly. + * delay, enforced by the {TimelockController} to all successful proposals (in addition to the voting duration). The + * {Governor} needs the proposer (and ideally the executor and canceller) roles for the {Governor} to work properly. * * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be - * inaccessible. + * inaccessible from a proposal, unless executed via {Governor-relay}. * - * WARNING: Setting up the TimelockController to have additional proposers besides the governor is very risky, as it - * grants them powers that they must be trusted or known not to use: 1) {onlyGovernance} functions like {relay} are - * available to them through the timelock, and 2) approved governance proposals can be blocked by them, effectively - * executing a Denial of Service attack. This risk will be mitigated in a future release. - * - * _Available since v4.3._ + * WARNING: Setting up the TimelockController to have additional proposers or cancelers besides the governor is very + * risky, as it grants them the ability to: 1) execute operations as the timelock, and thus possibly performing + * operations or accessing funds that are expected to only be accessible through a vote, and 2) block governance + * proposals that have been approved by the voters, effectively executing a Denial of Service attack. */ -abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { +abstract contract GovernorTimelockControl is Governor { TimelockController private _timelock; - mapping(uint256 => bytes32) private _timelockIds; + mapping(uint256 proposalId => bytes32) private _timelockIds; /** * @dev Emitted when the timelock controller used for proposal execution is modified. @@ -40,31 +38,23 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { } /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) { - return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev Overridden version of the {Governor-state} function with added support for the `Queued` state. + * @dev Overridden version of the {Governor-state} function that considers the status reported by the timelock. */ - function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) { + function state(uint256 proposalId) public view virtual override returns (ProposalState) { ProposalState currentState = super.state(proposalId); - if (currentState != ProposalState.Succeeded) { + if (currentState != ProposalState.Queued) { return currentState; } - // core tracks execution, so we just have to check if successful proposal have been queued. - bytes32 queueid = _timelockIds[proposalId]; - if (queueid == bytes32(0)) { - return currentState; - } else if (_timelock.isOperationDone(queueid)) { - return ProposalState.Executed; - } else if (_timelock.isOperationPending(queueid)) { + bytes32 queueId = _timelockIds[proposalId]; + if (_timelock.isOperationPending(queueId)) { return ProposalState.Queued; + } else if (_timelock.isOperationDone(queueId)) { + // This can happen if the proposal is executed directly on the timelock. + return ProposalState.Executed; } else { + // This can happen if the proposal is canceled directly on the timelock. return ProposalState.Canceled; } } @@ -72,55 +62,53 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { /** * @dev Public accessor to check the address of the timelock */ - function timelock() public view virtual override returns (address) { + function timelock() public view virtual returns (address) { return address(_timelock); } - /** - * @dev Public accessor to check the eta of a queued proposal - */ - function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { - uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]); - return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { + return true; } /** * @dev Function to queue a proposal to the timelock. */ - function queue( + function _queueOperations( + uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash - ) public virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); - + ) internal virtual override returns (uint48) { uint256 delay = _timelock.getMinDelay(); - _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash); - _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay); - emit ProposalQueued(proposalId, block.timestamp + delay); + bytes32 salt = _timelockSalt(descriptionHash); + _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, salt); + _timelock.scheduleBatch(targets, values, calldatas, 0, salt, delay); - return proposalId; + return SafeCast.toUint48(block.timestamp + delay); } /** - * @dev Overridden execute function that run the already queued proposal through the timelock. + * @dev Overridden version of the {Governor-_executeOperations} function that runs the already queued proposal + * through the timelock. */ - function _execute( - uint256 /* proposalId */, + function _executeOperations( + uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual override { - _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash); + // execute + _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, _timelockSalt(descriptionHash)); + // cleanup for refund + delete _timelockIds[proposalId]; } /** - * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it has already * been queued. */ // This function can reenter through the external call to the timelock, but we assume the timelock is trusted and @@ -134,8 +122,11 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { ) internal virtual override returns (uint256) { uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); - if (_timelockIds[proposalId] != 0) { - _timelock.cancel(_timelockIds[proposalId]); + bytes32 timelockId = _timelockIds[proposalId]; + if (timelockId != 0) { + // cancel + _timelock.cancel(timelockId); + // cleanup delete _timelockIds[proposalId]; } @@ -155,7 +146,7 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { * * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. */ - function updateTimelock(TimelockController newTimelock) external virtual onlyGovernance { + function updateTimelock(TimelockController newTimelock) public virtual onlyGovernance { _updateTimelock(newTimelock); } @@ -163,4 +154,14 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { emit TimelockChange(address(_timelock), address(newTimelock)); _timelock = newTimelock; } + + /** + * @dev Computes the {TimelockController} operation salt. + * + * It is computed with the governor address itself to avoid collisions across governor instances using the + * same timelock. + */ + function _timelockSalt(bytes32 descriptionHash) private view returns (bytes32) { + return bytes20(address(this)) ^ descriptionHash; + } } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotes.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotes.sol similarity index 52% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotes.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotes.sol index c2e65cba..4ad5870a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotes.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotes.sol @@ -1,41 +1,49 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotes.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorVotes.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../Governor.sol"; -import "../../interfaces/IERC5805.sol"; +import {Governor} from "../Governor.sol"; +import {IVotes} from "../utils/IVotes.sol"; +import {IERC5805} from "../../interfaces/IERC5805.sol"; +import {Time} from "../../utils/types/Time.sol"; /** - * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. - * - * _Available since v4.3._ + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} + * token. */ abstract contract GovernorVotes is Governor { - IERC5805 public immutable token; + IERC5805 private immutable _token; constructor(IVotes tokenAddress) { - token = IERC5805(address(tokenAddress)); + _token = IERC5805(address(tokenAddress)); } /** - * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token - * does not implement EIP-6372. + * @dev The token that voting power is sourced from. + */ + function token() public view virtual returns (IERC5805) { + return _token; + } + + /** + * @dev Clock (as specified in ERC-6372) is set to match the token's clock. Fallback to block numbers if the token + * does not implement ERC-6372. */ function clock() public view virtual override returns (uint48) { - try token.clock() returns (uint48 timepoint) { + try token().clock() returns (uint48 timepoint) { return timepoint; } catch { - return SafeCast.toUint48(block.number); + return Time.blockNumber(); } } /** - * @dev Machine-readable description of the clock as specified in EIP-6372. + * @dev Machine-readable description of the clock as specified in ERC-6372. */ // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public view virtual override returns (string memory) { - try token.CLOCK_MODE() returns (string memory clockmode) { + try token().CLOCK_MODE() returns (string memory clockmode) { return clockmode; } catch { return "mode=blocknumber&from=default"; @@ -50,6 +58,6 @@ abstract contract GovernorVotes is Governor { uint256 timepoint, bytes memory /*params*/ ) internal view virtual override returns (uint256) { - return token.getPastVotes(account, timepoint); + return token().getPastVotes(account, timepoint); } } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesQuorumFraction.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotesQuorumFraction.sol similarity index 54% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesQuorumFraction.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotesQuorumFraction.sol index 097a7967..de67172e 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/extensions/GovernorVotesQuorumFraction.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotesQuorumFraction.sol @@ -1,28 +1,29 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesQuorumFraction.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesQuorumFraction.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "./GovernorVotes.sol"; -import "../../utils/Checkpoints.sol"; -import "../../utils/math/SafeCast.sol"; +import {GovernorVotes} from "./GovernorVotes.sol"; +import {Math} from "../../utils/math/Math.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; /** * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a * fraction of the total supply. - * - * _Available since v4.3._ */ abstract contract GovernorVotesQuorumFraction is GovernorVotes { - using Checkpoints for Checkpoints.Trace224; + using Checkpoints for Checkpoints.Trace208; - uint256 private _quorumNumerator; // DEPRECATED in favor of _quorumNumeratorHistory - - /// @custom:oz-retyped-from Checkpoints.History - Checkpoints.Trace224 private _quorumNumeratorHistory; + Checkpoints.Trace208 private _quorumNumeratorHistory; event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator); + /** + * @dev The quorum set is not a valid fraction. + */ + error GovernorInvalidQuorumFraction(uint256 quorumNumerator, uint256 quorumDenominator); + /** * @dev Initialize quorum as a fraction of the token's total supply. * @@ -38,27 +39,14 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { * @dev Returns the current quorum numerator. See {quorumDenominator}. */ function quorumNumerator() public view virtual returns (uint256) { - return _quorumNumeratorHistory._checkpoints.length == 0 ? _quorumNumerator : _quorumNumeratorHistory.latest(); + return _quorumNumeratorHistory.latest(); } /** * @dev Returns the quorum numerator at a specific timepoint. See {quorumDenominator}. */ function quorumNumerator(uint256 timepoint) public view virtual returns (uint256) { - // If history is empty, fallback to old storage - uint256 length = _quorumNumeratorHistory._checkpoints.length; - if (length == 0) { - return _quorumNumerator; - } - - // Optimistic search, check the latest checkpoint - Checkpoints.Checkpoint224 memory latest = _quorumNumeratorHistory._checkpoints[length - 1]; - if (latest._key <= timepoint) { - return latest._value; - } - - // Otherwise, do the binary search - return _quorumNumeratorHistory.upperLookupRecent(SafeCast.toUint32(timepoint)); + return _optimisticUpperLookupRecent(_quorumNumeratorHistory, timepoint); } /** @@ -72,7 +60,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { * @dev Returns the quorum for a timepoint, in terms of number of votes: `supply * numerator / denominator`. */ function quorum(uint256 timepoint) public view virtual override returns (uint256) { - return (token.getPastTotalSupply(timepoint) * quorumNumerator(timepoint)) / quorumDenominator(); + return Math.mulDiv(token().getPastTotalSupply(timepoint), quorumNumerator(timepoint), quorumDenominator()); } /** @@ -85,7 +73,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { * - Must be called through a governance proposal. * - New numerator must be smaller or equal to the denominator. */ - function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance { + function updateQuorumNumerator(uint256 newQuorumNumerator) public virtual onlyGovernance { _updateQuorumNumerator(newQuorumNumerator); } @@ -99,23 +87,27 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes { * - New numerator must be smaller or equal to the denominator. */ function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual { - require( - newQuorumNumerator <= quorumDenominator(), - "GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator" - ); - - uint256 oldQuorumNumerator = quorumNumerator(); - - // Make sure we keep track of the original numerator in contracts upgraded from a version without checkpoints. - if (oldQuorumNumerator != 0 && _quorumNumeratorHistory._checkpoints.length == 0) { - _quorumNumeratorHistory._checkpoints.push( - Checkpoints.Checkpoint224({_key: 0, _value: SafeCast.toUint224(oldQuorumNumerator)}) - ); + uint256 denominator = quorumDenominator(); + if (newQuorumNumerator > denominator) { + revert GovernorInvalidQuorumFraction(newQuorumNumerator, denominator); } - // Set new quorum for future proposals - _quorumNumeratorHistory.push(SafeCast.toUint32(clock()), SafeCast.toUint224(newQuorumNumerator)); + uint256 oldQuorumNumerator = quorumNumerator(); + _quorumNumeratorHistory.push(clock(), SafeCast.toUint208(newQuorumNumerator)); emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator); } + + /** + * @dev Returns the numerator at a specific timepoint. + */ + function _optimisticUpperLookupRecent( + Checkpoints.Trace208 storage ckpts, + uint256 timepoint + ) internal view returns (uint256) { + // If trace is empty, key and value are both equal to 0. + // In that case `key <= timepoint` is true, and it is ok to return 0. + (, uint48 key, uint208 value) = ckpts.latestCheckpoint(); + return key <= timepoint ? value : ckpts.upperLookupRecent(SafeCast.toUint48(timepoint)); + } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotesSuperQuorumFraction.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotesSuperQuorumFraction.sol new file mode 100644 index 00000000..53a7049a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/extensions/GovernorVotesSuperQuorumFraction.sol @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesSuperQuorumFraction.sol) + +pragma solidity ^0.8.24; + +import {Governor} from "../Governor.sol"; +import {GovernorSuperQuorum} from "./GovernorSuperQuorum.sol"; +import {GovernorVotesQuorumFraction} from "./GovernorVotesQuorumFraction.sol"; +import {Math} from "../../utils/math/Math.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; + +/** + * @dev Extension of {GovernorVotesQuorumFraction} with a super quorum expressed as a + * fraction of the total supply. Proposals that meet the super quorum (and have a majority of for votes) advance to + * the `Succeeded` state before the proposal deadline. + */ +abstract contract GovernorVotesSuperQuorumFraction is GovernorVotesQuorumFraction, GovernorSuperQuorum { + using Checkpoints for Checkpoints.Trace208; + + Checkpoints.Trace208 private _superQuorumNumeratorHistory; + + event SuperQuorumNumeratorUpdated(uint256 oldSuperQuorumNumerator, uint256 newSuperQuorumNumerator); + + /** + * @dev The super quorum set is not valid as it exceeds the quorum denominator. + */ + error GovernorInvalidSuperQuorumFraction(uint256 superQuorumNumerator, uint256 denominator); + + /** + * @dev The super quorum set is not valid as it is smaller or equal to the quorum. + */ + error GovernorInvalidSuperQuorumTooSmall(uint256 superQuorumNumerator, uint256 quorumNumerator); + + /** + * @dev The quorum set is not valid as it exceeds the super quorum. + */ + error GovernorInvalidQuorumTooLarge(uint256 quorumNumerator, uint256 superQuorumNumerator); + + /** + * @dev Initialize super quorum as a fraction of the token's total supply. + * + * The super quorum is specified as a fraction of the token's total supply and has to + * be greater than the quorum. + */ + constructor(uint256 superQuorumNumeratorValue) { + _updateSuperQuorumNumerator(superQuorumNumeratorValue); + } + + /** + * @dev Returns the current super quorum numerator. + */ + function superQuorumNumerator() public view virtual returns (uint256) { + return _superQuorumNumeratorHistory.latest(); + } + + /** + * @dev Returns the super quorum numerator at a specific `timepoint`. + */ + function superQuorumNumerator(uint256 timepoint) public view virtual returns (uint256) { + return _optimisticUpperLookupRecent(_superQuorumNumeratorHistory, timepoint); + } + + /** + * @dev Returns the super quorum for a `timepoint`, in terms of number of votes: `supply * numerator / denominator`. + * See {GovernorSuperQuorum-superQuorum} for more details. + */ + function superQuorum(uint256 timepoint) public view virtual override returns (uint256) { + return Math.mulDiv(token().getPastTotalSupply(timepoint), superQuorumNumerator(timepoint), quorumDenominator()); + } + + /** + * @dev Changes the super quorum numerator. + * + * Emits a {SuperQuorumNumeratorUpdated} event. + * + * Requirements: + * + * - Must be called through a governance proposal. + * - New super quorum numerator must be smaller or equal to the denominator. + * - New super quorum numerator must be greater than or equal to the quorum numerator. + */ + function updateSuperQuorumNumerator(uint256 newSuperQuorumNumerator) public virtual onlyGovernance { + _updateSuperQuorumNumerator(newSuperQuorumNumerator); + } + + /** + * @dev Changes the super quorum numerator. + * + * Emits a {SuperQuorumNumeratorUpdated} event. + * + * Requirements: + * + * - New super quorum numerator must be smaller or equal to the denominator. + * - New super quorum numerator must be greater than or equal to the quorum numerator. + */ + function _updateSuperQuorumNumerator(uint256 newSuperQuorumNumerator) internal virtual { + uint256 denominator = quorumDenominator(); + if (newSuperQuorumNumerator > denominator) { + revert GovernorInvalidSuperQuorumFraction(newSuperQuorumNumerator, denominator); + } + + uint256 quorumNumerator = quorumNumerator(); + if (newSuperQuorumNumerator < quorumNumerator) { + revert GovernorInvalidSuperQuorumTooSmall(newSuperQuorumNumerator, quorumNumerator); + } + + uint256 oldSuperQuorumNumerator = _superQuorumNumeratorHistory.latest(); + _superQuorumNumeratorHistory.push(clock(), SafeCast.toUint208(newSuperQuorumNumerator)); + + emit SuperQuorumNumeratorUpdated(oldSuperQuorumNumerator, newSuperQuorumNumerator); + } + + /** + * @dev Overrides {GovernorVotesQuorumFraction-_updateQuorumNumerator} to ensure the super + * quorum numerator is greater than or equal to the quorum numerator. + */ + function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual override { + // Ignoring check when the superQuorum was never set (construction sets quorum before superQuorum) + if (_superQuorumNumeratorHistory.length() > 0) { + uint256 superQuorumNumerator_ = superQuorumNumerator(); + if (newQuorumNumerator > superQuorumNumerator_) { + revert GovernorInvalidQuorumTooLarge(newQuorumNumerator, superQuorumNumerator_); + } + } + super._updateQuorumNumerator(newQuorumNumerator); + } + + /// @inheritdoc GovernorSuperQuorum + function state( + uint256 proposalId + ) public view virtual override(Governor, GovernorSuperQuorum) returns (ProposalState) { + return super.state(proposalId); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/IVotes.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/utils/IVotes.sol similarity index 87% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/utils/IVotes.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/utils/IVotes.sol index 647f7965..87db0e82 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/IVotes.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/utils/IVotes.sol @@ -1,22 +1,26 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol) -pragma solidity ^0.8.0; +// OpenZeppelin Contracts (last updated v5.5.0) (governance/utils/IVotes.sol) + +pragma solidity >=0.8.4; /** * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. - * - * _Available since v4.5._ */ interface IVotes { + /** + * @dev The signature used has expired. + */ + error VotesExpiredSignature(uint256 expiry); + /** * @dev Emitted when an account changes their delegate. */ event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /** - * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. + * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of voting units. */ - event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); + event DelegateVotesChanged(address indexed delegate, uint256 previousVotes, uint256 newVotes); /** * @dev Returns the current amount of votes that `account` has. diff --git a/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/Votes.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/utils/Votes.sol similarity index 61% rename from dependencies/@openzeppelin-contracts-4.9.6/governance/utils/Votes.sol rename to dependencies/@openzeppelin-contracts-5.6.1/governance/utils/Votes.sol index f0a53ba3..da29a289 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/governance/utils/Votes.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/utils/Votes.sol @@ -1,12 +1,16 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/Votes.sol) -pragma solidity ^0.8.0; +// OpenZeppelin Contracts (last updated v5.6.0) (governance/utils/Votes.sol) -import "../../interfaces/IERC5805.sol"; -import "../../utils/Context.sol"; -import "../../utils/Counters.sol"; -import "../../utils/Checkpoints.sol"; -import "../../utils/cryptography/EIP712.sol"; +pragma solidity ^0.8.24; + +import {IERC5805} from "../../interfaces/IERC5805.sol"; +import {Context} from "../../utils/Context.sol"; +import {Nonces} from "../../utils/Nonces.sol"; +import {EIP712} from "../../utils/cryptography/EIP712.sol"; +import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; +import {ECDSA} from "../../utils/cryptography/ECDSA.sol"; +import {Time} from "../../utils/types/Time.sol"; /** * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be @@ -24,49 +28,63 @@ import "../../utils/cryptography/EIP712.sol"; * * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the - * previous example, it would be included in {ERC721-_beforeTokenTransfer}). - * - * _Available since v4.5._ + * previous example, it would be included in {ERC721-_update}). */ -abstract contract Votes is Context, EIP712, IERC5805 { - using Checkpoints for Checkpoints.Trace224; - using Counters for Counters.Counter; +abstract contract Votes is Context, EIP712, Nonces, IERC5805 { + using Checkpoints for Checkpoints.Trace208; - bytes32 private constant _DELEGATION_TYPEHASH = + bytes32 private constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); - mapping(address => address) private _delegation; + mapping(address account => address) private _delegatee; - /// @custom:oz-retyped-from mapping(address => Checkpoints.History) - mapping(address => Checkpoints.Trace224) private _delegateCheckpoints; + mapping(address delegatee => Checkpoints.Trace208) private _delegateCheckpoints; - /// @custom:oz-retyped-from Checkpoints.History - Checkpoints.Trace224 private _totalCheckpoints; + Checkpoints.Trace208 private _totalCheckpoints; - mapping(address => Counters.Counter) private _nonces; + /** + * @dev The clock was incorrectly modified. + */ + error ERC6372InconsistentClock(); + + /** + * @dev Lookup to future votes is not available. + */ + error ERC5805FutureLookup(uint256 timepoint, uint48 clock); /** * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based * checkpoints (and voting), in which case {CLOCK_MODE} should be overridden as well to match. */ - function clock() public view virtual override returns (uint48) { - return SafeCast.toUint48(block.number); + function clock() public view virtual returns (uint48) { + return Time.blockNumber(); } /** - * @dev Machine-readable description of the clock as specified in EIP-6372. + * @dev Machine-readable description of the clock as specified in ERC-6372. */ // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory) { + function CLOCK_MODE() public view virtual returns (string memory) { // Check that the clock was not modified - require(clock() == block.number, "Votes: broken clock mode"); + if (clock() != Time.blockNumber()) { + revert ERC6372InconsistentClock(); + } return "mode=blocknumber&from=default"; } + /** + * @dev Validate that a timepoint is in the past, and return it as a uint48. + */ + function _validateTimepoint(uint256 timepoint) internal view returns (uint48) { + uint48 currentTimepoint = clock(); + if (timepoint >= currentTimepoint) revert ERC5805FutureLookup(timepoint, currentTimepoint); + return SafeCast.toUint48(timepoint); + } + /** * @dev Returns the current amount of votes that `account` has. */ - function getVotes(address account) public view virtual override returns (uint256) { + function getVotes(address account) public view virtual returns (uint256) { return _delegateCheckpoints[account].latest(); } @@ -78,9 +96,8 @@ abstract contract Votes is Context, EIP712, IERC5805 { * * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. */ - function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "Votes: future lookup"); - return _delegateCheckpoints[account].upperLookupRecent(SafeCast.toUint32(timepoint)); + function getPastVotes(address account, uint256 timepoint) public view virtual returns (uint256) { + return _delegateCheckpoints[account].upperLookupRecent(_validateTimepoint(timepoint)); } /** @@ -95,9 +112,8 @@ abstract contract Votes is Context, EIP712, IERC5805 { * * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. */ - function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "Votes: future lookup"); - return _totalCheckpoints.upperLookupRecent(SafeCast.toUint32(timepoint)); + function getPastTotalSupply(uint256 timepoint) public view virtual returns (uint256) { + return _totalCheckpoints.upperLookupRecent(_validateTimepoint(timepoint)); } /** @@ -110,14 +126,14 @@ abstract contract Votes is Context, EIP712, IERC5805 { /** * @dev Returns the delegate that `account` has chosen. */ - function delegates(address account) public view virtual override returns (address) { - return _delegation[account]; + function delegates(address account) public view virtual returns (address) { + return _delegatee[account]; } /** * @dev Delegates votes from the sender to `delegatee`. */ - function delegate(address delegatee) public virtual override { + function delegate(address delegatee) public virtual { address account = _msgSender(); _delegate(account, delegatee); } @@ -132,15 +148,17 @@ abstract contract Votes is Context, EIP712, IERC5805 { uint8 v, bytes32 r, bytes32 s - ) public virtual override { - require(block.timestamp <= expiry, "Votes: signature expired"); + ) public virtual { + if (block.timestamp > expiry) { + revert VotesExpiredSignature(expiry); + } address signer = ECDSA.recover( - _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), + _hashTypedDataV4(keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry))), v, r, s ); - require(nonce == _useNonce(signer), "Votes: invalid nonce"); + _useCheckedNonce(signer, nonce); _delegate(signer, delegatee); } @@ -151,7 +169,7 @@ abstract contract Votes is Context, EIP712, IERC5805 { */ function _delegate(address account, address delegatee) internal virtual { address oldDelegate = delegates(account); - _delegation[account] = delegatee; + _delegatee[account] = delegatee; emit DelegateChanged(account, oldDelegate, delegatee); _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account)); @@ -163,10 +181,10 @@ abstract contract Votes is Context, EIP712, IERC5805 { */ function _transferVotingUnits(address from, address to, uint256 amount) internal virtual { if (from == address(0)) { - _push(_totalCheckpoints, _add, SafeCast.toUint224(amount)); + _push(_totalCheckpoints, _add, SafeCast.toUint208(amount)); } if (to == address(0)) { - _push(_totalCheckpoints, _subtract, SafeCast.toUint224(amount)); + _push(_totalCheckpoints, _subtract, SafeCast.toUint208(amount)); } _moveDelegateVotes(delegates(from), delegates(to), amount); } @@ -174,13 +192,13 @@ abstract contract Votes is Context, EIP712, IERC5805 { /** * @dev Moves delegated votes from one delegate to another. */ - function _moveDelegateVotes(address from, address to, uint256 amount) private { + function _moveDelegateVotes(address from, address to, uint256 amount) internal virtual { if (from != to && amount > 0) { if (from != address(0)) { (uint256 oldValue, uint256 newValue) = _push( _delegateCheckpoints[from], _subtract, - SafeCast.toUint224(amount) + SafeCast.toUint208(amount) ); emit DelegateVotesChanged(from, oldValue, newValue); } @@ -188,53 +206,44 @@ abstract contract Votes is Context, EIP712, IERC5805 { (uint256 oldValue, uint256 newValue) = _push( _delegateCheckpoints[to], _add, - SafeCast.toUint224(amount) + SafeCast.toUint208(amount) ); emit DelegateVotesChanged(to, oldValue, newValue); } } } - function _push( - Checkpoints.Trace224 storage store, - function(uint224, uint224) view returns (uint224) op, - uint224 delta - ) private returns (uint224, uint224) { - return store.push(SafeCast.toUint32(clock()), op(store.latest(), delta)); - } - - function _add(uint224 a, uint224 b) private pure returns (uint224) { - return a + b; - } - - function _subtract(uint224 a, uint224 b) private pure returns (uint224) { - return a - b; - } - /** - * @dev Consumes a nonce. - * - * Returns the current value and increments nonce. + * @dev Get number of checkpoints for `account`. */ - function _useNonce(address owner) internal virtual returns (uint256 current) { - Counters.Counter storage nonce = _nonces[owner]; - current = nonce.current(); - nonce.increment(); + function _numCheckpoints(address account) internal view virtual returns (uint32) { + return SafeCast.toUint32(_delegateCheckpoints[account].length()); } /** - * @dev Returns an address nonce. + * @dev Get the `pos`-th checkpoint for `account`. */ - function nonces(address owner) public view virtual returns (uint256) { - return _nonces[owner].current(); + function _checkpoints( + address account, + uint32 pos + ) internal view virtual returns (Checkpoints.Checkpoint208 memory) { + return _delegateCheckpoints[account].at(pos); } - /** - * @dev Returns the contract's {EIP712} domain separator. - */ - // solhint-disable-next-line func-name-mixedcase - function DOMAIN_SEPARATOR() external view returns (bytes32) { - return _domainSeparatorV4(); + function _push( + Checkpoints.Trace208 storage store, + function(uint208, uint208) view returns (uint208) op, + uint208 delta + ) private returns (uint208 oldValue, uint208 newValue) { + return store.push(clock(), op(store.latest(), delta)); + } + + function _add(uint208 a, uint208 b) private pure returns (uint208) { + return a + b; + } + + function _subtract(uint208 a, uint208 b) private pure returns (uint208) { + return a - b; } /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/governance/utils/VotesExtended.sol b/dependencies/@openzeppelin-contracts-5.6.1/governance/utils/VotesExtended.sol new file mode 100644 index 00000000..4e976ac9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/governance/utils/VotesExtended.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (governance/utils/VotesExtended.sol) + +pragma solidity ^0.8.24; + +import {Checkpoints} from "../../utils/structs/Checkpoints.sol"; +import {Votes} from "./Votes.sol"; +import {SafeCast} from "../../utils/math/SafeCast.sol"; + +/** + * @dev Extension of {Votes} that adds checkpoints for delegations and balances. + * + * WARNING: While this contract extends {Votes}, valid uses of {Votes} may not be compatible with + * {VotesExtended} without additional considerations. This implementation of {_transferVotingUnits} must + * run AFTER the voting weight movement is registered, such that it is reflected on {_getVotingUnits}. + * + * Said differently, {VotesExtended} MUST be integrated in a way that calls {_transferVotingUnits} AFTER the + * asset transfer is registered and balances are updated: + * + * ```solidity + * contract VotingToken is Token, VotesExtended { + * function transfer(address from, address to, uint256 tokenId) public override { + * super.transfer(from, to, tokenId); // <- Perform the transfer first ... + * _transferVotingUnits(from, to, 1); // <- ... then call _transferVotingUnits. + * } + * + * function _getVotingUnits(address account) internal view override returns (uint256) { + * return balanceOf(account); + * } + * } + * ``` + * + * {ERC20Votes} and {ERC721Votes} follow this pattern and are thus safe to use with {VotesExtended}. + */ +abstract contract VotesExtended is Votes { + using Checkpoints for Checkpoints.Trace160; + using Checkpoints for Checkpoints.Trace208; + + mapping(address delegator => Checkpoints.Trace160) private _userDelegationCheckpoints; + mapping(address account => Checkpoints.Trace208) private _userVotingUnitsCheckpoints; + + /** + * @dev Returns the delegate of an `account` at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastDelegate(address account, uint256 timepoint) public view virtual returns (address) { + return address(_userDelegationCheckpoints[account].upperLookupRecent(_validateTimepoint(timepoint))); + } + + /** + * @dev Returns the `balanceOf` of an `account` at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastBalanceOf(address account, uint256 timepoint) public view virtual returns (uint256) { + return _userVotingUnitsCheckpoints[account].upperLookupRecent(_validateTimepoint(timepoint)); + } + + /// @inheritdoc Votes + function _delegate(address account, address delegatee) internal virtual override { + super._delegate(account, delegatee); + + _userDelegationCheckpoints[account].push(clock(), uint160(delegatee)); + } + + /// @inheritdoc Votes + function _transferVotingUnits(address from, address to, uint256 amount) internal virtual override { + super._transferVotingUnits(from, to, amount); + if (from != to) { + if (from != address(0)) { + _userVotingUnitsCheckpoints[from].push(clock(), SafeCast.toUint208(_getVotingUnits(from))); + } + if (to != address(0)) { + _userVotingUnitsCheckpoints[to].push(clock(), SafeCast.toUint208(_getVotingUnits(to))); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155.sol new file mode 100644 index 00000000..6c10b872 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1155.sol) + +pragma solidity >=0.6.2; + +import {IERC1155} from "../token/ERC1155/IERC1155.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155MetadataURI.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155MetadataURI.sol new file mode 100644 index 00000000..95f815f4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155MetadataURI.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1155MetadataURI.sol) + +pragma solidity >=0.6.2; + +import {IERC1155MetadataURI} from "../token/ERC1155/extensions/IERC1155MetadataURI.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155Receiver.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155Receiver.sol new file mode 100644 index 00000000..b56bdfef --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1155Receiver.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1155Receiver.sol) + +pragma solidity >=0.6.2; + +import {IERC1155Receiver} from "../token/ERC1155/IERC1155Receiver.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1271.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1271.sol new file mode 100644 index 00000000..4382286a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1271.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1271.sol) + +pragma solidity >=0.5.0; + +/** + * @dev Interface of the ERC-1271 standard signature validation method for + * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. + */ +interface IERC1271 { + /** + * @dev Should return whether the signature provided is valid for the provided data + * @param hash Hash of the data to be signed + * @param signature Signature byte array associated with `hash` + */ + function isValidSignature(bytes32 hash, bytes calldata signature) external view returns (bytes4 magicValue); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363.sol new file mode 100644 index 00000000..7bf3e1f7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol) + +pragma solidity >=0.6.2; + +import {IERC20} from "./IERC20.sol"; +import {IERC165} from "./IERC165.sol"; + +/** + * @title IERC1363 + * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. + * + * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract + * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. + */ +interface IERC1363 is IERC20, IERC165 { + /* + * Note: the ERC-165 identifier for this interface is 0xb0202a11. + * 0xb0202a11 === + * bytes4(keccak256('transferAndCall(address,uint256)')) ^ + * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ + * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ + * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ + * bytes4(keccak256('approveAndCall(address,uint256)')) ^ + * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) + */ + + /** + * @dev Moves a `value` amount of tokens from the caller's account to `to` + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. + * @param to The address which you want to transfer to. + * @param value The amount of tokens to be transferred. + * @return A boolean value indicating whether the operation succeeded unless throwing. + */ + function transferAndCall(address to, uint256 value) external returns (bool); + + /** + * @dev Moves a `value` amount of tokens from the caller's account to `to` + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. + * @param to The address which you want to transfer to. + * @param value The amount of tokens to be transferred. + * @param data Additional data with no specified format, sent in call to `to`. + * @return A boolean value indicating whether the operation succeeded unless throwing. + */ + function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); + + /** + * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. + * @param from The address which you want to send tokens from. + * @param to The address which you want to transfer to. + * @param value The amount of tokens to be transferred. + * @return A boolean value indicating whether the operation succeeded unless throwing. + */ + function transferFromAndCall(address from, address to, uint256 value) external returns (bool); + + /** + * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. + * @param from The address which you want to send tokens from. + * @param to The address which you want to transfer to. + * @param value The amount of tokens to be transferred. + * @param data Additional data with no specified format, sent in call to `to`. + * @return A boolean value indicating whether the operation succeeded unless throwing. + */ + function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); + + /** + * @dev Sets a `value` amount of tokens as the allowance of `spender` over the + * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. + * @param spender The address which will spend the funds. + * @param value The amount of tokens to be spent. + * @return A boolean value indicating whether the operation succeeded unless throwing. + */ + function approveAndCall(address spender, uint256 value) external returns (bool); + + /** + * @dev Sets a `value` amount of tokens as the allowance of `spender` over the + * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. + * @param spender The address which will spend the funds. + * @param value The amount of tokens to be spent. + * @param data Additional data with no specified format, sent in call to `spender`. + * @return A boolean value indicating whether the operation succeeded unless throwing. + */ + function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Receiver.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Receiver.sol new file mode 100644 index 00000000..43efc9bf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Receiver.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363Receiver.sol) + +pragma solidity >=0.5.0; + +/** + * @title IERC1363Receiver + * @dev Interface for any contract that wants to support `transferAndCall` or `transferFromAndCall` + * from ERC-1363 token contracts. + */ +interface IERC1363Receiver { + /** + * @dev Whenever ERC-1363 tokens are transferred to this contract via `transferAndCall` or `transferFromAndCall` + * by `operator` from `from`, this function is called. + * + * NOTE: To accept the transfer, this must return + * `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` + * (i.e. 0x88a7ca5c, or its own function selector). + * + * @param operator The address which called `transferAndCall` or `transferFromAndCall` function. + * @param from The address which the tokens are transferred from. + * @param value The amount of tokens transferred. + * @param data Additional data with no specified format. + * @return `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` if transfer is allowed unless throwing. + */ + function onTransferReceived( + address operator, + address from, + uint256 value, + bytes calldata data + ) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Spender.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Spender.sol new file mode 100644 index 00000000..46efa881 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1363Spender.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363Spender.sol) + +pragma solidity >=0.5.0; + +/** + * @title IERC1363Spender + * @dev Interface for any contract that wants to support `approveAndCall` + * from ERC-1363 token contracts. + */ +interface IERC1363Spender { + /** + * @dev Whenever an ERC-1363 token `owner` approves this contract via `approveAndCall` + * to spend their tokens, this function is called. + * + * NOTE: To accept the approval, this must return + * `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))` + * (i.e. 0x7b04a2d0, or its own function selector). + * + * @param owner The address which called `approveAndCall` function and previously owned the tokens. + * @param value The amount of tokens to be spent. + * @param data Additional data with no specified format. + * @return `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))` if approval is allowed unless throwing. + */ + function onApprovalReceived(address owner, uint256 value, bytes calldata data) external returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC165.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC165.sol new file mode 100644 index 00000000..d2c99a5b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC165.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol) + +pragma solidity >=0.4.16; + +import {IERC165} from "../utils/introspection/IERC165.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Implementer.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1820Implementer.sol similarity index 72% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Implementer.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1820Implementer.sol index c4d0b302..8c047198 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Implementer.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1820Implementer.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1820Implementer.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; /** - * @dev Interface for an ERC1820 implementer, as defined in the - * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP]. + * @dev Interface for an ERC-1820 implementer, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[ERC]. * Used by contracts that will be registered as implementers in the * {IERC1820Registry}. */ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Registry.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1820Registry.sol similarity index 85% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Registry.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1820Registry.sol index 922df040..03efa038 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC1820Registry.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1820Registry.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/IERC1820Registry.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1820Registry.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.5.0; /** - * @dev Interface of the global ERC1820 Registry, as defined in the - * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register + * @dev Interface of the global ERC-1820 Registry, as defined in the + * https://eips.ethereum.org/EIPS/eip-1820[ERC]. Accounts may register * implementers for interfaces in this registry, as well as query support. * * Implementers may be shared by multiple accounts, and can also implement more @@ -15,7 +15,7 @@ pragma solidity ^0.8.0; * * {IERC165} interfaces can also be queried via the registry. * - * For an in-depth explanation and source code analysis, see the EIP text. + * For an in-depth explanation and source code analysis, see the ERC text. */ interface IERC1820Registry { event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); @@ -80,32 +80,32 @@ interface IERC1820Registry { /** * @dev Returns the interface hash for an `interfaceName`, as defined in the * corresponding - * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. + * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the ERC]. */ function interfaceHash(string calldata interfaceName) external pure returns (bytes32); /** - * @notice Updates the cache with whether the contract implements an ERC165 interface or not. + * @notice Updates the cache with whether the contract implements an ERC-165 interface or not. * @param account Address of the contract for which to update the cache. - * @param interfaceId ERC165 interface for which to update the cache. + * @param interfaceId ERC-165 interface for which to update the cache. */ function updateERC165Cache(address account, bytes4 interfaceId) external; /** - * @notice Checks whether a contract implements an ERC165 interface or not. + * @notice Checks whether a contract implements an ERC-165 interface or not. * If the result is not cached a direct lookup on the contract address is performed. * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling * {updateERC165Cache} with the contract address. * @param account Address of the contract to check. - * @param interfaceId ERC165 interface to check. + * @param interfaceId ERC-165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); /** - * @notice Checks whether a contract implements an ERC165 interface or not without using or updating the cache. + * @notice Checks whether a contract implements an ERC-165 interface or not without using or updating the cache. * @param account Address of the contract to check. - * @param interfaceId ERC165 interface to check. + * @param interfaceId ERC-165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1967.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1967.sol similarity index 82% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1967.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1967.sol index 6fb112a2..95d222ec 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC1967.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC1967.sol @@ -1,12 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.11; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. - * - * _Available since v4.8.3._ */ interface IERC1967 { /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20.sol new file mode 100644 index 00000000..078e9ec9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol) + +pragma solidity >=0.4.16; + +import {IERC20} from "../token/ERC20/IERC20.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20Metadata.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20Metadata.sol new file mode 100644 index 00000000..adffeb5f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC20Metadata.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20Metadata.sol) + +pragma solidity >=0.6.2; + +import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2309.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2309.sol similarity index 78% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2309.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2309.sol index b3fec44e..bc0fb646 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2309.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2309.sol @@ -1,12 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (interfaces/IERC2309.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC2309.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.11; /** * @dev ERC-2309: ERC-721 Consecutive Transfer Extension. - * - * _Available since v4.8._ */ interface IERC2309 { /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2612.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2612.sol new file mode 100644 index 00000000..330c064a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2612.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC2612.sol) + +pragma solidity >=0.6.2; + +import {IERC20Permit} from "../token/ERC20/extensions/IERC20Permit.sol"; + +interface IERC2612 is IERC20Permit {} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2981.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2981.sol similarity index 64% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2981.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2981.sol index 465b872e..858713b8 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC2981.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC2981.sol @@ -1,22 +1,23 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC2981.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../utils/introspection/IERC165.sol"; +import {IERC165} from "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. - * - * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. + * + * NOTE: ERC-2981 allows setting the royalty to 100% of the price. In that case all the price would be sent to the + * royalty receiver and 0 tokens to the seller. Contracts dealing with royalty should consider empty transfers. */ function royaltyInfo( uint256 tokenId, diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156.sol new file mode 100644 index 00000000..95b4b2d8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156.sol) + +pragma solidity >=0.5.0; + +import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol"; +import {IERC3156FlashLender} from "./IERC3156FlashLender.sol"; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashBorrower.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156FlashBorrower.sol similarity index 80% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashBorrower.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156FlashBorrower.sol index 84bd7215..5028df8d 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashBorrower.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156FlashBorrower.sol @@ -1,13 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC3156FlashBorrower.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC3156FlashBorrower.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.5.0; /** - * @dev Interface of the ERC3156 FlashBorrower, as defined in + * @dev Interface of the ERC-3156 FlashBorrower, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. - * - * _Available since v4.1._ */ interface IERC3156FlashBorrower { /** diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashLender.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156FlashLender.sol similarity index 79% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashLender.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156FlashLender.sol index 31012830..83076d4a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC3156FlashLender.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC3156FlashLender.sol @@ -1,19 +1,17 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/IERC3156FlashLender.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.5.0; -import "./IERC3156FlashBorrower.sol"; +import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol"; /** - * @dev Interface of the ERC3156 FlashLender, as defined in + * @dev Interface of the ERC-3156 FlashLender, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. - * - * _Available since v4.1._ */ interface IERC3156FlashLender { /** - * @dev The amount of currency available to be lended. + * @dev The amount of currency available to be lent. * @param token The loan currency. * @return The amount of `token` that can be borrowed. */ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4626.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC4626.sol similarity index 95% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4626.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC4626.sol index 77dd96a0..66e83390 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4626.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC4626.sol @@ -1,16 +1,14 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/IERC4626.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../token/ERC20/IERC20.sol"; -import "../token/ERC20/extensions/IERC20Metadata.sol"; +import {IERC20} from "../token/ERC20/IERC20.sol"; +import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; /** - * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in + * @dev Interface of the ERC-4626 "Tokenized Vault Standard", as defined in * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. - * - * _Available since v4.7._ */ interface IERC4626 is IERC20, IERC20Metadata { event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); @@ -98,7 +96,7 @@ interface IERC4626 is IERC20, IERC20Metadata { function previewDeposit(uint256 assets) external view returns (uint256 shares); /** - * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. + * @dev Deposit `assets` underlying tokens and send the corresponding number of vault shares (`shares`) to `receiver`. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the @@ -136,7 +134,7 @@ interface IERC4626 is IERC20, IERC20Metadata { function previewMint(uint256 shares) external view returns (uint256 assets); /** - * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. + * @dev Mints exactly `shares` vault shares to `receiver` in exchange for `assets` underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint @@ -200,7 +198,7 @@ interface IERC4626 is IERC20, IERC20Metadata { function maxRedeem(address owner) external view returns (uint256 maxShares); /** - * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, + * @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block, * given current on-chain conditions. * * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4906.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC4906.sol similarity index 74% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4906.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC4906.sol index f5a6e00f..09f13b21 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC4906.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC4906.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4906.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC4906.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "./IERC165.sol"; -import "./IERC721.sol"; +import {IERC165} from "./IERC165.sol"; +import {IERC721} from "./IERC721.sol"; -/// @title EIP-721 Metadata Update Extension +/// @title ERC-721 Metadata Update Extension interface IERC4906 is IERC165, IERC721 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5267.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5267.sol similarity index 87% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5267.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5267.sol index 4d3a6b92..96cd325b 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5267.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5267.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5267.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; interface IERC5267 { /** diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5313.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5313.sol similarity index 74% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5313.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5313.sol index e26094c0..9c946929 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC5313.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5313.sol @@ -1,14 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5313.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5313.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; /** * @dev Interface for the Light Contract Ownership Standard. * * A standardized minimal interface required to identify an account that controls a contract - * - * _Available since v4.9._ */ interface IERC5313 { /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5805.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5805.sol new file mode 100644 index 00000000..5d73abba --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC5805.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC5805.sol) + +pragma solidity >=0.8.4; + +import {IVotes} from "../governance/utils/IVotes.sol"; +import {IERC6372} from "./IERC6372.sol"; + +interface IERC5805 is IERC6372, IVotes {} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC6372.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC6372.sol similarity index 82% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC6372.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC6372.sol index 4c5fe039..447a8ea3 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/IERC6372.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC6372.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC6372.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; interface IERC6372 { /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC6909.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC6909.sol new file mode 100644 index 00000000..dd90d625 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC6909.sol @@ -0,0 +1,125 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/IERC6909.sol) + +pragma solidity >=0.6.2; + +import {IERC165} from "../utils/introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC-6909 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-6909[ERC]. + */ +interface IERC6909 is IERC165 { + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set for a token of type `id`. + * The new allowance is `amount`. + */ + event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount); + + /** + * @dev Emitted when `owner` grants or revokes operator status for a `spender`. + */ + event OperatorSet(address indexed owner, address indexed spender, bool approved); + + /** + * @dev Emitted when `amount` tokens of type `id` are moved from `sender` to `receiver` initiated by `caller`. + */ + event Transfer( + address caller, + address indexed sender, + address indexed receiver, + uint256 indexed id, + uint256 amount + ); + + /** + * @dev Returns the amount of tokens of type `id` owned by `owner`. + */ + function balanceOf(address owner, uint256 id) external view returns (uint256); + + /** + * @dev Returns the amount of tokens of type `id` that `spender` is allowed to spend on behalf of `owner`. + * + * NOTE: Does not include operator allowances. + */ + function allowance(address owner, address spender, uint256 id) external view returns (uint256); + + /** + * @dev Returns true if `spender` is set as an operator for `owner`. + */ + function isOperator(address owner, address spender) external view returns (bool); + + /** + * @dev Sets an approval to `spender` for `amount` of tokens of type `id` from the caller's tokens. An `amount` of + * `type(uint256).max` signifies an unlimited approval. + * + * Must return true. + */ + function approve(address spender, uint256 id, uint256 amount) external returns (bool); + + /** + * @dev Grants or revokes unlimited transfer permission of any token id to `spender` for the caller's tokens. + * + * Must return true. + */ + function setOperator(address spender, bool approved) external returns (bool); + + /** + * @dev Transfers `amount` of token type `id` from the caller's account to `receiver`. + * + * Must return true. + */ + function transfer(address receiver, uint256 id, uint256 amount) external returns (bool); + + /** + * @dev Transfers `amount` of token type `id` from `sender` to `receiver`. + * + * Must return true. + */ + function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool); +} + +/** + * @dev Optional extension of {IERC6909} that adds metadata functions. + */ +interface IERC6909Metadata is IERC6909 { + /** + * @dev Returns the name of the token of type `id`. + */ + function name(uint256 id) external view returns (string memory); + + /** + * @dev Returns the ticker symbol of the token of type `id`. + */ + function symbol(uint256 id) external view returns (string memory); + + /** + * @dev Returns the number of decimals for the token of type `id`. + */ + function decimals(uint256 id) external view returns (uint8); +} + +/** + * @dev Optional extension of {IERC6909} that adds content URI functions. + */ +interface IERC6909ContentURI is IERC6909 { + /** + * @dev Returns URI for the contract. + */ + function contractURI() external view returns (string memory); + + /** + * @dev Returns the URI for the token of type `id`. + */ + function tokenURI(uint256 id) external view returns (string memory); +} + +/** + * @dev Optional extension of {IERC6909} that adds a token supply function. + */ +interface IERC6909TokenSupply is IERC6909 { + /** + * @dev Returns the total supply of the token of type `id`. + */ + function totalSupply(uint256 id) external view returns (uint256); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721.sol new file mode 100644 index 00000000..6ec51369 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC721.sol) + +pragma solidity >=0.6.2; + +import {IERC721} from "../token/ERC721/IERC721.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Enumerable.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Enumerable.sol new file mode 100644 index 00000000..e713bc23 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Enumerable.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC721Enumerable.sol) + +pragma solidity >=0.6.2; + +import {IERC721Enumerable} from "../token/ERC721/extensions/IERC721Enumerable.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Metadata.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Metadata.sol new file mode 100644 index 00000000..932afaaa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Metadata.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC721Metadata.sol) + +pragma solidity >=0.6.2; + +import {IERC721Metadata} from "../token/ERC721/extensions/IERC721Metadata.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Receiver.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Receiver.sol new file mode 100644 index 00000000..7b5fd47b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC721Receiver.sol @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC721Receiver.sol) + +pragma solidity >=0.5.0; + +import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol"; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7751.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7751.sol new file mode 100644 index 00000000..1755b0b5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7751.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/IERC7751.sol) + +pragma solidity >=0.8.4; + +/** + * @dev Wrapping of bubbled up reverts + * Interface of the https://eips.ethereum.org/EIPS/eip-7751[ERC-7751] wrapping of bubbled up reverts. + */ +interface IERC7751 { + error WrappedError(address target, bytes4 selector, bytes reason, bytes details); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777.sol similarity index 95% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777.sol index 2d4f6df8..d65b9c7d 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777.sol @@ -1,16 +1,16 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/IERC777.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC777.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.5.0; /** - * @dev Interface of the ERC777Token standard as defined in the EIP. + * @dev Interface of the ERC-777 Token standard as defined in the ERC. * * This contract uses the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let + * https://eips.ethereum.org/EIPS/eip-1820[ERC-1820 registry standard] to let * token holders and recipients react to token movements by using setting implementers * for the associated interfaces in said registry. See {IERC1820Registry} and - * {ERC1820Implementer}. + * {IERC1820Implementer}. */ interface IERC777 { /** diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Recipient.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777Recipient.sol similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Recipient.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777Recipient.sol index 717dd8f8..4277333c 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Recipient.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777Recipient.sol @@ -1,17 +1,17 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC777Recipient.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.5.0; /** - * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. + * @dev Interface of the ERC-777 Tokens Recipient standard as defined in the ERC. * * Accounts can be notified of {IERC777} tokens being sent to them by having a * contract implement this interface (contract holders can be their own * implementer) and registering it on the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * https://eips.ethereum.org/EIPS/eip-1820[ERC-1820 global registry]. * - * See {IERC1820Registry} and {ERC1820Implementer}. + * See {IERC1820Registry} and {IERC1820Implementer}. */ interface IERC777Recipient { /** diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Sender.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777Sender.sol similarity index 76% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Sender.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777Sender.sol index 969e3e36..46d1b4a1 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC777/IERC777Sender.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC777Sender.sol @@ -1,17 +1,17 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Sender.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC777Sender.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.5.0; /** - * @dev Interface of the ERC777TokensSender standard as defined in the EIP. + * @dev Interface of the ERC-777 Tokens Sender standard as defined in the ERC. * * {IERC777} Token holders can be notified of operations performed on their * tokens by having a contract implement this interface (contract holders can be * their own implementer) and registering it on the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. + * https://eips.ethereum.org/EIPS/eip-1820[ERC-1820 global registry]. * - * See {IERC1820Registry} and {ERC1820Implementer}. + * See {IERC1820Registry} and {IERC1820Implementer}. */ interface IERC777Sender { /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7913.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7913.sol new file mode 100644 index 00000000..4f887fb9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/IERC7913.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC7913.sol) + +pragma solidity >=0.5.0; + +/** + * @dev Signature verifier interface. + */ +interface IERC7913SignatureVerifier { + /** + * @dev Verifies `signature` as a valid signature of `hash` by `key`. + * + * MUST return the bytes4 magic value IERC7913SignatureVerifier.verify.selector if the signature is valid. + * SHOULD return 0xffffffff or revert if the signature is not valid. + * SHOULD return 0xffffffff or revert if the key is empty + */ + function verify(bytes calldata key, bytes32 hash, bytes calldata signature) external view returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC1822.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC1822.sol similarity index 76% rename from dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC1822.sol rename to dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC1822.sol index 3b73d744..2edb85de 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/interfaces/draft-IERC1822.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC1822.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC1822.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; /** - * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified + * @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC4337.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC4337.sol new file mode 100644 index 00000000..850bf58a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC4337.sol @@ -0,0 +1,255 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (interfaces/draft-IERC4337.sol) + +pragma solidity >=0.8.4; + +/** + * @dev A https://github.com/ethereum/ercs/blob/master/ERCS/erc-4337.md#useroperation[user operation] is composed of the following elements: + * - `sender` (`address`): The account making the operation + * - `nonce` (`uint256`): Anti-replay parameter (see “Semi-abstracted Nonce Support” ) + * - `factory` (`address`): account factory, only for new accounts + * - `factoryData` (`bytes`): data for account factory (only if account factory exists) + * - `callData` (`bytes`): The data to pass to the sender during the main execution call + * - `callGasLimit` (`uint256`): The amount of gas to allocate the main execution call + * - `verificationGasLimit` (`uint256`): The amount of gas to allocate for the verification step + * - `preVerificationGas` (`uint256`): Extra gas to pay the bundler + * - `maxFeePerGas` (`uint256`): Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) + * - `maxPriorityFeePerGas` (`uint256`): Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) + * - `paymaster` (`address`): Address of paymaster contract, (or empty, if account pays for itself) + * - `paymasterVerificationGasLimit` (`uint256`): The amount of gas to allocate for the paymaster validation code + * - `paymasterPostOpGasLimit` (`uint256`): The amount of gas to allocate for the paymaster post-operation code + * - `paymasterData` (`bytes`): Data for paymaster (only if paymaster exists) + * - `signature` (`bytes`): Data passed into the account to verify authorization + * + * When passed to on-chain contracts, the following packed version is used. + * - `sender` (`address`) + * - `nonce` (`uint256`) + * - `initCode` (`bytes`): concatenation of factory address and factoryData (or empty) + * - `callData` (`bytes`) + * - `accountGasLimits` (`bytes32`): concatenation of verificationGas (16 bytes) and callGas (16 bytes) + * - `preVerificationGas` (`uint256`) + * - `gasFees` (`bytes32`): concatenation of maxPriorityFeePerGas (16 bytes) and maxFeePerGas (16 bytes) + * - `paymasterAndData` (`bytes`): concatenation of paymaster fields (or empty) + * For EntryPoint v0.9+, may optionally include `paymasterSignature` at the end: + * `paymaster || paymasterVerificationGasLimit || paymasterPostOpGasLimit || paymasterData || paymasterSignature || paymasterSignatureSize || PAYMASTER_SIG_MAGIC` + * - `signature` (`bytes`) + */ +struct PackedUserOperation { + address sender; + uint256 nonce; + bytes initCode; // `abi.encodePacked(factory, factoryData)` + bytes callData; + bytes32 accountGasLimits; // `abi.encodePacked(verificationGasLimit, callGasLimit)` 16 bytes each + uint256 preVerificationGas; + bytes32 gasFees; // `abi.encodePacked(maxPriorityFeePerGas, maxFeePerGas)` 16 bytes each + bytes paymasterAndData; // `abi.encodePacked(paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData[, paymasterSignature, paymasterSignatureSize, PAYMASTER_SIG_MAGIC])` (20 bytes, 16 bytes, 16 bytes, dynamic[, dynamic, 2 bytes, 8 bytes]) + bytes signature; +} + +/** + * @dev Aggregates and validates multiple signatures for a batch of user operations. + * + * A contract could implement this interface with custom validation schemes that allow signature aggregation, + * enabling significant optimizations and gas savings for execution and transaction data cost. + * + * Bundlers and clients whitelist supported aggregators. + * + * See https://eips.ethereum.org/EIPS/eip-7766[ERC-7766] + */ +interface IAggregator { + /** + * @dev Validates the signature for a user operation. + * Returns an alternative signature that should be used during bundling. + */ + function validateUserOpSignature( + PackedUserOperation calldata userOp + ) external view returns (bytes memory sigForUserOp); + + /** + * @dev Returns an aggregated signature for a batch of user operation's signatures. + */ + function aggregateSignatures( + PackedUserOperation[] calldata userOps + ) external view returns (bytes memory aggregatesSignature); + + /** + * @dev Validates that the aggregated signature is valid for the user operations. + * + * Requirements: + * + * - The aggregated signature MUST match the given list of operations. + */ + function validateSignatures(PackedUserOperation[] calldata userOps, bytes calldata signature) external view; +} + +/** + * @dev Handle nonce management for accounts. + * + * Nonces are used in accounts as a replay protection mechanism and to ensure the order of user operations. + * To avoid limiting the number of operations an account can perform, the interface allows using parallel + * nonces by using a `key` parameter. + * + * See https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337 semi-abstracted nonce support]. + */ +interface IEntryPointNonces { + /** + * @dev Returns the nonce for a `sender` account and a `key`. + * + * Nonces for a certain `key` are always increasing. + */ + function getNonce(address sender, uint192 key) external view returns (uint256 nonce); +} + +/** + * @dev Handle stake management for entities (i.e. accounts, paymasters, factories). + * + * The EntryPoint must implement the following API to let entities like paymasters have a stake, + * and thus have more flexibility in their storage access + * (see https://eips.ethereum.org/EIPS/eip-4337#reputation-scoring-and-throttlingbanning-for-global-entities[reputation, throttling and banning.]) + */ +interface IEntryPointStake { + /** + * @dev Returns the balance of the account. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Deposits `msg.value` to the account. + */ + function depositTo(address account) external payable; + + /** + * @dev Withdraws `withdrawAmount` from the account to `withdrawAddress`. + */ + function withdrawTo(address payable withdrawAddress, uint256 withdrawAmount) external; + + /** + * @dev Adds stake to the account with an unstake delay of `unstakeDelaySec`. + */ + function addStake(uint32 unstakeDelaySec) external payable; + + /** + * @dev Unlocks the stake of the account. + */ + function unlockStake() external; + + /** + * @dev Withdraws the stake of the account to `withdrawAddress`. + */ + function withdrawStake(address payable withdrawAddress) external; +} + +/** + * @dev Entry point for user operations. + * + * User operations are validated and executed by this contract. + */ +interface IEntryPoint is IEntryPointNonces, IEntryPointStake { + /** + * @dev A user operation at `opIndex` failed with `reason`. + */ + error FailedOp(uint256 opIndex, string reason); + + /** + * @dev A user operation at `opIndex` failed with `reason` and `inner` returned data. + */ + error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner); + + /** + * @dev Batch of aggregated user operations per aggregator. + */ + struct UserOpsPerAggregator { + PackedUserOperation[] userOps; + IAggregator aggregator; + bytes signature; + } + + /** + * @dev Executes a batch of user operations. + * @param beneficiary Address to which gas is refunded upon completing the execution. + */ + function handleOps(PackedUserOperation[] calldata ops, address payable beneficiary) external; + + /** + * @dev Executes a batch of aggregated user operations per aggregator. + * @param beneficiary Address to which gas is refunded upon completing the execution. + */ + function handleAggregatedOps( + UserOpsPerAggregator[] calldata opsPerAggregator, + address payable beneficiary + ) external; +} + +/** + * @dev Base interface for an ERC-4337 account. + */ +interface IAccount { + /** + * @dev Validates a user operation. + * + * * MUST validate the caller is a trusted EntryPoint + * * MUST validate that the signature is a valid signature of the userOpHash, and SHOULD + * return SIG_VALIDATION_FAILED (and not revert) on signature mismatch. Any other error MUST revert. + * * MUST pay the entryPoint (caller) at least the “missingAccountFunds” (which might + * be zero, in case the current account’s deposit is high enough) + * + * Returns an encoded packed validation data that is composed of the following elements: + * + * - `authorizer` (`address`): 0 for success, 1 for failure, otherwise the address of an authorizer contract + * - `validUntil` (`uint48`): The UserOp is valid only up to this time. Zero for “infinite”. + * - `validAfter` (`uint48`): The UserOp is valid only after this time. + */ + function validateUserOp( + PackedUserOperation calldata userOp, + bytes32 userOpHash, + uint256 missingAccountFunds + ) external returns (uint256 validationData); +} + +/** + * @dev Support for executing user operations by prepending the {executeUserOp} function selector + * to the UserOperation's `callData`. + */ +interface IAccountExecute { + /** + * @dev Executes a user operation. + */ + function executeUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash) external; +} + +/** + * @dev Interface for a paymaster contract that agrees to pay for the gas costs of a user operation. + * + * NOTE: A paymaster must hold a stake to cover the required entrypoint stake and also the gas for the transaction. + */ +interface IPaymaster { + enum PostOpMode { + opSucceeded, + opReverted, + postOpReverted + } + + /** + * @dev Validates whether the paymaster is willing to pay for the user operation. See + * {IAccount-validateUserOp} for additional information on the return value. + * + * NOTE: Bundlers will reject this method if it modifies the state, unless it's whitelisted. + */ + function validatePaymasterUserOp( + PackedUserOperation calldata userOp, + bytes32 userOpHash, + uint256 maxCost + ) external returns (bytes memory context, uint256 validationData); + + /** + * @dev Verifies the sender is the entrypoint. + * @param actualGasCost the actual amount paid (by account or paymaster) for this UserOperation + * @param actualUserOpFeePerGas total gas used by this UserOperation (including preVerification, creation, validation and execution) + */ + function postOp( + PostOpMode mode, + bytes calldata context, + uint256 actualGasCost, + uint256 actualUserOpFeePerGas + ) external; +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC6093.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC6093.sol new file mode 100644 index 00000000..e9d6249e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC6093.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/draft-IERC6093.sol) + +pragma solidity >=0.8.4; + +/** + * @dev Standard ERC-20 Errors + * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. + */ +interface IERC20Errors { + /** + * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. + * @param sender Address whose tokens are being transferred. + * @param balance Current balance for the interacting account. + * @param needed Minimum amount required to perform a transfer. + */ + error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); + + /** + * @dev Indicates a failure with the token `sender`. Used in transfers. + * @param sender Address whose tokens are being transferred. + */ + error ERC20InvalidSender(address sender); + + /** + * @dev Indicates a failure with the token `receiver`. Used in transfers. + * @param receiver Address to which tokens are being transferred. + */ + error ERC20InvalidReceiver(address receiver); + + /** + * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. + * @param spender Address that may be allowed to operate on tokens without being their owner. + * @param allowance Amount of tokens a `spender` is allowed to operate with. + * @param needed Minimum amount required to perform a transfer. + */ + error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); + + /** + * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. + * @param approver Address initiating an approval operation. + */ + error ERC20InvalidApprover(address approver); + + /** + * @dev Indicates a failure with the `spender` to be approved. Used in approvals. + * @param spender Address that may be allowed to operate on tokens without being their owner. + */ + error ERC20InvalidSpender(address spender); +} + +/** + * @dev Standard ERC-721 Errors + * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. + */ +interface IERC721Errors { + /** + * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-721. + * Used in balance queries. + * @param owner Address of the current owner of a token. + */ + error ERC721InvalidOwner(address owner); + + /** + * @dev Indicates a `tokenId` whose `owner` is the zero address. + * @param tokenId Identifier number of a token. + */ + error ERC721NonexistentToken(uint256 tokenId); + + /** + * @dev Indicates an error related to the ownership over a particular token. Used in transfers. + * @param sender Address whose tokens are being transferred. + * @param tokenId Identifier number of a token. + * @param owner Address of the current owner of a token. + */ + error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); + + /** + * @dev Indicates a failure with the token `sender`. Used in transfers. + * @param sender Address whose tokens are being transferred. + */ + error ERC721InvalidSender(address sender); + + /** + * @dev Indicates a failure with the token `receiver`. Used in transfers. + * @param receiver Address to which tokens are being transferred. + */ + error ERC721InvalidReceiver(address receiver); + + /** + * @dev Indicates a failure with the `operator`’s approval. Used in transfers. + * @param operator Address that may be allowed to operate on tokens without being their owner. + * @param tokenId Identifier number of a token. + */ + error ERC721InsufficientApproval(address operator, uint256 tokenId); + + /** + * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. + * @param approver Address initiating an approval operation. + */ + error ERC721InvalidApprover(address approver); + + /** + * @dev Indicates a failure with the `operator` to be approved. Used in approvals. + * @param operator Address that may be allowed to operate on tokens without being their owner. + */ + error ERC721InvalidOperator(address operator); +} + +/** + * @dev Standard ERC-1155 Errors + * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. + */ +interface IERC1155Errors { + /** + * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. + * @param sender Address whose tokens are being transferred. + * @param balance Current balance for the interacting account. + * @param needed Minimum amount required to perform a transfer. + * @param tokenId Identifier number of a token. + */ + error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); + + /** + * @dev Indicates a failure with the token `sender`. Used in transfers. + * @param sender Address whose tokens are being transferred. + */ + error ERC1155InvalidSender(address sender); + + /** + * @dev Indicates a failure with the token `receiver`. Used in transfers. + * @param receiver Address to which tokens are being transferred. + */ + error ERC1155InvalidReceiver(address receiver); + + /** + * @dev Indicates a failure with the `operator`’s approval. Used in transfers. + * @param operator Address that may be allowed to operate on tokens without being their owner. + * @param owner Address of the current owner of a token. + */ + error ERC1155MissingApprovalForAll(address operator, address owner); + + /** + * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. + * @param approver Address initiating an approval operation. + */ + error ERC1155InvalidApprover(address approver); + + /** + * @dev Indicates a failure with the `operator` to be approved. Used in approvals. + * @param operator Address that may be allowed to operate on tokens without being their owner. + */ + error ERC1155InvalidOperator(address operator); + + /** + * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. + * Used in batch transfers. + * @param idsLength Length of the array of token identifiers + * @param valuesLength Length of the array of token amounts + */ + error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7579.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7579.sol new file mode 100644 index 00000000..a61eef4a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7579.sol @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (interfaces/draft-IERC7579.sol) + +pragma solidity >=0.8.4; + +import {PackedUserOperation} from "./draft-IERC4337.sol"; + +uint256 constant VALIDATION_SUCCESS = 0; +uint256 constant VALIDATION_FAILED = 1; +uint256 constant MODULE_TYPE_VALIDATOR = 1; +uint256 constant MODULE_TYPE_EXECUTOR = 2; +uint256 constant MODULE_TYPE_FALLBACK = 3; +uint256 constant MODULE_TYPE_HOOK = 4; + +/// @dev Minimal configuration interface for ERC-7579 modules +interface IERC7579Module { + /** + * @dev This function is called by the smart account during installation of the module + * @param data arbitrary data that may be passed to the module during `onInstall` initialization + * + * MUST revert on error (e.g. if module is already enabled) + */ + function onInstall(bytes calldata data) external; + + /** + * @dev This function is called by the smart account during uninstallation of the module + * @param data arbitrary data that may be passed to the module during `onUninstall` de-initialization + * + * MUST revert on error + */ + function onUninstall(bytes calldata data) external; + + /** + * @dev Returns boolean value if module is a certain type + * @param moduleTypeId the module type ID according the ERC-7579 spec + * + * MUST return true if the module is of the given type and false otherwise + */ + function isModuleType(uint256 moduleTypeId) external view returns (bool); +} + +/** + * @dev ERC-7579 Validation module (type 1). + * + * A module that implements logic to validate user operations and signatures. + */ +interface IERC7579Validator is IERC7579Module { + /** + * @dev Validates a UserOperation + * @param userOp the ERC-4337 PackedUserOperation + * @param userOpHash the hash of the ERC-4337 PackedUserOperation + * + * MUST validate that the signature is a valid signature of the userOpHash + * SHOULD return ERC-4337's SIG_VALIDATION_FAILED (and not revert) on signature mismatch + * See {IAccount-validateUserOp} for additional information on the return value + */ + function validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash) external returns (uint256); + + /** + * @dev Validates a signature using ERC-1271 + * @param sender the address that sent the ERC-1271 request to the smart account + * @param hash the hash of the ERC-1271 request + * @param signature the signature of the ERC-1271 request + * + * MUST return the ERC-1271 `MAGIC_VALUE` if the signature is valid + * MUST NOT modify state + */ + function isValidSignatureWithSender( + address sender, + bytes32 hash, + bytes calldata signature + ) external view returns (bytes4); +} + +/** + * @dev ERC-7579 Hooks module (type 4). + * + * A module that implements logic to execute before and after the account executes a user operation, + * either individually or batched. + */ +interface IERC7579Hook is IERC7579Module { + /** + * @dev Called by the smart account before execution + * @param msgSender the address that called the smart account + * @param value the value that was sent to the smart account + * @param msgData the data that was sent to the smart account + * + * MAY return arbitrary data in the `hookData` return value + */ + function preCheck( + address msgSender, + uint256 value, + bytes calldata msgData + ) external returns (bytes memory hookData); + + /** + * @dev Called by the smart account after execution + * @param hookData the data that was returned by the `preCheck` function + * + * MAY validate the `hookData` to validate transaction context of the `preCheck` function + */ + function postCheck(bytes calldata hookData) external; +} + +struct Execution { + address target; + uint256 value; + bytes callData; +} + +/** + * @dev ERC-7579 Execution. + * + * Accounts should implement this interface so that the Entrypoint and ERC-7579 modules can execute operations. + */ +interface IERC7579Execution { + /** + * @dev Executes a transaction on behalf of the account. + * @param mode The encoded execution mode of the transaction. See account/utils/draft-ERC7579Utils.sol (Mode encoding via encodeMode/decodeMode) for details + * @param executionCalldata The encoded execution call data + * + * MUST ensure adequate authorization control: e.g. onlyEntryPointOrSelf if used with ERC-4337 + * If a mode is requested that is not supported by the Account, it MUST revert + */ + function execute(bytes32 mode, bytes calldata executionCalldata) external payable; + + /** + * @dev Executes a transaction on behalf of the account. + * This function is intended to be called by Executor Modules + * @param mode The encoded execution mode of the transaction. See account/utils/draft-ERC7579Utils.sol (Mode encoding via encodeMode/decodeMode) for details + * @param executionCalldata The encoded execution call data + * @return returnData An array with the returned data of each executed subcall + * + * MUST ensure adequate authorization control: i.e. onlyExecutorModule + * If a mode is requested that is not supported by the Account, it MUST revert + */ + function executeFromExecutor( + bytes32 mode, + bytes calldata executionCalldata + ) external payable returns (bytes[] memory returnData); +} + +/** + * @dev ERC-7579 Account Config. + * + * Accounts should implement this interface to expose information that identifies the account, supported modules and capabilities. + */ +interface IERC7579AccountConfig { + /** + * @dev Returns the account id of the smart account + * @return accountImplementationId the account id of the smart account + * + * MUST return a non-empty string + * The accountId SHOULD be structured like so: + * "vendorname.accountname.semver" + * The id SHOULD be unique across all smart accounts + */ + function accountId() external view returns (string memory accountImplementationId); + + /** + * @dev Function to check if the account supports a certain execution mode (see above) + * @param encodedMode the encoded mode + * + * MUST return true if the account supports the mode and false otherwise + */ + function supportsExecutionMode(bytes32 encodedMode) external view returns (bool); + + /** + * @dev Function to check if the account supports a certain module typeId + * @param moduleTypeId the module type ID according to the ERC-7579 spec + * + * MUST return true if the account supports the module type and false otherwise + */ + function supportsModule(uint256 moduleTypeId) external view returns (bool); +} + +/** + * @dev ERC-7579 Module Config. + * + * Accounts should implement this interface to allow installing and uninstalling modules. + */ +interface IERC7579ModuleConfig { + event ModuleInstalled(uint256 moduleTypeId, address module); + event ModuleUninstalled(uint256 moduleTypeId, address module); + + /** + * @dev Installs a Module of a certain type on the smart account + * @param moduleTypeId the module type ID according to the ERC-7579 spec + * @param module the module address + * @param initData arbitrary data that may be passed to the module during `onInstall` + * initialization. + * + * MUST implement authorization control + * MUST call `onInstall` on the module with the `initData` parameter if provided + * MUST emit ModuleInstalled event + * MUST revert if the module is already installed or the initialization on the module failed + */ + function installModule(uint256 moduleTypeId, address module, bytes calldata initData) external; + + /** + * @dev Uninstalls a Module of a certain type on the smart account + * @param moduleTypeId the module type ID according the ERC-7579 spec + * @param module the module address + * @param deInitData arbitrary data that may be passed to the module during `onUninstall` + * deinitialization. + * + * MUST implement authorization control + * MUST call `onUninstall` on the module with the `deInitData` parameter if provided + * MUST emit ModuleUninstalled event + * MUST revert if the module is not installed or the deInitialization on the module failed + */ + function uninstallModule(uint256 moduleTypeId, address module, bytes calldata deInitData) external; + + /** + * @dev Returns whether a module is installed on the smart account + * @param moduleTypeId the module type ID according the ERC-7579 spec + * @param module the module address + * @param additionalContext arbitrary data that may be passed to determine if the module is installed + * + * MUST return true if the module is installed and false otherwise + */ + function isModuleInstalled( + uint256 moduleTypeId, + address module, + bytes calldata additionalContext + ) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7674.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7674.sol new file mode 100644 index 00000000..240c0e9a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7674.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC7674.sol) + +pragma solidity >=0.6.2; + +import {IERC20} from "./IERC20.sol"; + +/** + * @dev Temporary Approval Extension for ERC-20 (https://github.com/ethereum/ERCs/pull/358[ERC-7674]) + */ +interface IERC7674 is IERC20 { + /** + * @dev Set the temporary allowance, allowing `spender` to withdraw (within the same transaction) assets + * held by the caller. + */ + function temporaryApprove(address spender, uint256 value) external returns (bool success); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7786.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7786.sol new file mode 100644 index 00000000..553ae120 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7786.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/draft-IERC7786.sol) + +pragma solidity >=0.8.4; + +/** + * @dev Interface for ERC-7786 source gateways. + * + * See ERC-7786 for more details + */ +interface IERC7786GatewaySource { + /** + * @dev Event emitted when a message is created. If `sendId` is zero, no further processing is necessary. If + * `sendId` is not zero, then further (gateway specific, and non-standardized) action is required. + */ + event MessageSent( + bytes32 indexed sendId, + bytes sender, // Binary Interoperable Address + bytes recipient, // Binary Interoperable Address + bytes payload, + uint256 value, + bytes[] attributes + ); + + /// @dev This error is thrown when a message creation fails because of an unsupported attribute being specified. + error UnsupportedAttribute(bytes4 selector); + + /// @dev Getter to check whether an attribute is supported or not. + function supportsAttribute(bytes4 selector) external view returns (bool); + + /** + * @dev Endpoint for creating a new message. If the message requires further (gateway specific) processing before + * it can be sent to the destination chain, then a non-zero `sendId` must be returned. Otherwise, the + * message MUST be sent and this function must return 0. + * + * * MUST emit a {MessageSent} event. + * + * If any of the `attributes` is not supported, this function SHOULD revert with an {UnsupportedAttribute} error. + * Other errors SHOULD revert with errors not specified in ERC-7786. + */ + function sendMessage( + bytes calldata recipient, // Binary Interoperable Address + bytes calldata payload, + bytes[] calldata attributes + ) external payable returns (bytes32 sendId); +} + +/** + * @dev Interface for the ERC-7786 client contract (receiver). + * + * See ERC-7786 for more details + */ +interface IERC7786Recipient { + /** + * @dev Endpoint for receiving cross-chain message. + * + * This function may be called directly by the gateway. + */ + function receiveMessage( + bytes32 receiveId, + bytes calldata sender, // Binary Interoperable Address + bytes calldata payload + ) external payable returns (bytes4); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7802.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7802.sol new file mode 100644 index 00000000..ab845d06 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7802.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/draft-IERC7802.sol) + +pragma solidity >=0.6.2; + +import {IERC165} from "./IERC165.sol"; + +/// @title IERC7802 +/// @notice Defines the interface for crosschain ERC20 transfers. +interface IERC7802 is IERC165 { + /// @notice Emitted when a crosschain transfer mints tokens. + /// @param to Address of the account tokens are being minted for. + /// @param amount Amount of tokens minted. + /// @param sender Address of the caller (msg.sender) who invoked crosschainMint. + event CrosschainMint(address indexed to, uint256 amount, address indexed sender); + + /// @notice Emitted when a crosschain transfer burns tokens. + /// @param from Address of the account tokens are being burned from. + /// @param amount Amount of tokens burned. + /// @param sender Address of the caller (msg.sender) who invoked crosschainBurn. + event CrosschainBurn(address indexed from, uint256 amount, address indexed sender); + + /// @notice Mint tokens through a crosschain transfer. + /// @param _to Address to mint tokens to. + /// @param _amount Amount of tokens to mint. + function crosschainMint(address _to, uint256 _amount) external; + + /// @notice Burn tokens through a crosschain transfer. + /// @param _from Address to burn tokens from. + /// @param _amount Amount of tokens to burn. + function crosschainBurn(address _from, uint256 _amount) external; +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7821.sol b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7821.sol new file mode 100644 index 00000000..8a11a6ee --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/interfaces/draft-IERC7821.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC7821.sol) + +pragma solidity >=0.5.0; + +/** + * @dev Interface for minimal batch executor. + */ +interface IERC7821 { + /** + * @dev Executes the calls in `executionData`. + * Reverts and bubbles up error if any call fails. + * + * `executionData` encoding: + * - If `opData` is empty, `executionData` is simply `abi.encode(calls)`. + * - Else, `executionData` is `abi.encode(calls, opData)`. + * See: https://eips.ethereum.org/EIPS/eip-7579 + * + * Supported modes: + * - `bytes32(0x01000000000000000000...)`: does not support optional `opData`. + * - `bytes32(0x01000000000078210001...)`: supports optional `opData`. + * + * Authorization checks: + * - If `opData` is empty, the implementation SHOULD require that + * `msg.sender == address(this)`. + * - If `opData` is not empty, the implementation SHOULD use the signature + * encoded in `opData` to determine if the caller can perform the execution. + * + * `opData` may be used to store additional data for authentication, + * paymaster data, gas limits, etc. + * + * For calldata compression efficiency, if a Call.to is `address(0)`, + * it will be replaced with `address(this)`. + */ + function execute(bytes32 mode, bytes calldata executionData) external payable; + + /** + * @dev This function is provided for frontends to detect support. + * Only returns true for: + * - `bytes32(0x01000000000000000000...)`: does not support optional `opData`. + * - `bytes32(0x01000000000078210001...)`: supports optional `opData`. + */ + function supportsExecutionMode(bytes32 mode) external view returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Context.sol b/dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Context.sol new file mode 100644 index 00000000..68ca9c51 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Context.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (metatx/ERC2771Context.sol) + +pragma solidity ^0.8.20; + +import {Context} from "../utils/Context.sol"; + +/** + * @dev Context variant with ERC-2771 support. See {_msgSender} for the calldata format. + * + * WARNING: Avoid using this pattern in contracts that rely on a specific calldata length as they'll + * be affected by any forwarder whose `msg.data` is suffixed with the `from` address according to the ERC-2771 + * specification adding the address size in bytes (20) to the calldata size. An example of an unexpected + * behavior could be an unintended fallback (or another function) invocation while trying to invoke the `receive` + * function only accessible if `msg.data.length == 0`. + * + * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption. + * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender} + * recovery. + */ +abstract contract ERC2771Context is Context { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _trustedForwarder; + + /** + * @dev Initializes the contract with a trusted forwarder, which will be able to + * invoke functions on this contract on behalf of other accounts. + * + * NOTE: The trusted forwarder can be replaced by overriding {trustedForwarder}. + */ + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address trustedForwarder_) { + _trustedForwarder = trustedForwarder_; + } + + /** + * @dev Returns the address of the trusted forwarder. + */ + function trustedForwarder() public view virtual returns (address) { + return _trustedForwarder; + } + + /** + * @dev Indicates whether any particular address is the trusted forwarder. + */ + function isTrustedForwarder(address forwarder) public view virtual returns (bool) { + return forwarder == trustedForwarder(); + } + + /** + * @dev Override for `msg.sender`. Defaults to the original `msg.sender` whenever + * a call is not performed by the trusted forwarder or the calldata length is less than + * 20 bytes (an address length). + */ + function _msgSender() internal view virtual override returns (address) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (calldataLength >= contextSuffixLength && isTrustedForwarder(msg.sender)) { + unchecked { + return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); + } + } else { + return super._msgSender(); + } + } + + /** + * @dev Override for `msg.data`. Defaults to the original `msg.data` whenever + * a call is not performed by the trusted forwarder or the calldata length is less than + * 20 bytes (an address length). + */ + function _msgData() internal view virtual override returns (bytes calldata) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (calldataLength >= contextSuffixLength && isTrustedForwarder(msg.sender)) { + unchecked { + return msg.data[:calldataLength - contextSuffixLength]; + } + } else { + return super._msgData(); + } + } + + /** + * @dev ERC-2771 specifies the context as being a single address (20 bytes). + */ + function _contextSuffixLength() internal view virtual override returns (uint256) { + return 20; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Forwarder.sol b/dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Forwarder.sol new file mode 100644 index 00000000..a99dc553 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/metatx/ERC2771Forwarder.sol @@ -0,0 +1,372 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (metatx/ERC2771Forwarder.sol) + +pragma solidity ^0.8.24; + +import {ERC2771Context} from "./ERC2771Context.sol"; +import {ECDSA} from "../utils/cryptography/ECDSA.sol"; +import {EIP712} from "../utils/cryptography/EIP712.sol"; +import {Nonces} from "../utils/Nonces.sol"; +import {Address} from "../utils/Address.sol"; +import {Errors} from "../utils/Errors.sol"; + +/** + * @dev A forwarder compatible with ERC-2771 contracts. See {ERC2771Context}. + * + * This forwarder operates on forward requests that include: + * + * * `from`: An address to operate on behalf of. It is required to be equal to the request signer. + * * `to`: The address that should be called. + * * `value`: The amount of native token to attach with the requested call. + * * `gas`: The amount of gas limit that will be forwarded with the requested call. + * * `nonce` (implicit): Taken from {Nonces} for `from` and included in the signed typed data. + * * `deadline`: A timestamp after which the request is not executable anymore. + * * `data`: Encoded `msg.data` to send with the requested call. + * + * Relayers are able to submit batches if they are processing a high volume of requests. With high + * throughput, relayers may run into limitations of the chain such as limits on the number of + * transactions in the mempool. In these cases the recommendation is to distribute the load among + * multiple accounts. + * + * NOTE: Batching requests includes an optional refund for unused `msg.value` that is achieved by + * performing a call with empty calldata. While this is within the bounds of ERC-2771 compliance, + * if the refund receiver happens to consider the forwarder a trusted forwarder, it MUST properly + * handle `msg.data.length == 0`. `ERC2771Context` in OpenZeppelin Contracts versions prior to 4.9.3 + * do not handle this properly. + * + * ==== Security Considerations + * + * If a relayer submits a forward request, it should be willing to pay up to 100% of the gas amount + * specified in the request. This contract does not implement any kind of retribution for this gas, + * and it is assumed that there is an out of band incentive for relayers to pay for execution on + * behalf of signers. Often, the relayer is operated by a project that will consider it a user + * acquisition cost. + * + * By offering to pay for gas, relayers are at risk of having that gas used by an attacker toward + * some other purpose that is not aligned with the expected out of band incentives. If you operate a + * relayer, consider whitelisting target contracts and function selectors. When relaying ERC-721 or + * ERC-1155 transfers specifically, consider rejecting the use of the `data` field, since it can be + * used to execute arbitrary code. + */ +contract ERC2771Forwarder is EIP712, Nonces { + using ECDSA for bytes32; + + struct ForwardRequestData { + address from; + address to; + uint256 value; + uint256 gas; + uint48 deadline; + bytes data; + bytes signature; + } + + bytes32 internal constant FORWARD_REQUEST_TYPEHASH = + keccak256( + "ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,uint48 deadline,bytes data)" + ); + + /** + * @dev Emitted when a `ForwardRequest` is executed. + * + * NOTE: An unsuccessful forward request could be due to an invalid signature, an expired deadline, + * or simply a revert in the requested call. The contract guarantees that the relayer is not able to force + * the requested call to run out of gas. + */ + event ExecutedForwardRequest(address indexed signer, uint256 nonce, bool success); + + /** + * @dev The request `from` doesn't match with the recovered `signer`. + */ + error ERC2771ForwarderInvalidSigner(address signer, address from); + + /** + * @dev The `requestedValue` doesn't match with the available `msgValue`. + */ + error ERC2771ForwarderMismatchedValue(uint256 requestedValue, uint256 msgValue); + + /** + * @dev The request `deadline` has expired. + */ + error ERC2771ForwarderExpiredRequest(uint48 deadline); + + /** + * @dev The request target doesn't trust the `forwarder`. + */ + error ERC2771UntrustfulTarget(address target, address forwarder); + + /** + * @dev See {EIP712-constructor}. + */ + constructor(string memory name) EIP712(name, "1") {} + + /** + * @dev Returns `true` if a request is valid for a provided `signature` at the current block timestamp. + * + * A transaction is considered valid when the target trusts this forwarder, the request hasn't expired + * (deadline is not met), and the signer matches the `from` parameter of the signed request. + * + * NOTE: A request may return false here but it won't cause {executeBatch} to revert if a refund + * receiver is provided. + */ + function verify(ForwardRequestData calldata request) public view virtual returns (bool) { + (bool isTrustedForwarder, bool active, bool signerMatch, ) = _validate(request); + return isTrustedForwarder && active && signerMatch; + } + + /** + * @dev Executes a `request` on behalf of `signature`'s signer using the ERC-2771 protocol. The gas + * provided to the requested call may not be exactly the amount requested, but the call will not run + * out of gas. Will revert if the request is invalid or the call reverts, in this case the nonce is not consumed. + * + * Requirements: + * + * - The request value should be equal to the provided `msg.value`. + * - The request should be valid according to {verify}. + */ + function execute(ForwardRequestData calldata request) public payable virtual { + // We make sure that msg.value and request.value match exactly. + // If the request is invalid or the call reverts, this whole function + // will revert, ensuring value isn't stuck. + if (msg.value != request.value) { + revert ERC2771ForwarderMismatchedValue(request.value, msg.value); + } + + if (!_execute(request, true)) { + revert Errors.FailedCall(); + } + } + + /** + * @dev Batch version of {execute} with optional refunding and atomic execution. + * + * In case a batch contains at least one invalid request (see {verify}), the + * request will be skipped and the `refundReceiver` parameter will receive back the + * unused requested value at the end of the execution. This is done to prevent reverting + * the entire batch when a request is invalid or has already been submitted. + * + * If the `refundReceiver` is the `address(0)`, this function will revert when at least + * one of the requests was not valid instead of skipping it. This could be useful if + * a batch is required to get executed atomically (at least at the top-level). For example, + * refunding (and thus atomicity) can be opt-out if the relayer is using a service that avoids + * including reverted transactions. + * + * Requirements: + * + * - The sum of the requests' values should be equal to the provided `msg.value`. + * - All of the requests should be valid (see {verify}) when `refundReceiver` is the zero address. + * + * NOTE: Setting a zero `refundReceiver` guarantees an all-or-nothing requests execution only for + * the first-level forwarded calls. In case a forwarded request calls to a contract with another + * subcall, the second-level call may revert without the top-level call reverting. + */ + function executeBatch( + ForwardRequestData[] calldata requests, + address payable refundReceiver + ) public payable virtual { + bool atomic = refundReceiver == address(0); + + uint256 requestsValue; + uint256 refundValue; + + for (uint256 i; i < requests.length; ++i) { + requestsValue += requests[i].value; + bool success = _execute(requests[i], atomic); + if (!success) { + refundValue += requests[i].value; + } + } + + // The batch should revert if there's a mismatched msg.value provided + // to avoid request value tampering + if (requestsValue != msg.value) { + revert ERC2771ForwarderMismatchedValue(requestsValue, msg.value); + } + + // Some requests with value were invalid (possibly due to frontrunning). + // To avoid leaving ETH in the contract this value is refunded. + if (refundValue != 0) { + // We know refundReceiver != address(0) && requestsValue == msg.value + // meaning we can ensure refundValue is not taken from the original contract's balance + // and refundReceiver is a known account. + Address.sendValue(refundReceiver, refundValue); + } + } + + /** + * @dev Validates if the provided request can be executed at current block timestamp with + * the given `request.signature` on behalf of `request.from`. + */ + function _validate( + ForwardRequestData calldata request + ) internal view virtual returns (bool isTrustedForwarder, bool active, bool signerMatch, address signer) { + (bool isValid, address recovered) = _recoverForwardRequestSigner(request); + + return ( + _isTrustedByTarget(request.to), + request.deadline >= block.timestamp, + isValid && recovered == request.from, + recovered + ); + } + + /** + * @dev Returns a tuple with the recovered the signer of an EIP712 forward request message hash + * and a boolean indicating if the signature is valid. + * + * NOTE: The signature is considered valid if {ECDSA-tryRecoverCalldata} indicates no recover error for it. + */ + function _recoverForwardRequestSigner( + ForwardRequestData calldata request + ) internal view virtual returns (bool isValid, address signer) { + (address recovered, ECDSA.RecoverError err, ) = _hashTypedDataV4( + keccak256( + abi.encode( + FORWARD_REQUEST_TYPEHASH, + request.from, + request.to, + request.value, + request.gas, + nonces(request.from), + request.deadline, + keccak256(request.data) + ) + ) + ).tryRecoverCalldata(request.signature); + + return (err == ECDSA.RecoverError.NoError, recovered); + } + + /** + * @dev Validates and executes a signed request returning the request call `success` value. + * + * Internal function without msg.value validation. + * + * Requirements: + * + * - The caller must have provided enough gas to forward with the call. + * - The request must be valid (see {verify}) if the `requireValidRequest` is true. + * + * Emits an {ExecutedForwardRequest} event. + * + * IMPORTANT: Using this function doesn't check that all the `msg.value` was sent, potentially + * leaving value stuck in the contract. + */ + function _execute( + ForwardRequestData calldata request, + bool requireValidRequest + ) internal virtual returns (bool success) { + (bool isTrustedForwarder, bool active, bool signerMatch, address signer) = _validate(request); + + // Need to explicitly specify if a revert is required since non-reverting is default for + // batches and reversion is opt-in since it could be useful in some scenarios + if (requireValidRequest) { + if (!isTrustedForwarder) { + revert ERC2771UntrustfulTarget(request.to, address(this)); + } + + if (!active) { + revert ERC2771ForwarderExpiredRequest(request.deadline); + } + + if (!signerMatch) { + revert ERC2771ForwarderInvalidSigner(signer, request.from); + } + } + + // Ignore an invalid request because requireValidRequest = false + if (isTrustedForwarder && signerMatch && active) { + // Nonce should be used before the call to prevent reusing by reentrancy + uint256 currentNonce = _useNonce(signer); + + uint256 reqGas = request.gas; + address to = request.to; + uint256 value = request.value; + bytes memory data = abi.encodePacked(request.data, request.from); + + uint256 gasLeft; + + assembly ("memory-safe") { + success := call(reqGas, to, value, add(data, 0x20), mload(data), 0x00, 0x00) + gasLeft := gas() + } + + _checkForwardedGas(gasLeft, request); + + emit ExecutedForwardRequest(signer, currentNonce, success); + } + } + + /** + * @dev Returns whether the target trusts this forwarder. + * + * This function performs a static call to the target contract calling the + * {ERC2771Context-isTrustedForwarder} function. + * + * NOTE: Consider the execution of this forwarder is permissionless. Without this check, anyone may transfer assets + * that are owned by, or are approved to this forwarder. + */ + function _isTrustedByTarget(address target) internal view virtual returns (bool) { + bytes memory encodedParams = abi.encodeCall(ERC2771Context.isTrustedForwarder, (address(this))); + + bool success; + uint256 returnSize; + uint256 returnValue; + assembly ("memory-safe") { + // Perform the staticcall and save the result in the scratch space. + // | Location | Content | Content (Hex) | + // |-----------|----------|--------------------------------------------------------------------| + // | | | result ↓ | + // | 0x00:0x1F | selector | 0x0000000000000000000000000000000000000000000000000000000000000001 | + success := staticcall(gas(), target, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) + returnSize := returndatasize() + returnValue := mload(0x00) + } + + return success && returnSize >= 0x20 && returnValue > 0; + } + + /** + * @dev Checks if the requested gas was correctly forwarded to the callee. + * + * As a consequence of https://eips.ethereum.org/EIPS/eip-150[EIP-150]: + * - At most `gasleft() - floor(gasleft() / 64)` is forwarded to the callee. + * - At least `floor(gasleft() / 64)` is kept in the caller. + * + * It reverts consuming all the available gas if the forwarded gas is not the requested gas. + * + * IMPORTANT: The `gasLeft` parameter should be measured exactly at the end of the forwarded call. + * Any gas consumed in between will make room for bypassing this check. + */ + function _checkForwardedGas(uint256 gasLeft, ForwardRequestData calldata request) private pure { + // To avoid insufficient gas griefing attacks, as referenced in https://ronan.eth.limo/blog/ethereum-gas-dangers/ + // + // A malicious relayer can attempt to shrink the gas forwarded so that the underlying call reverts out-of-gas + // but the forwarding itself still succeeds. In order to make sure that the subcall received sufficient gas, + // we will inspect gasleft() after the forwarding. + // + // Let X be the gas available before the subcall, such that the subcall gets at most X * 63 / 64. + // We can't know X after CALL dynamic costs, but we want it to be such that X * 63 / 64 >= req.gas. + // Let Y be the gas used in the subcall. gasleft() measured immediately after the subcall will be gasleft() = X - Y. + // If the subcall ran out of gas, then Y = X * 63 / 64 and gasleft() = X - Y = X / 64. + // Under this assumption req.gas / 63 > gasleft() is true if and only if + // req.gas / 63 > X / 64, or equivalently req.gas > X * 63 / 64. + // This means that if the subcall runs out of gas we are able to detect that insufficient gas was passed. + // + // We will now also see that req.gas / 63 > gasleft() implies that req.gas >= X * 63 / 64. + // The contract guarantees Y <= req.gas, thus gasleft() = X - Y >= X - req.gas. + // - req.gas / 63 > gasleft() + // - req.gas / 63 >= X - req.gas + // - req.gas >= X * 63 / 64 + // In other words if req.gas < X * 63 / 64 then req.gas / 63 <= gasleft(), thus if the relayer behaves honestly + // the forwarding does not revert. + if (gasLeft < request.gas / 63) { + // We explicitly trigger invalid opcode to consume all gas and bubble-up the effects, since + // neither revert or assert consume all gas since Solidity 0.8.20 + // https://docs.soliditylang.org/en/v0.8.20/control-structures.html#panic-via-assert-and-error-via-require + assembly ("memory-safe") { + invalid() + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/proxy/Clones.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/Clones.sol new file mode 100644 index 00000000..bf12368b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/Clones.sol @@ -0,0 +1,294 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (proxy/Clones.sol) + +pragma solidity ^0.8.20; + +import {Create2} from "../utils/Create2.sol"; +import {Errors} from "../utils/Errors.sol"; + +/** + * @dev https://eips.ethereum.org/EIPS/eip-1167[ERC-1167] is a standard for + * deploying minimal proxy contracts, also known as "clones". + * + * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies + * > a minimal bytecode implementation that delegates all calls to a known, fixed address. + * + * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` + * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the + * deterministic method. + */ +library Clones { + error CloneArgumentsTooLong(); + + /** + * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`. + * + * This function uses the create opcode, which should never revert. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + */ + function clone(address implementation) internal returns (address instance) { + return clone(implementation, 0); + } + + /** + * @dev Same as {xref-Clones-clone-address-}[clone], but with a `value` parameter to send native currency + * to the new contract. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + * + * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) + * to always have enough balance for new deployments. Consider exposing this function under a payable method. + */ + function clone(address implementation, uint256 value) internal returns (address instance) { + if (address(this).balance < value) { + revert Errors.InsufficientBalance(address(this).balance, value); + } + assembly ("memory-safe") { + // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes + // of the `implementation` address with the bytecode before the address. + mstore(0x00, or(shr(232, shl(96, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) + // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. + mstore(0x20, or(shl(120, implementation), 0x5af43d82803e903d91602b57fd5bf3)) + instance := create(value, 0x09, 0x37) + } + if (instance == address(0)) { + revert Errors.FailedDeployment(); + } + } + + /** + * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation`. + * + * This function uses the create2 opcode and a `salt` to deterministically deploy + * the clone. Using the same `implementation` and `salt` multiple times will revert, since + * the clones cannot be deployed twice at the same address. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + */ + function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { + return cloneDeterministic(implementation, salt, 0); + } + + /** + * @dev Same as {xref-Clones-cloneDeterministic-address-bytes32-}[cloneDeterministic], but with + * a `value` parameter to send native currency to the new contract. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + * + * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) + * to always have enough balance for new deployments. Consider exposing this function under a payable method. + */ + function cloneDeterministic( + address implementation, + bytes32 salt, + uint256 value + ) internal returns (address instance) { + if (address(this).balance < value) { + revert Errors.InsufficientBalance(address(this).balance, value); + } + assembly ("memory-safe") { + // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes + // of the `implementation` address with the bytecode before the address. + mstore(0x00, or(shr(232, shl(96, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) + // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. + mstore(0x20, or(shl(120, implementation), 0x5af43d82803e903d91602b57fd5bf3)) + instance := create2(value, 0x09, 0x37, salt) + } + if (instance == address(0)) { + revert Errors.FailedDeployment(); + } + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. + */ + function predictDeterministicAddress( + address implementation, + bytes32 salt, + address deployer + ) internal pure returns (address predicted) { + assembly ("memory-safe") { + let ptr := mload(0x40) + mstore(add(ptr, 0x38), deployer) + mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) + mstore(add(ptr, 0x14), implementation) + mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) + mstore(add(ptr, 0x58), salt) + mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) + predicted := and(keccak256(add(ptr, 0x43), 0x55), 0xffffffffffffffffffffffffffffffffffffffff) + } + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. + */ + function predictDeterministicAddress( + address implementation, + bytes32 salt + ) internal view returns (address predicted) { + return predictDeterministicAddress(implementation, salt, address(this)); + } + + /** + * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom + * immutable arguments. These are provided through `args` and cannot be changed after deployment. To + * access the arguments within the implementation, use {fetchCloneArgs}. + * + * This function uses the create opcode, which should never revert. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + */ + function cloneWithImmutableArgs(address implementation, bytes memory args) internal returns (address instance) { + return cloneWithImmutableArgs(implementation, args, 0); + } + + /** + * @dev Same as {xref-Clones-cloneWithImmutableArgs-address-bytes-}[cloneWithImmutableArgs], but with a `value` + * parameter to send native currency to the new contract. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + * + * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) + * to always have enough balance for new deployments. Consider exposing this function under a payable method. + */ + function cloneWithImmutableArgs( + address implementation, + bytes memory args, + uint256 value + ) internal returns (address instance) { + if (address(this).balance < value) { + revert Errors.InsufficientBalance(address(this).balance, value); + } + bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args); + assembly ("memory-safe") { + instance := create(value, add(bytecode, 0x20), mload(bytecode)) + } + if (instance == address(0)) { + revert Errors.FailedDeployment(); + } + } + + /** + * @dev Deploys and returns the address of a clone that mimics the behavior of `implementation` with custom + * immutable arguments. These are provided through `args` and cannot be changed after deployment. To + * access the arguments within the implementation, use {fetchCloneArgs}. + * + * This function uses the create2 opcode and a `salt` to deterministically deploy the clone. Using the same + * `implementation`, `args` and `salt` multiple times will revert, since the clones cannot be deployed twice + * at the same address. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + */ + function cloneDeterministicWithImmutableArgs( + address implementation, + bytes memory args, + bytes32 salt + ) internal returns (address instance) { + return cloneDeterministicWithImmutableArgs(implementation, args, salt, 0); + } + + /** + * @dev Same as {xref-Clones-cloneDeterministicWithImmutableArgs-address-bytes-bytes32-}[cloneDeterministicWithImmutableArgs], + * but with a `value` parameter to send native currency to the new contract. + * + * WARNING: This function does not check if `implementation` has code. A clone that points to an address + * without code cannot be initialized. Initialization calls may appear to be successful when, in reality, they + * have no effect and leave the clone uninitialized, allowing a third party to initialize it later. + * + * NOTE: Using a non-zero value at creation will require the contract using this function (e.g. a factory) + * to always have enough balance for new deployments. Consider exposing this function under a payable method. + */ + function cloneDeterministicWithImmutableArgs( + address implementation, + bytes memory args, + bytes32 salt, + uint256 value + ) internal returns (address instance) { + bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args); + return Create2.deploy(value, salt, bytecode); + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}. + */ + function predictDeterministicAddressWithImmutableArgs( + address implementation, + bytes memory args, + bytes32 salt, + address deployer + ) internal pure returns (address predicted) { + bytes memory bytecode = _cloneCodeWithImmutableArgs(implementation, args); + return Create2.computeAddress(salt, keccak256(bytecode), deployer); + } + + /** + * @dev Computes the address of a clone deployed using {Clones-cloneDeterministicWithImmutableArgs}. + */ + function predictDeterministicAddressWithImmutableArgs( + address implementation, + bytes memory args, + bytes32 salt + ) internal view returns (address predicted) { + return predictDeterministicAddressWithImmutableArgs(implementation, args, salt, address(this)); + } + + /** + * @dev Get the immutable args attached to a clone. + * + * - If `instance` is a clone that was deployed using `clone` or `cloneDeterministic`, this + * function will return an empty array. + * - If `instance` is a clone that was deployed using `cloneWithImmutableArgs` or + * `cloneDeterministicWithImmutableArgs`, this function will return the args array used at + * creation. + * - If `instance` is NOT a clone deployed using this library, the behavior is undefined. This + * function should only be used to check addresses that are known to be clones. + */ + function fetchCloneArgs(address instance) internal view returns (bytes memory) { + bytes memory result = new bytes(instance.code.length - 0x2d); // revert if length is too short + assembly ("memory-safe") { + extcodecopy(instance, add(result, 0x20), 0x2d, mload(result)) + } + return result; + } + + /** + * @dev Helper that prepares the initcode of the proxy with immutable args. + * + * An assembly variant of this function requires copying the `args` array, which can be efficiently done using + * `mcopy`. Unfortunately, that opcode is not available before cancun. A pure solidity implementation using + * abi.encodePacked is more expensive but also more portable and easier to review. + * + * NOTE: https://eips.ethereum.org/EIPS/eip-170[EIP-170] limits the length of the contract code to 24576 bytes. + * With the proxy code taking 45 bytes, that limits the length of the immutable args to 24531 bytes. + */ + function _cloneCodeWithImmutableArgs( + address implementation, + bytes memory args + ) private pure returns (bytes memory) { + if (args.length > 0x5fd3) revert CloneArgumentsTooLong(); + return + abi.encodePacked( + hex"61", + uint16(args.length + 0x2d), + hex"3d81600a3d39f3363d3d373d3d3d363d73", + implementation, + hex"5af43d82803e903d91602b57fd5bf3", + args + ); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Proxy.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Proxy.sol new file mode 100644 index 00000000..284c921a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Proxy.sol @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (proxy/ERC1967/ERC1967Proxy.sol) + +pragma solidity ^0.8.22; + +import {Proxy} from "../Proxy.sol"; +import {ERC1967Utils} from "./ERC1967Utils.sol"; + +/** + * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an + * implementation address that can be changed. This address is stored in storage in the location specified by + * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967], so that it doesn't conflict with the storage layout of the + * implementation behind the proxy. + */ +contract ERC1967Proxy is Proxy { + /** + * @dev The proxy is left uninitialized. + */ + error ERC1967ProxyUninitialized(); + + /** + * @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`. + * + * Provided `_data` is passed in a delegate call to `implementation`. This will typically be an encoded function + * call, and allows initializing the storage of the proxy like a Solidity constructor. By default construction + * will fail if `_data` is empty. This behavior can be overridden using a custom {_unsafeAllowUninitialized} that + * returns true. In that case, empty `_data` is ignored and no delegate call to the implementation is performed + * during construction. + * + * Requirements: + * + * - If `data` is empty, `msg.value` must be zero. + */ + constructor(address implementation, bytes memory _data) payable { + if (!_unsafeAllowUninitialized() && _data.length == 0) { + revert ERC1967ProxyUninitialized(); + } + ERC1967Utils.upgradeToAndCall(implementation, _data); + } + + /** + * @dev Returns the current implementation address. + * + * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using + * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. + * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` + */ + function _implementation() internal view virtual override returns (address) { + return ERC1967Utils.getImplementation(); + } + + /** + * @dev Returns whether the proxy can be left uninitialized. + * + * NOTE: Override this function to allow the proxy to be left uninitialized. + * Consider uninitialized proxies might be susceptible to man-in-the-middle threats + * where the proxy is replaced with a malicious one. + */ + function _unsafeAllowUninitialized() internal pure virtual returns (bool) { + return false; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Utils.sol new file mode 100644 index 00000000..60593616 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/ERC1967/ERC1967Utils.sol @@ -0,0 +1,177 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (proxy/ERC1967/ERC1967Utils.sol) + +pragma solidity ^0.8.21; + +import {IBeacon} from "../beacon/IBeacon.sol"; +import {IERC1967} from "../../interfaces/IERC1967.sol"; +import {Address} from "../../utils/Address.sol"; +import {StorageSlot} from "../../utils/StorageSlot.sol"; + +/** + * @dev This library provides getters and event emitting update functions for + * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots. + */ +library ERC1967Utils { + /** + * @dev Storage slot with the address of the current implementation. + * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. + */ + // solhint-disable-next-line private-vars-leading-underscore + bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + + /** + * @dev The `implementation` of the proxy is invalid. + */ + error ERC1967InvalidImplementation(address implementation); + + /** + * @dev The `admin` of the proxy is invalid. + */ + error ERC1967InvalidAdmin(address admin); + + /** + * @dev The `beacon` of the proxy is invalid. + */ + error ERC1967InvalidBeacon(address beacon); + + /** + * @dev An upgrade function sees `msg.value > 0` that may be lost. + */ + error ERC1967NonPayable(); + + /** + * @dev Returns the current implementation address. + */ + function getImplementation() internal view returns (address) { + return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value; + } + + /** + * @dev Stores a new address in the ERC-1967 implementation slot. + */ + function _setImplementation(address newImplementation) private { + if (newImplementation.code.length == 0) { + revert ERC1967InvalidImplementation(newImplementation); + } + StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; + } + + /** + * @dev Performs implementation upgrade with additional setup call if data is nonempty. + * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected + * to avoid stuck value in the contract. + * + * Emits an {IERC1967-Upgraded} event. + */ + function upgradeToAndCall(address newImplementation, bytes memory data) internal { + _setImplementation(newImplementation); + emit IERC1967.Upgraded(newImplementation); + + if (data.length > 0) { + Address.functionDelegateCall(newImplementation, data); + } else { + _checkNonPayable(); + } + } + + /** + * @dev Storage slot with the admin of the contract. + * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. + */ + // solhint-disable-next-line private-vars-leading-underscore + bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + + /** + * @dev Returns the current admin. + * + * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using + * the https://ethereum.org/developers/docs/apis/json-rpc/#eth_getstorageat[`eth_getStorageAt`] RPC call. + * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` + */ + function getAdmin() internal view returns (address) { + return StorageSlot.getAddressSlot(ADMIN_SLOT).value; + } + + /** + * @dev Stores a new address in the ERC-1967 admin slot. + */ + function _setAdmin(address newAdmin) private { + if (newAdmin == address(0)) { + revert ERC1967InvalidAdmin(address(0)); + } + StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; + } + + /** + * @dev Changes the admin of the proxy. + * + * Emits an {IERC1967-AdminChanged} event. + */ + function changeAdmin(address newAdmin) internal { + emit IERC1967.AdminChanged(getAdmin(), newAdmin); + _setAdmin(newAdmin); + } + + /** + * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. + * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. + */ + // solhint-disable-next-line private-vars-leading-underscore + bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; + + /** + * @dev Returns the current beacon. + */ + function getBeacon() internal view returns (address) { + return StorageSlot.getAddressSlot(BEACON_SLOT).value; + } + + /** + * @dev Stores a new beacon in the ERC-1967 beacon slot. + */ + function _setBeacon(address newBeacon) private { + if (newBeacon.code.length == 0) { + revert ERC1967InvalidBeacon(newBeacon); + } + + StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; + + address beaconImplementation = IBeacon(newBeacon).implementation(); + if (beaconImplementation.code.length == 0) { + revert ERC1967InvalidImplementation(beaconImplementation); + } + } + + /** + * @dev Change the beacon and trigger a setup call if data is nonempty. + * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected + * to avoid stuck value in the contract. + * + * Emits an {IERC1967-BeaconUpgraded} event. + * + * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since + * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for + * efficiency. + */ + function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { + _setBeacon(newBeacon); + emit IERC1967.BeaconUpgraded(newBeacon); + + if (data.length > 0) { + Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); + } else { + _checkNonPayable(); + } + } + + /** + * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract + * if an upgrade doesn't perform an initialization call. + */ + function _checkNonPayable() private { + if (msg.value > 0) { + revert ERC1967NonPayable(); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/Proxy.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/Proxy.sol similarity index 68% rename from dependencies/@openzeppelin-contracts-4.9.6/proxy/Proxy.sol rename to dependencies/@openzeppelin-contracts-5.6.1/proxy/Proxy.sol index 988cf72a..1f9d8ec4 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/Proxy.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/Proxy.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (proxy/Proxy.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM @@ -24,29 +24,29 @@ abstract contract Proxy { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. - calldatacopy(0, 0, calldatasize()) + calldatacopy(0x00, 0x00, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. - let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) + let result := delegatecall(gas(), implementation, 0x00, calldatasize(), 0x00, 0x00) // Copy the returned data. - returndatacopy(0, 0, returndatasize()) + returndatacopy(0x00, 0x00, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { - revert(0, returndatasize()) + revert(0x00, returndatasize()) } default { - return(0, returndatasize()) + return(0x00, returndatasize()) } } } /** - * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function - * and {_fallback} should delegate. + * @dev This is a virtual function that should be overridden so it returns the address to which the fallback + * function and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); @@ -56,7 +56,6 @@ abstract contract Proxy { * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { - _beforeFallback(); _delegate(_implementation()); } @@ -67,20 +66,4 @@ abstract contract Proxy { fallback() external payable virtual { _fallback(); } - - /** - * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data - * is empty. - */ - receive() external payable virtual { - _fallback(); - } - - /** - * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` - * call, or as part of the Solidity `fallback` or `receive` functions. - * - * If overridden should call `super._beforeFallback()`. - */ - function _beforeFallback() internal virtual {} } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/BeaconProxy.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/BeaconProxy.sol new file mode 100644 index 00000000..36558d67 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/BeaconProxy.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0) (proxy/beacon/BeaconProxy.sol) + +pragma solidity ^0.8.22; + +import {IBeacon} from "./IBeacon.sol"; +import {Proxy} from "../Proxy.sol"; +import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; + +/** + * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. + * + * The beacon address can only be set once during construction, and cannot be changed afterwards. It is stored in an + * immutable variable to avoid unnecessary storage reads, and also in the beacon storage slot specified by + * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] so that it can be accessed externally. + * + * CAUTION: Since the beacon address can never be changed, you must ensure that you either control the beacon, or trust + * the beacon to not upgrade the implementation maliciously. + * + * IMPORTANT: Do not use the implementation logic to modify the beacon storage slot. Doing so would leave the proxy in + * an inconsistent state where the beacon storage slot does not match the beacon address. + */ +contract BeaconProxy is Proxy { + // An immutable address for the beacon to avoid unnecessary SLOADs before each delegate call. + address private immutable _beacon; + + /** + * @dev Initializes the proxy with `beacon`. + * + * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This + * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity + * constructor. + * + * Requirements: + * + * - `beacon` must be a contract with the interface {IBeacon}. + * - If `data` is empty, `msg.value` must be zero. + */ + constructor(address beacon, bytes memory data) payable { + ERC1967Utils.upgradeBeaconToAndCall(beacon, data); + _beacon = beacon; + } + + /** + * @dev Returns the current implementation address of the associated beacon. + */ + function _implementation() internal view virtual override returns (address) { + return IBeacon(_getBeacon()).implementation(); + } + + /** + * @dev Returns the beacon. + */ + function _getBeacon() internal view virtual returns (address) { + return _beacon; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/IBeacon.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/IBeacon.sol similarity index 63% rename from dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/IBeacon.sol rename to dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/IBeacon.sol index fba3ee2a..f911b15a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/IBeacon.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/IBeacon.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. @@ -10,7 +10,7 @@ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * - * {BeaconProxy} will check that this address is a contract. + * {UpgradeableBeacon} will check that this address is a contract. */ function implementation() external view returns (address); } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/UpgradeableBeacon.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/UpgradeableBeacon.sol similarity index 69% rename from dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/UpgradeableBeacon.sol rename to dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/UpgradeableBeacon.sol index 5d83ceb3..8db9bd23 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/proxy/beacon/UpgradeableBeacon.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/beacon/UpgradeableBeacon.sol @@ -1,11 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol) +// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/UpgradeableBeacon.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./IBeacon.sol"; -import "../../access/Ownable.sol"; -import "../../utils/Address.sol"; +import {IBeacon} from "./IBeacon.sol"; +import {Ownable} from "../../access/Ownable.sol"; /** * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their @@ -16,23 +15,27 @@ import "../../utils/Address.sol"; contract UpgradeableBeacon is IBeacon, Ownable { address private _implementation; + /** + * @dev The `implementation` of the beacon is invalid. + */ + error BeaconInvalidImplementation(address implementation); + /** * @dev Emitted when the implementation returned by the beacon is changed. */ event Upgraded(address indexed implementation); /** - * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the - * beacon. + * @dev Sets the address of the initial implementation, and the initial owner who can upgrade the beacon. */ - constructor(address implementation_) { + constructor(address implementation_, address initialOwner) Ownable(initialOwner) { _setImplementation(implementation_); } /** * @dev Returns the current implementation address. */ - function implementation() public view virtual override returns (address) { + function implementation() public view virtual returns (address) { return _implementation; } @@ -48,7 +51,6 @@ contract UpgradeableBeacon is IBeacon, Ownable { */ function upgradeTo(address newImplementation) public virtual onlyOwner { _setImplementation(newImplementation); - emit Upgraded(newImplementation); } /** @@ -59,7 +61,10 @@ contract UpgradeableBeacon is IBeacon, Ownable { * - `newImplementation` must be a contract. */ function _setImplementation(address newImplementation) private { - require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract"); + if (newImplementation.code.length == 0) { + revert BeaconInvalidImplementation(newImplementation); + } _implementation = newImplementation; + emit Upgraded(newImplementation); } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/ProxyAdmin.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/ProxyAdmin.sol new file mode 100644 index 00000000..eefd49a8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/ProxyAdmin.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0) (proxy/transparent/ProxyAdmin.sol) + +pragma solidity ^0.8.22; + +import {ITransparentUpgradeableProxy} from "./TransparentUpgradeableProxy.sol"; +import {Ownable} from "../../access/Ownable.sol"; + +/** + * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an + * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. + */ +contract ProxyAdmin is Ownable { + /** + * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgrade(address,address)` + * and `upgradeAndCall(address,address,bytes)` are present, and `upgrade` must be used if no function should be called, + * while `upgradeAndCall` will invoke the `receive` function if the third argument is the empty byte string. + * If the getter returns `"5.0.0"`, only `upgradeAndCall(address,address,bytes)` is present, and the third argument must + * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function + * during an upgrade. + */ + string public constant UPGRADE_INTERFACE_VERSION = "5.0.0"; + + /** + * @dev Sets the initial owner who can perform upgrades. + */ + constructor(address initialOwner) Ownable(initialOwner) {} + + /** + * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. + * See {TransparentUpgradeableProxy-_dispatchUpgradeToAndCall}. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + * - If `data` is empty, `msg.value` must be zero. + */ + function upgradeAndCall( + ITransparentUpgradeableProxy proxy, + address implementation, + bytes memory data + ) public payable virtual onlyOwner { + proxy.upgradeToAndCall{value: msg.value}(implementation, data); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/TransparentUpgradeableProxy.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/TransparentUpgradeableProxy.sol new file mode 100644 index 00000000..39008aab --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/transparent/TransparentUpgradeableProxy.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (proxy/transparent/TransparentUpgradeableProxy.sol) + +pragma solidity ^0.8.22; + +import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; +import {ERC1967Proxy} from "../ERC1967/ERC1967Proxy.sol"; +import {IERC1967} from "../../interfaces/IERC1967.sol"; +import {ProxyAdmin} from "./ProxyAdmin.sol"; + +/** + * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy} + * does not implement this interface directly, and its upgradeability mechanism is implemented by an internal dispatch + * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not + * include them in the ABI so this interface must be used to interact with it. + */ +interface ITransparentUpgradeableProxy is IERC1967 { + /// @dev See {UUPSUpgradeable-upgradeToAndCall} + function upgradeToAndCall(address newImplementation, bytes calldata data) external payable; +} + +/** + * @dev This contract implements a proxy that is upgradeable through an associated {ProxyAdmin} instance. + * + * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector + * clashing], which can potentially be used in an attack, this contract uses the + * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two + * things that go hand in hand: + * + * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if + * that call matches the {ITransparentUpgradeableProxy-upgradeToAndCall} function exposed by the proxy itself. + * 2. If the admin calls the proxy, it can call the `upgradeToAndCall` function, but any other call won't be forwarded to + * the implementation. If the admin tries to call a function on the implementation it will fail with an error indicating + * the proxy admin cannot fallback to the target implementation. + * + * These properties mean that the admin account can only be used for upgrading the proxy, so it's best if it's a + * dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to + * call a function from the proxy implementation. For this reason, the proxy deploys an instance of {ProxyAdmin} and + * allows upgrades only if they come through it. You should think of the `ProxyAdmin` instance as the administrative + * interface of the proxy, including the ability to change who can trigger upgrades by transferring ownership. + * + * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not + * inherit from that interface, and instead `upgradeToAndCall` is implicitly implemented using a custom dispatch + * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to + * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the + * implementation. + * + * NOTE: This proxy does not inherit from {Context} deliberately. The {ProxyAdmin} of this contract won't send a + * meta-transaction in any way, and any other meta-transaction setup should be made in the implementation contract. + * + * IMPORTANT: This contract avoids unnecessary storage reads by setting the admin only during construction as an + * immutable variable, preventing any changes thereafter. However, the admin slot defined in ERC-1967 can still be + * overwritten by the implementation logic pointed to by this proxy. In such cases, the contract may end up in an + * undesirable state where the admin slot is different from the actual admin. Relying on the value of the admin slot + * is generally fine if the implementation is trusted. + * + * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the + * compiler will not check that there are no selector conflicts, due to the note above. A selector clash between any new + * function and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This + * could render the `upgradeToAndCall` function inaccessible, preventing upgradeability and compromising transparency. + */ +contract TransparentUpgradeableProxy is ERC1967Proxy { + // An immutable address for the admin to avoid unnecessary SLOADs before each call + // at the expense of removing the ability to change the admin once it's set. + // This is acceptable if the admin is always a ProxyAdmin instance or similar contract + // with its own ability to transfer the permissions to another account. + address private immutable _admin; + + /** + * @dev The proxy caller is the current admin, and can't fallback to the proxy target. + */ + error ProxyDeniedAdminAccess(); + + /** + * @dev Initializes an upgradeable proxy managed by an instance of a {ProxyAdmin} with an `initialOwner`, + * backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in + * {ERC1967Proxy-constructor}. + */ + constructor(address _logic, address initialOwner, bytes memory _data) payable ERC1967Proxy(_logic, _data) { + _admin = address(new ProxyAdmin(initialOwner)); + // Set the storage value and emit an event for ERC-1967 compatibility + ERC1967Utils.changeAdmin(_proxyAdmin()); + } + + /** + * @dev Returns the admin of this proxy. + */ + function _proxyAdmin() internal view virtual returns (address) { + return _admin; + } + + /** + * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior. + */ + function _fallback() internal virtual override { + if (msg.sender == _proxyAdmin()) { + if (msg.sig != ITransparentUpgradeableProxy.upgradeToAndCall.selector) { + revert ProxyDeniedAdminAccess(); + } else { + _dispatchUpgradeToAndCall(); + } + } else { + super._fallback(); + } + } + + /** + * @dev Upgrade the implementation of the proxy. See {ERC1967Utils-upgradeToAndCall}. + * + * Requirements: + * + * - If `data` is empty, `msg.value` must be zero. + */ + function _dispatchUpgradeToAndCall() private { + (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes)); + ERC1967Utils.upgradeToAndCall(newImplementation, data); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/Initializable.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/utils/Initializable.sol similarity index 54% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/Initializable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/proxy/utils/Initializable.sol index 47658dc6..0d05fdb0 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/Initializable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/utils/Initializable.sol @@ -1,9 +1,7 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) +// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol) -pragma solidity ^0.8.2; - -import "../../utils/AddressUpgradeable.sol"; +pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed @@ -57,43 +55,78 @@ import "../../utils/AddressUpgradeable.sol"; */ abstract contract Initializable { /** - * @dev Indicates that the contract has been initialized. - * @custom:oz-retyped-from bool + * @dev Storage of the initializable contract. + * + * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions + * when using with upgradeable contracts. + * + * @custom:storage-location erc7201:openzeppelin.storage.Initializable + */ + struct InitializableStorage { + /** + * @dev Indicates that the contract has been initialized. + */ + uint64 _initialized; + /** + * @dev Indicates that the contract is in the process of being initialized. + */ + bool _initializing; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; + + /** + * @dev The contract is already initialized. */ - uint8 private _initialized; + error InvalidInitialization(); /** - * @dev Indicates that the contract is in the process of being initialized. + * @dev The contract is not initializing. */ - bool private _initializing; + error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ - event Initialized(uint8 version); + event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * - * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a - * constructor. + * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any + * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in + * production. * * Emits an {Initialized} event. */ modifier initializer() { - bool isTopLevelCall = !_initializing; - require( - (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), - "Initializable: contract is already initialized" - ); - _initialized = 1; + // solhint-disable-next-line var-name-mixedcase + InitializableStorage storage $ = _getInitializableStorage(); + + // Cache values to avoid duplicated sloads + bool isTopLevelCall = !$._initializing; + uint64 initialized = $._initialized; + + // Allowed calls: + // - initialSetup: the contract is not in the initializing state and no previous version was + // initialized + // - construction: the contract is initialized at version 1 (no reinitialization) and the + // current contract is just being deployed + bool initialSetup = initialized == 0 && isTopLevelCall; + bool construction = initialized == 1 && address(this).code.length == 0; + + if (!initialSetup && !construction) { + revert InvalidInitialization(); + } + $._initialized = 1; if (isTopLevelCall) { - _initializing = true; + $._initializing = true; } _; if (isTopLevelCall) { - _initializing = false; + $._initializing = false; emit Initialized(1); } } @@ -112,16 +145,21 @@ abstract contract Initializable { * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * - * WARNING: setting the version to 255 will prevent any future reinitialization. + * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ - modifier reinitializer(uint8 version) { - require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); - _initialized = version; - _initializing = true; + modifier reinitializer(uint64 version) { + // solhint-disable-next-line var-name-mixedcase + InitializableStorage storage $ = _getInitializableStorage(); + + if ($._initializing || $._initialized >= version) { + revert InvalidInitialization(); + } + $._initialized = version; + $._initializing = true; _; - _initializing = false; + $._initializing = false; emit Initialized(version); } @@ -130,10 +168,19 @@ abstract contract Initializable { * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { - require(_initializing, "Initializable: contract is not initializing"); + _checkInitializing(); _; } + /** + * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. + */ + function _checkInitializing() internal view virtual { + if (!_isInitializing()) { + revert NotInitializing(); + } + } + /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized @@ -143,24 +190,49 @@ abstract contract Initializable { * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { - require(!_initializing, "Initializable: contract is initializing"); - if (_initialized != type(uint8).max) { - _initialized = type(uint8).max; - emit Initialized(type(uint8).max); + // solhint-disable-next-line var-name-mixedcase + InitializableStorage storage $ = _getInitializableStorage(); + + if ($._initializing) { + revert InvalidInitialization(); + } + if ($._initialized != type(uint64).max) { + $._initialized = type(uint64).max; + emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ - function _getInitializedVersion() internal view returns (uint8) { - return _initialized; + function _getInitializedVersion() internal view returns (uint64) { + return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { - return _initializing; + return _getInitializableStorage()._initializing; + } + + /** + * @dev Pointer to storage slot. Allows integrators to override it with a custom storage location. + * + * NOTE: Consider following the ERC-7201 formula to derive storage locations. + */ + function _initializableStorageSlot() internal pure virtual returns (bytes32) { + return INITIALIZABLE_STORAGE; + } + + /** + * @dev Returns a pointer to the storage namespace. + */ + // solhint-disable-next-line var-name-mixedcase + function _getInitializableStorage() private pure returns (InitializableStorage storage $) { + bytes32 slot = _initializableStorageSlot(); + assembly { + $.slot := slot + } } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/proxy/utils/UUPSUpgradeable.sol b/dependencies/@openzeppelin-contracts-5.6.1/proxy/utils/UUPSUpgradeable.sol new file mode 100644 index 00000000..da3eac79 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/proxy/utils/UUPSUpgradeable.sol @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (proxy/utils/UUPSUpgradeable.sol) + +pragma solidity ^0.8.22; + +import {IERC1822Proxiable} from "../../interfaces/draft-IERC1822.sol"; +import {ERC1967Utils} from "../ERC1967/ERC1967Utils.sol"; + +/** + * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an + * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. + * + * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is + * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing + * `UUPSUpgradeable` with a custom implementation of upgrades. + * + * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. + * + * @custom:stateless + */ +abstract contract UUPSUpgradeable is IERC1822Proxiable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable __self = address(this); + + /** + * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)` + * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called, + * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string. + * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must + * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function + * during an upgrade. + */ + string public constant UPGRADE_INTERFACE_VERSION = "5.0.0"; + + /** + * @dev The call is from an unauthorized context. + */ + error UUPSUnauthorizedCallContext(); + + /** + * @dev The storage `slot` is unsupported as a UUID. + */ + error UUPSUnsupportedProxiableUUID(bytes32 slot); + + /** + * @dev Check that the execution is being performed through a delegatecall call and that the execution context is + * a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case + * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a + * function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to + * fail. + */ + modifier onlyProxy() { + _checkProxy(); + _; + } + + /** + * @dev Check that the execution is not being performed through a delegate call. This allows a function to be + * callable on the implementing contract but not through proxies. + */ + modifier notDelegated() { + _checkNotDelegated(); + _; + } + + /** + * @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the + * implementation. It is used to validate the implementation's compatibility when performing an upgrade. + * + * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks + * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this + * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. + */ + function proxiableUUID() external view notDelegated returns (bytes32) { + return ERC1967Utils.IMPLEMENTATION_SLOT; + } + + /** + * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call + * encoded in `data`. + * + * Calls {_authorizeUpgrade}. + * + * Emits an {Upgraded} event. + * + * @custom:oz-upgrades-unsafe-allow-reachable delegatecall + */ + function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { + _authorizeUpgrade(newImplementation); + _upgradeToAndCallUUPS(newImplementation, data); + } + + /** + * @dev Reverts if the execution is not performed via delegatecall or the execution + * context is not of a proxy with an ERC-1967 compliant implementation pointing to self. + */ + function _checkProxy() internal view virtual { + if ( + address(this) == __self || // Must be called through delegatecall + ERC1967Utils.getImplementation() != __self // Must be called through an active proxy + ) { + revert UUPSUnauthorizedCallContext(); + } + } + + /** + * @dev Reverts if the execution is performed via delegatecall. + * See {notDelegated}. + */ + function _checkNotDelegated() internal view virtual { + if (address(this) != __self) { + // Must not be called through delegatecall + revert UUPSUnauthorizedCallContext(); + } + } + + /** + * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by + * {upgradeToAndCall}. + * + * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. + * + * ```solidity + * function _authorizeUpgrade(address) internal onlyOwner {} + * ``` + */ + function _authorizeUpgrade(address newImplementation) internal virtual; + + /** + * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call. + * + * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value + * is expected to be the implementation slot in ERC-1967. + * + * Emits an {IERC1967-Upgraded} event. + */ + function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private { + try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { + if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) { + revert UUPSUnsupportedProxiableUUID(slot); + } + ERC1967Utils.upgradeToAndCall(newImplementation, data); + } catch { + // The implementation is not UUPS + revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/ERC1155.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/ERC1155.sol new file mode 100644 index 00000000..79a31cb1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/ERC1155.sol @@ -0,0 +1,417 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/ERC1155.sol) + +pragma solidity ^0.8.24; + +import {IERC1155} from "./IERC1155.sol"; +import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol"; +import {ERC1155Utils} from "./utils/ERC1155Utils.sol"; +import {Context} from "../../utils/Context.sol"; +import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; +import {Arrays} from "../../utils/Arrays.sol"; +import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol"; + +/** + * @dev Implementation of the basic standard multi-token. + * See https://eips.ethereum.org/EIPS/eip-1155 + * Originally based on code by Enjin: https://github.com/enjin/erc-1155 + */ +abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors { + using Arrays for uint256[]; + using Arrays for address[]; + + mapping(uint256 id => mapping(address account => uint256)) private _balances; + + mapping(address account => mapping(address operator => bool)) private _operatorApprovals; + + // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json + string private _uri; + + /** + * @dev See {_setURI}. + */ + constructor(string memory uri_) { + _setURI(uri_); + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return + interfaceId == type(IERC1155).interfaceId || + interfaceId == type(IERC1155MetadataURI).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC1155MetadataURI-uri}. + * + * This implementation returns the same URI for *all* token types. It relies + * on the token type ID substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the ERC]. + * + * Clients calling this function must replace the `\{id\}` substring with the + * actual token type ID. + */ + function uri(uint256 /* id */) public view virtual returns (string memory) { + return _uri; + } + + /// @inheritdoc IERC1155 + function balanceOf(address account, uint256 id) public view virtual returns (uint256) { + return _balances[id][account]; + } + + /** + * @dev See {IERC1155-balanceOfBatch}. + * + * Requirements: + * + * - `accounts` and `ids` must have the same length. + */ + function balanceOfBatch( + address[] memory accounts, + uint256[] memory ids + ) public view virtual returns (uint256[] memory) { + if (accounts.length != ids.length) { + revert ERC1155InvalidArrayLength(ids.length, accounts.length); + } + + uint256[] memory batchBalances = new uint256[](accounts.length); + + for (uint256 i = 0; i < accounts.length; ++i) { + batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i)); + } + + return batchBalances; + } + + /// @inheritdoc IERC1155 + function setApprovalForAll(address operator, bool approved) public virtual { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /// @inheritdoc IERC1155 + function isApprovedForAll(address account, address operator) public view virtual returns (bool) { + return _operatorApprovals[account][operator]; + } + + /// @inheritdoc IERC1155 + function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { + _checkAuthorized(_msgSender(), from); + _safeTransferFrom(from, to, id, value, data); + } + + /// @inheritdoc IERC1155 + function safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data + ) public virtual { + _checkAuthorized(_msgSender(), from); + _safeBatchTransferFrom(from, to, ids, values, data); + } + + /// @dev Checks if `operator` is authorized to transfer tokens owned by `owner`. Reverts with {ERC1155MissingApprovalForAll} if not. + function _checkAuthorized(address operator, address owner) internal view virtual { + if (owner != operator && !isApprovedForAll(owner, operator)) { + revert ERC1155MissingApprovalForAll(operator, owner); + } + } + + /** + * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` + * (or `to`) is the zero address. + * + * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} + * or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. + * - `ids` and `values` must have the same length. + * + * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead. + */ + function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual { + if (ids.length != values.length) { + revert ERC1155InvalidArrayLength(ids.length, values.length); + } + + address operator = _msgSender(); + + for (uint256 i = 0; i < ids.length; ++i) { + uint256 id = ids.unsafeMemoryAccess(i); + uint256 value = values.unsafeMemoryAccess(i); + + if (from != address(0)) { + uint256 fromBalance = _balances[id][from]; + if (fromBalance < value) { + revert ERC1155InsufficientBalance(from, fromBalance, value, id); + } + unchecked { + // Overflow not possible: value <= fromBalance + _balances[id][from] = fromBalance - value; + } + } + + if (to != address(0)) { + _balances[id][to] += value; + } + } + + if (ids.length == 1) { + uint256 id = ids.unsafeMemoryAccess(0); + uint256 value = values.unsafeMemoryAccess(0); + emit TransferSingle(operator, from, to, id, value); + } else { + emit TransferBatch(operator, from, to, ids, values); + } + } + + /** + * @dev Version of {_update} that performs the token acceptance check by calling + * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it + * contains code (eg. is a smart contract at the moment of execution). + * + * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any + * update to the contract state after this function would break the check-effect-interaction pattern. Consider + * overriding {_update} instead. + * + * NOTE: This version is kept for backward compatibility. We recommend calling the alternative version with a boolean + * flag in order to achieve better control over which hook to call. + */ + function _updateWithAcceptanceCheck( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data + ) internal virtual { + _updateWithAcceptanceCheck(from, to, ids, values, data, ids.length != 1); + } + + /** + * @dev Version of {_update} that performs the token acceptance check by calling + * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it + * contains code (eg. is a smart contract at the moment of execution). + * + * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any + * update to the contract state after this function would break the check-effect-interaction pattern. Consider + * overriding {_update} instead. + */ + function _updateWithAcceptanceCheck( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data, + bool batch + ) internal virtual { + _update(from, to, ids, values); + if (to != address(0)) { + address operator = _msgSender(); + if (batch) { + ERC1155Utils.checkOnERC1155BatchReceived(operator, from, to, ids, values, data); + } else { + uint256 id = ids.unsafeMemoryAccess(0); + uint256 value = values.unsafeMemoryAccess(0); + ERC1155Utils.checkOnERC1155Received(operator, from, to, id, value, data); + } + } + } + + /** + * @dev Transfers a `value` tokens of token type `id` from `from` to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `from` must have a balance of tokens of type `id` of at least `value` amount. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); + _updateWithAcceptanceCheck(from, to, ids, values, data, false); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + * - `ids` and `values` must have the same length. + */ + function _safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data + ) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + _updateWithAcceptanceCheck(from, to, ids, values, data, true); + } + + /** + * @dev Sets a new URI for all token types, by relying on the token type ID + * substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the ERC]. + * + * By this mechanism, any occurrence of the `\{id\}` substring in either the + * URI or any of the values in the JSON file at said URI will be replaced by + * clients with the token type ID. + * + * For example, the `https://token-cdn-domain/\{id\}.json` URI would be + * interpreted by clients as + * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` + * for token type ID 0x4cce0. + * + * See {uri}. + * + * Because these URIs cannot be meaningfully represented by the {URI} event, + * this function emits no events. + */ + function _setURI(string memory newuri) internal virtual { + _uri = newuri; + } + + /** + * @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _mint(address to, uint256 id, uint256 value, bytes memory data) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); + _updateWithAcceptanceCheck(address(0), to, ids, values, data, false); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `values` must have the same length. + * - `to` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + _updateWithAcceptanceCheck(address(0), to, ids, values, data, true); + } + + /** + * @dev Destroys a `value` amount of tokens of type `id` from `from` + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `from` must have at least `value` amount of tokens of type `id`. + */ + function _burn(address from, uint256 id, uint256 value) internal { + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); + _updateWithAcceptanceCheck(from, address(0), ids, values, "", false); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `from` must have at least `value` amount of tokens of type `id`. + * - `ids` and `values` must have the same length. + */ + function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal { + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + _updateWithAcceptanceCheck(from, address(0), ids, values, "", true); + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Emits an {ApprovalForAll} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `operator` cannot be the zero address. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + if (owner == address(0)) { + revert ERC1155InvalidApprover(address(0)); + } + if (operator == address(0)) { + revert ERC1155InvalidOperator(address(0)); + } + _operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Creates an array in memory with only one value for each of the elements provided. + */ + function _asSingletonArrays( + uint256 element1, + uint256 element2 + ) private pure returns (uint256[] memory array1, uint256[] memory array2) { + assembly ("memory-safe") { + // Load the free memory pointer + array1 := mload(0x40) + // Set array length to 1 + mstore(array1, 1) + // Store the single element at the next word after the length (where content starts) + mstore(add(array1, 0x20), element1) + + // Repeat for next array locating it right after the first array + array2 := add(array1, 0x40) + mstore(array2, 1) + mstore(add(array2, 0x20), element2) + + // Update the free memory pointer by pointing after the second array + mstore(0x40, add(array2, 0x40)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/IERC1155.sol similarity index 66% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/IERC1155.sol index 3446e604..f0170845 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/IERC1155.sol @@ -1,19 +1,17 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC1155/IERC1155.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../../utils/introspection/IERC165.sol"; +import {IERC165} from "../../utils/introspection/IERC165.sol"; /** - * @dev Required interface of an ERC1155 compliant contract, as defined in the - * https://eips.ethereum.org/EIPS/eip-1155[EIP]. - * - * _Available since v3.1._ + * @dev Required interface of an ERC-1155 compliant contract, as defined in the + * https://eips.ethereum.org/EIPS/eip-1155[ERC]. */ interface IERC1155 is IERC165 { /** - * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. + * @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); @@ -45,11 +43,7 @@ interface IERC1155 is IERC165 { event URI(string value, uint256 indexed id); /** - * @dev Returns the amount of tokens of token type `id` owned by `account`. - * - * Requirements: - * - * - `account` cannot be the zero address. + * @dev Returns the value of tokens of token type `id` owned by `account`. */ function balanceOf(address account, uint256 id) external view returns (uint256); @@ -72,7 +66,7 @@ interface IERC1155 is IERC165 { * * Requirements: * - * - `operator` cannot be the caller. + * - `operator` cannot be the zero address. */ function setApprovalForAll(address operator, bool approved) external; @@ -84,7 +78,12 @@ interface IERC1155 is IERC165 { function isApprovedForAll(address account, address operator) external view returns (bool); /** - * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. + * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. + * + * WARNING: This function can potentially allow a reentrancy attack when transferring tokens + * to an untrusted contract, when invoking {IERC1155Receiver-onERC1155Received} on the receiver. + * Ensure to follow the checks-effects-interactions pattern and consider employing + * reentrancy guards when interacting with untrusted contracts. * * Emits a {TransferSingle} event. * @@ -92,20 +91,25 @@ interface IERC1155 is IERC165 { * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. - * - `from` must have a balance of tokens of type `id` of at least `amount`. + * - `from` must have a balance of tokens of type `id` of at least `value` amount. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ - function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; + function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * - * Emits a {TransferBatch} event. + * WARNING: This function can potentially allow a reentrancy attack when transferring tokens + * to an untrusted contract, when invoking {IERC1155Receiver-onERC1155BatchReceived} on the receiver. + * Ensure to follow the checks-effects-interactions pattern and consider employing + * reentrancy guards when interacting with untrusted contracts. + * + * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * - * - `ids` and `amounts` must have the same length. + * - `ids` and `values` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ @@ -113,7 +117,7 @@ interface IERC1155 is IERC165 { address from, address to, uint256[] calldata ids, - uint256[] calldata amounts, + uint256[] calldata values, bytes calldata data ) external; } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155Receiver.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/IERC1155Receiver.sol similarity index 83% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155Receiver.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/IERC1155Receiver.sol index 0dd271d0..f27b8976 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/IERC1155Receiver.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/IERC1155Receiver.sol @@ -1,16 +1,17 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC1155/IERC1155Receiver.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../../utils/introspection/IERC165.sol"; +import {IERC165} from "../../utils/introspection/IERC165.sol"; /** - * @dev _Available since v3.1._ + * @dev Interface that must be implemented by smart contracts in order to receive + * ERC-1155 token transfers. */ interface IERC1155Receiver is IERC165 { /** - * @dev Handles the receipt of a single ERC1155 token type. This function is + * @dev Handles the receipt of a single ERC-1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return @@ -33,7 +34,7 @@ interface IERC1155Receiver is IERC165 { ) external returns (bytes4); /** - * @dev Handles the receipt of a multiple ERC1155 token types. This function + * @dev Handles the receipt of a multiple ERC-1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Burnable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Burnable.sol similarity index 52% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Burnable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Burnable.sol index 9ee37198..41d36bd7 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Burnable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Burnable.sol @@ -1,31 +1,27 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC1155/extensions/ERC1155Burnable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../ERC1155.sol"; +import {ERC1155} from "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. - * - * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn(address account, uint256 id, uint256 value) public virtual { - require( - account == _msgSender() || isApprovedForAll(account, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); + if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) { + revert ERC1155MissingApprovalForAll(_msgSender(), account); + } _burn(account, id, value); } function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { - require( - account == _msgSender() || isApprovedForAll(account, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); + if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) { + revert ERC1155MissingApprovalForAll(_msgSender(), account); + } _burnBatch(account, ids, values); } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Pausable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Pausable.sol similarity index 56% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Pausable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Pausable.sol index 07bb3901..03a3d62f 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155Pausable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Pausable.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC1155/extensions/ERC1155Pausable.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC1155/extensions/ERC1155Pausable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../ERC1155.sol"; -import "../../../security/Pausable.sol"; +import {ERC1155} from "../ERC1155.sol"; +import {Pausable} from "../../../utils/Pausable.sol"; /** - * @dev ERC1155 token with pausable token transfers, minting and burning. + * @dev ERC-1155 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the @@ -17,28 +17,22 @@ import "../../../security/Pausable.sol"; * addition to inheriting this contract, you must define both functions, invoking the * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will - * make the contract unpausable. - * - * _Available since v3.1._ + * make the contract pause mechanism of the contract unreachable, and thus unusable. */ abstract contract ERC1155Pausable is ERC1155, Pausable { /** - * @dev See {ERC1155-_beforeTokenTransfer}. + * @dev See {ERC1155-_update}. * * Requirements: * * - the contract must not be paused. */ - function _beforeTokenTransfer( - address operator, + function _update( address from, address to, uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual override { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - - require(!paused(), "ERC1155Pausable: token transfer while paused"); + uint256[] memory values + ) internal virtual override whenNotPaused { + super._update(from, to, ids, values); } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Supply.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Supply.sol new file mode 100644 index 00000000..623b14f4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155Supply.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) + +pragma solidity ^0.8.24; + +import {ERC1155} from "../ERC1155.sol"; +import {Arrays} from "../../../utils/Arrays.sol"; + +/** + * @dev Extension of ERC-1155 that adds tracking of total supply per id. + * + * Useful for scenarios where Fungible and Non-fungible tokens have to be + * clearly identified. Note: While a `totalSupply` of 1 may mean the + * corresponding token is an NFT, there are no inherent guarantees that + * no more tokens with the same id will be minted in future. + * + * NOTE: This contract implies a global limit of 2**256 - 1 to the number of tokens + * that can be minted. + * + * CAUTION: This extension should not be added in an upgrade to an already deployed contract. + */ +abstract contract ERC1155Supply is ERC1155 { + using Arrays for uint256[]; + + mapping(uint256 id => uint256) private _totalSupply; + uint256 private _totalSupplyAll; + + /** + * @dev Total value of tokens with a given id. + */ + function totalSupply(uint256 id) public view virtual returns (uint256) { + return _totalSupply[id]; + } + + /** + * @dev Total value of tokens. + */ + function totalSupply() public view virtual returns (uint256) { + return _totalSupplyAll; + } + + /** + * @dev Indicates whether any tokens exist with a given id, or not. + */ + function exists(uint256 id) public view virtual returns (bool) { + return totalSupply(id) > 0; + } + + /// @inheritdoc ERC1155 + function _update( + address from, + address to, + uint256[] memory ids, + uint256[] memory values + ) internal virtual override { + super._update(from, to, ids, values); + + if (from == address(0)) { + uint256 totalMintValue = 0; + for (uint256 i = 0; i < ids.length; ++i) { + uint256 value = values.unsafeMemoryAccess(i); + // Overflow check required: The rest of the code assumes that totalSupply never overflows + _totalSupply[ids.unsafeMemoryAccess(i)] += value; + totalMintValue += value; + } + // Overflow check required: The rest of the code assumes that totalSupplyAll never overflows + _totalSupplyAll += totalMintValue; + } + + if (to == address(0)) { + uint256 totalBurnValue = 0; + for (uint256 i = 0; i < ids.length; ++i) { + uint256 value = values.unsafeMemoryAccess(i); + + unchecked { + // Overflow not possible: values[i] <= balanceOf(from, ids[i]) <= totalSupply(ids[i]) + _totalSupply[ids.unsafeMemoryAccess(i)] -= value; + // Overflow not possible: sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll + totalBurnValue += value; + } + } + unchecked { + // Overflow not possible: totalBurnValue = sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll + _totalSupplyAll -= totalBurnValue; + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155URIStorage.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155URIStorage.sol similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155URIStorage.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155URIStorage.sol index 623504f3..ca1978aa 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/ERC1155URIStorage.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/ERC1155URIStorage.sol @@ -1,25 +1,20 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../../../utils/Strings.sol"; -import "../ERC1155.sol"; +import {ERC1155} from "../ERC1155.sol"; /** - * @dev ERC1155 token with storage based token URI management. - * Inspired by the ERC721URIStorage extension - * - * _Available since v4.6._ + * @dev ERC-1155 token with storage based token URI management. + * Inspired by the {ERC721URIStorage} extension */ abstract contract ERC1155URIStorage is ERC1155 { - using Strings for uint256; - // Optional base URI string private _baseURI = ""; // Optional mapping for token URIs - mapping(uint256 => string) private _tokenURIs; + mapping(uint256 tokenId => string) private _tokenURIs; /** * @dev See {IERC1155MetadataURI-uri}. @@ -42,8 +37,8 @@ abstract contract ERC1155URIStorage is ERC1155 { function uri(uint256 tokenId) public view virtual override returns (string memory) { string memory tokenURI = _tokenURIs[tokenId]; - // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). - return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); + // If token URI is set, concatenate base URI and tokenURI (via string.concat). + return bytes(tokenURI).length > 0 ? string.concat(_baseURI, tokenURI) : super.uri(tokenId); } /** diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/IERC1155MetadataURI.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/IERC1155MetadataURI.sol similarity index 73% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/IERC1155MetadataURI.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/IERC1155MetadataURI.sol index 520a2971..501d8551 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/extensions/IERC1155MetadataURI.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/extensions/IERC1155MetadataURI.sol @@ -1,15 +1,13 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../IERC1155.sol"; +import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined - * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. - * - * _Available since v3.1._ + * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[ERC]. */ interface IERC1155MetadataURI is IERC1155 { /** diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Holder.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/utils/ERC1155Holder.sol similarity index 50% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Holder.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/utils/ERC1155Holder.sol index 7249de84..329f8234 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC1155/utils/ERC1155Holder.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/utils/ERC1155Holder.sol @@ -1,19 +1,25 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC1155/utils/ERC1155Holder.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./ERC1155Receiver.sol"; +import {IERC165, ERC165} from "../../../utils/introspection/ERC165.sol"; +import {IERC1155Receiver} from "../IERC1155Receiver.sol"; /** - * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. + * @dev Simple implementation of `IERC1155Receiver` that will allow a contract to hold ERC-1155 tokens. * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. * - * @dev _Available since v3.1._ + * @custom:stateless */ -contract ERC1155Holder is ERC1155Receiver { +abstract contract ERC1155Holder is ERC165, IERC1155Receiver { + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); + } + function onERC1155Received( address, address, diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/utils/ERC1155Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/utils/ERC1155Utils.sol new file mode 100644 index 00000000..03cb0f0b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC1155/utils/ERC1155Utils.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC1155/utils/ERC1155Utils.sol) + +pragma solidity ^0.8.20; + +import {IERC1155Receiver} from "../IERC1155Receiver.sol"; +import {IERC1155Errors} from "../../../interfaces/draft-IERC6093.sol"; + +/** + * @dev Library that provide common ERC-1155 utility functions. + * + * See https://eips.ethereum.org/EIPS/eip-1155[ERC-1155]. + * + * _Available since v5.1._ + */ +library ERC1155Utils { + /** + * @dev Performs an acceptance check for the provided `operator` by calling {IERC1155Receiver-onERC1155Received} + * on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`). + * + * The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA). + * Otherwise, the recipient must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value to accept + * the transfer. + */ + function checkOnERC1155Received( + address operator, + address from, + address to, + uint256 id, + uint256 value, + bytes memory data + ) internal { + if (to.code.length > 0) { + try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) { + if (response != IERC1155Receiver.onERC1155Received.selector) { + // Tokens rejected + revert IERC1155Errors.ERC1155InvalidReceiver(to); + } + } catch (bytes memory reason) { + if (reason.length == 0) { + // non-IERC1155Receiver implementer + revert IERC1155Errors.ERC1155InvalidReceiver(to); + } else { + assembly ("memory-safe") { + revert(add(reason, 0x20), mload(reason)) + } + } + } + } + } + + /** + * @dev Performs a batch acceptance check for the provided `operator` by calling {IERC1155Receiver-onERC1155BatchReceived} + * on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`). + * + * The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA). + * Otherwise, the recipient must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value to accept + * the transfer. + */ + function checkOnERC1155BatchReceived( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data + ) internal { + if (to.code.length > 0) { + try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns ( + bytes4 response + ) { + if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { + // Tokens rejected + revert IERC1155Errors.ERC1155InvalidReceiver(to); + } + } catch (bytes memory reason) { + if (reason.length == 0) { + // non-IERC1155Receiver implementer + revert IERC1155Errors.ERC1155InvalidReceiver(to); + } else { + assembly ("memory-safe") { + revert(add(reason, 0x20), mload(reason)) + } + } + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/ERC20.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/ERC20.sol new file mode 100644 index 00000000..4d9d6b6d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/ERC20.sol @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/ERC20.sol) + +pragma solidity ^0.8.20; + +import {IERC20} from "./IERC20.sol"; +import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; +import {Context} from "../../utils/Context.sol"; +import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * + * TIP: For a detailed writeup see our guide + * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * The default value of {decimals} is 18. To change this, you should override + * this function so it returns a different value. + * + * We have followed general OpenZeppelin Contracts guidelines: functions revert + * instead returning `false` on failure. This behavior is nonetheless + * conventional and does not conflict with the expectations of ERC-20 + * applications. + */ +abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { + mapping(address account => uint256) private _balances; + + mapping(address account => mapping(address spender => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + + /** + * @dev Sets the values for {name} and {symbol}. + * + * Both values are immutable: they can only be set once during construction. + */ + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view virtual returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view virtual returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5.05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the default value returned by this function, unless + * it's overridden. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view virtual returns (uint8) { + return 18; + } + + /// @inheritdoc IERC20 + function totalSupply() public view virtual returns (uint256) { + return _totalSupply; + } + + /// @inheritdoc IERC20 + function balanceOf(address account) public view virtual returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - the caller must have a balance of at least `value`. + */ + function transfer(address to, uint256 value) public virtual returns (bool) { + address owner = _msgSender(); + _transfer(owner, to, value); + return true; + } + + /// @inheritdoc IERC20 + function allowance(address owner, address spender) public view virtual returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on + * `transferFrom`. This is semantically equivalent to an infinite approval. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 value) public virtual returns (bool) { + address owner = _msgSender(); + _approve(owner, spender, value); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Skips emitting an {Approval} event indicating an allowance update. This is not + * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. + * + * NOTE: Does not update the allowance if the current allowance + * is the maximum `uint256`. + * + * Requirements: + * + * - `from` and `to` cannot be the zero address. + * - `from` must have a balance of at least `value`. + * - the caller must have allowance for ``from``'s tokens of at least + * `value`. + */ + function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { + address spender = _msgSender(); + _spendAllowance(from, spender, value); + _transfer(from, to, value); + return true; + } + + /** + * @dev Moves a `value` amount of tokens from `from` to `to`. + * + * This internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _transfer(address from, address to, uint256 value) internal { + if (from == address(0)) { + revert ERC20InvalidSender(address(0)); + } + if (to == address(0)) { + revert ERC20InvalidReceiver(address(0)); + } + _update(from, to, value); + } + + /** + * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` + * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding + * this function. + * + * Emits a {Transfer} event. + */ + function _update(address from, address to, uint256 value) internal virtual { + if (from == address(0)) { + // Overflow check required: The rest of the code assumes that totalSupply never overflows + _totalSupply += value; + } else { + uint256 fromBalance = _balances[from]; + if (fromBalance < value) { + revert ERC20InsufficientBalance(from, fromBalance, value); + } + unchecked { + // Overflow not possible: value <= fromBalance <= totalSupply. + _balances[from] = fromBalance - value; + } + } + + if (to == address(0)) { + unchecked { + // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. + _totalSupply -= value; + } + } else { + unchecked { + // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. + _balances[to] += value; + } + } + + emit Transfer(from, to, value); + } + + /** + * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). + * Relies on the `_update` mechanism + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _mint(address account, uint256 value) internal { + if (account == address(0)) { + revert ERC20InvalidReceiver(address(0)); + } + _update(address(0), account, value); + } + + /** + * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead + */ + function _burn(address account, uint256 value) internal { + if (account == address(0)) { + revert ERC20InvalidSender(address(0)); + } + _update(account, address(0), value); + } + + /** + * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens. + * + * This internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + * + * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. + */ + function _approve(address owner, address spender, uint256 value) internal { + _approve(owner, spender, value, true); + } + + /** + * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. + * + * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by + * `_spendAllowance` during the `transferFrom` operation sets the flag to false. This saves gas by not emitting any + * `Approval` event during `transferFrom` operations. + * + * Anyone who wishes to continue emitting `Approval` events on the `transferFrom` operation can force the flag to + * true using the following override: + * + * ```solidity + * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { + * super._approve(owner, spender, value, true); + * } + * ``` + * + * Requirements are the same as {_approve}. + */ + function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { + if (owner == address(0)) { + revert ERC20InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC20InvalidSpender(address(0)); + } + _allowances[owner][spender] = value; + if (emitEvent) { + emit Approval(owner, spender, value); + } + } + + /** + * @dev Updates `owner`'s allowance for `spender` based on spent `value`. + * + * Does not update the allowance value in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Does not emit an {Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 value) internal virtual { + uint256 currentAllowance = allowance(owner, spender); + if (currentAllowance < type(uint256).max) { + if (currentAllowance < value) { + revert ERC20InsufficientAllowance(spender, currentAllowance, value); + } + unchecked { + _approve(owner, spender, currentAllowance - value, false); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/IERC20.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/IERC20.sol similarity index 69% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/IERC20.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/IERC20.sol index 6d5b4e9f..b493743a 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/IERC20.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/IERC20.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; /** - * @dev Interface of the ERC20 standard as defined in the EIP. + * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** @@ -22,23 +22,23 @@ interface IERC20 { event Approval(address indexed owner, address indexed spender, uint256 value); /** - * @dev Returns the amount of tokens in existence. + * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** - * @dev Returns the amount of tokens owned by `account`. + * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** - * @dev Moves `amount` tokens from the caller's account to `to`. + * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ - function transfer(address to, uint256 amount) external returns (bool); + function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be @@ -50,7 +50,8 @@ interface IERC20 { function allowance(address owner, address spender) external view returns (uint256); /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * @dev Sets a `value` amount of tokens as the allowance of `spender` over the + * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * @@ -63,16 +64,16 @@ interface IERC20 { * * Emits an {Approval} event. */ - function approve(address spender, uint256 amount) external returns (bool); + function approve(address spender, uint256 value) external returns (bool); /** - * @dev Moves `amount` tokens from `from` to `to` using the - * allowance mechanism. `amount` is then deducted from the caller's + * @dev Moves a `value` amount of tokens from `from` to `to` using the + * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ - function transferFrom(address from, address to, uint256 amount) external returns (bool); + function transferFrom(address from, address to, uint256 value) external returns (bool); } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC1363.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC1363.sol new file mode 100644 index 00000000..3b3dbba7 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC1363.sol @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC1363.sol) + +pragma solidity ^0.8.20; + +import {ERC20} from "../ERC20.sol"; +import {IERC165, ERC165} from "../../../utils/introspection/ERC165.sol"; +import {IERC1363} from "../../../interfaces/IERC1363.sol"; +import {ERC1363Utils} from "../utils/ERC1363Utils.sol"; + +/** + * @title ERC1363 + * @dev Extension of {ERC20} tokens that adds support for code execution after transfers and approvals + * on recipient contracts. Calls after transfers are enabled through the {ERC1363-transferAndCall} and + * {ERC1363-transferFromAndCall} methods while calls after approvals can be made with {ERC1363-approveAndCall} + * + * _Available since v5.1._ + */ +abstract contract ERC1363 is ERC20, ERC165, IERC1363 { + /** + * @dev Indicates a failure within the {transfer} part of a transferAndCall operation. + * @param receiver Address to which tokens are being transferred. + * @param value Amount of tokens to be transferred. + */ + error ERC1363TransferFailed(address receiver, uint256 value); + + /** + * @dev Indicates a failure within the {transferFrom} part of a transferFromAndCall operation. + * @param sender Address from which to send tokens. + * @param receiver Address to which tokens are being transferred. + * @param value Amount of tokens to be transferred. + */ + error ERC1363TransferFromFailed(address sender, address receiver, uint256 value); + + /** + * @dev Indicates a failure within the {approve} part of a approveAndCall operation. + * @param spender Address which will spend the funds. + * @param value Amount of tokens to be spent. + */ + error ERC1363ApproveFailed(address spender, uint256 value); + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return interfaceId == type(IERC1363).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Moves a `value` amount of tokens from the caller's account to `to` + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. Returns a flag that indicates + * if the call succeeded. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `to` must implement the {IERC1363Receiver} interface. + * - The target must return the {IERC1363Receiver-onTransferReceived} selector to accept the transfer. + * - The internal {transfer} must succeed (returned `true`). + */ + function transferAndCall(address to, uint256 value) public returns (bool) { + return transferAndCall(to, value, ""); + } + + /** + * @dev Variant of {transferAndCall} that accepts an additional `data` parameter with + * no specified format. + */ + function transferAndCall(address to, uint256 value, bytes memory data) public virtual returns (bool) { + if (!transfer(to, value)) { + revert ERC1363TransferFailed(to, value); + } + ERC1363Utils.checkOnERC1363TransferReceived(_msgSender(), _msgSender(), to, value, data); + return true; + } + + /** + * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. Returns a flag that indicates + * if the call succeeded. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `to` must implement the {IERC1363Receiver} interface. + * - The target must return the {IERC1363Receiver-onTransferReceived} selector to accept the transfer. + * - The internal {transferFrom} must succeed (returned `true`). + */ + function transferFromAndCall(address from, address to, uint256 value) public returns (bool) { + return transferFromAndCall(from, to, value, ""); + } + + /** + * @dev Variant of {transferFromAndCall} that accepts an additional `data` parameter with + * no specified format. + */ + function transferFromAndCall( + address from, + address to, + uint256 value, + bytes memory data + ) public virtual returns (bool) { + if (!transferFrom(from, to, value)) { + revert ERC1363TransferFromFailed(from, to, value); + } + ERC1363Utils.checkOnERC1363TransferReceived(_msgSender(), from, to, value, data); + return true; + } + + /** + * @dev Sets a `value` amount of tokens as the allowance of `spender` over the + * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. + * Returns a flag that indicates if the call succeeded. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `spender` must implement the {IERC1363Spender} interface. + * - The target must return the {IERC1363Spender-onApprovalReceived} selector to accept the approval. + * - The internal {approve} must succeed (returned `true`). + */ + function approveAndCall(address spender, uint256 value) public returns (bool) { + return approveAndCall(spender, value, ""); + } + + /** + * @dev Variant of {approveAndCall} that accepts an additional `data` parameter with + * no specified format. + */ + function approveAndCall(address spender, uint256 value, bytes memory data) public virtual returns (bool) { + if (!approve(spender, value)) { + revert ERC1363ApproveFailed(spender, value); + } + ERC1363Utils.checkOnERC1363ApprovalReceived(_msgSender(), spender, value, data); + return true; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Burnable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Burnable.sol new file mode 100644 index 00000000..4d482d8e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Burnable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) + +pragma solidity ^0.8.20; + +import {ERC20} from "../ERC20.sol"; +import {Context} from "../../../utils/Context.sol"; + +/** + * @dev Extension of {ERC20} that allows token holders to destroy both their own + * tokens and those that they have an allowance for, in a way that can be + * recognized off-chain (via event analysis). + */ +abstract contract ERC20Burnable is Context, ERC20 { + /** + * @dev Destroys a `value` amount of tokens from the caller. + * + * See {ERC20-_burn}. + */ + function burn(uint256 value) public virtual { + _burn(_msgSender(), value); + } + + /** + * @dev Destroys a `value` amount of tokens from `account`, deducting from + * the caller's allowance. + * + * See {ERC20-_burn} and {ERC20-allowance}. + * + * Requirements: + * + * - the caller must have allowance for ``accounts``'s tokens of at least + * `value`. + */ + function burnFrom(address account, uint256 value) public virtual { + _spendAllowance(account, _msgSender(), value); + _burn(account, value); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Capped.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Capped.sol new file mode 100644 index 00000000..c6d09003 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Capped.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC20Capped.sol) + +pragma solidity ^0.8.20; + +import {ERC20} from "../ERC20.sol"; + +/** + * @dev Extension of {ERC20} that adds a cap to the supply of tokens. + */ +abstract contract ERC20Capped is ERC20 { + uint256 private immutable _cap; + + /** + * @dev Total supply cap has been exceeded. + */ + error ERC20ExceededCap(uint256 increasedSupply, uint256 cap); + + /** + * @dev The supplied cap is not a valid cap. + */ + error ERC20InvalidCap(uint256 cap); + + /** + * @dev Sets the value of the `cap`. This value is immutable, it can only be + * set once during construction. + */ + constructor(uint256 cap_) { + if (cap_ == 0) { + revert ERC20InvalidCap(0); + } + _cap = cap_; + } + + /** + * @dev Returns the cap on the token's total supply. + */ + function cap() public view virtual returns (uint256) { + return _cap; + } + + /// @inheritdoc ERC20 + function _update(address from, address to, uint256 value) internal virtual override { + super._update(from, to, value); + + if (from == address(0)) { + uint256 maxSupply = cap(); + uint256 supply = totalSupply(); + if (supply > maxSupply) { + revert ERC20ExceededCap(supply, maxSupply); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Crosschain.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Crosschain.sol new file mode 100644 index 00000000..aeada86e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Crosschain.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20Crosschain.sol) + +pragma solidity ^0.8.26; + +import {ERC20} from "../ERC20.sol"; +import {BridgeFungible} from "../../../crosschain/bridges/abstract/BridgeFungible.sol"; + +/** + * @dev Extension of {ERC20} that makes it natively cross-chain using the ERC-7786 based {BridgeFungible}. + * + * This extension makes the token compatible with counterparts on other chains, which can be: + * * {ERC20Crosschain} instances, + * * {ERC20} instances that are bridged using {BridgeERC20}, + * * {ERC20Bridgeable} instances that are bridged using {BridgeERC7802}. + * + * It is mostly equivalent to inheriting from both {ERC20Bridgeable} and {BridgeERC7802}, and configuring them such + * that: + * * `token` (on the {BridgeERC7802} side) is `address(this)`, + * * `_checkTokenBridge` (on the {ERC20Bridgeable} side) is implemented such that it only accepts self-calls. + */ +// slither-disable-next-line locked-ether +abstract contract ERC20Crosschain is ERC20, BridgeFungible { + /// @dev Variant of {crosschainTransfer} that allows an authorized account (using ERC20 allowance) to operate on `from`'s assets. + function crosschainTransferFrom(address from, bytes memory to, uint256 amount) public virtual returns (bytes32) { + _spendAllowance(from, _msgSender(), amount); + return _crosschainTransfer(from, to, amount); + } + + /// @dev "Locking" tokens is achieved through burning + function _onSend(address from, uint256 amount) internal virtual override { + _burn(from, amount); + } + + /// @dev "Unlocking" tokens is achieved through minting + function _onReceive(address to, uint256 amount) internal virtual override { + _mint(to, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20FlashMint.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20FlashMint.sol similarity index 51% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20FlashMint.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20FlashMint.sol index 063fe99f..f3ed94f3 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20FlashMint.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20FlashMint.sol @@ -1,31 +1,53 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/ERC20FlashMint.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20FlashMint.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../../../interfaces/IERC3156FlashBorrower.sol"; -import "../../../interfaces/IERC3156FlashLender.sol"; -import "../ERC20.sol"; +import {IERC3156FlashBorrower} from "../../../interfaces/IERC3156FlashBorrower.sol"; +import {IERC3156FlashLender} from "../../../interfaces/IERC3156FlashLender.sol"; +import {ERC20} from "../ERC20.sol"; /** - * @dev Implementation of the ERC3156 Flash loans extension, as defined in + * @dev Implementation of the ERC-3156 Flash loans extension, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. * * Adds the {flashLoan} method, which provides flash loan support at the token * level. By default there is no fee, but this can be changed by overriding {flashFee}. * - * _Available since v4.1._ + * NOTE: When this extension is used along with the {ERC20Capped} or {ERC20Votes} extensions, + * {maxFlashLoan} will not correctly reflect the maximum that can be flash minted. We recommend + * overriding {maxFlashLoan} so that it correctly reflects the supply cap. */ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender { - bytes32 private constant _RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); + bytes32 private constant RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); + + /** + * @dev The loan token is not valid. + */ + error ERC3156UnsupportedToken(address token); + + /** + * @dev The requested loan exceeds the max loan value for `token`. + */ + error ERC3156ExceededMaxLoan(uint256 maxLoan); + + /** + * @dev The receiver of a flashloan is not a valid {IERC3156FlashBorrower-onFlashLoan} implementer. + */ + error ERC3156InvalidReceiver(address receiver); /** * @dev Returns the maximum amount of tokens available for loan. + * + * NOTE: This function will not automatically detect any supply cap + * added by other extensions, such as {ERC20Capped}. If necessary, + * override this function to take a supply cap into account. + * * @param token The address of the token that is requested. * @return The amount of token that can be loaned. */ - function maxFlashLoan(address token) public view virtual override returns (uint256) { - return token == address(this) ? type(uint256).max - ERC20.totalSupply() : 0; + function maxFlashLoan(address token) public view virtual returns (uint256) { + return token == address(this) ? type(uint256).max - totalSupply() : 0; } /** @@ -33,26 +55,23 @@ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender { * the {_flashFee} function which returns the fee applied when doing flash * loans. * @param token The token to be flash loaned. - * @param amount The amount of tokens to be loaned. + * @param value The amount of tokens to be loaned. * @return The fees applied to the corresponding flash loan. */ - function flashFee(address token, uint256 amount) public view virtual override returns (uint256) { - require(token == address(this), "ERC20FlashMint: wrong token"); - return _flashFee(token, amount); + function flashFee(address token, uint256 value) public view virtual returns (uint256) { + if (token != address(this)) { + revert ERC3156UnsupportedToken(token); + } + return _flashFee(token, value); } /** * @dev Returns the fee applied when doing flash loans. By default this * implementation has 0 fees. This function can be overloaded to make * the flash loan mechanism deflationary. - * @param token The token to be flash loaned. - * @param amount The amount of tokens to be loaned. * @return The fees applied to the corresponding flash loan. */ - function _flashFee(address token, uint256 amount) internal view virtual returns (uint256) { - // silence warning about unused variable without the addition of bytecode. - token; - amount; + function _flashFee(address /*token*/, uint256 /*value*/) internal view virtual returns (uint256) { return 0; } @@ -70,13 +89,13 @@ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender { * @dev Performs a flash loan. New tokens are minted and sent to the * `receiver`, who is required to implement the {IERC3156FlashBorrower} * interface. By the end of the flash loan, the receiver is expected to own - * amount + fee tokens and have them approved back to the token contract itself so + * value + fee tokens and have them approved back to the token contract itself so * they can be burned. * @param receiver The receiver of the flash loan. Should implement the * {IERC3156FlashBorrower-onFlashLoan} interface. * @param token The token to be flash loaned. Only `address(this)` is * supported. - * @param amount The amount of tokens to be loaned. + * @param value The amount of tokens to be loaned. * @param data An arbitrary datafield that is passed to the receiver. * @return `true` if the flash loan was successful. */ @@ -86,22 +105,24 @@ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender { function flashLoan( IERC3156FlashBorrower receiver, address token, - uint256 amount, + uint256 value, bytes calldata data - ) public virtual override returns (bool) { - require(amount <= maxFlashLoan(token), "ERC20FlashMint: amount exceeds maxFlashLoan"); - uint256 fee = flashFee(token, amount); - _mint(address(receiver), amount); - require( - receiver.onFlashLoan(msg.sender, token, amount, fee, data) == _RETURN_VALUE, - "ERC20FlashMint: invalid return value" - ); + ) public virtual returns (bool) { + uint256 maxLoan = maxFlashLoan(token); + if (value > maxLoan) { + revert ERC3156ExceededMaxLoan(maxLoan); + } + uint256 fee = flashFee(token, value); + _mint(address(receiver), value); + if (receiver.onFlashLoan(_msgSender(), token, value, fee, data) != RETURN_VALUE) { + revert ERC3156InvalidReceiver(address(receiver)); + } address flashFeeReceiver = _flashFeeReceiver(); - _spendAllowance(address(receiver), address(this), amount + fee); + _spendAllowance(address(receiver), address(this), value + fee); if (fee == 0 || flashFeeReceiver == address(0)) { - _burn(address(receiver), amount + fee); + _burn(address(receiver), value + fee); } else { - _burn(address(receiver), amount); + _burn(address(receiver), value); _transfer(address(receiver), flashFeeReceiver, fee); } return true; diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Pausable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Pausable.sol similarity index 58% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Pausable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Pausable.sol index 3b2b6329..2f6d86c4 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/ERC20Pausable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Pausable.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol) +// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC20Pausable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../ERC20.sol"; -import "../../../security/Pausable.sol"; +import {ERC20} from "../ERC20.sol"; +import {Pausable} from "../../../utils/Pausable.sol"; /** - * @dev ERC20 token with pausable token transfers, minting and burning. + * @dev ERC-20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the @@ -17,19 +17,17 @@ import "../../../security/Pausable.sol"; * addition to inheriting this contract, you must define both functions, invoking the * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will - * make the contract unpausable. + * make the contract pause mechanism of the contract unreachable, and thus unusable. */ abstract contract ERC20Pausable is ERC20, Pausable { /** - * @dev See {ERC20-_beforeTokenTransfer}. + * @dev See {ERC20-_update}. * * Requirements: * * - the contract must not be paused. */ - function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { - super._beforeTokenTransfer(from, to, amount); - - require(!paused(), "ERC20Pausable: token transfer while paused"); + function _update(address from, address to, uint256 value) internal virtual override whenNotPaused { + super._update(from, to, value); } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Permit.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Permit.sol new file mode 100644 index 00000000..77e79659 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Permit.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Permit.sol) + +pragma solidity ^0.8.24; + +import {IERC20Permit} from "./IERC20Permit.sol"; +import {ERC20} from "../ERC20.sol"; +import {ECDSA} from "../../../utils/cryptography/ECDSA.sol"; +import {EIP712} from "../../../utils/cryptography/EIP712.sol"; +import {Nonces} from "../../../utils/Nonces.sol"; + +/** + * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. + * + * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by + * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't + * need to send a transaction, and thus is not required to hold Ether at all. + */ +abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { + bytes32 private constant PERMIT_TYPEHASH = + keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); + + /** + * @dev Permit deadline has expired. + */ + error ERC2612ExpiredSignature(uint256 deadline); + + /** + * @dev Mismatched signature. + */ + error ERC2612InvalidSigner(address signer, address owner); + + /** + * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. + * + * It's a good idea to use the same `name` that is defined as the ERC-20 token name. + */ + constructor(string memory name) EIP712(name, "1") {} + + /// @inheritdoc IERC20Permit + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual { + if (block.timestamp > deadline) { + revert ERC2612ExpiredSignature(deadline); + } + + bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); + + bytes32 hash = _hashTypedDataV4(structHash); + + address signer = ECDSA.recover(hash, v, r, s); + if (signer != owner) { + revert ERC2612InvalidSigner(signer, owner); + } + + _approve(owner, spender, value); + } + + /// @inheritdoc IERC20Permit + function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { + return super.nonces(owner); + } + + /// @inheritdoc IERC20Permit + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view returns (bytes32) { + return _domainSeparatorV4(); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Votes.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Votes.sol new file mode 100644 index 00000000..227f0d88 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Votes.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Votes.sol) + +pragma solidity ^0.8.24; + +import {ERC20} from "../ERC20.sol"; +import {Votes} from "../../../governance/utils/Votes.sol"; +import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; + +/** + * @dev Extension of ERC-20 to support Compound-like voting and delegation. This version is more generic than Compound's, + * and supports token supply up to 2^208^ - 1, while COMP is limited to 2^96^ - 1. + * + * NOTE: This contract does not provide interface compatibility with Compound's COMP token. + * + * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either + * by calling the {Votes-delegate} function directly, or by providing a signature to be used with {Votes-delegateBySig}. Voting + * power can be queried through the public accessors {Votes-getVotes} and {Votes-getPastVotes}. + * + * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it + * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. + */ +abstract contract ERC20Votes is ERC20, Votes { + /** + * @dev Total supply cap has been exceeded, introducing a risk of votes overflowing. + */ + error ERC20ExceededSafeSupply(uint256 increasedSupply, uint256 cap); + + /** + * @dev Maximum token supply. Defaults to `type(uint208).max` (2^208^ - 1). + * + * This maximum is enforced in {_update}. It limits the total supply of the token, which is otherwise a uint256, + * so that checkpoints can be stored in the Trace208 structure used by {Votes}. Increasing this value will not + * remove the underlying limitation, and will cause {_update} to fail because of a math overflow in + * {Votes-_transferVotingUnits}. An override could be used to further restrict the total supply (to a lower value) if + * additional logic requires it. When resolving override conflicts on this function, the minimum should be + * returned. + */ + function _maxSupply() internal view virtual returns (uint256) { + return type(uint208).max; + } + + /** + * @dev Move voting power when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _update(address from, address to, uint256 value) internal virtual override { + super._update(from, to, value); + if (from == address(0)) { + uint256 supply = totalSupply(); + uint256 cap = _maxSupply(); + if (supply > cap) { + revert ERC20ExceededSafeSupply(supply, cap); + } + } + _transferVotingUnits(from, to, value); + } + + /** + * @dev Returns the voting units of an `account`. + * + * WARNING: Overriding this function may compromise the internal vote accounting. + * `ERC20Votes` assumes tokens map to voting units 1:1 and this is not easy to change. + */ + function _getVotingUnits(address account) internal view virtual override returns (uint256) { + return balanceOf(account); + } + + /** + * @dev Get number of checkpoints for `account`. + */ + function numCheckpoints(address account) public view virtual returns (uint32) { + return _numCheckpoints(account); + } + + /** + * @dev Get the `pos`-th checkpoint for `account`. + */ + function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoints.Checkpoint208 memory) { + return _checkpoints(account, pos); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Wrapper.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Wrapper.sol new file mode 100644 index 00000000..4e909d0d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC20Wrapper.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20Wrapper.sol) + +pragma solidity ^0.8.20; + +import {IERC20, IERC20Metadata, ERC20} from "../ERC20.sol"; +import {SafeERC20} from "../utils/SafeERC20.sol"; + +/** + * @dev Extension of the ERC-20 token contract to support token wrapping. + * + * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful + * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the + * wrapping of an existing "basic" ERC-20 into a governance token. + * + * WARNING: Any mechanism in which the underlying token changes the {balanceOf} of an account without an explicit transfer + * may desynchronize this contract's supply and its underlying balance. Please exercise caution when wrapping tokens that + * may undercollateralize the wrapper (i.e. wrapper's total supply is higher than its underlying balance). See {_recover} + * for recovering value accrued to the wrapper. + */ +abstract contract ERC20Wrapper is ERC20 { + IERC20 private immutable _underlying; + + /** + * @dev The underlying token couldn't be wrapped. + */ + error ERC20InvalidUnderlying(address token); + + constructor(IERC20 underlyingToken) { + if (address(underlyingToken) == address(this)) { + revert ERC20InvalidUnderlying(address(this)); + } + _underlying = underlyingToken; + } + + /// @inheritdoc IERC20Metadata + function decimals() public view virtual override returns (uint8) { + try IERC20Metadata(address(_underlying)).decimals() returns (uint8 value) { + return value; + } catch { + return super.decimals(); + } + } + + /** + * @dev Returns the address of the underlying ERC-20 token that is being wrapped. + */ + function underlying() public view returns (IERC20) { + return _underlying; + } + + /** + * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens. + */ + function depositFor(address account, uint256 value) public virtual returns (bool) { + address sender = _msgSender(); + if (sender == address(this)) { + revert ERC20InvalidSender(address(this)); + } + if (account == address(this)) { + revert ERC20InvalidReceiver(account); + } + SafeERC20.safeTransferFrom(_underlying, sender, address(this), value); + _mint(account, value); + return true; + } + + /** + * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens. + */ + function withdrawTo(address account, uint256 value) public virtual returns (bool) { + if (account == address(this)) { + revert ERC20InvalidReceiver(account); + } + _burn(_msgSender(), value); + SafeERC20.safeTransfer(_underlying, account, value); + return true; + } + + /** + * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake or acquired from + * rebasing mechanisms. Internal function that can be exposed with access control if desired. + */ + function _recover(address account) internal virtual returns (uint256) { + uint256 value = _underlying.balanceOf(address(this)) - totalSupply(); + _mint(account, value); + return value; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC4626.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC4626.sol new file mode 100644 index 00000000..5937eb3e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/ERC4626.sol @@ -0,0 +1,315 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC4626.sol) + +pragma solidity ^0.8.24; + +import {IERC20, IERC20Metadata, ERC20} from "../ERC20.sol"; +import {SafeERC20} from "../utils/SafeERC20.sol"; +import {IERC4626} from "../../../interfaces/IERC4626.sol"; +import {LowLevelCall} from "../../../utils/LowLevelCall.sol"; +import {Memory} from "../../../utils/Memory.sol"; +import {Math} from "../../../utils/math/Math.sol"; + +/** + * @dev Implementation of the ERC-4626 "Tokenized Vault Standard" as defined in + * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. + * + * This extension allows the minting and burning of "shares" (represented using the ERC-20 inheritance) in exchange for + * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends + * the ERC-20 standard. Any additional extensions included along it would affect the "shares" token represented by this + * contract and not the "assets" token which is an independent contract. + * + * [CAUTION] + * ==== + * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning + * with a "donation" to the vault that inflates the price of a share. This is variously known as a donation or inflation + * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial + * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may + * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by + * verifying the amount received is as expected, using a wrapper that performs these checks such as + * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. + * + * Since v4.9, this implementation introduces configurable virtual assets and shares to help developers mitigate that risk. + * The `_decimalsOffset()` corresponds to an offset in the decimal representation between the underlying asset's decimals + * and the vault decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which + * itself determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default + * offset (0) makes it non-profitable even if an attacker is able to capture value from multiple user deposits, as a result + * of the value being captured by the virtual shares (out of the attacker's donation) matching the attacker's expected gains. + * With a larger offset, the attack becomes orders of magnitude more expensive than it is profitable. More details about the + * underlying math can be found xref:ROOT:erc4626.adoc#inflation-attack[here]. + * + * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued + * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets + * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience + * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the + * `_convertToShares` and `_convertToAssets` functions. + * + * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide]. + * ==== + * + * [NOTE] + * ==== + * When overriding this contract, some elements must be considered: + * + * * When overriding the behavior of the deposit or withdraw mechanisms, it is recommended to override the internal + * functions. Overriding {_deposit} automatically affects both {deposit} and {mint}. Similarly, overriding {_withdraw} + * automatically affects both {withdraw} and {redeem}. Overall it is not recommended to override the public facing + * functions since that could lead to inconsistent behaviors between the {deposit} and {mint} or between {withdraw} and + * {redeem}, which is documented to have led to loss of funds. + * + * * Overrides to the deposit or withdraw mechanism must be reflected in the preview functions as well. + * + * * {maxWithdraw} depends on {maxRedeem}. Therefore, overriding {maxRedeem} only is enough. On the other hand, + * overriding {maxWithdraw} only would have no effect on {maxRedeem}, and could create an inconsistency between the two + * functions. + * + * * If {previewRedeem} is overridden to revert, {maxWithdraw} must be overridden as necessary to ensure it + * always return successfully. + * ==== + */ +abstract contract ERC4626 is ERC20, IERC4626 { + using Math for uint256; + + IERC20 private immutable _asset; + uint8 private immutable _underlyingDecimals; + + /** + * @dev Attempted to deposit more assets than the max amount for `receiver`. + */ + error ERC4626ExceededMaxDeposit(address receiver, uint256 assets, uint256 max); + + /** + * @dev Attempted to mint more shares than the max amount for `receiver`. + */ + error ERC4626ExceededMaxMint(address receiver, uint256 shares, uint256 max); + + /** + * @dev Attempted to withdraw more assets than the max amount for `owner`. + */ + error ERC4626ExceededMaxWithdraw(address owner, uint256 assets, uint256 max); + + /** + * @dev Attempted to redeem more shares than the max amount for `owner`. + */ + error ERC4626ExceededMaxRedeem(address owner, uint256 shares, uint256 max); + + /** + * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC-20 or ERC-777). + */ + constructor(IERC20 asset_) { + (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_); + _underlyingDecimals = success ? assetDecimals : 18; + _asset = asset_; + } + + /** + * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way. + */ + function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool ok, uint8 assetDecimals) { + Memory.Pointer ptr = Memory.getFreeMemoryPointer(); + (bool success, bytes32 returnedDecimals, ) = LowLevelCall.staticcallReturn64Bytes( + address(asset_), + abi.encodeCall(IERC20Metadata.decimals, ()) + ); + Memory.unsafeSetFreeMemoryPointer(ptr); + + return + (success && LowLevelCall.returnDataSize() >= 32 && uint256(returnedDecimals) <= type(uint8).max) + ? (true, uint8(uint256(returnedDecimals))) + : (false, 0); + } + + /** + * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This + * "original" value is cached during construction of the vault contract. If this read operation fails (e.g., the + * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals. + * + * See {IERC20Metadata-decimals}. + */ + function decimals() public view virtual override(IERC20Metadata, ERC20) returns (uint8) { + return _underlyingDecimals + _decimalsOffset(); + } + + /// @inheritdoc IERC4626 + function asset() public view virtual returns (address) { + return address(_asset); + } + + /// @inheritdoc IERC4626 + function totalAssets() public view virtual returns (uint256) { + return IERC20(asset()).balanceOf(address(this)); + } + + /// @inheritdoc IERC4626 + function convertToShares(uint256 assets) public view virtual returns (uint256) { + return _convertToShares(assets, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function convertToAssets(uint256 shares) public view virtual returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function maxDeposit(address) public view virtual returns (uint256) { + return type(uint256).max; + } + + /// @inheritdoc IERC4626 + function maxMint(address) public view virtual returns (uint256) { + return type(uint256).max; + } + + /// @inheritdoc IERC4626 + function maxWithdraw(address owner) public view virtual returns (uint256) { + return previewRedeem(maxRedeem(owner)); + } + + /// @inheritdoc IERC4626 + function maxRedeem(address owner) public view virtual returns (uint256) { + return balanceOf(owner); + } + + /// @inheritdoc IERC4626 + function previewDeposit(uint256 assets) public view virtual returns (uint256) { + return _convertToShares(assets, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function previewMint(uint256 shares) public view virtual returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Ceil); + } + + /// @inheritdoc IERC4626 + function previewWithdraw(uint256 assets) public view virtual returns (uint256) { + return _convertToShares(assets, Math.Rounding.Ceil); + } + + /// @inheritdoc IERC4626 + function previewRedeem(uint256 shares) public view virtual returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function deposit(uint256 assets, address receiver) public virtual returns (uint256) { + uint256 maxAssets = maxDeposit(receiver); + if (assets > maxAssets) { + revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets); + } + + uint256 shares = previewDeposit(assets); + _deposit(_msgSender(), receiver, assets, shares); + + return shares; + } + + /// @inheritdoc IERC4626 + function mint(uint256 shares, address receiver) public virtual returns (uint256) { + uint256 maxShares = maxMint(receiver); + if (shares > maxShares) { + revert ERC4626ExceededMaxMint(receiver, shares, maxShares); + } + + uint256 assets = previewMint(shares); + _deposit(_msgSender(), receiver, assets, shares); + + return assets; + } + + /// @inheritdoc IERC4626 + function withdraw(uint256 assets, address receiver, address owner) public virtual returns (uint256) { + uint256 maxAssets = maxWithdraw(owner); + if (assets > maxAssets) { + revert ERC4626ExceededMaxWithdraw(owner, assets, maxAssets); + } + + uint256 shares = previewWithdraw(assets); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return shares; + } + + /// @inheritdoc IERC4626 + function redeem(uint256 shares, address receiver, address owner) public virtual returns (uint256) { + uint256 maxShares = maxRedeem(owner); + if (shares > maxShares) { + revert ERC4626ExceededMaxRedeem(owner, shares, maxShares); + } + + uint256 assets = previewRedeem(shares); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return assets; + } + + /** + * @dev Internal conversion function (from assets to shares) with support for rounding direction. + */ + function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) { + return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding); + } + + /** + * @dev Internal conversion function (from shares to assets) with support for rounding direction. + */ + function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) { + return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding); + } + + /** + * @dev Deposit/mint common workflow. + */ + function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual { + // If asset() is ERC-777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the + // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the + // assets are transferred and before the shares are minted, which is a valid state. + // slither-disable-next-line reentrancy-no-eth + _transferIn(caller, assets); + _mint(receiver, shares); + + emit Deposit(caller, receiver, assets, shares); + } + + /** + * @dev Withdraw/redeem common workflow. + */ + function _withdraw( + address caller, + address receiver, + address owner, + uint256 assets, + uint256 shares + ) internal virtual { + if (caller != owner) { + _spendAllowance(owner, caller, shares); + } + + // If asset() is ERC-777, `transfer` can trigger a reentrancy AFTER the transfer happens through the + // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the + // shares are burned and after the assets are transferred, which is a valid state. + _burn(owner, shares); + _transferOut(receiver, assets); + + emit Withdraw(caller, receiver, owner, assets, shares); + } + + /// @dev Performs a transfer in of underlying assets. The default implementation uses `SafeERC20`. Used by {_deposit}. + function _transferIn(address from, uint256 assets) internal virtual { + SafeERC20.safeTransferFrom(IERC20(asset()), from, address(this), assets); + } + + /// @dev Performs a transfer out of underlying assets. The default implementation uses `SafeERC20`. Used by {_withdraw}. + function _transferOut(address to, uint256 assets) internal virtual { + SafeERC20.safeTransfer(IERC20(asset()), to, assets); + } + + function _decimalsOffset() internal view virtual returns (uint8) { + return 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Metadata.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/IERC20Metadata.sol similarity index 75% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Metadata.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/IERC20Metadata.sol index 83ba6ac5..87bbafa8 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Metadata.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/IERC20Metadata.sol @@ -1,14 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../IERC20.sol"; +import {IERC20} from "../IERC20.sol"; /** - * @dev Interface for the optional metadata functions from the ERC20 standard. - * - * _Available since v4.1._ + * @dev Interface for the optional metadata functions from the ERC-20 standard. */ interface IERC20Metadata is IERC20 { /** diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Permit.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/IERC20Permit.sol similarity index 91% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Permit.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/IERC20Permit.sol index ec2b5483..29c811df 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC20/extensions/IERC20Permit.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/IERC20Permit.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/IERC20Permit.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; /** - * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in - * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. * - * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * @@ -45,7 +45,7 @@ interface IERC20Permit { * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction - * ordering also apply here. + * ordering also applies here. * * Emits an {Approval} event. * diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20Bridgeable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20Bridgeable.sol new file mode 100644 index 00000000..34730139 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20Bridgeable.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/draft-ERC20Bridgeable.sol) + +pragma solidity ^0.8.20; + +import {ERC20} from "../ERC20.sol"; +import {ERC165, IERC165} from "../../../utils/introspection/ERC165.sol"; +import {IERC7802} from "../../../interfaces/draft-IERC7802.sol"; + +/** + * @dev ERC20 extension that implements the standard token interface according to + * https://eips.ethereum.org/EIPS/eip-7802[ERC-7802]. + */ +abstract contract ERC20Bridgeable is ERC20, ERC165, IERC7802 { + /// @dev Modifier to restrict access to the token bridge. + modifier onlyTokenBridge() { + // Token bridge should never be impersonated using a relayer/forwarder. Using msg.sender is preferable to + // _msgSender() for security reasons. + _checkTokenBridge(msg.sender); + _; + } + + /// @inheritdoc ERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return interfaceId == type(IERC7802).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC7802-crosschainMint}. Emits a {IERC7802-CrosschainMint} event. + */ + function crosschainMint(address to, uint256 value) public virtual override onlyTokenBridge { + _mint(to, value); + emit CrosschainMint(to, value, _msgSender()); + } + + /** + * @dev See {IERC7802-crosschainBurn}. Emits a {IERC7802-CrosschainBurn} event. + */ + function crosschainBurn(address from, uint256 value) public virtual override onlyTokenBridge { + _burn(from, value); + emit CrosschainBurn(from, value, _msgSender()); + } + + /** + * @dev Checks if the caller is a trusted token bridge. MUST revert otherwise. + * + * Developers should implement this function using an access control mechanism that allows + * customizing the list of allowed senders. Consider using {AccessControl} or {AccessManaged}. + */ + function _checkTokenBridge(address caller) internal virtual; +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol new file mode 100644 index 00000000..357daa93 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/extensions/draft-ERC20TemporaryApproval.sol) + +pragma solidity ^0.8.24; + +import {IERC20, ERC20} from "../ERC20.sol"; +import {IERC7674} from "../../../interfaces/draft-IERC7674.sol"; +import {Math} from "../../../utils/math/Math.sol"; +import {SlotDerivation} from "../../../utils/SlotDerivation.sol"; +import {TransientSlot} from "../../../utils/TransientSlot.sol"; + +/** + * @dev Extension of {ERC20} that adds support for temporary allowances following ERC-7674. + * + * WARNING: This is a draft contract. The corresponding ERC is still subject to changes. + * + * _Available since v5.1._ + */ +abstract contract ERC20TemporaryApproval is ERC20, IERC7674 { + using SlotDerivation for bytes32; + using TransientSlot for bytes32; + using TransientSlot for TransientSlot.Uint256Slot; + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20_TEMPORARY_APPROVAL_STORAGE")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC20_TEMPORARY_APPROVAL_STORAGE = + 0xea2d0e77a01400d0111492b1321103eed560d8fe44b9a7c2410407714583c400; + + /** + * @dev {allowance} override that includes the temporary allowance when looking up the current allowance. If + * adding up the persistent and the temporary allowances result in an overflow, type(uint256).max is returned. + */ + function allowance(address owner, address spender) public view virtual override(IERC20, ERC20) returns (uint256) { + (bool success, uint256 amount) = Math.tryAdd( + super.allowance(owner, spender), + _temporaryAllowance(owner, spender) + ); + return success ? amount : type(uint256).max; + } + + /** + * @dev Internal getter for the current temporary allowance that `spender` has over `owner` tokens. + */ + function _temporaryAllowance(address owner, address spender) internal view virtual returns (uint256) { + return _temporaryAllowanceSlot(owner, spender).tload(); + } + + /** + * @dev Alternative to {approve} that sets a `value` amount of tokens as the temporary allowance of `spender` over + * the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Requirements: + * - `spender` cannot be the zero address. + * + * Does NOT emit an {Approval} event. + */ + function temporaryApprove(address spender, uint256 value) public virtual returns (bool) { + _temporaryApprove(_msgSender(), spender, value); + return true; + } + + /** + * @dev Sets `value` as the temporary allowance of `spender` over the `owner`'s tokens. + * + * This internal function is equivalent to `temporaryApprove`, and can be used to e.g. set automatic allowances + * for certain subsystems, etc. + * + * Requirements: + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + * + * Does NOT emit an {Approval} event. + */ + function _temporaryApprove(address owner, address spender, uint256 value) internal virtual { + if (owner == address(0)) { + revert ERC20InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC20InvalidSpender(address(0)); + } + _temporaryAllowanceSlot(owner, spender).tstore(value); + } + + /** + * @dev {_spendAllowance} override that consumes the temporary allowance (if any) before eventually falling back + * to consuming the persistent allowance. + * NOTE: This function skips calling `super._spendAllowance` if the temporary allowance + * is enough to cover the spending. + */ + function _spendAllowance(address owner, address spender, uint256 value) internal virtual override { + // load transient allowance + uint256 currentTemporaryAllowance = _temporaryAllowance(owner, spender); + + // Check and update (if needed) the temporary allowance + set remaining value + if (currentTemporaryAllowance > 0) { + // All value is covered by the infinite allowance. nothing left to spend, we can return early + if (currentTemporaryAllowance == type(uint256).max) { + return; + } + // check how much of the value is covered by the transient allowance + uint256 spendTemporaryAllowance = Math.min(currentTemporaryAllowance, value); + unchecked { + // decrease transient allowance accordingly + _temporaryApprove(owner, spender, currentTemporaryAllowance - spendTemporaryAllowance); + // update value necessary + value -= spendTemporaryAllowance; + } + } + // reduce any remaining value from the persistent allowance + if (value > 0) { + super._spendAllowance(owner, spender, value); + } + } + + function _temporaryAllowanceSlot(address owner, address spender) private pure returns (TransientSlot.Uint256Slot) { + return ERC20_TEMPORARY_APPROVAL_STORAGE.deriveMapping(owner).deriveMapping(spender).asUint256(); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/ERC1363Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/ERC1363Utils.sol new file mode 100644 index 00000000..25577bc6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/ERC1363Utils.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/utils/ERC1363Utils.sol) + +pragma solidity ^0.8.20; + +import {IERC1363Receiver} from "../../../interfaces/IERC1363Receiver.sol"; +import {IERC1363Spender} from "../../../interfaces/IERC1363Spender.sol"; + +/** + * @dev Library that provides common ERC-1363 utility functions. + * + * See https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. + */ +library ERC1363Utils { + /** + * @dev Indicates a failure with the token `receiver`. Used in transfers. + * @param receiver Address to which tokens are being transferred. + */ + error ERC1363InvalidReceiver(address receiver); + + /** + * @dev Indicates a failure with the token `spender`. Used in approvals. + * @param spender Address that may be allowed to operate on tokens without being their owner. + */ + error ERC1363InvalidSpender(address spender); + + /** + * @dev Performs a call to {IERC1363Receiver-onTransferReceived} on a target address. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `to` must implement the {IERC1363Receiver} interface. + * - The target must return the {IERC1363Receiver-onTransferReceived} selector to accept the transfer. + */ + function checkOnERC1363TransferReceived( + address operator, + address from, + address to, + uint256 value, + bytes memory data + ) internal { + if (to.code.length == 0) { + revert ERC1363InvalidReceiver(to); + } + + try IERC1363Receiver(to).onTransferReceived(operator, from, value, data) returns (bytes4 retval) { + if (retval != IERC1363Receiver.onTransferReceived.selector) { + revert ERC1363InvalidReceiver(to); + } + } catch (bytes memory reason) { + if (reason.length == 0) { + revert ERC1363InvalidReceiver(to); + } else { + assembly ("memory-safe") { + revert(add(reason, 0x20), mload(reason)) + } + } + } + } + + /** + * @dev Performs a call to {IERC1363Spender-onApprovalReceived} on a target address. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `spender` must implement the {IERC1363Spender} interface. + * - The target must return the {IERC1363Spender-onApprovalReceived} selector to accept the approval. + */ + function checkOnERC1363ApprovalReceived( + address operator, + address spender, + uint256 value, + bytes memory data + ) internal { + if (spender.code.length == 0) { + revert ERC1363InvalidSpender(spender); + } + + try IERC1363Spender(spender).onApprovalReceived(operator, value, data) returns (bytes4 retval) { + if (retval != IERC1363Spender.onApprovalReceived.selector) { + revert ERC1363InvalidSpender(spender); + } + } catch (bytes memory reason) { + if (reason.length == 0) { + revert ERC1363InvalidSpender(spender); + } else { + assembly ("memory-safe") { + revert(add(reason, 0x20), mload(reason)) + } + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/SafeERC20.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/SafeERC20.sol new file mode 100644 index 00000000..b1e4b6e6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC20/utils/SafeERC20.sol @@ -0,0 +1,280 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/utils/SafeERC20.sol) + +pragma solidity ^0.8.20; + +import {IERC20} from "../IERC20.sol"; +import {IERC1363} from "../../../interfaces/IERC1363.sol"; + +/** + * @title SafeERC20 + * @dev Wrappers around ERC-20 operations that throw on failure (when the token + * contract returns false). Tokens that return no value (and instead revert or + * throw on failure) are also supported, non-reverting calls are assumed to be + * successful. + * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, + * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. + */ +library SafeERC20 { + /** + * @dev An operation with an ERC-20 token failed. + */ + error SafeERC20FailedOperation(address token); + + /** + * @dev Indicates a failed `decreaseAllowance` request. + */ + error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); + + /** + * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + */ + function safeTransfer(IERC20 token, address to, uint256 value) internal { + if (!_safeTransfer(token, to, value, true)) { + revert SafeERC20FailedOperation(address(token)); + } + } + + /** + * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the + * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. + */ + function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { + if (!_safeTransferFrom(token, from, to, value, true)) { + revert SafeERC20FailedOperation(address(token)); + } + } + + /** + * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful. + */ + function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) { + return _safeTransfer(token, to, value, false); + } + + /** + * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful. + */ + function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) { + return _safeTransferFrom(token, from, to, value, false); + } + + /** + * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. + * + * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" + * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using + * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract + * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. + */ + function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { + uint256 oldAllowance = token.allowance(address(this), spender); + forceApprove(token, spender, oldAllowance + value); + } + + /** + * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no + * value, non-reverting calls are assumed to be successful. + * + * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" + * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using + * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract + * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. + */ + function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { + unchecked { + uint256 currentAllowance = token.allowance(address(this), spender); + if (currentAllowance < requestedDecrease) { + revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); + } + forceApprove(token, spender, currentAllowance - requestedDecrease); + } + } + + /** + * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, + * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval + * to be set to zero before setting it to a non-zero value, such as USDT. + * + * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function + * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being + * set here. + */ + function forceApprove(IERC20 token, address spender, uint256 value) internal { + if (!_safeApprove(token, spender, value, false)) { + if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token)); + if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token)); + } + } + + /** + * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no + * code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when + * targeting contracts. + * + * Reverts if the returned value is other than `true`. + */ + function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { + if (to.code.length == 0) { + safeTransfer(token, to, value); + } else if (!token.transferAndCall(to, value, data)) { + revert SafeERC20FailedOperation(address(token)); + } + } + + /** + * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target + * has no code. This can be used to implement an {ERC721}-like safe transfer that relies on {ERC1363} checks when + * targeting contracts. + * + * Reverts if the returned value is other than `true`. + */ + function transferFromAndCallRelaxed( + IERC1363 token, + address from, + address to, + uint256 value, + bytes memory data + ) internal { + if (to.code.length == 0) { + safeTransferFrom(token, from, to, value); + } else if (!token.transferFromAndCall(from, to, value, data)) { + revert SafeERC20FailedOperation(address(token)); + } + } + + /** + * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no + * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when + * targeting contracts. + * + * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. + * Oppositely, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} + * once without retrying, and relies on the returned value to be true. + * + * Reverts if the returned value is other than `true`. + */ + function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { + if (to.code.length == 0) { + forceApprove(token, to, value); + } else if (!token.approveAndCall(to, value, data)) { + revert SafeERC20FailedOperation(address(token)); + } + } + + /** + * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the + * return value is optional (but if data is returned, it must not be false). + * + * @param token The token targeted by the call. + * @param to The recipient of the tokens + * @param value The amount of token to transfer + * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean. + */ + function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) { + bytes4 selector = IERC20.transfer.selector; + + assembly ("memory-safe") { + let fmp := mload(0x40) + mstore(0x00, selector) + mstore(0x04, and(to, shr(96, not(0)))) + mstore(0x24, value) + success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20) + // if call success and return is true, all is good. + // otherwise (not success or return is not true), we need to perform further checks + if iszero(and(success, eq(mload(0x00), 1))) { + // if the call was a failure and bubble is enabled, bubble the error + if and(iszero(success), bubble) { + returndatacopy(fmp, 0x00, returndatasize()) + revert(fmp, returndatasize()) + } + // if the return value is not true, then the call is only successful if: + // - the token address has code + // - the returndata is empty + success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0))) + } + mstore(0x40, fmp) + } + } + + /** + * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return + * value: the return value is optional (but if data is returned, it must not be false). + * + * @param token The token targeted by the call. + * @param from The sender of the tokens + * @param to The recipient of the tokens + * @param value The amount of token to transfer + * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean. + */ + function _safeTransferFrom( + IERC20 token, + address from, + address to, + uint256 value, + bool bubble + ) private returns (bool success) { + bytes4 selector = IERC20.transferFrom.selector; + + assembly ("memory-safe") { + let fmp := mload(0x40) + mstore(0x00, selector) + mstore(0x04, and(from, shr(96, not(0)))) + mstore(0x24, and(to, shr(96, not(0)))) + mstore(0x44, value) + success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20) + // if call success and return is true, all is good. + // otherwise (not success or return is not true), we need to perform further checks + if iszero(and(success, eq(mload(0x00), 1))) { + // if the call was a failure and bubble is enabled, bubble the error + if and(iszero(success), bubble) { + returndatacopy(fmp, 0x00, returndatasize()) + revert(fmp, returndatasize()) + } + // if the return value is not true, then the call is only successful if: + // - the token address has code + // - the returndata is empty + success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0))) + } + mstore(0x40, fmp) + mstore(0x60, 0) + } + } + + /** + * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value: + * the return value is optional (but if data is returned, it must not be false). + * + * @param token The token targeted by the call. + * @param spender The spender of the tokens + * @param value The amount of token to transfer + * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean. + */ + function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) { + bytes4 selector = IERC20.approve.selector; + + assembly ("memory-safe") { + let fmp := mload(0x40) + mstore(0x00, selector) + mstore(0x04, and(spender, shr(96, not(0)))) + mstore(0x24, value) + success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20) + // if call success and return is true, all is good. + // otherwise (not success or return is not true), we need to perform further checks + if iszero(and(success, eq(mload(0x00), 1))) { + // if the call was a failure and bubble is enabled, bubble the error + if and(iszero(success), bubble) { + returndatacopy(fmp, 0x00, returndatasize()) + revert(fmp, returndatasize()) + } + // if the return value is not true, then the call is only successful if: + // - the token address has code + // - the returndata is empty + success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0))) + } + mstore(0x40, fmp) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/ERC6909.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/ERC6909.sol new file mode 100644 index 00000000..b1f16450 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/ERC6909.sol @@ -0,0 +1,224 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC6909/ERC6909.sol) + +pragma solidity ^0.8.20; + +import {IERC6909} from "../../interfaces/IERC6909.sol"; +import {Context} from "../../utils/Context.sol"; +import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; + +/** + * @dev Implementation of ERC-6909. + * See https://eips.ethereum.org/EIPS/eip-6909 + */ +contract ERC6909 is Context, ERC165, IERC6909 { + mapping(address owner => mapping(uint256 id => uint256)) private _balances; + + mapping(address owner => mapping(address operator => bool)) private _operatorApprovals; + + mapping(address owner => mapping(address spender => mapping(uint256 id => uint256))) private _allowances; + + error ERC6909InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 id); + error ERC6909InsufficientAllowance(address spender, uint256 allowance, uint256 needed, uint256 id); + error ERC6909InvalidApprover(address approver); + error ERC6909InvalidReceiver(address receiver); + error ERC6909InvalidSender(address sender); + error ERC6909InvalidSpender(address spender); + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return interfaceId == type(IERC6909).interfaceId || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC6909 + function balanceOf(address owner, uint256 id) public view virtual override returns (uint256) { + return _balances[owner][id]; + } + + /// @inheritdoc IERC6909 + function allowance(address owner, address spender, uint256 id) public view virtual override returns (uint256) { + return _allowances[owner][spender][id]; + } + + /// @inheritdoc IERC6909 + function isOperator(address owner, address spender) public view virtual override returns (bool) { + return _operatorApprovals[owner][spender]; + } + + /// @inheritdoc IERC6909 + function approve(address spender, uint256 id, uint256 amount) public virtual override returns (bool) { + _approve(_msgSender(), spender, id, amount); + return true; + } + + /// @inheritdoc IERC6909 + function setOperator(address spender, bool approved) public virtual override returns (bool) { + _setOperator(_msgSender(), spender, approved); + return true; + } + + /// @inheritdoc IERC6909 + function transfer(address receiver, uint256 id, uint256 amount) public virtual override returns (bool) { + _transfer(_msgSender(), receiver, id, amount); + return true; + } + + /// @inheritdoc IERC6909 + function transferFrom( + address sender, + address receiver, + uint256 id, + uint256 amount + ) public virtual override returns (bool) { + address caller = _msgSender(); + if (sender != caller && !isOperator(sender, caller)) { + _spendAllowance(sender, caller, id, amount); + } + _transfer(sender, receiver, id, amount); + return true; + } + + /** + * @dev Creates `amount` of token `id` and assigns them to `account`, by transferring it from address(0). + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _mint(address to, uint256 id, uint256 amount) internal { + if (to == address(0)) { + revert ERC6909InvalidReceiver(address(0)); + } + _update(address(0), to, id, amount); + } + + /** + * @dev Moves `amount` of token `id` from `from` to `to` without checking for approvals. This function verifies + * that neither the sender nor the receiver are address(0), which means it cannot mint or burn tokens. + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _transfer(address from, address to, uint256 id, uint256 amount) internal { + if (from == address(0)) { + revert ERC6909InvalidSender(address(0)); + } + if (to == address(0)) { + revert ERC6909InvalidReceiver(address(0)); + } + _update(from, to, id, amount); + } + + /** + * @dev Destroys a `amount` of token `id` from `account`. + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead + */ + function _burn(address from, uint256 id, uint256 amount) internal { + if (from == address(0)) { + revert ERC6909InvalidSender(address(0)); + } + _update(from, address(0), id, amount); + } + + /** + * @dev Transfers `amount` of token `id` from `from` to `to`, or alternatively mints (or burns) if `from` + * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding + * this function. + * + * Emits a {Transfer} event. + */ + function _update(address from, address to, uint256 id, uint256 amount) internal virtual { + address caller = _msgSender(); + + if (from != address(0)) { + uint256 fromBalance = _balances[from][id]; + if (fromBalance < amount) { + revert ERC6909InsufficientBalance(from, fromBalance, amount, id); + } + unchecked { + // Overflow not possible: amount <= fromBalance. + _balances[from][id] = fromBalance - amount; + } + } + if (to != address(0)) { + _balances[to][id] += amount; + } + + emit Transfer(caller, from, to, id, amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`'s `id` tokens. + * + * This internal function is equivalent to `approve`, and can be used to e.g. set automatic allowances for certain + * subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 id, uint256 amount) internal virtual { + if (owner == address(0)) { + revert ERC6909InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC6909InvalidSpender(address(0)); + } + _allowances[owner][spender][id] = amount; + emit Approval(owner, spender, id, amount); + } + + /** + * @dev Approve `spender` to operate on all of `owner`'s tokens + * + * This internal function is equivalent to `setOperator`, and can be used to e.g. set automatic allowances for + * certain subsystems, etc. + * + * Emits an {OperatorSet} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _setOperator(address owner, address spender, bool approved) internal virtual { + if (owner == address(0)) { + revert ERC6909InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC6909InvalidSpender(address(0)); + } + _operatorApprovals[owner][spender] = approved; + emit OperatorSet(owner, spender, approved); + } + + /** + * @dev Updates `owner`'s allowance for `spender` based on spent `amount`. + * + * Does not update the allowance value in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Does not emit an {Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 id, uint256 amount) internal virtual { + uint256 currentAllowance = allowance(owner, spender, id); + if (currentAllowance < type(uint256).max) { + if (currentAllowance < amount) { + revert ERC6909InsufficientAllowance(spender, currentAllowance, amount, id); + } + unchecked { + _allowances[owner][spender][id] = currentAllowance - amount; + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909ContentURI.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909ContentURI.sol new file mode 100644 index 00000000..09288eb6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909ContentURI.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909ContentURI.sol) + +pragma solidity ^0.8.20; + +import {ERC6909} from "../ERC6909.sol"; +import {IERC6909ContentURI} from "../../../interfaces/IERC6909.sol"; +import {IERC165} from "../../../utils/introspection/IERC165.sol"; + +/** + * @dev Implementation of the Content URI extension defined in ERC6909. + */ +contract ERC6909ContentURI is ERC6909, IERC6909ContentURI { + string private _contractURI; + mapping(uint256 id => string) private _tokenURIs; + + /// @dev Event emitted when the contract URI is changed. See https://eips.ethereum.org/EIPS/eip-7572[ERC-7572] for details. + event ContractURIUpdated(); + + /// @dev See {IERC1155-URI} + event URI(string value, uint256 indexed id); + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909, IERC165) returns (bool) { + return interfaceId == type(IERC6909ContentURI).interfaceId || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC6909ContentURI + function contractURI() public view virtual override returns (string memory) { + return _contractURI; + } + + /// @inheritdoc IERC6909ContentURI + function tokenURI(uint256 id) public view virtual override returns (string memory) { + return _tokenURIs[id]; + } + + /** + * @dev Sets the {contractURI} for the contract. + * + * Emits a {ContractURIUpdated} event. + */ + function _setContractURI(string memory newContractURI) internal virtual { + _contractURI = newContractURI; + + emit ContractURIUpdated(); + } + + /** + * @dev Sets the {tokenURI} for a given token of type `id`. + * + * Emits a {URI} event. + */ + function _setTokenURI(uint256 id, string memory newTokenURI) internal virtual { + _tokenURIs[id] = newTokenURI; + + emit URI(newTokenURI, id); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909Metadata.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909Metadata.sol new file mode 100644 index 00000000..e58b61d0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909Metadata.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909Metadata.sol) + +pragma solidity ^0.8.20; + +import {ERC6909} from "../ERC6909.sol"; +import {IERC6909Metadata} from "../../../interfaces/IERC6909.sol"; +import {IERC165} from "../../../utils/introspection/IERC165.sol"; + +/** + * @dev Implementation of the Metadata extension defined in ERC6909. Exposes the name, symbol, and decimals of each token id. + */ +contract ERC6909Metadata is ERC6909, IERC6909Metadata { + struct TokenMetadata { + string name; + string symbol; + uint8 decimals; + } + + mapping(uint256 id => TokenMetadata) private _tokenMetadata; + + /// @dev The name of the token of type `id` was updated to `newName`. + event ERC6909NameUpdated(uint256 indexed id, string newName); + + /// @dev The symbol for the token of type `id` was updated to `newSymbol`. + event ERC6909SymbolUpdated(uint256 indexed id, string newSymbol); + + /// @dev The decimals value for token of type `id` was updated to `newDecimals`. + event ERC6909DecimalsUpdated(uint256 indexed id, uint8 newDecimals); + + /// @inheritdoc IERC6909Metadata + function name(uint256 id) public view virtual override returns (string memory) { + return _tokenMetadata[id].name; + } + + /// @inheritdoc IERC6909Metadata + function symbol(uint256 id) public view virtual override returns (string memory) { + return _tokenMetadata[id].symbol; + } + + /// @inheritdoc IERC6909Metadata + function decimals(uint256 id) public view virtual override returns (uint8) { + return _tokenMetadata[id].decimals; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909, IERC165) returns (bool) { + return interfaceId == type(IERC6909Metadata).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Sets the `name` for a given token of type `id`. + * + * Emits an {ERC6909NameUpdated} event. + */ + function _setName(uint256 id, string memory newName) internal virtual { + _tokenMetadata[id].name = newName; + + emit ERC6909NameUpdated(id, newName); + } + + /** + * @dev Sets the `symbol` for a given token of type `id`. + * + * Emits an {ERC6909SymbolUpdated} event. + */ + function _setSymbol(uint256 id, string memory newSymbol) internal virtual { + _tokenMetadata[id].symbol = newSymbol; + + emit ERC6909SymbolUpdated(id, newSymbol); + } + + /** + * @dev Sets the `decimals` for a given token of type `id`. + * + * Emits an {ERC6909DecimalsUpdated} event. + */ + function _setDecimals(uint256 id, uint8 newDecimals) internal virtual { + _tokenMetadata[id].decimals = newDecimals; + + emit ERC6909DecimalsUpdated(id, newDecimals); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909TokenSupply.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909TokenSupply.sol new file mode 100644 index 00000000..fa602867 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC6909/extensions/ERC6909TokenSupply.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909TokenSupply.sol) + +pragma solidity ^0.8.20; + +import {ERC6909} from "../ERC6909.sol"; +import {IERC6909TokenSupply} from "../../../interfaces/IERC6909.sol"; +import {IERC165} from "../../../utils/introspection/IERC165.sol"; + +/** + * @dev Implementation of the Token Supply extension defined in ERC6909. + * Tracks the total supply of each token id individually. + */ +contract ERC6909TokenSupply is ERC6909, IERC6909TokenSupply { + mapping(uint256 id => uint256) private _totalSupplies; + + /// @inheritdoc IERC6909TokenSupply + function totalSupply(uint256 id) public view virtual override returns (uint256) { + return _totalSupplies[id]; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909, IERC165) returns (bool) { + return interfaceId == type(IERC6909TokenSupply).interfaceId || super.supportsInterface(interfaceId); + } + + /// @dev Override the `_update` function to update the total supply of each token id as necessary. + function _update(address from, address to, uint256 id, uint256 amount) internal virtual override { + super._update(from, to, id, amount); + + if (from == address(0)) { + _totalSupplies[id] += amount; + } + if (to == address(0)) { + unchecked { + // amount <= _balances[from][id] <= _totalSupplies[id] + _totalSupplies[id] -= amount; + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/ERC721.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/ERC721.sol new file mode 100644 index 00000000..f5b7588f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/ERC721.sol @@ -0,0 +1,433 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/ERC721.sol) + +pragma solidity ^0.8.24; + +import {IERC721} from "./IERC721.sol"; +import {IERC721Metadata} from "./extensions/IERC721Metadata.sol"; +import {ERC721Utils} from "./utils/ERC721Utils.sol"; +import {Context} from "../../utils/Context.sol"; +import {Strings} from "../../utils/Strings.sol"; +import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; +import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol"; + +/** + * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including + * the Metadata extension, but not including the Enumerable extension, which is available separately as + * {ERC721Enumerable}. + */ +abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { + using Strings for uint256; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + mapping(uint256 tokenId => address) private _owners; + + mapping(address owner => uint256) private _balances; + + mapping(uint256 tokenId => address) private _tokenApprovals; + + mapping(address owner => mapping(address operator => bool)) private _operatorApprovals; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return + interfaceId == type(IERC721).interfaceId || + interfaceId == type(IERC721Metadata).interfaceId || + super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC721 + function balanceOf(address owner) public view virtual returns (uint256) { + if (owner == address(0)) { + revert ERC721InvalidOwner(address(0)); + } + return _balances[owner]; + } + + /// @inheritdoc IERC721 + function ownerOf(uint256 tokenId) public view virtual returns (address) { + return _requireOwned(tokenId); + } + + /// @inheritdoc IERC721Metadata + function name() public view virtual returns (string memory) { + return _name; + } + + /// @inheritdoc IERC721Metadata + function symbol() public view virtual returns (string memory) { + return _symbol; + } + + /// @inheritdoc IERC721Metadata + function tokenURI(uint256 tokenId) public view virtual returns (string memory) { + _requireOwned(tokenId); + + string memory baseURI = _baseURI(); + return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; + } + + /** + * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each + * token will be the concatenation of the `baseURI` and the `tokenId`. Empty + * by default, can be overridden in child contracts. + */ + function _baseURI() internal view virtual returns (string memory) { + return ""; + } + + /// @inheritdoc IERC721 + function approve(address to, uint256 tokenId) public virtual { + _approve(to, tokenId, _msgSender()); + } + + /// @inheritdoc IERC721 + function getApproved(uint256 tokenId) public view virtual returns (address) { + _requireOwned(tokenId); + + return _getApproved(tokenId); + } + + /// @inheritdoc IERC721 + function setApprovalForAll(address operator, bool approved) public virtual { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /// @inheritdoc IERC721 + function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /// @inheritdoc IERC721 + function transferFrom(address from, address to, uint256 tokenId) public virtual { + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists + // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. + address previousOwner = _update(to, tokenId, _msgSender()); + if (previousOwner != from) { + revert ERC721IncorrectOwner(from, tokenId, previousOwner); + } + } + + /// @inheritdoc IERC721 + function safeTransferFrom(address from, address to, uint256 tokenId) public { + safeTransferFrom(from, to, tokenId, ""); + } + + /// @inheritdoc IERC721 + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { + transferFrom(from, to, tokenId); + ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); + } + + /** + * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist + * + * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the + * core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances + * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by + * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. + */ + function _ownerOf(uint256 tokenId) internal view virtual returns (address) { + return _owners[tokenId]; + } + + /** + * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. + */ + function _getApproved(uint256 tokenId) internal view virtual returns (address) { + return _tokenApprovals[tokenId]; + } + + /** + * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in + * particular (ignoring whether it is owned by `owner`). + * + * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this + * assumption. + */ + function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { + return + spender != address(0) && + (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); + } + + /** + * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. + * Reverts if: + * - `spender` does not have approval from `owner` for `tokenId`. + * - `spender` does not have approval to manage all of `owner`'s assets. + * + * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this + * assumption. + */ + function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { + if (!_isAuthorized(owner, spender, tokenId)) { + if (owner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } else { + revert ERC721InsufficientApproval(spender, tokenId); + } + } + } + + /** + * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. + * + * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that + * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. + * + * WARNING: Increasing an account's balance using this function tends to be paired with an override of the + * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership + * remain consistent with one another. + */ + function _increaseBalance(address account, uint128 value) internal virtual { + unchecked { + _balances[account] += value; + } + } + + /** + * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner + * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. + * + * The `auth` argument is optional. If the value passed is non 0, then this function will check that + * `auth` is either the owner of the token, or approved to operate on the token (by the owner). + * + * Emits a {Transfer} event. + * + * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. + */ + function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { + address from = _ownerOf(tokenId); + + // Perform (optional) operator check + if (auth != address(0)) { + _checkAuthorized(from, auth, tokenId); + } + + // Execute the update + if (from != address(0)) { + // Clear approval. No need to re-authorize or emit the Approval event + _approve(address(0), tokenId, address(0), false); + + unchecked { + _balances[from] -= 1; + } + } + + if (to != address(0)) { + unchecked { + _balances[to] += 1; + } + } + + _owners[tokenId] = to; + + emit Transfer(from, to, tokenId); + + return from; + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal { + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + address previousOwner = _update(to, tokenId, address(0)); + if (previousOwner != address(0)) { + revert ERC721InvalidSender(address(0)); + } + } + + /** + * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. + * + * Requirements: + * + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { + _mint(to, tokenId); + ERC721Utils.checkOnERC721Received(_msgSender(), address(0), to, tokenId, data); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * This is an internal function that does not check if the sender is authorized to operate on the token. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal { + address previousOwner = _update(address(0), tokenId, address(0)); + if (previousOwner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal { + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + address previousOwner = _update(to, tokenId, address(0)); + if (previousOwner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } else if (previousOwner != from) { + revert ERC721IncorrectOwner(from, tokenId, previousOwner); + } + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients + * are aware of the ERC-721 standard to prevent tokens from being forever locked. + * + * `data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is like {safeTransferFrom} in the sense that it invokes + * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `tokenId` token must exist and be owned by `from`. + * - `to` cannot be the zero address. + * - `from` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId) internal { + _safeTransfer(from, to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { + _transfer(from, to, tokenId); + ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is + * either the owner of the token, or approved to operate on all tokens held by this owner. + * + * Emits an {Approval} event. + * + * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. + */ + function _approve(address to, uint256 tokenId, address auth) internal { + _approve(to, tokenId, auth, true); + } + + /** + * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not + * emitted in the context of transfers. + */ + function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { + // Avoid reading the owner unless necessary + if (emitEvent || auth != address(0)) { + address owner = _requireOwned(tokenId); + + // We do not use _isAuthorized because single-token approvals should not be able to call approve + if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { + revert ERC721InvalidApprover(auth); + } + + if (emitEvent) { + emit Approval(owner, to, tokenId); + } + } + + _tokenApprovals[tokenId] = to; + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Requirements: + * - operator can't be the address zero. + * + * Emits an {ApprovalForAll} event. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + if (owner == address(0)) { + revert ERC721InvalidApprover(address(0)); + } + if (operator == address(0)) { + revert ERC721InvalidOperator(operator); + } + _operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). + * Returns the owner. + * + * Overrides to ownership logic should be done to {_ownerOf}. + */ + function _requireOwned(uint256 tokenId) internal view returns (address) { + address owner = _ownerOf(tokenId); + if (owner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } + return owner; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/IERC721.sol similarity index 87% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/IERC721.sol index 293f5668..74982034 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/IERC721.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/IERC721.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../../utils/introspection/IERC165.sol"; +import {IERC165} from "../../utils/introspection/IERC165.sol"; /** - * @dev Required interface of an ERC721 compliant contract. + * @dev Required interface of an ERC-721 compliant contract. */ interface IERC721 is IERC165 { /** @@ -47,7 +47,8 @@ interface IERC721 is IERC165 { * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon + * a safe transfer. * * Emits a {Transfer} event. */ @@ -55,15 +56,17 @@ interface IERC721 is IERC165 { /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients - * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * are aware of the ERC-721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. - * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or + * {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon + * a safe transfer. * * Emits a {Transfer} event. */ @@ -72,7 +75,7 @@ interface IERC721 is IERC165 { /** * @dev Transfers `tokenId` token from `from` to `to`. * - * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 + * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * @@ -108,7 +111,7 @@ interface IERC721 is IERC165 { * * Requirements: * - * - The `operator` cannot be the caller. + * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721Receiver.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/IERC721Receiver.sol similarity index 76% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721Receiver.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/IERC721Receiver.sol index de672099..6110f0c2 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/IERC721Receiver.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/IERC721Receiver.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/IERC721Receiver.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.5.0; /** - * @title ERC721 token receiver interface + * @title ERC-721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers - * from ERC721 asset contracts. + * from ERC-721 asset contracts. */ interface IERC721Receiver { /** @@ -14,7 +14,8 @@ interface IERC721Receiver { * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. - * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be + * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Burnable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Burnable.sol new file mode 100644 index 00000000..c47be18f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Burnable.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Burnable.sol) + +pragma solidity ^0.8.24; + +import {ERC721} from "../ERC721.sol"; +import {Context} from "../../../utils/Context.sol"; + +/** + * @title ERC-721 Burnable Token + * @dev ERC-721 Token that can be burned (destroyed). + */ +abstract contract ERC721Burnable is Context, ERC721 { + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists + // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. + _update(address(0), tokenId, _msgSender()); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Consecutive.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Consecutive.sol new file mode 100644 index 00000000..a391923e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Consecutive.sol @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Consecutive.sol) + +pragma solidity ^0.8.24; + +import {ERC721} from "../ERC721.sol"; +import {IERC2309} from "../../../interfaces/IERC2309.sol"; +import {BitMaps} from "../../../utils/structs/BitMaps.sol"; +import {Checkpoints} from "../../../utils/structs/Checkpoints.sol"; + +/** + * @dev Implementation of the ERC-2309 "Consecutive Transfer Extension" as defined in + * https://eips.ethereum.org/EIPS/eip-2309[ERC-2309]. + * + * This extension allows the minting of large batches of tokens, during contract construction only. For upgradeable + * contracts this implies that batch minting is only available during proxy deployment, and not in subsequent upgrades. + * These batches are limited to 5000 tokens at a time by default to accommodate off-chain indexers. + * + * Using this extension removes the ability to mint single tokens during contract construction. This ability is + * regained after construction. During construction, only batch minting is allowed. + * + * IMPORTANT: This extension does not call the {_update} function for tokens minted in batch. Any logic added to this + * function through overrides will not be triggered when tokens are minted in batch. You may want to also override + * {_increaseBalance} or {_mintConsecutive} to account for these mints. + * + * IMPORTANT: When overriding {_mintConsecutive}, be careful about call ordering. {ownerOf} may return invalid + * values during the {_mintConsecutive} execution if the super call is not called first. To be safe, execute the + * super call before your custom logic. + */ +abstract contract ERC721Consecutive is IERC2309, ERC721 { + using BitMaps for BitMaps.BitMap; + using Checkpoints for Checkpoints.Trace160; + + Checkpoints.Trace160 private _sequentialOwnership; + BitMaps.BitMap private _sequentialBurn; + + /** + * @dev Batch mint is restricted to the constructor. + * Any batch mint not emitting the {IERC721-Transfer} event outside of the constructor + * is non ERC-721 compliant. + */ + error ERC721ForbiddenBatchMint(); + + /** + * @dev Exceeds the max amount of mints per batch. + */ + error ERC721ExceededMaxBatchMint(uint256 batchSize, uint256 maxBatch); + + /** + * @dev Individual minting is not allowed. + */ + error ERC721ForbiddenMint(); + + /** + * @dev Batch burn is not supported. + */ + error ERC721ForbiddenBatchBurn(); + + /** + * @dev Maximum size of a batch of consecutive tokens. This is designed to limit stress on off-chain indexing + * services that have to record one entry per token, and have protections against "unreasonably large" batches of + * tokens. + * + * NOTE: Overriding the default value of 5000 will not cause on-chain issues, but may result in the asset not being + * correctly supported by off-chain indexing services (including marketplaces). + */ + function _maxBatchSize() internal view virtual returns (uint96) { + return 5000; + } + + /** + * @dev See {ERC721-_ownerOf}. Override that checks the sequential ownership structure for tokens that have + * been minted as part of a batch, and not yet transferred. + */ + function _ownerOf(uint256 tokenId) internal view virtual override returns (address) { + address owner = super._ownerOf(tokenId); + + // If token is owned by the core, or beyond consecutive range, return base value + if (owner != address(0) || tokenId > type(uint96).max || tokenId < _firstConsecutiveId()) { + return owner; + } + + // Otherwise, check the token was not burned, and fetch ownership from the anchors + // Note: no need for safe cast, we know that tokenId <= type(uint96).max + return _sequentialBurn.get(tokenId) ? address(0) : address(_sequentialOwnership.lowerLookup(uint96(tokenId))); + } + + /** + * @dev Mint a batch of tokens of length `batchSize` for `to`. Returns the token id of the first token minted in the + * batch; if `batchSize` is 0, returns the number of consecutive ids minted so far. + * + * Requirements: + * + * - `batchSize` must not be greater than {_maxBatchSize}. + * - The function is called in the constructor of the contract (directly or indirectly). + * + * CAUTION: Does not emit a `Transfer` event. This is ERC-721 compliant as long as it is done inside of the + * constructor, which is enforced by this function. + * + * CAUTION: Does not invoke `onERC721Received` on the receiver. + * + * Emits a {IERC2309-ConsecutiveTransfer} event. + */ + function _mintConsecutive(address to, uint96 batchSize) internal virtual returns (uint96) { + uint96 next = _nextConsecutiveId(); + + // minting a batch of size 0 is a no-op + if (batchSize > 0) { + if (address(this).code.length > 0) { + revert ERC721ForbiddenBatchMint(); + } + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + + uint256 maxBatchSize = _maxBatchSize(); + if (batchSize > maxBatchSize) { + revert ERC721ExceededMaxBatchMint(batchSize, maxBatchSize); + } + + // push an ownership checkpoint & emit event + uint96 last = next + batchSize - 1; + _sequentialOwnership.push(last, uint160(to)); + + // The invariant required by this function is preserved because the new sequentialOwnership checkpoint + // is attributing ownership of `batchSize` new tokens to account `to`. + _increaseBalance(to, batchSize); + + emit ConsecutiveTransfer(next, last, address(0), to); + } + + return next; + } + + /** + * @dev See {ERC721-_update}. Override version that restricts normal minting to after construction. + * + * WARNING: Using {ERC721Consecutive} prevents minting during construction in favor of {_mintConsecutive}. + * After construction, {_mintConsecutive} is no longer available and minting through {_update} becomes available. + */ + function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { + address previousOwner = super._update(to, tokenId, auth); + + // only mint after construction + if (previousOwner == address(0) && address(this).code.length == 0) { + revert ERC721ForbiddenMint(); + } + + // record burn + if ( + to == address(0) && // if we burn + tokenId < _nextConsecutiveId() && // and the tokenId was minted in a batch + !_sequentialBurn.get(tokenId) // and the token was never marked as burnt + ) { + _sequentialBurn.set(tokenId); + } + + return previousOwner; + } + + /** + * @dev Used to offset the first token id in `_nextConsecutiveId` + */ + function _firstConsecutiveId() internal view virtual returns (uint96) { + return 0; + } + + /** + * @dev Returns the next tokenId to mint using {_mintConsecutive}. It will return {_firstConsecutiveId} + * if no consecutive tokenId has been minted before. + */ + function _nextConsecutiveId() private view returns (uint96) { + (bool exists, uint96 latestId, ) = _sequentialOwnership.latestCheckpoint(); + return exists ? latestId + 1 : _firstConsecutiveId(); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Enumerable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Enumerable.sol similarity index 60% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Enumerable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Enumerable.sol index aab81a9f..109d1e84 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Enumerable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Enumerable.sol @@ -1,87 +1,80 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/extensions/ERC721Enumerable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../ERC721.sol"; -import "./IERC721Enumerable.sol"; +import {ERC721} from "../ERC721.sol"; +import {IERC721Enumerable} from "./IERC721Enumerable.sol"; +import {IERC165} from "../../../utils/introspection/ERC165.sol"; /** - * @dev This implements an optional extension of {ERC721} defined in the EIP that adds - * enumerability of all the token ids in the contract as well as all token ids owned by each - * account. + * @dev This implements an optional extension of {ERC721} defined in the ERC that adds enumerability + * of all the token ids in the contract as well as all token ids owned by each account. + * + * CAUTION: {ERC721} extensions that implement custom `balanceOf` logic, such as {ERC721Consecutive}, + * interfere with enumerability and should not be used together with {ERC721Enumerable}. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { - // Mapping from owner to list of owned token IDs - mapping(address => mapping(uint256 => uint256)) private _ownedTokens; + mapping(address owner => mapping(uint256 index => uint256)) private _ownedTokens; + mapping(uint256 tokenId => uint256) private _ownedTokensIndex; - // Mapping from token ID to index of the owner tokens list - mapping(uint256 => uint256) private _ownedTokensIndex; - - // Array with all token ids, used for enumeration uint256[] private _allTokens; + mapping(uint256 tokenId => uint256) private _allTokensIndex; - // Mapping from token id to position in the allTokens array - mapping(uint256 => uint256) private _allTokensIndex; + /** + * @dev An `owner`'s token query was out of bounds for `index`. + * + * NOTE: The owner being `address(0)` indicates a global out of bounds index. + */ + error ERC721OutOfBoundsIndex(address owner, uint256 index); /** - * @dev See {IERC165-supportsInterface}. + * @dev Batch mint is not allowed. */ + error ERC721EnumerableForbiddenBatchMint(); + + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } - /** - * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. - */ - function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { - require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); + /// @inheritdoc IERC721Enumerable + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256) { + if (index >= balanceOf(owner)) { + revert ERC721OutOfBoundsIndex(owner, index); + } return _ownedTokens[owner][index]; } - /** - * @dev See {IERC721Enumerable-totalSupply}. - */ - function totalSupply() public view virtual override returns (uint256) { + /// @inheritdoc IERC721Enumerable + function totalSupply() public view virtual returns (uint256) { return _allTokens.length; } - /** - * @dev See {IERC721Enumerable-tokenByIndex}. - */ - function tokenByIndex(uint256 index) public view virtual override returns (uint256) { - require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); + /// @inheritdoc IERC721Enumerable + function tokenByIndex(uint256 index) public view virtual returns (uint256) { + if (index >= totalSupply()) { + revert ERC721OutOfBoundsIndex(address(0), index); + } return _allTokens[index]; } - /** - * @dev See {ERC721-_beforeTokenTransfer}. - */ - function _beforeTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - super._beforeTokenTransfer(from, to, firstTokenId, batchSize); - - if (batchSize > 1) { - // Will only trigger during construction. Batch transferring (minting) is not available afterwards. - revert("ERC721Enumerable: consecutive transfers not supported"); - } + /// @inheritdoc ERC721 + function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { + address previousOwner = super._update(to, tokenId, auth); - uint256 tokenId = firstTokenId; - - if (from == address(0)) { + if (previousOwner == address(0)) { _addTokenToAllTokensEnumeration(tokenId); - } else if (from != to) { - _removeTokenFromOwnerEnumeration(from, tokenId); + } else if (previousOwner != to) { + _removeTokenFromOwnerEnumeration(previousOwner, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); - } else if (to != from) { + } else if (previousOwner != to) { _addTokenToOwnerEnumeration(to, tokenId); } + + return previousOwner; } /** @@ -90,7 +83,7 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { - uint256 length = ERC721.balanceOf(to); + uint256 length = balanceOf(to) - 1; _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } @@ -116,20 +109,22 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). - uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; + uint256 lastTokenIndex = balanceOf(from); uint256 tokenIndex = _ownedTokensIndex[tokenId]; + mapping(uint256 index => uint256) storage _ownedTokensByOwner = _ownedTokens[from]; + // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { - uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; + uint256 lastTokenId = _ownedTokensByOwner[lastTokenIndex]; - _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + _ownedTokensByOwner[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; - delete _ownedTokens[from][lastTokenIndex]; + delete _ownedTokensByOwner[lastTokenIndex]; } /** @@ -156,4 +151,15 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { delete _allTokensIndex[tokenId]; _allTokens.pop(); } + + /** + * See {ERC721-_increaseBalance}. We need to forbid batch minting because the enumeration + * extension does not support it. + */ + function _increaseBalance(address account, uint128 amount) internal virtual override { + if (amount > 0) { + revert ERC721EnumerableForbiddenBatchMint(); + } + super._increaseBalance(account, amount); + } } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Pausable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Pausable.sol similarity index 56% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Pausable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Pausable.sol index e8eb4b10..746febcb 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Pausable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Pausable.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/extensions/ERC721Pausable.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Pausable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../ERC721.sol"; -import "../../../security/Pausable.sol"; +import {ERC721} from "../ERC721.sol"; +import {Pausable} from "../../../utils/Pausable.sol"; /** - * @dev ERC721 token with pausable token transfers, minting and burning. + * @dev ERC-721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the @@ -17,24 +17,21 @@ import "../../../security/Pausable.sol"; * addition to inheriting this contract, you must define both functions, invoking the * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will - * make the contract unpausable. + * make the contract pause mechanism of the contract unreachable, and thus unusable. */ abstract contract ERC721Pausable is ERC721, Pausable { /** - * @dev See {ERC721-_beforeTokenTransfer}. + * @dev See {ERC721-_update}. * * Requirements: * * - the contract must not be paused. */ - function _beforeTokenTransfer( - address from, + function _update( address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - super._beforeTokenTransfer(from, to, firstTokenId, batchSize); - - require(!paused(), "ERC721Pausable: token transfer while paused"); + uint256 tokenId, + address auth + ) internal virtual override whenNotPaused returns (address) { + return super._update(to, tokenId, auth); } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Royalty.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Royalty.sol new file mode 100644 index 00000000..ff915ab6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Royalty.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Royalty.sol) + +pragma solidity ^0.8.24; + +import {ERC721} from "../ERC721.sol"; +import {IERC165} from "../../../utils/introspection/ERC165.sol"; +import {ERC2981} from "../../common/ERC2981.sol"; + +/** + * @dev Extension of ERC-721 with the ERC-2981 NFT Royalty Standard, a standardized way to retrieve royalty payment + * information. + * + * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually + * for specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. + * + * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to + * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. + */ +abstract contract ERC721Royalty is ERC2981, ERC721 { + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { + return super.supportsInterface(interfaceId); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721URIStorage.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721URIStorage.sol new file mode 100644 index 00000000..1b4fba54 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721URIStorage.sol @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/extensions/ERC721URIStorage.sol) + +pragma solidity ^0.8.24; + +import {ERC721} from "../ERC721.sol"; +import {IERC721Metadata} from "./IERC721Metadata.sol"; +import {IERC4906} from "../../../interfaces/IERC4906.sol"; +import {IERC165} from "../../../interfaces/IERC165.sol"; + +/** + * @dev ERC-721 token with storage based token URI management. + */ +abstract contract ERC721URIStorage is IERC4906, ERC721 { + // Interface ID as defined in ERC-4906. This does not correspond to a traditional interface ID as ERC-4906 only + // defines events and does not include any external function. + bytes4 private constant ERC4906_INTERFACE_ID = bytes4(0x49064906); + + // Optional mapping for token URIs + mapping(uint256 tokenId => string) private _tokenURIs; + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { + return interfaceId == ERC4906_INTERFACE_ID || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC721Metadata + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + _requireOwned(tokenId); + + string memory base = _baseURI(); + string memory suffix = _suffixURI(tokenId); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return suffix; + } + // If both are set, concatenate the baseURI and tokenURI (via string.concat). + if (bytes(suffix).length > 0) { + return string.concat(base, suffix); + } + + return super.tokenURI(tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Emits {IERC4906-MetadataUpdate}. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + _tokenURIs[tokenId] = _tokenURI; + emit MetadataUpdate(tokenId); + } + + /** + * @dev Returns the suffix part of the tokenURI for `tokenId`. + */ + function _suffixURI(uint256 tokenId) internal view virtual returns (string memory) { + return _tokenURIs[tokenId]; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Votes.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Votes.sol new file mode 100644 index 00000000..8a4a2c2c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Votes.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Votes.sol) + +pragma solidity ^0.8.24; + +import {ERC721} from "../ERC721.sol"; +import {Votes} from "../../../governance/utils/Votes.sol"; + +/** + * @dev Extension of ERC-721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts + * as 1 vote unit. + * + * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost + * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of + * the votes in governance decisions, or they can delegate to themselves to be their own representative. + */ +abstract contract ERC721Votes is ERC721, Votes { + /** + * @dev See {ERC721-_update}. Adjusts votes when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { + address previousOwner = super._update(to, tokenId, auth); + + _transferVotingUnits(previousOwner, to, 1); + + return previousOwner; + } + + /** + * @dev Returns the balance of `account`. + * + * WARNING: Overriding this function will likely result in incorrect vote tracking. + */ + function _getVotingUnits(address account) internal view virtual override returns (uint256) { + return balanceOf(account); + } + + /** + * @dev See {ERC721-_increaseBalance}. We need that to account tokens that were minted in batch. + */ + function _increaseBalance(address account, uint128 amount) internal virtual override { + super._increaseBalance(account, amount); + _transferVotingUnits(address(0), account, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Wrapper.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Wrapper.sol similarity index 66% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Wrapper.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Wrapper.sol index c7ff06de..07a97628 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/ERC721Wrapper.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/ERC721Wrapper.sol @@ -1,22 +1,26 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Wrapper.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Wrapper.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../ERC721.sol"; +import {IERC721, ERC721} from "../ERC721.sol"; +import {IERC721Receiver} from "../IERC721Receiver.sol"; /** - * @dev Extension of the ERC721 token contract to support token wrapping. + * @dev Extension of the ERC-721 token contract to support token wrapping. * - * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is useful - * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow the - * wrapping of an existing "basic" ERC721 into a governance token. - * - * _Available since v4.9.0_ + * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is + * useful in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow + * the wrapping of an existing "basic" ERC-721 into a governance token. */ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { IERC721 private immutable _underlying; + /** + * @dev The received ERC-721 token couldn't be wrapped. + */ + error ERC721UnsupportedToken(address token); + constructor(IERC721 underlyingToken) { _underlying = underlyingToken; } @@ -32,7 +36,7 @@ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { // This is an "unsafe" transfer that doesn't call any hook on the receiver. With underlying() being trusted // (by design of this contract) and no other contracts expected to be called from there, we are safe. // slither-disable-next-line reentrancy-no-eth - underlying().transferFrom(_msgSender(), address(this), tokenId); + underlying().transferFrom(_msgSender(), address(this), tokenId); // forge-lint: disable-line(erc20-unchecked-transfer) _safeMint(account, tokenId); } @@ -46,8 +50,9 @@ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { uint256 length = tokenIds.length; for (uint256 i = 0; i < length; ++i) { uint256 tokenId = tokenIds[i]; - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Wrapper: caller is not token owner or approved"); - _burn(tokenId); + // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists + // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. + _update(address(0), tokenId, _msgSender()); // Checks were already performed at this point, and there's no way to retake ownership or approval from // the wrapped tokenId after this point, so it's safe to remove the reentrancy check for the next line. // slither-disable-next-line reentrancy-no-eth @@ -58,7 +63,7 @@ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { } /** - * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC721 transfers to + * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC-721 transfers to * this contract. * * In case there's data attached, it validates that the operator is this contract, so only trusted data @@ -67,13 +72,10 @@ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { * WARNING: Doesn't work with unsafe transfers (eg. {IERC721-transferFrom}). Use {ERC721Wrapper-_recover} * for recovering in that scenario. */ - function onERC721Received( - address, - address from, - uint256 tokenId, - bytes memory - ) public virtual override returns (bytes4) { - require(address(underlying()) == _msgSender(), "ERC721Wrapper: caller is not underlying"); + function onERC721Received(address, address from, uint256 tokenId, bytes memory) public virtual returns (bytes4) { + if (address(underlying()) != _msgSender()) { + revert ERC721UnsupportedToken(_msgSender()); + } _safeMint(from, tokenId); return IERC721Receiver.onERC721Received.selector; } @@ -83,7 +85,10 @@ abstract contract ERC721Wrapper is ERC721, IERC721Receiver { * function that can be exposed with access control if desired. */ function _recover(address account, uint256 tokenId) internal virtual returns (uint256) { - require(underlying().ownerOf(tokenId) == address(this), "ERC721Wrapper: wrapper is not token owner"); + address owner = underlying().ownerOf(tokenId); + if (owner != address(this)) { + revert ERC721IncorrectOwner(address(this), tokenId, owner); + } _safeMint(account, tokenId); return tokenId; } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Enumerable.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/IERC721Enumerable.sol similarity index 87% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Enumerable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/IERC721Enumerable.sol index dfea427b..1fe58854 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Enumerable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/IERC721Enumerable.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/extensions/IERC721Enumerable.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../IERC721.sol"; +import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Metadata.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/IERC721Metadata.sol similarity index 79% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Metadata.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/IERC721Metadata.sol index dca77ba5..b4da16df 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/extensions/IERC721Metadata.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/extensions/IERC721Metadata.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/extensions/IERC721Metadata.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.2; -import "../IERC721.sol"; +import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/utils/ERC721Holder.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/utils/ERC721Holder.sol similarity index 59% rename from dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/utils/ERC721Holder.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/utils/ERC721Holder.sol index f18ad8a1..674334e0 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/ERC721/utils/ERC721Holder.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/utils/ERC721Holder.sol @@ -1,23 +1,26 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/utils/ERC721Holder.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../IERC721Receiver.sol"; +import {IERC721Receiver} from "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. - * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. + * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or + * {IERC721-setApprovalForAll}. + * + * @custom:stateless */ -contract ERC721Holder is IERC721Receiver { +abstract contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ - function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { + function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) { return this.onERC721Received.selector; } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/utils/ERC721Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/utils/ERC721Utils.sol new file mode 100644 index 00000000..2ae87ba6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/ERC721/utils/ERC721Utils.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/utils/ERC721Utils.sol) + +pragma solidity ^0.8.20; + +import {IERC721Receiver} from "../IERC721Receiver.sol"; +import {IERC721Errors} from "../../../interfaces/draft-IERC6093.sol"; + +/** + * @dev Library that provides common ERC-721 utility functions. + * + * See https://eips.ethereum.org/EIPS/eip-721[ERC-721]. + * + * _Available since v5.1._ + */ +library ERC721Utils { + /** + * @dev Performs an acceptance check for the provided `operator` by calling {IERC721Receiver-onERC721Received} + * on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`). + * + * The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA). + * Otherwise, the recipient must implement {IERC721Receiver-onERC721Received} and return the acceptance magic value to accept + * the transfer. + */ + function checkOnERC721Received( + address operator, + address from, + address to, + uint256 tokenId, + bytes memory data + ) internal { + if (to.code.length > 0) { + try IERC721Receiver(to).onERC721Received(operator, from, tokenId, data) returns (bytes4 retval) { + if (retval != IERC721Receiver.onERC721Received.selector) { + // Token rejected + revert IERC721Errors.ERC721InvalidReceiver(to); + } + } catch (bytes memory reason) { + if (reason.length == 0) { + // non-IERC721Receiver implementer + revert IERC721Errors.ERC721InvalidReceiver(to); + } else { + assembly ("memory-safe") { + revert(add(reason, 0x20), mload(reason)) + } + } + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/token/common/ERC2981.sol b/dependencies/@openzeppelin-contracts-5.6.1/token/common/ERC2981.sol similarity index 54% rename from dependencies/@openzeppelin-contracts-4.9.6/token/common/ERC2981.sol rename to dependencies/@openzeppelin-contracts-5.6.1/token/common/ERC2981.sol index 7d47b6c7..5d75e3aa 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/token/common/ERC2981.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/token/common/ERC2981.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (token/common/ERC2981.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../../interfaces/IERC2981.sol"; -import "../../utils/introspection/ERC165.sol"; +import {IERC2981} from "../../interfaces/IERC2981.sol"; +import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. @@ -16,10 +16,8 @@ import "../../utils/introspection/ERC165.sol"; * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See - * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. - * - * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { @@ -28,28 +26,50 @@ abstract contract ERC2981 is IERC2981, ERC165 { } RoyaltyInfo private _defaultRoyaltyInfo; - mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; + mapping(uint256 tokenId => RoyaltyInfo) private _tokenRoyaltyInfo; /** - * @dev See {IERC165-supportsInterface}. + * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1). */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { - return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); - } + error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator); + + /** + * @dev The default royalty receiver is invalid. + */ + error ERC2981InvalidDefaultRoyaltyReceiver(address receiver); + + /** + * @dev The royalty set for a specific `tokenId` is invalid (eg. (numerator / denominator) >= 1). + */ + error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator); /** - * @inheritdoc IERC2981 + * @dev The royalty receiver for `tokenId` is invalid. */ - function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { - RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; + error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver); + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { + return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); + } - if (royalty.receiver == address(0)) { - royalty = _defaultRoyaltyInfo; + /// @inheritdoc IERC2981 + function royaltyInfo( + uint256 tokenId, + uint256 salePrice + ) public view virtual returns (address receiver, uint256 amount) { + RoyaltyInfo storage _royaltyInfo = _tokenRoyaltyInfo[tokenId]; + address royaltyReceiver = _royaltyInfo.receiver; + uint96 royaltyFraction = _royaltyInfo.royaltyFraction; + + if (royaltyReceiver == address(0)) { + royaltyReceiver = _defaultRoyaltyInfo.receiver; + royaltyFraction = _defaultRoyaltyInfo.royaltyFraction; } - uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); + uint256 royaltyAmount = (salePrice * royaltyFraction) / _feeDenominator(); - return (royalty.receiver, royaltyAmount); + return (royaltyReceiver, royaltyAmount); } /** @@ -70,8 +90,14 @@ abstract contract ERC2981 is IERC2981, ERC165 { * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { - require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); - require(receiver != address(0), "ERC2981: invalid receiver"); + uint256 denominator = _feeDenominator(); + if (feeNumerator > denominator) { + // Royalty fee will exceed the sale price + revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator); + } + if (receiver == address(0)) { + revert ERC2981InvalidDefaultRoyaltyReceiver(address(0)); + } _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } @@ -92,8 +118,14 @@ abstract contract ERC2981 is IERC2981, ERC165 { * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { - require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); - require(receiver != address(0), "ERC2981: Invalid parameters"); + uint256 denominator = _feeDenominator(); + if (feeNumerator > denominator) { + // Royalty fee will exceed the sale price + revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator); + } + if (receiver == address(0)) { + revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0)); + } _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Address.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Address.sol new file mode 100644 index 00000000..e31fdb3f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Address.sol @@ -0,0 +1,167 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/Address.sol) + +pragma solidity ^0.8.20; + +import {Errors} from "./Errors.sol"; +import {LowLevelCall} from "./LowLevelCall.sol"; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev There's no code at `target` (it is not a contract). + */ + error AddressEmptyCode(address target); + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + if (address(this).balance < amount) { + revert Errors.InsufficientBalance(address(this).balance, amount); + } + if (LowLevelCall.callNoReturn(recipient, amount, "")) { + // call successful, nothing to do + return; + } else if (LowLevelCall.returnDataSize() > 0) { + LowLevelCall.bubbleRevert(); + } else { + revert Errors.FailedCall(); + } + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain `call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason or custom error, it is bubbled + * up by this function (like regular Solidity function calls). However, if + * the call reverted with no returned reason, this function reverts with a + * {Errors.FailedCall} error. + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + if (address(this).balance < value) { + revert Errors.InsufficientBalance(address(this).balance, value); + } + bool success = LowLevelCall.callNoReturn(target, value, data); + if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) { + return LowLevelCall.returnData(); + } else if (success) { + revert AddressEmptyCode(target); + } else if (LowLevelCall.returnDataSize() > 0) { + LowLevelCall.bubbleRevert(); + } else { + revert Errors.FailedCall(); + } + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + bool success = LowLevelCall.staticcallNoReturn(target, data); + if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) { + return LowLevelCall.returnData(); + } else if (success) { + revert AddressEmptyCode(target); + } else if (LowLevelCall.returnDataSize() > 0) { + LowLevelCall.bubbleRevert(); + } else { + revert Errors.FailedCall(); + } + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + bool success = LowLevelCall.delegatecallNoReturn(target, data); + if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) { + return LowLevelCall.returnData(); + } else if (success) { + revert AddressEmptyCode(target); + } else if (LowLevelCall.returnDataSize() > 0) { + LowLevelCall.bubbleRevert(); + } else { + revert Errors.FailedCall(); + } + } + + /** + * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target + * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case + * of an unsuccessful call. + * + * NOTE: This function is DEPRECATED and may be removed in the next major release. + */ + function verifyCallResultFromTarget( + address target, + bool success, + bytes memory returndata + ) internal view returns (bytes memory) { + // only check if target is a contract if the call was successful and the return data is empty + // otherwise we already know that it was a contract + if (success && (returndata.length > 0 || target.code.length > 0)) { + return returndata; + } else if (success) { + revert AddressEmptyCode(target); + } else if (returndata.length > 0) { + LowLevelCall.bubbleRevert(returndata); + } else { + revert Errors.FailedCall(); + } + } + + /** + * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the + * revert reason or with a default {Errors.FailedCall} error. + */ + function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { + if (success) { + return returndata; + } else if (returndata.length > 0) { + LowLevelCall.bubbleRevert(returndata); + } else { + revert Errors.FailedCall(); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Arrays.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Arrays.sol new file mode 100644 index 00000000..f837004f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Arrays.sol @@ -0,0 +1,888 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/Arrays.sol) +// This file was procedurally generated from scripts/generate/templates/Arrays.js. + +pragma solidity ^0.8.24; + +import {Comparators} from "./Comparators.sol"; +import {SlotDerivation} from "./SlotDerivation.sol"; +import {StorageSlot} from "./StorageSlot.sol"; +import {Math} from "./math/Math.sol"; + +/** + * @dev Collection of functions related to array types. + */ +library Arrays { + using SlotDerivation for bytes32; + using StorageSlot for bytes32; + + /** + * @dev Sort an array of uint256 (in memory) following the provided comparator function. + * + * This function does the sorting "in place", meaning that it overrides the input. The object is returned for + * convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array. + * + * NOTE: this function's cost is `O(n · log(n))` in average and `O(n²)` in the worst case, with n the length of the + * array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful + * when executing this as part of a transaction. If the array being sorted is too large, the sort operation may + * consume more gas than is available in a block, leading to potential DoS. + * + * IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way. + */ + function sort( + uint256[] memory array, + function(uint256, uint256) pure returns (bool) comp + ) internal pure returns (uint256[] memory) { + _quickSort(_begin(array), _end(array), comp); + return array; + } + + /** + * @dev Variant of {sort} that sorts an array of uint256 in increasing order. + */ + function sort(uint256[] memory array) internal pure returns (uint256[] memory) { + sort(array, Comparators.lt); + return array; + } + + /** + * @dev Sort an array of address (in memory) following the provided comparator function. + * + * This function does the sorting "in place", meaning that it overrides the input. The object is returned for + * convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array. + * + * NOTE: this function's cost is `O(n · log(n))` in average and `O(n²)` in the worst case, with n the length of the + * array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful + * when executing this as part of a transaction. If the array being sorted is too large, the sort operation may + * consume more gas than is available in a block, leading to potential DoS. + * + * IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way. + */ + function sort( + address[] memory array, + function(address, address) pure returns (bool) comp + ) internal pure returns (address[] memory) { + sort(_castToUint256Array(array), _castToUint256Comp(comp)); + return array; + } + + /** + * @dev Variant of {sort} that sorts an array of address in increasing order. + */ + function sort(address[] memory array) internal pure returns (address[] memory) { + sort(_castToUint256Array(array), Comparators.lt); + return array; + } + + /** + * @dev Sort an array of bytes32 (in memory) following the provided comparator function. + * + * This function does the sorting "in place", meaning that it overrides the input. The object is returned for + * convenience, but that returned value can be discarded safely if the caller has a memory pointer to the array. + * + * NOTE: this function's cost is `O(n · log(n))` in average and `O(n²)` in the worst case, with n the length of the + * array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful + * when executing this as part of a transaction. If the array being sorted is too large, the sort operation may + * consume more gas than is available in a block, leading to potential DoS. + * + * IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way. + */ + function sort( + bytes32[] memory array, + function(bytes32, bytes32) pure returns (bool) comp + ) internal pure returns (bytes32[] memory) { + sort(_castToUint256Array(array), _castToUint256Comp(comp)); + return array; + } + + /** + * @dev Variant of {sort} that sorts an array of bytes32 in increasing order. + */ + function sort(bytes32[] memory array) internal pure returns (bytes32[] memory) { + sort(_castToUint256Array(array), Comparators.lt); + return array; + } + + /** + * @dev Performs a quick sort of a segment of memory. The segment sorted starts at `begin` (inclusive), and stops + * at end (exclusive). Sorting follows the `comp` comparator. + * + * Invariant: `begin <= end`. This is the case when initially called by {sort} and is preserved in subcalls. + * + * IMPORTANT: Memory locations between `begin` and `end` are not validated/zeroed. This function should + * be used only if the limits are within a memory array. + */ + function _quickSort(uint256 begin, uint256 end, function(uint256, uint256) pure returns (bool) comp) private pure { + unchecked { + if (end - begin < 0x40) return; + + // Use first element as pivot + uint256 pivot = _mload(begin); + // Position where the pivot should be at the end of the loop + uint256 pos = begin; + + for (uint256 it = begin + 0x20; it < end; it += 0x20) { + if (comp(_mload(it), pivot)) { + // If the value stored at the iterator's position comes before the pivot, we increment the + // position of the pivot and move the value there. + pos += 0x20; + _swap(pos, it); + } + } + + _swap(begin, pos); // Swap pivot into place + _quickSort(begin, pos, comp); // Sort the left side of the pivot + _quickSort(pos + 0x20, end, comp); // Sort the right side of the pivot + } + } + + /** + * @dev Pointer to the memory location of the first element of `array`. + */ + function _begin(uint256[] memory array) private pure returns (uint256 ptr) { + assembly ("memory-safe") { + ptr := add(array, 0x20) + } + } + + /** + * @dev Pointer to the memory location of the first memory word (32bytes) after `array`. This is the memory word + * that comes just after the last element of the array. + */ + function _end(uint256[] memory array) private pure returns (uint256 ptr) { + unchecked { + return _begin(array) + array.length * 0x20; + } + } + + /** + * @dev Load memory word (as a uint256) at location `ptr`. + */ + function _mload(uint256 ptr) private pure returns (uint256 value) { + assembly { + value := mload(ptr) + } + } + + /** + * @dev Swaps the elements memory location `ptr1` and `ptr2`. + */ + function _swap(uint256 ptr1, uint256 ptr2) private pure { + assembly { + let value1 := mload(ptr1) + let value2 := mload(ptr2) + mstore(ptr1, value2) + mstore(ptr2, value1) + } + } + + /// @dev Helper: low level cast address memory array to uint256 memory array + function _castToUint256Array(address[] memory input) private pure returns (uint256[] memory output) { + assembly { + output := input + } + } + + /// @dev Helper: low level cast bytes32 memory array to uint256 memory array + function _castToUint256Array(bytes32[] memory input) private pure returns (uint256[] memory output) { + assembly { + output := input + } + } + + /// @dev Helper: low level cast address comp function to uint256 comp function + function _castToUint256Comp( + function(address, address) pure returns (bool) input + ) private pure returns (function(uint256, uint256) pure returns (bool) output) { + assembly { + output := input + } + } + + /// @dev Helper: low level cast bytes32 comp function to uint256 comp function + function _castToUint256Comp( + function(bytes32, bytes32) pure returns (bool) input + ) private pure returns (function(uint256, uint256) pure returns (bool) output) { + assembly { + output := input + } + } + + /** + * @dev Searches a sorted `array` and returns the first index that contains + * a value greater or equal to `element`. If no such index exists (i.e. all + * values in the array are strictly less than `element`), the array length is + * returned. Time complexity O(log n). + * + * NOTE: The `array` is expected to be sorted in ascending order, and to + * contain no repeated elements. + * + * IMPORTANT: Deprecated. This implementation behaves as {lowerBound} but lacks + * support for repeated elements in the array. The {lowerBound} function should + * be used instead. + */ + function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { + uint256 low = 0; + uint256 high = array.length; + + if (high == 0) { + return 0; + } + + while (low < high) { + uint256 mid = Math.average(low, high); + + // Note that mid will always be strictly less than high (i.e. it will be a valid array index) + // because Math.average rounds towards zero (it does integer division with truncation). + if (unsafeAccess(array, mid).value > element) { + high = mid; + } else { + low = mid + 1; + } + } + + // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. + if (low > 0 && unsafeAccess(array, low - 1).value == element) { + return low - 1; + } else { + return low; + } + } + + /** + * @dev Searches an `array` sorted in ascending order and returns the first + * index that contains a value greater or equal than `element`. If no such index + * exists (i.e. all values in the array are strictly less than `element`), the array + * length is returned. Time complexity O(log n). + * + * See C++'s https://en.cppreference.com/w/cpp/algorithm/lower_bound[lower_bound]. + */ + function lowerBound(uint256[] storage array, uint256 element) internal view returns (uint256) { + uint256 low = 0; + uint256 high = array.length; + + if (high == 0) { + return 0; + } + + while (low < high) { + uint256 mid = Math.average(low, high); + + // Note that mid will always be strictly less than high (i.e. it will be a valid array index) + // because Math.average rounds towards zero (it does integer division with truncation). + if (unsafeAccess(array, mid).value < element) { + // this cannot overflow because mid < high + unchecked { + low = mid + 1; + } + } else { + high = mid; + } + } + + return low; + } + + /** + * @dev Searches an `array` sorted in ascending order and returns the first + * index that contains a value strictly greater than `element`. If no such index + * exists (i.e. all values in the array are strictly less than `element`), the array + * length is returned. Time complexity O(log n). + * + * See C++'s https://en.cppreference.com/w/cpp/algorithm/upper_bound[upper_bound]. + */ + function upperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { + uint256 low = 0; + uint256 high = array.length; + + if (high == 0) { + return 0; + } + + while (low < high) { + uint256 mid = Math.average(low, high); + + // Note that mid will always be strictly less than high (i.e. it will be a valid array index) + // because Math.average rounds towards zero (it does integer division with truncation). + if (unsafeAccess(array, mid).value > element) { + high = mid; + } else { + // this cannot overflow because mid < high + unchecked { + low = mid + 1; + } + } + } + + return low; + } + + /** + * @dev Same as {lowerBound}, but with an array in memory. + */ + function lowerBoundMemory(uint256[] memory array, uint256 element) internal pure returns (uint256) { + uint256 low = 0; + uint256 high = array.length; + + if (high == 0) { + return 0; + } + + while (low < high) { + uint256 mid = Math.average(low, high); + + // Note that mid will always be strictly less than high (i.e. it will be a valid array index) + // because Math.average rounds towards zero (it does integer division with truncation). + if (unsafeMemoryAccess(array, mid) < element) { + // this cannot overflow because mid < high + unchecked { + low = mid + 1; + } + } else { + high = mid; + } + } + + return low; + } + + /** + * @dev Same as {upperBound}, but with an array in memory. + */ + function upperBoundMemory(uint256[] memory array, uint256 element) internal pure returns (uint256) { + uint256 low = 0; + uint256 high = array.length; + + if (high == 0) { + return 0; + } + + while (low < high) { + uint256 mid = Math.average(low, high); + + // Note that mid will always be strictly less than high (i.e. it will be a valid array index) + // because Math.average rounds towards zero (it does integer division with truncation). + if (unsafeMemoryAccess(array, mid) > element) { + high = mid; + } else { + // this cannot overflow because mid < high + unchecked { + low = mid + 1; + } + } + } + + return low; + } + + /** + * @dev Copies the content of `array`, from `start` (included) to the end of `array` into a new address array in + * memory. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(address[] memory array, uint256 start) internal pure returns (address[] memory) { + return slice(array, start, array.length); + } + + /** + * @dev Copies the content of `array`, from `start` (included) to `end` (excluded) into a new address array in + * memory. The `end` argument is truncated to the length of the `array`. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(address[] memory array, uint256 start, uint256 end) internal pure returns (address[] memory) { + // sanitize + end = Math.min(end, array.length); + start = Math.min(start, end); + + // allocate and copy + address[] memory result = new address[](end - start); + assembly ("memory-safe") { + mcopy(add(result, 0x20), add(add(array, 0x20), mul(start, 0x20)), mul(sub(end, start), 0x20)) + } + + return result; + } + + /** + * @dev Copies the content of `array`, from `start` (included) to the end of `array` into a new bytes32 array in + * memory. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(bytes32[] memory array, uint256 start) internal pure returns (bytes32[] memory) { + return slice(array, start, array.length); + } + + /** + * @dev Copies the content of `array`, from `start` (included) to `end` (excluded) into a new bytes32 array in + * memory. The `end` argument is truncated to the length of the `array`. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(bytes32[] memory array, uint256 start, uint256 end) internal pure returns (bytes32[] memory) { + // sanitize + end = Math.min(end, array.length); + start = Math.min(start, end); + + // allocate and copy + bytes32[] memory result = new bytes32[](end - start); + assembly ("memory-safe") { + mcopy(add(result, 0x20), add(add(array, 0x20), mul(start, 0x20)), mul(sub(end, start), 0x20)) + } + + return result; + } + + /** + * @dev Copies the content of `array`, from `start` (included) to the end of `array` into a new uint256 array in + * memory. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(uint256[] memory array, uint256 start) internal pure returns (uint256[] memory) { + return slice(array, start, array.length); + } + + /** + * @dev Copies the content of `array`, from `start` (included) to `end` (excluded) into a new uint256 array in + * memory. The `end` argument is truncated to the length of the `array`. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(uint256[] memory array, uint256 start, uint256 end) internal pure returns (uint256[] memory) { + // sanitize + end = Math.min(end, array.length); + start = Math.min(start, end); + + // allocate and copy + uint256[] memory result = new uint256[](end - start); + assembly ("memory-safe") { + mcopy(add(result, 0x20), add(add(array, 0x20), mul(start, 0x20)), mul(sub(end, start), 0x20)) + } + + return result; + } + + /** + * @dev Moves the content of `array`, from `start` (included) to the end of `array` to the start of that array, + * and shrinks the array length accordingly, effectively overwriting the array with array[start:]. + * + * NOTE: This function modifies the provided array in place. If you need to preserve the original array, use {slice} instead. + */ + function splice(address[] memory array, uint256 start) internal pure returns (address[] memory) { + return splice(array, start, array.length); + } + + /** + * @dev Moves the content of `array`, from `start` (included) to `end` (excluded) to the start of that array, + * and shrinks the array length accordingly, effectively overwriting the array with array[start:end]. The + * `end` argument is truncated to the length of the `array`. + * + * NOTE: This function modifies the provided array in place. If you need to preserve the original array, use {slice} instead. + */ + function splice(address[] memory array, uint256 start, uint256 end) internal pure returns (address[] memory) { + // sanitize + end = Math.min(end, array.length); + start = Math.min(start, end); + + // move and resize + assembly ("memory-safe") { + mcopy(add(array, 0x20), add(add(array, 0x20), mul(start, 0x20)), mul(sub(end, start), 0x20)) + mstore(array, sub(end, start)) + } + + return array; + } + + /** + * @dev Replaces elements in `array` starting at `pos` with all elements from `replacement`. + * + * Parameters are clamped to valid ranges (e.g. `pos` is clamped to `[0, array.length]`). + * If `pos >= array.length`, no replacement occurs and the array is returned unchanged. + * + * NOTE: This function modifies the provided array in place. + */ + function replace( + address[] memory array, + uint256 pos, + address[] memory replacement + ) internal pure returns (address[] memory) { + return replace(array, pos, replacement, 0, replacement.length); + } + + /** + * @dev Replaces elements in `array` starting at `pos` with elements from `replacement` starting at `offset`. + * Copies at most `length` elements from `replacement` to `array`. + * + * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, array.length]`, `offset` is + * clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset, + * array.length - pos)`). If `pos >= array.length` or `offset >= replacement.length`, no replacement occurs + * and the array is returned unchanged. + * + * NOTE: This function modifies the provided array in place. + */ + function replace( + address[] memory array, + uint256 pos, + address[] memory replacement, + uint256 offset, + uint256 length + ) internal pure returns (address[] memory) { + // sanitize + pos = Math.min(pos, array.length); + offset = Math.min(offset, replacement.length); + length = Math.min(length, Math.min(replacement.length - offset, array.length - pos)); + + // replace + assembly ("memory-safe") { + mcopy( + add(add(array, 0x20), mul(pos, 0x20)), + add(add(replacement, 0x20), mul(offset, 0x20)), + mul(length, 0x20) + ) + } + + return array; + } + + /** + * @dev Moves the content of `array`, from `start` (included) to the end of `array` to the start of that array, + * and shrinks the array length accordingly, effectively overwriting the array with array[start:]. + * + * NOTE: This function modifies the provided array in place. If you need to preserve the original array, use {slice} instead. + */ + function splice(bytes32[] memory array, uint256 start) internal pure returns (bytes32[] memory) { + return splice(array, start, array.length); + } + + /** + * @dev Moves the content of `array`, from `start` (included) to `end` (excluded) to the start of that array, + * and shrinks the array length accordingly, effectively overwriting the array with array[start:end]. The + * `end` argument is truncated to the length of the `array`. + * + * NOTE: This function modifies the provided array in place. If you need to preserve the original array, use {slice} instead. + */ + function splice(bytes32[] memory array, uint256 start, uint256 end) internal pure returns (bytes32[] memory) { + // sanitize + end = Math.min(end, array.length); + start = Math.min(start, end); + + // move and resize + assembly ("memory-safe") { + mcopy(add(array, 0x20), add(add(array, 0x20), mul(start, 0x20)), mul(sub(end, start), 0x20)) + mstore(array, sub(end, start)) + } + + return array; + } + + /** + * @dev Replaces elements in `array` starting at `pos` with all elements from `replacement`. + * + * Parameters are clamped to valid ranges (e.g. `pos` is clamped to `[0, array.length]`). + * If `pos >= array.length`, no replacement occurs and the array is returned unchanged. + * + * NOTE: This function modifies the provided array in place. + */ + function replace( + bytes32[] memory array, + uint256 pos, + bytes32[] memory replacement + ) internal pure returns (bytes32[] memory) { + return replace(array, pos, replacement, 0, replacement.length); + } + + /** + * @dev Replaces elements in `array` starting at `pos` with elements from `replacement` starting at `offset`. + * Copies at most `length` elements from `replacement` to `array`. + * + * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, array.length]`, `offset` is + * clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset, + * array.length - pos)`). If `pos >= array.length` or `offset >= replacement.length`, no replacement occurs + * and the array is returned unchanged. + * + * NOTE: This function modifies the provided array in place. + */ + function replace( + bytes32[] memory array, + uint256 pos, + bytes32[] memory replacement, + uint256 offset, + uint256 length + ) internal pure returns (bytes32[] memory) { + // sanitize + pos = Math.min(pos, array.length); + offset = Math.min(offset, replacement.length); + length = Math.min(length, Math.min(replacement.length - offset, array.length - pos)); + + // replace + assembly ("memory-safe") { + mcopy( + add(add(array, 0x20), mul(pos, 0x20)), + add(add(replacement, 0x20), mul(offset, 0x20)), + mul(length, 0x20) + ) + } + + return array; + } + + /** + * @dev Moves the content of `array`, from `start` (included) to the end of `array` to the start of that array, + * and shrinks the array length accordingly, effectively overwriting the array with array[start:]. + * + * NOTE: This function modifies the provided array in place. If you need to preserve the original array, use {slice} instead. + */ + function splice(uint256[] memory array, uint256 start) internal pure returns (uint256[] memory) { + return splice(array, start, array.length); + } + + /** + * @dev Moves the content of `array`, from `start` (included) to `end` (excluded) to the start of that array, + * and shrinks the array length accordingly, effectively overwriting the array with array[start:end]. The + * `end` argument is truncated to the length of the `array`. + * + * NOTE: This function modifies the provided array in place. If you need to preserve the original array, use {slice} instead. + */ + function splice(uint256[] memory array, uint256 start, uint256 end) internal pure returns (uint256[] memory) { + // sanitize + end = Math.min(end, array.length); + start = Math.min(start, end); + + // move and resize + assembly ("memory-safe") { + mcopy(add(array, 0x20), add(add(array, 0x20), mul(start, 0x20)), mul(sub(end, start), 0x20)) + mstore(array, sub(end, start)) + } + + return array; + } + + /** + * @dev Replaces elements in `array` starting at `pos` with all elements from `replacement`. + * + * Parameters are clamped to valid ranges (e.g. `pos` is clamped to `[0, array.length]`). + * If `pos >= array.length`, no replacement occurs and the array is returned unchanged. + * + * NOTE: This function modifies the provided array in place. + */ + function replace( + uint256[] memory array, + uint256 pos, + uint256[] memory replacement + ) internal pure returns (uint256[] memory) { + return replace(array, pos, replacement, 0, replacement.length); + } + + /** + * @dev Replaces elements in `array` starting at `pos` with elements from `replacement` starting at `offset`. + * Copies at most `length` elements from `replacement` to `array`. + * + * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, array.length]`, `offset` is + * clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset, + * array.length - pos)`). If `pos >= array.length` or `offset >= replacement.length`, no replacement occurs + * and the array is returned unchanged. + * + * NOTE: This function modifies the provided array in place. + */ + function replace( + uint256[] memory array, + uint256 pos, + uint256[] memory replacement, + uint256 offset, + uint256 length + ) internal pure returns (uint256[] memory) { + // sanitize + pos = Math.min(pos, array.length); + offset = Math.min(offset, replacement.length); + length = Math.min(length, Math.min(replacement.length - offset, array.length - pos)); + + // replace + assembly ("memory-safe") { + mcopy( + add(add(array, 0x20), mul(pos, 0x20)), + add(add(replacement, 0x20), mul(offset, 0x20)), + mul(length, 0x20) + ) + } + + return array; + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { + bytes32 slot; + assembly ("memory-safe") { + slot := arr.slot + } + return slot.deriveArray().offset(pos).getAddressSlot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { + bytes32 slot; + assembly ("memory-safe") { + slot := arr.slot + } + return slot.deriveArray().offset(pos).getBytes32Slot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { + bytes32 slot; + assembly ("memory-safe") { + slot := arr.slot + } + return slot.deriveArray().offset(pos).getUint256Slot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(bytes[] storage arr, uint256 pos) internal pure returns (StorageSlot.BytesSlot storage) { + bytes32 slot; + assembly ("memory-safe") { + slot := arr.slot + } + return slot.deriveArray().offset(pos).getBytesSlot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeAccess(string[] storage arr, uint256 pos) internal pure returns (StorageSlot.StringSlot storage) { + bytes32 slot; + assembly ("memory-safe") { + slot := arr.slot + } + return slot.deriveArray().offset(pos).getStringSlot(); + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) { + assembly { + res := mload(add(add(arr, 0x20), mul(pos, 0x20))) + } + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeMemoryAccess(bytes32[] memory arr, uint256 pos) internal pure returns (bytes32 res) { + assembly { + res := mload(add(add(arr, 0x20), mul(pos, 0x20))) + } + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) { + assembly { + res := mload(add(add(arr, 0x20), mul(pos, 0x20))) + } + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeMemoryAccess(bytes[] memory arr, uint256 pos) internal pure returns (bytes memory res) { + assembly { + res := mload(add(add(arr, 0x20), mul(pos, 0x20))) + } + } + + /** + * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. + * + * WARNING: Only use if you are certain `pos` is lower than the array length. + */ + function unsafeMemoryAccess(string[] memory arr, uint256 pos) internal pure returns (string memory res) { + assembly { + res := mload(add(add(arr, 0x20), mul(pos, 0x20))) + } + } + + /** + * @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden. + * + * WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased. + */ + function unsafeSetLength(address[] storage array, uint256 len) internal { + assembly ("memory-safe") { + sstore(array.slot, len) + } + } + + /** + * @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden. + * + * WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased. + */ + function unsafeSetLength(bytes32[] storage array, uint256 len) internal { + assembly ("memory-safe") { + sstore(array.slot, len) + } + } + + /** + * @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden. + * + * WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased. + */ + function unsafeSetLength(uint256[] storage array, uint256 len) internal { + assembly ("memory-safe") { + sstore(array.slot, len) + } + } + + /** + * @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden. + * + * WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased. + */ + function unsafeSetLength(bytes[] storage array, uint256 len) internal { + assembly ("memory-safe") { + sstore(array.slot, len) + } + } + + /** + * @dev Helper to set the length of a dynamic array. Directly writing to `.length` is forbidden. + * + * WARNING: this does not clear elements if length is reduced, or initialize elements if length is increased. + */ + function unsafeSetLength(string[] storage array, uint256 len) internal { + assembly ("memory-safe") { + sstore(array.slot, len) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Base58.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Base58.sol new file mode 100644 index 00000000..13f81b07 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Base58.sol @@ -0,0 +1,240 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/Base58.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Provides a set of functions to operate with Base58 strings. + * + * Base58 is an encoding scheme that converts binary data into a human-readable text format. + * Similar to {Base64} but specifically designed for better human usability. + * + * 1. Human-friendly alphabet: Excludes visually similar characters to reduce human error: + * * No 0 (zero) vs O (capital o) confusion + * * No I (capital i) vs l (lowercase L) confusion + * * No non-alphanumeric characters like + or = + * 2. URL-safe: Contains only alphanumeric characters, making it safe for URLs without encoding. + * + * Initially based on https://github.com/storyicon/base58-solidity/commit/807428e5174e61867e4c606bdb26cba58a8c5cb1[storyicon's implementation] (MIT). + * Based on the updated and improved https://github.com/Vectorized/solady/blob/208e4f31cfae26e4983eb95c3488a14fdc497ad7/src/utils/Base58.sol[Vectorized version] (MIT). + */ +library Base58 { + /// @dev Unrecognized Base58 character on decoding. + error InvalidBase58Char(bytes1); + + /** + * @dev Encode a `bytes` buffer as a Base58 `string`. + */ + function encode(bytes memory input) internal pure returns (string memory) { + return string(_encode(input)); + } + + /** + * @dev Decode a Base58 `string` into a `bytes` buffer. + */ + function decode(string memory input) internal pure returns (bytes memory) { + return _decode(bytes(input)); + } + + function _encode(bytes memory input) private pure returns (bytes memory output) { + uint256 inputLength = input.length; + if (inputLength == 0) return ""; + + assembly ("memory-safe") { + // Count number of zero bytes at the beginning of `input`. These are encoded using the same number of '1's + // at the beginning of the encoded string. + let inputLeadingZeros := 0 + for {} lt(byte(0, mload(add(add(input, 0x20), inputLeadingZeros))), lt(inputLeadingZeros, inputLength)) {} { + inputLeadingZeros := add(inputLeadingZeros, 1) + } + + // Start the output offset by an over-estimate of the length. + // When converting from base-256 (bytes) to base-58, the theoretical length ratio is log(256)/log(58). + // We use 9886/7239 ≈ 1.3657 as a rational approximation that slightly over-estimates to ensure + // sufficient memory allocation. + let outputLengthEstim := add(inputLeadingZeros, div(mul(sub(inputLength, inputLeadingZeros), 9886), 7239)) + + // This is going to be our "scratch" workspace. We leave enough room so that we can store length + encoded output at the FMP location. + // 0x21 = 0x20 (32 bytes for result length prefix) + 0x1 (safety buffer for division truncation) + let scratch := add(mload(0x40), add(outputLengthEstim, 0x21)) + + // Chunk input into 31-byte limbs (248 bits) for efficient batch processing. + // Each limb fits safely in a 256-bit word with 8-bit overflow protection. + // Memory layout: [output chars] [limb₁(248 bits)][limb₂(248 bits)][limb₃(248 bits)]... + // ↑ scratch + // ↑ ptr (moves right) + let ptr := scratch + for { + // Handle partial first limb if input length isn't divisible by 31 + let i := mod(inputLength, 31) + if i { + // Right-shift to align partial limb in high bits of 256-bit word + mstore(ptr, shr(mul(sub(32, i), 8), mload(add(input, 0x20)))) + ptr := add(ptr, 0x20) // next limb + } + } lt(i, inputLength) { + ptr := add(ptr, 0x20) // next limb + i := add(i, 31) // move in buffer + } { + // Load 31 bytes from input, right-shift by 8 bits to leave 1 zero byte on the left. + mstore(ptr, shr(8, mload(add(add(input, 0x20), i)))) + } + + // Store the encoding table. This overlaps with the FMP that we are going to reset later anyway. + // See https://datatracker.ietf.org/doc/html/draft-msporny-base58-03#section-2 + mstore(0x1f, "123456789ABCDEFGHJKLMNPQRSTUVWXY") + mstore(0x3f, "Zabcdefghijkmnopqrstuvwxyz") + + // Core Base58 encoding: repeated division by 58 on input limbs + // Memory layout: [output chars] [limb₁(248 bits)][limb₂(248 bits)][limb₃(248 bits)]... + // ↑ scratch ↑ ptr + // ↑ output (moves left) + // ↑ data (moves right) + for { + let data := scratch // Points to first non-zero limb + output := scratch // Builds result right-to-left from scratch + } 1 {} { + // Skip zero limbs at the beginning (limbs become 0 after repeated divisions) + for {} and(iszero(mload(data)), lt(data, ptr)) { + data := add(data, 0x20) + } {} + // Exit when all limbs are zero (conversion complete) + if eq(data, ptr) { + break + } + + // Division by 58 across all remaining limbs + let carry := 0 + for { + let i := data + } lt(i, ptr) { + i := add(i, 0x20) + } { + let acc := add(shl(248, carry), mload(i)) // Combine carry from previous limb with current limb + mstore(i, div(acc, 58)) // Store quotient back in limb + carry := mod(acc, 58) // Remainder becomes next carry + } + + // Convert remainder (0-57) to Base58 character and store right-to-left in the output space + output := sub(output, 1) + mstore8(output, mload(carry)) + } + + // Write the input leading zeros at the left of the encoded. + // This may spill to the left into the "length" of the buffer. + for { + let i := 0 + } lt(i, inputLeadingZeros) {} { + i := add(i, 0x20) + mstore(sub(output, i), "11111111111111111111111111111111") + } + + // Move output pointer to account for inputLeadingZeros + output := sub(output, add(inputLeadingZeros, 0x20)) + + // Store length and allocate (reserve) memory up to scratch. + mstore(output, sub(scratch, add(output, 0x20))) // Overwrite spilled bytes + mstore(0x40, scratch) + } + } + + function _decode(bytes memory input) private pure returns (bytes memory output) { + bytes4 errorSelector = InvalidBase58Char.selector; + + uint256 inputLength = input.length; + if (inputLength == 0) return ""; + + assembly ("memory-safe") { + let inputLeadingZeros := 0 // Number of leading '1' in `input`. + // Count leading zeros. In base58, zeros are represented using '1' (chr(49)). + for {} and( + eq(byte(0, mload(add(add(input, 0x20), inputLeadingZeros))), 49), + lt(inputLeadingZeros, inputLength) + ) {} { + inputLeadingZeros := add(inputLeadingZeros, 1) + } + + // Estimate the output length using the base conversion ratio. + // When converting from base-58 to base-256 (bytes), the theoretical length ratio is log(58)/log(256). + // We use 6115/8351 ≈ 0.7322 as a rational approximation that slightly over-estimates to ensure + // sufficient memory allocation. + let outputLengthEstim := add(inputLeadingZeros, div(mul(sub(inputLength, inputLeadingZeros), 6115), 8351)) + + // This is going to be our "scratch" workspace. We leave enough room so that we can store length + decoded output at the FMP location. + // 0x21 = 0x20 (32 bytes for result length prefix) + 0x1 (safety buffer for division truncation) + let scratch := add(mload(0x40), add(outputLengthEstim, 0x21)) + + // Store the decoding table for character-to-value lookup. This overlaps with the FMP that we are going to reset later anyway. + // Maps ASCII characters (minus 49) to their Base58 numeric values (0-57), with 0xff for invalid characters + mstore(0x2a, 0x30313233343536373839) + mstore(0x20, 0x1718191a1b1c1d1e1f20ffffffffffff2122232425262728292a2bff2c2d2e2f) + mstore(0x00, 0x000102030405060708ffffffffffffff090a0b0c0d0e0f10ff1112131415ff16) + + // Core Base58 decoding: process each character and accumulate into 31-byte limbs + // Memory layout: [output bytes] [limb₁(248 bits)][limb₂(248 bits)][limb₃(248 bits)]... + // ↑ scratch + // ↑ ptr (moves right as limbs are added) + let ptr := scratch + let mask := shr(8, not(0)) + for { + let j := 0 + } lt(j, inputLength) { + j := add(j, 1) + } { + // Decode each character: convert from ASCII to Base58 numeric value (0-57) + let c := sub(byte(0, mload(add(add(input, 0x20), j))), 49) // Offset from '1' (ASCII 49) + + // Validate character using bit manipulation: each bit in the bitmask represents a valid character offset + // 0x3fff7ff03ffbeff01ff has bits set for all valid Base58 characters (excludes 0, O, I, l) + // shl(c, 1) creates a single bit at position c, AND with bitmask checks if character is valid + // slither-disable-next-line incorrect-shift + if iszero(and(shl(c, 1), 0x3fff7ff03ffbeff01ff)) { + mstore(0, errorSelector) + mstore(4, shl(248, add(c, 49))) + revert(0, 0x24) + } + let carry := byte(0, mload(c)) // Look up Base58 numeric value from decoding table + + // Multiplication by 58 and addition across all existing limbs + for { + let i := scratch + } lt(i, ptr) { + i := add(i, 0x20) + } { + let acc := add(carry, mul(58, mload(i))) // Multiply limb by 58 and add carry + mstore(i, and(mask, acc)) // Store lower 248 bits back in limb + carry := shr(248, acc) // Upper bits become carry for next limb + } + // If carry remains, we need a new limb to store the overflow + if carry { + mstore(ptr, carry) + ptr := add(ptr, 0x20) // Extend limbs array + } + } + + // Copy and compact the uint248 limbs + remove any zeros at the beginning. + output := scratch + for { + let i := scratch + } lt(i, ptr) { + i := add(i, 0x20) + } { + output := sub(output, 31) + mstore(sub(output, 1), mload(i)) + } + for {} lt(byte(0, mload(output)), lt(output, scratch)) {} { + output := add(output, 1) + } + + // Add the zeros that were encoded in the input (prefix '1's) + calldatacopy(sub(output, inputLeadingZeros), calldatasize(), inputLeadingZeros) + + // Move output pointer to account for inputLeadingZeros + output := sub(output, add(inputLeadingZeros, 0x20)) + + // Store length and allocate (reserve) memory up to scratch. + mstore(output, sub(scratch, add(output, 0x20))) + mstore(0x40, scratch) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Base64.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Base64.sol new file mode 100644 index 00000000..02199c5d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Base64.sol @@ -0,0 +1,234 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/Base64.sol) + +pragma solidity ^0.8.20; + +import {SafeCast} from "./math/SafeCast.sol"; + +/** + * @dev Provides a set of functions to operate with Base64 strings. + */ +library Base64 { + using SafeCast for bool; + + error InvalidBase64Char(bytes1); + + /** + * @dev Converts a `bytes` to its Base64 `string` representation. + */ + function encode(bytes memory data) internal pure returns (string memory) { + return string(_encode(data, false)); + } + + /** + * @dev Converts a `bytes` to its Base64Url `string` representation. + * Output is not padded with `=` as specified in https://www.rfc-editor.org/rfc/rfc4648[rfc4648]. + */ + function encodeURL(bytes memory data) internal pure returns (string memory) { + return string(_encode(data, true)); + } + + /** + * @dev Converts a Base64 `string` to the `bytes` it represents. + * + * * Supports padded and unpadded inputs. + * * Supports both encoding ({encode} and {encodeURL}) seamlessly. + * * Reverts with {InvalidBase64Char} if the input contains an invalid character. + */ + function decode(string memory data) internal pure returns (bytes memory) { + return _decode(bytes(data)); + } + + /** + * @dev Internal table-agnostic encoding + * + * Padding is enabled when using the Base64 table, and disabled when using the Base64Url table. + * See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648 + */ + function _encode(bytes memory data, bool urlAndFilenameSafe) private pure returns (bytes memory result) { + /** + * Inspired by Brecht Devos (Brechtpd) implementation - MIT license + * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol + */ + if (data.length == 0) return ""; + + // Padding is enabled by default, but disabled when the "urlAndFilenameSafe" alphabet is used + // + // If padding is enabled, the final length should be `bytes` data length divided by 3 rounded up and then + // multiplied by 4 so that it leaves room for padding the last chunk + // - `data.length + 2` -> Prepare for division rounding up + // - `/ 3` -> Number of 3-bytes chunks (rounded up) + // - `4 *` -> 4 characters for each chunk + // This is equivalent to: 4 * Math.ceil(data.length / 3) + // + // If padding is disabled, the final length should be `bytes` data length multiplied by 4/3 rounded up as + // opposed to when padding is required to fill the last chunk. + // - `4 * data.length` -> 4 characters for each chunk + // - ` + 2` -> Prepare for division rounding up + // - `/ 3` -> Number of 3-bytes chunks (rounded up) + // This is equivalent to: Math.ceil((4 * data.length) / 3) + uint256 resultLength = urlAndFilenameSafe ? (4 * data.length + 2) / 3 : 4 * ((data.length + 2) / 3); + + assembly ("memory-safe") { + result := mload(0x40) + + // Store the encoding table in the scratch space (and fmp ptr) to avoid memory allocation + // + // Base64 (ascii) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + / + // Base64 (hex) 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f + // Base64Url (ascii) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 - _ + // Base64Url (hex) 4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392d5f + // xor (hex) 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000670 + mstore(0x1f, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef") + mstore(0x3f, xor("ghijklmnopqrstuvwxyz0123456789+/", mul(urlAndFilenameSafe, 0x670))) + + // Prepare result pointer, jump over length + let resultPtr := add(result, 0x20) + let resultEnd := add(resultPtr, resultLength) + let dataPtr := data + let endPtr := add(data, mload(data)) + + // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and + // set it to zero to make sure no dirty bytes are read in that section. + let afterPtr := add(endPtr, 0x20) + let afterCache := mload(afterPtr) + mstore(afterPtr, 0x00) + + // Run over the input, 3 bytes at a time + for {} lt(dataPtr, endPtr) {} { + // Advance 3 bytes + dataPtr := add(dataPtr, 3) + let input := mload(dataPtr) + + // To write each character, shift the 3 byte (24 bits) chunk + // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) + // and apply logical AND with 0x3F to bitmask the least significant 6 bits. + // Use this as an index into the lookup table, mload an entire word + // so the desired character is in the least significant byte, and + // mstore8 this least significant byte into the result and continue. + mstore8(resultPtr, mload(and(shr(18, input), 0x3F))) + resultPtr := add(resultPtr, 1) // Advance + mstore8(resultPtr, mload(and(shr(12, input), 0x3F))) + resultPtr := add(resultPtr, 1) // Advance + mstore8(resultPtr, mload(and(shr(6, input), 0x3F))) + resultPtr := add(resultPtr, 1) // Advance + mstore8(resultPtr, mload(and(input, 0x3F))) + resultPtr := add(resultPtr, 1) // Advance + } + + // Reset the value that was cached + mstore(afterPtr, afterCache) + + if iszero(urlAndFilenameSafe) { + // When data `bytes` is not exactly 3 bytes long + // it is padded with `=` characters at the end + switch mod(mload(data), 3) + case 1 { + mstore8(sub(resultPtr, 1), 0x3d) + mstore8(sub(resultPtr, 2), 0x3d) + } + case 2 { + mstore8(sub(resultPtr, 1), 0x3d) + } + } + + // Store result length and update FMP to reserve allocated space + mstore(result, resultLength) + mstore(0x40, resultEnd) + } + } + + /** + * @dev Internal decoding + */ + function _decode(bytes memory data) private pure returns (bytes memory result) { + bytes4 errorSelector = InvalidBase64Char.selector; + + uint256 dataLength = data.length; + if (dataLength == 0) return ""; + + uint256 resultLength = (dataLength / 4) * 3; + if (dataLength % 4 == 0) { + resultLength -= (data[dataLength - 1] == "=").toUint() + (data[dataLength - 2] == "=").toUint(); + } else { + resultLength += (dataLength % 4) - 1; + } + + assembly ("memory-safe") { + result := mload(0x40) + + // Temporarily store the reverse lookup table between in memory. This spans from 0x00 to 0x50, Using: + // - all 64bytes of scratch space + // - part of the FMP (at location 0x40) + mstore(0x30, 0x2425262728292a2b2c2d2e2f30313233) + mstore(0x20, 0x0a0b0c0d0e0f10111213141516171819ffffffff3fff1a1b1c1d1e1f20212223) + mstore(0x00, 0x3eff3eff3f3435363738393a3b3c3dffffff00ffffff00010203040506070809) + + // Prepare result pointer, jump over length + let dataPtr := data + let resultPtr := add(result, 0x20) + let endPtr := add(resultPtr, resultLength) + + // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and + // set it to "==" (fake padding) to make sure no dirty bytes are read in that section. + let afterPtr := add(add(data, 0x20), dataLength) + let afterCache := mload(afterPtr) + mstore(afterPtr, shl(240, 0x3d3d)) + + // loop while not everything is decoded + for {} lt(resultPtr, endPtr) {} { + dataPtr := add(dataPtr, 4) + + // Read a 4 bytes chunk of data + let input := mload(dataPtr) + + // Decode each byte in the chunk as a 6 bit block, and align them to form a block of 3 bytes + let a := sub(byte(28, input), 43) + // slither-disable-next-line incorrect-shift + if iszero(and(shl(a, 1), 0xffffffd0ffffffc47ff5)) { + mstore(0, errorSelector) + mstore(4, shl(248, add(a, 43))) + revert(0, 0x24) + } + let b := sub(byte(29, input), 43) + // slither-disable-next-line incorrect-shift + if iszero(and(shl(b, 1), 0xffffffd0ffffffc47ff5)) { + mstore(0, errorSelector) + mstore(4, shl(248, add(b, 43))) + revert(0, 0x24) + } + let c := sub(byte(30, input), 43) + // slither-disable-next-line incorrect-shift + if iszero(and(shl(c, 1), 0xffffffd0ffffffc47ff5)) { + mstore(0, errorSelector) + mstore(4, shl(248, add(c, 43))) + revert(0, 0x24) + } + let d := sub(byte(31, input), 43) + // slither-disable-next-line incorrect-shift + if iszero(and(shl(d, 1), 0xffffffd0ffffffc47ff5)) { + mstore(0, errorSelector) + mstore(4, shl(248, add(d, 43))) + revert(0, 0x24) + } + + mstore( + resultPtr, + or( + or(shl(250, byte(0, mload(a))), shl(244, byte(0, mload(b)))), + or(shl(238, byte(0, mload(c))), shl(232, byte(0, mload(d)))) + ) + ) + + resultPtr := add(resultPtr, 3) + } + + // Reset the value that was cached + mstore(afterPtr, afterCache) + + // Store result length and update FMP to reserve allocated space + mstore(result, resultLength) + mstore(0x40, endPtr) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Blockhash.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Blockhash.sol new file mode 100644 index 00000000..a8692522 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Blockhash.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/Blockhash.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Library for accessing historical block hashes beyond the standard 256 block limit. + * Uses EIP-2935's history storage contract which maintains a ring buffer of the last + * 8191 block hashes in state. + * + * For blocks within the last 256 blocks, it uses the native `BLOCKHASH` opcode. + * For blocks between 257 and 8191 blocks ago, it queries the EIP-2935 history storage. + * For blocks older than 8191 or future blocks, it returns zero, matching the `BLOCKHASH` behavior. + * + * NOTE: After EIP-2935 activation, it takes 8191 blocks to completely fill the history. + * Before that, only block hashes since the fork block will be available. + */ +library Blockhash { + /// @dev Address of the EIP-2935 history storage contract. + address internal constant HISTORY_STORAGE_ADDRESS = 0x0000F90827F1C53a10cb7A02335B175320002935; + + /** + * @dev Retrieves the block hash for any historical block within the supported range. + * + * NOTE: The function gracefully handles future blocks and blocks beyond the history window + * by returning zero, consistent with the EVM's native `BLOCKHASH` behavior. + */ + function blockHash(uint256 blockNumber) internal view returns (bytes32) { + uint256 current = block.number; + uint256 distance; + + unchecked { + // Can only wrap around to `current + 1` given `block.number - (2**256 - 1) = block.number + 1` + distance = current - blockNumber; + } + + return distance < 257 ? blockhash(blockNumber) : _historyStorageCall(blockNumber); + } + + /// @dev Internal function to query the EIP-2935 history storage contract. + function _historyStorageCall(uint256 blockNumber) private view returns (bytes32 hash) { + assembly ("memory-safe") { + // Store the blockNumber in scratch space + mstore(0x00, blockNumber) + mstore(0x20, 0) + + // call history storage address + pop(staticcall(gas(), HISTORY_STORAGE_ADDRESS, 0x00, 0x20, 0x20, 0x20)) + + // load result + hash := mload(0x20) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Bytes.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Bytes.sol new file mode 100644 index 00000000..f5058e68 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Bytes.sol @@ -0,0 +1,332 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/Bytes.sol) + +pragma solidity ^0.8.24; + +import {Math} from "./math/Math.sol"; + +/** + * @dev Bytes operations. + */ +library Bytes { + /** + * @dev Forward search for `s` in `buffer` + * * If `s` is present in the buffer, returns the index of the first instance + * * If `s` is not present in the buffer, returns type(uint256).max + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`] + */ + function indexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) { + return indexOf(buffer, s, 0); + } + + /** + * @dev Forward search for `s` in `buffer` starting at position `pos` + * * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance + * * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`] + */ + function indexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) { + uint256 length = buffer.length; + for (uint256 i = pos; i < length; ++i) { + if (bytes1(_unsafeReadBytesOffset(buffer, i)) == s) { + return i; + } + } + return type(uint256).max; + } + + /** + * @dev Backward search for `s` in `buffer` + * * If `s` is present in the buffer, returns the index of the last instance + * * If `s` is not present in the buffer, returns type(uint256).max + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`] + */ + function lastIndexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) { + return lastIndexOf(buffer, s, type(uint256).max); + } + + /** + * @dev Backward search for `s` in `buffer` starting at position `pos` + * * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance + * * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`] + */ + function lastIndexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) { + unchecked { + uint256 length = buffer.length; + for (uint256 i = Math.min(Math.saturatingAdd(pos, 1), length); i > 0; --i) { + if (bytes1(_unsafeReadBytesOffset(buffer, i - 1)) == s) { + return i - 1; + } + } + return type(uint256).max; + } + } + + /** + * @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in + * memory. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) { + return slice(buffer, start, buffer.length); + } + + /** + * @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in + * memory. The `end` argument is truncated to the length of the `buffer`. + * + * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`] + */ + function slice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) { + // sanitize + end = Math.min(end, buffer.length); + start = Math.min(start, end); + + // allocate and copy + bytes memory result = new bytes(end - start); + assembly ("memory-safe") { + mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start)) + } + + return result; + } + + /** + * @dev Moves the content of `buffer`, from `start` (included) to the end of `buffer` to the start of that buffer, + * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:]. + * + * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead + */ + function splice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) { + return splice(buffer, start, buffer.length); + } + + /** + * @dev Moves the content of `buffer`, from `start` (included) to `end` (excluded) to the start of that buffer, + * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:end]. + * The `end` argument is truncated to the length of the `buffer`. + * + * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead + */ + function splice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) { + // sanitize + end = Math.min(end, buffer.length); + start = Math.min(start, end); + + // move and resize + assembly ("memory-safe") { + mcopy(add(buffer, 0x20), add(add(buffer, 0x20), start), sub(end, start)) + mstore(buffer, sub(end, start)) + } + + return buffer; + } + + /** + * @dev Replaces bytes in `buffer` starting at `pos` with all bytes from `replacement`. + * + * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`). + * If `pos >= buffer.length`, no replacement occurs and the buffer is returned unchanged. + * + * NOTE: This function modifies the provided buffer in place. + */ + function replace(bytes memory buffer, uint256 pos, bytes memory replacement) internal pure returns (bytes memory) { + return replace(buffer, pos, replacement, 0, replacement.length); + } + + /** + * @dev Replaces bytes in `buffer` starting at `pos` with bytes from `replacement` starting at `offset`. + * Copies at most `length` bytes from `replacement` to `buffer`. + * + * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`, `offset` is + * clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset, + * buffer.length - pos))`. If `pos >= buffer.length` or `offset >= replacement.length`, no replacement occurs + * and the buffer is returned unchanged. + * + * NOTE: This function modifies the provided buffer in place. + */ + function replace( + bytes memory buffer, + uint256 pos, + bytes memory replacement, + uint256 offset, + uint256 length + ) internal pure returns (bytes memory) { + // sanitize + pos = Math.min(pos, buffer.length); + offset = Math.min(offset, replacement.length); + length = Math.min(length, Math.min(replacement.length - offset, buffer.length - pos)); + + // replace + assembly ("memory-safe") { + mcopy(add(add(buffer, 0x20), pos), add(add(replacement, 0x20), offset), length) + } + + return buffer; + } + + /** + * @dev Concatenate an array of bytes into a single bytes object. + * + * For fixed bytes types, we recommend using the solidity built-in `bytes.concat` or (equivalent) + * `abi.encodePacked`. + * + * NOTE: this could be done in assembly with a single loop that expands starting at the FMP, but that would be + * significantly less readable. It might be worth benchmarking the savings of the full-assembly approach. + */ + function concat(bytes[] memory buffers) internal pure returns (bytes memory) { + uint256 length = 0; + for (uint256 i = 0; i < buffers.length; ++i) { + length += buffers[i].length; + } + + bytes memory result = new bytes(length); + + uint256 offset = 0x20; + for (uint256 i = 0; i < buffers.length; ++i) { + bytes memory input = buffers[i]; + assembly ("memory-safe") { + mcopy(add(result, offset), add(input, 0x20), mload(input)) + } + unchecked { + offset += input.length; + } + } + + return result; + } + + /** + * @dev Split each byte in `input` into two nibbles (4 bits each) + * + * Example: hex"01234567" → hex"0001020304050607" + */ + function toNibbles(bytes memory input) internal pure returns (bytes memory output) { + assembly ("memory-safe") { + let length := mload(input) + output := mload(0x40) + mstore(0x40, add(add(output, 0x20), mul(length, 2))) + mstore(output, mul(length, 2)) + for { + let i := 0 + } lt(i, length) { + i := add(i, 0x10) + } { + let chunk := shr(128, mload(add(add(input, 0x20), i))) + chunk := and( + 0x0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff, + or(shl(64, chunk), chunk) + ) + chunk := and( + 0x00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff, + or(shl(32, chunk), chunk) + ) + chunk := and( + 0x0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff, + or(shl(16, chunk), chunk) + ) + chunk := and( + 0x00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff, + or(shl(8, chunk), chunk) + ) + chunk := and( + 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f, + or(shl(4, chunk), chunk) + ) + mstore(add(add(output, 0x20), mul(i, 2)), chunk) + } + } + } + + /** + * @dev Returns true if the two byte buffers are equal. + */ + function equal(bytes memory a, bytes memory b) internal pure returns (bool) { + return a.length == b.length && keccak256(a) == keccak256(b); + } + + /** + * @dev Reverses the byte order of a bytes32 value, converting between little-endian and big-endian. + * Inspired by https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel[Reverse Parallel] + */ + function reverseBytes32(bytes32 value) internal pure returns (bytes32) { + value = // swap bytes + ((value >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) | + ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8); + value = // swap 2-byte long pairs + ((value >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) | + ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16); + value = // swap 4-byte long pairs + ((value >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) | + ((value & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32); + value = // swap 8-byte long pairs + ((value >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) | + ((value & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64); + return (value >> 128) | (value << 128); // swap 16-byte long pairs + } + + /// @dev Same as {reverseBytes32} but optimized for 128-bit values. + function reverseBytes16(bytes16 value) internal pure returns (bytes16) { + value = // swap bytes + ((value & 0xFF00FF00FF00FF00FF00FF00FF00FF00) >> 8) | + ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8); + value = // swap 2-byte long pairs + ((value & 0xFFFF0000FFFF0000FFFF0000FFFF0000) >> 16) | + ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16); + value = // swap 4-byte long pairs + ((value & 0xFFFFFFFF00000000FFFFFFFF00000000) >> 32) | + ((value & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32); + return (value >> 64) | (value << 64); // swap 8-byte long pairs + } + + /// @dev Same as {reverseBytes32} but optimized for 64-bit values. + function reverseBytes8(bytes8 value) internal pure returns (bytes8) { + value = ((value & 0xFF00FF00FF00FF00) >> 8) | ((value & 0x00FF00FF00FF00FF) << 8); // swap bytes + value = ((value & 0xFFFF0000FFFF0000) >> 16) | ((value & 0x0000FFFF0000FFFF) << 16); // swap 2-byte long pairs + return (value >> 32) | (value << 32); // swap 4-byte long pairs + } + + /// @dev Same as {reverseBytes32} but optimized for 32-bit values. + function reverseBytes4(bytes4 value) internal pure returns (bytes4) { + value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); // swap bytes + return (value >> 16) | (value << 16); // swap 2-byte long pairs + } + + /// @dev Same as {reverseBytes32} but optimized for 16-bit values. + function reverseBytes2(bytes2 value) internal pure returns (bytes2) { + return (value >> 8) | (value << 8); + } + + /** + * @dev Counts the number of leading zero bits a bytes array. Returns `8 * buffer.length` + * if the buffer is all zeros. + */ + function clz(bytes memory buffer) internal pure returns (uint256) { + for (uint256 i = 0; i < buffer.length; i += 0x20) { + bytes32 chunk = _unsafeReadBytesOffset(buffer, i); + if (chunk != bytes32(0)) { + return Math.min(8 * i + Math.clz(uint256(chunk)), 8 * buffer.length); + } + } + return 8 * buffer.length; + } + + /** + * @dev Reads a bytes32 from a bytes array without bounds checking. + * + * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the + * assembly block as such would prevent some optimizations. + */ + function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) { + // This is not memory safe in the general case, but all calls to this private function are within bounds. + assembly ("memory-safe") { + value := mload(add(add(buffer, 0x20), offset)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP10.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP10.sol new file mode 100644 index 00000000..84b35da0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP10.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0) (utils/CAIP10.sol) + +pragma solidity ^0.8.24; + +import {Bytes} from "./Bytes.sol"; +import {Strings} from "./Strings.sol"; +import {CAIP2} from "./CAIP2.sol"; + +/** + * @dev Helper library to format and parse CAIP-10 identifiers + * + * https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md[CAIP-10] defines account identifiers as: + * account_id: chain_id + ":" + account_address + * chain_id: [-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32} (See {CAIP2}) + * account_address: [-.%a-zA-Z0-9]{1,128} + * + * WARNING: According to [CAIP-10's canonicalization section](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md#canonicalization), + * the implementation remains at the developer's discretion. Please note that case variations may introduce ambiguity. + * For example, when building hashes to identify accounts or data associated to them, multiple representations of the + * same account would derive to different hashes. For EVM chains, we recommend using checksummed addresses for the + * "account_address" part. They can be generated onchain using {Strings-toChecksumHexString}. + */ +library CAIP10 { + using Strings for address; + using Bytes for bytes; + + /// @dev Return the CAIP-10 identifier for an account on the current (local) chain. + function local(address account) internal view returns (string memory) { + return format(CAIP2.local(), account.toChecksumHexString()); + } + + /** + * @dev Return the CAIP-10 identifier for a given caip2 chain and account. + * + * NOTE: This function does not verify that the inputs are properly formatted. + */ + function format(string memory caip2, string memory account) internal pure returns (string memory) { + return string.concat(caip2, ":", account); + } + + /** + * @dev Parse a CAIP-10 identifier into its components. + * + * NOTE: This function does not verify that the CAIP-10 input is properly formatted. The `caip2` return can be + * parsed using the {CAIP2} library. + */ + function parse(string memory caip10) internal pure returns (string memory caip2, string memory account) { + bytes memory buffer = bytes(caip10); + + uint256 pos = buffer.lastIndexOf(":"); + return (string(buffer.slice(0, pos)), string(buffer.slice(pos + 1))); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP2.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP2.sol new file mode 100644 index 00000000..d06dd6da --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/CAIP2.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0) (utils/CAIP2.sol) + +pragma solidity ^0.8.24; + +import {Bytes} from "./Bytes.sol"; +import {Strings} from "./Strings.sol"; + +/** + * @dev Helper library to format and parse CAIP-2 identifiers + * + * https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md[CAIP-2] defines chain identifiers as: + * chain_id: namespace + ":" + reference + * namespace: [-a-z0-9]{3,8} + * reference: [-_a-zA-Z0-9]{1,32} + * + * WARNING: In some cases, multiple CAIP-2 identifiers may all be valid representation of a single chain. + * For EVM chains, it is recommended to use `eip155:xxx` as the canonical representation (where `xxx` is + * the EIP-155 chain id). Consider the possible ambiguity when processing CAIP-2 identifiers or when using them + * in the context of hashes. + */ +library CAIP2 { + using Strings for uint256; + using Bytes for bytes; + + /// @dev Return the CAIP-2 identifier for the current (local) chain. + function local() internal view returns (string memory) { + return format("eip155", block.chainid.toString()); + } + + /** + * @dev Return the CAIP-2 identifier for a given namespace and reference. + * + * NOTE: This function does not verify that the inputs are properly formatted. + */ + function format(string memory namespace, string memory ref) internal pure returns (string memory) { + return string.concat(namespace, ":", ref); + } + + /** + * @dev Parse a CAIP-2 identifier into its components. + * + * NOTE: This function does not verify that the CAIP-2 input is properly formatted. + */ + function parse(string memory caip2) internal pure returns (string memory namespace, string memory ref) { + bytes memory buffer = bytes(caip2); + + uint256 pos = buffer.indexOf(":"); + return (string(buffer.slice(0, pos)), string(buffer.slice(pos + 1))); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Calldata.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Calldata.sol new file mode 100644 index 00000000..41860b29 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Calldata.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.3.0) (utils/Calldata.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Helper library for manipulating objects in calldata. + */ +library Calldata { + // slither-disable-next-line write-after-write + function emptyBytes() internal pure returns (bytes calldata result) { + assembly ("memory-safe") { + result.offset := 0 + result.length := 0 + } + } + + // slither-disable-next-line write-after-write + function emptyString() internal pure returns (string calldata result) { + assembly ("memory-safe") { + result.offset := 0 + result.length := 0 + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Comparators.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Comparators.sol new file mode 100644 index 00000000..a8c5e73d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Comparators.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (utils/Comparators.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Provides a set of functions to compare values. + * + * _Available since v5.1._ + */ +library Comparators { + function lt(uint256 a, uint256 b) internal pure returns (bool) { + return a < b; + } + + function gt(uint256 a, uint256 b) internal pure returns (bool) { + return a > b; + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Context.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Context.sol similarity index 90% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/Context.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/Context.sol index 8e410bda..4e535fe0 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Context.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Context.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) +// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Create2.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Create2.sol similarity index 54% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/Create2.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/Create2.sol index 29fa9732..7ebbd50e 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Create2.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Create2.sol @@ -1,7 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Create2.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (utils/Create2.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; + +import {Errors} from "./Errors.sol"; +import {LowLevelCall} from "./LowLevelCall.sol"; /** * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. @@ -13,6 +16,11 @@ pragma solidity ^0.8.0; * information. */ library Create2 { + /** + * @dev There's no code to deploy. + */ + error Create2EmptyBytecode(); + /** * @dev Deploys a contract using `CREATE2`. The address where the contract * will be deployed can be known in advance via {computeAddress}. @@ -28,13 +36,22 @@ library Create2 { * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. */ function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { - require(address(this).balance >= amount, "Create2: insufficient balance"); - require(bytecode.length != 0, "Create2: bytecode length is zero"); - /// @solidity memory-safe-assembly - assembly { + if (address(this).balance < amount) { + revert Errors.InsufficientBalance(address(this).balance, amount); + } + if (bytecode.length == 0) { + revert Create2EmptyBytecode(); + } + assembly ("memory-safe") { addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) } - require(addr != address(0), "Create2: Failed on deploy"); + if (addr == address(0)) { + if (LowLevelCall.returnDataSize() == 0) { + revert Errors.FailedDeployment(); + } else { + LowLevelCall.bubbleRevert(); + } + } } /** @@ -50,26 +67,25 @@ library Create2 { * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. */ function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { let ptr := mload(0x40) // Get free memory pointer - // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | - // |-------------------|---------------------------------------------------------------------------| - // | bytecodeHash | CCCCCCCCCCCCC...CC | - // | salt | BBBBBBBBBBBBB...BB | - // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | - // | 0xFF | FF | - // |-------------------|---------------------------------------------------------------------------| - // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | - // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | + // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | + // |---------------------|---------------------------------------------------------------------------| + // | bytecodeHash | CCCCCCCCCCCCC...CC | + // | salt | BBBBBBBBBBBBB...BB | + // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | + // | 0xFF | FF | + // |---------------------|---------------------------------------------------------------------------| + // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | + // | keccak(start, 0x55) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | mstore(add(ptr, 0x40), bytecodeHash) mstore(add(ptr, 0x20), salt) mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff mstore8(start, 0xff) - addr := keccak256(start, 85) + addr := and(keccak256(start, 0x55), 0xffffffffffffffffffffffffffffffffffffffff) } } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Errors.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Errors.sol new file mode 100644 index 00000000..442fc189 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Errors.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Collection of common custom errors used in multiple contracts + * + * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. + * It is recommended to avoid relying on the error API for critical functionality. + * + * _Available since v5.1._ + */ +library Errors { + /** + * @dev The ETH balance of the account is not enough to perform the operation. + */ + error InsufficientBalance(uint256 balance, uint256 needed); + + /** + * @dev A call to an address target failed. The target may have reverted. + */ + error FailedCall(); + + /** + * @dev The deployment failed. + */ + error FailedDeployment(); + + /** + * @dev A necessary precompile is missing. + */ + error MissingPrecompile(address); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/LowLevelCall.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/LowLevelCall.sol new file mode 100644 index 00000000..f6aed900 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/LowLevelCall.sol @@ -0,0 +1,127 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/LowLevelCall.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Library of low level call functions that implement different calling strategies to deal with the return data. + * + * WARNING: Using this library requires an advanced understanding of Solidity and how the EVM works. It is recommended + * to use the {Address} library instead. + */ +library LowLevelCall { + /// @dev Performs a Solidity function call using a low level `call` and ignoring the return data. + function callNoReturn(address target, bytes memory data) internal returns (bool success) { + return callNoReturn(target, 0, data); + } + + /// @dev Same as {callNoReturn-address-bytes}, but allows specifying the value to be sent in the call. + function callNoReturn(address target, uint256 value, bytes memory data) internal returns (bool success) { + assembly ("memory-safe") { + success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x00) + } + } + + /// @dev Performs a Solidity function call using a low level `call` and returns the first 64 bytes of the result + /// in the scratch space of memory. Useful for functions that return a tuple with two single-word values. + /// + /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated + /// and this function doesn't zero it out. + function callReturn64Bytes( + address target, + bytes memory data + ) internal returns (bool success, bytes32 result1, bytes32 result2) { + return callReturn64Bytes(target, 0, data); + } + + /// @dev Same as {callReturn64Bytes-address-bytes}, but allows specifying the value to be sent in the call. + function callReturn64Bytes( + address target, + uint256 value, + bytes memory data + ) internal returns (bool success, bytes32 result1, bytes32 result2) { + assembly ("memory-safe") { + success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x40) + result1 := mload(0x00) + result2 := mload(0x20) + } + } + + /// @dev Performs a Solidity function call using a low level `staticcall` and ignoring the return data. + function staticcallNoReturn(address target, bytes memory data) internal view returns (bool success) { + assembly ("memory-safe") { + success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00) + } + } + + /// @dev Performs a Solidity function call using a low level `staticcall` and returns the first 64 bytes of the result + /// in the scratch space of memory. Useful for functions that return a tuple with two single-word values. + /// + /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated + /// and this function doesn't zero it out. + function staticcallReturn64Bytes( + address target, + bytes memory data + ) internal view returns (bool success, bytes32 result1, bytes32 result2) { + assembly ("memory-safe") { + success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40) + result1 := mload(0x00) + result2 := mload(0x20) + } + } + + /// @dev Performs a Solidity function call using a low level `delegatecall` and ignoring the return data. + function delegatecallNoReturn(address target, bytes memory data) internal returns (bool success) { + assembly ("memory-safe") { + success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00) + } + } + + /// @dev Performs a Solidity function call using a low level `delegatecall` and returns the first 64 bytes of the result + /// in the scratch space of memory. Useful for functions that return a tuple with two single-word values. + /// + /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated + /// and this function doesn't zero it out. + function delegatecallReturn64Bytes( + address target, + bytes memory data + ) internal returns (bool success, bytes32 result1, bytes32 result2) { + assembly ("memory-safe") { + success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40) + result1 := mload(0x00) + result2 := mload(0x20) + } + } + + /// @dev Returns the size of the return data buffer. + function returnDataSize() internal pure returns (uint256 size) { + assembly ("memory-safe") { + size := returndatasize() + } + } + + /// @dev Returns a buffer containing the return data from the last call. + function returnData() internal pure returns (bytes memory result) { + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, returndatasize()) + returndatacopy(add(result, 0x20), 0x00, returndatasize()) + mstore(0x40, add(result, add(0x20, returndatasize()))) + } + } + + /// @dev Revert with the return data from the last call. + function bubbleRevert() internal pure { + assembly ("memory-safe") { + let fmp := mload(0x40) + returndatacopy(fmp, 0x00, returndatasize()) + revert(fmp, returndatasize()) + } + } + + function bubbleRevert(bytes memory returndata) internal pure { + assembly ("memory-safe") { + revert(add(returndata, 0x20), mload(returndata)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Memory.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Memory.sol new file mode 100644 index 00000000..9b8cb896 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Memory.sol @@ -0,0 +1,149 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/Memory.sol) + +pragma solidity ^0.8.24; + +import {Panic} from "./Panic.sol"; +import {Math} from "./math/Math.sol"; + +/** + * @dev Utilities to manipulate memory. + * + * Memory is a contiguous and dynamic byte array in which Solidity stores non-primitive types. + * This library provides functions to manipulate pointers to this dynamic array and work with slices of it. + * + * Slices provide a view into a portion of memory without copying data, enabling efficient substring operations. + * + * WARNING: When manipulating memory pointers or slices, make sure to follow the Solidity documentation + * guidelines for https://docs.soliditylang.org/en/v0.8.20/assembly.html#memory-safety[Memory Safety]. + */ +library Memory { + type Pointer is bytes32; + + /// @dev Returns a `Pointer` to the current free `Pointer`. + function getFreeMemoryPointer() internal pure returns (Pointer ptr) { + assembly ("memory-safe") { + ptr := mload(0x40) + } + } + + /** + * @dev Sets the free `Pointer` to a specific value. + * + * The solidity memory layout requires that the FMP is never set to a value lower than 0x80. Setting the + * FMP to a value lower than 0x80 may cause unexpected behavior. Deallocating all memory can be achieved by + * setting the FMP to 0x80. + * + * WARNING: Everything after the pointer may be overwritten. + **/ + function unsafeSetFreeMemoryPointer(Pointer ptr) internal pure { + assembly ("memory-safe") { + mstore(0x40, ptr) + } + } + + /// @dev Move a pointer forward by a given offset. + function forward(Pointer ptr, uint256 offset) internal pure returns (Pointer) { + return Pointer.wrap(bytes32(uint256(Pointer.unwrap(ptr)) + offset)); + } + + /// @dev Equality comparator for memory pointers. + function equal(Pointer ptr1, Pointer ptr2) internal pure returns (bool) { + return Pointer.unwrap(ptr1) == Pointer.unwrap(ptr2); + } + + type Slice is bytes32; + + /// @dev Get a slice representation of a bytes object in memory + function asSlice(bytes memory self) internal pure returns (Slice result) { + assembly ("memory-safe") { + result := or(shl(128, mload(self)), add(self, 0x20)) + } + } + + /// @dev Returns the length of a given slice (equiv to self.length for calldata slices) + function length(Slice self) internal pure returns (uint256 result) { + assembly ("memory-safe") { + result := shr(128, self) + } + } + + /// @dev Offset a memory slice (equivalent to self[offset:] for calldata slices) + function slice(Slice self, uint256 offset) internal pure returns (Slice) { + if (offset > length(self)) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS); + return _asSlice(length(self) - offset, forward(_pointer(self), offset)); + } + + /// @dev Offset and cut a Slice (equivalent to self[offset:offset+len] for calldata slices) + function slice(Slice self, uint256 offset, uint256 len) internal pure returns (Slice) { + if (offset + len > length(self)) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS); + return _asSlice(len, forward(_pointer(self), offset)); + } + + /** + * @dev Read a bytes32 buffer from a given Slice at a specific offset + * + * NOTE: If offset > length(slice) - 0x20, part of the return value will be out of bound of the slice. These bytes are zeroed. + */ + function load(Slice self, uint256 offset) internal pure returns (bytes32 value) { + uint256 outOfBoundBytes = Math.saturatingSub(0x20 + offset, length(self)); + if (outOfBoundBytes > 0x1f) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS); + + assembly ("memory-safe") { + value := and(mload(add(and(self, shr(128, not(0))), offset)), shl(mul(8, outOfBoundBytes), not(0))) + } + } + + /// @dev Extract the data corresponding to a Slice (allocate new memory) + function toBytes(Slice self) internal pure returns (bytes memory result) { + uint256 len = length(self); + Memory.Pointer ptr = _pointer(self); + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, len) + mcopy(add(result, 0x20), ptr, len) + mstore(0x40, add(add(result, len), 0x20)) + } + } + + /// @dev Returns true if the two slices contain the same data. + function equal(Slice a, Slice b) internal pure returns (bool result) { + Memory.Pointer ptrA = _pointer(a); + Memory.Pointer ptrB = _pointer(b); + uint256 lenA = length(a); + uint256 lenB = length(b); + assembly ("memory-safe") { + result := eq(keccak256(ptrA, lenA), keccak256(ptrB, lenB)) + } + } + + /// @dev Returns true if the memory occupied by the slice is reserved (i.e. before the free memory pointer) + function isReserved(Slice self) internal pure returns (bool result) { + Memory.Pointer fmp = getFreeMemoryPointer(); + Memory.Pointer end = forward(_pointer(self), length(self)); + assembly ("memory-safe") { + result := iszero(lt(fmp, end)) // end <= fmp + } + } + + /** + * @dev Private helper: create a slice from raw values (length and pointer) + * + * NOTE: this function MUST NOT be called with `len` or `ptr` that exceed `2**128-1`. This should never be + * the case of slices produced by `asSlice(bytes)`, and function that reduce the scope of slices + * (`slice(Slice,uint256)` and `slice(Slice,uint256, uint256)`) should not cause this issue if the parent slice is + * correct. + */ + function _asSlice(uint256 len, Memory.Pointer ptr) private pure returns (Slice result) { + assembly ("memory-safe") { + result := or(shl(128, len), ptr) + } + } + + /// @dev Returns the memory location of a given slice (equiv to self.offset for calldata slices) + function _pointer(Slice self) private pure returns (Memory.Pointer result) { + assembly ("memory-safe") { + result := and(self, shr(128, not(0))) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/Multicall.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Multicall.sol similarity index 77% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/Multicall.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/Multicall.sol index 76bdc678..c78b9623 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/Multicall.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Multicall.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.5) (utils/Multicall.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (utils/Multicall.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./Address.sol"; -import "./Context.sol"; +import {Address} from "./Address.sol"; +import {Context} from "./Context.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. @@ -13,19 +13,17 @@ import "./Context.sol"; * careful about sending transactions invoking {multicall}. For example, a relay address that filters function * selectors won't filter calls nested within a {multicall} operation. * - * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}). + * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {Context-_msgSender}). * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data` * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of - * {_msgSender} are not propagated to subcalls. - * - * _Available since v4.1._ + * {Context-_msgSender} are not propagated to subcalls. */ abstract contract Multicall is Context { /** * @dev Receives and executes a batch of function calls on this contract. * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ - function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) { + function multicall(bytes[] calldata data) public virtual returns (bytes[] memory results) { bytes memory context = msg.sender == _msgSender() ? new bytes(0) : msg.data[msg.data.length - _contextSuffixLength():]; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Nonces.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Nonces.sol new file mode 100644 index 00000000..37451ff9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Nonces.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) +pragma solidity ^0.8.20; + +/** + * @dev Provides tracking nonces for addresses. Nonces will only increment. + */ +abstract contract Nonces { + /** + * @dev The nonce used for an `account` is not the expected current nonce. + */ + error InvalidAccountNonce(address account, uint256 currentNonce); + + mapping(address account => uint256) private _nonces; + + /** + * @dev Returns the next unused nonce for an address. + */ + function nonces(address owner) public view virtual returns (uint256) { + return _nonces[owner]; + } + + /** + * @dev Consumes a nonce. + * + * Returns the current value and increments nonce. + */ + function _useNonce(address owner) internal virtual returns (uint256) { + // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be + // decremented or reset. This guarantees that the nonce never overflows. + unchecked { + // It is important to do x++ and not ++x here. + return _nonces[owner]++; + } + } + + /** + * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. + */ + function _useCheckedNonce(address owner, uint256 nonce) internal virtual { + uint256 current = _useNonce(owner); + if (nonce != current) { + revert InvalidAccountNonce(owner, current); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/NoncesKeyed.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/NoncesKeyed.sol new file mode 100644 index 00000000..df9c5704 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/NoncesKeyed.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0) (utils/NoncesKeyed.sol) +pragma solidity ^0.8.20; + +import {Nonces} from "./Nonces.sol"; + +/** + * @dev Alternative to {Nonces}, that supports key-ed nonces. + * + * Follows the https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337's semi-abstracted nonce system]. + * + * NOTE: This contract inherits from {Nonces} and reuses its storage for the first nonce key (i.e. `0`). This + * makes upgrading from {Nonces} to {NoncesKeyed} safe when using their upgradeable versions (e.g. `NoncesKeyedUpgradeable`). + * Doing so will NOT reset the current state of nonces, avoiding replay attacks where a nonce is reused after the upgrade. + */ +abstract contract NoncesKeyed is Nonces { + mapping(address owner => mapping(uint192 key => uint64)) private _nonces; + + /// @dev Returns the next unused nonce for an address and key. Result contains the key prefix. + function nonces(address owner, uint192 key) public view virtual returns (uint256) { + return key == 0 ? nonces(owner) : _pack(key, _nonces[owner][key]); + } + + /** + * @dev Consumes the next unused nonce for an address and key. + * + * Returns the current value without the key prefix. Consumed nonce is increased, so calling this function twice + * with the same arguments will return different (sequential) results. + */ + function _useNonce(address owner, uint192 key) internal virtual returns (uint256) { + // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be + // decremented or reset. This guarantees that the nonce never overflows. + unchecked { + // It is important to do x++ and not ++x here. + return key == 0 ? _useNonce(owner) : _pack(key, _nonces[owner][key]++); + } + } + + /** + * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. + * + * This version takes the key and the nonce in a single uint256 parameter: + * - use the first 24 bytes for the key + * - use the last 8 bytes for the nonce + */ + function _useCheckedNonce(address owner, uint256 keyNonce) internal virtual override { + (uint192 key, ) = _unpack(keyNonce); + if (key == 0) { + super._useCheckedNonce(owner, keyNonce); + } else { + uint256 current = _useNonce(owner, key); + if (keyNonce != current) revert InvalidAccountNonce(owner, current); + } + } + + /** + * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. + * + * This version takes the key and the nonce as two different parameters. + */ + function _useCheckedNonce(address owner, uint192 key, uint64 nonce) internal virtual { + _useCheckedNonce(owner, _pack(key, nonce)); + } + + /// @dev Pack key and nonce into a keyNonce + function _pack(uint192 key, uint64 nonce) private pure returns (uint256) { + return (uint256(key) << 64) | nonce; + } + + /// @dev Unpack a keyNonce into its key and nonce components + function _unpack(uint256 keyNonce) private pure returns (uint192 key, uint64 nonce) { + return (uint192(keyNonce >> 64), uint64(keyNonce)); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Packing.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Packing.sol new file mode 100644 index 00000000..f7c5d6fc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Packing.sol @@ -0,0 +1,1656 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0) (utils/Packing.sol) +// This file was procedurally generated from scripts/generate/templates/Packing.js. + +pragma solidity ^0.8.20; + +/** + * @dev Helper library packing and unpacking multiple values into bytesXX. + * + * Example usage: + * + * ```solidity + * library MyPacker { + * type MyType is bytes32; + * + * function _pack(address account, bytes4 selector, uint64 period) external pure returns (MyType) { + * bytes12 subpack = Packing.pack_4_8(selector, bytes8(period)); + * bytes32 pack = Packing.pack_20_12(bytes20(account), subpack); + * return MyType.wrap(pack); + * } + * + * function _unpack(MyType self) external pure returns (address, bytes4, uint64) { + * bytes32 pack = MyType.unwrap(self); + * return ( + * address(Packing.extract_32_20(pack, 0)), + * Packing.extract_32_4(pack, 20), + * uint64(Packing.extract_32_8(pack, 24)) + * ); + * } + * } + * ``` + * + * _Available since v5.1._ + */ +// solhint-disable func-name-mixedcase +library Packing { + error OutOfRangeAccess(); + + function pack_1_1(bytes1 left, bytes1 right) internal pure returns (bytes2 result) { + assembly ("memory-safe") { + left := and(left, shl(248, not(0))) + right := and(right, shl(248, not(0))) + result := or(left, shr(8, right)) + } + } + + function pack_2_2(bytes2 left, bytes2 right) internal pure returns (bytes4 result) { + assembly ("memory-safe") { + left := and(left, shl(240, not(0))) + right := and(right, shl(240, not(0))) + result := or(left, shr(16, right)) + } + } + + function pack_2_4(bytes2 left, bytes4 right) internal pure returns (bytes6 result) { + assembly ("memory-safe") { + left := and(left, shl(240, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(16, right)) + } + } + + function pack_2_6(bytes2 left, bytes6 right) internal pure returns (bytes8 result) { + assembly ("memory-safe") { + left := and(left, shl(240, not(0))) + right := and(right, shl(208, not(0))) + result := or(left, shr(16, right)) + } + } + + function pack_2_8(bytes2 left, bytes8 right) internal pure returns (bytes10 result) { + assembly ("memory-safe") { + left := and(left, shl(240, not(0))) + right := and(right, shl(192, not(0))) + result := or(left, shr(16, right)) + } + } + + function pack_2_10(bytes2 left, bytes10 right) internal pure returns (bytes12 result) { + assembly ("memory-safe") { + left := and(left, shl(240, not(0))) + right := and(right, shl(176, not(0))) + result := or(left, shr(16, right)) + } + } + + function pack_2_20(bytes2 left, bytes20 right) internal pure returns (bytes22 result) { + assembly ("memory-safe") { + left := and(left, shl(240, not(0))) + right := and(right, shl(96, not(0))) + result := or(left, shr(16, right)) + } + } + + function pack_2_22(bytes2 left, bytes22 right) internal pure returns (bytes24 result) { + assembly ("memory-safe") { + left := and(left, shl(240, not(0))) + right := and(right, shl(80, not(0))) + result := or(left, shr(16, right)) + } + } + + function pack_4_2(bytes4 left, bytes2 right) internal pure returns (bytes6 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(240, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_4(bytes4 left, bytes4 right) internal pure returns (bytes8 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_6(bytes4 left, bytes6 right) internal pure returns (bytes10 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(208, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_8(bytes4 left, bytes8 right) internal pure returns (bytes12 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(192, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_12(bytes4 left, bytes12 right) internal pure returns (bytes16 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(160, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_16(bytes4 left, bytes16 right) internal pure returns (bytes20 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(128, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_20(bytes4 left, bytes20 right) internal pure returns (bytes24 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(96, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_24(bytes4 left, bytes24 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(64, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_4_28(bytes4 left, bytes28 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(224, not(0))) + right := and(right, shl(32, not(0))) + result := or(left, shr(32, right)) + } + } + + function pack_6_2(bytes6 left, bytes2 right) internal pure returns (bytes8 result) { + assembly ("memory-safe") { + left := and(left, shl(208, not(0))) + right := and(right, shl(240, not(0))) + result := or(left, shr(48, right)) + } + } + + function pack_6_4(bytes6 left, bytes4 right) internal pure returns (bytes10 result) { + assembly ("memory-safe") { + left := and(left, shl(208, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(48, right)) + } + } + + function pack_6_6(bytes6 left, bytes6 right) internal pure returns (bytes12 result) { + assembly ("memory-safe") { + left := and(left, shl(208, not(0))) + right := and(right, shl(208, not(0))) + result := or(left, shr(48, right)) + } + } + + function pack_6_10(bytes6 left, bytes10 right) internal pure returns (bytes16 result) { + assembly ("memory-safe") { + left := and(left, shl(208, not(0))) + right := and(right, shl(176, not(0))) + result := or(left, shr(48, right)) + } + } + + function pack_6_16(bytes6 left, bytes16 right) internal pure returns (bytes22 result) { + assembly ("memory-safe") { + left := and(left, shl(208, not(0))) + right := and(right, shl(128, not(0))) + result := or(left, shr(48, right)) + } + } + + function pack_6_22(bytes6 left, bytes22 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(208, not(0))) + right := and(right, shl(80, not(0))) + result := or(left, shr(48, right)) + } + } + + function pack_8_2(bytes8 left, bytes2 right) internal pure returns (bytes10 result) { + assembly ("memory-safe") { + left := and(left, shl(192, not(0))) + right := and(right, shl(240, not(0))) + result := or(left, shr(64, right)) + } + } + + function pack_8_4(bytes8 left, bytes4 right) internal pure returns (bytes12 result) { + assembly ("memory-safe") { + left := and(left, shl(192, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(64, right)) + } + } + + function pack_8_8(bytes8 left, bytes8 right) internal pure returns (bytes16 result) { + assembly ("memory-safe") { + left := and(left, shl(192, not(0))) + right := and(right, shl(192, not(0))) + result := or(left, shr(64, right)) + } + } + + function pack_8_12(bytes8 left, bytes12 right) internal pure returns (bytes20 result) { + assembly ("memory-safe") { + left := and(left, shl(192, not(0))) + right := and(right, shl(160, not(0))) + result := or(left, shr(64, right)) + } + } + + function pack_8_16(bytes8 left, bytes16 right) internal pure returns (bytes24 result) { + assembly ("memory-safe") { + left := and(left, shl(192, not(0))) + right := and(right, shl(128, not(0))) + result := or(left, shr(64, right)) + } + } + + function pack_8_20(bytes8 left, bytes20 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(192, not(0))) + right := and(right, shl(96, not(0))) + result := or(left, shr(64, right)) + } + } + + function pack_8_24(bytes8 left, bytes24 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(192, not(0))) + right := and(right, shl(64, not(0))) + result := or(left, shr(64, right)) + } + } + + function pack_10_2(bytes10 left, bytes2 right) internal pure returns (bytes12 result) { + assembly ("memory-safe") { + left := and(left, shl(176, not(0))) + right := and(right, shl(240, not(0))) + result := or(left, shr(80, right)) + } + } + + function pack_10_6(bytes10 left, bytes6 right) internal pure returns (bytes16 result) { + assembly ("memory-safe") { + left := and(left, shl(176, not(0))) + right := and(right, shl(208, not(0))) + result := or(left, shr(80, right)) + } + } + + function pack_10_10(bytes10 left, bytes10 right) internal pure returns (bytes20 result) { + assembly ("memory-safe") { + left := and(left, shl(176, not(0))) + right := and(right, shl(176, not(0))) + result := or(left, shr(80, right)) + } + } + + function pack_10_12(bytes10 left, bytes12 right) internal pure returns (bytes22 result) { + assembly ("memory-safe") { + left := and(left, shl(176, not(0))) + right := and(right, shl(160, not(0))) + result := or(left, shr(80, right)) + } + } + + function pack_10_22(bytes10 left, bytes22 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(176, not(0))) + right := and(right, shl(80, not(0))) + result := or(left, shr(80, right)) + } + } + + function pack_12_4(bytes12 left, bytes4 right) internal pure returns (bytes16 result) { + assembly ("memory-safe") { + left := and(left, shl(160, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(96, right)) + } + } + + function pack_12_8(bytes12 left, bytes8 right) internal pure returns (bytes20 result) { + assembly ("memory-safe") { + left := and(left, shl(160, not(0))) + right := and(right, shl(192, not(0))) + result := or(left, shr(96, right)) + } + } + + function pack_12_10(bytes12 left, bytes10 right) internal pure returns (bytes22 result) { + assembly ("memory-safe") { + left := and(left, shl(160, not(0))) + right := and(right, shl(176, not(0))) + result := or(left, shr(96, right)) + } + } + + function pack_12_12(bytes12 left, bytes12 right) internal pure returns (bytes24 result) { + assembly ("memory-safe") { + left := and(left, shl(160, not(0))) + right := and(right, shl(160, not(0))) + result := or(left, shr(96, right)) + } + } + + function pack_12_16(bytes12 left, bytes16 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(160, not(0))) + right := and(right, shl(128, not(0))) + result := or(left, shr(96, right)) + } + } + + function pack_12_20(bytes12 left, bytes20 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(160, not(0))) + right := and(right, shl(96, not(0))) + result := or(left, shr(96, right)) + } + } + + function pack_16_4(bytes16 left, bytes4 right) internal pure returns (bytes20 result) { + assembly ("memory-safe") { + left := and(left, shl(128, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(128, right)) + } + } + + function pack_16_6(bytes16 left, bytes6 right) internal pure returns (bytes22 result) { + assembly ("memory-safe") { + left := and(left, shl(128, not(0))) + right := and(right, shl(208, not(0))) + result := or(left, shr(128, right)) + } + } + + function pack_16_8(bytes16 left, bytes8 right) internal pure returns (bytes24 result) { + assembly ("memory-safe") { + left := and(left, shl(128, not(0))) + right := and(right, shl(192, not(0))) + result := or(left, shr(128, right)) + } + } + + function pack_16_12(bytes16 left, bytes12 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(128, not(0))) + right := and(right, shl(160, not(0))) + result := or(left, shr(128, right)) + } + } + + function pack_16_16(bytes16 left, bytes16 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(128, not(0))) + right := and(right, shl(128, not(0))) + result := or(left, shr(128, right)) + } + } + + function pack_20_2(bytes20 left, bytes2 right) internal pure returns (bytes22 result) { + assembly ("memory-safe") { + left := and(left, shl(96, not(0))) + right := and(right, shl(240, not(0))) + result := or(left, shr(160, right)) + } + } + + function pack_20_4(bytes20 left, bytes4 right) internal pure returns (bytes24 result) { + assembly ("memory-safe") { + left := and(left, shl(96, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(160, right)) + } + } + + function pack_20_8(bytes20 left, bytes8 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(96, not(0))) + right := and(right, shl(192, not(0))) + result := or(left, shr(160, right)) + } + } + + function pack_20_12(bytes20 left, bytes12 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(96, not(0))) + right := and(right, shl(160, not(0))) + result := or(left, shr(160, right)) + } + } + + function pack_22_2(bytes22 left, bytes2 right) internal pure returns (bytes24 result) { + assembly ("memory-safe") { + left := and(left, shl(80, not(0))) + right := and(right, shl(240, not(0))) + result := or(left, shr(176, right)) + } + } + + function pack_22_6(bytes22 left, bytes6 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(80, not(0))) + right := and(right, shl(208, not(0))) + result := or(left, shr(176, right)) + } + } + + function pack_22_10(bytes22 left, bytes10 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(80, not(0))) + right := and(right, shl(176, not(0))) + result := or(left, shr(176, right)) + } + } + + function pack_24_4(bytes24 left, bytes4 right) internal pure returns (bytes28 result) { + assembly ("memory-safe") { + left := and(left, shl(64, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(192, right)) + } + } + + function pack_24_8(bytes24 left, bytes8 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(64, not(0))) + right := and(right, shl(192, not(0))) + result := or(left, shr(192, right)) + } + } + + function pack_28_4(bytes28 left, bytes4 right) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + left := and(left, shl(32, not(0))) + right := and(right, shl(224, not(0))) + result := or(left, shr(224, right)) + } + } + + function extract_2_1(bytes2 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 1) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_2_1(bytes2 self, bytes1 value, uint8 offset) internal pure returns (bytes2 result) { + bytes1 oldValue = extract_2_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_4_1(bytes4 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 3) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_4_1(bytes4 self, bytes1 value, uint8 offset) internal pure returns (bytes4 result) { + bytes1 oldValue = extract_4_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_4_2(bytes4 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 2) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_4_2(bytes4 self, bytes2 value, uint8 offset) internal pure returns (bytes4 result) { + bytes2 oldValue = extract_4_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_6_1(bytes6 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 5) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_6_1(bytes6 self, bytes1 value, uint8 offset) internal pure returns (bytes6 result) { + bytes1 oldValue = extract_6_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_6_2(bytes6 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_6_2(bytes6 self, bytes2 value, uint8 offset) internal pure returns (bytes6 result) { + bytes2 oldValue = extract_6_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_6_4(bytes6 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 2) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_6_4(bytes6 self, bytes4 value, uint8 offset) internal pure returns (bytes6 result) { + bytes4 oldValue = extract_6_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_8_1(bytes8 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 7) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_8_1(bytes8 self, bytes1 value, uint8 offset) internal pure returns (bytes8 result) { + bytes1 oldValue = extract_8_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_8_2(bytes8 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 6) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_8_2(bytes8 self, bytes2 value, uint8 offset) internal pure returns (bytes8 result) { + bytes2 oldValue = extract_8_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_8_4(bytes8 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_8_4(bytes8 self, bytes4 value, uint8 offset) internal pure returns (bytes8 result) { + bytes4 oldValue = extract_8_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_8_6(bytes8 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 2) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_8_6(bytes8 self, bytes6 value, uint8 offset) internal pure returns (bytes8 result) { + bytes6 oldValue = extract_8_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_10_1(bytes10 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 9) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_10_1(bytes10 self, bytes1 value, uint8 offset) internal pure returns (bytes10 result) { + bytes1 oldValue = extract_10_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_10_2(bytes10 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 8) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_10_2(bytes10 self, bytes2 value, uint8 offset) internal pure returns (bytes10 result) { + bytes2 oldValue = extract_10_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_10_4(bytes10 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 6) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_10_4(bytes10 self, bytes4 value, uint8 offset) internal pure returns (bytes10 result) { + bytes4 oldValue = extract_10_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_10_6(bytes10 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_10_6(bytes10 self, bytes6 value, uint8 offset) internal pure returns (bytes10 result) { + bytes6 oldValue = extract_10_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_10_8(bytes10 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 2) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_10_8(bytes10 self, bytes8 value, uint8 offset) internal pure returns (bytes10 result) { + bytes8 oldValue = extract_10_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_12_1(bytes12 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 11) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_12_1(bytes12 self, bytes1 value, uint8 offset) internal pure returns (bytes12 result) { + bytes1 oldValue = extract_12_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_12_2(bytes12 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 10) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_12_2(bytes12 self, bytes2 value, uint8 offset) internal pure returns (bytes12 result) { + bytes2 oldValue = extract_12_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_12_4(bytes12 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 8) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_12_4(bytes12 self, bytes4 value, uint8 offset) internal pure returns (bytes12 result) { + bytes4 oldValue = extract_12_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_12_6(bytes12 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 6) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_12_6(bytes12 self, bytes6 value, uint8 offset) internal pure returns (bytes12 result) { + bytes6 oldValue = extract_12_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_12_8(bytes12 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_12_8(bytes12 self, bytes8 value, uint8 offset) internal pure returns (bytes12 result) { + bytes8 oldValue = extract_12_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_12_10(bytes12 self, uint8 offset) internal pure returns (bytes10 result) { + if (offset > 2) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(176, not(0))) + } + } + + function replace_12_10(bytes12 self, bytes10 value, uint8 offset) internal pure returns (bytes12 result) { + bytes10 oldValue = extract_12_10(self, offset); + assembly ("memory-safe") { + value := and(value, shl(176, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_16_1(bytes16 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 15) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_16_1(bytes16 self, bytes1 value, uint8 offset) internal pure returns (bytes16 result) { + bytes1 oldValue = extract_16_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_16_2(bytes16 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 14) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_16_2(bytes16 self, bytes2 value, uint8 offset) internal pure returns (bytes16 result) { + bytes2 oldValue = extract_16_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_16_4(bytes16 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 12) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_16_4(bytes16 self, bytes4 value, uint8 offset) internal pure returns (bytes16 result) { + bytes4 oldValue = extract_16_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_16_6(bytes16 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 10) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_16_6(bytes16 self, bytes6 value, uint8 offset) internal pure returns (bytes16 result) { + bytes6 oldValue = extract_16_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_16_8(bytes16 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 8) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_16_8(bytes16 self, bytes8 value, uint8 offset) internal pure returns (bytes16 result) { + bytes8 oldValue = extract_16_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_16_10(bytes16 self, uint8 offset) internal pure returns (bytes10 result) { + if (offset > 6) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(176, not(0))) + } + } + + function replace_16_10(bytes16 self, bytes10 value, uint8 offset) internal pure returns (bytes16 result) { + bytes10 oldValue = extract_16_10(self, offset); + assembly ("memory-safe") { + value := and(value, shl(176, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_16_12(bytes16 self, uint8 offset) internal pure returns (bytes12 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(160, not(0))) + } + } + + function replace_16_12(bytes16 self, bytes12 value, uint8 offset) internal pure returns (bytes16 result) { + bytes12 oldValue = extract_16_12(self, offset); + assembly ("memory-safe") { + value := and(value, shl(160, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_1(bytes20 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 19) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_20_1(bytes20 self, bytes1 value, uint8 offset) internal pure returns (bytes20 result) { + bytes1 oldValue = extract_20_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_2(bytes20 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 18) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_20_2(bytes20 self, bytes2 value, uint8 offset) internal pure returns (bytes20 result) { + bytes2 oldValue = extract_20_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_4(bytes20 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 16) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_20_4(bytes20 self, bytes4 value, uint8 offset) internal pure returns (bytes20 result) { + bytes4 oldValue = extract_20_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_6(bytes20 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 14) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_20_6(bytes20 self, bytes6 value, uint8 offset) internal pure returns (bytes20 result) { + bytes6 oldValue = extract_20_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_8(bytes20 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 12) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_20_8(bytes20 self, bytes8 value, uint8 offset) internal pure returns (bytes20 result) { + bytes8 oldValue = extract_20_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_10(bytes20 self, uint8 offset) internal pure returns (bytes10 result) { + if (offset > 10) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(176, not(0))) + } + } + + function replace_20_10(bytes20 self, bytes10 value, uint8 offset) internal pure returns (bytes20 result) { + bytes10 oldValue = extract_20_10(self, offset); + assembly ("memory-safe") { + value := and(value, shl(176, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_12(bytes20 self, uint8 offset) internal pure returns (bytes12 result) { + if (offset > 8) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(160, not(0))) + } + } + + function replace_20_12(bytes20 self, bytes12 value, uint8 offset) internal pure returns (bytes20 result) { + bytes12 oldValue = extract_20_12(self, offset); + assembly ("memory-safe") { + value := and(value, shl(160, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_20_16(bytes20 self, uint8 offset) internal pure returns (bytes16 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(128, not(0))) + } + } + + function replace_20_16(bytes20 self, bytes16 value, uint8 offset) internal pure returns (bytes20 result) { + bytes16 oldValue = extract_20_16(self, offset); + assembly ("memory-safe") { + value := and(value, shl(128, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_1(bytes22 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 21) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_22_1(bytes22 self, bytes1 value, uint8 offset) internal pure returns (bytes22 result) { + bytes1 oldValue = extract_22_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_2(bytes22 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 20) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_22_2(bytes22 self, bytes2 value, uint8 offset) internal pure returns (bytes22 result) { + bytes2 oldValue = extract_22_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_4(bytes22 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 18) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_22_4(bytes22 self, bytes4 value, uint8 offset) internal pure returns (bytes22 result) { + bytes4 oldValue = extract_22_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_6(bytes22 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 16) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_22_6(bytes22 self, bytes6 value, uint8 offset) internal pure returns (bytes22 result) { + bytes6 oldValue = extract_22_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_8(bytes22 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 14) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_22_8(bytes22 self, bytes8 value, uint8 offset) internal pure returns (bytes22 result) { + bytes8 oldValue = extract_22_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_10(bytes22 self, uint8 offset) internal pure returns (bytes10 result) { + if (offset > 12) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(176, not(0))) + } + } + + function replace_22_10(bytes22 self, bytes10 value, uint8 offset) internal pure returns (bytes22 result) { + bytes10 oldValue = extract_22_10(self, offset); + assembly ("memory-safe") { + value := and(value, shl(176, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_12(bytes22 self, uint8 offset) internal pure returns (bytes12 result) { + if (offset > 10) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(160, not(0))) + } + } + + function replace_22_12(bytes22 self, bytes12 value, uint8 offset) internal pure returns (bytes22 result) { + bytes12 oldValue = extract_22_12(self, offset); + assembly ("memory-safe") { + value := and(value, shl(160, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_16(bytes22 self, uint8 offset) internal pure returns (bytes16 result) { + if (offset > 6) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(128, not(0))) + } + } + + function replace_22_16(bytes22 self, bytes16 value, uint8 offset) internal pure returns (bytes22 result) { + bytes16 oldValue = extract_22_16(self, offset); + assembly ("memory-safe") { + value := and(value, shl(128, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_22_20(bytes22 self, uint8 offset) internal pure returns (bytes20 result) { + if (offset > 2) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(96, not(0))) + } + } + + function replace_22_20(bytes22 self, bytes20 value, uint8 offset) internal pure returns (bytes22 result) { + bytes20 oldValue = extract_22_20(self, offset); + assembly ("memory-safe") { + value := and(value, shl(96, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_1(bytes24 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 23) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_24_1(bytes24 self, bytes1 value, uint8 offset) internal pure returns (bytes24 result) { + bytes1 oldValue = extract_24_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_2(bytes24 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 22) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_24_2(bytes24 self, bytes2 value, uint8 offset) internal pure returns (bytes24 result) { + bytes2 oldValue = extract_24_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_4(bytes24 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 20) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_24_4(bytes24 self, bytes4 value, uint8 offset) internal pure returns (bytes24 result) { + bytes4 oldValue = extract_24_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_6(bytes24 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 18) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_24_6(bytes24 self, bytes6 value, uint8 offset) internal pure returns (bytes24 result) { + bytes6 oldValue = extract_24_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_8(bytes24 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 16) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_24_8(bytes24 self, bytes8 value, uint8 offset) internal pure returns (bytes24 result) { + bytes8 oldValue = extract_24_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_10(bytes24 self, uint8 offset) internal pure returns (bytes10 result) { + if (offset > 14) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(176, not(0))) + } + } + + function replace_24_10(bytes24 self, bytes10 value, uint8 offset) internal pure returns (bytes24 result) { + bytes10 oldValue = extract_24_10(self, offset); + assembly ("memory-safe") { + value := and(value, shl(176, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_12(bytes24 self, uint8 offset) internal pure returns (bytes12 result) { + if (offset > 12) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(160, not(0))) + } + } + + function replace_24_12(bytes24 self, bytes12 value, uint8 offset) internal pure returns (bytes24 result) { + bytes12 oldValue = extract_24_12(self, offset); + assembly ("memory-safe") { + value := and(value, shl(160, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_16(bytes24 self, uint8 offset) internal pure returns (bytes16 result) { + if (offset > 8) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(128, not(0))) + } + } + + function replace_24_16(bytes24 self, bytes16 value, uint8 offset) internal pure returns (bytes24 result) { + bytes16 oldValue = extract_24_16(self, offset); + assembly ("memory-safe") { + value := and(value, shl(128, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_20(bytes24 self, uint8 offset) internal pure returns (bytes20 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(96, not(0))) + } + } + + function replace_24_20(bytes24 self, bytes20 value, uint8 offset) internal pure returns (bytes24 result) { + bytes20 oldValue = extract_24_20(self, offset); + assembly ("memory-safe") { + value := and(value, shl(96, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_24_22(bytes24 self, uint8 offset) internal pure returns (bytes22 result) { + if (offset > 2) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(80, not(0))) + } + } + + function replace_24_22(bytes24 self, bytes22 value, uint8 offset) internal pure returns (bytes24 result) { + bytes22 oldValue = extract_24_22(self, offset); + assembly ("memory-safe") { + value := and(value, shl(80, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_1(bytes28 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 27) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_28_1(bytes28 self, bytes1 value, uint8 offset) internal pure returns (bytes28 result) { + bytes1 oldValue = extract_28_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_2(bytes28 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 26) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_28_2(bytes28 self, bytes2 value, uint8 offset) internal pure returns (bytes28 result) { + bytes2 oldValue = extract_28_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_4(bytes28 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 24) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_28_4(bytes28 self, bytes4 value, uint8 offset) internal pure returns (bytes28 result) { + bytes4 oldValue = extract_28_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_6(bytes28 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 22) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_28_6(bytes28 self, bytes6 value, uint8 offset) internal pure returns (bytes28 result) { + bytes6 oldValue = extract_28_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_8(bytes28 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 20) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_28_8(bytes28 self, bytes8 value, uint8 offset) internal pure returns (bytes28 result) { + bytes8 oldValue = extract_28_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_10(bytes28 self, uint8 offset) internal pure returns (bytes10 result) { + if (offset > 18) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(176, not(0))) + } + } + + function replace_28_10(bytes28 self, bytes10 value, uint8 offset) internal pure returns (bytes28 result) { + bytes10 oldValue = extract_28_10(self, offset); + assembly ("memory-safe") { + value := and(value, shl(176, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_12(bytes28 self, uint8 offset) internal pure returns (bytes12 result) { + if (offset > 16) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(160, not(0))) + } + } + + function replace_28_12(bytes28 self, bytes12 value, uint8 offset) internal pure returns (bytes28 result) { + bytes12 oldValue = extract_28_12(self, offset); + assembly ("memory-safe") { + value := and(value, shl(160, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_16(bytes28 self, uint8 offset) internal pure returns (bytes16 result) { + if (offset > 12) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(128, not(0))) + } + } + + function replace_28_16(bytes28 self, bytes16 value, uint8 offset) internal pure returns (bytes28 result) { + bytes16 oldValue = extract_28_16(self, offset); + assembly ("memory-safe") { + value := and(value, shl(128, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_20(bytes28 self, uint8 offset) internal pure returns (bytes20 result) { + if (offset > 8) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(96, not(0))) + } + } + + function replace_28_20(bytes28 self, bytes20 value, uint8 offset) internal pure returns (bytes28 result) { + bytes20 oldValue = extract_28_20(self, offset); + assembly ("memory-safe") { + value := and(value, shl(96, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_22(bytes28 self, uint8 offset) internal pure returns (bytes22 result) { + if (offset > 6) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(80, not(0))) + } + } + + function replace_28_22(bytes28 self, bytes22 value, uint8 offset) internal pure returns (bytes28 result) { + bytes22 oldValue = extract_28_22(self, offset); + assembly ("memory-safe") { + value := and(value, shl(80, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_28_24(bytes28 self, uint8 offset) internal pure returns (bytes24 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(64, not(0))) + } + } + + function replace_28_24(bytes28 self, bytes24 value, uint8 offset) internal pure returns (bytes28 result) { + bytes24 oldValue = extract_28_24(self, offset); + assembly ("memory-safe") { + value := and(value, shl(64, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_1(bytes32 self, uint8 offset) internal pure returns (bytes1 result) { + if (offset > 31) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(248, not(0))) + } + } + + function replace_32_1(bytes32 self, bytes1 value, uint8 offset) internal pure returns (bytes32 result) { + bytes1 oldValue = extract_32_1(self, offset); + assembly ("memory-safe") { + value := and(value, shl(248, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_2(bytes32 self, uint8 offset) internal pure returns (bytes2 result) { + if (offset > 30) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(240, not(0))) + } + } + + function replace_32_2(bytes32 self, bytes2 value, uint8 offset) internal pure returns (bytes32 result) { + bytes2 oldValue = extract_32_2(self, offset); + assembly ("memory-safe") { + value := and(value, shl(240, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_4(bytes32 self, uint8 offset) internal pure returns (bytes4 result) { + if (offset > 28) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(224, not(0))) + } + } + + function replace_32_4(bytes32 self, bytes4 value, uint8 offset) internal pure returns (bytes32 result) { + bytes4 oldValue = extract_32_4(self, offset); + assembly ("memory-safe") { + value := and(value, shl(224, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_6(bytes32 self, uint8 offset) internal pure returns (bytes6 result) { + if (offset > 26) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(208, not(0))) + } + } + + function replace_32_6(bytes32 self, bytes6 value, uint8 offset) internal pure returns (bytes32 result) { + bytes6 oldValue = extract_32_6(self, offset); + assembly ("memory-safe") { + value := and(value, shl(208, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_8(bytes32 self, uint8 offset) internal pure returns (bytes8 result) { + if (offset > 24) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(192, not(0))) + } + } + + function replace_32_8(bytes32 self, bytes8 value, uint8 offset) internal pure returns (bytes32 result) { + bytes8 oldValue = extract_32_8(self, offset); + assembly ("memory-safe") { + value := and(value, shl(192, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_10(bytes32 self, uint8 offset) internal pure returns (bytes10 result) { + if (offset > 22) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(176, not(0))) + } + } + + function replace_32_10(bytes32 self, bytes10 value, uint8 offset) internal pure returns (bytes32 result) { + bytes10 oldValue = extract_32_10(self, offset); + assembly ("memory-safe") { + value := and(value, shl(176, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_12(bytes32 self, uint8 offset) internal pure returns (bytes12 result) { + if (offset > 20) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(160, not(0))) + } + } + + function replace_32_12(bytes32 self, bytes12 value, uint8 offset) internal pure returns (bytes32 result) { + bytes12 oldValue = extract_32_12(self, offset); + assembly ("memory-safe") { + value := and(value, shl(160, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_16(bytes32 self, uint8 offset) internal pure returns (bytes16 result) { + if (offset > 16) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(128, not(0))) + } + } + + function replace_32_16(bytes32 self, bytes16 value, uint8 offset) internal pure returns (bytes32 result) { + bytes16 oldValue = extract_32_16(self, offset); + assembly ("memory-safe") { + value := and(value, shl(128, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_20(bytes32 self, uint8 offset) internal pure returns (bytes20 result) { + if (offset > 12) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(96, not(0))) + } + } + + function replace_32_20(bytes32 self, bytes20 value, uint8 offset) internal pure returns (bytes32 result) { + bytes20 oldValue = extract_32_20(self, offset); + assembly ("memory-safe") { + value := and(value, shl(96, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_22(bytes32 self, uint8 offset) internal pure returns (bytes22 result) { + if (offset > 10) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(80, not(0))) + } + } + + function replace_32_22(bytes32 self, bytes22 value, uint8 offset) internal pure returns (bytes32 result) { + bytes22 oldValue = extract_32_22(self, offset); + assembly ("memory-safe") { + value := and(value, shl(80, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_24(bytes32 self, uint8 offset) internal pure returns (bytes24 result) { + if (offset > 8) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(64, not(0))) + } + } + + function replace_32_24(bytes32 self, bytes24 value, uint8 offset) internal pure returns (bytes32 result) { + bytes24 oldValue = extract_32_24(self, offset); + assembly ("memory-safe") { + value := and(value, shl(64, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } + + function extract_32_28(bytes32 self, uint8 offset) internal pure returns (bytes28 result) { + if (offset > 4) revert OutOfRangeAccess(); + assembly ("memory-safe") { + result := and(shl(mul(8, offset), self), shl(32, not(0))) + } + } + + function replace_32_28(bytes32 self, bytes28 value, uint8 offset) internal pure returns (bytes32 result) { + bytes28 oldValue = extract_32_28(self, offset); + assembly ("memory-safe") { + value := and(value, shl(32, not(0))) + result := xor(self, shr(mul(8, offset), xor(oldValue, value))) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Panic.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Panic.sol new file mode 100644 index 00000000..e168824d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Panic.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Helper library for emitting standardized panic codes. + * + * ```solidity + * contract Example { + * using Panic for uint256; + * + * // Use any of the declared internal constants + * function foo() { Panic.GENERIC.panic(); } + * + * // Alternatively + * function foo() { Panic.panic(Panic.GENERIC); } + * } + * ``` + * + * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. + * + * _Available since v5.1._ + */ +// slither-disable-next-line unused-state +library Panic { + /// @dev generic / unspecified error + uint256 internal constant GENERIC = 0x00; + /// @dev used by the assert() builtin + uint256 internal constant ASSERT = 0x01; + /// @dev arithmetic underflow or overflow + uint256 internal constant UNDER_OVERFLOW = 0x11; + /// @dev division or modulo by zero + uint256 internal constant DIVISION_BY_ZERO = 0x12; + /// @dev enum conversion error + uint256 internal constant ENUM_CONVERSION_ERROR = 0x21; + /// @dev invalid encoding in storage + uint256 internal constant STORAGE_ENCODING_ERROR = 0x22; + /// @dev empty array pop + uint256 internal constant EMPTY_ARRAY_POP = 0x31; + /// @dev array out of bounds access + uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32; + /// @dev resource error (too large allocation or too large array) + uint256 internal constant RESOURCE_ERROR = 0x41; + /// @dev calling invalid internal function + uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51; + + /// @dev Reverts with a panic code. Recommended to use with + /// the internal constants with predefined codes. + function panic(uint256 code) internal pure { + assembly ("memory-safe") { + mstore(0x00, 0x4e487b71) + mstore(0x20, code) + revert(0x1c, 0x24) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/security/Pausable.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Pausable.sol similarity index 82% rename from dependencies/@openzeppelin-contracts-4.9.6/security/Pausable.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/Pausable.sol index bdd11843..68e7d268 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/security/Pausable.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Pausable.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) +// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../utils/Context.sol"; +import {Context} from "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop @@ -15,6 +15,8 @@ import "../utils/Context.sol"; * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { + bool private _paused; + /** * @dev Emitted when the pause is triggered by `account`. */ @@ -25,14 +27,15 @@ abstract contract Pausable is Context { */ event Unpaused(address account); - bool private _paused; + /** + * @dev The operation failed because the contract is paused. + */ + error EnforcedPause(); /** - * @dev Initializes the contract in unpaused state. + * @dev The operation failed because the contract is not paused. */ - constructor() { - _paused = false; - } + error ExpectedPause(); /** * @dev Modifier to make a function callable only when the contract is not paused. @@ -69,14 +72,18 @@ abstract contract Pausable is Context { * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { - require(!paused(), "Pausable: paused"); + if (paused()) { + revert EnforcedPause(); + } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { - require(paused(), "Pausable: not paused"); + if (!paused()) { + revert ExpectedPause(); + } } /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/RLP.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/RLP.sol new file mode 100644 index 00000000..f9d18945 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/RLP.sol @@ -0,0 +1,487 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/RLP.sol) + +pragma solidity ^0.8.26; + +import {Math} from "./math/Math.sol"; +import {Accumulators} from "./structs/Accumulators.sol"; +import {Bytes} from "./Bytes.sol"; +import {Memory} from "./Memory.sol"; + +/** + * @dev Library for encoding and decoding data in RLP format. + * Recursive Length Prefix (RLP) is the main encoding method used to serialize objects in Ethereum. + * It's used for encoding everything from transactions to blocks to Patricia-Merkle tries. + * + * Inspired by + * + * * https://github.com/succinctlabs/optimism-bedrock-contracts/blob/main/rlp/RLPWriter.sol + * * https://github.com/succinctlabs/optimism-bedrock-contracts/blob/main/rlp/RLPReader.sol + * + * == Canonical vs Non-Canonical Encodings + * + * According to the Ethereum Yellow Paper, a "canonical" RLP encoding is the unique, minimal + * representation of a value. For scalar values (integers), this means: + * + * * No leading zero bytes (e.g., `0x0123` should be encoded as 2 bytes, not `0x000123` as 3 bytes) + * * Single bytes less than 0x80 must be encoded directly without a prefix wrapper + * * Zero is represented as an empty byte array (prefix `0x80`) + * + * A "non-canonical" encoding represents the same value but doesn't follow these minimality rules. + * For example, encoding the integer 1234 (0x04d2) with a leading zero as `0x830004d2` instead + * of the canonical `0x8204d2`. + * + * [IMPORTANT] + * ==== + * This implementation takes a permissive approach to decoding, accepting some non-canonical + * encodings (e.g., scalar values with leading zero bytes) that would be rejected by + * strict implementations like go-ethereum. This design choice prioritizes compatibility + * with diverse RLP encoders in the ecosystem over strict adherence to the Yellow Paper + * specification's canonicalization requirements. + * + * Users should be aware that: + * + * * Multiple different RLP encodings may decode to the same value (non-injective) + * * Encoding followed by decoding is guaranteed to work correctly + * * External RLP data from untrusted sources may have non-canonical encodings + * * Improperly wrapped single bytes (< 0x80) are still rejected as invalid + * ==== + */ +library RLP { + using Accumulators for *; + using Bytes for *; + using Memory for *; + + /// @dev The item is not properly formatted and cannot be decoded. + error RLPInvalidEncoding(); + + enum ItemType { + Data, // Single data value + List // List of RLP encoded items + } + + /** + * @dev Maximum length for data that will be encoded using the short format. + * If `data.length <= 55 bytes`, it will be encoded as: `[0x80 + length]` + data. + */ + uint8 internal constant SHORT_THRESHOLD = 55; + /// @dev Single byte prefix for short strings (0-55 bytes) + uint8 internal constant SHORT_OFFSET = 0x80; + /// @dev Prefix for list items (0xC0) + uint8 internal constant LONG_OFFSET = 0xC0; + + /**************************************************************************************************************** + * ENCODING - ENCODER * + ****************************************************************************************************************/ + + struct Encoder { + Accumulators.Accumulator acc; + } + + /// @dev Create an empty RLP Encoder. + function encoder() internal pure returns (Encoder memory enc) { + enc.acc = Accumulators.accumulator(); + } + + /// @dev Add a boolean to a given RLP Encoder. + function push(Encoder memory self, bool input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /// @dev Add an address to a given RLP Encoder. + function push(Encoder memory self, address input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /// @dev Add a uint256 to a given RLP Encoder. + function push(Encoder memory self, uint256 input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /// @dev Add a bytes32 to a given RLP Encoder. + function push(Encoder memory self, bytes32 input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /// @dev Add a bytes buffer to a given RLP Encoder. + function push(Encoder memory self, bytes memory input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /// @dev Add a string to a given RLP Encoder. + function push(Encoder memory self, string memory input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /// @dev Add an array of bytes to a given RLP Encoder. + function push(Encoder memory self, bytes[] memory input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /// @dev Add an (input) Encoder to a (target) Encoder. The input is RLP encoded as a list of bytes, and added to the target Encoder. + function push(Encoder memory self, Encoder memory input) internal pure returns (Encoder memory) { + self.acc.push(encode(input)); + return self; + } + + /**************************************************************************************************************** + * ENCODING - TO BYTES * + ****************************************************************************************************************/ + + /** + * @dev Encode a boolean as RLP. + * + * Boolean `true` is encoded as 0x01, `false` as 0x80 (equivalent to encoding integers 1 and 0). + * This follows the de facto ecosystem standard where booleans are treated as 0/1 integers. + */ + function encode(bool input) internal pure returns (bytes memory result) { + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, 0x01) // length of the encoded data: 1 byte + mstore8(add(result, 0x20), add(mul(iszero(input), 0x7f), 1)) // input + mstore(0x40, add(result, 0x21)) // reserve memory + } + } + + /** + * @dev Encode an address as an RLP item of fixed size (20 bytes). + * + * The address is encoded with its leading zeros (if it has any). If someone wants to encode the address as a scalar, + * they can cast it to an uint256 and then call the corresponding {encode} function. + */ + function encode(address input) internal pure returns (bytes memory result) { + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, 0x15) // length of the encoded data: 1 (prefix) + 0x14 (address) + mstore(add(result, 0x20), or(shl(248, 0x94), shl(88, input))) // prefix (0x94 = SHORT_OFFSET + 0x14) + input + mstore(0x40, add(result, 0x35)) // reserve memory + } + } + + /** + * @dev Encode an uint256 as an RLP scalar. + * + * Unlike {encode-bytes32-}, this function uses scalar encoding that removes the prefix zeros. + */ + function encode(uint256 input) internal pure returns (bytes memory result) { + if (input < SHORT_OFFSET) { + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, 0x01) // length of the encoded data: 1 byte + mstore8(add(result, 0x20), or(input, mul(0x80, iszero(input)))) // input (zero is encoded as 0x80) + mstore(0x40, add(result, 0x21)) // reserve memory + } + } else { + uint256 length = Math.log256(input) + 1; + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, add(length, 1)) // length of the encoded data: 1 (prefix) + length + mstore8(add(result, 0x20), add(length, SHORT_OFFSET)) // prefix: SHORT_OFFSET + length + mstore(add(result, 0x21), shl(sub(256, mul(8, length)), input)) // input (aligned left) + mstore(0x40, add(result, add(length, 0x21))) // reserve memory + } + } + } + + /** + * @dev Encode a bytes32 as an RLP item of fixed size (32 bytes). + * + * Unlike {encode-uint256-}, this function uses array encoding that preserves the prefix zeros. + */ + function encode(bytes32 input) internal pure returns (bytes memory result) { + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, 0x21) // length of the encoded data: 1 (prefix) + 0x20 + mstore8(add(result, 0x20), 0xa0) // prefix: SHORT_OFFSET + 0x20 + mstore(add(result, 0x21), input) + mstore(0x40, add(result, 0x41)) // reserve memory + } + } + + /// @dev Encode a bytes buffer as RLP. + function encode(bytes memory input) internal pure returns (bytes memory) { + return + (input.length == 1 && uint8(input[0]) < SHORT_OFFSET) ? bytes.concat(input) : _encode(input, SHORT_OFFSET); + } + + /// @dev Encode a string as RLP. Type alias for {encode-bytes-}. + function encode(string memory input) internal pure returns (bytes memory) { + return encode(bytes(input)); + } + + /** + * @dev Encode an array of bytes as RLP. + * This function expects an array of already encoded bytes, not raw bytes. + * Users should call {encode} on each element of the array before calling it. + */ + function encode(bytes[] memory input) internal pure returns (bytes memory) { + return _encode(input.concat(), LONG_OFFSET); + } + + /// @dev Encode an encoder (list of bytes) as RLP + function encode(Encoder memory self) internal pure returns (bytes memory) { + return _encode(self.acc.flatten(), LONG_OFFSET); + } + + function _encode(bytes memory input, uint256 offset) private pure returns (bytes memory result) { + uint256 length = input.length; + if (length <= SHORT_THRESHOLD) { + // Encode "short-bytes" as + // [ offset + input.length | input ] + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, add(length, 1)) // length of the encoded data: 1 (prefix) + input.length + mstore8(add(result, 0x20), add(length, offset)) // prefix: offset + input.length + mcopy(add(result, 0x21), add(input, 0x20), length) // input + mstore(0x40, add(result, add(length, 0x21))) // reserve memory + } + } else { + // Encode "long-bytes" as + // [ SHORT_THRESHOLD + offset + input.length.length | input.length | input ] + uint256 lenlength = Math.log256(length) + 1; + assembly ("memory-safe") { + result := mload(0x40) + mstore(result, add(add(length, lenlength), 1)) // length of the encoded data: 1 (prefix) + input.length.length + input.length + mstore8(add(result, 0x20), add(add(lenlength, offset), SHORT_THRESHOLD)) // prefix: SHORT_THRESHOLD + offset + input.length.length + mstore(add(result, 0x21), shl(sub(256, mul(8, lenlength)), length)) // input.length + mcopy(add(result, add(lenlength, 0x21)), add(input, 0x20), length) // input + mstore(0x40, add(result, add(add(length, lenlength), 0x21))) // reserve memory + } + } + } + + /**************************************************************************************************************** + * DECODING - READ FROM AN RLP ENCODED MEMORY SLICE * + ****************************************************************************************************************/ + + /** + * @dev Decode an RLP encoded bool. See {encode-bool} + * + * NOTE: This function treats any non-zero value as `true`, which is more permissive + * than some implementations (e.g., go-ethereum only accepts `0x00` for false and `0x01` + * for true). For example, `0x02`, `0x03`, etc. will all decode as `true`. + */ + function readBool(Memory.Slice item) internal pure returns (bool) { + return readUint256(item) != 0; + } + + /** + * @dev Decode an RLP encoded address. See {encode-address} + * + * [NOTE] + * ==== + * This function accepts both single-byte encodings (for values 0-127, including + * precompile addresses like 0x01) and the standard 21-byte encoding with the `0x94` prefix. + * For example, `0x01` decodes to `0x0000000000000000000000000000000000000001`. + * + * Additionally, like {readUint256}, this function accepts non-canonical encodings with + * leading zeros. For instance, both `0x01` and `0x940000000000000000000000000000000000000001` + * decode to the same address. + * ==== + */ + function readAddress(Memory.Slice item) internal pure returns (address) { + uint256 length = item.length(); + require(length == 1 || length == 21, RLPInvalidEncoding()); + return address(uint160(readUint256(item))); + } + + /** + * @dev Decode an RLP encoded uint256. See {encode-uint256} + * + * [NOTE] + * ==== + * This function accepts non-canonical encodings with leading zero bytes for multi-byte values, + * which differs from the Ethereum Yellow Paper specification and some reference + * implementations like go-ethereum. For example, both `0x88ab54a98ceb1f0ad2` and + * `0x8900ab54a98ceb1f0ad2` will decode to the same uint256 value (12345678901234567890). + * + * However, single bytes less than 0x80 must NOT be wrapped with a prefix. For example, + * `0x8100` is invalid (should be `0x00`), but `0x820000` is valid (two zero bytes). + * + * This permissive behavior is intentional for compatibility with various RLP encoders + * in the ecosystem, but users should be aware that multiple RLP encodings may map + * to the same decoded value (non-injective decoding). + * ==== + */ + function readUint256(Memory.Slice item) internal pure returns (uint256) { + uint256 length = item.length(); + require(length <= 33, RLPInvalidEncoding()); + + (uint256 itemOffset, uint256 itemLength, ItemType itemType) = _decodeLength(item); + require(itemType == ItemType.Data, RLPInvalidEncoding()); + + return itemLength == 0 ? 0 : uint256(item.load(itemOffset)) >> (256 - 8 * itemLength); + } + + /** + * @dev Decode an RLP encoded bytes32. See {encode-bytes32} + * + * NOTE: Since this function delegates to {readUint256}, it inherits the non-canonical + * encoding acceptance behavior for multi-byte values. Multiple RLP encodings with different + * leading zero bytes may decode to the same bytes32 value, but single bytes < 0x80 must + * not be wrapped with a prefix (e.g., `0x820000` is valid, but `0x8100` is not). + */ + function readBytes32(Memory.Slice item) internal pure returns (bytes32) { + return bytes32(readUint256(item)); + } + + /// @dev Decodes an RLP encoded bytes. See {encode-bytes} + function readBytes(Memory.Slice item) internal pure returns (bytes memory) { + (uint256 offset, uint256 length, ItemType itemType) = _decodeLength(item); + require(itemType == ItemType.Data, RLPInvalidEncoding()); + + // Length is checked by {slice} + return item.slice(offset, length).toBytes(); + } + + /// @dev Decodes an RLP encoded string. See {encode-string} + function readString(Memory.Slice item) internal pure returns (string memory) { + return string(readBytes(item)); + } + + /** + * @dev Decodes an RLP encoded list in a memory slice into an array of RLP Items. + * + * NOTE: The returned array contains slice references into the original payload, not copied bytes. Any further + * modification of the input buffer may cause the output result to become invalid. + */ + function readList(Memory.Slice item) internal pure returns (Memory.Slice[] memory list) { + uint256 itemLength = item.length(); + + (uint256 listOffset, uint256 listLength, ItemType itemType) = _decodeLength(item); + require(itemType == ItemType.List && itemLength == listOffset + listLength, RLPInvalidEncoding()); + + // Start a buffer in the unallocated space + uint256 ptr; + assembly ("memory-safe") { + list := mload(0x40) + ptr := add(list, 0x20) + } + + // Get all items in order, and push them to the buffer + for (uint256 currentOffset = listOffset; currentOffset < itemLength; ptr += 0x20) { + (uint256 elementOffset, uint256 elementLength, ) = _decodeLength(item.slice(currentOffset)); + Memory.Slice element = item.slice(currentOffset, elementLength + elementOffset); + currentOffset += elementOffset + elementLength; + + // Write item to the buffer + assembly ("memory-safe") { + mstore(ptr, element) + } + } + + // write list length and reserve space + assembly ("memory-safe") { + mstore(list, div(sub(ptr, add(list, 0x20)), 0x20)) + mstore(0x40, ptr) + } + } + + /**************************************************************************************************************** + * DECODING - FROM BYTES * + ****************************************************************************************************************/ + + /// @dev Decode an RLP encoded bool from bytes. See {readBool} + function decodeBool(bytes memory item) internal pure returns (bool) { + return readBool(item.asSlice()); + } + + /// @dev Decode an RLP encoded address from bytes. See {readAddress} + function decodeAddress(bytes memory item) internal pure returns (address) { + return readAddress(item.asSlice()); + } + + /// @dev Decode an RLP encoded uint256 from bytes. See {readUint256} + function decodeUint256(bytes memory item) internal pure returns (uint256) { + return readUint256(item.asSlice()); + } + + /// @dev Decode an RLP encoded bytes32 from bytes. See {readBytes32} + function decodeBytes32(bytes memory item) internal pure returns (bytes32) { + return readBytes32(item.asSlice()); + } + + /// @dev Decode an RLP encoded bytes from bytes. See {readBytes} + function decodeBytes(bytes memory item) internal pure returns (bytes memory) { + return readBytes(item.asSlice()); + } + + /// @dev Decode an RLP encoded string from bytes. See {readString} + function decodeString(bytes memory item) internal pure returns (string memory) { + return readString(item.asSlice()); + } + + /** + * @dev Decode an RLP encoded list from bytes. See {readList} + * + * NOTE: The returned array contains slice references into the original payload, not copied bytes. Any further + * modification of the input buffer may cause the output result to become invalid. + */ + function decodeList(bytes memory value) internal pure returns (Memory.Slice[] memory) { + return readList(value.asSlice()); + } + + /** + * @dev Decodes an RLP `item`'s length and type from its prefix. + * Returns the offset, length, and type of the RLP item based on the encoding rules. + */ + function _decodeLength(Memory.Slice item) private pure returns (uint256, uint256, ItemType) { + uint256 itemLength = item.length(); + + require(itemLength != 0, RLPInvalidEncoding()); + uint8 prefix = uint8(bytes1(item.load(0))); + + if (prefix < LONG_OFFSET) { + // CASE: item + if (prefix < SHORT_OFFSET) { + // Case: Single byte below 128 + return (0, 1, ItemType.Data); + } else if (prefix <= SHORT_OFFSET + SHORT_THRESHOLD) { + // Case: Short string (0-55 bytes) + uint256 strLength = prefix - SHORT_OFFSET; + require( + itemLength > strLength && (strLength != 1 || bytes1(item.load(1)) >= bytes1(SHORT_OFFSET)), + RLPInvalidEncoding() + ); + return (1, strLength, ItemType.Data); + } else { + // Case: Long string (>55 bytes) + uint256 lengthLength = prefix - SHORT_OFFSET - SHORT_THRESHOLD; + + bytes32 lenChunk = item.load(1); + require(itemLength > lengthLength && bytes1(lenChunk) != 0x00, RLPInvalidEncoding()); + + uint256 len = uint256(lenChunk) >> (256 - 8 * lengthLength); + require(len > SHORT_THRESHOLD && itemLength > lengthLength + len, RLPInvalidEncoding()); + + return (lengthLength + 1, len, ItemType.Data); + } + } else { + // Case: list + if (prefix <= LONG_OFFSET + SHORT_THRESHOLD) { + // Case: Short list + uint256 listLength = prefix - LONG_OFFSET; + require(itemLength > listLength, RLPInvalidEncoding()); + return (1, listLength, ItemType.List); + } else { + // Case: Long list + uint256 lengthLength = prefix - LONG_OFFSET - SHORT_THRESHOLD; + + bytes32 lenChunk = item.load(1); + require(itemLength > lengthLength && bytes1(lenChunk) != 0x00, RLPInvalidEncoding()); + + uint256 len = uint256(lenChunk) >> (256 - 8 * lengthLength); + require(len > SHORT_THRESHOLD && itemLength > lengthLength + len, RLPInvalidEncoding()); + + return (lengthLength + 1, len, ItemType.List); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/security/ReentrancyGuard.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/ReentrancyGuard.sol similarity index 55% rename from dependencies/@openzeppelin-contracts-4.9.6/security/ReentrancyGuard.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/ReentrancyGuard.sol index dac508b6..c156fa1c 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/security/ReentrancyGuard.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/ReentrancyGuard.sol @@ -1,7 +1,9 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuard.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; + +import {StorageSlot} from "./StorageSlot.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. @@ -15,11 +17,25 @@ pragma solidity ^0.8.0; * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * + * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, + * consider using {ReentrancyGuardTransient} instead. + * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + * + * IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced + * by the {ReentrancyGuardTransient} variant in v6.0. + * + * @custom:stateless */ abstract contract ReentrancyGuard { + using StorageSlot for bytes32; + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant REENTRANCY_GUARD_STORAGE = + 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; + // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write @@ -31,13 +47,16 @@ abstract contract ReentrancyGuard { // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. - uint256 private constant _NOT_ENTERED = 1; - uint256 private constant _ENTERED = 2; + uint256 private constant NOT_ENTERED = 1; + uint256 private constant ENTERED = 2; - uint256 private _status; + /** + * @dev Unauthorized reentrant call. + */ + error ReentrancyGuardReentrantCall(); constructor() { - _status = _NOT_ENTERED; + _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED; } /** @@ -53,18 +72,37 @@ abstract contract ReentrancyGuard { _nonReentrantAfter(); } + /** + * @dev A `view` only version of {nonReentrant}. Use to block view functions + * from being called, preventing reading from inconsistent contract state. + * + * CAUTION: This is a "view" modifier and does not change the reentrancy + * status. Use it only on view functions. For payable or non-payable functions, + * use the standard {nonReentrant} modifier instead. + */ + modifier nonReentrantView() { + _nonReentrantBeforeView(); + _; + } + + function _nonReentrantBeforeView() private view { + if (_reentrancyGuardEntered()) { + revert ReentrancyGuardReentrantCall(); + } + } + function _nonReentrantBefore() private { - // On the first call to nonReentrant, _status will be _NOT_ENTERED - require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); + // On the first call to nonReentrant, _status will be NOT_ENTERED + _nonReentrantBeforeView(); // Any calls to nonReentrant after this point will fail - _status = _ENTERED; + _reentrancyGuardStorageSlot().getUint256Slot().value = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) - _status = _NOT_ENTERED; + _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED; } /** @@ -72,6 +110,10 @@ abstract contract ReentrancyGuard { * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { - return _status == _ENTERED; + return _reentrancyGuardStorageSlot().getUint256Slot().value == ENTERED; + } + + function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) { + return REENTRANCY_GUARD_STORAGE; } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/ReentrancyGuardTransient.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/ReentrancyGuardTransient.sol new file mode 100644 index 00000000..273a5dcd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/ReentrancyGuardTransient.sol @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuardTransient.sol) + +pragma solidity ^0.8.24; + +import {TransientSlot} from "./TransientSlot.sol"; + +/** + * @dev Variant of {ReentrancyGuard} that uses transient storage. + * + * NOTE: This variant only works on networks where EIP-1153 is available. + * + * _Available since v5.1._ + * + * @custom:stateless + */ +abstract contract ReentrancyGuardTransient { + using TransientSlot for *; + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant REENTRANCY_GUARD_STORAGE = + 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; + + /** + * @dev Unauthorized reentrant call. + */ + error ReentrancyGuardReentrantCall(); + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + * Calling a `nonReentrant` function from another `nonReentrant` + * function is not supported. It is possible to prevent this from happening + * by making the `nonReentrant` function external, and making it call a + * `private` function that does the actual work. + */ + modifier nonReentrant() { + _nonReentrantBefore(); + _; + _nonReentrantAfter(); + } + + /** + * @dev A `view` only version of {nonReentrant}. Use to block view functions + * from being called, preventing reading from inconsistent contract state. + * + * CAUTION: This is a "view" modifier and does not change the reentrancy + * status. Use it only on view functions. For payable or non-payable functions, + * use the standard {nonReentrant} modifier instead. + */ + modifier nonReentrantView() { + _nonReentrantBeforeView(); + _; + } + + function _nonReentrantBeforeView() private view { + if (_reentrancyGuardEntered()) { + revert ReentrancyGuardReentrantCall(); + } + } + + function _nonReentrantBefore() private { + // On the first call to nonReentrant, REENTRANCY_GUARD_STORAGE.asBoolean().tload() will be false + _nonReentrantBeforeView(); + + // Any calls to nonReentrant after this point will fail + _reentrancyGuardStorageSlot().asBoolean().tstore(true); + } + + function _nonReentrantAfter() private { + _reentrancyGuardStorageSlot().asBoolean().tstore(false); + } + + /** + * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a + * `nonReentrant` function in the call stack. + */ + function _reentrancyGuardEntered() internal view returns (bool) { + return _reentrancyGuardStorageSlot().asBoolean().tload(); + } + + function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) { + return REENTRANCY_GUARD_STORAGE; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/RelayedCall.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/RelayedCall.sol new file mode 100644 index 00000000..4f9efac8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/RelayedCall.sol @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/RelayedCall.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Library for performing external calls through dynamically deployed relay contracts that hide the original + * caller's address from the target contract. This pattern is used in ERC-4337's EntryPoint for account factory + * calls and ERC-6942 for safe factory interactions. + * + * When privileged contracts need to make arbitrary external calls based on user input, calling the target directly + * can be risky because the target sees the privileged contract as `msg.sender` and could exploit this trust + * relationship. This library solves this by deploying minimal relay contracts that act as intermediaries, ensuring + * the target only sees the unprivileged relay address as `msg.sender`. + * + * For example, instead of `target.call(data)` where the target sees this contract as `msg.sender`, use + * {relayCall} where the target sees a relay address as `msg.sender`. + * + * NOTE: This library uses the PUSH0 opcode that was introduced in the Shanghai hardfork. While this instruction is + * now widely supported, developers using the library on exotic chains should verify that their target chain has + * supports for EIP-3855. + */ +library RelayedCall { + /// @dev Relays a call to the target contract through a dynamically deployed relay contract. + function relayCall(address target, bytes memory data) internal returns (bool, bytes memory) { + return relayCall(target, 0, data); + } + + /// @dev Same as {relayCall} but with a value. + function relayCall(address target, uint256 value, bytes memory data) internal returns (bool, bytes memory) { + return relayCall(target, value, data, bytes32(0)); + } + + /// @dev Same as {relayCall} but with a salt. + function relayCall(address target, bytes memory data, bytes32 salt) internal returns (bool, bytes memory) { + return relayCall(target, 0, data, salt); + } + + /// @dev Same as {relayCall} but with a salt and a value. + function relayCall( + address target, + uint256 value, + bytes memory data, + bytes32 salt + ) internal returns (bool, bytes memory) { + return getRelayer(salt).call{value: value}(abi.encodePacked(target, data)); + } + + /// @dev Same as {getRelayer} but with a `bytes32(0)` default salt. + function getRelayer() internal returns (address) { + return getRelayer(bytes32(0)); + } + + /// @dev Returns the relayer address for a given salt. + function getRelayer(bytes32 salt) internal returns (address relayer) { + // [Relayer details] + // + // deployment prefix: 60475f8160095f39f3 + // deployed bytecode: 73331460133611166022575f5ffd5b6014360360145f375f5f601436035f345f3560601c5af13d5f5f3e5f3d91604557fd5bf3 + // + // offset | bytecode | opcode | stack + // -------|-------------|----------------|-------- + // 0x0000 | 73 | push20 | + // 0x0015 | 33 | address | + // 0x0016 | 14 | eq | access + // 0x0017 | 6013 | push1 0x13 | 0x13 access + // 0x0019 | 36 | calldatasize | cds 0x13 access + // 0x001a | 11 | gt | (cds>0x13) access + // 0x001b | 16 | and | (cds>0x13 && access) + // 0x001c | 6022 | push1 0x22 | 0x22 (cds>0x13 && access) + // 0x001e | 57 | jumpi | + // 0x001f | 5f | push0 | 0 + // 0x0020 | 5f | push0 | 0 0 + // 0x0021 | fd | revert | + // 0x0022 | 5b | jumpdest | + // 0x0023 | 6014 | push1 0x14 | 0x14 + // 0x0025 | 36 | calldatasize | cds 0x14 + // 0x0026 | 03 | sub | (cds-0x14) + // 0x0027 | 6014 | push1 0x14 | 0x14 (cds-0x14) + // 0x0029 | 5f | push0 | 0 0x14 (cds-0x14) + // 0x002a | 37 | calldatacopy | + // 0x002b | 5f | push0 | 0 + // 0x002c | 5f | push0 | 0 0 + // 0x002d | 6014 | push1 0x14 | 0x14 0 0 + // 0x002f | 36 | calldatasize | cds 0x14 0 0 + // 0x0030 | 03 | sub | (cds-0x14) 0 0 + // 0x0031 | 5f | push0 | 0 (cds-0x14) 0 0 + // 0x0032 | 34 | callvalue | value 0 (cds-0x14) 0 0 + // 0x0033 | 5f | push0 | 0 value 0 (cds-0x14) 0 0 + // 0x0034 | 35 | calldataload | cd[0] value 0 (cds-0x14) 0 0 + // 0x0035 | 6060 | push1 0x60 | 0x60 cd[0] value 0 (cds-0x14) 0 0 + // 0x0037 | 1c | shr | target value 0 (cds-0x14) 0 0 + // 0x0038 | 5a | gas | gas target value 0 (cds-0x14) 0 0 + // 0x0039 | f1 | call | suc + // 0x003a | 3d | returndatasize | rds suc + // 0x003b | 5f | push0 | 0 rds suc + // 0x003c | 5f | push0 | 0 0 rds suc + // 0x003d | 3e | returndatacopy | suc + // 0x003e | 5f | push0 | 0 suc + // 0x003f | 3d | returndatasize | rds 0 suc + // 0x0040 | 91 | swap2 | suc 0 rds + // 0x0041 | 6045 | push1 0x45 | 0x45 suc 0 rds + // 0x0043 | 57 | jumpi | 0 rds + // 0x0044 | fd | revert | + // 0x0045 | 5b | jumpdest | 0 rds + // 0x0046 | f3 | return | + + assembly ("memory-safe") { + let fmp := mload(0x40) + + // build initcode at FMP + mstore(add(fmp, 0x46), 0x60145f375f5f601436035f345f3560601c5af13d5f5f3e5f3d91604557fd5bf3) + mstore(add(fmp, 0x26), 0x331460133611166022575f5ffd5b60143603) + mstore(add(fmp, 0x14), address()) + mstore(add(fmp, 0x00), 0x60475f8160095f39f373) + let initcodehash := keccak256(add(fmp, 0x16), 0x50) + + // compute create2 address + mstore(0x40, initcodehash) + mstore(0x20, salt) + mstore(0x00, address()) + mstore8(0x0b, 0xff) + relayer := and(keccak256(0x0b, 0x55), shr(96, not(0))) + + // is relayer not yet deployed, deploy it + if iszero(extcodesize(relayer)) { + if iszero(create2(0, add(fmp, 0x16), 0x50, salt)) { + returndatacopy(fmp, 0x00, returndatasize()) + revert(fmp, returndatasize()) + } + } + + // cleanup fmp space used as scratch + mstore(0x40, fmp) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/ShortStrings.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/ShortStrings.sol similarity index 82% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/ShortStrings.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/ShortStrings.sol index 90a05499..79332317 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/ShortStrings.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/ShortStrings.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (utils/ShortStrings.sol) -pragma solidity ^0.8.8; +pragma solidity ^0.8.20; -import "./StorageSlot.sol"; +import {StorageSlot} from "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | @@ -39,7 +39,7 @@ type ShortString is bytes32; */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. - bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; + bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); @@ -51,7 +51,7 @@ library ShortStrings { */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); - if (bstr.length > 31) { + if (bstr.length > 0x1f) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); @@ -63,9 +63,8 @@ library ShortStrings { function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. - string memory str = new string(32); - /// @solidity memory-safe-assembly - assembly { + string memory str = new string(0x20); + assembly ("memory-safe") { mstore(str, len) mstore(add(str, 0x20), sstr) } @@ -77,7 +76,7 @@ library ShortStrings { */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; - if (result > 31) { + if (result > 0x1f) { revert InvalidShortString(); } return result; @@ -87,19 +86,19 @@ library ShortStrings { * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { - if (bytes(value).length < 32) { + if (bytes(value).length < 0x20) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; - return ShortString.wrap(_FALLBACK_SENTINEL); + return ShortString.wrap(FALLBACK_SENTINEL); } } /** - * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. + * @dev Decode a string that was encoded to `ShortString` or written to storage using {toShortStringWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { - if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; @@ -107,13 +106,14 @@ library ShortStrings { } /** - * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. + * @dev Return the length of a string that was encoded to `ShortString` or written to storage using + * {toShortStringWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { - if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { + if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/SlotDerivation.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/SlotDerivation.sol new file mode 100644 index 00000000..5d41be5f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/SlotDerivation.sol @@ -0,0 +1,155 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/SlotDerivation.sol) +// This file was procedurally generated from scripts/generate/templates/SlotDerivation.js. + +pragma solidity ^0.8.20; + +/** + * @dev Library for computing storage (and transient storage) locations from namespaces and deriving slots + * corresponding to standard patterns. The derivation method for array and mapping matches the storage layout used by + * the solidity language / compiler. + * + * See https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays[Solidity docs for mappings and dynamic arrays.]. + * + * Example usage: + * ```solidity + * contract Example { + * // Add the library methods + * using StorageSlot for bytes32; + * using SlotDerivation for *; + * + * // Declare a namespace + * string private constant _NAMESPACE = ""; // eg. OpenZeppelin.Slot + * + * function setValueInNamespace(uint256 key, address newValue) internal { + * _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue; + * } + * + * function getValueInNamespace(uint256 key) internal view returns (address) { + * return _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value; + * } + * } + * ``` + * + * TIP: Consider using this library along with {StorageSlot}. + * + * NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking + * upgrade safety will ignore the slots accessed through this library. + * + * _Available since v5.1._ + */ +library SlotDerivation { + /** + * @dev Derive an ERC-7201 slot from a string (namespace). + */ + function erc7201Slot(string memory namespace) internal pure returns (bytes32 slot) { + assembly ("memory-safe") { + mstore(0x00, sub(keccak256(add(namespace, 0x20), mload(namespace)), 1)) + slot := and(keccak256(0x00, 0x20), not(0xff)) + } + } + + /** + * @dev Add an offset to a slot to get the n-th element of a structure or an array. + */ + function offset(bytes32 slot, uint256 pos) internal pure returns (bytes32 result) { + unchecked { + return bytes32(uint256(slot) + pos); + } + } + + /** + * @dev Derive the location of the first element in an array from the slot where the length is stored. + */ + function deriveArray(bytes32 slot) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + mstore(0x00, slot) + result := keccak256(0x00, 0x20) + } + } + + /** + * @dev Derive the location of a mapping element from the key. + */ + function deriveMapping(bytes32 slot, address key) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + mstore(0x00, and(key, shr(96, not(0)))) + mstore(0x20, slot) + result := keccak256(0x00, 0x40) + } + } + + /** + * @dev Derive the location of a mapping element from the key. + */ + function deriveMapping(bytes32 slot, bool key) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + mstore(0x00, iszero(iszero(key))) + mstore(0x20, slot) + result := keccak256(0x00, 0x40) + } + } + + /** + * @dev Derive the location of a mapping element from the key. + */ + function deriveMapping(bytes32 slot, bytes32 key) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + mstore(0x00, key) + mstore(0x20, slot) + result := keccak256(0x00, 0x40) + } + } + + /** + * @dev Derive the location of a mapping element from the key. + */ + function deriveMapping(bytes32 slot, uint256 key) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + mstore(0x00, key) + mstore(0x20, slot) + result := keccak256(0x00, 0x40) + } + } + + /** + * @dev Derive the location of a mapping element from the key. + */ + function deriveMapping(bytes32 slot, int256 key) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + mstore(0x00, key) + mstore(0x20, slot) + result := keccak256(0x00, 0x40) + } + } + + /** + * @dev Derive the location of a mapping element from the key. + */ + function deriveMapping(bytes32 slot, string memory key) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + let length := mload(key) + let begin := add(key, 0x20) + let end := add(begin, length) + let cache := mload(end) + mstore(end, slot) + result := keccak256(begin, add(length, 0x20)) + mstore(end, cache) + } + } + + /** + * @dev Derive the location of a mapping element from the key. + */ + function deriveMapping(bytes32 slot, bytes memory key) internal pure returns (bytes32 result) { + assembly ("memory-safe") { + let length := mload(key) + let begin := add(key, 0x20) + let end := add(begin, length) + let cache := mload(end) + mstore(end, slot) + result := keccak256(begin, add(length, 0x20)) + mstore(end, cache) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/StorageSlot.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/StorageSlot.sol similarity index 68% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/StorageSlot.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/StorageSlot.sol index df62b8f7..aebb1052 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/StorageSlot.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/StorageSlot.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) +// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. @@ -12,9 +12,10 @@ pragma solidity ^0.8.0; * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * - * Example usage to set ERC1967 implementation slot: + * Example usage to set ERC-1967 implementation slot: * ```solidity * contract ERC1967 { + * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot. * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { @@ -22,14 +23,13 @@ pragma solidity ^0.8.0; * } * * function _setImplementation(address newImplementation) internal { - * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); + * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * - * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ - * _Available since v4.9 for `string`, `bytes`._ + * TIP: Consider using this library along with {SlotDerivation}. */ library StorageSlot { struct AddressSlot { @@ -48,6 +48,10 @@ library StorageSlot { uint256 value; } + struct Int256Slot { + int256 value; + } + struct StringSlot { string value; } @@ -60,48 +64,52 @@ library StorageSlot { * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { r.slot := slot } } /** - * @dev Returns an `BooleanSlot` with member `value` located at `slot`. + * @dev Returns a `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { r.slot := slot } } /** - * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. + * @dev Returns a `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { r.slot := slot } } /** - * @dev Returns an `Uint256Slot` with member `value` located at `slot`. + * @dev Returns a `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { + r.slot := slot + } + } + + /** + * @dev Returns a `Int256Slot` with member `value` located at `slot`. + */ + function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) { + assembly ("memory-safe") { r.slot := slot } } /** - * @dev Returns an `StringSlot` with member `value` located at `slot`. + * @dev Returns a `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { r.slot := slot } } @@ -110,18 +118,16 @@ library StorageSlot { * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { r.slot := store.slot } } /** - * @dev Returns an `BytesSlot` with member `value` located at `slot`. + * @dev Returns a `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { r.slot := slot } } @@ -130,8 +136,7 @@ library StorageSlot { * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { - /// @solidity memory-safe-assembly - assembly { + assembly ("memory-safe") { r.slot := store.slot } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/Strings.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/Strings.sol new file mode 100644 index 00000000..6612f7e6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/Strings.sol @@ -0,0 +1,532 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/Strings.sol) + +pragma solidity ^0.8.24; + +import {Math} from "./math/Math.sol"; +import {SafeCast} from "./math/SafeCast.sol"; +import {SignedMath} from "./math/SignedMath.sol"; +import {Bytes} from "./Bytes.sol"; + +/** + * @dev String operations. + */ +library Strings { + using SafeCast for *; + + bytes16 private constant HEX_DIGITS = "0123456789abcdef"; + uint8 private constant ADDRESS_LENGTH = 20; + uint256 private constant SPECIAL_CHARS_LOOKUP = + 0xffffffff | // first 32 bits corresponding to the control characters (U+0000 to U+001F) + (1 << 0x22) | // double quote + (1 << 0x5c); // backslash + + /** + * @dev The `value` string doesn't fit in the specified `length`. + */ + error StringsInsufficientHexLength(uint256 value, uint256 length); + + /** + * @dev The string being parsed contains characters that are not in scope of the given base. + */ + error StringsInvalidChar(); + + /** + * @dev The string being parsed is not a properly formatted address. + */ + error StringsInvalidAddressFormat(); + + /** + * @dev Converts a `uint256` to its ASCII `string` decimal representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + unchecked { + uint256 length = Math.log10(value) + 1; + string memory buffer = new string(length); + uint256 ptr; + assembly ("memory-safe") { + ptr := add(add(buffer, 0x20), length) + } + while (true) { + ptr--; + assembly ("memory-safe") { + mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) + } + value /= 10; + if (value == 0) break; + } + return buffer; + } + } + + /** + * @dev Converts a `int256` to its ASCII `string` decimal representation. + */ + function toStringSigned(int256 value) internal pure returns (string memory) { + return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. + */ + function toHexString(uint256 value) internal pure returns (string memory) { + unchecked { + return toHexString(value, Math.log256(value) + 1); + } + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. + */ + function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { + uint256 localValue = value; + bytes memory buffer = new bytes(2 * length + 2); + buffer[0] = "0"; + buffer[1] = "x"; + for (uint256 i = 2 * length + 1; i > 1; --i) { + buffer[i] = HEX_DIGITS[localValue & 0xf]; + localValue >>= 4; + } + if (localValue != 0) { + revert StringsInsufficientHexLength(value, length); + } + return string(buffer); + } + + /** + * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal + * representation. + */ + function toHexString(address addr) internal pure returns (string memory) { + return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); + } + + /** + * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal + * representation, according to EIP-55. + */ + function toChecksumHexString(address addr) internal pure returns (string memory) { + bytes memory buffer = bytes(toHexString(addr)); + + // hash the hex part of buffer (skip length + 2 bytes, length 40) + uint256 hashValue; + assembly ("memory-safe") { + hashValue := shr(96, keccak256(add(buffer, 0x22), 40)) + } + + for (uint256 i = 41; i > 1; --i) { + // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f) + if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) { + // case shift by xoring with 0x20 + buffer[i] ^= 0x20; + } + hashValue >>= 4; + } + return string(buffer); + } + + /** + * @dev Converts a `bytes` buffer to its ASCII `string` hexadecimal representation. + */ + function toHexString(bytes memory input) internal pure returns (string memory) { + unchecked { + bytes memory buffer = new bytes(2 * input.length + 2); + buffer[0] = "0"; + buffer[1] = "x"; + for (uint256 i = 0; i < input.length; ++i) { + uint8 v = uint8(input[i]); + buffer[2 * i + 2] = HEX_DIGITS[v >> 4]; + buffer[2 * i + 3] = HEX_DIGITS[v & 0xf]; + } + return string(buffer); + } + } + + /** + * @dev Returns true if the two strings are equal. + */ + function equal(string memory a, string memory b) internal pure returns (bool) { + return Bytes.equal(bytes(a), bytes(b)); + } + + /** + * @dev Parse a decimal string and returns the value as a `uint256`. + * + * Requirements: + * - The string must be formatted as `[0-9]*` + * - The result must fit into an `uint256` type + */ + function parseUint(string memory input) internal pure returns (uint256) { + return parseUint(input, 0, bytes(input).length); + } + + /** + * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and + * `end` (excluded). + * + * Requirements: + * - The substring must be formatted as `[0-9]*` + * - The result must fit into an `uint256` type + */ + function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) { + (bool success, uint256 value) = tryParseUint(input, begin, end); + if (!success) revert StringsInvalidChar(); + return value; + } + + /** + * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character. + * + * NOTE: This function will revert if the result does not fit in a `uint256`. + */ + function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) { + return _tryParseUintUncheckedBounds(input, 0, bytes(input).length); + } + + /** + * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid + * character. + * + * NOTE: This function will revert if the result does not fit in a `uint256`. + */ + function tryParseUint( + string memory input, + uint256 begin, + uint256 end + ) internal pure returns (bool success, uint256 value) { + if (end > bytes(input).length || begin > end) return (false, 0); + return _tryParseUintUncheckedBounds(input, begin, end); + } + + /** + * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that + * `begin <= end <= input.length`. Other inputs would result in undefined behavior. + */ + function _tryParseUintUncheckedBounds( + string memory input, + uint256 begin, + uint256 end + ) private pure returns (bool success, uint256 value) { + bytes memory buffer = bytes(input); + + uint256 result = 0; + for (uint256 i = begin; i < end; ++i) { + uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i))); + if (chr > 9) return (false, 0); + result *= 10; + result += chr; + } + return (true, result); + } + + /** + * @dev Parse a decimal string and returns the value as a `int256`. + * + * Requirements: + * - The string must be formatted as `[-+]?[0-9]*` + * - The result must fit in an `int256` type. + */ + function parseInt(string memory input) internal pure returns (int256) { + return parseInt(input, 0, bytes(input).length); + } + + /** + * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and + * `end` (excluded). + * + * Requirements: + * - The substring must be formatted as `[-+]?[0-9]*` + * - The result must fit in an `int256` type. + */ + function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) { + (bool success, int256 value) = tryParseInt(input, begin, end); + if (!success) revert StringsInvalidChar(); + return value; + } + + /** + * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if + * the result does not fit in a `int256`. + * + * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`. + */ + function tryParseInt(string memory input) internal pure returns (bool success, int256 value) { + return _tryParseIntUncheckedBounds(input, 0, bytes(input).length); + } + + uint256 private constant ABS_MIN_INT256 = 2 ** 255; + + /** + * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid + * character or if the result does not fit in a `int256`. + * + * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`. + */ + function tryParseInt( + string memory input, + uint256 begin, + uint256 end + ) internal pure returns (bool success, int256 value) { + if (end > bytes(input).length || begin > end) return (false, 0); + return _tryParseIntUncheckedBounds(input, begin, end); + } + + /** + * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that + * `begin <= end <= input.length`. Other inputs would result in undefined behavior. + */ + function _tryParseIntUncheckedBounds( + string memory input, + uint256 begin, + uint256 end + ) private pure returns (bool success, int256 value) { + bytes memory buffer = bytes(input); + + // Check presence of a negative sign. + bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty + bool positiveSign = sign == bytes1("+"); + bool negativeSign = sign == bytes1("-"); + uint256 offset = (positiveSign || negativeSign).toUint(); + + (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end); + + if (absSuccess && absValue < ABS_MIN_INT256) { + return (true, negativeSign ? -int256(absValue) : int256(absValue)); + } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) { + return (true, type(int256).min); + } else return (false, 0); + } + + /** + * @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as a `uint256`. + * + * Requirements: + * - The string must be formatted as `(0x)?[0-9a-fA-F]*` + * - The result must fit in an `uint256` type. + */ + function parseHexUint(string memory input) internal pure returns (uint256) { + return parseHexUint(input, 0, bytes(input).length); + } + + /** + * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and + * `end` (excluded). + * + * Requirements: + * - The substring must be formatted as `(0x)?[0-9a-fA-F]*` + * - The result must fit in an `uint256` type. + */ + function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) { + (bool success, uint256 value) = tryParseHexUint(input, begin, end); + if (!success) revert StringsInvalidChar(); + return value; + } + + /** + * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character. + * + * NOTE: This function will revert if the result does not fit in a `uint256`. + */ + function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) { + return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length); + } + + /** + * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an + * invalid character. + * + * NOTE: This function will revert if the result does not fit in a `uint256`. + */ + function tryParseHexUint( + string memory input, + uint256 begin, + uint256 end + ) internal pure returns (bool success, uint256 value) { + if (end > bytes(input).length || begin > end) return (false, 0); + return _tryParseHexUintUncheckedBounds(input, begin, end); + } + + /** + * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that + * `begin <= end <= input.length`. Other inputs would result in undefined behavior. + */ + function _tryParseHexUintUncheckedBounds( + string memory input, + uint256 begin, + uint256 end + ) private pure returns (bool success, uint256 value) { + bytes memory buffer = bytes(input); + + // skip 0x prefix if present + bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty + uint256 offset = hasPrefix.toUint() * 2; + + uint256 result = 0; + for (uint256 i = begin + offset; i < end; ++i) { + uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i))); + if (chr > 15) return (false, 0); + result *= 16; + unchecked { + // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check). + // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked. + result += chr; + } + } + return (true, result); + } + + /** + * @dev Parse a hexadecimal string (with or without "0x" prefix), and returns the value as an `address`. + * + * Requirements: + * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}` + */ + function parseAddress(string memory input) internal pure returns (address) { + return parseAddress(input, 0, bytes(input).length); + } + + /** + * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and + * `end` (excluded). + * + * Requirements: + * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}` + */ + function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) { + (bool success, address value) = tryParseAddress(input, begin, end); + if (!success) revert StringsInvalidAddressFormat(); + return value; + } + + /** + * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly + * formatted address. See {parseAddress-string} requirements. + */ + function tryParseAddress(string memory input) internal pure returns (bool success, address value) { + return tryParseAddress(input, 0, bytes(input).length); + } + + /** + * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly + * formatted address. See {parseAddress-string-uint256-uint256} requirements. + */ + function tryParseAddress( + string memory input, + uint256 begin, + uint256 end + ) internal pure returns (bool success, address value) { + if (end > bytes(input).length || begin > end) return (false, address(0)); + + bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2("0x"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty + uint256 expectedLength = 40 + hasPrefix.toUint() * 2; + + // check that input is the correct length + if (end - begin == expectedLength) { + // length guarantees that this does not overflow, and value is at most type(uint160).max + (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end); + return (s, address(uint160(v))); + } else { + return (false, address(0)); + } + } + + function _tryParseChr(bytes1 chr) private pure returns (uint8) { + uint8 value = uint8(chr); + + // Try to parse `chr`: + // - Case 1: [0-9] + // - Case 2: [a-f] + // - Case 3: [A-F] + // - otherwise not supported + unchecked { + if (value > 47 && value < 58) value -= 48; + else if (value > 96 && value < 103) value -= 87; + else if (value > 64 && value < 71) value -= 55; + else return type(uint8).max; + } + + return value; + } + + /** + * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata. + * + * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped. + * + * NOTE: This function escapes backslashes (including those in \uXXXX sequences) and the characters in ranges + * defined in section 2.5 of RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). All control characters in U+0000 + * to U+001F are escaped (\b, \t, \n, \f, \r use short form; others use \u00XX). ECMAScript's `JSON.parse` does + * recover escaped unicode characters that are not in this range, but other tooling may provide different results. + */ + function escapeJSON(string memory input) internal pure returns (string memory) { + bytes memory buffer = bytes(input); + + // Put output at the FMP. Memory will be reserved later when we figure out the actual length of the escaped + // string. All write are done using _unsafeWriteBytesOffset, which avoid the (expensive) length checks for + // each character written. + bytes memory output; + assembly ("memory-safe") { + output := mload(0x40) + } + uint256 outputLength = 0; + + for (uint256 i = 0; i < buffer.length; ++i) { + uint8 char = uint8(bytes1(_unsafeReadBytesOffset(buffer, i))); + if (((SPECIAL_CHARS_LOOKUP & (1 << char)) != 0)) { + _unsafeWriteBytesOffset(output, outputLength++, "\\"); + if (char == 0x08) _unsafeWriteBytesOffset(output, outputLength++, "b"); + else if (char == 0x09) _unsafeWriteBytesOffset(output, outputLength++, "t"); + else if (char == 0x0a) _unsafeWriteBytesOffset(output, outputLength++, "n"); + else if (char == 0x0c) _unsafeWriteBytesOffset(output, outputLength++, "f"); + else if (char == 0x0d) _unsafeWriteBytesOffset(output, outputLength++, "r"); + else if (char == 0x5c) _unsafeWriteBytesOffset(output, outputLength++, "\\"); + else if (char == 0x22) { + // solhint-disable-next-line quotes + _unsafeWriteBytesOffset(output, outputLength++, '"'); + } else { + // U+0000 to U+001F without short form: output \u00XX + _unsafeWriteBytesOffset(output, outputLength++, "u"); + _unsafeWriteBytesOffset(output, outputLength++, "0"); + _unsafeWriteBytesOffset(output, outputLength++, "0"); + _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char >> 4]); + _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char & 0x0f]); + } + } else { + _unsafeWriteBytesOffset(output, outputLength++, bytes1(char)); + } + } + // write the actual length and reserve memory + assembly ("memory-safe") { + mstore(output, outputLength) + mstore(0x40, add(output, add(outputLength, 0x20))) + } + + return string(output); + } + + /** + * @dev Reads a bytes32 from a bytes array without bounds checking. + * + * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the + * assembly block as such would prevent some optimizations. + */ + function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) { + // This is not memory safe in the general case, but all calls to this private function are within bounds. + assembly ("memory-safe") { + value := mload(add(add(buffer, 0x20), offset)) + } + } + + /** + * @dev Write a bytes1 to a bytes array without bounds checking. + * + * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the + * assembly block as such would prevent some optimizations. + */ + function _unsafeWriteBytesOffset(bytes memory buffer, uint256 offset, bytes1 value) private pure { + // This is not memory safe in the general case, but all calls to this private function are within bounds. + assembly ("memory-safe") { + mstore8(add(add(buffer, 0x20), offset), shr(248, value)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/TransientSlot.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/TransientSlot.sol new file mode 100644 index 00000000..f0caea13 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/TransientSlot.sol @@ -0,0 +1,183 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.3.0) (utils/TransientSlot.sol) +// This file was procedurally generated from scripts/generate/templates/TransientSlot.js. + +pragma solidity ^0.8.24; + +/** + * @dev Library for reading and writing value-types to specific transient storage slots. + * + * Transient slots are often used to store temporary values that are removed after the current transaction. + * This library helps with reading and writing to such slots without the need for inline assembly. + * + * * Example reading and writing values using transient storage: + * ```solidity + * contract Lock { + * using TransientSlot for *; + * + * // Define the slot. Alternatively, use the SlotDerivation library to derive the slot. + * bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542; + * + * modifier locked() { + * require(!_LOCK_SLOT.asBoolean().tload()); + * + * _LOCK_SLOT.asBoolean().tstore(true); + * _; + * _LOCK_SLOT.asBoolean().tstore(false); + * } + * } + * ``` + * + * TIP: Consider using this library along with {SlotDerivation}. + */ +library TransientSlot { + /** + * @dev UDVT that represents a slot holding an address. + */ + type AddressSlot is bytes32; + + /** + * @dev Cast an arbitrary slot to a AddressSlot. + */ + function asAddress(bytes32 slot) internal pure returns (AddressSlot) { + return AddressSlot.wrap(slot); + } + + /** + * @dev UDVT that represents a slot holding a bool. + */ + type BooleanSlot is bytes32; + + /** + * @dev Cast an arbitrary slot to a BooleanSlot. + */ + function asBoolean(bytes32 slot) internal pure returns (BooleanSlot) { + return BooleanSlot.wrap(slot); + } + + /** + * @dev UDVT that represents a slot holding a bytes32. + */ + type Bytes32Slot is bytes32; + + /** + * @dev Cast an arbitrary slot to a Bytes32Slot. + */ + function asBytes32(bytes32 slot) internal pure returns (Bytes32Slot) { + return Bytes32Slot.wrap(slot); + } + + /** + * @dev UDVT that represents a slot holding a uint256. + */ + type Uint256Slot is bytes32; + + /** + * @dev Cast an arbitrary slot to a Uint256Slot. + */ + function asUint256(bytes32 slot) internal pure returns (Uint256Slot) { + return Uint256Slot.wrap(slot); + } + + /** + * @dev UDVT that represents a slot holding a int256. + */ + type Int256Slot is bytes32; + + /** + * @dev Cast an arbitrary slot to a Int256Slot. + */ + function asInt256(bytes32 slot) internal pure returns (Int256Slot) { + return Int256Slot.wrap(slot); + } + + /** + * @dev Load the value held at location `slot` in transient storage. + */ + function tload(AddressSlot slot) internal view returns (address value) { + assembly ("memory-safe") { + value := tload(slot) + } + } + + /** + * @dev Store `value` at location `slot` in transient storage. + */ + function tstore(AddressSlot slot, address value) internal { + assembly ("memory-safe") { + tstore(slot, value) + } + } + + /** + * @dev Load the value held at location `slot` in transient storage. + */ + function tload(BooleanSlot slot) internal view returns (bool value) { + assembly ("memory-safe") { + value := tload(slot) + } + } + + /** + * @dev Store `value` at location `slot` in transient storage. + */ + function tstore(BooleanSlot slot, bool value) internal { + assembly ("memory-safe") { + tstore(slot, value) + } + } + + /** + * @dev Load the value held at location `slot` in transient storage. + */ + function tload(Bytes32Slot slot) internal view returns (bytes32 value) { + assembly ("memory-safe") { + value := tload(slot) + } + } + + /** + * @dev Store `value` at location `slot` in transient storage. + */ + function tstore(Bytes32Slot slot, bytes32 value) internal { + assembly ("memory-safe") { + tstore(slot, value) + } + } + + /** + * @dev Load the value held at location `slot` in transient storage. + */ + function tload(Uint256Slot slot) internal view returns (uint256 value) { + assembly ("memory-safe") { + value := tload(slot) + } + } + + /** + * @dev Store `value` at location `slot` in transient storage. + */ + function tstore(Uint256Slot slot, uint256 value) internal { + assembly ("memory-safe") { + tstore(slot, value) + } + } + + /** + * @dev Load the value held at location `slot` in transient storage. + */ + function tload(Int256Slot slot) internal view returns (int256 value) { + assembly ("memory-safe") { + value := tload(slot) + } + } + + /** + * @dev Store `value` at location `slot` in transient storage. + */ + function tstore(Int256Slot slot, int256 value) internal { + assembly ("memory-safe") { + tstore(slot, value) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/ECDSA.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/ECDSA.sol new file mode 100644 index 00000000..caaa4102 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/ECDSA.sol @@ -0,0 +1,284 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/ECDSA.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. + * + * These functions can be used to verify that a message was signed by the holder + * of the private keys of a given address. + */ +library ECDSA { + enum RecoverError { + NoError, + InvalidSignature, + InvalidSignatureLength, + InvalidSignatureS + } + + /** + * @dev The signature is invalid. + */ + error ECDSAInvalidSignature(); + + /** + * @dev The signature has an invalid length. + */ + error ECDSAInvalidSignatureLength(uint256 length); + + /** + * @dev The signature has an S value that is in the upper half order. + */ + error ECDSAInvalidSignatureS(bytes32 s); + + /** + * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not + * return address(0) without also returning an error description. Errors are documented using an enum (error type) + * and a bytes32 providing additional information about the error. + * + * If no error is returned, then the address can be used for verification purposes. + * + * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: + * this function rejects them by requiring the `s` value to be in the lower + * half order, and the `v` value to be either 27 or 28. + * + * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction + * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash + * invalidation or nonces for replay protection. + * + * IMPORTANT: `hash` _must_ be the result of a hash operation for the + * verification to be secure: it is possible to craft signatures that + * recover to arbitrary addresses for non-hashed data. A safe way to ensure + * this is by receiving a hash of the original message (which may otherwise + * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. + * + * Documentation for signature generation: + * + * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] + * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] + */ + function tryRecover( + bytes32 hash, + bytes memory signature + ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { + if (signature.length == 65) { + bytes32 r; + bytes32 s; + uint8 v; + // ecrecover takes the signature parameters, and the only way to get them + // currently is to use assembly. + assembly ("memory-safe") { + r := mload(add(signature, 0x20)) + s := mload(add(signature, 0x40)) + v := byte(0, mload(add(signature, 0x60))) + } + return tryRecover(hash, v, r, s); + } else { + return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); + } + } + + /** + * @dev Variant of {tryRecover} that takes a signature in calldata + */ + function tryRecoverCalldata( + bytes32 hash, + bytes calldata signature + ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { + if (signature.length == 65) { + bytes32 r; + bytes32 s; + uint8 v; + // ecrecover takes the signature parameters, calldata slices would work here, but are + // significantly more expensive (length check) than using calldataload in assembly. + assembly ("memory-safe") { + r := calldataload(signature.offset) + s := calldataload(add(signature.offset, 0x20)) + v := byte(0, calldataload(add(signature.offset, 0x40))) + } + return tryRecover(hash, v, r, s); + } else { + return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); + } + } + + /** + * @dev Returns the address that signed a hashed message (`hash`) with + * `signature`. This address can then be used for verification purposes. + * + * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: + * this function rejects them by requiring the `s` value to be in the lower + * half order, and the `v` value to be either 27 or 28. + * + * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction + * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash + * invalidation or nonces for replay protection. + * + * IMPORTANT: `hash` _must_ be the result of a hash operation for the + * verification to be secure: it is possible to craft signatures that + * recover to arbitrary addresses for non-hashed data. A safe way to ensure + * this is by receiving a hash of the original message (which may otherwise + * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. + */ + function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { + (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); + _throwError(error, errorArg); + return recovered; + } + + /** + * @dev Variant of {recover} that takes a signature in calldata + */ + function recoverCalldata(bytes32 hash, bytes calldata signature) internal pure returns (address) { + (address recovered, RecoverError error, bytes32 errorArg) = tryRecoverCalldata(hash, signature); + _throwError(error, errorArg); + return recovered; + } + + /** + * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. + * + * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures] + */ + function tryRecover( + bytes32 hash, + bytes32 r, + bytes32 vs + ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { + unchecked { + bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); + // We do not check for an overflow here since the shift operation results in 0 or 1. + uint8 v = uint8((uint256(vs) >> 255) + 27); + return tryRecover(hash, v, r, s); + } + } + + /** + * @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately. + */ + function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { + (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); + _throwError(error, errorArg); + return recovered; + } + + /** + * @dev Overload of {ECDSA-tryRecover} that receives the `v`, + * `r` and `s` signature fields separately. + */ + function tryRecover( + bytes32 hash, + uint8 v, + bytes32 r, + bytes32 s + ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) { + // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature + // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines + // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most + // signatures from current libraries generate a unique signature with an s-value in the lower half order. + // + // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value + // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or + // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept + // these malleable signatures as well. + if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { + return (address(0), RecoverError.InvalidSignatureS, s); + } + + // If the signature is valid (and not malleable), return the signer address + address signer = ecrecover(hash, v, r, s); + if (signer == address(0)) { + return (address(0), RecoverError.InvalidSignature, bytes32(0)); + } + + return (signer, RecoverError.NoError, bytes32(0)); + } + + /** + * @dev Overload of {ECDSA-recover} that receives the `v`, + * `r` and `s` signature fields separately. + */ + function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { + (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); + _throwError(error, errorArg); + return recovered; + } + + /** + * @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098) + * formats. Returns (0,0,0) for invalid signatures. + * + * For 64-byte signatures, `v` is automatically normalized to 27 or 28. + * For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover. + * + * Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation. + */ + function parse(bytes memory signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) { + assembly ("memory-safe") { + // Check the signature length + switch mload(signature) + // - case 65: r,s,v signature (standard) + case 65 { + r := mload(add(signature, 0x20)) + s := mload(add(signature, 0x40)) + v := byte(0, mload(add(signature, 0x60))) + } + // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) + case 64 { + let vs := mload(add(signature, 0x40)) + r := mload(add(signature, 0x20)) + s := and(vs, shr(1, not(0))) + v := add(shr(255, vs), 27) + } + default { + r := 0 + s := 0 + v := 0 + } + } + } + + /** + * @dev Variant of {parse} that takes a signature in calldata + */ + function parseCalldata(bytes calldata signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) { + assembly ("memory-safe") { + // Check the signature length + switch signature.length + // - case 65: r,s,v signature (standard) + case 65 { + r := calldataload(signature.offset) + s := calldataload(add(signature.offset, 0x20)) + v := byte(0, calldataload(add(signature.offset, 0x40))) + } + // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) + case 64 { + let vs := calldataload(add(signature.offset, 0x20)) + r := calldataload(signature.offset) + s := and(vs, shr(1, not(0))) + v := add(shr(255, vs), 27) + } + default { + r := 0 + s := 0 + v := 0 + } + } + } + + /** + * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. + */ + function _throwError(RecoverError error, bytes32 errorArg) private pure { + if (error == RecoverError.NoError) { + return; // no error: do nothing + } else if (error == RecoverError.InvalidSignature) { + revert ECDSAInvalidSignature(); + } else if (error == RecoverError.InvalidSignatureLength) { + revert ECDSAInvalidSignatureLength(uint256(errorArg)); + } else if (error == RecoverError.InvalidSignatureS) { + revert ECDSAInvalidSignatureS(errorArg); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/EIP712.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/EIP712.sol similarity index 66% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/EIP712.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/EIP712.sol index 2a0e7348..2bc45a4b 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/cryptography/EIP712.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/EIP712.sol @@ -1,20 +1,21 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/EIP712.sol) -pragma solidity ^0.8.8; +pragma solidity ^0.8.24; -import "./ECDSA.sol"; -import "../ShortStrings.sol"; -import "../../interfaces/IERC5267.sol"; +import {MessageHashUtils} from "./MessageHashUtils.sol"; +import {ShortStrings, ShortString} from "../ShortStrings.sol"; +import {IERC5267} from "../../interfaces/IERC5267.sol"; /** - * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. + * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data. * - * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, - * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding - * they need in their contracts using a combination of `abi.encode` and `keccak256`. + * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose + * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract + * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to + * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * - * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding + * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * @@ -25,17 +26,15 @@ import "../../interfaces/IERC5267.sol"; * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain - * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the + * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * - * _Available since v3.4._ - * - * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment + * @custom:oz-upgrades-unsafe-allow state-variable-immutable */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; - bytes32 private constant _TYPE_HASH = + bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to @@ -49,14 +48,16 @@ abstract contract EIP712 is IERC5267 { ShortString private immutable _name; ShortString private immutable _version; + // slither-disable-next-line constable-states string private _nameFallback; + // slither-disable-next-line constable-states string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in - * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: + * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. @@ -87,7 +88,7 @@ abstract contract EIP712 is IERC5267 { } function _buildDomainSeparator() private view returns (bytes32) { - return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); + return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** @@ -106,19 +107,14 @@ abstract contract EIP712 is IERC5267 { * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { - return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); + return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } - /** - * @dev See {EIP-5267}. - * - * _Available since v4.9._ - */ + /// @inheritdoc IERC5267 function eip712Domain() public view virtual - override returns ( bytes1 fields, string memory name, @@ -131,12 +127,34 @@ abstract contract EIP712 is IERC5267 { { return ( hex"0f", // 01111 - _name.toStringWithFallback(_nameFallback), - _version.toStringWithFallback(_versionFallback), + _EIP712Name(), + _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } + + /** + * @dev The name parameter for the EIP712 domain. + * + * NOTE: By default this function reads _name which is an immutable value. + * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). + */ + // solhint-disable-next-line func-name-mixedcase + function _EIP712Name() internal view returns (string memory) { + return _name.toStringWithFallback(_nameFallback); + } + + /** + * @dev The version parameter for the EIP712 domain. + * + * NOTE: By default this function reads _version which is an immutable value. + * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). + */ + // solhint-disable-next-line func-name-mixedcase + function _EIP712Version() internal view returns (string memory) { + return _version.toStringWithFallback(_versionFallback); + } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/Hashes.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/Hashes.sol new file mode 100644 index 00000000..48c9bbe2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/Hashes.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/Hashes.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Library of standard hash functions. + * + * _Available since v5.1._ + */ +library Hashes { + /** + * @dev Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs. + * + * NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. + */ + function commutativeKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32) { + return a < b ? efficientKeccak256(a, b) : efficientKeccak256(b, a); + } + + /** + * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. + */ + function efficientKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32 value) { + assembly ("memory-safe") { + mstore(0x00, a) + mstore(0x20, b) + value := keccak256(0x00, 0x40) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MerkleProof.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MerkleProof.sol new file mode 100644 index 00000000..869f624f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MerkleProof.sol @@ -0,0 +1,510 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/MerkleProof.sol) +// This file was procedurally generated from scripts/generate/templates/MerkleProof.js. + +pragma solidity ^0.8.20; + +import {Hashes} from "./Hashes.sol"; + +/** + * @dev These functions deal with verification of Merkle Tree proofs. + * + * The tree and the proofs can be generated using our + * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. + * You will find a quickstart guide in the readme. + * + * WARNING: You should avoid using leaf values that are 64 bytes long prior to + * hashing, or use a hash function other than keccak256 for hashing leaves. + * This is because the concatenation of a sorted pair of internal nodes in + * the Merkle tree could be reinterpreted as a leaf value. + * OpenZeppelin's JavaScript library generates Merkle trees that are safe + * against this attack out of the box. + * + * IMPORTANT: Consider memory side-effects when using custom hashing functions + * that access memory in an unsafe way. + * + * NOTE: This library supports proof verification for merkle trees built using + * custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving + * leaf inclusion in trees built using non-commutative hashing functions requires + * additional logic that is not supported by this library. + */ +library MerkleProof { + /** + * @dev The multiproof provided is not valid. + */ + error MerkleProofInvalidMultiproof(); + + /** + * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree + * defined by `root`. For this, a `proof` must be provided, containing + * sibling hashes on the branch from the leaf to the root of the tree. Each + * pair of leaves and each pair of pre-images are assumed to be sorted. + * + * This version handles proofs in memory with the default hashing function. + */ + function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { + return processProof(proof, leaf) == root; + } + + /** + * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up + * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt + * hash matches the root of the tree. When processing the proof, the pairs + * of leaves & pre-images are assumed to be sorted. + * + * This version handles proofs in memory with the default hashing function. + */ + function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree + * defined by `root`. For this, a `proof` must be provided, containing + * sibling hashes on the branch from the leaf to the root of the tree. Each + * pair of leaves and each pair of pre-images are assumed to be sorted. + * + * This version handles proofs in memory with a custom hashing function. + */ + function verify( + bytes32[] memory proof, + bytes32 root, + bytes32 leaf, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bool) { + return processProof(proof, leaf, hasher) == root; + } + + /** + * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up + * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt + * hash matches the root of the tree. When processing the proof, the pairs + * of leaves & pre-images are assumed to be sorted. + * + * This version handles proofs in memory with a custom hashing function. + */ + function processProof( + bytes32[] memory proof, + bytes32 leaf, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = hasher(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree + * defined by `root`. For this, a `proof` must be provided, containing + * sibling hashes on the branch from the leaf to the root of the tree. Each + * pair of leaves and each pair of pre-images are assumed to be sorted. + * + * This version handles proofs in calldata with the default hashing function. + */ + function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { + return processProofCalldata(proof, leaf) == root; + } + + /** + * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up + * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt + * hash matches the root of the tree. When processing the proof, the pairs + * of leaves & pre-images are assumed to be sorted. + * + * This version handles proofs in calldata with the default hashing function. + */ + function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = Hashes.commutativeKeccak256(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree + * defined by `root`. For this, a `proof` must be provided, containing + * sibling hashes on the branch from the leaf to the root of the tree. Each + * pair of leaves and each pair of pre-images are assumed to be sorted. + * + * This version handles proofs in calldata with a custom hashing function. + */ + function verifyCalldata( + bytes32[] calldata proof, + bytes32 root, + bytes32 leaf, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bool) { + return processProofCalldata(proof, leaf, hasher) == root; + } + + /** + * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up + * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt + * hash matches the root of the tree. When processing the proof, the pairs + * of leaves & pre-images are assumed to be sorted. + * + * This version handles proofs in calldata with a custom hashing function. + */ + function processProofCalldata( + bytes32[] calldata proof, + bytes32 leaf, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = hasher(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by + * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. + * + * This version handles multiproofs in memory with the default hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. + * + * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. + * The `leaves` must be validated independently. See {processMultiProof}. + */ + function multiProofVerify( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProof(proof, proofFlags, leaves) == root; + } + + /** + * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction + * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another + * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false + * respectively. + * + * This version handles multiproofs in memory with the default hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the + * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). + * + * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, + * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not + * validating the leaves elsewhere. + */ + function processMultiProof( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the Merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofFlagsLen = proofFlags.length; + + // Check proof validity. + if (leavesLen + proof.length != proofFlagsLen + 1) { + revert MerkleProofInvalidMultiproof(); + } + + if (proofFlagsLen > 0) { + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](proofFlagsLen); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < proofFlagsLen; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = Hashes.commutativeKeccak256(a, b); + } + if (proofPos != proof.length) { + revert MerkleProofInvalidMultiproof(); + } + unchecked { + return hashes[proofFlagsLen - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + /** + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by + * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. + * + * This version handles multiproofs in memory with a custom hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. + * + * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. + * The `leaves` must be validated independently. See {processMultiProof}. + */ + function multiProofVerify( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32 root, + bytes32[] memory leaves, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bool) { + return processMultiProof(proof, proofFlags, leaves, hasher) == root; + } + + /** + * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction + * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another + * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false + * respectively. + * + * This version handles multiproofs in memory with a custom hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the + * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). + * + * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, + * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not + * validating the leaves elsewhere. + */ + function processMultiProof( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32[] memory leaves, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the Merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofFlagsLen = proofFlags.length; + + // Check proof validity. + if (leavesLen + proof.length != proofFlagsLen + 1) { + revert MerkleProofInvalidMultiproof(); + } + + if (proofFlagsLen > 0) { + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](proofFlagsLen); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < proofFlagsLen; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = hasher(a, b); + } + if (proofPos != proof.length) { + revert MerkleProofInvalidMultiproof(); + } + unchecked { + return hashes[proofFlagsLen - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + /** + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by + * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. + * + * This version handles multiproofs in calldata with the default hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. + * + * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. + * The `leaves` must be validated independently. See {processMultiProofCalldata}. + */ + function multiProofVerifyCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProofCalldata(proof, proofFlags, leaves) == root; + } + + /** + * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction + * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another + * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false + * respectively. + * + * This version handles multiproofs in calldata with the default hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the + * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). + * + * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, + * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not + * validating the leaves elsewhere. + */ + function processMultiProofCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the Merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofFlagsLen = proofFlags.length; + + // Check proof validity. + if (leavesLen + proof.length != proofFlagsLen + 1) { + revert MerkleProofInvalidMultiproof(); + } + + if (proofFlagsLen > 0) { + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](proofFlagsLen); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < proofFlagsLen; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = Hashes.commutativeKeccak256(a, b); + } + if (proofPos != proof.length) { + revert MerkleProofInvalidMultiproof(); + } + unchecked { + return hashes[proofFlagsLen - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + /** + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by + * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. + * + * This version handles multiproofs in calldata with a custom hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. + * + * NOTE: Consider the case where `root == proof[0] && leaves.length == 0` as it will return `true`. + * The `leaves` must be validated independently. See {processMultiProofCalldata}. + */ + function multiProofVerifyCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32 root, + bytes32[] memory leaves, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bool) { + return processMultiProofCalldata(proof, proofFlags, leaves, hasher) == root; + } + + /** + * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction + * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another + * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false + * respectively. + * + * This version handles multiproofs in calldata with a custom hashing function. + * + * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the + * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). + * + * NOTE: The _empty set_ (i.e. the case where `proof.length == 1 && leaves.length == 0`) is considered a no-op, + * and therefore a valid multiproof (i.e. it returns `proof[0]`). Consider disallowing this case if you're not + * validating the leaves elsewhere. + */ + function processMultiProofCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32[] memory leaves, + function(bytes32, bytes32) view returns (bytes32) hasher + ) internal view returns (bytes32 merkleRoot) { + // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the Merkle tree. + uint256 leavesLen = leaves.length; + uint256 proofFlagsLen = proofFlags.length; + + // Check proof validity. + if (leavesLen + proof.length != proofFlagsLen + 1) { + revert MerkleProofInvalidMultiproof(); + } + + if (proofFlagsLen > 0) { + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](proofFlagsLen); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < proofFlagsLen; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] + ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) + : proof[proofPos++]; + hashes[i] = hasher(a, b); + } + if (proofPos != proof.length) { + revert MerkleProofInvalidMultiproof(); + } + unchecked { + return hashes[proofFlagsLen - 1]; + } + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MessageHashUtils.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MessageHashUtils.sol new file mode 100644 index 00000000..f42308a8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/MessageHashUtils.sol @@ -0,0 +1,228 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/MessageHashUtils.sol) + +pragma solidity ^0.8.24; + +import {Strings} from "../Strings.sol"; + +/** + * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. + * + * The library provides methods for generating a hash of a message that conforms to the + * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] + * specifications. + */ +library MessageHashUtils { + error ERC5267ExtensionsNotSupported(); + + /** + * @dev Returns the keccak256 digest of an ERC-191 signed data with version + * `0x45` (`personal_sign` messages). + * + * The digest is calculated by prefixing a bytes32 `messageHash` with + * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the + * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method. + * + * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with + * keccak256, although any bytes32 value can be safely used because the final digest will + * be re-hashed. + * + * See {ECDSA-recover}. + */ + function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { + assembly ("memory-safe") { + mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash + mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix + digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) + } + } + + /** + * @dev Returns the keccak256 digest of an ERC-191 signed data with version + * `0x45` (`personal_sign` messages). + * + * The digest is calculated by prefixing an arbitrary `message` with + * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the + * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method. + * + * See {ECDSA-recover}. + */ + function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { + return + keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); + } + + /** + * @dev Returns the keccak256 digest of an ERC-191 signed data with version + * `0x00` (data with intended validator). + * + * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended + * `validator` address. Then hashing the result. + * + * See {ECDSA-recover}. + */ + function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { + return keccak256(abi.encodePacked(hex"19_00", validator, data)); + } + + /** + * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32. + */ + function toDataWithIntendedValidatorHash( + address validator, + bytes32 messageHash + ) internal pure returns (bytes32 digest) { + assembly ("memory-safe") { + mstore(0x00, hex"19_00") + mstore(0x02, shl(96, validator)) + mstore(0x16, messageHash) + digest := keccak256(0x00, 0x36) + } + } + + /** + * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`). + * + * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with + * `\x19\x01` and hashing the result. It corresponds to the hash signed by the + * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. + * + * See {ECDSA-recover}. + */ + function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { + assembly ("memory-safe") { + let ptr := mload(0x40) + mstore(ptr, hex"19_01") + mstore(add(ptr, 0x02), domainSeparator) + mstore(add(ptr, 0x22), structHash) + digest := keccak256(ptr, 0x42) + } + } + + /** + * @dev Returns the EIP-712 domain separator constructed from an `eip712Domain`. See {IERC5267-eip712Domain} + * + * This function dynamically constructs the domain separator based on which fields are present in the + * `fields` parameter. It contains flags that indicate which domain fields are present: + * + * * Bit 0 (0x01): name + * * Bit 1 (0x02): version + * * Bit 2 (0x04): chainId + * * Bit 3 (0x08): verifyingContract + * * Bit 4 (0x10): salt + * + * Arguments that correspond to fields which are not present in `fields` are ignored. For example, if `fields` is + * `0x0f` (`0b01111`), then the `salt` parameter is ignored. + */ + function toDomainSeparator( + bytes1 fields, + string memory name, + string memory version, + uint256 chainId, + address verifyingContract, + bytes32 salt + ) internal pure returns (bytes32 hash) { + return + toDomainSeparator( + fields, + keccak256(bytes(name)), + keccak256(bytes(version)), + chainId, + verifyingContract, + salt + ); + } + + /// @dev Variant of {toDomainSeparator-bytes1-string-string-uint256-address-bytes32} that uses hashed name and version. + function toDomainSeparator( + bytes1 fields, + bytes32 nameHash, + bytes32 versionHash, + uint256 chainId, + address verifyingContract, + bytes32 salt + ) internal pure returns (bytes32 hash) { + bytes32 domainTypeHash = toDomainTypeHash(fields); + + assembly ("memory-safe") { + // align fields to the right for easy processing + fields := shr(248, fields) + + // FMP used as scratch space + let fmp := mload(0x40) + mstore(fmp, domainTypeHash) + + let ptr := add(fmp, 0x20) + if and(fields, 0x01) { + mstore(ptr, nameHash) + ptr := add(ptr, 0x20) + } + if and(fields, 0x02) { + mstore(ptr, versionHash) + ptr := add(ptr, 0x20) + } + if and(fields, 0x04) { + mstore(ptr, chainId) + ptr := add(ptr, 0x20) + } + if and(fields, 0x08) { + mstore(ptr, verifyingContract) + ptr := add(ptr, 0x20) + } + if and(fields, 0x10) { + mstore(ptr, salt) + ptr := add(ptr, 0x20) + } + + hash := keccak256(fmp, sub(ptr, fmp)) + } + } + + /// @dev Builds an EIP-712 domain type hash depending on the `fields` provided, following https://eips.ethereum.org/EIPS/eip-5267[ERC-5267] + function toDomainTypeHash(bytes1 fields) internal pure returns (bytes32 hash) { + if (fields & 0x20 == 0x20) revert ERC5267ExtensionsNotSupported(); + + assembly ("memory-safe") { + // align fields to the right for easy processing + fields := shr(248, fields) + + // FMP used as scratch space + let fmp := mload(0x40) + mstore(fmp, "EIP712Domain(") + + let ptr := add(fmp, 0x0d) + // name field + if and(fields, 0x01) { + mstore(ptr, "string name,") + ptr := add(ptr, 0x0c) + } + // version field + if and(fields, 0x02) { + mstore(ptr, "string version,") + ptr := add(ptr, 0x0f) + } + // chainId field + if and(fields, 0x04) { + mstore(ptr, "uint256 chainId,") + ptr := add(ptr, 0x10) + } + // verifyingContract field + if and(fields, 0x08) { + mstore(ptr, "address verifyingContract,") + ptr := add(ptr, 0x1a) + } + // salt field + if and(fields, 0x10) { + mstore(ptr, "bytes32 salt,") + ptr := add(ptr, 0x0d) + } + // if any field is enabled, remove the trailing comma + ptr := sub(ptr, iszero(iszero(and(fields, 0x1f)))) + // add the closing brace + mstore8(ptr, 0x29) // add closing brace + ptr := add(ptr, 1) + + hash := keccak256(fmp, sub(ptr, fmp)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/P256.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/P256.sol new file mode 100644 index 00000000..81d79adc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/P256.sol @@ -0,0 +1,408 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/P256.sol) +pragma solidity ^0.8.20; + +import {Math} from "../math/Math.sol"; +import {Errors} from "../Errors.sol"; + +/** + * @dev Implementation of secp256r1 verification and recovery functions. + * + * The secp256r1 curve (also known as P256) is a NIST standard curve with wide support in modern devices + * and cryptographic standards. Some notable examples include Apple's Secure Enclave and Android's Keystore + * as well as authentication protocols like FIDO2. + * + * Based on the original https://github.com/itsobvioustech/aa-passkeys-wallet/blob/d3d423f28a4d8dfcb203c7fa0c47f42592a7378e/src/Secp256r1.sol[implementation of itsobvioustech] (GNU General Public License v3.0). + * Heavily inspired in https://github.com/maxrobot/elliptic-solidity/blob/c4bb1b6e8ae89534d8db3a6b3a6b52219100520f/contracts/Secp256r1.sol[maxrobot] and + * https://github.com/tdrerup/elliptic-curve-solidity/blob/59a9c25957d4d190eff53b6610731d81a077a15e/contracts/curves/EllipticCurve.sol[tdrerup] implementations. + * + * _Available since v5.1._ + */ +library P256 { + struct JPoint { + uint256 x; + uint256 y; + uint256 z; + } + + /// @dev Generator (x component) + uint256 internal constant GX = 0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296; + /// @dev Generator (y component) + uint256 internal constant GY = 0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5; + /// @dev P (size of the field) + uint256 internal constant P = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF; + /// @dev N (order of G) + uint256 internal constant N = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551; + /// @dev A parameter of the weierstrass equation + uint256 internal constant A = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC; + /// @dev B parameter of the weierstrass equation + uint256 internal constant B = 0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B; + + /// @dev (P + 1) / 4. Useful to compute sqrt + uint256 private constant P1DIV4 = 0x3fffffffc0000000400000000000000000000000400000000000000000000000; + + /// @dev N/2 for excluding higher order `s` values + uint256 private constant HALF_N = 0x7fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e3192a8; + + /** + * @dev Verifies a secp256r1 signature using the RIP-7212 precompile and falls back to the Solidity implementation + * if the precompile is not available. This version should work on all chains, but requires the deployment of more + * bytecode. + * + * @param h - hashed message + * @param r - signature half R + * @param s - signature half S + * @param qx - public key coordinate X + * @param qy - public key coordinate Y + * + * IMPORTANT: This function disallows signatures where the `s` value is above `N/2` to prevent malleability. + * To flip the `s` value, compute `s = N - s`. + */ + function verify(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) internal view returns (bool) { + (bool valid, bool supported) = _tryVerifyNative(h, r, s, qx, qy); + return supported ? valid : verifySolidity(h, r, s, qx, qy); + } + + /** + * @dev Same as {verify}, but it will revert if the required precompile is not available. + * + * Make sure any logic (code or precompile) deployed at that address is the expected one, + * otherwise the returned value may be misinterpreted as a positive boolean. + */ + function verifyNative(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) internal view returns (bool) { + (bool valid, bool supported) = _tryVerifyNative(h, r, s, qx, qy); + if (supported) { + return valid; + } else { + revert Errors.MissingPrecompile(address(0x100)); + } + } + + /** + * @dev Same as {verify}, but it will return false if the required precompile is not available. + */ + function _tryVerifyNative( + bytes32 h, + bytes32 r, + bytes32 s, + bytes32 qx, + bytes32 qy + ) private view returns (bool valid, bool supported) { + if (!_isProperSignature(r, s) || !isValidPublicKey(qx, qy)) { + return (false, true); // signature is invalid, and its not because the precompile is missing + } else if (_rip7212(h, r, s, qx, qy)) { + return (true, true); // precompile is present, signature is valid + } else if ( + // Given precompiles have no bytecode (i.e. `address(0x100).code.length == 0`), we use + // a valid signature with small `r` and `s` values to check if the precompile is present. Taken from + // https://github.com/C2SP/wycheproof/blob/4672ff74d68766e7785c2cac4c597effccef2c5c/testvectors/ecdsa_secp256r1_sha256_p1363_test.json#L1173-L1204 + _rip7212( + 0xbb5a52f42f9c9261ed4361f59422a1e30036e7c32b270c8807a419feca605023, // sha256("123400") + 0x0000000000000000000000000000000000000000000000000000000000000005, + 0x0000000000000000000000000000000000000000000000000000000000000001, + 0xa71af64de5126a4a4e02b7922d66ce9415ce88a4c9d25514d91082c8725ac957, + 0x5d47723c8fbe580bb369fec9c2665d8e30a435b9932645482e7c9f11e872296b + ) + ) { + return (false, true); // precompile is present, signature is invalid + } else { + return (false, false); // precompile is absent + } + } + + /** + * @dev Low level helper for {_tryVerifyNative}. Calls the precompile and checks if there is a return value. + */ + function _rip7212(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) private view returns (bool isValid) { + assembly ("memory-safe") { + // Use the free memory pointer without updating it at the end of the function + let ptr := mload(0x40) + mstore(ptr, h) + mstore(add(ptr, 0x20), r) + mstore(add(ptr, 0x40), s) + mstore(add(ptr, 0x60), qx) + mstore(add(ptr, 0x80), qy) + // RIP-7212 precompiles return empty bytes when an invalid signature is passed, making it impossible + // to distinguish the presence of the precompile. Custom precompile implementations may decide to + // return `bytes32(0)` (i.e. false) without developers noticing, so we decide to evaluate the return value + // without expanding memory using scratch space. + mstore(0x00, 0) // zero out scratch space in case the precompile doesn't return anything + if iszero(staticcall(gas(), 0x100, ptr, 0xa0, 0x00, 0x20)) { + invalid() + } + isValid := mload(0x00) + } + } + + /** + * @dev Same as {verify}, but only the Solidity implementation is used. + */ + function verifySolidity(bytes32 h, bytes32 r, bytes32 s, bytes32 qx, bytes32 qy) internal view returns (bool) { + if (!_isProperSignature(r, s) || !isValidPublicKey(qx, qy)) { + return false; + } + + JPoint[16] memory points = _preComputeJacobianPoints(uint256(qx), uint256(qy)); + uint256 w = Math.invModPrime(uint256(s), N); + uint256 u1 = mulmod(uint256(h), w, N); + uint256 u2 = mulmod(uint256(r), w, N); + (uint256 x, ) = _jMultShamir(points, u1, u2); + return ((x % N) == uint256(r)); + } + + /** + * @dev Public key recovery + * + * @param h - hashed message + * @param v - signature recovery param + * @param r - signature half R + * @param s - signature half S + * + * IMPORTANT: This function disallows signatures where the `s` value is above `N/2` to prevent malleability. + * To flip the `s` value, compute `s = N - s` and `v = 1 - v` if (`v = 0 | 1`). + */ + function recovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) internal view returns (bytes32 x, bytes32 y) { + if (!_isProperSignature(r, s) || v > 1) { + return (0, 0); + } + + uint256 p = P; // cache P on the stack + uint256 rx = uint256(r); + uint256 ry2 = addmod(mulmod(addmod(mulmod(rx, rx, p), A, p), rx, p), B, p); // weierstrass equation y² = x³ + a.x + b + uint256 ry = Math.modExp(ry2, P1DIV4, p); // This formula for sqrt work because P ≡ 3 (mod 4) + if (mulmod(ry, ry, p) != ry2) return (0, 0); // Sanity check + if (ry % 2 != v) ry = p - ry; + + JPoint[16] memory points = _preComputeJacobianPoints(rx, ry); + uint256 w = Math.invModPrime(uint256(r), N); + uint256 u1 = mulmod(N - (uint256(h) % N), w, N); + uint256 u2 = mulmod(uint256(s), w, N); + (uint256 xU, uint256 yU) = _jMultShamir(points, u1, u2); + return (bytes32(xU), bytes32(yU)); + } + + /** + * @dev Checks if (x, y) are valid coordinates of a point on the curve. + * In particular this function checks that x < P and y < P. + */ + function isValidPublicKey(bytes32 x, bytes32 y) internal pure returns (bool result) { + assembly ("memory-safe") { + let p := P + let lhs := mulmod(y, y, p) // y^2 + let rhs := addmod(mulmod(addmod(mulmod(x, x, p), A, p), x, p), B, p) // ((x^2 + a) * x) + b = x^3 + ax + b + result := and(and(lt(x, p), lt(y, p)), eq(lhs, rhs)) // Should conform with the Weierstrass equation + } + } + + /** + * @dev Checks if (r, s) is a proper signature. + * In particular, this checks that `s` is in the "lower-range", making the signature non-malleable. + */ + function _isProperSignature(bytes32 r, bytes32 s) private pure returns (bool) { + return uint256(r) > 0 && uint256(r) < N && uint256(s) > 0 && uint256(s) <= HALF_N; + } + + /** + * @dev Reduce from jacobian to affine coordinates + * @param jx - jacobian coordinate x + * @param jy - jacobian coordinate y + * @param jz - jacobian coordinate z + * @return ax - affine coordinate x + * @return ay - affine coordinate y + */ + function _affineFromJacobian(uint256 jx, uint256 jy, uint256 jz) private view returns (uint256 ax, uint256 ay) { + if (jz == 0) return (0, 0); + uint256 p = P; // cache P on the stack + uint256 zinv = Math.invModPrime(jz, p); + assembly ("memory-safe") { + let zzinv := mulmod(zinv, zinv, p) + ax := mulmod(jx, zzinv, p) + ay := mulmod(jy, mulmod(zzinv, zinv, p), p) + } + } + + /** + * @dev Point addition on the jacobian coordinates + * Reference: https://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian.html#addition-add-1998-cmo-2 + * + * Note that: + * + * - `addition-add-1998-cmo-2` doesn't support identical input points. This version is modified to use + * the `h` and `r` values computed by `addition-add-1998-cmo-2` to detect identical inputs, and fallback to + * `doubling-dbl-1998-cmo-2` if needed. + * - if one of the points is at infinity (i.e. `z=0`), the result is undefined. + */ + function _jAdd( + JPoint memory p1, + uint256 x2, + uint256 y2, + uint256 z2 + ) private pure returns (uint256 rx, uint256 ry, uint256 rz) { + assembly ("memory-safe") { + let p := P + let z1 := mload(add(p1, 0x40)) + let zz1 := mulmod(z1, z1, p) // zz1 = z1² + let s1 := mulmod(mload(add(p1, 0x20)), mulmod(mulmod(z2, z2, p), z2, p), p) // s1 = y1*z2³ + let r := addmod(mulmod(y2, mulmod(zz1, z1, p), p), sub(p, s1), p) // r = s2-s1 = y2*z1³-s1 = y2*z1³-y1*z2³ + let u1 := mulmod(mload(p1), mulmod(z2, z2, p), p) // u1 = x1*z2² + let h := addmod(mulmod(x2, zz1, p), sub(p, u1), p) // h = u2-u1 = x2*z1²-u1 = x2*z1²-x1*z2² + + // detect edge cases where inputs are identical + switch and(iszero(r), iszero(h)) + // case 0: points are different + case 0 { + let hh := mulmod(h, h, p) // h² + + // x' = r²-h³-2*u1*h² + rx := addmod( + addmod(mulmod(r, r, p), sub(p, mulmod(h, hh, p)), p), + sub(p, mulmod(2, mulmod(u1, hh, p), p)), + p + ) + // y' = r*(u1*h²-x')-s1*h³ + ry := addmod( + mulmod(r, addmod(mulmod(u1, hh, p), sub(p, rx), p), p), + sub(p, mulmod(s1, mulmod(h, hh, p), p)), + p + ) + // z' = h*z1*z2 + rz := mulmod(h, mulmod(z1, z2, p), p) + } + // case 1: points are equal + case 1 { + let x := x2 + let y := y2 + let z := z2 + let yy := mulmod(y, y, p) + let zz := mulmod(z, z, p) + let m := addmod(mulmod(3, mulmod(x, x, p), p), mulmod(A, mulmod(zz, zz, p), p), p) // m = 3*x²+a*z⁴ + let s := mulmod(4, mulmod(x, yy, p), p) // s = 4*x*y² + + // x' = t = m²-2*s + rx := addmod(mulmod(m, m, p), sub(p, mulmod(2, s, p)), p) + + // y' = m*(s-t)-8*y⁴ = m*(s-x')-8*y⁴ + // cut the computation to avoid stack too deep + let rytmp1 := sub(p, mulmod(8, mulmod(yy, yy, p), p)) // -8*y⁴ + let rytmp2 := addmod(s, sub(p, rx), p) // s-x' + ry := addmod(mulmod(m, rytmp2, p), rytmp1, p) // m*(s-x')-8*y⁴ + + // z' = 2*y*z + rz := mulmod(2, mulmod(y, z, p), p) + } + } + } + + /** + * @dev Point doubling on the jacobian coordinates + * Reference: https://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian.html#doubling-dbl-1998-cmo-2 + */ + function _jDouble(uint256 x, uint256 y, uint256 z) private pure returns (uint256 rx, uint256 ry, uint256 rz) { + assembly ("memory-safe") { + let p := P + let yy := mulmod(y, y, p) + let zz := mulmod(z, z, p) + let m := addmod(mulmod(3, mulmod(x, x, p), p), mulmod(A, mulmod(zz, zz, p), p), p) // m = 3*x²+a*z⁴ + let s := mulmod(4, mulmod(x, yy, p), p) // s = 4*x*y² + + // x' = t = m²-2*s + rx := addmod(mulmod(m, m, p), sub(p, mulmod(2, s, p)), p) + // y' = m*(s-t)-8*y⁴ = m*(s-x')-8*y⁴ + ry := addmod(mulmod(m, addmod(s, sub(p, rx), p), p), sub(p, mulmod(8, mulmod(yy, yy, p), p)), p) + // z' = 2*y*z + rz := mulmod(2, mulmod(y, z, p), p) + } + } + + /** + * @dev Compute G·u1 + P·u2 using the precomputed points for G and P (see {_preComputeJacobianPoints}). + * + * Uses Strauss Shamir trick for EC multiplication + * https://stackoverflow.com/questions/50993471/ec-scalar-multiplication-with-strauss-shamir-method + * + * We optimize this for 2 bits at a time rather than a single bit. The individual points for a single pass are + * precomputed. Overall this reduces the number of additions while keeping the same number of + * doublings + */ + function _jMultShamir( + JPoint[16] memory points, + uint256 u1, + uint256 u2 + ) private view returns (uint256 rx, uint256 ry) { + uint256 x = 0; + uint256 y = 0; + uint256 z = 0; + unchecked { + for (uint256 i = 0; i < 128; ++i) { + if (z > 0) { + (x, y, z) = _jDouble(x, y, z); + (x, y, z) = _jDouble(x, y, z); + } + // Read 2 bits of u1, and 2 bits of u2. Combining the two gives the lookup index in the table. + uint256 pos = ((u1 >> 252) & 0xc) | ((u2 >> 254) & 0x3); + // Points that have z = 0 are points at infinity. They are the additive 0 of the group + // - if the lookup point is a 0, we can skip it + // - otherwise: + // - if the current point (x, y, z) is 0, we use the lookup point as our new value (0+P=P) + // - if the current point (x, y, z) is not 0, both points are valid and we can use `_jAdd` + if (points[pos].z != 0) { + if (z == 0) { + (x, y, z) = (points[pos].x, points[pos].y, points[pos].z); + } else { + (x, y, z) = _jAdd(points[pos], x, y, z); + } + } + u1 <<= 2; + u2 <<= 2; + } + } + return _affineFromJacobian(x, y, z); + } + + /** + * @dev Precompute a matrice of useful jacobian points associated with a given P. This can be seen as a 4x4 matrix + * that contains combination of P and G (generator) up to 3 times each. See the table below: + * + * ┌────┬─────────────────────┐ + * │ i │ 0 1 2 3 │ + * ├────┼─────────────────────┤ + * │ 0 │ 0 p 2p 3p │ + * │ 4 │ g g+p g+2p g+3p │ + * │ 8 │ 2g 2g+p 2g+2p 2g+3p │ + * │ 12 │ 3g 3g+p 3g+2p 3g+3p │ + * └────┴─────────────────────┘ + * + * Note that `_jAdd` (and thus `_jAddPoint`) does not handle the case where one of the inputs is a point at + * infinity (z = 0). However, we know that since `N ≡ 1 mod 2` and `N ≡ 1 mod 3`, there is no point P such that + * 2P = 0 or 3P = 0. This guarantees that g, 2g, 3g, p, 2p, 3p are all non-zero, and that all `_jAddPoint` calls + * have valid inputs. + */ + function _preComputeJacobianPoints(uint256 px, uint256 py) private pure returns (JPoint[16] memory points) { + points[0x00] = JPoint(0, 0, 0); // 0,0 + points[0x01] = JPoint(px, py, 1); // 1,0 (p) + points[0x04] = JPoint(GX, GY, 1); // 0,1 (g) + points[0x02] = _jDoublePoint(points[0x01]); // 2,0 (2p) + points[0x08] = _jDoublePoint(points[0x04]); // 0,2 (2g) + points[0x03] = _jAddPoint(points[0x01], points[0x02]); // 3,0 (p+2p = 3p) + points[0x05] = _jAddPoint(points[0x01], points[0x04]); // 1,1 (p+g) + points[0x06] = _jAddPoint(points[0x02], points[0x04]); // 2,1 (2p+g) + points[0x07] = _jAddPoint(points[0x03], points[0x04]); // 3,1 (3p+g) + points[0x09] = _jAddPoint(points[0x01], points[0x08]); // 1,2 (p+2g) + points[0x0a] = _jAddPoint(points[0x02], points[0x08]); // 2,2 (2p+2g) + points[0x0b] = _jAddPoint(points[0x03], points[0x08]); // 3,2 (3p+2g) + points[0x0c] = _jAddPoint(points[0x04], points[0x08]); // 0,3 (g+2g = 3g) + points[0x0d] = _jAddPoint(points[0x01], points[0x0c]); // 1,3 (p+3g) + points[0x0e] = _jAddPoint(points[0x02], points[0x0c]); // 2,3 (2p+3g) + points[0x0f] = _jAddPoint(points[0x03], points[0x0c]); // 3,3 (3p+3g) + } + + function _jAddPoint(JPoint memory p1, JPoint memory p2) private pure returns (JPoint memory) { + (uint256 x, uint256 y, uint256 z) = _jAdd(p1, p2.x, p2.y, p2.z); + return JPoint(x, y, z); + } + + function _jDoublePoint(JPoint memory p) private pure returns (JPoint memory) { + (uint256 x, uint256 y, uint256 z) = _jDouble(p.x, p.y, p.z); + return JPoint(x, y, z); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/RSA.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/RSA.sol new file mode 100644 index 00000000..4e04ce5c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/RSA.sol @@ -0,0 +1,154 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/RSA.sol) +pragma solidity ^0.8.20; + +import {Math} from "../math/Math.sol"; + +/** + * @dev RSA PKCS#1 v1.5 signature verification implementation according to https://datatracker.ietf.org/doc/html/rfc8017[RFC8017]. + * + * This library supports PKCS#1 v1.5 padding to avoid malleability via chosen plaintext attacks in practical implementations. + * The padding follows the EMSA-PKCS1-v1_5-ENCODE encoding definition as per section 9.2 of the RFC. This padding makes + * RSA semantically secure for signing messages. + * + * Inspired by https://github.com/adria0/SolRsaVerify/blob/79c6182cabb9102ea69d4a2e996816091d5f1cd1[Adrià Massanet's work] (GNU General Public License v3.0). + * + * _Available since v5.1._ + */ +library RSA { + /** + * @dev Same as {pkcs1Sha256} but using SHA256 to calculate the digest of `data`. + */ + function pkcs1Sha256( + bytes memory data, + bytes memory s, + bytes memory e, + bytes memory n + ) internal view returns (bool) { + return pkcs1Sha256(sha256(data), s, e, n); + } + + /** + * @dev Verifies a PKCSv1.5 signature given a digest according to the verification + * method described in https://datatracker.ietf.org/doc/html/rfc8017#section-8.2.2[section 8.2.2 of RFC8017] with + * support for explicit or implicit NULL parameters in the DigestInfo (no other optional parameters are supported). + * + * IMPORTANT: For security reason, this function requires the signature and modulus to have a length of at least + * 2048 bits. If you use a smaller key, consider replacing it with a larger, more secure, one. + * + * WARNING: This verification algorithm doesn't prevent replayability. If called multiple times with the same + * digest, public key and (valid signature), it will return true every time. Consider including an onchain nonce + * or unique identifier in the message to prevent replay attacks. + * + * WARNING: This verification algorithm supports any exponent. NIST recommends using `65537` (or higher). + * That is the default value many libraries use, such as OpenSSL. Developers may choose to reject public keys + * using a low exponent out of security concerns. + * + * @param digest the digest to verify + * @param s is a buffer containing the signature + * @param e is the exponent of the public key + * @param n is the modulus of the public key + */ + function pkcs1Sha256(bytes32 digest, bytes memory s, bytes memory e, bytes memory n) internal view returns (bool) { + unchecked { + // cache and check length + uint256 length = n.length; + if ( + length < 0x100 || // Enforce 2048 bits minimum + length != s.length // signature must have the same length as the finite field + ) { + return false; + } + + // Verify that s < n to ensure there's only one valid signature for a given message + for (uint256 i = 0; i < length; i += 0x20) { + uint256 p = Math.min(i, length - 0x20); + bytes32 sp = _unsafeReadBytes32(s, p); + bytes32 np = _unsafeReadBytes32(n, p); + if (sp < np) { + // s < n in the upper bits (everything before is equal) → s < n globally: ok + break; + } else if (sp > np || p == length - 0x20) { + // s > n in the upper bits (everything before is equal) → s > n globally: fail + // or + // s = n and we are looking at the lower bits → s = n globally: fail + return false; + } + } + + // RSAVP1 https://datatracker.ietf.org/doc/html/rfc8017#section-5.2.2 + // The previous check guarantees that n > 0. Therefore modExp cannot revert. + bytes memory buffer = Math.modExp(s, e, n); + + // Check that buffer is well encoded: + // buffer ::= 0x00 | 0x01 | PS | 0x00 | DigestInfo + // + // With + // - PS is padding filled with 0xFF + // - DigestInfo ::= SEQUENCE { + // digestAlgorithm AlgorithmIdentifier, + // [optional algorithm parameters] -- not currently supported + // digest OCTET STRING + // } + + // Get AlgorithmIdentifier from the DigestInfo, and set the config accordingly + // - params: includes 00 + first part of DigestInfo + // - mask: filter to check the params + // - offset: length of the suffix (including digest) + bytes32 params; // 0x00 | DigestInfo + bytes32 mask; + uint256 offset; + + // Digest is expected at the end of the buffer. Therefore if NULL param is present, + // it should be at 32 (digest) + 2 bytes from the end. To those 34 bytes, we add the + // OID (9 bytes) and its length (2 bytes) to get the position of the DigestInfo sequence, + // which is expected to have a length of 0x31 when the NULL param is present or 0x2f if not. + if (bytes1(_unsafeReadBytes32(buffer, length - 0x32)) == 0x31) { + offset = 0x34; + // 00 (1 byte) | SEQUENCE length (0x31) = 3031 (2 bytes) | SEQUENCE length (0x0d) = 300d (2 bytes) | OBJECT_IDENTIFIER length (0x09) = 0609 (2 bytes) + // SHA256 OID = 608648016503040201 (9 bytes) | NULL = 0500 (2 bytes) (explicit) | OCTET_STRING length (0x20) = 0420 (2 bytes) + params = 0x003031300d060960864801650304020105000420000000000000000000000000; + mask = 0xffffffffffffffffffffffffffffffffffffffff000000000000000000000000; // (20 bytes) + } else if (bytes1(_unsafeReadBytes32(buffer, length - 0x30)) == 0x2F) { + offset = 0x32; + // 00 (1 byte) | SEQUENCE length (0x2f) = 302f (2 bytes) | SEQUENCE length (0x0b) = 300b (2 bytes) | OBJECT_IDENTIFIER length (0x09) = 0609 (2 bytes) + // SHA256 OID = 608648016503040201 (9 bytes) | NULL = | OCTET_STRING length (0x20) = 0420 (2 bytes) + params = 0x00302f300b060960864801650304020104200000000000000000000000000000; + mask = 0xffffffffffffffffffffffffffffffffffff0000000000000000000000000000; // (18 bytes) + } else { + // unknown + return false; + } + + // Length is at least 0x100 and offset is at most 0x34, so this is safe. There is always some padding. + uint256 paddingEnd = length - offset; + + // The padding has variable (arbitrary) length, so we check it byte per byte in a loop. + // This is required to ensure non-malleability. Not checking would allow an attacker to + // use the padding to manipulate the message in order to create a valid signature out of + // multiple valid signatures. + for (uint256 i = 2; i < paddingEnd; ++i) { + if (bytes1(_unsafeReadBytes32(buffer, i)) != 0xFF) { + return false; + } + } + + // All the other parameters are small enough to fit in a bytes32, so we can check them directly. + return + bytes2(0x0001) == bytes2(_unsafeReadBytes32(buffer, 0x00)) && // 00 | 01 + // PS was checked in the loop + params == _unsafeReadBytes32(buffer, paddingEnd) & mask && // DigestInfo + // Optional parameters are not checked + digest == _unsafeReadBytes32(buffer, length - 0x20); // Digest + } + } + + /// @dev Reads a bytes32 from a bytes array without bounds checking. + function _unsafeReadBytes32(bytes memory array, uint256 offset) private pure returns (bytes32 result) { + // Memory safeness is guaranteed as long as the provided `array` is a Solidity-allocated bytes array + // and `offset` is within bounds. This is the case for all calls to this private function from {pkcs1Sha256}. + assembly ("memory-safe") { + result := mload(add(add(array, 0x20), offset)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/SignatureChecker.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/SignatureChecker.sol new file mode 100644 index 00000000..ee3b7801 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/SignatureChecker.sol @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/SignatureChecker.sol) + +pragma solidity ^0.8.24; + +import {ECDSA} from "./ECDSA.sol"; +import {IERC1271} from "../../interfaces/IERC1271.sol"; +import {IERC7913SignatureVerifier} from "../../interfaces/IERC7913.sol"; +import {Bytes} from "../Bytes.sol"; + +/** + * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support: + * + * * ECDSA signatures from externally owned accounts (EOAs) + * * ERC-1271 signatures from smart contract wallets like Argent and Safe Wallet (previously Gnosis Safe) + * * ERC-7913 signatures from keys that do not have an Ethereum address of their own + * + * See https://eips.ethereum.org/EIPS/eip-1271[ERC-1271] and https://eips.ethereum.org/EIPS/eip-7913[ERC-7913]. + */ +library SignatureChecker { + using Bytes for bytes; + + /** + * @dev Checks if a signature is valid for a given signer and data hash. If the signer has code, the + * signature is validated against it using ERC-1271, otherwise it's validated using `ECDSA.recover`. + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + * + * NOTE: For an extended version of this function that supports ERC-7913 signatures, see {isValidSignatureNow-bytes-bytes32-bytes-}. + */ + function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { + if (signer.code.length == 0) { + (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecover(hash, signature); + return err == ECDSA.RecoverError.NoError && recovered == signer; + } else { + return isValidERC1271SignatureNow(signer, hash, signature); + } + } + + /** + * @dev Variant of {isValidSignatureNow} that takes a signature in calldata + */ + function isValidSignatureNowCalldata( + address signer, + bytes32 hash, + bytes calldata signature + ) internal view returns (bool) { + if (signer.code.length == 0) { + (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecoverCalldata(hash, signature); + return err == ECDSA.RecoverError.NoError && recovered == signer; + } else { + return isValidERC1271SignatureNowCalldata(signer, hash, signature); + } + } + + /** + * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated + * against the signer smart contract using ERC-1271. + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + */ + function isValidERC1271SignatureNow( + address signer, + bytes32 hash, + bytes memory signature + ) internal view returns (bool result) { + bytes4 selector = IERC1271.isValidSignature.selector; + uint256 length = signature.length; + + assembly ("memory-safe") { + // Encoded calldata is : + // [ 0x00 - 0x03 ] + // [ 0x04 - 0x23 ] + // [ 0x24 - 0x43 ] (0x40) + // [ 0x44 - 0x63 ] + // [ 0x64 - ... ] + let ptr := mload(0x40) + mstore(ptr, selector) + mstore(add(ptr, 0x04), hash) + mstore(add(ptr, 0x24), 0x40) + mcopy(add(ptr, 0x44), signature, add(length, 0x20)) + + let success := staticcall(gas(), signer, ptr, add(length, 0x64), 0x00, 0x20) + result := and(success, and(gt(returndatasize(), 0x1f), eq(mload(0x00), selector))) + } + } + + function isValidERC1271SignatureNowCalldata( + address signer, + bytes32 hash, + bytes calldata signature + ) internal view returns (bool result) { + bytes4 selector = IERC1271.isValidSignature.selector; + uint256 length = signature.length; + + assembly ("memory-safe") { + // Encoded calldata is : + // [ 0x00 - 0x03 ] + // [ 0x04 - 0x23 ] + // [ 0x24 - 0x43 ] (0x40) + // [ 0x44 - 0x63 ] + // [ 0x64 - ... ] + let ptr := mload(0x40) + mstore(ptr, selector) + mstore(add(ptr, 0x04), hash) + mstore(add(ptr, 0x24), 0x40) + mstore(add(ptr, 0x44), length) + calldatacopy(add(ptr, 0x64), signature.offset, length) + + let success := staticcall(gas(), signer, ptr, add(length, 0x64), 0x00, 0x20) + result := and(success, and(gt(returndatasize(), 0x1f), eq(mload(0x00), selector))) + } + } + + /** + * @dev Verifies a signature for a given ERC-7913 signer and hash. + * + * The signer is a `bytes` object that is the concatenation of an address and optionally a key: + * `verifier || key`. A signer must be at least 20 bytes long. + * + * Verification is done as follows: + * + * * If `signer.length < 20`: verification fails + * * If `signer.length == 20`: verification is done using {isValidSignatureNow} + * * Otherwise: verification is done using {IERC7913SignatureVerifier} + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + */ + function isValidSignatureNow( + bytes memory signer, + bytes32 hash, + bytes memory signature + ) internal view returns (bool) { + if (signer.length < 20) { + return false; + } else if (signer.length == 20) { + return isValidSignatureNow(address(bytes20(signer)), hash, signature); + } else { + (bool success, bytes memory result) = address(bytes20(signer)).staticcall( + abi.encodeCall(IERC7913SignatureVerifier.verify, (signer.slice(20), hash, signature)) + ); + return (success && + result.length >= 32 && + abi.decode(result, (bytes32)) == bytes32(IERC7913SignatureVerifier.verify.selector)); + } + } + + /** + * @dev Verifies multiple ERC-7913 `signatures` for a given `hash` using a set of `signers`. + * Returns `false` if the number of signers and signatures is not the same. + * + * The signers should be ordered by their `keccak256` hash to ensure efficient duplication check. Unordered + * signers are supported, but the uniqueness check will be more expensive. + * + * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus + * change through time. It could return true at block N and false at block N+1 (or the opposite). + */ + function areValidSignaturesNow( + bytes32 hash, + bytes[] memory signers, + bytes[] memory signatures + ) internal view returns (bool) { + if (signers.length != signatures.length) return false; + + bytes32 lastId = bytes32(0); + + for (uint256 i = 0; i < signers.length; ++i) { + bytes memory signer = signers[i]; + + // If one of the signatures is invalid, reject the batch + if (!isValidSignatureNow(signer, hash, signatures[i])) return false; + + bytes32 id = keccak256(signer); + // If the current signer ID is greater than all previous IDs, then this is a new signer. + if (lastId < id) { + lastId = id; + } else { + // If this signer id is not greater than all the previous ones, verify that it is not a duplicate of a previous one + // This loop is never executed if the signers are ordered by id. + for (uint256 j = 0; j < i; ++j) { + if (id == keccak256(signers[j])) return false; + } + } + } + + return true; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/TrieProof.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/TrieProof.sol new file mode 100644 index 00000000..36dbd00d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/TrieProof.sol @@ -0,0 +1,255 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/TrieProof.sol) +pragma solidity ^0.8.26; + +import {Bytes} from "../Bytes.sol"; +import {Memory} from "../Memory.sol"; +import {RLP} from "../RLP.sol"; + +/** + * @dev Library for verifying Ethereum Merkle-Patricia trie inclusion proofs. + * + * The {traverse} and {verify} functions can be used to prove the following value: + * + * * Transaction against the transactionsRoot of a block. + * * Event against receiptsRoot of a block. + * * Account details (RLP encoding of [nonce, balance, storageRoot, codeHash]) against the stateRoot of a block. + * * Storage slot (RLP encoding of the value) against the storageRoot of a account. + * + * Proving a storage slot is usually done in 3 steps: + * + * * From the stateRoot of a block, process the account proof (see `eth_getProof`) to get the account details. + * * RLP decode the account details to extract the storageRoot. + * * Use storageRoot of that account to process the storageProof (again, see `eth_getProof`). + * + * See https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie[Merkle-Patricia trie] + * + * Based on https://github.com/ethereum-optimism/optimism/blob/ef970556e668b271a152124023a8d6bb5159bacf/packages/contracts-bedrock/src/libraries/trie/MerkleTrie.sol[this implementation from optimism]. + */ +library TrieProof { + using Bytes for *; + using RLP for *; + using Memory for *; + + enum Prefix { + EXTENSION_EVEN, // 0 - Extension node with even length path + EXTENSION_ODD, // 1 - Extension node with odd length path + LEAF_EVEN, // 2 - Leaf node with even length path + LEAF_ODD // 3 - Leaf node with odd length path + } + + enum ProofError { + NO_ERROR, // No error occurred during proof traversal + EMPTY_KEY, // The provided key is empty + INVALID_ROOT, // The validation of the root node failed + INVALID_LARGE_NODE, // The validation of a large node failed + INVALID_SHORT_NODE, // The validation of a short node failed + EMPTY_PATH, // The path in a leaf or extension node is empty + INVALID_PATH_REMAINDER, // The path remainder in a leaf or extension node is invalid + EMPTY_EXTENSION_PATH_REMAINDER, // The path remainder in an extension node is empty + INVALID_EXTRA_PROOF_ELEMENT, // A leaf value should be the last proof element + EMPTY_VALUE, // The leaf value is empty + MISMATCH_LEAF_PATH_KEY_REMAINDER, // The path remainder in a leaf node doesn't match the key remainder + UNKNOWN_NODE_PREFIX, // The node prefix is unknown + UNPARSEABLE_NODE, // The node cannot be parsed from RLP encoding + INVALID_PROOF // General failure during proof traversal + } + + error TrieProofTraversalError(ProofError err); + + /// @dev The radix of the Ethereum trie + uint256 internal constant EVM_TREE_RADIX = 16; + + /// @dev Number of items in a branch node (16 children + 1 value) + uint256 internal constant BRANCH_NODE_LENGTH = EVM_TREE_RADIX + 1; + + /// @dev Number of items in leaf or extension nodes (always 2) + uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2; + + /// @dev Verifies a `proof` against a given `key`, `value`, `and root` hash. + function verify( + bytes memory value, + bytes32 root, + bytes memory key, + bytes[] memory proof + ) internal pure returns (bool) { + (bytes memory processedValue, ProofError err) = tryTraverse(root, key, proof); + return processedValue.equal(value) && err == ProofError.NO_ERROR; + } + + /** + * @dev Traverses a proof with a given key and returns the value. + * + * Reverts with {TrieProofTraversalError} if proof is invalid. + */ + function traverse(bytes32 root, bytes memory key, bytes[] memory proof) internal pure returns (bytes memory) { + (bytes memory value, ProofError err) = tryTraverse(root, key, proof); + require(err == ProofError.NO_ERROR, TrieProofTraversalError(err)); + return value; + } + + /** + * @dev Traverses a proof with a given key and returns the value and an error flag + * instead of reverting if the proof is invalid. This function may still revert if + * malformed input leads to RLP decoding errors. + */ + function tryTraverse( + bytes32 root, + bytes memory key, + bytes[] memory proof + ) internal pure returns (bytes memory value, ProofError err) { + if (key.length == 0) return (_emptyBytesMemory(), ProofError.EMPTY_KEY); + + // Expand the key + bytes memory keyExpanded = key.toNibbles(); + + bytes32 currentNodeId; + uint256 currentNodeIdLength; + + // Free memory pointer cache + Memory.Pointer fmp = Memory.getFreeMemoryPointer(); + + // Traverse proof + uint256 keyIndex = 0; + for (uint256 i = 0; i < proof.length; ++i) { + // validates the encoded node matches the expected node id + bytes memory encoded = proof[i]; + if (keyIndex == 0) { + // Root node must match root hash + if (keccak256(encoded) != root) return (_emptyBytesMemory(), ProofError.INVALID_ROOT); + } else if (encoded.length >= 32) { + // Large nodes are stored as hashes + if (currentNodeIdLength != 32 || keccak256(encoded) != currentNodeId) + return (_emptyBytesMemory(), ProofError.INVALID_LARGE_NODE); + } else { + // Short nodes must match directly + if (currentNodeIdLength != encoded.length || bytes32(encoded) != currentNodeId) + return (_emptyBytesMemory(), ProofError.INVALID_SHORT_NODE); + } + + // decode the current node as an RLP list, and process it + for (Memory.Slice[] memory decoded = encoded.decodeList(); ; ) { + if (decoded.length == BRANCH_NODE_LENGTH) { + // If we've consumed the entire key, the value must be in the last slot + // Otherwise, continue down the branch specified by the next nibble in the key + if (keyIndex == keyExpanded.length) { + return _validateLastItem(decoded[EVM_TREE_RADIX], proof.length, i); + } else { + bytes1 branchKey = keyExpanded[keyIndex]; + Memory.Slice childNode = decoded[uint8(branchKey)]; + (currentNodeId, currentNodeIdLength) = _getNodeId(childNode); + keyIndex += 1; + + if (currentNodeIdLength == 32 || _match(childNode, proof, i + 1)) { + break; + } + decoded = childNode.readList(); + } + } else if (decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) { + bytes[] memory proof_ = proof; + + bytes memory path = decoded[0].readBytes().toNibbles(); // expanded path + // The following is equivalent to path.length < 2 because toNibbles can't return odd-length buffers + if (path.length == 0) { + return (_emptyBytesMemory(), ProofError.EMPTY_PATH); + } + uint8 prefix = uint8(path[0]); // path encoding nibble (node type + parity), see {Prefix} + Memory.Slice keyRemainder = keyExpanded.asSlice().slice(keyIndex); // Remaining key to match + Memory.Slice pathRemainder = path.asSlice().slice(2 - (prefix % 2)); // Path after the prefix + uint256 pathRemainderLength = pathRemainder.length(); + + // pathRemainder must not be longer than keyRemainder and must match the start of keyRemainder + if ( + pathRemainderLength > keyRemainder.length() || + !pathRemainder.equal(keyRemainder.slice(0, pathRemainderLength)) + ) { + return (_emptyBytesMemory(), ProofError.INVALID_PATH_REMAINDER); + } + + if (prefix <= uint8(Prefix.EXTENSION_ODD)) { + // Eq to: prefix == EXTENSION_EVEN || prefix == EXTENSION_ODD + if (pathRemainderLength == 0) { + return (_emptyBytesMemory(), ProofError.EMPTY_EXTENSION_PATH_REMAINDER); + } + // Increment keyIndex by the number of nibbles consumed and continue traversal + Memory.Slice childNode = decoded[1]; + (currentNodeId, currentNodeIdLength) = _getNodeId(childNode); + keyIndex += pathRemainderLength; + + if (currentNodeIdLength == 32 || _match(childNode, proof_, i + 1)) { + break; + } + decoded = childNode.readList(); + } else if (prefix <= uint8(Prefix.LEAF_ODD)) { + // Eq to: prefix == LEAF_EVEN || prefix == LEAF_ODD + // + // Leaf node (terminal) - return its value if key matches completely + // we already know that pathRemainder is a prefix of keyRemainder, so checking the length sufficient + return + pathRemainderLength == keyRemainder.length() + ? _validateLastItem(decoded[1], proof_.length, i) + : (_emptyBytesMemory(), ProofError.MISMATCH_LEAF_PATH_KEY_REMAINDER); + } else { + return (_emptyBytesMemory(), ProofError.UNKNOWN_NODE_PREFIX); + } + } else { + return (_emptyBytesMemory(), ProofError.UNPARSEABLE_NODE); + } + } + // Reset memory before next iteration. Deallocates `decoded` and `path`. + Memory.unsafeSetFreeMemoryPointer(fmp); + } + + // If we've gone through all proof elements without finding a value, the proof is invalid + return (_emptyBytesMemory(), ProofError.INVALID_PROOF); + } + + /** + * @dev Validates that we've reached a valid leaf value and this is the last proof element. + * Ensures the value is not empty and no extra proof elements exist. + */ + function _validateLastItem( + Memory.Slice item, + uint256 trieProofLength, + uint256 i + ) private pure returns (bytes memory, ProofError) { + if (i != trieProofLength - 1) { + return (_emptyBytesMemory(), ProofError.INVALID_EXTRA_PROOF_ELEMENT); + } + bytes memory value = item.readBytes(); + return (value, value.length == 0 ? ProofError.EMPTY_VALUE : ProofError.NO_ERROR); + } + + /** + * @dev Extracts the node ID (hash or raw data based on size) + * + * For short nodes (encoded length < 32 bytes) the node ID is the node content itself, + * For larger nodes, the node ID is the hash of the encoded node data. + * + * [NOTE] + * ==== + * If a 32-byte input is provided (can occur with inline child references), it is used directly (like short nodes). + * When `nodeIdLength == 32`, inline processing is skipped. The next traversal step then checks whether the next + * node is large and its hash matches those raw bytes. If that is not the case, it returns {INVALID_LARGE_NODE}. + * + * If the input is empty (e.g. when traversing a branch node whose target child slot is empty, meaning the key + * does not exist in the trie), calling this function will panic with {ARRAY_OUT_OF_BOUNDS}. In practice, this + * never occurs because {readList} always returns slices with at least 1 byte (every RLP element includes its + * prefix byte, e.g., empty string is `0x80`). + * ==== + */ + function _getNodeId(Memory.Slice node) private pure returns (bytes32 nodeId, uint256 nodeIdLength) { + uint256 nodeLength = node.length(); + return nodeLength < 33 ? (node.load(0), nodeLength) : (node.readBytes32(), 32); + } + + function _emptyBytesMemory() private pure returns (bytes memory result) { + assembly ("memory-safe") { + result := 0x60 // mload(0x60) is always 0 + } + } + + function _match(Memory.Slice slice, bytes[] memory array, uint256 index) private pure returns (bool) { + return index < array.length && slice.equal(array[index].asSlice()); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/WebAuthn.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/WebAuthn.sol new file mode 100644 index 00000000..085a7832 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/WebAuthn.sol @@ -0,0 +1,269 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/WebAuthn.sol) + +pragma solidity ^0.8.24; + +import {P256} from "./P256.sol"; +import {Math} from "../math/Math.sol"; +import {Base64} from "../Base64.sol"; +import {Bytes} from "../Bytes.sol"; +import {Strings} from "../Strings.sol"; + +/** + * @dev Library for verifying WebAuthn Authentication Assertions. + * + * WebAuthn enables strong authentication for smart contracts using + * https://docs.openzeppelin.com/contracts/5.x/api/utils#P256[P256] + * as an alternative to traditional secp256k1 ECDSA signatures. This library verifies + * signatures generated during WebAuthn authentication ceremonies as specified in the + * https://www.w3.org/TR/webauthn-2/[WebAuthn Level 2 standard]. + * + * For blockchain use cases, the following WebAuthn validations are intentionally omitted: + * + * * Origin validation: Origin verification in `clientDataJSON` is omitted. This check is the + * responsibility of the authenticator and does not have a meaningful on-chain use case; standard + * authenticators implement proper origin validation before signing. + * * RP ID hash validation: Verification of `rpIdHash` in authenticatorData against expected + * RP ID hash is omitted. This check is the responsibility of the authenticator and does not have + * a meaningful on-chain use case; it is typically enforced at the platform level. + * * Signature counter: Verification of signature counter increments is omitted. The + * signature counter is maintained by authenticators per the WebAuthn spec to detect + * credential cloning, but validating it requires storing per-credential mutable state + * (the last seen counter value) which is impractical for most smart contract applications. + * Additionally, counter enforcement is primarily an authenticator responsibility, not a + * contract-level concern. + * * Extension outputs: Extension output value verification is omitted as these are not + * essential for core authentication security in blockchain applications. + * * Attestation: Attestation object verification is omitted as this implementation + * focuses on authentication (`webauthn.get`) rather than registration ceremonies. + * + * Inspired by: + * + * * https://github.com/daimo-eth/p256-verifier/blob/master/src/WebAuthn.sol[daimo-eth implementation] + * * https://github.com/base/webauthn-sol/blob/main/src/WebAuthn.sol[base implementation] + */ +library WebAuthn { + struct WebAuthnAuth { + bytes32 r; /// The r value of secp256r1 signature + bytes32 s; /// The s value of secp256r1 signature + uint256 challengeIndex; /// The index at which "challenge":"..." occurs in `clientDataJSON`. + uint256 typeIndex; /// The index at which "type":"..." occurs in `clientDataJSON`. + /// The WebAuthn authenticator data. + /// https://www.w3.org/TR/webauthn-2/#dom-authenticatorassertionresponse-authenticatordata + bytes authenticatorData; + /// The WebAuthn client data JSON. + /// https://www.w3.org/TR/webauthn-2/#dom-authenticatorresponse-clientdatajson + string clientDataJSON; + } + + /// @dev Bit 0 of the authenticator data flags: "User Present" bit. + bytes1 internal constant AUTH_DATA_FLAGS_UP = 0x01; + /// @dev Bit 2 of the authenticator data flags: "User Verified" bit. + bytes1 internal constant AUTH_DATA_FLAGS_UV = 0x04; + /// @dev Bit 3 of the authenticator data flags: "Backup Eligibility" bit. + bytes1 internal constant AUTH_DATA_FLAGS_BE = 0x08; + /// @dev Bit 4 of the authenticator data flags: "Backup State" bit. + bytes1 internal constant AUTH_DATA_FLAGS_BS = 0x10; + + /** + * @dev Performs standard verification of a WebAuthn Authentication Assertion. + */ + function verify( + bytes memory challenge, + WebAuthnAuth memory auth, + bytes32 qx, + bytes32 qy + ) internal view returns (bool) { + return verify(challenge, auth, qx, qy, true); + } + + /** + * @dev Performs verification of a WebAuthn Authentication Assertion. This variants allow the caller to select + * whether of not to require the UV flag (step 17). + * + * Verifies: + * + * 1. Type is "webauthn.get" (see {_validateExpectedTypeHash}) + * 2. Challenge matches the expected value (see {_validateChallenge}) + * 3. Cryptographic signature is valid for the given public key + * 4. confirming physical user presence during authentication + * 5. (if `requireUV` is true) confirming stronger user authentication (biometrics/PIN) + * 6. Backup Eligibility (`BE`) and Backup State (BS) bits relationship is valid + */ + function verify( + bytes memory challenge, + WebAuthnAuth memory auth, + bytes32 qx, + bytes32 qy, + bool requireUV + ) internal view returns (bool) { + // Verify authenticator data has sufficient length (37 bytes minimum): + // - 32 bytes for rpIdHash + // - 1 byte for flags + // - 4 bytes for signature counter + return + auth.authenticatorData.length > 36 && + _validateExpectedTypeHash(auth.clientDataJSON, auth.typeIndex) && // 11 + _validateChallenge(auth.clientDataJSON, auth.challengeIndex, challenge) && // 12 + _validateUserPresentBitSet(auth.authenticatorData[32]) && // 16 + (!requireUV || _validateUserVerifiedBitSet(auth.authenticatorData[32])) && // 17 + _validateBackupEligibilityAndState(auth.authenticatorData[32]) && // Consistency check + // P256.verify handles signature malleability internally + P256.verify( + sha256( + abi.encodePacked( + auth.authenticatorData, + sha256(bytes(auth.clientDataJSON)) // 19 + ) + ), + auth.r, + auth.s, + qx, + qy + ); // 20 + } + + /** + * @dev Validates that the https://www.w3.org/TR/webauthn-2/#type[Type] field in the client data JSON is set to + * "webauthn.get". + * + * Step 11 in https://www.w3.org/TR/webauthn-2/#sctn-verifying-assertion[verifying an assertion]. + */ + function _validateExpectedTypeHash( + string memory clientDataJSON, + uint256 typeIndex + ) private pure returns (bool success) { + assembly ("memory-safe") { + success := and( + // clientDataJson.length >= typeIndex + 21 + gt(mload(clientDataJSON), add(typeIndex, 20)), + eq( + // get 32 bytes starting at index typexIndex in clientDataJSON, and keep the leftmost 21 bytes + and(mload(add(add(clientDataJSON, 0x20), typeIndex)), shl(88, not(0))), + // solhint-disable-next-line quotes + '"type":"webauthn.get"' + ) + ) + } + } + + /** + * @dev Validates that the challenge in the client data JSON matches the `expectedChallenge`. + * + * Step 12 in https://www.w3.org/TR/webauthn-2/#sctn-verifying-assertion[verifying an assertion]. + */ + function _validateChallenge( + string memory clientDataJSON, + uint256 challengeIndex, + bytes memory challenge + ) private pure returns (bool) { + // solhint-disable-next-line quotes + string memory expectedChallenge = string.concat('"challenge":"', Base64.encodeURL(challenge), '"'); + string memory actualChallenge = string( + Bytes.slice( + bytes(clientDataJSON), + challengeIndex, + Math.saturatingAdd(challengeIndex, bytes(expectedChallenge).length) + ) + ); + + return Strings.equal(actualChallenge, expectedChallenge); + } + + /** + * @dev Validates that the https://www.w3.org/TR/webauthn-2/#up[User Present (UP)] bit is set. + * + * Step 16 in https://www.w3.org/TR/webauthn-2/#sctn-verifying-assertion[verifying an assertion]. + * + * NOTE: Required by WebAuthn spec but may be skipped for platform authenticators + * (Touch ID, Windows Hello) in controlled environments. Enforce for public-facing apps. + */ + function _validateUserPresentBitSet(bytes1 flags) private pure returns (bool) { + return (flags & AUTH_DATA_FLAGS_UP) == AUTH_DATA_FLAGS_UP; + } + + /** + * @dev Validates that the https://www.w3.org/TR/webauthn-2/#uv[User Verified (UV)] bit is set. + * + * Step 17 in https://www.w3.org/TR/webauthn-2/#sctn-verifying-assertion[verifying an assertion]. + * + * The UV bit indicates whether the user was verified using a stronger identification method + * (biometrics, PIN, password). While optional, requiring UV=1 is recommended for: + * + * * High-value transactions and sensitive operations + * * Account recovery and critical settings changes + * * Privileged operations + * + * NOTE: For routine operations or when using hardware authenticators without verification capabilities, + * `UV=0` may be acceptable. The choice of whether to require UV represents a security vs. usability + * tradeoff - for blockchain applications handling valuable assets, requiring UV is generally safer. + */ + function _validateUserVerifiedBitSet(bytes1 flags) private pure returns (bool) { + return (flags & AUTH_DATA_FLAGS_UV) == AUTH_DATA_FLAGS_UV; + } + + /** + * @dev Validates the relationship between Backup Eligibility (`BE`) and Backup State (`BS`) bits + * according to the WebAuthn specification. + * + * The function enforces that if a credential is backed up (`BS=1`), it must also be eligible + * for backup (`BE=1`). This prevents unauthorized credential backup and ensures compliance + * with the WebAuthn spec. + * + * Returns true in these valid states: + * + * * `BE=1`, `BS=0`: Credential is eligible but not backed up + * * `BE=1`, `BS=1`: Credential is eligible and backed up + * * `BE=0`, `BS=0`: Credential is not eligible and not backed up + * + * Returns false only when `BE=0` and `BS=1`, which is an invalid state indicating + * a credential that's backed up but not eligible for backup. + * + * NOTE: While the WebAuthn spec defines this relationship between `BE` and `BS` bits, + * validating it is not explicitly required as part of the core verification procedure. + * Some implementations may choose to skip this check for broader authenticator + * compatibility or when the application's threat model doesn't consider credential + * syncing a major risk. + */ + function _validateBackupEligibilityAndState(bytes1 flags) private pure returns (bool) { + return (flags & AUTH_DATA_FLAGS_BE) == AUTH_DATA_FLAGS_BE || (flags & AUTH_DATA_FLAGS_BS) == 0; + } + + /** + * @dev Verifies that calldata bytes (`input`) represents a valid `WebAuthnAuth` object. If encoding is valid, + * returns true and the calldata view at the object. Otherwise, returns false and an invalid calldata object. + * + * NOTE: The returned `auth` object should not be accessed if `success` is false. Trying to access the data may + * cause revert/panic. + */ + function tryDecodeAuth(bytes calldata input) internal pure returns (bool success, WebAuthnAuth calldata auth) { + assembly ("memory-safe") { + auth := input.offset + } + + // Minimum length to hold 6 objects (32 bytes each) + if (input.length < 0xC0) return (false, auth); + + // Get offset of non-value-type elements relative to the input buffer + uint256 authenticatorDataOffset = uint256(bytes32(input[0x80:])); + uint256 clientDataJSONOffset = uint256(bytes32(input[0xa0:])); + + // The elements length (at the offset) should be 32 bytes long. We check that this is within the + // buffer bounds. Since we know input.length is at least 32, we can subtract with no overflow risk. + if (input.length - 0x20 < authenticatorDataOffset || input.length - 0x20 < clientDataJSONOffset) + return (false, auth); + + // Get the lengths. offset + 32 is bounded by input.length so it does not overflow. + uint256 authenticatorDataLength = uint256(bytes32(input[authenticatorDataOffset:])); + uint256 clientDataJSONLength = uint256(bytes32(input[clientDataJSONOffset:])); + + // Check that the input buffer is long enough to store the non-value-type elements + // Since we know input.length is at least xxxOffset + 32, we can subtract with no overflow risk. + if ( + input.length - authenticatorDataOffset - 0x20 < authenticatorDataLength || + input.length - clientDataJSONOffset - 0x20 < clientDataJSONLength + ) return (false, auth); + + return (true, auth); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/draft-ERC7739Utils.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/draft-ERC7739Utils.sol new file mode 100644 index 00000000..2035d331 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/draft-ERC7739Utils.sol @@ -0,0 +1,207 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/draft-ERC7739Utils.sol) + +pragma solidity ^0.8.20; + +import {Calldata} from "../Calldata.sol"; +import {Hashes} from "./Hashes.sol"; + +/** + * @dev Utilities to process https://ercs.ethereum.org/ERCS/erc-7739[ERC-7739] typed data signatures + * that are specific to an EIP-712 domain. + * + * This library provides methods to wrap, unwrap and operate over typed data signatures with a defensive + * rehashing mechanism that includes the app's xref:api:utils/cryptography#EIP712-_domainSeparatorV4[EIP-712] + * and preserves readability of the signed content using an EIP-712 nested approach. + * + * A smart contract domain can validate a signature for a typed data structure in two ways: + * + * - As an application validating a typed data signature. See {typedDataSignStructHash}. + * - As a smart contract validating a raw message signature. See {personalSignStructHash}. + * + * NOTE: A provider for a smart contract wallet would need to return this signature as the + * result of a call to `personal_sign` or `eth_signTypedData`, and this may be unsupported by + * API clients that expect a return value of 129 bytes, or specifically the `r,s,v` parameters + * of an xref:api:utils/cryptography#ECDSA[ECDSA] signature, as is for example specified for + * xref:api:utils/cryptography#EIP712[EIP-712]. + */ +library ERC7739Utils { + /** + * @dev An EIP-712 type to represent "personal" signatures + * (i.e. mimic of `personal_sign` for smart contracts). + */ + bytes32 private constant PERSONAL_SIGN_TYPEHASH = keccak256("PersonalSign(bytes prefixed)"); + + /** + * @dev Nest a signature for a given EIP-712 type into a nested signature for the domain of the app. + * + * Counterpart of {decodeTypedDataSig} to extract the original signature and the nested components. + */ + function encodeTypedDataSig( + bytes memory signature, + bytes32 appSeparator, + bytes32 contentsHash, + string memory contentsDescr + ) internal pure returns (bytes memory) { + return + abi.encodePacked(signature, appSeparator, contentsHash, contentsDescr, uint16(bytes(contentsDescr).length)); + } + + /** + * @dev Parses a nested signature into its components. + * + * Constructed as follows: + * + * `signature ‖ APP_DOMAIN_SEPARATOR ‖ contentsHash ‖ contentsDescr ‖ uint16(contentsDescr.length)` + * + * - `signature` is the signature for the (ERC-7739) nested struct hash. This signature indirectly signs over the + * original "contents" hash (from the app) and the account's domain separator. + * - `APP_DOMAIN_SEPARATOR` is the EIP-712 {EIP712-_domainSeparatorV4} of the application smart contract that is + * requesting the signature verification (through ERC-1271). + * - `contentsHash` is the hash of the underlying data structure or message. + * - `contentsDescr` is a descriptor of the "contents" part of the EIP-712 type of the nested signature. + * + * NOTE: This function returns empty if the input format is invalid instead of reverting. + */ + function decodeTypedDataSig( + bytes calldata encodedSignature + ) + internal + pure + returns (bytes calldata signature, bytes32 appSeparator, bytes32 contentsHash, string calldata contentsDescr) + { + unchecked { + uint256 sigLength = encodedSignature.length; + + // 66 bytes = contentsDescrLength (2 bytes) + contentsHash (32 bytes) + APP_DOMAIN_SEPARATOR (32 bytes). + if (sigLength < 66) return (Calldata.emptyBytes(), 0, 0, Calldata.emptyString()); + + uint256 contentsDescrEnd = sigLength - 2; // Last 2 bytes + uint256 contentsDescrLength = uint16(bytes2(encodedSignature[contentsDescrEnd:])); + + // Check for space for `contentsDescr` in addition to the 66 bytes documented above + if (sigLength < 66 + contentsDescrLength) return (Calldata.emptyBytes(), 0, 0, Calldata.emptyString()); + + uint256 contentsHashEnd = contentsDescrEnd - contentsDescrLength; + uint256 separatorEnd = contentsHashEnd - 32; + uint256 signatureEnd = separatorEnd - 32; + + signature = encodedSignature[:signatureEnd]; + appSeparator = bytes32(encodedSignature[signatureEnd:separatorEnd]); + contentsHash = bytes32(encodedSignature[separatorEnd:contentsHashEnd]); + contentsDescr = string(encodedSignature[contentsHashEnd:contentsDescrEnd]); + } + } + + /** + * @dev Nests an `ERC-191` digest into a `PersonalSign` EIP-712 struct, and returns the corresponding struct hash. + * This struct hash must be combined with a domain separator, using {MessageHashUtils-toTypedDataHash} before + * being verified/recovered. + * + * This is used to simulate the `personal_sign` RPC method in the context of smart contracts. + */ + function personalSignStructHash(bytes32 contents) internal pure returns (bytes32) { + return Hashes.efficientKeccak256(PERSONAL_SIGN_TYPEHASH, contents); + } + + /** + * @dev Nests an `EIP-712` hash (`contents`) into a `TypedDataSign` EIP-712 struct, and returns the corresponding + * struct hash. This struct hash must be combined with a domain separator, using {MessageHashUtils-toTypedDataHash} + * before being verified/recovered. + */ + function typedDataSignStructHash( + string calldata contentsName, + string calldata contentsType, + bytes32 contentsHash, + bytes memory domainBytes + ) internal pure returns (bytes32 result) { + return + bytes(contentsName).length == 0 + ? bytes32(0) + : keccak256( + abi.encodePacked(typedDataSignTypehash(contentsName, contentsType), contentsHash, domainBytes) + ); + } + + /** + * @dev Variant of {typedDataSignStructHash-string-string-bytes32-bytes} that takes a content descriptor + * and decodes the `contentsName` and `contentsType` out of it. + */ + function typedDataSignStructHash( + string calldata contentsDescr, + bytes32 contentsHash, + bytes memory domainBytes + ) internal pure returns (bytes32 result) { + (string calldata contentsName, string calldata contentsType) = decodeContentsDescr(contentsDescr); + + return typedDataSignStructHash(contentsName, contentsType, contentsHash, domainBytes); + } + + /** + * @dev Compute the EIP-712 typehash of the `TypedDataSign` structure for a given type (and typename). + */ + function typedDataSignTypehash( + string calldata contentsName, + string calldata contentsType + ) internal pure returns (bytes32) { + return + keccak256( + abi.encodePacked( + "TypedDataSign(", + contentsName, + " contents,string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)", + contentsType + ) + ); + } + + /** + * @dev Parse the type name out of the ERC-7739 contents type description. Supports both the implicit and explicit + * modes. + * + * Following ERC-7739 specifications, a `contentsName` is considered invalid if it's empty or it contains + * any of the following bytes , )\x00 + * + * If the `contentsType` is invalid, this returns an empty string. Otherwise, the return string has non-zero + * length. + */ + function decodeContentsDescr( + string calldata contentsDescr + ) internal pure returns (string calldata contentsName, string calldata contentsType) { + bytes calldata buffer = bytes(contentsDescr); + if (buffer.length == 0) { + // pass through (fail) + } else if (buffer[buffer.length - 1] == bytes1(")")) { + // Implicit mode: read contentsName from the beginning, and keep the complete descr + for (uint256 i = 0; i < buffer.length; ++i) { + bytes1 current = buffer[i]; + if (current == bytes1("(")) { + // if name is empty - passthrough (fail) + if (i == 0) break; + // we found the end of the contentsName + return (string(buffer[:i]), contentsDescr); + } else if (_isForbiddenChar(current)) { + // we found an invalid character (forbidden) - passthrough (fail) + break; + } + } + } else { + // Explicit mode: read contentsName from the end, and remove it from the descr + for (uint256 i = buffer.length; i > 0; --i) { + bytes1 current = buffer[i - 1]; + if (current == bytes1(")")) { + // we found the end of the contentsName + return (string(buffer[i:]), string(buffer[:i])); + } else if (_isForbiddenChar(current)) { + // we found an invalid character (forbidden) - passthrough (fail) + break; + } + } + } + return (Calldata.emptyString(), Calldata.emptyString()); + } + + function _isForbiddenChar(bytes1 char) private pure returns (bool) { + return char == 0x00 || char == bytes1(" ") || char == bytes1(",") || char == bytes1("(") || char == bytes1(")"); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/AbstractSigner.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/AbstractSigner.sol new file mode 100644 index 00000000..942ec2a6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/AbstractSigner.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/AbstractSigner.sol) + +pragma solidity ^0.8.20; + +/** + * @dev Abstract contract for signature validation. + * + * Developers must implement {_rawSignatureValidation} and use it as the lowest-level signature validation mechanism. + * + * @custom:stateless + */ +abstract contract AbstractSigner { + /** + * @dev Signature validation algorithm. + * + * WARNING: Implementing a signature validation algorithm is a security-sensitive operation as it involves + * cryptographic verification. It is important to review and test thoroughly before deployment. Consider + * using one of the signature verification libraries (xref:api:utils/cryptography#ECDSA[ECDSA], + * xref:api:utils/cryptography#P256[P256] or xref:api:utils/cryptography#RSA[RSA]). + */ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature) internal view virtual returns (bool); +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913.sol new file mode 100644 index 00000000..24ef1db9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913.sol @@ -0,0 +1,259 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/signers/MultiSignerERC7913.sol) + +pragma solidity ^0.8.26; + +import {AbstractSigner} from "./AbstractSigner.sol"; +import {SignatureChecker} from "../SignatureChecker.sol"; +import {EnumerableSet} from "../../structs/EnumerableSet.sol"; + +/** + * @dev Implementation of {AbstractSigner} using multiple ERC-7913 signers with a threshold-based + * signature verification system. + * + * This contract allows managing a set of authorized signers and requires a minimum number of + * signatures (threshold) to approve operations. It uses ERC-7913 formatted signers, which + * makes it natively compatible with ECDSA and ERC-1271 signers. + * + * Example of usage: + * + * ```solidity + * contract MyMultiSignerAccount is Account, MultiSignerERC7913, Initializable { + * function initialize(bytes[] memory signers, uint64 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(uint64 threshold) public onlyEntryPointOrSelf { + * _setThreshold(threshold); + * } + * } + * ``` + * + * IMPORTANT: Failing to properly initialize the signers and threshold either during construction + * (if used standalone) or during initialization (if used as a clone) may leave the contract + * either front-runnable or unusable. + */ +abstract contract MultiSignerERC7913 is AbstractSigner { + using EnumerableSet for EnumerableSet.BytesSet; + using SignatureChecker for *; + + EnumerableSet.BytesSet private _signers; + uint64 private _threshold; + + /// @dev Emitted when a signer is added. + event ERC7913SignerAdded(bytes indexed signers); + + /// @dev Emitted when a signers is removed. + event ERC7913SignerRemoved(bytes indexed signers); + + /// @dev Emitted when the threshold is updated. + event ERC7913ThresholdSet(uint64 threshold); + + /// @dev The `signer` already exists. + error MultiSignerERC7913AlreadyExists(bytes signer); + + /// @dev The `signer` does not exist. + error MultiSignerERC7913NonexistentSigner(bytes signer); + + /// @dev The `signer` is less than 20 bytes long. + error MultiSignerERC7913InvalidSigner(bytes signer); + + /// @dev The `threshold` is zero. + error MultiSignerERC7913ZeroThreshold(); + + /// @dev The `threshold` is unreachable given the number of `signers`. + error MultiSignerERC7913UnreachableThreshold(uint64 signers, uint64 threshold); + + constructor(bytes[] memory signers_, uint64 threshold_) { + _addSigners(signers_); + _setThreshold(threshold_); + } + + /** + * @dev Returns a slice of the set of authorized signers. + * + * Using `start = 0` and `end = type(uint64).max` will return the entire set of signers. + * + * WARNING: Depending on the `start` and `end`, this operation can copy a large amount of data to memory, which + * can be expensive. This is designed for view accessors queried without gas fees. Using it in state-changing + * functions may become uncallable if the slice grows too large. + */ + function getSigners(uint64 start, uint64 end) public view virtual returns (bytes[] memory) { + return _signers.values(start, end); + } + + /// @dev Returns the number of authorized signers + function getSignerCount() public view virtual returns (uint256) { + return _signers.length(); + } + + /// @dev Returns whether the `signer` is an authorized signer. + function isSigner(bytes memory signer) public view virtual returns (bool) { + return _signers.contains(signer); + } + + /// @dev Returns the minimum number of signers required to approve a multisignature operation. + function threshold() public view virtual returns (uint64) { + return _threshold; + } + + /** + * @dev Adds the `newSigners` to those allowed to sign on behalf of this contract. + * Internal version without access control. + * + * Requirements: + * + * * Each of `newSigners` must be at least 20 bytes long. Reverts with {MultiSignerERC7913InvalidSigner} if not. + * * Each of `newSigners` must not be authorized. See {isSigner}. Reverts with {MultiSignerERC7913AlreadyExists} if so. + * + * NOTE: This function does not validate that signers are controlled or represent appropriate entities. Integrators + * must ensure signers are properly validated before adding them. Problematic signers can compromise + * the multisig's security or functionality. Examples include uncontrolled addresses (e.g., `address(0)`), + * the account's own address (which may cause recursive validation loops), or contracts that may unintentionally + * allow arbitrary validation (e.g. using the identity precompile at `address(0x04)`, which would return the + * ERC-1271 magic value for any `isValidSignature` call). + */ + function _addSigners(bytes[] memory newSigners) internal virtual { + for (uint256 i = 0; i < newSigners.length; ++i) { + bytes memory signer = newSigners[i]; + require(signer.length >= 20, MultiSignerERC7913InvalidSigner(signer)); + require(_signers.add(signer), MultiSignerERC7913AlreadyExists(signer)); + emit ERC7913SignerAdded(signer); + } + } + + /** + * @dev Removes the `oldSigners` from the authorized signers. Internal version without access control. + * + * Requirements: + * + * * Each of `oldSigners` must be authorized. See {isSigner}. Otherwise {MultiSignerERC7913NonexistentSigner} is thrown. + * * See {_validateReachableThreshold} for the threshold validation. + */ + function _removeSigners(bytes[] memory oldSigners) internal virtual { + for (uint256 i = 0; i < oldSigners.length; ++i) { + bytes memory signer = oldSigners[i]; + require(_signers.remove(signer), MultiSignerERC7913NonexistentSigner(signer)); + emit ERC7913SignerRemoved(signer); + } + _validateReachableThreshold(); + } + + /** + * @dev Sets the signatures `threshold` required to approve a multisignature operation. + * Internal version without access control. + * + * Requirements: + * + * * See {_validateReachableThreshold} for the threshold validation. + */ + function _setThreshold(uint64 newThreshold) internal virtual { + require(newThreshold > 0, MultiSignerERC7913ZeroThreshold()); + _threshold = newThreshold; + _validateReachableThreshold(); + emit ERC7913ThresholdSet(newThreshold); + } + + /** + * @dev Validates the current threshold is reachable. + * + * Requirements: + * + * * The {getSignerCount} must be greater or equal than to the {threshold}. Throws + * {MultiSignerERC7913UnreachableThreshold} if not. + */ + function _validateReachableThreshold() internal view virtual { + uint256 signersLength = _signers.length(); + uint64 currentThreshold = threshold(); + require( + signersLength >= currentThreshold, + MultiSignerERC7913UnreachableThreshold( + uint64(signersLength), // Safe cast. Economically impossible to overflow. + currentThreshold + ) + ); + } + + /** + * @dev Decodes, validates the signature and checks the signers are authorized. + * See {_validateSignatures} and {_validateThreshold} for more details. + * + * Example of signature encoding: + * + * ```solidity + * // Encode signers (verifier || key) + * bytes memory signer1 = abi.encodePacked(verifier1, key1); + * bytes memory signer2 = abi.encodePacked(verifier2, key2); + * + * // Order signers by their id + * if (keccak256(signer1) > keccak256(signer2)) { + * (signer1, signer2) = (signer2, signer1); + * (signature1, signature2) = (signature2, signature1); + * } + * + * // Assign ordered signers and signatures + * bytes[] memory signers = new bytes[](2); + * bytes[] memory signatures = new bytes[](2); + * signers[0] = signer1; + * signatures[0] = signature1; + * signers[1] = signer2; + * signatures[1] = signature2; + * + * // Encode the multi signature + * bytes memory signature = abi.encode(signers, signatures); + * ``` + * + * Requirements: + * + * * The `signature` must be encoded as `abi.encode(signers, signatures)`. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + if (signature.length == 0) return false; // For ERC-7739 compatibility + (bytes[] memory signers, bytes[] memory signatures) = abi.decode(signature, (bytes[], bytes[])); + return _validateThreshold(signers) && _validateSignatures(hash, signers, signatures); + } + + /** + * @dev Validates the signatures using the signers and their corresponding signatures. + * Returns whether the signers are authorized and the signatures are valid for the given hash. + * + * IMPORTANT: Sorting the signers by their `keccak256` hash will improve the gas efficiency of this function. + * See {SignatureChecker-areValidSignaturesNow-bytes32-bytes[]-bytes[]} for more details. + * + * Requirements: + * + * * The `signatures` and `signers` arrays must be equal in length. Returns false otherwise. + */ + function _validateSignatures( + bytes32 hash, + bytes[] memory signers, + bytes[] memory signatures + ) internal view virtual returns (bool valid) { + for (uint256 i = 0; i < signers.length; ++i) { + if (!isSigner(signers[i])) { + return false; + } + } + return hash.areValidSignaturesNow(signers, signatures); + } + + /** + * @dev Validates that the number of signers meets the {threshold} requirement. + * Assumes the signers were already validated. See {_validateSignatures} for more details. + */ + function _validateThreshold(bytes[] memory validatingSigners) internal view virtual returns (bool) { + return validatingSigners.length >= threshold(); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913Weighted.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913Weighted.sol new file mode 100644 index 00000000..653272f9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/MultiSignerERC7913Weighted.sol @@ -0,0 +1,208 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/MultiSignerERC7913Weighted.sol) + +pragma solidity ^0.8.26; + +import {SafeCast} from "../../math/SafeCast.sol"; +import {MultiSignerERC7913} from "./MultiSignerERC7913.sol"; + +/** + * @dev Extension of {MultiSignerERC7913} that supports weighted signatures. + * + * This contract allows assigning different weights to each signer, enabling more + * flexible governance schemes. For example, some signers could have higher weight + * than others, allowing for weighted voting or prioritized authorization. + * + * Example of usage: + * + * ```solidity + * contract MyWeightedMultiSignerAccount is Account, MultiSignerERC7913Weighted, Initializable { + * function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold) public initializer { + * _addSigners(signers); + * _setSignerWeights(signers, weights); + * _setThreshold(threshold); + * } + * + * function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf { + * _addSigners(signers); + * } + * + * function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf { + * _removeSigners(signers); + * } + * + * function setThreshold(uint64 threshold) public onlyEntryPointOrSelf { + * _setThreshold(threshold); + * } + * + * function setSignerWeights(bytes[] memory signers, uint64[] memory weights) public onlyEntryPointOrSelf { + * _setSignerWeights(signers, weights); + * } + * } + * ``` + * + * IMPORTANT: When setting a threshold value, ensure it matches the scale used for signer weights. + * For example, if signers have weights like 1, 2, or 3, then a threshold of 4 would require at + * least two signers (e.g., one with weight 1 and one with weight 3). See {signerWeight}. + */ +abstract contract MultiSignerERC7913Weighted is MultiSignerERC7913 { + using SafeCast for *; + + // Sum of all the extra weights of all signers. Storage packed with `MultiSignerERC7913._threshold` + uint64 private _totalExtraWeight; + + // Mapping from signer to extraWeight (in addition to all authorized signers having weight 1) + mapping(bytes signer => uint64) private _extraWeights; + + /** + * @dev Emitted when a signer's weight is changed. + * + * NOTE: Not emitted in {_addSigners} or {_removeSigners}. Indexers must rely on {ERC7913SignerAdded} + * and {ERC7913SignerRemoved} to index a default weight of 1. See {signerWeight}. + */ + event ERC7913SignerWeightChanged(bytes indexed signer, uint64 weight); + + /// @dev Thrown when a signer's weight is invalid. + error MultiSignerERC7913WeightedInvalidWeight(bytes signer, uint64 weight); + + /// @dev Thrown when the arrays lengths don't match. See {_setSignerWeights}. + error MultiSignerERC7913WeightedMismatchedLength(); + + constructor(bytes[] memory signers_, uint64[] memory weights_, uint64 threshold_) MultiSignerERC7913(signers_, 1) { + _setSignerWeights(signers_, weights_); + _setThreshold(threshold_); + } + + /// @dev Gets the weight of a signer. Returns 0 if the signer is not authorized. + function signerWeight(bytes memory signer) public view virtual returns (uint64) { + unchecked { + // Safe cast, _setSignerWeights guarantees 1+_extraWeights is a uint64 + return uint64(isSigner(signer).toUint() * (1 + _extraWeights[signer])); + } + } + + /// @dev Gets the total weight of all signers. + function totalWeight() public view virtual returns (uint64) { + return (getSignerCount() + _totalExtraWeight).toUint64(); + } + + /** + * @dev Sets weights for multiple signers at once. Internal version without access control. + * + * Requirements: + * + * * `signers` and `weights` arrays must have the same length. Reverts with {MultiSignerERC7913WeightedMismatchedLength} on mismatch. + * * Each signer must exist in the set of authorized signers. Otherwise reverts with {MultiSignerERC7913NonexistentSigner} + * * Each weight must be greater than 0. Otherwise reverts with {MultiSignerERC7913WeightedInvalidWeight} + * * See {_validateReachableThreshold} for the threshold validation. + * + * Emits {ERC7913SignerWeightChanged} for each signer. + */ + function _setSignerWeights(bytes[] memory signers, uint64[] memory weights) internal virtual { + require(signers.length == weights.length, MultiSignerERC7913WeightedMismatchedLength()); + + uint256 extraWeightAdded = 0; + uint256 extraWeightRemoved = 0; + for (uint256 i = 0; i < signers.length; ++i) { + bytes memory signer = signers[i]; + require(isSigner(signer), MultiSignerERC7913NonexistentSigner(signer)); + + uint64 weight = weights[i]; + require(weight > 0, MultiSignerERC7913WeightedInvalidWeight(signer, weight)); + + unchecked { + uint64 oldExtraWeight = _extraWeights[signer]; + uint64 newExtraWeight = weight - 1; + + if (oldExtraWeight != newExtraWeight) { + // Overflow impossible: weight values are bounded by uint64 and economic constraints + extraWeightRemoved += oldExtraWeight; + extraWeightAdded += _extraWeights[signer] = newExtraWeight; + emit ERC7913SignerWeightChanged(signer, weight); + } + } + } + unchecked { + // Safe from underflow: `extraWeightRemoved` is bounded by `_totalExtraWeight` by construction + // and weight values are bounded by uint64 and economic constraints + _totalExtraWeight = (uint256(_totalExtraWeight) + extraWeightAdded - extraWeightRemoved).toUint64(); + } + _validateReachableThreshold(); + } + + /** + * @dev See {MultiSignerERC7913-_addSigners}. + * + * In cases where {totalWeight} is almost `type(uint64).max` (due to a large `_totalExtraWeight`), adding new + * signers could cause the {totalWeight} computation to overflow. Adding a {totalWeight} calls after the new + * signers are added ensures no such overflow happens. + */ + function _addSigners(bytes[] memory newSigners) internal virtual override { + super._addSigners(newSigners); + + // This will revert if the new signers cause an overflow + _validateReachableThreshold(); + } + + /** + * @dev See {MultiSignerERC7913-_removeSigners}. + * + * Just like {_addSigners}, this function does not emit {ERC7913SignerWeightChanged} events. The + * {ERC7913SignerRemoved} event emitted by {MultiSignerERC7913-_removeSigners} is enough to track weights here. + */ + function _removeSigners(bytes[] memory signers) internal virtual override { + // Clean up weights for removed signers + // + // The `extraWeightRemoved` is bounded by `_totalExtraWeight`. The `super._removeSigners` function will revert + // if the signers array contains any duplicates, ensuring each signer's weight is only counted once. Since + // `_totalExtraWeight` is stored as a `uint64`, the final subtraction operation is also safe. + unchecked { + uint64 extraWeightRemoved = 0; + for (uint256 i = 0; i < signers.length; ++i) { + bytes memory signer = signers[i]; + + extraWeightRemoved += _extraWeights[signer]; + delete _extraWeights[signer]; + } + _totalExtraWeight -= extraWeightRemoved; + } + super._removeSigners(signers); + } + + /** + * @dev Sets the threshold for the multisignature operation. Internal version without access control. + * + * Requirements: + * + * * The {totalWeight} must be `>=` the {threshold}. Otherwise reverts with {MultiSignerERC7913UnreachableThreshold} + * + * NOTE: This function intentionally does not call `super._validateReachableThreshold` because the base implementation + * assumes each signer has a weight of 1, which is a subset of this weighted implementation. Consider that multiple + * implementations of this function may exist in the contract, so important side effects may be missed + * depending on the linearization order. + */ + function _validateReachableThreshold() internal view virtual override { + uint64 weight = totalWeight(); + uint64 currentThreshold = threshold(); + require(weight >= currentThreshold, MultiSignerERC7913UnreachableThreshold(weight, currentThreshold)); + } + + /** + * @dev Validates that the total weight of signers meets the threshold requirement. + * + * NOTE: This function intentionally does not call `super._validateThreshold` because the base implementation + * assumes each signer has a weight of 1, which is a subset of this weighted implementation. Consider that multiple + * implementations of this function may exist in the contract, so important side effects may be missed + * depending on the linearization order. + */ + function _validateThreshold(bytes[] memory signers) internal view virtual override returns (bool) { + unchecked { + uint64 weight = 0; + for (uint256 i = 0; i < signers.length; ++i) { + // Overflow impossible: weight values are bounded by uint64 and economic constraints + weight += signerWeight(signers[i]); + } + return weight >= threshold(); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerECDSA.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerECDSA.sol new file mode 100644 index 00000000..69a62216 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerECDSA.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/signers/SignerECDSA.sol) + +pragma solidity ^0.8.20; + +import {AbstractSigner} from "./AbstractSigner.sol"; +import {ECDSA} from "../ECDSA.sol"; + +/** + * @dev Implementation of {AbstractSigner} using xref:api:utils/cryptography#ECDSA[ECDSA] signatures. + * + * For {Account} usage, a {_setSigner} function is provided to set the {signer} address. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * Example of usage: + * + * ```solidity + * contract MyAccountECDSA is Account, SignerECDSA, Initializable { + * function initialize(address signerAddr) public initializer { + * _setSigner(signerAddr); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerECDSA is AbstractSigner { + address private _signer; + + constructor(address signerAddr) { + _setSigner(signerAddr); + } + + /** + * @dev Sets the signer with the address of the native signer. This function should be called during construction + * or through an initializer. + */ + function _setSigner(address signerAddr) internal { + _signer = signerAddr; + } + + /// @dev Return the signer's address. + function signer() public view virtual returns (address) { + return _signer; + } + + /// @inheritdoc AbstractSigner + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecoverCalldata(hash, signature); + return signer() == recovered && err == ECDSA.RecoverError.NoError; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerEIP7702.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerEIP7702.sol new file mode 100644 index 00000000..10d199f0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerEIP7702.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/signers/SignerEIP7702.sol) + +pragma solidity ^0.8.20; + +import {AbstractSigner} from "./AbstractSigner.sol"; +import {ECDSA} from "../ECDSA.sol"; + +/** + * @dev Implementation of {AbstractSigner} for implementation for an EOA. Useful for EIP-7702 accounts. + * + * @custom:stateless + */ +abstract contract SignerEIP7702 is AbstractSigner { + /** + * @dev Validates the signature using the EOA's address (i.e. `address(this)`). + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecoverCalldata(hash, signature); + return address(this) == recovered && err == ECDSA.RecoverError.NoError; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerERC7913.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerERC7913.sol new file mode 100644 index 00000000..d0f567a3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerERC7913.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerERC7913.sol) + +pragma solidity ^0.8.24; + +import {AbstractSigner} from "./AbstractSigner.sol"; +import {SignatureChecker} from "../SignatureChecker.sol"; + +/** + * @dev Implementation of {AbstractSigner} using + * https://eips.ethereum.org/EIPS/eip-7913[ERC-7913] signature verification. + * + * For {Account} usage, a {_setSigner} function is provided to set the ERC-7913 formatted {signer}. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * The signer is a `bytes` object that concatenates a verifier address and a key: `verifier || key`. + * + * Example of usage: + * + * ```solidity + * contract MyAccountERC7913 is Account, SignerERC7913, Initializable { + * function initialize(bytes memory signer_) public initializer { + * _setSigner(signer_); + * } + * + * function setSigner(bytes memory signer_) public onlyEntryPointOrSelf { + * _setSigner(signer_); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ + +abstract contract SignerERC7913 is AbstractSigner { + bytes private _signer; + + constructor(bytes memory signer_) { + _setSigner(signer_); + } + + /// @dev Return the ERC-7913 signer (i.e. `verifier || key`). + function signer() public view virtual returns (bytes memory) { + return _signer; + } + + /// @dev Sets the signer (i.e. `verifier || key`) with an ERC-7913 formatted signer. + function _setSigner(bytes memory signer_) internal { + _signer = signer_; + } + + /** + * @dev Verifies a signature using {SignatureChecker-isValidSignatureNow-bytes-bytes32-bytes-} + * with {signer}, `hash` and `signature`. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + return SignatureChecker.isValidSignatureNow(signer(), hash, signature); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerP256.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerP256.sol new file mode 100644 index 00000000..131b5c1f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerP256.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerP256.sol) + +pragma solidity ^0.8.20; + +import {AbstractSigner} from "./AbstractSigner.sol"; +import {P256} from "../P256.sol"; + +/** + * @dev Implementation of {AbstractSigner} using xref:api:utils/cryptography#P256[P256] signatures. + * + * For {Account} usage, a {_setSigner} function is provided to set the {signer} public key. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * Example of usage: + * + * ```solidity + * contract MyAccountP256 is Account, SignerP256, Initializable { + * function initialize(bytes32 qx, bytes32 qy) public initializer { + * _setSigner(qx, qy); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerP256 is AbstractSigner { + bytes32 private _qx; + bytes32 private _qy; + + error SignerP256InvalidPublicKey(bytes32 qx, bytes32 qy); + + constructor(bytes32 qx, bytes32 qy) { + _setSigner(qx, qy); + } + + /** + * @dev Sets the signer with a P256 public key. This function should be called during construction + * or through an initializer. + */ + function _setSigner(bytes32 qx, bytes32 qy) internal { + if (!P256.isValidPublicKey(qx, qy)) revert SignerP256InvalidPublicKey(qx, qy); + _qx = qx; + _qy = qy; + } + + /// @dev Return the signer's P256 public key. + function signer() public view virtual returns (bytes32 qx, bytes32 qy) { + return (_qx, _qy); + } + + /// @inheritdoc AbstractSigner + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + if (signature.length < 0x40) return false; + bytes32 r = bytes32(signature[0x00:0x20]); + bytes32 s = bytes32(signature[0x20:0x40]); + (bytes32 qx, bytes32 qy) = signer(); + return P256.verify(hash, r, s, qx, qy); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerRSA.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerRSA.sol new file mode 100644 index 00000000..7ca18ead --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerRSA.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerRSA.sol) + +pragma solidity ^0.8.20; + +import {AbstractSigner} from "./AbstractSigner.sol"; +import {RSA} from "../RSA.sol"; + +/** + * @dev Implementation of {AbstractSigner} using xref:api:utils/cryptography#RSA[RSA] signatures. + * + * For {Account} usage, a {_setSigner} function is provided to set the {signer} public key. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * Example of usage: + * + * ```solidity + * contract MyAccountRSA is Account, SignerRSA, Initializable { + * function initialize(bytes memory e, bytes memory n) public initializer { + * _setSigner(e, n); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerRSA is AbstractSigner { + bytes private _e; + bytes private _n; + + constructor(bytes memory e, bytes memory n) { + _setSigner(e, n); + } + + /** + * @dev Sets the signer with a RSA public key. This function should be called during construction + * or through an initializer. + */ + function _setSigner(bytes memory e, bytes memory n) internal { + _e = e; + _n = n; + } + + /// @dev Return the signer's RSA public key. + function signer() public view virtual returns (bytes memory e, bytes memory n) { + return (_e, _n); + } + + /** + * @dev See {AbstractSigner-_rawSignatureValidation}. Verifies a PKCSv1.5 signature by calling + * xref:api:utils/cryptography.adoc#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-[RSA.pkcs1Sha256]. + * + * IMPORTANT: Following the RSASSA-PKCS1-V1_5-VERIFY procedure outlined in RFC8017 (section 8.2.2), the + * provided `hash` is used as the `M` (message) and rehashed using SHA256 according to EMSA-PKCS1-v1_5 + * encoding as per section 9.2 (step 1) of the RFC. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + (bytes memory e, bytes memory n) = signer(); + return RSA.pkcs1Sha256(abi.encodePacked(hash), signature, e, n); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerWebAuthn.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerWebAuthn.sol new file mode 100644 index 00000000..0367c55a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/SignerWebAuthn.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/signers/SignerWebAuthn.sol) + +pragma solidity ^0.8.24; + +import {SignerP256} from "./SignerP256.sol"; +import {WebAuthn} from "../WebAuthn.sol"; + +/** + * @dev Implementation of {SignerP256} that supports WebAuthn authentication assertions. + * + * This contract enables signature validation using WebAuthn authentication assertions, + * leveraging the P256 public key stored in the contract. It allows for both WebAuthn + * and raw P256 signature validation, providing compatibility with both signature types. + * + * The signature is expected to be an abi-encoded {WebAuthn-WebAuthnAuth} struct. + * + * Example usage: + * + * ```solidity + * contract MyAccountWebAuthn is Account, SignerWebAuthn, Initializable { + * function initialize(bytes32 qx, bytes32 qy) public initializer { + * _setSigner(qx, qy); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerWebAuthn is SignerP256 { + /** + * @dev Validates a raw signature using the WebAuthn authentication assertion. + * + * Returns `false` if the signature is not a valid WebAuthn authentication assertion. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + (bool decodeSuccess, WebAuthn.WebAuthnAuth calldata auth) = WebAuthn.tryDecodeAuth(signature); + if (!decodeSuccess) return false; + (bytes32 qx, bytes32 qy) = signer(); + return WebAuthn.verify(abi.encodePacked(hash), auth, qx, qy); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/draft-ERC7739.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/draft-ERC7739.sol new file mode 100644 index 00000000..45524646 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/signers/draft-ERC7739.sol @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/signers/draft-ERC7739.sol) + +pragma solidity ^0.8.24; + +import {AbstractSigner} from "./AbstractSigner.sol"; +import {EIP712} from "../EIP712.sol"; +import {ERC7739Utils} from "../draft-ERC7739Utils.sol"; +import {IERC1271} from "../../../interfaces/IERC1271.sol"; +import {MessageHashUtils} from "../MessageHashUtils.sol"; + +/** + * @dev Validates signatures wrapping the message hash in a nested EIP712 type. See {ERC7739Utils}. + * + * Linking the signature to the EIP-712 domain separator is a security measure to prevent signature replay across different + * EIP-712 domains (e.g. a single offchain owner of multiple contracts). + * + * This contract requires implementing the {_rawSignatureValidation} function, which passes the wrapped message hash, + * which may be either an typed data or a personal sign nested type. + * + * NOTE: xref:api:utils/cryptography#EIP712[EIP-712] uses xref:api:utils/cryptography#ShortStrings[ShortStrings] to + * optimize gas costs for short strings (up to 31 characters). Consider that strings longer than that will use storage, + * which may limit the ability of the signer to be used within the ERC-4337 validation phase (due to + * https://eips.ethereum.org/EIPS/eip-7562#storage-rules[ERC-7562 storage access rules]). + */ +abstract contract ERC7739 is AbstractSigner, EIP712, IERC1271 { + using ERC7739Utils for *; + using MessageHashUtils for bytes32; + + /** + * @dev Attempts validating the signature in a nested EIP-712 type. + * + * A nested EIP-712 type might be presented in 2 different ways: + * + * - As a nested EIP-712 typed data + * - As a _personal_ signature (an EIP-712 mimic of the `eth_personalSign` for a smart contract) + */ + function isValidSignature(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4 result) { + // For the hash `0x7739773977397739773977397739773977397739773977397739773977397739` and an empty signature, + // we return the magic value `0x77390001` as it's assumed impossible to find a preimage for it that can be used + // maliciously. Useful for simulation purposes and to validate whether the contract supports ERC-7739. + return + (_isValidNestedTypedDataSignature(hash, signature) || _isValidNestedPersonalSignSignature(hash, signature)) + ? IERC1271.isValidSignature.selector + : (hash == 0x7739773977397739773977397739773977397739773977397739773977397739 && signature.length == 0) + ? bytes4(0x77390001) + : bytes4(0xffffffff); + } + + /** + * @dev Nested personal signature verification. + */ + function _isValidNestedPersonalSignSignature(bytes32 hash, bytes calldata signature) private view returns (bool) { + return _rawSignatureValidation(_domainSeparatorV4().toTypedDataHash(hash.personalSignStructHash()), signature); + } + + /** + * @dev Nested EIP-712 typed data verification. + */ + function _isValidNestedTypedDataSignature( + bytes32 hash, + bytes calldata encodedSignature + ) private view returns (bool) { + // decode signature + ( + bytes calldata signature, + bytes32 appSeparator, + bytes32 contentsHash, + string calldata contentsDescr + ) = encodedSignature.decodeTypedDataSig(); + + ( + , + string memory name, + string memory version, + uint256 chainId, + address verifyingContract, + bytes32 salt, + + ) = eip712Domain(); + + // Check that contentHash and separator are correct + // Rebuild nested hash + return + hash == appSeparator.toTypedDataHash(contentsHash) && + bytes(contentsDescr).length != 0 && + _rawSignatureValidation( + appSeparator.toTypedDataHash( + ERC7739Utils.typedDataSignStructHash( + contentsDescr, + contentsHash, + abi.encode(keccak256(bytes(name)), keccak256(bytes(version)), chainId, verifyingContract, salt) + ) + ), + signature + ); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913P256Verifier.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913P256Verifier.sol new file mode 100644 index 00000000..bd37d642 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913P256Verifier.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/verifiers/ERC7913P256Verifier.sol) + +pragma solidity ^0.8.20; + +import {P256} from "../P256.sol"; +import {IERC7913SignatureVerifier} from "../../../interfaces/IERC7913.sol"; + +/** + * @dev ERC-7913 signature verifier that support P256 (secp256r1) keys. + * + * @custom:stateless + */ +contract ERC7913P256Verifier is IERC7913SignatureVerifier { + /// @inheritdoc IERC7913SignatureVerifier + function verify(bytes calldata key, bytes32 hash, bytes calldata signature) public view virtual returns (bytes4) { + // Signature length may be 0x40 or 0x41. + if (key.length == 0x40 && signature.length >= 0x40) { + bytes32 qx = bytes32(key[0x00:0x20]); + bytes32 qy = bytes32(key[0x20:0x40]); + bytes32 r = bytes32(signature[0x00:0x20]); + bytes32 s = bytes32(signature[0x20:0x40]); + if (P256.verify(hash, r, s, qx, qy)) { + return IERC7913SignatureVerifier.verify.selector; + } + } + return 0xFFFFFFFF; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913RSAVerifier.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913RSAVerifier.sol new file mode 100644 index 00000000..815958eb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913RSAVerifier.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/verifiers/ERC7913RSAVerifier.sol) + +pragma solidity ^0.8.20; + +import {RSA} from "../RSA.sol"; +import {IERC7913SignatureVerifier} from "../../../interfaces/IERC7913.sol"; + +/** + * @dev ERC-7913 signature verifier that support RSA keys. + * + * @custom:stateless + */ +contract ERC7913RSAVerifier is IERC7913SignatureVerifier { + /// @inheritdoc IERC7913SignatureVerifier + function verify(bytes calldata key, bytes32 hash, bytes calldata signature) public view virtual returns (bytes4) { + (bytes memory e, bytes memory n) = abi.decode(key, (bytes, bytes)); + return + RSA.pkcs1Sha256(abi.encodePacked(hash), signature, e, n) + ? IERC7913SignatureVerifier.verify.selector + : bytes4(0xFFFFFFFF); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol new file mode 100644 index 00000000..3ae3c959 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol) + +pragma solidity ^0.8.24; + +import {WebAuthn} from "../WebAuthn.sol"; +import {IERC7913SignatureVerifier} from "../../../interfaces/IERC7913.sol"; + +/** + * @dev ERC-7913 signature verifier that supports WebAuthn authentication assertions. + * + * This verifier enables the validation of WebAuthn signatures using P256 public keys. + * The key is expected to be a 64-byte concatenation of the P256 public key coordinates (qx || qy). + * The signature is expected to be an abi-encoded {WebAuthn-WebAuthnAuth} struct. + * + * Uses {WebAuthn-verify} for signature verification, which performs the essential + * WebAuthn checks: type validation, challenge matching, and cryptographic signature verification. + * + * NOTE: Wallets that may require default P256 validation may install a P256 verifier separately. + * + * @custom:stateless + */ +contract ERC7913WebAuthnVerifier is IERC7913SignatureVerifier { + /// @inheritdoc IERC7913SignatureVerifier + function verify(bytes calldata key, bytes32 hash, bytes calldata signature) public view virtual returns (bytes4) { + (bool decodeSuccess, WebAuthn.WebAuthnAuth calldata auth) = WebAuthn.tryDecodeAuth(signature); + + return + decodeSuccess && + key.length == 0x40 && + WebAuthn.verify(abi.encodePacked(hash), auth, bytes32(key[0x00:0x20]), bytes32(key[0x20:0x40])) + ? IERC7913SignatureVerifier.verify.selector + : bytes4(0xFFFFFFFF); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/draft-InteroperableAddress.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/draft-InteroperableAddress.sol new file mode 100644 index 00000000..10b4e426 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/draft-InteroperableAddress.sol @@ -0,0 +1,245 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.1) (utils/draft-InteroperableAddress.sol) + +pragma solidity ^0.8.26; + +import {Math} from "./math/Math.sol"; +import {SafeCast} from "./math/SafeCast.sol"; +import {Bytes} from "./Bytes.sol"; +import {Calldata} from "./Calldata.sol"; + +/** + * @dev Helper library to format and parse https://ethereum-magicians.org/t/erc-7930-interoperable-addresses/23365[ERC-7930] interoperable + * addresses. + */ +library InteroperableAddress { + using SafeCast for uint256; + using Bytes for bytes; + + error InteroperableAddressParsingError(bytes); + error InteroperableAddressEmptyReferenceAndAddress(); + + /** + * @dev Format an ERC-7930 interoperable address (version 1) from its components `chainType`, `chainReference` + * and `addr`. This is a generic function that supports any chain type, chain reference and address supported by + * ERC-7930, including interoperable addresses with empty chain reference or empty address. + */ + function formatV1( + bytes2 chainType, + bytes memory chainReference, + bytes memory addr + ) internal pure returns (bytes memory) { + require(chainReference.length > 0 || addr.length > 0, InteroperableAddressEmptyReferenceAndAddress()); + return + abi.encodePacked( + bytes2(0x0001), + chainType, + chainReference.length.toUint8(), + chainReference, + addr.length.toUint8(), + addr + ); + } + + /** + * @dev Variant of {formatV1-bytes2-bytes-bytes-} specific to EVM chains. Returns the ERC-7930 interoperable + * address (version 1) for a given chainid and ethereum address. + */ + function formatEvmV1(uint256 chainid, address addr) internal pure returns (bytes memory) { + bytes memory chainReference = _toChainReference(chainid); + return abi.encodePacked(bytes4(0x00010000), uint8(chainReference.length), chainReference, uint8(20), addr); + } + + /** + * @dev Variant of {formatV1-bytes2-bytes-bytes-} that specifies an EVM chain without an address. + */ + function formatEvmV1(uint256 chainid) internal pure returns (bytes memory) { + bytes memory chainReference = _toChainReference(chainid); + return abi.encodePacked(bytes4(0x00010000), uint8(chainReference.length), chainReference, uint8(0)); + } + + /** + * @dev Variant of {formatV1-bytes2-bytes-bytes-} that specifies an EVM address without a chain reference. + */ + function formatEvmV1(address addr) internal pure returns (bytes memory) { + return abi.encodePacked(bytes6(0x000100000014), addr); + } + + /** + * @dev Parse a ERC-7930 interoperable address (version 1) into its different components. Reverts if the input is + * not following a version 1 of ERC-7930. + * + * NOTE: Trailing bytes after a valid v1 encoding are ignored. The same decoded address may therefore correspond + * to multiple distinct input byte strings. + */ + function parseV1( + bytes memory self + ) internal pure returns (bytes2 chainType, bytes memory chainReference, bytes memory addr) { + bool success; + (success, chainType, chainReference, addr) = tryParseV1(self); + require(success, InteroperableAddressParsingError(self)); + } + + /** + * @dev Variant of {parseV1} that handles calldata slices to reduce memory copy costs. + */ + function parseV1Calldata( + bytes calldata self + ) internal pure returns (bytes2 chainType, bytes calldata chainReference, bytes calldata addr) { + bool success; + (success, chainType, chainReference, addr) = tryParseV1Calldata(self); + require(success, InteroperableAddressParsingError(self)); + } + + /** + * @dev Variant of {parseV1} that does not revert on invalid input. Instead, it returns `false` as the first + * return value to indicate parsing failure when the input does not follow version 1 of ERC-7930. + */ + function tryParseV1( + bytes memory self + ) internal pure returns (bool success, bytes2 chainType, bytes memory chainReference, bytes memory addr) { + unchecked { + if (self.length < 0x06) return (false, 0x0000, _emptyBytesMemory(), _emptyBytesMemory()); + + bytes2 version = _readBytes2(self, 0x00); + if (version != bytes2(0x0001)) return (false, 0x0000, _emptyBytesMemory(), _emptyBytesMemory()); + + uint256 chainReferenceLength = uint8(self[0x04]); + if (self.length < 0x06 + chainReferenceLength) + return (false, 0x0000, _emptyBytesMemory(), _emptyBytesMemory()); + chainReference = self.slice(0x05, 0x05 + chainReferenceLength); + + uint256 addrLength = uint8(self[0x05 + chainReferenceLength]); + if (self.length < 0x06 + chainReferenceLength + addrLength) + return (false, 0x0000, _emptyBytesMemory(), _emptyBytesMemory()); + addr = self.slice(0x06 + chainReferenceLength, 0x06 + chainReferenceLength + addrLength); + + // At least one of chainReference or addr must be non-empty + success = (chainReferenceLength > 0) || (addrLength > 0); + chainType = success ? _readBytes2(self, 0x02) : bytes2(0); + } + } + + /** + * @dev Variant of {tryParseV1} that handles calldata slices to reduce memory copy costs. + */ + function tryParseV1Calldata( + bytes calldata self + ) internal pure returns (bool success, bytes2 chainType, bytes calldata chainReference, bytes calldata addr) { + unchecked { + if (self.length < 0x06) return (false, 0x0000, Calldata.emptyBytes(), Calldata.emptyBytes()); + + bytes2 version = _readBytes2Calldata(self, 0x00); + if (version != bytes2(0x0001)) return (false, 0x0000, Calldata.emptyBytes(), Calldata.emptyBytes()); + + uint256 chainReferenceLength = uint8(self[0x04]); + if (self.length < 0x06 + chainReferenceLength) + return (false, 0x0000, Calldata.emptyBytes(), Calldata.emptyBytes()); + chainReference = self[0x05:0x05 + chainReferenceLength]; + + uint256 addrLength = uint8(self[0x05 + chainReferenceLength]); + if (self.length < 0x06 + chainReferenceLength + addrLength) + return (false, 0x0000, Calldata.emptyBytes(), Calldata.emptyBytes()); + addr = self[0x06 + chainReferenceLength:0x06 + chainReferenceLength + addrLength]; + + // At least one of chainReference or addr must be non-empty + success = (chainReferenceLength > 0) || (addrLength > 0); + chainType = success ? _readBytes2Calldata(self, 0x02) : bytes2(0); + } + } + + /** + * @dev Parse a ERC-7930 interoperable address (version 1) corresponding to an EIP-155 chain. The `chainId` and + * `addr` return values will be zero if the input doesn't include a chainReference or an address, respectively. + * + * NOTE: Trailing bytes after a valid v1 encoding are ignored. The same decoded (chainId, addr) may therefore + * correspond to multiple distinct input byte strings. + * + * Requirements: + * + * * The input must be a valid ERC-7930 interoperable address (version 1) + * * The underlying chainType must be "eip-155" + */ + function parseEvmV1(bytes memory self) internal pure returns (uint256 chainId, address addr) { + bool success; + (success, chainId, addr) = tryParseEvmV1(self); + require(success, InteroperableAddressParsingError(self)); + } + + /** + * @dev Variant of {parseEvmV1} that handles calldata slices to reduce memory copy costs. + */ + function parseEvmV1Calldata(bytes calldata self) internal pure returns (uint256 chainId, address addr) { + bool success; + (success, chainId, addr) = tryParseEvmV1Calldata(self); + require(success, InteroperableAddressParsingError(self)); + } + + /** + * @dev Variant of {parseEvmV1} that does not revert on invalid input. Instead, it returns `false` as the first + * return value to indicate parsing failure when the input does not follow version 1 of ERC-7930. + */ + function tryParseEvmV1(bytes memory self) internal pure returns (bool success, uint256 chainId, address addr) { + (bool success_, bytes2 chainType_, bytes memory chainReference_, bytes memory addr_) = tryParseV1(self); + return + (success_ && + chainType_ == 0x0000 && + chainReference_.length < 33 && + (addr_.length == 0 || addr_.length == 20)) + ? ( + true, + uint256(bytes32(chainReference_)) >> (256 - 8 * chainReference_.length), + address(bytes20(addr_)) + ) + : (false, 0, address(0)); + } + + /** + * @dev Variant of {tryParseEvmV1} that handles calldata slices to reduce memory copy costs. + */ + function tryParseEvmV1Calldata( + bytes calldata self + ) internal pure returns (bool success, uint256 chainId, address addr) { + (bool success_, bytes2 chainType_, bytes calldata chainReference_, bytes calldata addr_) = tryParseV1Calldata( + self + ); + return + (success_ && + chainType_ == 0x0000 && + chainReference_.length < 33 && + (addr_.length == 0 || addr_.length == 20)) + ? ( + true, + uint256(bytes32(chainReference_)) >> (256 - 8 * chainReference_.length), + address(bytes20(addr_)) + ) + : (false, 0, address(0)); + } + + function _toChainReference(uint256 chainid) private pure returns (bytes memory) { + unchecked { + // length fits in a uint8: log256(type(uint256).max) is 31 + uint256 length = Math.log256(chainid) + 1; + return abi.encodePacked(chainid).slice(32 - length); + } + } + + function _readBytes2(bytes memory buffer, uint256 offset) private pure returns (bytes2 value) { + // This is not memory safe in the general case, but all calls to this private function are within bounds. + assembly ("memory-safe") { + value := shl(240, shr(240, mload(add(add(buffer, 0x20), offset)))) + } + } + + function _readBytes2Calldata(bytes calldata buffer, uint256 offset) private pure returns (bytes2 value) { + assembly ("memory-safe") { + value := shl(240, shr(240, calldataload(add(buffer.offset, offset)))) + } + } + + function _emptyBytesMemory() private pure returns (bytes memory result) { + assembly ("memory-safe") { + result := 0x60 // mload(0x60) is always 0 + } + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/ERC165.sol similarity index 56% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/ERC165.sol index 3bf5613a..be4cc5a6 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/ERC165.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/ERC165.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./IERC165.sol"; +import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * - * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check + * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity @@ -16,14 +16,10 @@ import "./IERC165.sol"; * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` - * - * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Checker.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/ERC165Checker.sol similarity index 65% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Checker.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/ERC165Checker.sol index 4831b652..f2c5ab2e 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/ERC165Checker.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/ERC165Checker.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (utils/introspection/ERC165Checker.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./IERC165.sol"; +import {IERC165} from "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. @@ -13,18 +13,21 @@ import "./IERC165.sol"; * what to do in these cases. */ library ERC165Checker { - // As per the EIP-165 spec, no interface should ever match 0xffffffff - bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; + // As per the ERC-165 spec, no interface should ever match 0xffffffff + bytes4 private constant INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface. */ function supportsERC165(address account) internal view returns (bool) { - // Any contract that implements ERC165 must explicitly indicate support of + // Any contract that implements ERC-165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid - return - supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) && - !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); + if (supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId)) { + (bool success, bool supported) = _trySupportsInterface(account, INTERFACE_ID_INVALID); + return success && !supported; + } else { + return false; + } } /** @@ -34,7 +37,7 @@ library ERC165Checker { * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { - // query support of both ERC165 as per the spec and support of _interfaceId + // query support of both ERC-165 as per the spec and support of _interfaceId return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); } @@ -45,8 +48,6 @@ library ERC165Checker { * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. - * - * _Available since v3.4._ */ function getSupportedInterfaces( address account, @@ -55,7 +56,7 @@ library ERC165Checker { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); - // query support of ERC165 itself + // query support of ERC-165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { @@ -76,7 +77,7 @@ library ERC165Checker { * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { - // query support of ERC165 itself + // query support of ERC-165 itself if (!supportsERC165(account)) { return false; } @@ -93,12 +94,12 @@ library ERC165Checker { } /** - * @notice Query if a contract implements an interface, does not check ERC165 support + * @notice Query if a contract implements an interface, does not check ERC-165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise - * @dev Assumes that account contains a contract that supports ERC165, otherwise + * @dev Assumes that account contains a contract that supports ERC-165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * @@ -108,19 +109,34 @@ library ERC165Checker { * Interface identification is specified in ERC-165. */ function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { - // prepare call - bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); + (bool success, bool supported) = _trySupportsInterface(account, interfaceId); + return success && supported; + } - // perform static call - bool success; - uint256 returnSize; - uint256 returnValue; - assembly { - success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) - returnSize := returndatasize() - returnValue := mload(0x00) - } + /** + * @dev Attempts to call `supportsInterface` on a contract and returns both the call + * success status and the interface support result. + * + * This function performs a low-level static call to the contract's `supportsInterface` + * function. It returns: + * + * * `success`: true if the call didn't revert, false if it did + * * `supported`: true if the returned data indicating the interface is supported + */ + function _trySupportsInterface( + address account, + bytes4 interfaceId + ) private view returns (bool success, bool supported) { + bytes4 selector = IERC165.supportsInterface.selector; - return success && returnSize >= 0x20 && returnValue > 0; + assembly ("memory-safe") { + mstore(0x00, selector) + mstore(0x04, interfaceId) + success := staticcall(30000, account, 0x00, 0x24, 0x00, 0x20) + supported := and( + gt(returndatasize(), 0x1F), // we have at least 32 bytes of returndata + iszero(iszero(mload(0x00))) // the first 32 bytes of returndata are non-zero + ) + } } } diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC165.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/IERC165.sol similarity index 72% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC165.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/IERC165.sol index e8cdbdbf..be1932f2 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/introspection/IERC165.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/introspection/IERC165.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.4.16; /** - * @dev Interface of the ERC165 standard, as defined in the - * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * @dev Interface of the ERC-165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). @@ -16,7 +16,7 @@ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding - * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/math/Math.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/math/Math.sol new file mode 100644 index 00000000..e7288595 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/math/Math.sol @@ -0,0 +1,763 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/Math.sol) + +pragma solidity ^0.8.20; + +import {Panic} from "../Panic.sol"; +import {SafeCast} from "./SafeCast.sol"; + +/** + * @dev Standard math utilities missing in the Solidity language. + */ +library Math { + enum Rounding { + Floor, // Toward negative infinity + Ceil, // Toward positive infinity + Trunc, // Toward zero + Expand // Away from zero + } + + /** + * @dev Return the 512-bit addition of two uint256. + * + * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low. + */ + function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) { + assembly ("memory-safe") { + low := add(a, b) + high := lt(low, a) + } + } + + /** + * @dev Return the 512-bit multiplication of two uint256. + * + * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low. + */ + function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) { + // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use + // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 + // variables such that product = high * 2²⁵⁶ + low. + assembly ("memory-safe") { + let mm := mulmod(a, b, not(0)) + low := mul(a, b) + high := sub(sub(mm, low), lt(mm, low)) + } + } + + /** + * @dev Returns the addition of two unsigned integers, with a success flag (no overflow). + */ + function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { + unchecked { + uint256 c = a + b; + success = c >= a; + result = c * SafeCast.toUint(success); + } + } + + /** + * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow). + */ + function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { + unchecked { + uint256 c = a - b; + success = c <= a; + result = c * SafeCast.toUint(success); + } + } + + /** + * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow). + */ + function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { + unchecked { + uint256 c = a * b; + assembly ("memory-safe") { + // Only true when the multiplication doesn't overflow + // (c / a == b) || (a == 0) + success := or(eq(div(c, a), b), iszero(a)) + } + // equivalent to: success ? c : 0 + result = c * SafeCast.toUint(success); + } + } + + /** + * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). + */ + function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { + unchecked { + success = b > 0; + assembly ("memory-safe") { + // The `DIV` opcode returns zero when the denominator is 0. + result := div(a, b) + } + } + } + + /** + * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). + */ + function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { + unchecked { + success = b > 0; + assembly ("memory-safe") { + // The `MOD` opcode returns zero when the denominator is 0. + result := mod(a, b) + } + } + } + + /** + * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing. + */ + function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) { + (bool success, uint256 result) = tryAdd(a, b); + return ternary(success, result, type(uint256).max); + } + + /** + * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing. + */ + function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) { + (, uint256 result) = trySub(a, b); + return result; + } + + /** + * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing. + */ + function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) { + (bool success, uint256 result) = tryMul(a, b); + return ternary(success, result, type(uint256).max); + } + + /** + * @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant. + * + * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. + * However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute + * one branch when needed, making this function more expensive. + */ + function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) { + unchecked { + // branchless ternary works because: + // b ^ (a ^ b) == a + // b ^ 0 == b + return b ^ ((a ^ b) * SafeCast.toUint(condition)); + } + } + + /** + * @dev Returns the largest of two numbers. + */ + function max(uint256 a, uint256 b) internal pure returns (uint256) { + return ternary(a > b, a, b); + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(uint256 a, uint256 b) internal pure returns (uint256) { + return ternary(a < b, a, b); + } + + /** + * @dev Returns the average of two numbers. The result is rounded towards + * zero. + */ + function average(uint256 a, uint256 b) internal pure returns (uint256) { + unchecked { + // (a + b) / 2 can overflow. + return (a & b) + (a ^ b) / 2; + } + } + + /** + * @dev Returns the ceiling of the division of two numbers. + * + * This differs from standard division with `/` in that it rounds towards infinity instead + * of rounding towards zero. + */ + function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { + if (b == 0) { + // Guarantee the same behavior as in a regular Solidity division. + Panic.panic(Panic.DIVISION_BY_ZERO); + } + + // The following calculation ensures accurate ceiling division without overflow. + // Since a is non-zero, (a - 1) / b will not overflow. + // The largest possible result occurs when (a - 1) / b is type(uint256).max, + // but the largest value we can obtain is type(uint256).max - 1, which happens + // when a = type(uint256).max and b = 1. + unchecked { + return SafeCast.toUint(a > 0) * ((a - 1) / b + 1); + } + } + + /** + * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or + * denominator == 0. + * + * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by + * Uniswap Labs also under MIT license. + */ + function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { + unchecked { + (uint256 high, uint256 low) = mul512(x, y); + + // Handle non-overflow cases, 256 by 256 division. + if (high == 0) { + // Solidity will revert if denominator == 0, unlike the div opcode on its own. + // The surrounding unchecked block does not change this fact. + // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. + return low / denominator; + } + + // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0. + if (denominator <= high) { + Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW)); + } + + /////////////////////////////////////////////// + // 512 by 256 division. + /////////////////////////////////////////////// + + // Make division exact by subtracting the remainder from [high low]. + uint256 remainder; + assembly ("memory-safe") { + // Compute remainder using mulmod. + remainder := mulmod(x, y, denominator) + + // Subtract 256 bit number from 512 bit number. + high := sub(high, gt(remainder, low)) + low := sub(low, remainder) + } + + // Factor powers of two out of denominator and compute largest power of two divisor of denominator. + // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. + + uint256 twos = denominator & (0 - denominator); + assembly ("memory-safe") { + // Divide denominator by twos. + denominator := div(denominator, twos) + + // Divide [high low] by twos. + low := div(low, twos) + + // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one. + twos := add(div(sub(0, twos), twos), 1) + } + + // Shift in bits from high into low. + low |= high * twos; + + // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such + // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for + // four bits. That is, denominator * inv ≡ 1 mod 2⁴. + uint256 inverse = (3 * denominator) ^ 2; + + // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also + // works in modular arithmetic, doubling the correct bits in each step. + inverse *= 2 - denominator * inverse; // inverse mod 2⁸ + inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶ + inverse *= 2 - denominator * inverse; // inverse mod 2³² + inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴ + inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸ + inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶ + + // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. + // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is + // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high + // is no longer required. + result = low * inverse; + return result; + } + } + + /** + * @dev Calculates x * y / denominator with full precision, following the selected rounding direction. + */ + function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { + return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0); + } + + /** + * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256. + */ + function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) { + unchecked { + (uint256 high, uint256 low) = mul512(x, y); + if (high >= 1 << n) { + Panic.panic(Panic.UNDER_OVERFLOW); + } + return (high << (256 - n)) | (low >> n); + } + } + + /** + * @dev Calculates x * y >> n with full precision, following the selected rounding direction. + */ + function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) { + return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0); + } + + /** + * @dev Calculate the modular multiplicative inverse of a number in Z/nZ. + * + * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0. + * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible. + * + * If the input value is not inversible, 0 is returned. + * + * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the + * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}. + */ + function invMod(uint256 a, uint256 n) internal pure returns (uint256) { + unchecked { + if (n == 0) return 0; + + // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version) + // Used to compute integers x and y such that: ax + ny = gcd(a, n). + // When the gcd is 1, then the inverse of a modulo n exists and it's x. + // ax + ny = 1 + // ax = 1 + (-y)n + // ax ≡ 1 (mod n) # x is the inverse of a modulo n + + // If the remainder is 0 the gcd is n right away. + uint256 remainder = a % n; + uint256 gcd = n; + + // Therefore the initial coefficients are: + // ax + ny = gcd(a, n) = n + // 0a + 1n = n + int256 x = 0; + int256 y = 1; + + while (remainder != 0) { + uint256 quotient = gcd / remainder; + + (gcd, remainder) = ( + // The old remainder is the next gcd to try. + remainder, + // Compute the next remainder. + // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd + // where gcd is at most n (capped to type(uint256).max) + gcd - remainder * quotient + ); + + (x, y) = ( + // Increment the coefficient of a. + y, + // Decrement the coefficient of n. + // Can overflow, but the result is casted to uint256 so that the + // next value of y is "wrapped around" to a value between 0 and n - 1. + x - y * int256(quotient) + ); + } + + if (gcd != 1) return 0; // No inverse exists. + return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative. + } + } + + /** + * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`. + * + * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is + * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that + * `a**(p-2)` is the modular multiplicative inverse of a in Fp. + * + * NOTE: this function does NOT check that `p` is a prime greater than `2`. + */ + function invModPrime(uint256 a, uint256 p) internal view returns (uint256) { + unchecked { + return Math.modExp(a, p - 2, p); + } + } + + /** + * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m) + * + * Requirements: + * - modulus can't be zero + * - underlying staticcall to precompile must succeed + * + * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make + * sure the chain you're using it on supports the precompiled contract for modular exponentiation + * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, + * the underlying function will succeed given the lack of a revert, but the result may be incorrectly + * interpreted as 0. + */ + function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) { + (bool success, uint256 result) = tryModExp(b, e, m); + if (!success) { + Panic.panic(Panic.DIVISION_BY_ZERO); + } + return result; + } + + /** + * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m). + * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying + * to operate modulo 0 or if the underlying precompile reverted. + * + * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain + * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in + * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack + * of a revert, but the result may be incorrectly interpreted as 0. + */ + function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) { + if (m == 0) return (false, 0); + assembly ("memory-safe") { + let ptr := mload(0x40) + // | Offset | Content | Content (Hex) | + // |-----------|------------|--------------------------------------------------------------------| + // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 | + // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 | + // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 | + // | 0x60:0x7f | value of b | 0x<.............................................................b> | + // | 0x80:0x9f | value of e | 0x<.............................................................e> | + // | 0xa0:0xbf | value of m | 0x<.............................................................m> | + mstore(ptr, 0x20) + mstore(add(ptr, 0x20), 0x20) + mstore(add(ptr, 0x40), 0x20) + mstore(add(ptr, 0x60), b) + mstore(add(ptr, 0x80), e) + mstore(add(ptr, 0xa0), m) + + // Given the result < m, it's guaranteed to fit in 32 bytes, + // so we can use the memory scratch space located at offset 0. + success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20) + result := mload(0x00) + } + } + + /** + * @dev Variant of {modExp} that supports inputs of arbitrary length. + */ + function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) { + (bool success, bytes memory result) = tryModExp(b, e, m); + if (!success) { + Panic.panic(Panic.DIVISION_BY_ZERO); + } + return result; + } + + /** + * @dev Variant of {tryModExp} that supports inputs of arbitrary length. + */ + function tryModExp( + bytes memory b, + bytes memory e, + bytes memory m + ) internal view returns (bool success, bytes memory result) { + if (_zeroBytes(m)) return (false, new bytes(0)); + + uint256 mLen = m.length; + + // Encode call args in result and move the free memory pointer + result = abi.encodePacked(b.length, e.length, mLen, b, e, m); + + assembly ("memory-safe") { + let dataPtr := add(result, 0x20) + // Write result on top of args to avoid allocating extra memory. + success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen) + // Overwrite the length. + // result.length > returndatasize() is guaranteed because returndatasize() == m.length + mstore(result, mLen) + // Set the memory pointer after the returned data. + mstore(0x40, add(dataPtr, mLen)) + } + } + + /** + * @dev Returns whether the provided byte array is zero. + */ + function _zeroBytes(bytes memory buffer) private pure returns (bool) { + uint256 chunk; + for (uint256 i = 0; i < buffer.length; i += 0x20) { + // See _unsafeReadBytesOffset from utils/Bytes.sol + assembly ("memory-safe") { + chunk := mload(add(add(buffer, 0x20), i)) + } + if (chunk >> (8 * saturatingSub(i + 0x20, buffer.length)) != 0) { + return false; + } + } + return true; + } + + /** + * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded + * towards zero. + * + * This method is based on Newton's method for computing square roots; the algorithm is restricted to only + * using integer operations. + */ + function sqrt(uint256 a) internal pure returns (uint256) { + unchecked { + // Take care of easy edge cases when a == 0 or a == 1 + if (a <= 1) { + return a; + } + + // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a + // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between + // the current value as `ε_n = | x_n - sqrt(a) |`. + // + // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root + // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is + // bigger than any uint256. + // + // By noticing that + // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)` + // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar + // to the msb function. + uint256 aa = a; + uint256 xn = 1; + + if (aa >= (1 << 128)) { + aa >>= 128; + xn <<= 64; + } + if (aa >= (1 << 64)) { + aa >>= 64; + xn <<= 32; + } + if (aa >= (1 << 32)) { + aa >>= 32; + xn <<= 16; + } + if (aa >= (1 << 16)) { + aa >>= 16; + xn <<= 8; + } + if (aa >= (1 << 8)) { + aa >>= 8; + xn <<= 4; + } + if (aa >= (1 << 4)) { + aa >>= 4; + xn <<= 2; + } + if (aa >= (1 << 2)) { + xn <<= 1; + } + + // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1). + // + // We can refine our estimation by noticing that the middle of that interval minimizes the error. + // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2). + // This is going to be our x_0 (and ε_0) + xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2) + + // From here, Newton's method give us: + // x_{n+1} = (x_n + a / x_n) / 2 + // + // One should note that: + // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a + // = ((x_n² + a) / (2 * x_n))² - a + // = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a + // = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²) + // = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²) + // = (x_n² - a)² / (2 * x_n)² + // = ((x_n² - a) / (2 * x_n))² + // ≥ 0 + // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n + // + // This gives us the proof of quadratic convergence of the sequence: + // ε_{n+1} = | x_{n+1} - sqrt(a) | + // = | (x_n + a / x_n) / 2 - sqrt(a) | + // = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) | + // = | (x_n - sqrt(a))² / (2 * x_n) | + // = | ε_n² / (2 * x_n) | + // = ε_n² / | (2 * x_n) | + // + // For the first iteration, we have a special case where x_0 is known: + // ε_1 = ε_0² / | (2 * x_0) | + // ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2))) + // ≤ 2**(2*e-4) / (3 * 2**(e-1)) + // ≤ 2**(e-3) / 3 + // ≤ 2**(e-3-log2(3)) + // ≤ 2**(e-4.5) + // + // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n: + // ε_{n+1} = ε_n² / | (2 * x_n) | + // ≤ (2**(e-k))² / (2 * 2**(e-1)) + // ≤ 2**(2*e-2*k) / 2**e + // ≤ 2**(e-2*k) + xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above + xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5 + xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9 + xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18 + xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36 + xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72 + + // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision + // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either + // sqrt(a) or sqrt(a) + 1. + return xn - SafeCast.toUint(xn > a / xn); + } + } + + /** + * @dev Calculates sqrt(a), following the selected rounding direction. + */ + function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = sqrt(a); + return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a); + } + } + + /** + * @dev Return the log in base 2 of a positive value rounded towards zero. + * Returns 0 if given 0. + */ + function log2(uint256 x) internal pure returns (uint256 r) { + // If value has upper 128 bits set, log2 result is at least 128 + r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7; + // If upper 64 bits of 128-bit half set, add 64 to result + r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6; + // If upper 32 bits of 64-bit half set, add 32 to result + r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5; + // If upper 16 bits of 32-bit half set, add 16 to result + r |= SafeCast.toUint((x >> r) > 0xffff) << 4; + // If upper 8 bits of 16-bit half set, add 8 to result + r |= SafeCast.toUint((x >> r) > 0xff) << 3; + // If upper 4 bits of 8-bit half set, add 4 to result + r |= SafeCast.toUint((x >> r) > 0xf) << 2; + + // Shifts value right by the current result and use it as an index into this lookup table: + // + // | x (4 bits) | index | table[index] = MSB position | + // |------------|---------|-----------------------------| + // | 0000 | 0 | table[0] = 0 | + // | 0001 | 1 | table[1] = 0 | + // | 0010 | 2 | table[2] = 1 | + // | 0011 | 3 | table[3] = 1 | + // | 0100 | 4 | table[4] = 2 | + // | 0101 | 5 | table[5] = 2 | + // | 0110 | 6 | table[6] = 2 | + // | 0111 | 7 | table[7] = 2 | + // | 1000 | 8 | table[8] = 3 | + // | 1001 | 9 | table[9] = 3 | + // | 1010 | 10 | table[10] = 3 | + // | 1011 | 11 | table[11] = 3 | + // | 1100 | 12 | table[12] = 3 | + // | 1101 | 13 | table[13] = 3 | + // | 1110 | 14 | table[14] = 3 | + // | 1111 | 15 | table[15] = 3 | + // + // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the first 16 bytes (most significant half). + assembly ("memory-safe") { + r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000)) + } + } + + /** + * @dev Return the log in base 2, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log2(value); + return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value); + } + } + + /** + * @dev Return the log in base 10 of a positive value rounded towards zero. + * Returns 0 if given 0. + */ + function log10(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >= 10 ** 64) { + value /= 10 ** 64; + result += 64; + } + if (value >= 10 ** 32) { + value /= 10 ** 32; + result += 32; + } + if (value >= 10 ** 16) { + value /= 10 ** 16; + result += 16; + } + if (value >= 10 ** 8) { + value /= 10 ** 8; + result += 8; + } + if (value >= 10 ** 4) { + value /= 10 ** 4; + result += 4; + } + if (value >= 10 ** 2) { + value /= 10 ** 2; + result += 2; + } + if (value >= 10 ** 1) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 10, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log10(value); + return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value); + } + } + + /** + * @dev Return the log in base 256 of a positive value rounded towards zero. + * Returns 0 if given 0. + * + * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. + */ + function log256(uint256 x) internal pure returns (uint256 r) { + // If value has upper 128 bits set, log2 result is at least 128 + r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7; + // If upper 64 bits of 128-bit half set, add 64 to result + r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6; + // If upper 32 bits of 64-bit half set, add 32 to result + r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5; + // If upper 16 bits of 32-bit half set, add 16 to result + r |= SafeCast.toUint((x >> r) > 0xffff) << 4; + // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8 + return (r >> 3) | SafeCast.toUint((x >> r) > 0xff); + } + + /** + * @dev Return the log in base 256, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log256(value); + return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value); + } + } + + /** + * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. + */ + function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { + return uint8(rounding) % 2 == 1; + } + + /** + * @dev Counts the number of leading zero bits in a uint256. + */ + function clz(uint256 x) internal pure returns (uint256) { + return ternary(x == 0, 256, 255 - log2(x)); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeCast.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/math/SafeCast.sol similarity index 76% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeCast.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/math/SafeCast.sol index 435a5f94..ccb979f6 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/math/SafeCast.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/math/SafeCast.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; /** - * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow + * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can @@ -15,11 +15,28 @@ pragma solidity ^0.8.0; * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. - * - * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing - * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { + /** + * @dev Value doesn't fit in a uint of `bits` size. + */ + error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); + + /** + * @dev An int value doesn't fit in a uint of `bits` size. + */ + error SafeCastOverflowedIntToUint(int256 value); + + /** + * @dev Value doesn't fit in an int of `bits` size. + */ + error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); + + /** + * @dev A uint value doesn't fit in an int of `bits` size. + */ + error SafeCastOverflowedUintToInt(uint256 value); + /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). @@ -29,11 +46,11 @@ library SafeCast { * Requirements: * * - input must fit into 248 bits - * - * _Available since v4.7._ */ function toUint248(uint256 value) internal pure returns (uint248) { - require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits"); + if (value > type(uint248).max) { + revert SafeCastOverflowedUintDowncast(248, value); + } return uint248(value); } @@ -46,11 +63,11 @@ library SafeCast { * Requirements: * * - input must fit into 240 bits - * - * _Available since v4.7._ */ function toUint240(uint256 value) internal pure returns (uint240) { - require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits"); + if (value > type(uint240).max) { + revert SafeCastOverflowedUintDowncast(240, value); + } return uint240(value); } @@ -63,11 +80,11 @@ library SafeCast { * Requirements: * * - input must fit into 232 bits - * - * _Available since v4.7._ */ function toUint232(uint256 value) internal pure returns (uint232) { - require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits"); + if (value > type(uint232).max) { + revert SafeCastOverflowedUintDowncast(232, value); + } return uint232(value); } @@ -80,11 +97,11 @@ library SafeCast { * Requirements: * * - input must fit into 224 bits - * - * _Available since v4.2._ */ function toUint224(uint256 value) internal pure returns (uint224) { - require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); + if (value > type(uint224).max) { + revert SafeCastOverflowedUintDowncast(224, value); + } return uint224(value); } @@ -97,11 +114,11 @@ library SafeCast { * Requirements: * * - input must fit into 216 bits - * - * _Available since v4.7._ */ function toUint216(uint256 value) internal pure returns (uint216) { - require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits"); + if (value > type(uint216).max) { + revert SafeCastOverflowedUintDowncast(216, value); + } return uint216(value); } @@ -114,11 +131,11 @@ library SafeCast { * Requirements: * * - input must fit into 208 bits - * - * _Available since v4.7._ */ function toUint208(uint256 value) internal pure returns (uint208) { - require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits"); + if (value > type(uint208).max) { + revert SafeCastOverflowedUintDowncast(208, value); + } return uint208(value); } @@ -131,11 +148,11 @@ library SafeCast { * Requirements: * * - input must fit into 200 bits - * - * _Available since v4.7._ */ function toUint200(uint256 value) internal pure returns (uint200) { - require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits"); + if (value > type(uint200).max) { + revert SafeCastOverflowedUintDowncast(200, value); + } return uint200(value); } @@ -148,11 +165,11 @@ library SafeCast { * Requirements: * * - input must fit into 192 bits - * - * _Available since v4.7._ */ function toUint192(uint256 value) internal pure returns (uint192) { - require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits"); + if (value > type(uint192).max) { + revert SafeCastOverflowedUintDowncast(192, value); + } return uint192(value); } @@ -165,11 +182,11 @@ library SafeCast { * Requirements: * * - input must fit into 184 bits - * - * _Available since v4.7._ */ function toUint184(uint256 value) internal pure returns (uint184) { - require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits"); + if (value > type(uint184).max) { + revert SafeCastOverflowedUintDowncast(184, value); + } return uint184(value); } @@ -182,11 +199,11 @@ library SafeCast { * Requirements: * * - input must fit into 176 bits - * - * _Available since v4.7._ */ function toUint176(uint256 value) internal pure returns (uint176) { - require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits"); + if (value > type(uint176).max) { + revert SafeCastOverflowedUintDowncast(176, value); + } return uint176(value); } @@ -199,11 +216,11 @@ library SafeCast { * Requirements: * * - input must fit into 168 bits - * - * _Available since v4.7._ */ function toUint168(uint256 value) internal pure returns (uint168) { - require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits"); + if (value > type(uint168).max) { + revert SafeCastOverflowedUintDowncast(168, value); + } return uint168(value); } @@ -216,11 +233,11 @@ library SafeCast { * Requirements: * * - input must fit into 160 bits - * - * _Available since v4.7._ */ function toUint160(uint256 value) internal pure returns (uint160) { - require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits"); + if (value > type(uint160).max) { + revert SafeCastOverflowedUintDowncast(160, value); + } return uint160(value); } @@ -233,11 +250,11 @@ library SafeCast { * Requirements: * * - input must fit into 152 bits - * - * _Available since v4.7._ */ function toUint152(uint256 value) internal pure returns (uint152) { - require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits"); + if (value > type(uint152).max) { + revert SafeCastOverflowedUintDowncast(152, value); + } return uint152(value); } @@ -250,11 +267,11 @@ library SafeCast { * Requirements: * * - input must fit into 144 bits - * - * _Available since v4.7._ */ function toUint144(uint256 value) internal pure returns (uint144) { - require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits"); + if (value > type(uint144).max) { + revert SafeCastOverflowedUintDowncast(144, value); + } return uint144(value); } @@ -267,11 +284,11 @@ library SafeCast { * Requirements: * * - input must fit into 136 bits - * - * _Available since v4.7._ */ function toUint136(uint256 value) internal pure returns (uint136) { - require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits"); + if (value > type(uint136).max) { + revert SafeCastOverflowedUintDowncast(136, value); + } return uint136(value); } @@ -284,11 +301,11 @@ library SafeCast { * Requirements: * * - input must fit into 128 bits - * - * _Available since v2.5._ */ function toUint128(uint256 value) internal pure returns (uint128) { - require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); + if (value > type(uint128).max) { + revert SafeCastOverflowedUintDowncast(128, value); + } return uint128(value); } @@ -301,11 +318,11 @@ library SafeCast { * Requirements: * * - input must fit into 120 bits - * - * _Available since v4.7._ */ function toUint120(uint256 value) internal pure returns (uint120) { - require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits"); + if (value > type(uint120).max) { + revert SafeCastOverflowedUintDowncast(120, value); + } return uint120(value); } @@ -318,11 +335,11 @@ library SafeCast { * Requirements: * * - input must fit into 112 bits - * - * _Available since v4.7._ */ function toUint112(uint256 value) internal pure returns (uint112) { - require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits"); + if (value > type(uint112).max) { + revert SafeCastOverflowedUintDowncast(112, value); + } return uint112(value); } @@ -335,11 +352,11 @@ library SafeCast { * Requirements: * * - input must fit into 104 bits - * - * _Available since v4.7._ */ function toUint104(uint256 value) internal pure returns (uint104) { - require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits"); + if (value > type(uint104).max) { + revert SafeCastOverflowedUintDowncast(104, value); + } return uint104(value); } @@ -352,11 +369,11 @@ library SafeCast { * Requirements: * * - input must fit into 96 bits - * - * _Available since v4.2._ */ function toUint96(uint256 value) internal pure returns (uint96) { - require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); + if (value > type(uint96).max) { + revert SafeCastOverflowedUintDowncast(96, value); + } return uint96(value); } @@ -369,11 +386,11 @@ library SafeCast { * Requirements: * * - input must fit into 88 bits - * - * _Available since v4.7._ */ function toUint88(uint256 value) internal pure returns (uint88) { - require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits"); + if (value > type(uint88).max) { + revert SafeCastOverflowedUintDowncast(88, value); + } return uint88(value); } @@ -386,11 +403,11 @@ library SafeCast { * Requirements: * * - input must fit into 80 bits - * - * _Available since v4.7._ */ function toUint80(uint256 value) internal pure returns (uint80) { - require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits"); + if (value > type(uint80).max) { + revert SafeCastOverflowedUintDowncast(80, value); + } return uint80(value); } @@ -403,11 +420,11 @@ library SafeCast { * Requirements: * * - input must fit into 72 bits - * - * _Available since v4.7._ */ function toUint72(uint256 value) internal pure returns (uint72) { - require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits"); + if (value > type(uint72).max) { + revert SafeCastOverflowedUintDowncast(72, value); + } return uint72(value); } @@ -420,11 +437,11 @@ library SafeCast { * Requirements: * * - input must fit into 64 bits - * - * _Available since v2.5._ */ function toUint64(uint256 value) internal pure returns (uint64) { - require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); + if (value > type(uint64).max) { + revert SafeCastOverflowedUintDowncast(64, value); + } return uint64(value); } @@ -437,11 +454,11 @@ library SafeCast { * Requirements: * * - input must fit into 56 bits - * - * _Available since v4.7._ */ function toUint56(uint256 value) internal pure returns (uint56) { - require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits"); + if (value > type(uint56).max) { + revert SafeCastOverflowedUintDowncast(56, value); + } return uint56(value); } @@ -454,11 +471,11 @@ library SafeCast { * Requirements: * * - input must fit into 48 bits - * - * _Available since v4.7._ */ function toUint48(uint256 value) internal pure returns (uint48) { - require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits"); + if (value > type(uint48).max) { + revert SafeCastOverflowedUintDowncast(48, value); + } return uint48(value); } @@ -471,11 +488,11 @@ library SafeCast { * Requirements: * * - input must fit into 40 bits - * - * _Available since v4.7._ */ function toUint40(uint256 value) internal pure returns (uint40) { - require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits"); + if (value > type(uint40).max) { + revert SafeCastOverflowedUintDowncast(40, value); + } return uint40(value); } @@ -488,11 +505,11 @@ library SafeCast { * Requirements: * * - input must fit into 32 bits - * - * _Available since v2.5._ */ function toUint32(uint256 value) internal pure returns (uint32) { - require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); + if (value > type(uint32).max) { + revert SafeCastOverflowedUintDowncast(32, value); + } return uint32(value); } @@ -505,11 +522,11 @@ library SafeCast { * Requirements: * * - input must fit into 24 bits - * - * _Available since v4.7._ */ function toUint24(uint256 value) internal pure returns (uint24) { - require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits"); + if (value > type(uint24).max) { + revert SafeCastOverflowedUintDowncast(24, value); + } return uint24(value); } @@ -522,11 +539,11 @@ library SafeCast { * Requirements: * * - input must fit into 16 bits - * - * _Available since v2.5._ */ function toUint16(uint256 value) internal pure returns (uint16) { - require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); + if (value > type(uint16).max) { + revert SafeCastOverflowedUintDowncast(16, value); + } return uint16(value); } @@ -539,11 +556,11 @@ library SafeCast { * Requirements: * * - input must fit into 8 bits - * - * _Available since v2.5._ */ function toUint8(uint256 value) internal pure returns (uint8) { - require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); + if (value > type(uint8).max) { + revert SafeCastOverflowedUintDowncast(8, value); + } return uint8(value); } @@ -553,11 +570,11 @@ library SafeCast { * Requirements: * * - input must be greater than or equal to 0. - * - * _Available since v3.0._ */ function toUint256(int256 value) internal pure returns (uint256) { - require(value >= 0, "SafeCast: value must be positive"); + if (value < 0) { + revert SafeCastOverflowedIntToUint(value); + } return uint256(value); } @@ -571,12 +588,12 @@ library SafeCast { * Requirements: * * - input must fit into 248 bits - * - * _Available since v4.7._ */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); - require(downcasted == value, "SafeCast: value doesn't fit in 248 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(248, value); + } } /** @@ -589,12 +606,12 @@ library SafeCast { * Requirements: * * - input must fit into 240 bits - * - * _Available since v4.7._ */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); - require(downcasted == value, "SafeCast: value doesn't fit in 240 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(240, value); + } } /** @@ -607,12 +624,12 @@ library SafeCast { * Requirements: * * - input must fit into 232 bits - * - * _Available since v4.7._ */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); - require(downcasted == value, "SafeCast: value doesn't fit in 232 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(232, value); + } } /** @@ -625,12 +642,12 @@ library SafeCast { * Requirements: * * - input must fit into 224 bits - * - * _Available since v4.7._ */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); - require(downcasted == value, "SafeCast: value doesn't fit in 224 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(224, value); + } } /** @@ -643,12 +660,12 @@ library SafeCast { * Requirements: * * - input must fit into 216 bits - * - * _Available since v4.7._ */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); - require(downcasted == value, "SafeCast: value doesn't fit in 216 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(216, value); + } } /** @@ -661,12 +678,12 @@ library SafeCast { * Requirements: * * - input must fit into 208 bits - * - * _Available since v4.7._ */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); - require(downcasted == value, "SafeCast: value doesn't fit in 208 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(208, value); + } } /** @@ -679,12 +696,12 @@ library SafeCast { * Requirements: * * - input must fit into 200 bits - * - * _Available since v4.7._ */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); - require(downcasted == value, "SafeCast: value doesn't fit in 200 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(200, value); + } } /** @@ -697,12 +714,12 @@ library SafeCast { * Requirements: * * - input must fit into 192 bits - * - * _Available since v4.7._ */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); - require(downcasted == value, "SafeCast: value doesn't fit in 192 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(192, value); + } } /** @@ -715,12 +732,12 @@ library SafeCast { * Requirements: * * - input must fit into 184 bits - * - * _Available since v4.7._ */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); - require(downcasted == value, "SafeCast: value doesn't fit in 184 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(184, value); + } } /** @@ -733,12 +750,12 @@ library SafeCast { * Requirements: * * - input must fit into 176 bits - * - * _Available since v4.7._ */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); - require(downcasted == value, "SafeCast: value doesn't fit in 176 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(176, value); + } } /** @@ -751,12 +768,12 @@ library SafeCast { * Requirements: * * - input must fit into 168 bits - * - * _Available since v4.7._ */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); - require(downcasted == value, "SafeCast: value doesn't fit in 168 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(168, value); + } } /** @@ -769,12 +786,12 @@ library SafeCast { * Requirements: * * - input must fit into 160 bits - * - * _Available since v4.7._ */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); - require(downcasted == value, "SafeCast: value doesn't fit in 160 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(160, value); + } } /** @@ -787,12 +804,12 @@ library SafeCast { * Requirements: * * - input must fit into 152 bits - * - * _Available since v4.7._ */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); - require(downcasted == value, "SafeCast: value doesn't fit in 152 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(152, value); + } } /** @@ -805,12 +822,12 @@ library SafeCast { * Requirements: * * - input must fit into 144 bits - * - * _Available since v4.7._ */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); - require(downcasted == value, "SafeCast: value doesn't fit in 144 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(144, value); + } } /** @@ -823,12 +840,12 @@ library SafeCast { * Requirements: * * - input must fit into 136 bits - * - * _Available since v4.7._ */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); - require(downcasted == value, "SafeCast: value doesn't fit in 136 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(136, value); + } } /** @@ -841,12 +858,12 @@ library SafeCast { * Requirements: * * - input must fit into 128 bits - * - * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); - require(downcasted == value, "SafeCast: value doesn't fit in 128 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(128, value); + } } /** @@ -859,12 +876,12 @@ library SafeCast { * Requirements: * * - input must fit into 120 bits - * - * _Available since v4.7._ */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); - require(downcasted == value, "SafeCast: value doesn't fit in 120 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(120, value); + } } /** @@ -877,12 +894,12 @@ library SafeCast { * Requirements: * * - input must fit into 112 bits - * - * _Available since v4.7._ */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); - require(downcasted == value, "SafeCast: value doesn't fit in 112 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(112, value); + } } /** @@ -895,12 +912,12 @@ library SafeCast { * Requirements: * * - input must fit into 104 bits - * - * _Available since v4.7._ */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); - require(downcasted == value, "SafeCast: value doesn't fit in 104 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(104, value); + } } /** @@ -913,12 +930,12 @@ library SafeCast { * Requirements: * * - input must fit into 96 bits - * - * _Available since v4.7._ */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); - require(downcasted == value, "SafeCast: value doesn't fit in 96 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(96, value); + } } /** @@ -931,12 +948,12 @@ library SafeCast { * Requirements: * * - input must fit into 88 bits - * - * _Available since v4.7._ */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); - require(downcasted == value, "SafeCast: value doesn't fit in 88 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(88, value); + } } /** @@ -949,12 +966,12 @@ library SafeCast { * Requirements: * * - input must fit into 80 bits - * - * _Available since v4.7._ */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); - require(downcasted == value, "SafeCast: value doesn't fit in 80 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(80, value); + } } /** @@ -967,12 +984,12 @@ library SafeCast { * Requirements: * * - input must fit into 72 bits - * - * _Available since v4.7._ */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); - require(downcasted == value, "SafeCast: value doesn't fit in 72 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(72, value); + } } /** @@ -985,12 +1002,12 @@ library SafeCast { * Requirements: * * - input must fit into 64 bits - * - * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); - require(downcasted == value, "SafeCast: value doesn't fit in 64 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(64, value); + } } /** @@ -1003,12 +1020,12 @@ library SafeCast { * Requirements: * * - input must fit into 56 bits - * - * _Available since v4.7._ */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); - require(downcasted == value, "SafeCast: value doesn't fit in 56 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(56, value); + } } /** @@ -1021,12 +1038,12 @@ library SafeCast { * Requirements: * * - input must fit into 48 bits - * - * _Available since v4.7._ */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); - require(downcasted == value, "SafeCast: value doesn't fit in 48 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(48, value); + } } /** @@ -1039,12 +1056,12 @@ library SafeCast { * Requirements: * * - input must fit into 40 bits - * - * _Available since v4.7._ */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); - require(downcasted == value, "SafeCast: value doesn't fit in 40 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(40, value); + } } /** @@ -1057,12 +1074,12 @@ library SafeCast { * Requirements: * * - input must fit into 32 bits - * - * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); - require(downcasted == value, "SafeCast: value doesn't fit in 32 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(32, value); + } } /** @@ -1075,12 +1092,12 @@ library SafeCast { * Requirements: * * - input must fit into 24 bits - * - * _Available since v4.7._ */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); - require(downcasted == value, "SafeCast: value doesn't fit in 24 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(24, value); + } } /** @@ -1093,12 +1110,12 @@ library SafeCast { * Requirements: * * - input must fit into 16 bits - * - * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); - require(downcasted == value, "SafeCast: value doesn't fit in 16 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(16, value); + } } /** @@ -1111,12 +1128,12 @@ library SafeCast { * Requirements: * * - input must fit into 8 bits - * - * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); - require(downcasted == value, "SafeCast: value doesn't fit in 8 bits"); + if (downcasted != value) { + revert SafeCastOverflowedIntDowncast(8, value); + } } /** @@ -1125,12 +1142,21 @@ library SafeCast { * Requirements: * * - input must be less than or equal to maxInt256. - * - * _Available since v3.0._ */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive - require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); + if (value > uint256(type(int256).max)) { + revert SafeCastOverflowedUintToInt(value); + } return int256(value); } + + /** + * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump. + */ + function toUint(bool b) internal pure returns (uint256 u) { + assembly ("memory-safe") { + u := iszero(iszero(b)) + } + } } diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/math/SignedMath.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/math/SignedMath.sol new file mode 100644 index 00000000..7c97aa4c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/math/SignedMath.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol) + +pragma solidity ^0.8.20; + +import {SafeCast} from "./SafeCast.sol"; + +/** + * @dev Standard signed math utilities missing in the Solidity language. + */ +library SignedMath { + /** + * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant. + * + * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone. + * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute + * one branch when needed, making this function more expensive. + */ + function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) { + unchecked { + // branchless ternary works because: + // b ^ (a ^ b) == a + // b ^ 0 == b + return b ^ ((a ^ b) * int256(SafeCast.toUint(condition))); + } + } + + /** + * @dev Returns the largest of two signed numbers. + */ + function max(int256 a, int256 b) internal pure returns (int256) { + return ternary(a > b, a, b); + } + + /** + * @dev Returns the smallest of two signed numbers. + */ + function min(int256 a, int256 b) internal pure returns (int256) { + return ternary(a < b, a, b); + } + + /** + * @dev Returns the average of two signed numbers without overflow. + * The result is rounded towards zero. + */ + function average(int256 a, int256 b) internal pure returns (int256) { + // Formula from the book "Hacker's Delight" + int256 x = (a & b) + ((a ^ b) >> 1); + return x + (int256(uint256(x) >> 255) & (a ^ b)); + } + + /** + * @dev Returns the absolute unsigned value of a signed value. + */ + function abs(int256 n) internal pure returns (uint256) { + unchecked { + // Formula from the "Bit Twiddling Hacks" by Sean Eron Anderson. + // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift, + // taking advantage of the most significant (or "sign" bit) in two's complement representation. + // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result, + // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative). + int256 mask = n >> 255; + + // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it. + return uint256((n + mask) ^ mask); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Accumulators.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Accumulators.sol new file mode 100644 index 00000000..c53b2dd4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Accumulators.sol @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/structs/Accumulators.sol) + +pragma solidity ^0.8.24; + +import {Memory} from "../Memory.sol"; +import {Panic} from "../Panic.sol"; + +/** + * @dev Structure concatenating an arbitrary number of bytes buffers with limited memory allocation. + * + * The Accumulators library provides a memory-efficient alternative to repeated concatenation of bytes. + * Instead of copying data on each concatenation (O(n**2) complexity), it builds a linked list of references + * to existing data and performs a single memory allocation during flattening (O(n) complexity). + * + * Uses 0x00 as sentinel value for empty state (i.e. null pointers) + * + * ==== How it works + * + * 1. Create an empty accumulator with null head/tail pointers + * 2. Add data using {push} (append) or {shift} (prepend). It creates linked list nodes + * 3. Each node stores a reference to existing data (no copying) + * 4. Call {flatten} to materialize the final concatenated result in a single operation + * + * ==== Performance + * + * * Addition: O(1) per operation (just pointer manipulation) + * * Flattening: O(n) single pass with one memory allocation + * * Memory: Minimal overhead until flattening (only stores references) + */ +library Accumulators { + using Memory for *; + + /** + * @dev Bytes accumulator: a linked list of `bytes`. + * + * NOTE: This is a memory structure that SHOULD NOT be put in storage. + */ + struct Accumulator { + Memory.Pointer head; + Memory.Pointer tail; + } + + /// @dev Item (list node) in a bytes accumulator + struct AccumulatorEntry { + Memory.Pointer next; + Memory.Slice data; + } + + /// @dev Create a new (empty) accumulator + function accumulator() internal pure returns (Accumulator memory self) { + self.head = _nullPtr(); + self.tail = _nullPtr(); + } + + /// @dev Add a bytes buffer to (the end of) an Accumulator + function push(Accumulator memory self, bytes memory data) internal pure returns (Accumulator memory) { + return push(self, data.asSlice()); + } + + /// @dev Add a memory slice to (the end of) an Accumulator + function push(Accumulator memory self, Memory.Slice data) internal pure returns (Accumulator memory) { + if (!data.isReserved()) Panic.panic(Panic.RESOURCE_ERROR); + + Memory.Pointer ptr = _asPtr(AccumulatorEntry({next: _nullPtr(), data: data})); + + if (_nullPtr().equal(self.head)) { + self.head = ptr; + self.tail = ptr; + } else { + _asAccumulatorEntry(self.tail).next = ptr; + self.tail = ptr; + } + + return self; + } + + /// @dev Add a bytes buffer to (the beginning of) an Accumulator + function shift(Accumulator memory self, bytes memory data) internal pure returns (Accumulator memory) { + return shift(self, data.asSlice()); + } + + /// @dev Add a memory slice to (the beginning of) an Accumulator + function shift(Accumulator memory self, Memory.Slice data) internal pure returns (Accumulator memory) { + if (!data.isReserved()) Panic.panic(Panic.RESOURCE_ERROR); + + Memory.Pointer ptr = _asPtr(AccumulatorEntry({next: self.head, data: data})); + + if (_nullPtr().equal(self.head)) { + self.head = ptr; + self.tail = ptr; + } else { + self.head = ptr; + } + + return self; + } + + /// @dev Flatten all the bytes entries in an Accumulator into a single buffer + function flatten(Accumulator memory self) internal pure returns (bytes memory result) { + assembly ("memory-safe") { + result := mload(0x40) + let ptr := add(result, 0x20) + for { + let it := mload(self) + } iszero(iszero(it)) { + it := mload(it) + } { + let slice := mload(add(it, 0x20)) + let offset := and(slice, shr(128, not(0))) + let length := shr(128, slice) + mcopy(ptr, offset, length) + ptr := add(ptr, length) + } + mstore(result, sub(ptr, add(result, 0x20))) + mstore(0x40, ptr) + } + } + + function _asPtr(AccumulatorEntry memory item) private pure returns (Memory.Pointer ptr) { + assembly ("memory-safe") { + ptr := item + } + } + + function _asAccumulatorEntry(Memory.Pointer ptr) private pure returns (AccumulatorEntry memory item) { + assembly ("memory-safe") { + item := ptr + } + } + + function _nullPtr() private pure returns (Memory.Pointer) { + return Memory.Pointer.wrap(0); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/BitMaps.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/BitMaps.sol similarity index 67% rename from dependencies/@openzeppelin-contracts-4.9.6/utils/structs/BitMaps.sol rename to dependencies/@openzeppelin-contracts-5.6.1/utils/structs/BitMaps.sol index 2567fce4..40cceb90 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/utils/structs/BitMaps.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/BitMaps.sol @@ -1,14 +1,23 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol) -pragma solidity ^0.8.0; +// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/BitMaps.sol) +pragma solidity ^0.8.20; /** - * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. + * @dev Library for managing uint256 to bool mapping in a compact and efficient way, provided the keys are sequential. * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. + * + * BitMaps pack 256 booleans across each bit of a single 256-bit slot of `uint256` type. + * Hence booleans corresponding to 256 _sequential_ indices would only consume a single slot, + * unlike the regular `bool` which would consume an entire slot for a single value. + * + * This results in gas savings in two ways: + * + * - Setting a zero value to non-zero only once every 256 times + * - Accessing the same warm slot for every 256 _sequential_ indices */ library BitMaps { struct BitMap { - mapping(uint256 => uint256) _data; + mapping(uint256 bucket => uint256) _data; } /** diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Checkpoints.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Checkpoints.sol new file mode 100644 index 00000000..6f67317a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Checkpoints.sol @@ -0,0 +1,833 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/structs/Checkpoints.sol) +// This file was procedurally generated from scripts/generate/templates/Checkpoints.js. + +pragma solidity ^0.8.20; + +import {Math} from "../math/Math.sol"; + +/** + * @dev This library defines the `Trace*` struct, for checkpointing values as they change at different points in + * time, and later looking up past values by block number. See {Votes} as an example. + * + * To create a history of checkpoints define a variable type `Checkpoints.Trace*` in your contract, and store a new + * checkpoint for the current transaction block using the {push} function. + */ +library Checkpoints { + /** + * @dev A value was attempted to be inserted on a past checkpoint. + */ + error CheckpointUnorderedInsertion(); + + struct Trace256 { + Checkpoint256[] _checkpoints; + } + + struct Checkpoint256 { + uint256 _key; + uint256 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace256 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + * + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint256).max` key set will disable the + * library. + */ + function push( + Trace256 storage self, + uint256 key, + uint256 value + ) internal returns (uint256 oldValue, uint256 newValue) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. + */ + function lowerLookup(Trace256 storage self, uint256 key) internal view returns (uint256) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + */ + function upperLookup(Trace256 storage self, uint256 key) internal view returns (uint256) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimized to find "recent" checkpoint (checkpoints with high + * keys). + */ + function upperLookupRecent(Trace256 storage self, uint256 key) internal view returns (uint256) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace256 storage self) internal view returns (uint256) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace256 storage self) internal view returns (bool exists, uint256 _key, uint256 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint256 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoints. + */ + function length(Trace256 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Returns checkpoint at given position. + */ + function at(Trace256 storage self, uint32 pos) internal view returns (Checkpoint256 memory) { + return self._checkpoints[pos]; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert( + Checkpoint256[] storage self, + uint256 key, + uint256 value + ) private returns (uint256 oldValue, uint256 newValue) { + uint256 pos = self.length; + + if (pos > 0) { + Checkpoint256 storage last = _unsafeAccess(self, pos - 1); + uint256 lastKey = last._key; + uint256 lastValue = last._value; + + // Checkpoint keys must be non-decreasing. + if (lastKey > key) { + revert CheckpointUnorderedInsertion(); + } + + // Update or push new checkpoint + if (lastKey == key) { + last._value = value; + } else { + self.push(Checkpoint256({_key: key, _value: value})); + } + return (lastValue, value); + } else { + self.push(Checkpoint256({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint256[] storage self, + uint256 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint256[] storage self, + uint256 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint256[] storage self, + uint256 pos + ) private pure returns (Checkpoint256 storage result) { + assembly { + mstore(0x00, self.slot) + result.slot := add(keccak256(0x00, 0x20), mul(pos, 2)) + } + } + + struct Trace224 { + Checkpoint224[] _checkpoints; + } + + struct Checkpoint224 { + uint32 _key; + uint224 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + * + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint32).max` key set will disable the + * library. + */ + function push( + Trace224 storage self, + uint32 key, + uint224 value + ) internal returns (uint224 oldValue, uint224 newValue) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. + */ + function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + */ + function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimized to find "recent" checkpoint (checkpoints with high + * keys). + */ + function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace224 storage self) internal view returns (uint224) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint224 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoints. + */ + function length(Trace224 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Returns checkpoint at given position. + */ + function at(Trace224 storage self, uint32 pos) internal view returns (Checkpoint224 memory) { + return self._checkpoints[pos]; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert( + Checkpoint224[] storage self, + uint32 key, + uint224 value + ) private returns (uint224 oldValue, uint224 newValue) { + uint256 pos = self.length; + + if (pos > 0) { + Checkpoint224 storage last = _unsafeAccess(self, pos - 1); + uint32 lastKey = last._key; + uint224 lastValue = last._value; + + // Checkpoint keys must be non-decreasing. + if (lastKey > key) { + revert CheckpointUnorderedInsertion(); + } + + // Update or push new checkpoint + if (lastKey == key) { + last._value = value; + } else { + self.push(Checkpoint224({_key: key, _value: value})); + } + return (lastValue, value); + } else { + self.push(Checkpoint224({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint224[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint224[] storage self, + uint32 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint224[] storage self, + uint256 pos + ) private pure returns (Checkpoint224 storage result) { + assembly { + mstore(0x00, self.slot) + result.slot := add(keccak256(0x00, 0x20), pos) + } + } + + struct Trace208 { + Checkpoint208[] _checkpoints; + } + + struct Checkpoint208 { + uint48 _key; + uint208 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace208 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + * + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint48).max` key set will disable the + * library. + */ + function push( + Trace208 storage self, + uint48 key, + uint208 value + ) internal returns (uint208 oldValue, uint208 newValue) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. + */ + function lowerLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + */ + function upperLookup(Trace208 storage self, uint48 key) internal view returns (uint208) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimized to find "recent" checkpoint (checkpoints with high + * keys). + */ + function upperLookupRecent(Trace208 storage self, uint48 key) internal view returns (uint208) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace208 storage self) internal view returns (uint208) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace208 storage self) internal view returns (bool exists, uint48 _key, uint208 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint208 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoints. + */ + function length(Trace208 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Returns checkpoint at given position. + */ + function at(Trace208 storage self, uint32 pos) internal view returns (Checkpoint208 memory) { + return self._checkpoints[pos]; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert( + Checkpoint208[] storage self, + uint48 key, + uint208 value + ) private returns (uint208 oldValue, uint208 newValue) { + uint256 pos = self.length; + + if (pos > 0) { + Checkpoint208 storage last = _unsafeAccess(self, pos - 1); + uint48 lastKey = last._key; + uint208 lastValue = last._value; + + // Checkpoint keys must be non-decreasing. + if (lastKey > key) { + revert CheckpointUnorderedInsertion(); + } + + // Update or push new checkpoint + if (lastKey == key) { + last._value = value; + } else { + self.push(Checkpoint208({_key: key, _value: value})); + } + return (lastValue, value); + } else { + self.push(Checkpoint208({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint208[] storage self, + uint48 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint208[] storage self, + uint48 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint208[] storage self, + uint256 pos + ) private pure returns (Checkpoint208 storage result) { + assembly { + mstore(0x00, self.slot) + result.slot := add(keccak256(0x00, 0x20), pos) + } + } + + struct Trace160 { + Checkpoint160[] _checkpoints; + } + + struct Checkpoint160 { + uint96 _key; + uint160 _value; + } + + /** + * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint. + * + * Returns previous value and new value. + * + * IMPORTANT: Never accept `key` as a user input, since an arbitrary `type(uint96).max` key set will disable the + * library. + */ + function push( + Trace160 storage self, + uint96 key, + uint160 value + ) internal returns (uint160 oldValue, uint160 newValue) { + return _insert(self._checkpoints, key, value); + } + + /** + * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if + * there is none. + */ + function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); + return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + */ + function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero + * if there is none. + * + * NOTE: This is a variant of {upperLookup} that is optimized to find "recent" checkpoint (checkpoints with high + * keys). + */ + function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) { + uint256 len = self._checkpoints.length; + + uint256 low = 0; + uint256 high = len; + + if (len > 5) { + uint256 mid = len - Math.sqrt(len); + if (key < _unsafeAccess(self._checkpoints, mid)._key) { + high = mid; + } else { + low = mid + 1; + } + } + + uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); + + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. + */ + function latest(Trace160 storage self) internal view returns (uint160) { + uint256 pos = self._checkpoints.length; + return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; + } + + /** + * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value + * in the most recent checkpoint. + */ + function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) { + uint256 pos = self._checkpoints.length; + if (pos == 0) { + return (false, 0, 0); + } else { + Checkpoint160 storage ckpt = _unsafeAccess(self._checkpoints, pos - 1); + return (true, ckpt._key, ckpt._value); + } + } + + /** + * @dev Returns the number of checkpoints. + */ + function length(Trace160 storage self) internal view returns (uint256) { + return self._checkpoints.length; + } + + /** + * @dev Returns checkpoint at given position. + */ + function at(Trace160 storage self, uint32 pos) internal view returns (Checkpoint160 memory) { + return self._checkpoints[pos]; + } + + /** + * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, + * or by updating the last one. + */ + function _insert( + Checkpoint160[] storage self, + uint96 key, + uint160 value + ) private returns (uint160 oldValue, uint160 newValue) { + uint256 pos = self.length; + + if (pos > 0) { + Checkpoint160 storage last = _unsafeAccess(self, pos - 1); + uint96 lastKey = last._key; + uint160 lastValue = last._value; + + // Checkpoint keys must be non-decreasing. + if (lastKey > key) { + revert CheckpointUnorderedInsertion(); + } + + // Update or push new checkpoint + if (lastKey == key) { + last._value = value; + } else { + self.push(Checkpoint160({_key: key, _value: value})); + } + return (lastValue, value); + } else { + self.push(Checkpoint160({_key: key, _value: value})); + return (0, value); + } + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _upperBinaryLookup( + Checkpoint160[] storage self, + uint96 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key > key) { + high = mid; + } else { + low = mid + 1; + } + } + return high; + } + + /** + * @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high` + * if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive + * `high`. + * + * WARNING: `high` should not be greater than the array's length. + */ + function _lowerBinaryLookup( + Checkpoint160[] storage self, + uint96 key, + uint256 low, + uint256 high + ) private view returns (uint256) { + while (low < high) { + uint256 mid = Math.average(low, high); + if (_unsafeAccess(self, mid)._key < key) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + + /** + * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. + */ + function _unsafeAccess( + Checkpoint160[] storage self, + uint256 pos + ) private pure returns (Checkpoint160 storage result) { + assembly { + mstore(0x00, self.slot) + result.slot := add(keccak256(0x00, 0x20), pos) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/CircularBuffer.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/CircularBuffer.sol new file mode 100644 index 00000000..13c716d1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/CircularBuffer.sol @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/structs/CircularBuffer.sol) + +pragma solidity ^0.8.24; + +import {Math} from "../math/Math.sol"; +import {Arrays} from "../Arrays.sol"; +import {Panic} from "../Panic.sol"; + +/** + * @dev A fixed-size buffer for keeping `bytes32` items in storage. + * + * This data structure allows for pushing elements to it, and when its length exceeds the specified fixed size, + * new items take the place of the oldest element in the buffer, keeping at most `N` elements in the + * structure. + * + * Elements can't be removed but the data structure can be cleared. See {clear}. + * + * Complexity: + * + * - insertion ({push}): O(1) + * - lookup ({last}): O(1) + * - inclusion ({includes}): O(N) (worst case) + * - reset ({clear}): O(1) + * + * The struct is called `Bytes32CircularBuffer`. Other types can be cast to and from `bytes32`. This data structure + * can only be used in storage, and not in memory. + * + * Example usage: + * + * ```solidity + * contract Example { + * // Add the library methods + * using CircularBuffer for CircularBuffer.Bytes32CircularBuffer; + * + * // Declare a buffer storage variable + * CircularBuffer.Bytes32CircularBuffer private myBuffer; + * + * constructor() { + * myBuffer.setup(16); // Initialize the buffer with a non-zero fixed size (e.g., 16) + * } + * + * function pushValue(bytes32 value) external { + * myBuffer.push(value); // Safe to push because the buffer was initialized in the constructor + * } + * } + * ``` + * + * NOTE: Make sure to call {setup} on your buffer during construction/initialization + * + * _Available since v5.1._ + */ +library CircularBuffer { + /** + * @dev Error emitted when trying to setup a buffer with a size of 0. + */ + error InvalidBufferSize(); + + /** + * @dev Counts the number of items that have been pushed to the buffer. The residuo modulo _data.length indicates + * where the next value should be stored. + * + * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to + * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and + * lead to unexpected behavior. + * + * In a full buffer: + * - The most recently pushed item (last) is at data[(index - 1) % data.length] + * - The oldest item (first) is at data[index % data.length] + */ + struct Bytes32CircularBuffer { + uint256 _count; + bytes32[] _data; + } + + /** + * @dev Initialize a new CircularBuffer of a given size. + * + * If the CircularBuffer was already setup and used, calling that function again will reset it to a blank state. + * + * NOTE: The size of the buffer will affect the execution of {includes} function, as it has a complexity of O(N). + * Consider a large buffer size may render the function unusable. + */ + function setup(Bytes32CircularBuffer storage self, uint256 size) internal { + if (size == 0) revert InvalidBufferSize(); + clear(self); + Arrays.unsafeSetLength(self._data, size); + } + + /** + * @dev Clear all data in the buffer without resetting memory, keeping the existing size. + */ + function clear(Bytes32CircularBuffer storage self) internal { + self._count = 0; + } + + /** + * @dev Push a new value to the buffer. If the buffer is already full, the new value replaces the oldest value in + * the buffer. + */ + function push(Bytes32CircularBuffer storage self, bytes32 value) internal { + uint256 index = self._count++; + uint256 modulus = self._data.length; + Arrays.unsafeAccess(self._data, index % modulus).value = value; + } + + /** + * @dev Number of values currently in the buffer. This value is 0 for an empty buffer, and cannot exceed the size of + * the buffer. + */ + function count(Bytes32CircularBuffer storage self) internal view returns (uint256) { + return Math.min(self._count, self._data.length); + } + + /** + * @dev Length of the buffer. This is the maximum number of elements kept in the buffer. + */ + function length(Bytes32CircularBuffer storage self) internal view returns (uint256) { + return self._data.length; + } + + /** + * @dev Getter for the i-th value in the buffer, from the end. + * + * Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if trying to access an element that was not pushed, or that was + * dropped to make room for newer elements. + */ + function last(Bytes32CircularBuffer storage self, uint256 i) internal view returns (bytes32) { + uint256 index = self._count; + uint256 modulus = self._data.length; + uint256 total = Math.min(index, modulus); // count(self) + if (i >= total) { + Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS); + } + return Arrays.unsafeAccess(self._data, (index - i - 1) % modulus).value; + } + + /** + * @dev Check if a given value is in the buffer. + */ + function includes(Bytes32CircularBuffer storage self, bytes32 value) internal view returns (bool) { + uint256 index = self._count; + uint256 modulus = self._data.length; + uint256 total = Math.min(index, modulus); // count(self) + for (uint256 i = 0; i < total; ++i) { + if (Arrays.unsafeAccess(self._data, (index - i - 1) % modulus).value == value) { + return true; + } + } + return false; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/DoubleEndedQueue.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/DoubleEndedQueue.sol new file mode 100644 index 00000000..c2d75d8c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/DoubleEndedQueue.sol @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/structs/DoubleEndedQueue.sol) +pragma solidity ^0.8.20; + +import {Panic} from "../Panic.sol"; + +/** + * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of + * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and + * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that + * the existing queue contents are left in storage. + * + * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be + * used in storage, and not in memory. + * ```solidity + * DoubleEndedQueue.Bytes32Deque queue; + * ``` + */ +library DoubleEndedQueue { + /** + * @dev Indices are 128 bits so begin and end are packed in a single storage slot for efficient access. + * + * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to + * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and + * lead to unexpected behavior. + * + * The first item is at data[begin] and the last item is at data[end - 1]. This range can wrap around. + */ + struct Bytes32Deque { + uint128 _begin; + uint128 _end; + mapping(uint128 index => bytes32) _data; + } + + /** + * @dev Inserts an item at the end of the queue. + * + * Reverts with {Panic-RESOURCE_ERROR} if the queue is full. + */ + function pushBack(Bytes32Deque storage deque, bytes32 value) internal { + bool success = tryPushBack(deque, value); + if (!success) Panic.panic(Panic.RESOURCE_ERROR); + } + + /** + * @dev Attempts to insert an item at the end of the queue. + * + * Returns `false` if the queue is full. Never reverts. + */ + function tryPushBack(Bytes32Deque storage deque, bytes32 value) internal returns (bool success) { + unchecked { + uint128 backIndex = deque._end; + if (backIndex + 1 == deque._begin) return false; + deque._data[backIndex] = value; + deque._end = backIndex + 1; + return true; + } + } + + /** + * @dev Removes the item at the end of the queue and returns it. + * + * Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty. + */ + function popBack(Bytes32Deque storage deque) internal returns (bytes32) { + (bool success, bytes32 value) = tryPopBack(deque); + if (!success) Panic.panic(Panic.EMPTY_ARRAY_POP); + return value; + } + + /** + * @dev Attempts to remove the item at the end of the queue and return it. + * + * Returns `(false, 0x00)` if the queue is empty. Never reverts. + */ + function tryPopBack(Bytes32Deque storage deque) internal returns (bool success, bytes32 value) { + unchecked { + uint128 backIndex = deque._end; + if (backIndex == deque._begin) return (false, bytes32(0)); + --backIndex; + success = true; + value = deque._data[backIndex]; + delete deque._data[backIndex]; + deque._end = backIndex; + } + } + + /** + * @dev Inserts an item at the beginning of the queue. + * + * Reverts with {Panic-RESOURCE_ERROR} if the queue is full. + */ + function pushFront(Bytes32Deque storage deque, bytes32 value) internal { + bool success = tryPushFront(deque, value); + if (!success) Panic.panic(Panic.RESOURCE_ERROR); + } + + /** + * @dev Attempts to insert an item at the beginning of the queue. + * + * Returns `false` if the queue is full. Never reverts. + */ + function tryPushFront(Bytes32Deque storage deque, bytes32 value) internal returns (bool success) { + unchecked { + uint128 frontIndex = deque._begin - 1; + if (frontIndex == deque._end) return false; + deque._data[frontIndex] = value; + deque._begin = frontIndex; + return true; + } + } + + /** + * @dev Removes the item at the beginning of the queue and returns it. + * + * Reverts with {Panic-EMPTY_ARRAY_POP} if the queue is empty. + */ + function popFront(Bytes32Deque storage deque) internal returns (bytes32) { + (bool success, bytes32 value) = tryPopFront(deque); + if (!success) Panic.panic(Panic.EMPTY_ARRAY_POP); + return value; + } + + /** + * @dev Attempts to remove the item at the beginning of the queue and + * return it. + * + * Returns `(false, 0x00)` if the queue is empty. Never reverts. + */ + function tryPopFront(Bytes32Deque storage deque) internal returns (bool success, bytes32 value) { + unchecked { + uint128 frontIndex = deque._begin; + if (frontIndex == deque._end) return (false, bytes32(0)); + success = true; + value = deque._data[frontIndex]; + delete deque._data[frontIndex]; + deque._begin = frontIndex + 1; + } + } + + /** + * @dev Returns the item at the beginning of the queue. + * + * Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty. + */ + function front(Bytes32Deque storage deque) internal view returns (bytes32) { + (bool success, bytes32 value) = tryFront(deque); + if (!success) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS); + return value; + } + + /** + * @dev Attempts to return the item at the beginning of the queue. + * + * Returns `(false, 0x00)` if the queue is empty. Never reverts. + */ + function tryFront(Bytes32Deque storage deque) internal view returns (bool success, bytes32 value) { + if (empty(deque)) return (false, bytes32(0)); + return (true, deque._data[deque._begin]); + } + + /** + * @dev Returns the item at the end of the queue. + * + * Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the queue is empty. + */ + function back(Bytes32Deque storage deque) internal view returns (bytes32) { + (bool success, bytes32 value) = tryBack(deque); + if (!success) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS); + return value; + } + + /** + * @dev Attempts to return the item at the end of the queue. + * + * Returns `(false, 0x00)` if the queue is empty. Never reverts. + */ + function tryBack(Bytes32Deque storage deque) internal view returns (bool success, bytes32 value) { + if (empty(deque)) return (false, bytes32(0)); + unchecked { + return (true, deque._data[deque._end - 1]); + } + } + + /** + * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at + * `length(deque) - 1`. + * + * Reverts with {Panic-ARRAY_OUT_OF_BOUNDS} if the index is out of bounds. + */ + function at(Bytes32Deque storage deque, uint256 index) internal view returns (bytes32) { + (bool success, bytes32 value) = tryAt(deque, index); + if (!success) Panic.panic(Panic.ARRAY_OUT_OF_BOUNDS); + return value; + } + + /** + * @dev Attempts to return the item at a position in the queue given by `index`, with the first item at + * 0 and the last item at `length(deque) - 1`. + * + * Returns `(false, 0x00)` if the index is out of bounds. Never reverts. + */ + function tryAt(Bytes32Deque storage deque, uint256 index) internal view returns (bool success, bytes32 value) { + if (index >= length(deque)) return (false, bytes32(0)); + // By construction, length is a uint128, so the check above ensures that index can be safely downcast to uint128 + unchecked { + return (true, deque._data[deque._begin + uint128(index)]); + } + } + + /** + * @dev Resets the queue back to being empty. + * + * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses + * out on potential gas refunds. + */ + function clear(Bytes32Deque storage deque) internal { + deque._begin = 0; + deque._end = 0; + } + + /** + * @dev Returns the number of items in the queue. + */ + function length(Bytes32Deque storage deque) internal view returns (uint256) { + unchecked { + return uint256(deque._end - deque._begin); + } + } + + /** + * @dev Returns true if the queue is empty. + */ + function empty(Bytes32Deque storage deque) internal view returns (bool) { + return deque._end == deque._begin; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableMap.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableMap.sol new file mode 100644 index 00000000..3f5eac46 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableMap.sol @@ -0,0 +1,1443 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/structs/EnumerableMap.sol) +// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js. + +pragma solidity ^0.8.24; + +import {EnumerableSet} from "./EnumerableSet.sol"; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * - Map can be cleared (all entries removed) in O(n). + * + * ```solidity + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * The following map types are supported: + * + * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0 + * - `address -> uint256` (`AddressToUintMap`) since v4.6.0 + * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0 + * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0 + * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0 + * - `uint256 -> bytes32` (`UintToBytes32Map`) since v5.1.0 + * - `address -> address` (`AddressToAddressMap`) since v5.1.0 + * - `address -> bytes32` (`AddressToBytes32Map`) since v5.1.0 + * - `bytes32 -> address` (`Bytes32ToAddressMap`) since v5.1.0 + * - `bytes -> bytes` (`BytesToBytesMap`) since v5.4.0 + * - `bytes4 -> address` (`Bytes4ToAddressMap`) since v5.6.0 + * + * [WARNING] + * ==== + * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure + * unusable. + * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. + * + * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an + * array of EnumerableMap. + * ==== + */ +library EnumerableMap { + using EnumerableSet for *; + + // To implement this library for multiple types with as little code repetition as possible, we write it in + // terms of a generic Map type with bytes32 keys and values. The Map implementation uses private functions, + // and user-facing implementations such as `UintToAddressMap` are just wrappers around the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit in bytes32. + + /** + * @dev Query for a nonexistent map key. + */ + error EnumerableMapNonexistentKey(bytes32 key); + + struct Bytes32ToBytes32Map { + // Storage of keys + EnumerableSet.Bytes32Set _keys; + mapping(bytes32 key => bytes32) _values; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) { + map._values[key] = value; + return map._keys.add(key); + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) { + delete map._values[key]; + return map._keys.remove(key); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the map grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(Bytes32ToBytes32Map storage map) internal { + uint256 len = length(map); + for (uint256 i = 0; i < len; ++i) { + delete map._values[map._keys.at(i)]; + } + map._keys.clear(); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) { + return map._keys.contains(key); + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) { + return map._keys.length(); + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32 key, bytes32 value) { + bytes32 atKey = map._keys.at(index); + return (atKey, map._values[atKey]); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool exists, bytes32 value) { + bytes32 val = map._values[key]; + if (val == bytes32(0)) { + return (contains(map, key), bytes32(0)); + } else { + return (true, val); + } + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) { + bytes32 value = map._values[key]; + if (value == 0 && !contains(map, key)) { + revert EnumerableMapNonexistentKey(key); + } + return value; + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToBytes32Map storage map) internal view returns (bytes32[] memory) { + return map._keys.values(); + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys( + Bytes32ToBytes32Map storage map, + uint256 start, + uint256 end + ) internal view returns (bytes32[] memory) { + return map._keys.values(start, end); + } + + // UintToUintMap + + struct UintToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) { + return set(map._inner, bytes32(key), bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToUintMap storage map, uint256 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(UintToUintMap storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToUintMap storage map, uint256 index) internal view returns (uint256 key, uint256 value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (uint256(atKey), uint256(val)); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool exists, uint256 value) { + (bool success, bytes32 val) = tryGet(map._inner, bytes32(key)); + return (success, uint256(val)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(key))); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToUintMap storage map) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToUintMap storage map, uint256 start, uint256 end) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // UintToAddressMap + + struct UintToAddressMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(UintToAddressMap storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256 key, address value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (uint256(atKey), address(uint160(uint256(val)))); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool exists, address value) { + (bool success, bytes32 val) = tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(val)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint160(uint256(get(map._inner, bytes32(key))))); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToAddressMap storage map) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToAddressMap storage map, uint256 start, uint256 end) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // UintToBytes32Map + + struct UintToBytes32Map { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToBytes32Map storage map, uint256 key, bytes32 value) internal returns (bool) { + return set(map._inner, bytes32(key), value); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToBytes32Map storage map, uint256 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(UintToBytes32Map storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToBytes32Map storage map, uint256 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToBytes32Map storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToBytes32Map storage map, uint256 index) internal view returns (uint256 key, bytes32 value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (uint256(atKey), val); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(UintToBytes32Map storage map, uint256 key) internal view returns (bool exists, bytes32 value) { + (bool success, bytes32 val) = tryGet(map._inner, bytes32(key)); + return (success, val); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToBytes32Map storage map, uint256 key) internal view returns (bytes32) { + return get(map._inner, bytes32(key)); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToBytes32Map storage map) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(UintToBytes32Map storage map, uint256 start, uint256 end) internal view returns (uint256[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // AddressToUintMap + + struct AddressToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) { + return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(AddressToUintMap storage map, address key) internal returns (bool) { + return remove(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(AddressToUintMap storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(AddressToUintMap storage map, address key) internal view returns (bool) { + return contains(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(AddressToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressToUintMap storage map, uint256 index) internal view returns (address key, uint256 value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (address(uint160(uint256(atKey))), uint256(val)); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(AddressToUintMap storage map, address key) internal view returns (bool exists, uint256 value) { + (bool success, bytes32 val) = tryGet(map._inner, bytes32(uint256(uint160(key)))); + return (success, uint256(val)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(AddressToUintMap storage map, address key) internal view returns (uint256) { + return uint256(get(map._inner, bytes32(uint256(uint160(key))))); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(AddressToUintMap storage map) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(AddressToUintMap storage map, uint256 start, uint256 end) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // AddressToAddressMap + + struct AddressToAddressMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(AddressToAddressMap storage map, address key, address value) internal returns (bool) { + return set(map._inner, bytes32(uint256(uint160(key))), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(AddressToAddressMap storage map, address key) internal returns (bool) { + return remove(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(AddressToAddressMap storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(AddressToAddressMap storage map, address key) internal view returns (bool) { + return contains(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(AddressToAddressMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressToAddressMap storage map, uint256 index) internal view returns (address key, address value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (address(uint160(uint256(atKey))), address(uint160(uint256(val)))); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(AddressToAddressMap storage map, address key) internal view returns (bool exists, address value) { + (bool success, bytes32 val) = tryGet(map._inner, bytes32(uint256(uint160(key)))); + return (success, address(uint160(uint256(val)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(AddressToAddressMap storage map, address key) internal view returns (address) { + return address(uint160(uint256(get(map._inner, bytes32(uint256(uint160(key))))))); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(AddressToAddressMap storage map) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys( + AddressToAddressMap storage map, + uint256 start, + uint256 end + ) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // AddressToBytes32Map + + struct AddressToBytes32Map { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(AddressToBytes32Map storage map, address key, bytes32 value) internal returns (bool) { + return set(map._inner, bytes32(uint256(uint160(key))), value); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(AddressToBytes32Map storage map, address key) internal returns (bool) { + return remove(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(AddressToBytes32Map storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(AddressToBytes32Map storage map, address key) internal view returns (bool) { + return contains(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(AddressToBytes32Map storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressToBytes32Map storage map, uint256 index) internal view returns (address key, bytes32 value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (address(uint160(uint256(atKey))), val); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(AddressToBytes32Map storage map, address key) internal view returns (bool exists, bytes32 value) { + (bool success, bytes32 val) = tryGet(map._inner, bytes32(uint256(uint160(key)))); + return (success, val); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(AddressToBytes32Map storage map, address key) internal view returns (bytes32) { + return get(map._inner, bytes32(uint256(uint160(key)))); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(AddressToBytes32Map storage map) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys( + AddressToBytes32Map storage map, + uint256 start, + uint256 end + ) internal view returns (address[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // Bytes32ToUintMap + + struct Bytes32ToUintMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) { + return set(map._inner, key, bytes32(value)); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) { + return remove(map._inner, key); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(Bytes32ToUintMap storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) { + return contains(map._inner, key); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(Bytes32ToUintMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32 key, uint256 value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (atKey, uint256(val)); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool exists, uint256 value) { + (bool success, bytes32 val) = tryGet(map._inner, key); + return (success, uint256(val)); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) { + return uint256(get(map._inner, key)); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToUintMap storage map) internal view returns (bytes32[] memory) { + bytes32[] memory store = keys(map._inner); + bytes32[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToUintMap storage map, uint256 start, uint256 end) internal view returns (bytes32[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + bytes32[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // Bytes32ToAddressMap + + struct Bytes32ToAddressMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes32ToAddressMap storage map, bytes32 key, address value) internal returns (bool) { + return set(map._inner, key, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes32ToAddressMap storage map, bytes32 key) internal returns (bool) { + return remove(map._inner, key); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(Bytes32ToAddressMap storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes32ToAddressMap storage map, bytes32 key) internal view returns (bool) { + return contains(map._inner, key); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(Bytes32ToAddressMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32ToAddressMap storage map, uint256 index) internal view returns (bytes32 key, address value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (atKey, address(uint160(uint256(val)))); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes32ToAddressMap storage map, bytes32 key) internal view returns (bool exists, address value) { + (bool success, bytes32 val) = tryGet(map._inner, key); + return (success, address(uint160(uint256(val)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes32ToAddressMap storage map, bytes32 key) internal view returns (address) { + return address(uint160(uint256(get(map._inner, key)))); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes32ToAddressMap storage map) internal view returns (bytes32[] memory) { + bytes32[] memory store = keys(map._inner); + bytes32[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys( + Bytes32ToAddressMap storage map, + uint256 start, + uint256 end + ) internal view returns (bytes32[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + bytes32[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // Bytes4ToAddressMap + + struct Bytes4ToAddressMap { + Bytes32ToBytes32Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(Bytes4ToAddressMap storage map, bytes4 key, address value) internal returns (bool) { + return set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(Bytes4ToAddressMap storage map, bytes4 key) internal returns (bool) { + return remove(map._inner, bytes32(key)); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: This function has an unbounded cost that scales with map size. Developers should keep in mind that + * using it may render the function uncallable if the map grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function clear(Bytes4ToAddressMap storage map) internal { + clear(map._inner); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(Bytes4ToAddressMap storage map, bytes4 key) internal view returns (bool) { + return contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(Bytes4ToAddressMap storage map) internal view returns (uint256) { + return length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the map. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes4ToAddressMap storage map, uint256 index) internal view returns (bytes4 key, address value) { + (bytes32 atKey, bytes32 val) = at(map._inner, index); + return (bytes4(atKey), address(uint160(uint256(val)))); + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet(Bytes4ToAddressMap storage map, bytes4 key) internal view returns (bool exists, address value) { + (bool success, bytes32 val) = tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(val)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(Bytes4ToAddressMap storage map, bytes4 key) internal view returns (address) { + return address(uint160(uint256(get(map._inner, bytes32(key))))); + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes4ToAddressMap storage map) internal view returns (bytes4[] memory) { + bytes32[] memory store = keys(map._inner); + bytes4[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(Bytes4ToAddressMap storage map, uint256 start, uint256 end) internal view returns (bytes4[] memory) { + bytes32[] memory store = keys(map._inner, start, end); + bytes4[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Query for a nonexistent map key. + */ + error EnumerableMapNonexistentBytesKey(bytes key); + + struct BytesToBytesMap { + // Storage of keys + EnumerableSet.BytesSet _keys; + mapping(bytes key => bytes) _values; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(BytesToBytesMap storage map, bytes memory key, bytes memory value) internal returns (bool) { + map._values[key] = value; + return map._keys.add(key); + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(BytesToBytesMap storage map, bytes memory key) internal returns (bool) { + delete map._values[key]; + return map._keys.remove(key); + } + + /** + * @dev Removes all the entries from a map. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the map grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(BytesToBytesMap storage map) internal { + uint256 len = length(map); + for (uint256 i = 0; i < len; ++i) { + delete map._values[map._keys.at(i)]; + } + map._keys.clear(); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(BytesToBytesMap storage map, bytes memory key) internal view returns (bool) { + return map._keys.contains(key); + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function length(BytesToBytesMap storage map) internal view returns (uint256) { + return map._keys.length(); + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at( + BytesToBytesMap storage map, + uint256 index + ) internal view returns (bytes memory key, bytes memory value) { + key = map._keys.at(index); + value = map._values[key]; + } + + /** + * @dev Tries to return the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function tryGet( + BytesToBytesMap storage map, + bytes memory key + ) internal view returns (bool exists, bytes memory value) { + value = map._values[key]; + exists = bytes(value).length != 0 || contains(map, key); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(BytesToBytesMap storage map, bytes memory key) internal view returns (bytes memory value) { + bool exists; + (exists, value) = tryGet(map, key); + if (!exists) { + revert EnumerableMapNonexistentBytesKey(key); + } + } + + /** + * @dev Returns an array containing all the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(BytesToBytesMap storage map) internal view returns (bytes[] memory) { + return map._keys.values(); + } + + /** + * @dev Returns an array containing a slice of the keys + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function keys(BytesToBytesMap storage map, uint256 start, uint256 end) internal view returns (bytes[] memory) { + return map._keys.values(start, end); + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableSet.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableSet.sol new file mode 100644 index 00000000..dfc28604 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/EnumerableSet.sol @@ -0,0 +1,895 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/structs/EnumerableSet.sol) +// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. + +pragma solidity ^0.8.24; + +import {Arrays} from "../Arrays.sol"; +import {Math} from "../math/Math.sol"; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * - Set can be cleared (all elements removed) in O(n). + * + * ```solidity + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * The following types are supported: + * + * - `bytes32` (`Bytes32Set`) since v3.3.0 + * - `address` (`AddressSet`) since v3.3.0 + * - `uint256` (`UintSet`) since v3.3.0 + * - `string` (`StringSet`) since v5.4.0 + * - `bytes` (`BytesSet`) since v5.4.0 + * - `bytes4` (`Bytes4Set`) since v5.6.0 + * + * [WARNING] + * ==== + * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure + * unusable. + * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. + * + * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an + * array of EnumerableSet. + * ==== + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + // Position is the index of the value in the `values` array plus 1. + // Position 0 is used to mean a value is not in the set. + mapping(bytes32 value => uint256) _positions; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._positions[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We cache the value's position to prevent multiple reads from the same storage slot + uint256 position = set._positions[value]; + + if (position != 0) { + // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 valueIndex = position - 1; + uint256 lastIndex = set._values.length - 1; + + if (valueIndex != lastIndex) { + bytes32 lastValue = set._values[lastIndex]; + + // Move the lastValue to the index where the value to delete is + set._values[valueIndex] = lastValue; + // Update the tracked position of the lastValue (that was just moved) + set._positions[lastValue] = position; + } + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the tracked position for the deleted slot + delete set._positions[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Removes all the values from a set. O(n). + * + * WARNING: This function has an unbounded cost that scales with set size. Developers should keep in mind that + * using it may render the function uncallable if the set grows to the point where clearing it consumes too much + * gas to fit in a block. + */ + function _clear(Set storage set) private { + uint256 len = _length(set); + for (uint256 i = 0; i < len; ++i) { + delete set._positions[set._values[i]]; + } + Arrays.unsafeSetLength(set._values, 0); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._positions[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + return set._values[index]; + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function _values(Set storage set) private view returns (bytes32[] memory) { + return set._values; + } + + /** + * @dev Return a slice of the set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function _values(Set storage set, uint256 start, uint256 end) private view returns (bytes32[] memory) { + unchecked { + end = Math.min(end, _length(set)); + start = Math.min(start, end); + + uint256 len = end - start; + bytes32[] memory result = new bytes32[](len); + for (uint256 i = 0; i < len; ++i) { + result[i] = Arrays.unsafeAccess(set._values, start + i).value; + } + return result; + } + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Removes all the values from a set. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the set grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(Bytes32Set storage set) internal { + _clear(set._inner); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { + bytes32[] memory store = _values(set._inner); + bytes32[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Return a slice of the set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(Bytes32Set storage set, uint256 start, uint256 end) internal view returns (bytes32[] memory) { + bytes32[] memory store = _values(set._inner, start, end); + bytes32[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // Bytes4Set + + struct Bytes4Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes4Set storage set, bytes4 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes4Set storage set, bytes4 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Removes all the values from a set. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the set grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(Bytes4Set storage set) internal { + _clear(set._inner); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes4Set storage set, bytes4 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes4Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes4Set storage set, uint256 index) internal view returns (bytes4) { + return bytes4(_at(set._inner, index)); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(Bytes4Set storage set) internal view returns (bytes4[] memory) { + bytes32[] memory store = _values(set._inner); + bytes4[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Return a slice of the set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(Bytes4Set storage set, uint256 start, uint256 end) internal view returns (bytes4[] memory) { + bytes32[] memory store = _values(set._inner, start, end); + bytes4[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes all the values from a set. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the set grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(AddressSet storage set) internal { + _clear(set._inner); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(AddressSet storage set) internal view returns (address[] memory) { + bytes32[] memory store = _values(set._inner); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Return a slice of the set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(AddressSet storage set, uint256 start, uint256 end) internal view returns (address[] memory) { + bytes32[] memory store = _values(set._inner, start, end); + address[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Removes all the values from a set. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the set grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(UintSet storage set) internal { + _clear(set._inner); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(UintSet storage set) internal view returns (uint256[] memory) { + bytes32[] memory store = _values(set._inner); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + /** + * @dev Return a slice of the set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(UintSet storage set, uint256 start, uint256 end) internal view returns (uint256[] memory) { + bytes32[] memory store = _values(set._inner, start, end); + uint256[] memory result; + + assembly ("memory-safe") { + result := store + } + + return result; + } + + struct StringSet { + // Storage of set values + string[] _values; + // Position is the index of the value in the `values` array plus 1. + // Position 0 is used to mean a value is not in the set. + mapping(string value => uint256) _positions; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(StringSet storage set, string memory value) internal returns (bool) { + if (!contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._positions[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(StringSet storage set, string memory value) internal returns (bool) { + // We cache the value's position to prevent multiple reads from the same storage slot + uint256 position = set._positions[value]; + + if (position != 0) { + // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 valueIndex = position - 1; + uint256 lastIndex = set._values.length - 1; + + if (valueIndex != lastIndex) { + string memory lastValue = set._values[lastIndex]; + + // Move the lastValue to the index where the value to delete is + set._values[valueIndex] = lastValue; + // Update the tracked position of the lastValue (that was just moved) + set._positions[lastValue] = position; + } + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the tracked position for the deleted slot + delete set._positions[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Removes all the values from a set. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the set grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(StringSet storage set) internal { + uint256 len = length(set); + for (uint256 i = 0; i < len; ++i) { + delete set._positions[set._values[i]]; + } + Arrays.unsafeSetLength(set._values, 0); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(StringSet storage set, string memory value) internal view returns (bool) { + return set._positions[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(StringSet storage set) internal view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(StringSet storage set, uint256 index) internal view returns (string memory) { + return set._values[index]; + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(StringSet storage set) internal view returns (string[] memory) { + return set._values; + } + + /** + * @dev Return a slice of the set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(StringSet storage set, uint256 start, uint256 end) internal view returns (string[] memory) { + unchecked { + end = Math.min(end, length(set)); + start = Math.min(start, end); + + uint256 len = end - start; + string[] memory result = new string[](len); + for (uint256 i = 0; i < len; ++i) { + result[i] = Arrays.unsafeAccess(set._values, start + i).value; + } + return result; + } + } + + struct BytesSet { + // Storage of set values + bytes[] _values; + // Position is the index of the value in the `values` array plus 1. + // Position 0 is used to mean a value is not in the set. + mapping(bytes value => uint256) _positions; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(BytesSet storage set, bytes memory value) internal returns (bool) { + if (!contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._positions[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(BytesSet storage set, bytes memory value) internal returns (bool) { + // We cache the value's position to prevent multiple reads from the same storage slot + uint256 position = set._positions[value]; + + if (position != 0) { + // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 valueIndex = position - 1; + uint256 lastIndex = set._values.length - 1; + + if (valueIndex != lastIndex) { + bytes memory lastValue = set._values[lastIndex]; + + // Move the lastValue to the index where the value to delete is + set._values[valueIndex] = lastValue; + // Update the tracked position of the lastValue (that was just moved) + set._positions[lastValue] = position; + } + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the tracked position for the deleted slot + delete set._positions[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Removes all the values from a set. O(n). + * + * WARNING: Developers should keep in mind that this function has an unbounded cost and using it may render the + * function uncallable if the set grows to the point where clearing it consumes too much gas to fit in a block. + */ + function clear(BytesSet storage set) internal { + uint256 len = length(set); + for (uint256 i = 0; i < len; ++i) { + delete set._positions[set._values[i]]; + } + Arrays.unsafeSetLength(set._values, 0); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(BytesSet storage set, bytes memory value) internal view returns (bool) { + return set._positions[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(BytesSet storage set) internal view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(BytesSet storage set, uint256 index) internal view returns (bytes memory) { + return set._values[index]; + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(BytesSet storage set) internal view returns (bytes[] memory) { + return set._values; + } + + /** + * @dev Return a slice of the set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(BytesSet storage set, uint256 start, uint256 end) internal view returns (bytes[] memory) { + unchecked { + end = Math.min(end, length(set)); + start = Math.min(start, end); + + uint256 len = end - start; + bytes[] memory result = new bytes[](len); + for (uint256 i = 0; i < len; ++i) { + result[i] = Arrays.unsafeAccess(set._values, start + i).value; + } + return result; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Heap.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Heap.sol new file mode 100644 index 00000000..352f1cb3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/Heap.sol @@ -0,0 +1,259 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/structs/Heap.sol) + +pragma solidity ^0.8.24; + +import {Math} from "../math/Math.sol"; +import {Comparators} from "../Comparators.sol"; +import {Arrays} from "../Arrays.sol"; +import {Panic} from "../Panic.sol"; +import {StorageSlot} from "../StorageSlot.sol"; + +/** + * @dev Library for managing https://en.wikipedia.org/wiki/Binary_heap[binary heap] that can be used as + * https://en.wikipedia.org/wiki/Priority_queue[priority queue]. + * + * Heaps are represented as a tree of values where the first element (index 0) is the root, and where the node at + * index i is the child of the node at index (i-1)/2 and the parent of nodes at index 2*i+1 and 2*i+2. Each node + * stores an element of the heap. + * + * The structure is ordered so that, per the comparator, each node has lower priority than its parent; as a + * consequence, the highest-priority value is at the root. This value can be looked up in constant time (O(1)) at + * `heap.tree[0]`. By default, the comparator is `Comparators.lt`, which treats smaller values as higher priority + * (min-heap). Using `Comparators.gt` yields a max-heap. + * + * The structure is designed to perform the following operations with the corresponding complexities: + * + * * peek (get the highest priority value): O(1) + * * insert (insert a value): O(log(n)) + * * pop (remove the highest priority value): O(log(n)) + * * replace (replace the highest priority value with a new value): O(log(n)) + * * length (get the number of elements): O(1) + * * clear (remove all elements): O(1) + * + * IMPORTANT: This library allows for the use of custom comparator functions. Given that manipulating + * memory can lead to unexpected behavior. Consider verifying that the comparator does not manipulate + * the Heap's state directly and that it follows the Solidity memory safety rules. + * + * _Available since v5.1._ + */ +library Heap { + using Arrays for *; + using Math for *; + + /** + * @dev Binary heap that supports values of type uint256. + * + * Each element of that structure uses one storage slot. + */ + struct Uint256Heap { + uint256[] tree; + } + + /** + * @dev Lookup the root element of the heap. + */ + function peek(Uint256Heap storage self) internal view returns (uint256) { + // self.tree[0] will `ARRAY_ACCESS_OUT_OF_BOUNDS` panic if heap is empty. + return self.tree[0]; + } + + /** + * @dev Remove (and return) the root element for the heap using the default comparator. + * + * NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator + * during the lifecycle of a heap will result in undefined behavior. + */ + function pop(Uint256Heap storage self) internal returns (uint256) { + return pop(self, Comparators.lt); + } + + /** + * @dev Remove (and return) the root element for the heap using the provided comparator. + * + * NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator + * during the lifecycle of a heap will result in undefined behavior. + */ + function pop( + Uint256Heap storage self, + function(uint256, uint256) view returns (bool) comp + ) internal returns (uint256) { + unchecked { + uint256 size = length(self); + if (size == 0) Panic.panic(Panic.EMPTY_ARRAY_POP); + + // cache + uint256 rootValue = self.tree.unsafeAccess(0).value; + if (size == 1) { + self.tree.pop(); + } else { + // swap last leaf with root ... + uint256 lastValue = self.tree.unsafeAccess(size - 1).value; + self.tree.unsafeAccess(0).value = lastValue; + // ... shrink tree ... + self.tree.pop(); + // ... re-heapify + _siftDown(self, size - 1, 0, lastValue, comp); + } + return rootValue; + } + } + + /** + * @dev Insert a new element in the heap using the default comparator. + * + * NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator + * during the lifecycle of a heap will result in undefined behavior. + */ + function insert(Uint256Heap storage self, uint256 value) internal { + insert(self, value, Comparators.lt); + } + + /** + * @dev Insert a new element in the heap using the provided comparator. + * + * NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator + * during the lifecycle of a heap will result in undefined behavior. + */ + function insert( + Uint256Heap storage self, + uint256 value, + function(uint256, uint256) view returns (bool) comp + ) internal { + uint256 size = length(self); + + // push new item and re-heapify + self.tree.push(value); + _siftUp(self, size, value, comp); + } + + /** + * @dev Return the root element for the heap, and replace it with a new value, using the default comparator. + * This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation. + * + * NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator + * during the lifecycle of a heap will result in undefined behavior. + */ + function replace(Uint256Heap storage self, uint256 newValue) internal returns (uint256) { + return replace(self, newValue, Comparators.lt); + } + + /** + * @dev Return the root element for the heap, and replace it with a new value, using the provided comparator. + * This is equivalent to using {pop} and {insert}, but requires only one rebalancing operation. + * + * NOTE: All inserting and removal from a heap should always be done using the same comparator. Mixing comparator + * during the lifecycle of a heap will result in undefined behavior. + */ + function replace( + Uint256Heap storage self, + uint256 newValue, + function(uint256, uint256) view returns (bool) comp + ) internal returns (uint256) { + uint256 size = length(self); + if (size == 0) Panic.panic(Panic.EMPTY_ARRAY_POP); + + // cache + uint256 oldValue = self.tree.unsafeAccess(0).value; + + // replace and re-heapify + self.tree.unsafeAccess(0).value = newValue; + _siftDown(self, size, 0, newValue, comp); + + return oldValue; + } + + /** + * @dev Returns the number of elements in the heap. + */ + function length(Uint256Heap storage self) internal view returns (uint256) { + return self.tree.length; + } + + /** + * @dev Removes all elements in the heap. + */ + function clear(Uint256Heap storage self) internal { + self.tree.unsafeSetLength(0); + } + + /** + * @dev Swap node `i` and `j` in the tree. + */ + function _swap(Uint256Heap storage self, uint256 i, uint256 j) private { + StorageSlot.Uint256Slot storage ni = self.tree.unsafeAccess(i); + StorageSlot.Uint256Slot storage nj = self.tree.unsafeAccess(j); + (ni.value, nj.value) = (nj.value, ni.value); + } + + /** + * @dev Perform heap maintenance on `self`, starting at `index` (with the `value`), using `comp` as a + * comparator, and moving toward the leaves of the underlying tree. + * + * NOTE: This is a private function that is called in a trusted context with already cached parameters. `size` + * and `value` could be extracted from `self` and `index`, but that would require redundant storage read. These + * parameters are not verified. It is the caller role to make sure the parameters are correct. + */ + function _siftDown( + Uint256Heap storage self, + uint256 size, + uint256 index, + uint256 value, + function(uint256, uint256) view returns (bool) comp + ) private { + unchecked { + // Check if there is a risk of overflow when computing the indices of the child nodes. If that is the case, + // there cannot be child nodes in the tree, so sifting is done. + if (index >= type(uint256).max / 2) return; + + // Compute the indices of the potential child nodes + uint256 lIndex = 2 * index + 1; + uint256 rIndex = 2 * index + 2; + + // Three cases: + // 1. Both children exist: sifting may continue on one of the branch (selection required) + // 2. Only left child exist: sifting may continue on the left branch (no selection required) + // 3. Neither child exist: sifting is done + if (rIndex < size) { + uint256 lValue = self.tree.unsafeAccess(lIndex).value; + uint256 rValue = self.tree.unsafeAccess(rIndex).value; + if (comp(lValue, value) || comp(rValue, value)) { + uint256 cIndex = comp(lValue, rValue).ternary(lIndex, rIndex); + _swap(self, index, cIndex); + _siftDown(self, size, cIndex, value, comp); + } + } else if (lIndex < size) { + uint256 lValue = self.tree.unsafeAccess(lIndex).value; + if (comp(lValue, value)) { + _swap(self, index, lIndex); + _siftDown(self, size, lIndex, value, comp); + } + } + } + } + + /** + * @dev Perform heap maintenance on `self`, starting at `index` (with the `value`), using `comp` as a + * comparator, and moving toward the root of the underlying tree. + * + * NOTE: This is a private function that is called in a trusted context with already cached parameters. `value` + * could be extracted from `self` and `index`, but that would require redundant storage read. These parameters are not + * verified. It is the caller role to make sure the parameters are correct. + */ + function _siftUp( + Uint256Heap storage self, + uint256 index, + uint256 value, + function(uint256, uint256) view returns (bool) comp + ) private { + unchecked { + while (index > 0) { + uint256 parentIndex = (index - 1) / 2; + uint256 parentValue = self.tree.unsafeAccess(parentIndex).value; + if (comp(parentValue, value)) break; + _swap(self, index, parentIndex); + index = parentIndex; + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/MerkleTree.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/MerkleTree.sol new file mode 100644 index 00000000..792b9963 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/structs/MerkleTree.sol @@ -0,0 +1,267 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/structs/MerkleTree.sol) + +pragma solidity ^0.8.24; + +import {Hashes} from "../cryptography/Hashes.sol"; +import {Arrays} from "../Arrays.sol"; +import {Panic} from "../Panic.sol"; +import {StorageSlot} from "../StorageSlot.sol"; + +/** + * @dev Library for managing https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures. + * + * Each tree is a complete binary tree with the ability to sequentially insert leaves, changing them from a zero to a + * non-zero value and updating its root. This structure allows inserting commitments (or other entries) that are not + * stored, but can be proven to be part of the tree at a later time if the root is kept. See {MerkleProof}. + * + * A tree is defined by the following parameters: + * + * * Depth: The number of levels in the tree, it also defines the maximum number of leaves as 2**depth. + * * Zero value: The value that represents an empty leaf. Used to avoid regular zero values to be part of the tree. + * * Hashing function: A cryptographic hash function used to produce internal nodes. Defaults to {Hashes-commutativeKeccak256}. + * + * NOTE: Building trees using non-commutative hashing functions (i.e. `H(a, b) != H(b, a)`) is supported. However, + * proving the inclusion of a leaf in such trees is not possible with the {MerkleProof} library since it only supports + * _commutative_ hashing functions. + * + * _Available since v5.1._ + */ +library MerkleTree { + /// @dev Error emitted when trying to update a leaf that was not previously pushed. + error MerkleTreeUpdateInvalidIndex(uint256 index, uint256 length); + + /// @dev Error emitted when the proof used during an update is invalid (could not reproduce the side). + error MerkleTreeUpdateInvalidProof(); + + /** + * @dev A complete `bytes32` Merkle tree. + * + * The `sides` and `zero` arrays are set to have a length equal to the depth of the tree during setup. + * + * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to + * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and + * lead to unexpected behavior. + * + * NOTE: The `root` and the updates history is not stored within the tree. Consider using a secondary structure to + * store a list of historical roots from the values returned from {setup} and {push} (e.g. a mapping, {BitMaps} or + * {Checkpoints}). + * + * WARNING: Updating any of the tree's parameters after the first insertion will result in a corrupted tree. + */ + struct Bytes32PushTree { + uint256 _nextLeafIndex; + bytes32[] _sides; + bytes32[] _zeros; + } + + /** + * @dev Initialize a {Bytes32PushTree} using {Hashes-commutativeKeccak256} to hash internal nodes. + * The capacity of the tree (i.e. number of leaves) is set to `2**treeDepth`. + * + * Calling this function on MerkleTree that was already setup and used will reset it to a blank state. + * + * Once a tree is setup, any push to it must use the same hashing function. This means that values + * should be pushed to it using the default {xref-MerkleTree-push-struct-MerkleTree-Bytes32PushTree-bytes32-}[push] function. + * + * IMPORTANT: The zero value should be carefully chosen since it will be stored in the tree representing + * empty leaves. It should be a value that is not expected to be part of the tree. + */ + function setup(Bytes32PushTree storage self, uint8 treeDepth, bytes32 zero) internal returns (bytes32 initialRoot) { + return setup(self, treeDepth, zero, Hashes.commutativeKeccak256); + } + + /** + * @dev Same as {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[setup], but allows to specify a custom hashing function. + * + * Once a tree is setup, any push to it must use the same hashing function. This means that values + * should be pushed to it using the custom push function, which should be the same one as used during the setup. + * + * IMPORTANT: Providing a custom hashing function is a security-sensitive operation since it may + * compromise the soundness of the tree. + * + * NOTE: Consider verifying that the hashing function does not manipulate the memory state directly and that it + * follows the Solidity memory safety rules. Otherwise, it may lead to unexpected behavior. + */ + function setup( + Bytes32PushTree storage self, + uint8 treeDepth, + bytes32 zero, + function(bytes32, bytes32) view returns (bytes32) fnHash + ) internal returns (bytes32 initialRoot) { + // Store depth in the dynamic array + Arrays.unsafeSetLength(self._sides, treeDepth); + Arrays.unsafeSetLength(self._zeros, treeDepth); + + // Build each root of zero-filled subtrees + bytes32 currentZero = zero; + for (uint256 i = 0; i < treeDepth; ++i) { + Arrays.unsafeAccess(self._zeros, i).value = currentZero; + currentZero = fnHash(currentZero, currentZero); + } + + // Set the first root + self._nextLeafIndex = 0; + + return currentZero; + } + + /** + * @dev Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the + * tree, and the resulting root. + * + * Hashing the leaf before calling this function is recommended as a protection against + * second pre-image attacks. + * + * This variant uses {Hashes-commutativeKeccak256} to hash internal nodes. It should only be used on merkle trees + * that were setup using the same (default) hashing function (i.e. by calling + * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[the default setup] function). + */ + function push(Bytes32PushTree storage self, bytes32 leaf) internal returns (uint256 index, bytes32 newRoot) { + return push(self, leaf, Hashes.commutativeKeccak256); + } + + /** + * @dev Insert a new leaf in the tree, and compute the new root. Returns the position of the inserted leaf in the + * tree, and the resulting root. + * + * Hashing the leaf before calling this function is recommended as a protection against + * second pre-image attacks. + * + * This variant uses a custom hashing function to hash internal nodes. It should only be called with the same + * function as the one used during the initial setup of the merkle tree. + */ + function push( + Bytes32PushTree storage self, + bytes32 leaf, + function(bytes32, bytes32) view returns (bytes32) fnHash + ) internal returns (uint256 index, bytes32 newRoot) { + // Cache read + uint256 treeDepth = depth(self); + + // Get leaf index + index = self._nextLeafIndex++; + + // Check if tree is full. + if (index >= 1 << treeDepth) { + Panic.panic(Panic.RESOURCE_ERROR); + } + + // Rebuild branch from leaf to root + uint256 currentIndex = index; + bytes32 currentLevelHash = leaf; + for (uint256 i = 0; i < treeDepth; i++) { + // Reaching the parent node, is currentLevelHash the left child? + bool isLeft = currentIndex % 2 == 0; + + // If so, next time we will come from the right, so we need to save it + if (isLeft) { + Arrays.unsafeAccess(self._sides, i).value = currentLevelHash; + } + + // Compute the current node hash by using the hash function + // with either its sibling (side) or the zero value for that level. + currentLevelHash = fnHash( + isLeft ? currentLevelHash : Arrays.unsafeAccess(self._sides, i).value, + isLeft ? Arrays.unsafeAccess(self._zeros, i).value : currentLevelHash + ); + + // Update node index + currentIndex >>= 1; + } + + return (index, currentLevelHash); + } + + /** + * @dev Change the value of the leaf at position `index` from `oldValue` to `newValue`. Returns the recomputed "old" + * root (before the update) and "new" root (after the update). The caller must verify that the reconstructed old + * root is the last known one. + * + * The `proof` must be an up-to-date inclusion proof for the leaf being updated. This means that this function is + * vulnerable to front-running. Any {push} or {update} operation (that changes the root of the tree) would render + * all "in flight" updates invalid. + * + * This variant uses {Hashes-commutativeKeccak256} to hash internal nodes. It should only be used on merkle trees + * that were setup using the same (default) hashing function (i.e. by calling + * {xref-MerkleTree-setup-struct-MerkleTree-Bytes32PushTree-uint8-bytes32-}[the default setup] function). + */ + function update( + Bytes32PushTree storage self, + uint256 index, + bytes32 oldValue, + bytes32 newValue, + bytes32[] memory proof + ) internal returns (bytes32 oldRoot, bytes32 newRoot) { + return update(self, index, oldValue, newValue, proof, Hashes.commutativeKeccak256); + } + + /** + * @dev Change the value of the leaf at position `index` from `oldValue` to `newValue`. Returns the recomputed "old" + * root (before the update) and "new" root (after the update). The caller must verify that the reconstructed old + * root is the last known one. + * + * The `proof` must be an up-to-date inclusion proof for the leaf being update. This means that this function is + * vulnerable to front-running. Any {push} or {update} operation (that changes the root of the tree) would render + * all "in flight" updates invalid. + * + * This variant uses a custom hashing function to hash internal nodes. It should only be called with the same + * function as the one used during the initial setup of the merkle tree. + */ + function update( + Bytes32PushTree storage self, + uint256 index, + bytes32 oldValue, + bytes32 newValue, + bytes32[] memory proof, + function(bytes32, bytes32) view returns (bytes32) fnHash + ) internal returns (bytes32 oldRoot, bytes32 newRoot) { + unchecked { + // Check index range + uint256 length = self._nextLeafIndex; + if (index >= length) revert MerkleTreeUpdateInvalidIndex(index, length); + + // Cache read + uint256 treeDepth = depth(self); + + // Workaround stack too deep + bytes32[] storage sides = self._sides; + + // This cannot overflow because: 0 <= index < length + uint256 lastIndex = length - 1; + uint256 currentIndex = index; + bytes32 currentLevelHashOld = oldValue; + bytes32 currentLevelHashNew = newValue; + for (uint32 i = 0; i < treeDepth; i++) { + bool isLeft = currentIndex % 2 == 0; + + lastIndex >>= 1; + currentIndex >>= 1; + + if (isLeft && currentIndex == lastIndex) { + StorageSlot.Bytes32Slot storage side = Arrays.unsafeAccess(sides, i); + if (side.value != currentLevelHashOld) revert MerkleTreeUpdateInvalidProof(); + side.value = currentLevelHashNew; + } + + bytes32 sibling = proof[i]; + currentLevelHashOld = fnHash( + isLeft ? currentLevelHashOld : sibling, + isLeft ? sibling : currentLevelHashOld + ); + currentLevelHashNew = fnHash( + isLeft ? currentLevelHashNew : sibling, + isLeft ? sibling : currentLevelHashNew + ); + } + return (currentLevelHashOld, currentLevelHashNew); + } + } + + /** + * @dev Tree's depth (set at initialization) + */ + function depth(Bytes32PushTree storage self) internal view returns (uint256) { + return self._zeros.length; + } +} diff --git a/dependencies/@openzeppelin-contracts-5.6.1/utils/types/Time.sol b/dependencies/@openzeppelin-contracts-5.6.1/utils/types/Time.sol new file mode 100644 index 00000000..8402e53b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-5.6.1/utils/types/Time.sol @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/types/Time.sol) + +pragma solidity ^0.8.20; + +import {Math} from "../math/Math.sol"; +import {SafeCast} from "../math/SafeCast.sol"; + +/** + * @dev This library provides helpers for manipulating time-related objects. + * + * It uses the following types: + * - `uint48` for timepoints + * - `uint32` for durations + * + * While the library doesn't provide specific types for timepoints and duration, it does provide: + * - a `Delay` type to represent duration that can be programmed to change value automatically at a given point + * - additional helper functions + */ +library Time { + using Time for *; + + /** + * @dev Get the block timestamp as a Timepoint. + */ + function timestamp() internal view returns (uint48) { + return SafeCast.toUint48(block.timestamp); + } + + /** + * @dev Get the block number as a Timepoint. + */ + function blockNumber() internal view returns (uint48) { + return SafeCast.toUint48(block.number); + } + + // ==================================================== Delay ===================================================== + /** + * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the + * future. The "effect" timepoint describes when the transition happens from the "old" value to the "new" value. + * This allows updating the delay applied to some operation while keeping some guarantees. + * + * In particular, the {update} function guarantees that if the delay is reduced, the old delay still applies for + * some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set + * the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should + * still apply for some time. + * + * + * The `Delay` type is 112 bits long, and packs the following: + * + * ``` + * | [uint48]: effect date (timepoint) + * | | [uint32]: value before (duration) + * ↓ ↓ ↓ [uint32]: value after (duration) + * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC + * ``` + * + * NOTE: The {get} and {withUpdate} functions operate using timestamps. Block number based delays are not currently + * supported. + */ + type Delay is uint112; + + /** + * @dev Wrap a duration into a Delay to add the one-step "update in the future" feature + */ + function toDelay(uint32 duration) internal pure returns (Delay) { + return Delay.wrap(duration); + } + + /** + * @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled + * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered. + */ + function _getFullAt( + Delay self, + uint48 timepoint + ) private pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) { + (valueBefore, valueAfter, effect) = self.unpack(); + return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect); + } + + /** + * @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the + * effect timepoint is 0, then the pending value should not be considered. + */ + function getFull(Delay self) internal view returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) { + return _getFullAt(self, timestamp()); + } + + /** + * @dev Get the current value. + */ + function get(Delay self) internal view returns (uint32) { + (uint32 delay, , ) = self.getFull(); + return delay; + } + + /** + * @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to + * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the + * new delay becomes effective. + */ + function withUpdate( + Delay self, + uint32 newValue, + uint32 minSetback + ) internal view returns (Delay updatedDelay, uint48 effect) { + uint32 value = self.get(); + uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0)); + effect = timestamp() + setback; + return (pack(value, newValue, effect), effect); + } + + /** + * @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint). + */ + function unpack(Delay self) internal pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) { + uint112 raw = Delay.unwrap(self); + + valueAfter = uint32(raw); + valueBefore = uint32(raw >> 32); + effect = uint48(raw >> 64); + + return (valueBefore, valueAfter, effect); + } + + /** + * @dev pack the components into a Delay object. + */ + function pack(uint32 valueBefore, uint32 valueAfter, uint48 effect) internal pure returns (Delay) { + return Delay.wrap((uint112(effect) << 64) | (uint112(valueBefore) << 32) | uint112(valueAfter)); + } +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/vendor/compound/ICompoundTimelock.sol b/dependencies/@openzeppelin-contracts-5.6.1/vendor/compound/ICompoundTimelock.sol similarity index 93% rename from dependencies/@openzeppelin-contracts-4.9.6/vendor/compound/ICompoundTimelock.sol rename to dependencies/@openzeppelin-contracts-5.6.1/vendor/compound/ICompoundTimelock.sol index fb33a680..84cd62ed 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/vendor/compound/ICompoundTimelock.sol +++ b/dependencies/@openzeppelin-contracts-5.6.1/vendor/compound/ICompoundTimelock.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (vendor/compound/ICompoundTimelock.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (vendor/compound/ICompoundTimelock.sol) -pragma solidity ^0.8.0; +pragma solidity >=0.6.9; /** - * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface + * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound timelock] interface */ interface ICompoundTimelock { event NewAdmin(address indexed newAdmin); diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol deleted file mode 100644 index 4c5a822f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlCrossChainUpgradeable.sol +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControlCrossChain.sol) - -pragma solidity ^0.8.4; - -import "./AccessControlUpgradeable.sol"; -import "../crosschain/CrossChainEnabledUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev An extension to {AccessControl} with support for cross-chain access management. - * For each role, is extension implements an equivalent "aliased" role that is used for - * restricting calls originating from other chains. - * - * For example, if a function `myFunction` is protected by `onlyRole(SOME_ROLE)`, and - * if an address `x` has role `SOME_ROLE`, it would be able to call `myFunction` directly. - * A wallet or contract at the same address on another chain would however not be able - * to call this function. In order to do so, it would require to have the role - * `_crossChainRoleAlias(SOME_ROLE)`. - * - * This aliasing is required to protect against multiple contracts living at the same - * address on different chains but controlled by conflicting entities. - * - * _Available since v4.6._ - */ -abstract contract AccessControlCrossChainUpgradeable is Initializable, AccessControlUpgradeable, CrossChainEnabledUpgradeable { - bytes32 public constant CROSSCHAIN_ALIAS = keccak256("CROSSCHAIN_ALIAS"); - - function __AccessControlCrossChain_init() internal onlyInitializing { - } - - function __AccessControlCrossChain_init_unchained() internal onlyInitializing { - } - /** - * @dev See {AccessControl-_checkRole}. - */ - function _checkRole(bytes32 role) internal view virtual override { - if (_isCrossChain()) { - _checkRole(_crossChainRoleAlias(role), _crossChainSender()); - } else { - super._checkRole(role); - } - } - - /** - * @dev Returns the aliased role corresponding to `role`. - */ - function _crossChainRoleAlias(bytes32 role) internal pure virtual returns (bytes32) { - return role ^ CROSSCHAIN_ALIAS; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol deleted file mode 100644 index 61293e30..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlEnumerableUpgradeable.sol +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) - -pragma solidity ^0.8.0; - -import "./IAccessControlEnumerableUpgradeable.sol"; -import "./AccessControlUpgradeable.sol"; -import "../utils/structs/EnumerableSetUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {AccessControl} that allows enumerating the members of each role. - */ -abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { - using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; - - mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; - - function __AccessControlEnumerable_init() internal onlyInitializing { - } - - function __AccessControlEnumerable_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev Returns one of the accounts that have `role`. `index` must be a - * value between 0 and {getRoleMemberCount}, non-inclusive. - * - * Role bearers are not sorted in any particular way, and their ordering may - * change at any point. - * - * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure - * you perform all queries on the same block. See the following - * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] - * for more information. - */ - function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { - return _roleMembers[role].at(index); - } - - /** - * @dev Returns the number of accounts that have `role`. Can be used - * together with {getRoleMember} to enumerate all bearers of a role. - */ - function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { - return _roleMembers[role].length(); - } - - /** - * @dev Overload {_grantRole} to track enumerable memberships - */ - function _grantRole(bytes32 role, address account) internal virtual override { - super._grantRole(role, account); - _roleMembers[role].add(account); - } - - /** - * @dev Overload {_revokeRole} to track enumerable memberships - */ - function _revokeRole(bytes32 role, address account) internal virtual override { - super._revokeRole(role, account); - _roleMembers[role].remove(account); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol deleted file mode 100644 index 0638e093..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlDefaultAdminRulesUpgradeable.sol +++ /dev/null @@ -1,172 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/IAccessControlDefaultAdminRules.sol) - -pragma solidity ^0.8.0; - -import "./IAccessControlUpgradeable.sol"; - -/** - * @dev External interface of AccessControlDefaultAdminRules declared to support ERC165 detection. - * - * _Available since v4.9._ - */ -interface IAccessControlDefaultAdminRulesUpgradeable is IAccessControlUpgradeable { - /** - * @dev Emitted when a {defaultAdmin} transfer is started, setting `newAdmin` as the next - * address to become the {defaultAdmin} by calling {acceptDefaultAdminTransfer} only after `acceptSchedule` - * passes. - */ - event DefaultAdminTransferScheduled(address indexed newAdmin, uint48 acceptSchedule); - - /** - * @dev Emitted when a {pendingDefaultAdmin} is reset if it was never accepted, regardless of its schedule. - */ - event DefaultAdminTransferCanceled(); - - /** - * @dev Emitted when a {defaultAdminDelay} change is started, setting `newDelay` as the next - * delay to be applied between default admin transfer after `effectSchedule` has passed. - */ - event DefaultAdminDelayChangeScheduled(uint48 newDelay, uint48 effectSchedule); - - /** - * @dev Emitted when a {pendingDefaultAdminDelay} is reset if its schedule didn't pass. - */ - event DefaultAdminDelayChangeCanceled(); - - /** - * @dev Returns the address of the current `DEFAULT_ADMIN_ROLE` holder. - */ - function defaultAdmin() external view returns (address); - - /** - * @dev Returns a tuple of a `newAdmin` and an accept schedule. - * - * After the `schedule` passes, the `newAdmin` will be able to accept the {defaultAdmin} role - * by calling {acceptDefaultAdminTransfer}, completing the role transfer. - * - * A zero value only in `acceptSchedule` indicates no pending admin transfer. - * - * NOTE: A zero address `newAdmin` means that {defaultAdmin} is being renounced. - */ - function pendingDefaultAdmin() external view returns (address newAdmin, uint48 acceptSchedule); - - /** - * @dev Returns the delay required to schedule the acceptance of a {defaultAdmin} transfer started. - * - * This delay will be added to the current timestamp when calling {beginDefaultAdminTransfer} to set - * the acceptance schedule. - * - * NOTE: If a delay change has been scheduled, it will take effect as soon as the schedule passes, making this - * function returns the new delay. See {changeDefaultAdminDelay}. - */ - function defaultAdminDelay() external view returns (uint48); - - /** - * @dev Returns a tuple of `newDelay` and an effect schedule. - * - * After the `schedule` passes, the `newDelay` will get into effect immediately for every - * new {defaultAdmin} transfer started with {beginDefaultAdminTransfer}. - * - * A zero value only in `effectSchedule` indicates no pending delay change. - * - * NOTE: A zero value only for `newDelay` means that the next {defaultAdminDelay} - * will be zero after the effect schedule. - */ - function pendingDefaultAdminDelay() external view returns (uint48 newDelay, uint48 effectSchedule); - - /** - * @dev Starts a {defaultAdmin} transfer by setting a {pendingDefaultAdmin} scheduled for acceptance - * after the current timestamp plus a {defaultAdminDelay}. - * - * Requirements: - * - * - Only can be called by the current {defaultAdmin}. - * - * Emits a DefaultAdminRoleChangeStarted event. - */ - function beginDefaultAdminTransfer(address newAdmin) external; - - /** - * @dev Cancels a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. - * - * A {pendingDefaultAdmin} not yet accepted can also be cancelled with this function. - * - * Requirements: - * - * - Only can be called by the current {defaultAdmin}. - * - * May emit a DefaultAdminTransferCanceled event. - */ - function cancelDefaultAdminTransfer() external; - - /** - * @dev Completes a {defaultAdmin} transfer previously started with {beginDefaultAdminTransfer}. - * - * After calling the function: - * - * - `DEFAULT_ADMIN_ROLE` should be granted to the caller. - * - `DEFAULT_ADMIN_ROLE` should be revoked from the previous holder. - * - {pendingDefaultAdmin} should be reset to zero values. - * - * Requirements: - * - * - Only can be called by the {pendingDefaultAdmin}'s `newAdmin`. - * - The {pendingDefaultAdmin}'s `acceptSchedule` should've passed. - */ - function acceptDefaultAdminTransfer() external; - - /** - * @dev Initiates a {defaultAdminDelay} update by setting a {pendingDefaultAdminDelay} scheduled for getting - * into effect after the current timestamp plus a {defaultAdminDelay}. - * - * This function guarantees that any call to {beginDefaultAdminTransfer} done between the timestamp this - * method is called and the {pendingDefaultAdminDelay} effect schedule will use the current {defaultAdminDelay} - * set before calling. - * - * The {pendingDefaultAdminDelay}'s effect schedule is defined in a way that waiting until the schedule and then - * calling {beginDefaultAdminTransfer} with the new delay will take at least the same as another {defaultAdmin} - * complete transfer (including acceptance). - * - * The schedule is designed for two scenarios: - * - * - When the delay is changed for a larger one the schedule is `block.timestamp + newDelay` capped by - * {defaultAdminDelayIncreaseWait}. - * - When the delay is changed for a shorter one, the schedule is `block.timestamp + (current delay - new delay)`. - * - * A {pendingDefaultAdminDelay} that never got into effect will be canceled in favor of a new scheduled change. - * - * Requirements: - * - * - Only can be called by the current {defaultAdmin}. - * - * Emits a DefaultAdminDelayChangeScheduled event and may emit a DefaultAdminDelayChangeCanceled event. - */ - function changeDefaultAdminDelay(uint48 newDelay) external; - - /** - * @dev Cancels a scheduled {defaultAdminDelay} change. - * - * Requirements: - * - * - Only can be called by the current {defaultAdmin}. - * - * May emit a DefaultAdminDelayChangeCanceled event. - */ - function rollbackDefaultAdminDelay() external; - - /** - * @dev Maximum time in seconds for an increase to {defaultAdminDelay} (that is scheduled using {changeDefaultAdminDelay}) - * to take effect. Default to 5 days. - * - * When the {defaultAdminDelay} is scheduled to be increased, it goes into effect after the new delay has passed with - * the purpose of giving enough time for reverting any accidental change (i.e. using milliseconds instead of seconds) - * that may lock the contract. However, to avoid excessive schedules, the wait is capped by this function and it can - * be overrode for a custom {defaultAdminDelay} increase scheduling. - * - * IMPORTANT: Make sure to add a reasonable amount of time while overriding this value, otherwise, - * there's a risk of setting a high new delay that goes into effect almost immediately without the - * possibility of human intervention in the case of an input error (eg. set milliseconds instead of seconds). - */ - function defaultAdminDelayIncreaseWait() external view returns (uint48); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol deleted file mode 100644 index d7f00e90..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlEnumerableUpgradeable.sol +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) - -pragma solidity ^0.8.0; - -import "./IAccessControlUpgradeable.sol"; - -/** - * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. - */ -interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { - /** - * @dev Returns one of the accounts that have `role`. `index` must be a - * value between 0 and {getRoleMemberCount}, non-inclusive. - * - * Role bearers are not sorted in any particular way, and their ordering may - * change at any point. - * - * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure - * you perform all queries on the same block. See the following - * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] - * for more information. - */ - function getRoleMember(bytes32 role, uint256 index) external view returns (address); - - /** - * @dev Returns the number of accounts that have `role`. Can be used - * together with {getRoleMember} to enumerate all bearers of a role. - */ - function getRoleMemberCount(bytes32 role) external view returns (uint256); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol deleted file mode 100644 index 963fdd1f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/IAccessControlUpgradeable.sol +++ /dev/null @@ -1,88 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) - -pragma solidity ^0.8.0; - -/** - * @dev External interface of AccessControl declared to support ERC165 detection. - */ -interface IAccessControlUpgradeable { - /** - * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` - * - * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite - * {RoleAdminChanged} not being emitted signaling this. - * - * _Available since v3.1._ - */ - event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); - - /** - * @dev Emitted when `account` is granted `role`. - * - * `sender` is the account that originated the contract call, an admin role - * bearer except when using {AccessControl-_setupRole}. - */ - event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); - - /** - * @dev Emitted when `account` is revoked `role`. - * - * `sender` is the account that originated the contract call: - * - if using `revokeRole`, it is the admin role bearer - * - if using `renounceRole`, it is the role bearer (i.e. `account`) - */ - event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); - - /** - * @dev Returns `true` if `account` has been granted `role`. - */ - function hasRole(bytes32 role, address account) external view returns (bool); - - /** - * @dev Returns the admin role that controls `role`. See {grantRole} and - * {revokeRole}. - * - * To change a role's admin, use {AccessControl-_setRoleAdmin}. - */ - function getRoleAdmin(bytes32 role) external view returns (bytes32); - - /** - * @dev Grants `role` to `account`. - * - * If `account` had not been already granted `role`, emits a {RoleGranted} - * event. - * - * Requirements: - * - * - the caller must have ``role``'s admin role. - */ - function grantRole(bytes32 role, address account) external; - - /** - * @dev Revokes `role` from `account`. - * - * If `account` had been granted `role`, emits a {RoleRevoked} event. - * - * Requirements: - * - * - the caller must have ``role``'s admin role. - */ - function revokeRole(bytes32 role, address account) external; - - /** - * @dev Revokes `role` from the calling account. - * - * Roles are often managed via {grantRole} and {revokeRole}: this function's - * purpose is to provide a mechanism for accounts to lose their privileges - * if they are compromised (such as when a trusted device is misplaced). - * - * If the calling account had been granted `role`, emits a {RoleRevoked} - * event. - * - * Requirements: - * - * - the caller must be `account`. - */ - function renounceRole(bytes32 role, address account) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol deleted file mode 100644 index 34c3c983..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/Ownable2StepUpgradeable.sol +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) - -pragma solidity ^0.8.0; - -import "./OwnableUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Contract module which provides access control mechanism, where - * there is an account (an owner) that can be granted exclusive access to - * specific functions. - * - * By default, the owner account will be the one that deploys the contract. This - * can later be changed with {transferOwnership} and {acceptOwnership}. - * - * This module is used through inheritance. It will make available all functions - * from parent (Ownable). - */ -abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { - address private _pendingOwner; - - event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); - - function __Ownable2Step_init() internal onlyInitializing { - __Ownable_init_unchained(); - } - - function __Ownable2Step_init_unchained() internal onlyInitializing { - } - /** - * @dev Returns the address of the pending owner. - */ - function pendingOwner() public view virtual returns (address) { - return _pendingOwner; - } - - /** - * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. - * Can only be called by the current owner. - */ - function transferOwnership(address newOwner) public virtual override onlyOwner { - _pendingOwner = newOwner; - emit OwnershipTransferStarted(owner(), newOwner); - } - - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. - * Internal function without access restriction. - */ - function _transferOwnership(address newOwner) internal virtual override { - delete _pendingOwner; - super._transferOwnership(newOwner); - } - - /** - * @dev The new owner accepts the ownership transfer. - */ - function acceptOwnership() public virtual { - address sender = _msgSender(); - require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); - _transferOwnership(sender); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol deleted file mode 100644 index 9b8399ff..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/OwnableUpgradeable.sol +++ /dev/null @@ -1,95 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) - -pragma solidity ^0.8.0; - -import "../utils/ContextUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Contract module which provides a basic access control mechanism, where - * there is an account (an owner) that can be granted exclusive access to - * specific functions. - * - * By default, the owner account will be the one that deploys the contract. This - * can later be changed with {transferOwnership}. - * - * This module is used through inheritance. It will make available the modifier - * `onlyOwner`, which can be applied to your functions to restrict their use to - * the owner. - */ -abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { - address private _owner; - - event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - - /** - * @dev Initializes the contract setting the deployer as the initial owner. - */ - function __Ownable_init() internal onlyInitializing { - __Ownable_init_unchained(); - } - - function __Ownable_init_unchained() internal onlyInitializing { - _transferOwnership(_msgSender()); - } - - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - _checkOwner(); - _; - } - - /** - * @dev Returns the address of the current owner. - */ - function owner() public view virtual returns (address) { - return _owner; - } - - /** - * @dev Throws if the sender is not the owner. - */ - function _checkOwner() internal view virtual { - require(owner() == _msgSender(), "Ownable: caller is not the owner"); - } - - /** - * @dev Leaves the contract without owner. It will not be possible to call - * `onlyOwner` functions. Can only be called by the current owner. - * - * NOTE: Renouncing ownership will leave the contract without an owner, - * thereby disabling any functionality that is only available to the owner. - */ - function renounceOwnership() public virtual onlyOwner { - _transferOwnership(address(0)); - } - - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`). - * Can only be called by the current owner. - */ - function transferOwnership(address newOwner) public virtual onlyOwner { - require(newOwner != address(0), "Ownable: new owner is the zero address"); - _transferOwnership(newOwner); - } - - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`). - * Internal function without access restriction. - */ - function _transferOwnership(address newOwner) internal virtual { - address oldOwner = _owner; - _owner = newOwner; - emit OwnershipTransferred(oldOwner, newOwner); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc deleted file mode 100644 index 80ca0020..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/README.adoc +++ /dev/null @@ -1,27 +0,0 @@ -= Access Control - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/access - -This directory provides ways to restrict who can access the functions of a contract or when they can do it. - -- {AccessControl} provides a general role based access control mechanism. Multiple hierarchical roles can be created and assigned each to multiple accounts. -- {Ownable} is a simpler mechanism with a single owner "role" that can be assigned to a single account. This simpler mechanism can be useful for quick tests but projects with production concerns are likely to outgrow it. - -== Authorization - -{{Ownable}} - -{{Ownable2Step}} - -{{IAccessControl}} - -{{AccessControl}} - -{{AccessControlCrossChain}} - -{{IAccessControlEnumerable}} - -{{AccessControlEnumerable}} - -{{AccessControlDefaultAdminRules}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json deleted file mode 100644 index 6dba1fe4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AddressUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "AddressUpgradeable", - "sourceName": "contracts/utils/AddressUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b5d3de90a80b3c54f7f70d12405beb5e859fdb6f03a20e43ec1ecfb4a2ff17ae64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b5d3de90a80b3c54f7f70d12405beb5e859fdb6f03a20e43ec1ecfb4a2ff17ae64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json deleted file mode 100644 index deaffe91..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ArraysUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ArraysUpgradeable", - "sourceName": "contracts/utils/ArraysUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cb8458a1a8dcacdc7555eee46f53ed564e75cb1ce4350f51316ea9b5f1a5e86264736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cb8458a1a8dcacdc7555eee46f53ed564e75cb1ce4350f51316ea9b5f1a5e86264736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json deleted file mode 100644 index a61982f3..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Base64Upgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Base64Upgradeable", - "sourceName": "contracts/utils/Base64Upgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba46c8f4d94d9ba757b159400cb8988eaa2fb8755e3f325489f32128fb4c7b5964736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ba46c8f4d94d9ba757b159400cb8988eaa2fb8755e3f325489f32128fb4c7b5964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json deleted file mode 100644 index fd438f99..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/BitMapsUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "BitMapsUpgradeable", - "sourceName": "contracts/utils/structs/BitMapsUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220749146e2f7f435fe10128cac936ae771376ff5b54e4a07ef996395176db6590a64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220749146e2f7f435fe10128cac936ae771376ff5b54e4a07ef996395176db6590a64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json deleted file mode 100644 index 25624d06..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CheckpointsUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CheckpointsUpgradeable", - "sourceName": "contracts/utils/CheckpointsUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f5b158b322481ad803ef17cb5570e457d882d1a1a91557ed9a35832744bcf1e64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207f5b158b322481ad803ef17cb5570e457d882d1a1a91557ed9a35832744bcf1e64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json deleted file mode 100644 index f1954458..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ClonesUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ClonesUpgradeable", - "sourceName": "contracts/proxy/ClonesUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220328ac965bcf906b22031903e0eaf9e9ffcdbf1751921d8d767b9e8532f047dc664736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220328ac965bcf906b22031903e0eaf9e9ffcdbf1751921d8d767b9e8532f047dc664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json deleted file mode 100644 index 742850cd..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ConditionalEscrowUpgradeable.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ConditionalEscrowUpgradeable", - "sourceName": "contracts/utils/escrow/ConditionalEscrowUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "depositsOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "payee", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "withdrawalAllowed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json deleted file mode 100644 index 889419a8..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CountersUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CountersUpgradeable", - "sourceName": "contracts/utils/CountersUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d8e9a90cd6533f357804be52e54b4b7ba0a73c4aac5a744b588b3c77d9974b1d64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d8e9a90cd6533f357804be52e54b4b7ba0a73c4aac5a744b588b3c77d9974b1d64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json deleted file mode 100644 index 59a8517d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Create2Upgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Create2Upgradeable", - "sourceName": "contracts/utils/Create2Upgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fca76b6dc79f68619e07179495313c8753ee72ebadb67a349f8671f8afe86a7764736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fca76b6dc79f68619e07179495313c8753ee72ebadb67a349f8671f8afe86a7764736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json deleted file mode 100644 index 4e8addc1..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledAMBUpgradeable.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledAMBUpgradeable", - "sourceName": "contracts/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "bridge", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - } - ], - "bytecode": "0x60a0604052348015600f57600080fd5b5060405160bc38038060bc833981016040819052602a91603a565b6001600160a01b03166080526068565b600060208284031215604b57600080fd5b81516001600160a01b0381168114606157600080fd5b9392505050565b608051603f607d60003960005050603f6000f3fe6080604052600080fdfea264697066735822122055111f9525e543b915328ec6b36a1485755c4c5c899bc5b33f8af8630cde300964736f6c634300080d0033", - "deployedBytecode": "0x6080604052600080fdfea264697066735822122055111f9525e543b915328ec6b36a1485755c4c5c899bc5b33f8af8630cde300964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json deleted file mode 100644 index 8de68fe7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL1Upgradeable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledArbitrumL1Upgradeable", - "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json deleted file mode 100644 index 3b327817..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledArbitrumL2Upgradeable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledArbitrumL2Upgradeable", - "sourceName": "contracts/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json deleted file mode 100644 index a0638e5c..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledOptimismUpgradeable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledOptimismUpgradeable", - "sourceName": "contracts/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json deleted file mode 100644 index 274f6616..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledPolygonChildUpgradeable.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledPolygonChildUpgradeable", - "sourceName": "contracts/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "NotCrossChainCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "rootMessageSender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "processMessageFromRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json deleted file mode 100644 index ebc30fa7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/CrossChainEnabledUpgradeable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "CrossChainEnabledUpgradeable", - "sourceName": "contracts/crosschain/CrossChainEnabledUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json deleted file mode 100644 index 37551416..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/DoubleEndedQueueUpgradeable.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "DoubleEndedQueueUpgradeable", - "sourceName": "contracts/utils/structs/DoubleEndedQueueUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "inputs": [], - "name": "OutOfBounds", - "type": "error" - } - ], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122057a588c9a111b42c03d59d2ce19b91c2cc2ae09bc033eb692b49a6e641aec6d164736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122057a588c9a111b42c03d59d2ce19b91c2cc2ae09bc033eb692b49a6e641aec6d164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json deleted file mode 100644 index e329be7f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ECDSAUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ECDSAUpgradeable", - "sourceName": "contracts/utils/cryptography/ECDSAUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122019d381801bc1b029037013fd4ac098817be78995ac3ed49c8c5185ee59aabf8364736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122019d381801bc1b029037013fd4ac098817be78995ac3ed49c8c5185ee59aabf8364736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json deleted file mode 100644 index 8db3e834..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155HolderUpgradeable.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1155HolderUpgradeable", - "sourceName": "contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506103c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212206e6a61bb252ecc01600a8e12e454c166dc137b259467e326ea28a499fcb75eb864736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806301ffc9a714610046578063bc197c811461006e578063f23a6e61146100a6575b600080fd5b6100596100543660046100fc565b6100c5565b60405190151581526020015b60405180910390f35b61008d61007c366004610280565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610065565b61008d6100b436600461032a565b63f23a6e6160e01b95945050505050565b60006001600160e01b03198216630271189760e51b14806100f657506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006020828403121561010e57600080fd5b81356001600160e01b03198116811461012657600080fd5b9392505050565b80356001600160a01b038116811461014457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561018857610188610149565b604052919050565b600082601f8301126101a157600080fd5b8135602067ffffffffffffffff8211156101bd576101bd610149565b8160051b6101cc82820161015f565b92835284810182019282810190878511156101e657600080fd5b83870192505b84831015610205578235825291830191908301906101ec565b979650505050505050565b600082601f83011261022157600080fd5b813567ffffffffffffffff81111561023b5761023b610149565b61024e601f8201601f191660200161015f565b81815284602083860101111561026357600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561029857600080fd5b6102a18661012d565b94506102af6020870161012d565b9350604086013567ffffffffffffffff808211156102cc57600080fd5b6102d889838a01610190565b945060608801359150808211156102ee57600080fd5b6102fa89838a01610190565b9350608088013591508082111561031057600080fd5b5061031d88828901610210565b9150509295509295909350565b600080600080600060a0868803121561034257600080fd5b61034b8661012d565b94506103596020870161012d565b93506040860135925060608601359150608086013567ffffffffffffffff81111561038357600080fd5b61031d8882890161021056fea26469706673582212206e6a61bb252ecc01600a8e12e454c166dc137b259467e326ea28a499fcb75eb864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json deleted file mode 100644 index 8bcc4ed6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PresetMinterPauserUpgradeable.json +++ /dev/null @@ -1,758 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1155PresetMinterPauserUpgradeable", - "sourceName": "contracts/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "burnBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "uri", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "mintBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50612cc8806100206000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80638456cb59116100de578063d539139311610097578063e985e9c511610071578063e985e9c514610377578063f242432a146103b3578063f5298aca146103c6578063f62d1888146103d957600080fd5b8063d53913931461033a578063d547741f1461034f578063e63ab1e91461036257600080fd5b80638456cb59146102c65780639010d07c146102ce57806391d14854146102f9578063a217fddf1461030c578063a22cb46514610314578063ca15c8731461032757600080fd5b80632f2ff15d1161014b5780634e1273f4116101255780634e1273f4146102745780635c975abb146102945780636b20c454146102a0578063731133e9146102b357600080fd5b80632f2ff15d1461024657806336568abe146102595780633f4ba83a1461026c57600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e89341c146101db5780631f7fdffa146101fb578063248a9ca3146102105780632eb2c2d614610233575b600080fd5b6101a56101a0366004611f84565b6103ec565b6040519081526020015b60405180910390f35b6101cb6101c6366004611fc4565b610487565b60405190151581526020016101af565b6101ee6101e9366004611fe1565b610492565b6040516101af9190612052565b61020e6102093660046121b8565b610526565b005b6101a561021e366004611fe1565b60009081526065602052604090206001015490565b61020e610241366004612250565b61056c565b61020e6102543660046122f9565b6105b8565b61020e6102673660046122f9565b6105e2565b61020e610660565b610287610282366004612325565b6106f4565b6040516101af919061242a565b61012d5460ff166101cb565b61020e6102ae36600461243d565b61081d565b61020e6102c13660046124b0565b610860565b61020e6108a0565b6102e16102dc366004612504565b610932565b6040516001600160a01b0390911681526020016101af565b6101cb6103073660046122f9565b610951565b6101a5600081565b61020e610322366004612526565b61097c565b6101a5610335366004611fe1565b610987565b6101a5600080516020612c7383398151915281565b61020e61035d3660046122f9565b61099e565b6101a5600080516020612c5383398151915281565b6101cb610385366004612562565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b61020e6103c136600461258c565b6109c3565b61020e6103d43660046125f0565b610a08565b61020e6103e7366004612623565b610a4b565b60006001600160a01b03831661045c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815260c9602090815260408083206001600160a01b03861684529091529020545b92915050565b600061048182610b5d565b606060cb80546104a190612673565b80601f01602080910402602001604051908101604052809291908181526020018280546104cd90612673565b801561051a5780601f106104ef5761010080835404028352916020019161051a565b820191906000526020600020905b8154815290600101906020018083116104fd57829003601f168201915b50505050509050919050565b61053e600080516020612c7383398151915233610951565b61055a5760405162461bcd60e51b8152600401610453906126ad565b61056684848484610b9d565b50505050565b6001600160a01b03851633148061058857506105888533610385565b6105a45760405162461bcd60e51b81526004016104539061270a565b6105b18585858585610cf8565b5050505050565b6000828152606560205260409020600101546105d381610ea5565b6105dd8383610eb2565b505050565b6001600160a01b03811633146106525760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610453565b61065c8282610ed4565b5050565b610678600080516020612c5383398151915233610951565b6106ea5760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610453565b6106f2610ef6565b565b606081518351146107595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610453565b600083516001600160401b0381111561077457610774612065565b60405190808252806020026020018201604052801561079d578160200160208202803683370190505b50905060005b8451811015610815576107e88582815181106107c1576107c1612758565b60200260200101518583815181106107db576107db612758565b60200260200101516103ec565b8282815181106107fa576107fa612758565b602090810291909101015261080e81612784565b90506107a3565b509392505050565b6001600160a01b03831633148061083957506108398333610385565b6108555760405162461bcd60e51b81526004016104539061270a565b6105dd838383610f49565b610878600080516020612c7383398151915233610951565b6108945760405162461bcd60e51b8152600401610453906126ad565b610566848484846110e8565b6108b8600080516020612c5383398151915233610951565b61092a5760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610453565b6106f26111d3565b600082815260976020526040812061094a9083611211565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61065c33838361121d565b6000818152609760205260408120610481906112fd565b6000828152606560205260409020600101546109b981610ea5565b6105dd8383610ed4565b6001600160a01b0385163314806109df57506109df8533610385565b6109fb5760405162461bcd60e51b81526004016104539061270a565b6105b18585858585611307565b6001600160a01b038316331480610a245750610a248333610385565b610a405760405162461bcd60e51b81526004016104539061270a565b6105dd838383611443565b600054610100900460ff1615808015610a6b5750600054600160ff909116105b80610a855750303b158015610a85575060005460ff166001145b610ae85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610453565b6000805460ff191660011790558015610b0b576000805461ff0019166101001790555b610b148261155f565b801561065c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60006001600160e01b03198216636cdb3d1360e11b1480610b8e57506001600160e01b031982166303a24d0760e21b145b806104815750610481826115a0565b6001600160a01b038416610bc35760405162461bcd60e51b81526004016104539061279d565b8151835114610be45760405162461bcd60e51b8152600401610453906127de565b33610bf4816000878787876115c5565b60005b8451811015610c9057838181518110610c1257610c12612758565b602002602001015160c96000878481518110610c3057610c30612758565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c789190612826565b90915550819050610c8881612784565b915050610bf7565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ce192919061283e565b60405180910390a46105b1816000878787876115d3565b8151835114610d195760405162461bcd60e51b8152600401610453906127de565b6001600160a01b038416610d3f5760405162461bcd60e51b81526004016104539061286c565b33610d4e8187878787876115c5565b60005b8451811015610e37576000858281518110610d6e57610d6e612758565b602002602001015190506000858381518110610d8c57610d8c612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038e168352909352919091205490915081811015610ddd5760405162461bcd60e51b8152600401610453906128b1565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e1c908490612826565b9250508190555050505080610e3090612784565b9050610d51565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e8792919061283e565b60405180910390a4610e9d8187878787876115d3565b505050505050565b610eaf813361172e565b50565b610ebc8282611787565b60008281526097602052604090206105dd908261180d565b610ede8282611822565b60008281526097602052604090206105dd9082611889565b610efe61189e565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f6f5760405162461bcd60e51b8152600401610453906128fb565b8051825114610f905760405162461bcd60e51b8152600401610453906127de565b6000339050610fb3818560008686604051806020016040528060008152506115c5565b60005b835181101561107b576000848281518110610fd357610fd3612758565b602002602001015190506000848381518110610ff157610ff1612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038c1683529093529190912054909150818110156110425760405162461bcd60e51b81526004016104539061293e565b600092835260c9602090815260408085206001600160a01b038b168652909152909220910390558061107381612784565b915050610fb6565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516110cc92919061283e565b60405180910390a4604080516020810190915260009052610566565b6001600160a01b03841661110e5760405162461bcd60e51b81526004016104539061279d565b33600061111a856118e8565b90506000611127856118e8565b9050611138836000898585896115c5565b600086815260c9602090815260408083206001600160a01b038b1684529091528120805487929061116a908490612826565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46111ca83600089898989611933565b50505050505050565b6111db6119ee565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f2c3390565b600061094a8383611a35565b816001600160a01b0316836001600160a01b0316036112905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610453565b6001600160a01b03838116600081815260ca6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610481825490565b6001600160a01b03841661132d5760405162461bcd60e51b81526004016104539061286c565b336000611339856118e8565b90506000611346856118e8565b90506113568389898585896115c5565b600086815260c9602090815260408083206001600160a01b038c168452909152902054858110156113995760405162461bcd60e51b8152600401610453906128b1565b600087815260c9602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906113d8908490612826565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611438848a8a8a8a8a611933565b505050505050505050565b6001600160a01b0383166114695760405162461bcd60e51b8152600401610453906128fb565b336000611475846118e8565b90506000611482846118e8565b90506114a2838760008585604051806020016040528060008152506115c5565b600085815260c9602090815260408083206001600160a01b038a168452909152902054848110156114e55760405162461bcd60e51b81526004016104539061293e565b600086815260c9602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526111ca565b600054610100900460ff166115865760405162461bcd60e51b815260040161045390612982565b61158f81611a5f565b611597611a8f565b610eaf81611ac3565b60006001600160e01b03198216635a05180f60e01b1480610481575061048182611b25565b610e9d868686868686611b5a565b6001600160a01b0384163b15610e9d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061161790899089908890889088906004016129cd565b6020604051808303816000875af1925050508015611652575060408051601f3d908101601f1916820190925261164f91810190612a2b565b60015b6116fe5761165e612a48565b806308c379a0036116975750611672612a64565b8061167d5750611699565b8060405162461bcd60e51b81526004016104539190612052565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610453565b6001600160e01b0319811663bc197c8160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b6117388282610951565b61065c5761174581611bc3565b611750836020611bd5565b604051602001611761929190612b35565b60408051601f198184030181529082905262461bcd60e51b825261045391600401612052565b6117918282610951565b61065c5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117c93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061094a836001600160a01b038416611d70565b61182c8282610951565b1561065c5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061094a836001600160a01b038416611dbf565b61012d5460ff166106f25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610453565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061192257611922612758565b602090810291909101015292915050565b6001600160a01b0384163b15610e9d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906119779089908990889088908890600401612baa565b6020604051808303816000875af19250505080156119b2575060408051601f3d908101601f191682019092526119af91810190612a2b565b60015b6119be5761165e612a48565b6001600160e01b0319811663f23a6e6160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b61012d5460ff16156106f25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610453565b6000826000018281548110611a4c57611a4c612758565b9060005260206000200154905092915050565b600054610100900460ff16611a865760405162461bcd60e51b815260040161045390612982565b610eaf81611eb2565b600054610100900460ff16611ab65760405162461bcd60e51b815260040161045390612982565b61012d805460ff19169055565b600054610100900460ff16611aea5760405162461bcd60e51b815260040161045390612982565b611af5600033611ec5565b611b0d600080516020612c7383398151915233611ec5565b610eaf600080516020612c5383398151915233611ec5565b60006001600160e01b03198216637965db0b60e01b148061048157506301ffc9a760e01b6001600160e01b0319831614610481565b61012d5460ff1615610e9d5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610453565b60606104816001600160a01b03831660145b60606000611be4836002612bef565b611bef906002612826565b6001600160401b03811115611c0657611c06612065565b6040519080825280601f01601f191660200182016040528015611c30576020820181803683370190505b509050600360fc1b81600081518110611c4b57611c4b612758565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c7a57611c7a612758565b60200101906001600160f81b031916908160001a9053506000611c9e846002612bef565b611ca9906001612826565b90505b6001811115611d21576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cdd57611cdd612758565b1a60f81b828281518110611cf357611cf3612758565b60200101906001600160f81b031916908160001a90535060049490941c93611d1a81612c0e565b9050611cac565b50831561094a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610453565b6000818152600183016020526040812054611db757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610481565b506000610481565b60008181526001830160205260408120548015611ea8576000611de3600183612c25565b8554909150600090611df790600190612c25565b9050818114611e5c576000866000018281548110611e1757611e17612758565b9060005260206000200154905080876000018481548110611e3a57611e3a612758565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e6d57611e6d612c3c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610481565b6000915050610481565b805161065c9060cb906020840190611ecf565b61065c8282610eb2565b828054611edb90612673565b90600052602060002090601f016020900481019282611efd5760008555611f43565b82601f10611f1657805160ff1916838001178555611f43565b82800160010185558215611f43579182015b82811115611f43578251825591602001919060010190611f28565b50611f4f929150611f53565b5090565b5b80821115611f4f5760008155600101611f54565b80356001600160a01b0381168114611f7f57600080fd5b919050565b60008060408385031215611f9757600080fd5b611fa083611f68565b946020939093013593505050565b6001600160e01b031981168114610eaf57600080fd5b600060208284031215611fd657600080fd5b813561094a81611fae565b600060208284031215611ff357600080fd5b5035919050565b60005b83811015612015578181015183820152602001611ffd565b838111156105665750506000910152565b6000815180845261203e816020860160208601611ffa565b601f01601f19169290920160200192915050565b60208152600061094a6020830184612026565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156120a0576120a0612065565b6040525050565b60006001600160401b038211156120c0576120c0612065565b5060051b60200190565b600082601f8301126120db57600080fd5b813560206120e8826120a7565b6040516120f5828261207b565b83815260059390931b850182019282810191508684111561211557600080fd5b8286015b848110156121305780358352918301918301612119565b509695505050505050565b60006001600160401b0383111561215457612154612065565b60405161216b601f8501601f19166020018261207b565b80915083815284848401111561218057600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126121a957600080fd5b61094a8383356020850161213b565b600080600080608085870312156121ce57600080fd5b6121d785611f68565b935060208501356001600160401b03808211156121f357600080fd5b6121ff888389016120ca565b9450604087013591508082111561221557600080fd5b612221888389016120ca565b9350606087013591508082111561223757600080fd5b5061224487828801612198565b91505092959194509250565b600080600080600060a0868803121561226857600080fd5b61227186611f68565b945061227f60208701611f68565b935060408601356001600160401b038082111561229b57600080fd5b6122a789838a016120ca565b945060608801359150808211156122bd57600080fd5b6122c989838a016120ca565b935060808801359150808211156122df57600080fd5b506122ec88828901612198565b9150509295509295909350565b6000806040838503121561230c57600080fd5b8235915061231c60208401611f68565b90509250929050565b6000806040838503121561233857600080fd5b82356001600160401b038082111561234f57600080fd5b818501915085601f83011261236357600080fd5b81356020612370826120a7565b60405161237d828261207b565b83815260059390931b850182019282810191508984111561239d57600080fd5b948201945b838610156123c2576123b386611f68565b825294820194908201906123a2565b965050860135925050808211156123d857600080fd5b506123e5858286016120ca565b9150509250929050565b600081518084526020808501945080840160005b8381101561241f57815187529582019590820190600101612403565b509495945050505050565b60208152600061094a60208301846123ef565b60008060006060848603121561245257600080fd5b61245b84611f68565b925060208401356001600160401b038082111561247757600080fd5b612483878388016120ca565b9350604086013591508082111561249957600080fd5b506124a6868287016120ca565b9150509250925092565b600080600080608085870312156124c657600080fd5b6124cf85611f68565b9350602085013592506040850135915060608501356001600160401b038111156124f857600080fd5b61224487828801612198565b6000806040838503121561251757600080fd5b50508035926020909101359150565b6000806040838503121561253957600080fd5b61254283611f68565b91506020830135801515811461255757600080fd5b809150509250929050565b6000806040838503121561257557600080fd5b61257e83611f68565b915061231c60208401611f68565b600080600080600060a086880312156125a457600080fd5b6125ad86611f68565b94506125bb60208701611f68565b9350604086013592506060860135915060808601356001600160401b038111156125e457600080fd5b6122ec88828901612198565b60008060006060848603121561260557600080fd5b61260e84611f68565b95602085013595506040909401359392505050565b60006020828403121561263557600080fd5b81356001600160401b0381111561264b57600080fd5b8201601f8101841361265c57600080fd5b61266b8482356020840161213b565b949350505050565b600181811c9082168061268757607f821691505b6020821081036126a757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016127965761279661276e565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b600082198211156128395761283961276e565b500190565b60408152600061285160408301856123ef565b828103602084015261286381856123ef565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906129f9908301866123ef565b8281036060840152612a0b81866123ef565b90508281036080840152612a1f8185612026565b98975050505050505050565b600060208284031215612a3d57600080fd5b815161094a81611fae565b600060033d1115612a615760046000803e5060005160e01c5b90565b600060443d1015612a725790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612aa157505050505090565b8285019150815181811115612ab95750505050505090565b843d8701016020828501011115612ad35750505050505090565b612ae26020828601018761207b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b6d816017850160208801611ffa565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b9e816028840160208801611ffa565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612be490830184612026565b979650505050505050565b6000816000190483118215151615612c0957612c0961276e565b500290565b600081612c1d57612c1d61276e565b506000190190565b600082821015612c3757612c3761276e565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122074f93d3dbfcdae138425e5464f7a9ba83401fdaeebe9f4d4654f70483311cf7464736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c80638456cb59116100de578063d539139311610097578063e985e9c511610071578063e985e9c514610377578063f242432a146103b3578063f5298aca146103c6578063f62d1888146103d957600080fd5b8063d53913931461033a578063d547741f1461034f578063e63ab1e91461036257600080fd5b80638456cb59146102c65780639010d07c146102ce57806391d14854146102f9578063a217fddf1461030c578063a22cb46514610314578063ca15c8731461032757600080fd5b80632f2ff15d1161014b5780634e1273f4116101255780634e1273f4146102745780635c975abb146102945780636b20c454146102a0578063731133e9146102b357600080fd5b80632f2ff15d1461024657806336568abe146102595780633f4ba83a1461026c57600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e89341c146101db5780631f7fdffa146101fb578063248a9ca3146102105780632eb2c2d614610233575b600080fd5b6101a56101a0366004611f84565b6103ec565b6040519081526020015b60405180910390f35b6101cb6101c6366004611fc4565b610487565b60405190151581526020016101af565b6101ee6101e9366004611fe1565b610492565b6040516101af9190612052565b61020e6102093660046121b8565b610526565b005b6101a561021e366004611fe1565b60009081526065602052604090206001015490565b61020e610241366004612250565b61056c565b61020e6102543660046122f9565b6105b8565b61020e6102673660046122f9565b6105e2565b61020e610660565b610287610282366004612325565b6106f4565b6040516101af919061242a565b61012d5460ff166101cb565b61020e6102ae36600461243d565b61081d565b61020e6102c13660046124b0565b610860565b61020e6108a0565b6102e16102dc366004612504565b610932565b6040516001600160a01b0390911681526020016101af565b6101cb6103073660046122f9565b610951565b6101a5600081565b61020e610322366004612526565b61097c565b6101a5610335366004611fe1565b610987565b6101a5600080516020612c7383398151915281565b61020e61035d3660046122f9565b61099e565b6101a5600080516020612c5383398151915281565b6101cb610385366004612562565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b61020e6103c136600461258c565b6109c3565b61020e6103d43660046125f0565b610a08565b61020e6103e7366004612623565b610a4b565b60006001600160a01b03831661045c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b50600081815260c9602090815260408083206001600160a01b03861684529091529020545b92915050565b600061048182610b5d565b606060cb80546104a190612673565b80601f01602080910402602001604051908101604052809291908181526020018280546104cd90612673565b801561051a5780601f106104ef5761010080835404028352916020019161051a565b820191906000526020600020905b8154815290600101906020018083116104fd57829003601f168201915b50505050509050919050565b61053e600080516020612c7383398151915233610951565b61055a5760405162461bcd60e51b8152600401610453906126ad565b61056684848484610b9d565b50505050565b6001600160a01b03851633148061058857506105888533610385565b6105a45760405162461bcd60e51b81526004016104539061270a565b6105b18585858585610cf8565b5050505050565b6000828152606560205260409020600101546105d381610ea5565b6105dd8383610eb2565b505050565b6001600160a01b03811633146106525760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610453565b61065c8282610ed4565b5050565b610678600080516020612c5383398151915233610951565b6106ea5760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610453565b6106f2610ef6565b565b606081518351146107595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610453565b600083516001600160401b0381111561077457610774612065565b60405190808252806020026020018201604052801561079d578160200160208202803683370190505b50905060005b8451811015610815576107e88582815181106107c1576107c1612758565b60200260200101518583815181106107db576107db612758565b60200260200101516103ec565b8282815181106107fa576107fa612758565b602090810291909101015261080e81612784565b90506107a3565b509392505050565b6001600160a01b03831633148061083957506108398333610385565b6108555760405162461bcd60e51b81526004016104539061270a565b6105dd838383610f49565b610878600080516020612c7383398151915233610951565b6108945760405162461bcd60e51b8152600401610453906126ad565b610566848484846110e8565b6108b8600080516020612c5383398151915233610951565b61092a5760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610453565b6106f26111d3565b600082815260976020526040812061094a9083611211565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61065c33838361121d565b6000818152609760205260408120610481906112fd565b6000828152606560205260409020600101546109b981610ea5565b6105dd8383610ed4565b6001600160a01b0385163314806109df57506109df8533610385565b6109fb5760405162461bcd60e51b81526004016104539061270a565b6105b18585858585611307565b6001600160a01b038316331480610a245750610a248333610385565b610a405760405162461bcd60e51b81526004016104539061270a565b6105dd838383611443565b600054610100900460ff1615808015610a6b5750600054600160ff909116105b80610a855750303b158015610a85575060005460ff166001145b610ae85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610453565b6000805460ff191660011790558015610b0b576000805461ff0019166101001790555b610b148261155f565b801561065c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60006001600160e01b03198216636cdb3d1360e11b1480610b8e57506001600160e01b031982166303a24d0760e21b145b806104815750610481826115a0565b6001600160a01b038416610bc35760405162461bcd60e51b81526004016104539061279d565b8151835114610be45760405162461bcd60e51b8152600401610453906127de565b33610bf4816000878787876115c5565b60005b8451811015610c9057838181518110610c1257610c12612758565b602002602001015160c96000878481518110610c3057610c30612758565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610c789190612826565b90915550819050610c8881612784565b915050610bf7565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610ce192919061283e565b60405180910390a46105b1816000878787876115d3565b8151835114610d195760405162461bcd60e51b8152600401610453906127de565b6001600160a01b038416610d3f5760405162461bcd60e51b81526004016104539061286c565b33610d4e8187878787876115c5565b60005b8451811015610e37576000858281518110610d6e57610d6e612758565b602002602001015190506000858381518110610d8c57610d8c612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038e168352909352919091205490915081811015610ddd5760405162461bcd60e51b8152600401610453906128b1565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e1c908490612826565b9250508190555050505080610e3090612784565b9050610d51565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e8792919061283e565b60405180910390a4610e9d8187878787876115d3565b505050505050565b610eaf813361172e565b50565b610ebc8282611787565b60008281526097602052604090206105dd908261180d565b610ede8282611822565b60008281526097602052604090206105dd9082611889565b610efe61189e565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610f6f5760405162461bcd60e51b8152600401610453906128fb565b8051825114610f905760405162461bcd60e51b8152600401610453906127de565b6000339050610fb3818560008686604051806020016040528060008152506115c5565b60005b835181101561107b576000848281518110610fd357610fd3612758565b602002602001015190506000848381518110610ff157610ff1612758565b602090810291909101810151600084815260c9835260408082206001600160a01b038c1683529093529190912054909150818110156110425760405162461bcd60e51b81526004016104539061293e565b600092835260c9602090815260408085206001600160a01b038b168652909152909220910390558061107381612784565b915050610fb6565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516110cc92919061283e565b60405180910390a4604080516020810190915260009052610566565b6001600160a01b03841661110e5760405162461bcd60e51b81526004016104539061279d565b33600061111a856118e8565b90506000611127856118e8565b9050611138836000898585896115c5565b600086815260c9602090815260408083206001600160a01b038b1684529091528120805487929061116a908490612826565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46111ca83600089898989611933565b50505050505050565b6111db6119ee565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f2c3390565b600061094a8383611a35565b816001600160a01b0316836001600160a01b0316036112905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610453565b6001600160a01b03838116600081815260ca6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610481825490565b6001600160a01b03841661132d5760405162461bcd60e51b81526004016104539061286c565b336000611339856118e8565b90506000611346856118e8565b90506113568389898585896115c5565b600086815260c9602090815260408083206001600160a01b038c168452909152902054858110156113995760405162461bcd60e51b8152600401610453906128b1565b600087815260c9602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906113d8908490612826565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611438848a8a8a8a8a611933565b505050505050505050565b6001600160a01b0383166114695760405162461bcd60e51b8152600401610453906128fb565b336000611475846118e8565b90506000611482846118e8565b90506114a2838760008585604051806020016040528060008152506115c5565b600085815260c9602090815260408083206001600160a01b038a168452909152902054848110156114e55760405162461bcd60e51b81526004016104539061293e565b600086815260c9602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526111ca565b600054610100900460ff166115865760405162461bcd60e51b815260040161045390612982565b61158f81611a5f565b611597611a8f565b610eaf81611ac3565b60006001600160e01b03198216635a05180f60e01b1480610481575061048182611b25565b610e9d868686868686611b5a565b6001600160a01b0384163b15610e9d5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061161790899089908890889088906004016129cd565b6020604051808303816000875af1925050508015611652575060408051601f3d908101601f1916820190925261164f91810190612a2b565b60015b6116fe5761165e612a48565b806308c379a0036116975750611672612a64565b8061167d5750611699565b8060405162461bcd60e51b81526004016104539190612052565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610453565b6001600160e01b0319811663bc197c8160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b6117388282610951565b61065c5761174581611bc3565b611750836020611bd5565b604051602001611761929190612b35565b60408051601f198184030181529082905262461bcd60e51b825261045391600401612052565b6117918282610951565b61065c5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556117c93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061094a836001600160a01b038416611d70565b61182c8282610951565b1561065c5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061094a836001600160a01b038416611dbf565b61012d5460ff166106f25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610453565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061192257611922612758565b602090810291909101015292915050565b6001600160a01b0384163b15610e9d5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906119779089908990889088908890600401612baa565b6020604051808303816000875af19250505080156119b2575060408051601f3d908101601f191682019092526119af91810190612a2b565b60015b6119be5761165e612a48565b6001600160e01b0319811663f23a6e6160e01b146111ca5760405162461bcd60e51b815260040161045390612aed565b61012d5460ff16156106f25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610453565b6000826000018281548110611a4c57611a4c612758565b9060005260206000200154905092915050565b600054610100900460ff16611a865760405162461bcd60e51b815260040161045390612982565b610eaf81611eb2565b600054610100900460ff16611ab65760405162461bcd60e51b815260040161045390612982565b61012d805460ff19169055565b600054610100900460ff16611aea5760405162461bcd60e51b815260040161045390612982565b611af5600033611ec5565b611b0d600080516020612c7383398151915233611ec5565b610eaf600080516020612c5383398151915233611ec5565b60006001600160e01b03198216637965db0b60e01b148061048157506301ffc9a760e01b6001600160e01b0319831614610481565b61012d5460ff1615610e9d5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610453565b60606104816001600160a01b03831660145b60606000611be4836002612bef565b611bef906002612826565b6001600160401b03811115611c0657611c06612065565b6040519080825280601f01601f191660200182016040528015611c30576020820181803683370190505b509050600360fc1b81600081518110611c4b57611c4b612758565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c7a57611c7a612758565b60200101906001600160f81b031916908160001a9053506000611c9e846002612bef565b611ca9906001612826565b90505b6001811115611d21576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cdd57611cdd612758565b1a60f81b828281518110611cf357611cf3612758565b60200101906001600160f81b031916908160001a90535060049490941c93611d1a81612c0e565b9050611cac565b50831561094a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610453565b6000818152600183016020526040812054611db757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610481565b506000610481565b60008181526001830160205260408120548015611ea8576000611de3600183612c25565b8554909150600090611df790600190612c25565b9050818114611e5c576000866000018281548110611e1757611e17612758565b9060005260206000200154905080876000018481548110611e3a57611e3a612758565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e6d57611e6d612c3c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610481565b6000915050610481565b805161065c9060cb906020840190611ecf565b61065c8282610eb2565b828054611edb90612673565b90600052602060002090601f016020900481019282611efd5760008555611f43565b82601f10611f1657805160ff1916838001178555611f43565b82800160010185558215611f43579182015b82811115611f43578251825591602001919060010190611f28565b50611f4f929150611f53565b5090565b5b80821115611f4f5760008155600101611f54565b80356001600160a01b0381168114611f7f57600080fd5b919050565b60008060408385031215611f9757600080fd5b611fa083611f68565b946020939093013593505050565b6001600160e01b031981168114610eaf57600080fd5b600060208284031215611fd657600080fd5b813561094a81611fae565b600060208284031215611ff357600080fd5b5035919050565b60005b83811015612015578181015183820152602001611ffd565b838111156105665750506000910152565b6000815180845261203e816020860160208601611ffa565b601f01601f19169290920160200192915050565b60208152600061094a6020830184612026565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156120a0576120a0612065565b6040525050565b60006001600160401b038211156120c0576120c0612065565b5060051b60200190565b600082601f8301126120db57600080fd5b813560206120e8826120a7565b6040516120f5828261207b565b83815260059390931b850182019282810191508684111561211557600080fd5b8286015b848110156121305780358352918301918301612119565b509695505050505050565b60006001600160401b0383111561215457612154612065565b60405161216b601f8501601f19166020018261207b565b80915083815284848401111561218057600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126121a957600080fd5b61094a8383356020850161213b565b600080600080608085870312156121ce57600080fd5b6121d785611f68565b935060208501356001600160401b03808211156121f357600080fd5b6121ff888389016120ca565b9450604087013591508082111561221557600080fd5b612221888389016120ca565b9350606087013591508082111561223757600080fd5b5061224487828801612198565b91505092959194509250565b600080600080600060a0868803121561226857600080fd5b61227186611f68565b945061227f60208701611f68565b935060408601356001600160401b038082111561229b57600080fd5b6122a789838a016120ca565b945060608801359150808211156122bd57600080fd5b6122c989838a016120ca565b935060808801359150808211156122df57600080fd5b506122ec88828901612198565b9150509295509295909350565b6000806040838503121561230c57600080fd5b8235915061231c60208401611f68565b90509250929050565b6000806040838503121561233857600080fd5b82356001600160401b038082111561234f57600080fd5b818501915085601f83011261236357600080fd5b81356020612370826120a7565b60405161237d828261207b565b83815260059390931b850182019282810191508984111561239d57600080fd5b948201945b838610156123c2576123b386611f68565b825294820194908201906123a2565b965050860135925050808211156123d857600080fd5b506123e5858286016120ca565b9150509250929050565b600081518084526020808501945080840160005b8381101561241f57815187529582019590820190600101612403565b509495945050505050565b60208152600061094a60208301846123ef565b60008060006060848603121561245257600080fd5b61245b84611f68565b925060208401356001600160401b038082111561247757600080fd5b612483878388016120ca565b9350604086013591508082111561249957600080fd5b506124a6868287016120ca565b9150509250925092565b600080600080608085870312156124c657600080fd5b6124cf85611f68565b9350602085013592506040850135915060608501356001600160401b038111156124f857600080fd5b61224487828801612198565b6000806040838503121561251757600080fd5b50508035926020909101359150565b6000806040838503121561253957600080fd5b61254283611f68565b91506020830135801515811461255757600080fd5b809150509250929050565b6000806040838503121561257557600080fd5b61257e83611f68565b915061231c60208401611f68565b600080600080600060a086880312156125a457600080fd5b6125ad86611f68565b94506125bb60208701611f68565b9350604086013592506060860135915060808601356001600160401b038111156125e457600080fd5b6122ec88828901612198565b60008060006060848603121561260557600080fd5b61260e84611f68565b95602085013595506040909401359392505050565b60006020828403121561263557600080fd5b81356001600160401b0381111561264b57600080fd5b8201601f8101841361265c57600080fd5b61266b8482356020840161213b565b949350505050565b600181811c9082168061268757607f821691505b6020821081036126a757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201527f455243313135355072657365744d696e7465725061757365723a206d7573742060408201527f68617665206d696e74657220726f6c6520746f206d696e740000000000000000606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016127965761279661276e565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b600082198211156128395761283961276e565b500190565b60408152600061285160408301856123ef565b828103602084015261286381856123ef565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906129f9908301866123ef565b8281036060840152612a0b81866123ef565b90508281036080840152612a1f8185612026565b98975050505050505050565b600060208284031215612a3d57600080fd5b815161094a81611fae565b600060033d1115612a615760046000803e5060005160e01c5b90565b600060443d1015612a725790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715612aa157505050505090565b8285019150815181811115612ab95750505050505090565b843d8701016020828501011115612ad35750505050505090565b612ae26020828601018761207b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b6d816017850160208801611ffa565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b9e816028840160208801611ffa565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612be490830184612026565b979650505050505050565b6000816000190483118215151615612c0957612c0961276e565b500290565b600081612c1d57612c1d61276e565b506000190190565b600082821015612c3757612c3761276e565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a264697066735822122074f93d3dbfcdae138425e5464f7a9ba83401fdaeebe9f4d4654f70483311cf7464736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json deleted file mode 100644 index 5287fec6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155Upgradeable.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1155Upgradeable", - "sourceName": "contracts/token/ERC1155/ERC1155Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "uri", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50611391806100206000396000f3fe608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b48565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b8b565b610224565b60405190151581526020016100a9565b6100e86100e3366004610baf565b610276565b6040516100a99190610c15565b610108610103366004610d74565b61030a565b005b61011d610118366004610e1e565b610356565b6040516100a99190610f24565b610108610138366004610f37565b610480565b6100c561014b366004610f73565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b610108610187366004610fa6565b61048f565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025557506001600160e01b031982166303a24d0760e21b145b8061027057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060606780546102859061100b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b19061100b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103265750610326853361014b565b6103425760405162461bcd60e51b81526004016101f390611045565b61034f85858585856104d4565b5050505050565b606081518351146103bb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d7576103d7610c28565b604051908082528060200260200182016040528015610400578160200160208202803683370190505b50905060005b84518110156104785761044b85828151811061042457610424611093565b602002602001015185838151811061043e5761043e611093565b602002602001015161018c565b82828151811061045d5761045d611093565b6020908102919091010152610471816110bf565b9050610406565b509392505050565b61048b3383836106b4565b5050565b6001600160a01b0385163314806104ab57506104ab853361014b565b6104c75760405162461bcd60e51b81526004016101f390611045565b61034f8585858585610794565b81518351146105365760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055c5760405162461bcd60e51b81526004016101f3906110d8565b3360005b845181101561064657600085828151811061057d5761057d611093565b60200260200101519050600085838151811061059b5761059b611093565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156105ec5760405162461bcd60e51b81526004016101f39061111d565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062b908490611167565b925050819055505050508061063f906110bf565b9050610560565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161069692919061117f565b60405180910390a46106ac8187878787876108c2565b505050505050565b816001600160a01b0316836001600160a01b0316036107275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107ba5760405162461bcd60e51b81526004016101f3906110d8565b3360006107c685610a26565b905060006107d385610a26565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156108185760405162461bcd60e51b81526004016101f39061111d565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610857908490611167565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108b7848a8a8a8a8a610a71565b505050505050505050565b6001600160a01b0384163b156106ac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061090690899089908890889088906004016111ad565b6020604051808303816000875af1925050508015610941575060408051601f3d908101601f1916820190925261093e9181019061120b565b60015b6109ed5761094d611228565b806308c379a0036109865750610961611244565b8061096c5750610988565b8060405162461bcd60e51b81526004016101f39190610c15565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a6057610a60611093565b602090810291909101015292915050565b6001600160a01b0384163b156106ac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610ab59089908990889088908890600401611316565b6020604051808303816000875af1925050508015610af0575060408051601f3d908101601f19168201909252610aed9181019061120b565b60015b610afc5761094d611228565b6001600160e01b0319811663f23a6e6160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b80356001600160a01b0381168114610b4357600080fd5b919050565b60008060408385031215610b5b57600080fd5b610b6483610b2c565b946020939093013593505050565b6001600160e01b031981168114610b8857600080fd5b50565b600060208284031215610b9d57600080fd5b8135610ba881610b72565b9392505050565b600060208284031215610bc157600080fd5b5035919050565b6000815180845260005b81811015610bee57602081850181015186830182015201610bd2565b81811115610c00576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610ba86020830184610bc8565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c6457610c64610c28565b6040525050565b600067ffffffffffffffff821115610c8557610c85610c28565b5060051b60200190565b600082601f830112610ca057600080fd5b81356020610cad82610c6b565b604051610cba8282610c3e565b83815260059390931b8501820192828101915086841115610cda57600080fd5b8286015b84811015610cf55780358352918301918301610cde565b509695505050505050565b600082601f830112610d1157600080fd5b813567ffffffffffffffff811115610d2b57610d2b610c28565b604051610d42601f8301601f191660200182610c3e565b818152846020838601011115610d5757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8c57600080fd5b610d9586610b2c565b9450610da360208701610b2c565b9350604086013567ffffffffffffffff80821115610dc057600080fd5b610dcc89838a01610c8f565b94506060880135915080821115610de257600080fd5b610dee89838a01610c8f565b93506080880135915080821115610e0457600080fd5b50610e1188828901610d00565b9150509295509295909350565b60008060408385031215610e3157600080fd5b823567ffffffffffffffff80821115610e4957600080fd5b818501915085601f830112610e5d57600080fd5b81356020610e6a82610c6b565b604051610e778282610c3e565b83815260059390931b8501820192828101915089841115610e9757600080fd5b948201945b83861015610ebc57610ead86610b2c565b82529482019490820190610e9c565b96505086013592505080821115610ed257600080fd5b50610edf85828601610c8f565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1957815187529582019590820190600101610efd565b509495945050505050565b602081526000610ba86020830184610ee9565b60008060408385031215610f4a57600080fd5b610f5383610b2c565b915060208301358015158114610f6857600080fd5b809150509250929050565b60008060408385031215610f8657600080fd5b610f8f83610b2c565b9150610f9d60208401610b2c565b90509250929050565b600080600080600060a08688031215610fbe57600080fd5b610fc786610b2c565b9450610fd560208701610b2c565b93506040860135925060608601359150608086013567ffffffffffffffff811115610fff57600080fd5b610e1188828901610d00565b600181811c9082168061101f57607f821691505b60208210810361103f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110d1576110d16110a9565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561117a5761117a6110a9565b500190565b6040815260006111926040830185610ee9565b82810360208401526111a48185610ee9565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d990830186610ee9565b82810360608401526111eb8186610ee9565b905082810360808401526111ff8185610bc8565b98975050505050505050565b60006020828403121561121d57600080fd5b8151610ba881610b72565b600060033d11156112415760046000803e5060005160e01c5b90565b600060443d10156112525790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561128257505050505090565b828501915081518181111561129a5750505050505090565b843d87010160208285010111156112b45750505050505090565b6112c360208286010187610c3e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061135090830184610bc8565b97965050505050505056fea264697066735822122048baeabcd335b4b451538fdaca556a38845619bd9e68ebd583bca8ba11d4a90264736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100875760003560e01c80634e1273f41161005b5780634e1273f41461010a578063a22cb4651461012a578063e985e9c51461013d578063f242432a1461017957600080fd5b8062fdd58e1461008c57806301ffc9a7146100b25780630e89341c146100d55780632eb2c2d6146100f5575b600080fd5b61009f61009a366004610b48565b61018c565b6040519081526020015b60405180910390f35b6100c56100c0366004610b8b565b610224565b60405190151581526020016100a9565b6100e86100e3366004610baf565b610276565b6040516100a99190610c15565b610108610103366004610d74565b61030a565b005b61011d610118366004610e1e565b610356565b6040516100a99190610f24565b610108610138366004610f37565b610480565b6100c561014b366004610f73565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b610108610187366004610fa6565b61048f565b60006001600160a01b0383166101fc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061025557506001600160e01b031982166303a24d0760e21b145b8061027057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060606780546102859061100b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b19061100b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b50505050509050919050565b6001600160a01b0385163314806103265750610326853361014b565b6103425760405162461bcd60e51b81526004016101f390611045565b61034f85858585856104d4565b5050505050565b606081518351146103bb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016101f3565b6000835167ffffffffffffffff8111156103d7576103d7610c28565b604051908082528060200260200182016040528015610400578160200160208202803683370190505b50905060005b84518110156104785761044b85828151811061042457610424611093565b602002602001015185838151811061043e5761043e611093565b602002602001015161018c565b82828151811061045d5761045d611093565b6020908102919091010152610471816110bf565b9050610406565b509392505050565b61048b3383836106b4565b5050565b6001600160a01b0385163314806104ab57506104ab853361014b565b6104c75760405162461bcd60e51b81526004016101f390611045565b61034f8585858585610794565b81518351146105365760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016101f3565b6001600160a01b03841661055c5760405162461bcd60e51b81526004016101f3906110d8565b3360005b845181101561064657600085828151811061057d5761057d611093565b60200260200101519050600085838151811061059b5761059b611093565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156105ec5760405162461bcd60e51b81526004016101f39061111d565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061062b908490611167565b925050819055505050508061063f906110bf565b9050610560565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161069692919061117f565b60405180910390a46106ac8187878787876108c2565b505050505050565b816001600160a01b0316836001600160a01b0316036107275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016101f3565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166107ba5760405162461bcd60e51b81526004016101f3906110d8565b3360006107c685610a26565b905060006107d385610a26565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156108185760405162461bcd60e51b81526004016101f39061111d565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610857908490611167565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108b7848a8a8a8a8a610a71565b505050505050505050565b6001600160a01b0384163b156106ac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061090690899089908890889088906004016111ad565b6020604051808303816000875af1925050508015610941575060408051601f3d908101601f1916820190925261093e9181019061120b565b60015b6109ed5761094d611228565b806308c379a0036109865750610961611244565b8061096c5750610988565b8060405162461bcd60e51b81526004016101f39190610c15565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016101f3565b6001600160e01b0319811663bc197c8160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b50505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610a6057610a60611093565b602090810291909101015292915050565b6001600160a01b0384163b156106ac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610ab59089908990889088908890600401611316565b6020604051808303816000875af1925050508015610af0575060408051601f3d908101601f19168201909252610aed9181019061120b565b60015b610afc5761094d611228565b6001600160e01b0319811663f23a6e6160e01b14610a1d5760405162461bcd60e51b81526004016101f3906112ce565b80356001600160a01b0381168114610b4357600080fd5b919050565b60008060408385031215610b5b57600080fd5b610b6483610b2c565b946020939093013593505050565b6001600160e01b031981168114610b8857600080fd5b50565b600060208284031215610b9d57600080fd5b8135610ba881610b72565b9392505050565b600060208284031215610bc157600080fd5b5035919050565b6000815180845260005b81811015610bee57602081850181015186830182015201610bd2565b81811115610c00576000602083870101525b50601f01601f19169290920160200192915050565b602081526000610ba86020830184610bc8565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610c6457610c64610c28565b6040525050565b600067ffffffffffffffff821115610c8557610c85610c28565b5060051b60200190565b600082601f830112610ca057600080fd5b81356020610cad82610c6b565b604051610cba8282610c3e565b83815260059390931b8501820192828101915086841115610cda57600080fd5b8286015b84811015610cf55780358352918301918301610cde565b509695505050505050565b600082601f830112610d1157600080fd5b813567ffffffffffffffff811115610d2b57610d2b610c28565b604051610d42601f8301601f191660200182610c3e565b818152846020838601011115610d5757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610d8c57600080fd5b610d9586610b2c565b9450610da360208701610b2c565b9350604086013567ffffffffffffffff80821115610dc057600080fd5b610dcc89838a01610c8f565b94506060880135915080821115610de257600080fd5b610dee89838a01610c8f565b93506080880135915080821115610e0457600080fd5b50610e1188828901610d00565b9150509295509295909350565b60008060408385031215610e3157600080fd5b823567ffffffffffffffff80821115610e4957600080fd5b818501915085601f830112610e5d57600080fd5b81356020610e6a82610c6b565b604051610e778282610c3e565b83815260059390931b8501820192828101915089841115610e9757600080fd5b948201945b83861015610ebc57610ead86610b2c565b82529482019490820190610e9c565b96505086013592505080821115610ed257600080fd5b50610edf85828601610c8f565b9150509250929050565b600081518084526020808501945080840160005b83811015610f1957815187529582019590820190600101610efd565b509495945050505050565b602081526000610ba86020830184610ee9565b60008060408385031215610f4a57600080fd5b610f5383610b2c565b915060208301358015158114610f6857600080fd5b809150509250929050565b60008060408385031215610f8657600080fd5b610f8f83610b2c565b9150610f9d60208401610b2c565b90509250929050565b600080600080600060a08688031215610fbe57600080fd5b610fc786610b2c565b9450610fd560208701610b2c565b93506040860135925060608601359150608086013567ffffffffffffffff811115610fff57600080fd5b610e1188828901610d00565b600181811c9082168061101f57607f821691505b60208210810361103f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110d1576110d16110a9565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561117a5761117a6110a9565b500190565b6040815260006111926040830185610ee9565b82810360208401526111a48185610ee9565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906111d990830186610ee9565b82810360608401526111eb8186610ee9565b905082810360808401526111ff8185610bc8565b98975050505050505050565b60006020828403121561121d57600080fd5b8151610ba881610b72565b600060033d11156112415760046000803e5060005160e01c5b90565b600060443d10156112525790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561128257505050505090565b828501915081518181111561129a5750505050505090565b843d87010160208285010111156112b45750505050505090565b6112c360208286010187610c3e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061135090830184610bc8565b97965050505050505056fea264697066735822122048baeabcd335b4b451538fdaca556a38845619bd9e68ebd583bca8ba11d4a90264736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json deleted file mode 100644 index c060f620..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165CheckerUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC165CheckerUpgradeable", - "sourceName": "contracts/utils/introspection/ERC165CheckerUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fe28359dee6c74265ce775dd8efc5b7e6e59cd63eb268e2b84d07dd295b1935d64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fe28359dee6c74265ce775dd8efc5b7e6e59cd63eb268e2b84d07dd295b1935d64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json deleted file mode 100644 index 536fc09f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1820ImplementerUpgradeable.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC1820ImplementerUpgradeable", - "sourceName": "contracts/utils/introspection/ERC1820ImplementerUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "interfaceHash", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "canImplementInterfaceForAddress", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610116806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a6565b604e565b60405190815260200160405180910390f35b60008281526001602090815260408083206001600160a01b038516845290915281205460ff16607d576000609f565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b857600080fd5b8235915060208301356001600160a01b038116811460d557600080fd5b80915050925092905056fea264697066735822122023bc29a9009419670808fd66fea6d23d162e097c5da87a0ee6754383f5ae39b264736f6c634300080d0033", - "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063249cb3fa14602d575b600080fd5b603c603836600460a6565b604e565b60405190815260200160405180910390f35b60008281526001602090815260408083206001600160a01b038516845290915281205460ff16607d576000609f565b7fa2ef4600d742022d532d4747cb3547474667d6f13804902513b2ec01c848f4b45b9392505050565b6000806040838503121560b857600080fd5b8235915060208301356001600160a01b038116811460d557600080fd5b80915050925092905056fea264697066735822122023bc29a9009419670808fd66fea6d23d162e097c5da87a0ee6754383f5ae39b264736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json deleted file mode 100644 index 76b0b81d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetFixedSupplyUpgradeable.json +++ /dev/null @@ -1,353 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20PresetFixedSupplyUpgradeable", - "sourceName": "contracts/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610ee6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146101d0578063a9059cbb146101e3578063bd3a13f6146101f6578063dd62ed3e1461020957600080fd5b806370a082311461018c57806379cc6790146101b557806395d89b41146101c857600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806342966c681461017757600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f761021c565b6040516101049190610b9f565b60405180910390f35b61012061011b366004610c10565b6102ae565b6040519015158152602001610104565b6035545b604051908152602001610104565b610120610150366004610c3a565b6102c6565b60405160128152602001610104565b610120610172366004610c10565b6102ea565b61018a610185366004610c76565b61030c565b005b61013461019a366004610c8f565b6001600160a01b031660009081526033602052604090205490565b61018a6101c3366004610c10565b610319565b6100f7610332565b6101206101de366004610c10565b610341565b6101206101f1366004610c10565b6103c1565b61018a610204366004610d54565b6103cf565b610134610217366004610dd2565b6104e8565b60606036805461022b90610e05565b80601f016020809104026020016040519081016040528092919081815260200182805461025790610e05565b80156102a45780601f10610279576101008083540402835291602001916102a4565b820191906000526020600020905b81548152906001019060200180831161028757829003601f168201915b5050505050905090565b6000336102bc818585610513565b5060019392505050565b6000336102d4858285610638565b6102df8585856106b2565b506001949350505050565b6000336102bc8185856102fd83836104e8565b6103079190610e3f565b610513565b610316338261085d565b50565b610324823383610638565b61032e828261085d565b5050565b60606037805461022b90610e05565b6000338161034f82866104e8565b9050838110156103b45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102df8286868403610513565b6000336102bc8185856106b2565b600054610100900460ff16158080156103ef5750600054600160ff909116105b806104095750303b158015610409575060005460ff166001145b61046c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103ab565b6000805460ff19166001179055801561048f576000805461ff0019166101001790555b61049b8585858561098e565b80156104e1576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166105755760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ab565b6001600160a01b0382166105d65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ab565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061064484846104e8565b905060001981146106ac578181101561069f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103ab565b6106ac8484848403610513565b50505050565b6001600160a01b0383166107165760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ab565b6001600160a01b0382166107785760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ab565b6001600160a01b038316600090815260336020526040902054818110156107f05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103ab565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906108509086815260200190565b60405180910390a36106ac565b6001600160a01b0382166108bd5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103ab565b6001600160a01b038216600090815260336020526040902054818110156109315760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103ab565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161062b565b505050565b600054610100900460ff166109b55760405162461bcd60e51b81526004016103ab90610e65565b6109bf84846109cb565b6106ac84848484610a19565b600054610100900460ff166109f25760405162461bcd60e51b81526004016103ab90610e65565b8151610a05906036906020850190610b06565b508051610989906037906020840190610b06565b600054610100900460ff16610a405760405162461bcd60e51b81526004016103ab90610e65565b6106ac81836001600160a01b038216610a9b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103ab565b8060356000828254610aad9190610e3f565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b828054610b1290610e05565b90600052602060002090601f016020900481019282610b345760008555610b7a565b82601f10610b4d57805160ff1916838001178555610b7a565b82800160010185558215610b7a579182015b82811115610b7a578251825591602001919060010190610b5f565b50610b86929150610b8a565b5090565b5b80821115610b865760008155600101610b8b565b600060208083528351808285015260005b81811015610bcc57858101830151858201604001528201610bb0565b81811115610bde576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610c0b57600080fd5b919050565b60008060408385031215610c2357600080fd5b610c2c83610bf4565b946020939093013593505050565b600080600060608486031215610c4f57600080fd5b610c5884610bf4565b9250610c6660208501610bf4565b9150604084013590509250925092565b600060208284031215610c8857600080fd5b5035919050565b600060208284031215610ca157600080fd5b610caa82610bf4565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610cd857600080fd5b813567ffffffffffffffff80821115610cf357610cf3610cb1565b604051601f8301601f19908116603f01168101908282118183101715610d1b57610d1b610cb1565b81604052838152866020858801011115610d3457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215610d6a57600080fd5b843567ffffffffffffffff80821115610d8257600080fd5b610d8e88838901610cc7565b95506020870135915080821115610da457600080fd5b50610db187828801610cc7565b93505060408501359150610dc760608601610bf4565b905092959194509250565b60008060408385031215610de557600080fd5b610dee83610bf4565b9150610dfc60208401610bf4565b90509250929050565b600181811c90821680610e1957607f821691505b602082108103610e3957634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610e6057634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220538cc04cdee059d947072e1a8d2ee5be686b57671faf49b65d09c671c9e4dc1664736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146101d0578063a9059cbb146101e3578063bd3a13f6146101f6578063dd62ed3e1461020957600080fd5b806370a082311461018c57806379cc6790146101b557806395d89b41146101c857600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461016457806342966c681461017757600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f761021c565b6040516101049190610b9f565b60405180910390f35b61012061011b366004610c10565b6102ae565b6040519015158152602001610104565b6035545b604051908152602001610104565b610120610150366004610c3a565b6102c6565b60405160128152602001610104565b610120610172366004610c10565b6102ea565b61018a610185366004610c76565b61030c565b005b61013461019a366004610c8f565b6001600160a01b031660009081526033602052604090205490565b61018a6101c3366004610c10565b610319565b6100f7610332565b6101206101de366004610c10565b610341565b6101206101f1366004610c10565b6103c1565b61018a610204366004610d54565b6103cf565b610134610217366004610dd2565b6104e8565b60606036805461022b90610e05565b80601f016020809104026020016040519081016040528092919081815260200182805461025790610e05565b80156102a45780601f10610279576101008083540402835291602001916102a4565b820191906000526020600020905b81548152906001019060200180831161028757829003601f168201915b5050505050905090565b6000336102bc818585610513565b5060019392505050565b6000336102d4858285610638565b6102df8585856106b2565b506001949350505050565b6000336102bc8185856102fd83836104e8565b6103079190610e3f565b610513565b610316338261085d565b50565b610324823383610638565b61032e828261085d565b5050565b60606037805461022b90610e05565b6000338161034f82866104e8565b9050838110156103b45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102df8286868403610513565b6000336102bc8185856106b2565b600054610100900460ff16158080156103ef5750600054600160ff909116105b806104095750303b158015610409575060005460ff166001145b61046c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103ab565b6000805460ff19166001179055801561048f576000805461ff0019166101001790555b61049b8585858561098e565b80156104e1576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166105755760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ab565b6001600160a01b0382166105d65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ab565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600061064484846104e8565b905060001981146106ac578181101561069f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016103ab565b6106ac8484848403610513565b50505050565b6001600160a01b0383166107165760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ab565b6001600160a01b0382166107785760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ab565b6001600160a01b038316600090815260336020526040902054818110156107f05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103ab565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906108509086815260200190565b60405180910390a36106ac565b6001600160a01b0382166108bd5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103ab565b6001600160a01b038216600090815260336020526040902054818110156109315760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103ab565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161062b565b505050565b600054610100900460ff166109b55760405162461bcd60e51b81526004016103ab90610e65565b6109bf84846109cb565b6106ac84848484610a19565b600054610100900460ff166109f25760405162461bcd60e51b81526004016103ab90610e65565b8151610a05906036906020850190610b06565b508051610989906037906020840190610b06565b600054610100900460ff16610a405760405162461bcd60e51b81526004016103ab90610e65565b6106ac81836001600160a01b038216610a9b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103ab565b8060356000828254610aad9190610e3f565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b828054610b1290610e05565b90600052602060002090601f016020900481019282610b345760008555610b7a565b82601f10610b4d57805160ff1916838001178555610b7a565b82800160010185558215610b7a579182015b82811115610b7a578251825591602001919060010190610b5f565b50610b86929150610b8a565b5090565b5b80821115610b865760008155600101610b8b565b600060208083528351808285015260005b81811015610bcc57858101830151858201604001528201610bb0565b81811115610bde576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610c0b57600080fd5b919050565b60008060408385031215610c2357600080fd5b610c2c83610bf4565b946020939093013593505050565b600080600060608486031215610c4f57600080fd5b610c5884610bf4565b9250610c6660208501610bf4565b9150604084013590509250925092565b600060208284031215610c8857600080fd5b5035919050565b600060208284031215610ca157600080fd5b610caa82610bf4565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610cd857600080fd5b813567ffffffffffffffff80821115610cf357610cf3610cb1565b604051601f8301601f19908116603f01168101908282118183101715610d1b57610d1b610cb1565b81604052838152866020858801011115610d3457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215610d6a57600080fd5b843567ffffffffffffffff80821115610d8257600080fd5b610d8e88838901610cc7565b95506020870135915080821115610da457600080fd5b50610db187828801610cc7565b93505060408501359150610dc760608601610bf4565b905092959194509250565b60008060408385031215610de557600080fd5b610dee83610bf4565b9150610dfc60208401610bf4565b90509250929050565b600181811c90821680610e1957607f821691505b602082108103610e3957634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610e6057634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220538cc04cdee059d947072e1a8d2ee5be686b57671faf49b65d09c671c9e4dc1664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json deleted file mode 100644 index 2165c42e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PresetMinterPauserUpgradeable.json +++ /dev/null @@ -1,687 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20PresetMinterPauserUpgradeable", - "sourceName": "contracts/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50611ce5806100206000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c975abb11610104578063a217fddf116100a2578063d539139311610071578063d5391393146103ce578063d547741f146103f5578063dd62ed3e14610408578063e63ab1e91461041b57600080fd5b8063a217fddf1461038d578063a457c2d714610395578063a9059cbb146103a8578063ca15c873146103bb57600080fd5b80638456cb59116100de5780638456cb591461033f5780639010d07c1461034757806391d148541461037257806395d89b411461038557600080fd5b80635c975abb146102f757806370a082311461030357806379cc67901461032c57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780634cd88b76146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e2366004611830565b610430565b60405190151581526020015b60405180910390f35b61020461045b565b6040516101f39190611886565b6101e761021f3660046118d5565b6104ed565b60cb545b6040519081526020016101f3565b6101e76102443660046118ff565b610505565b61022861025736600461193b565b60009081526065602052604090206001015490565b61027f61027a366004611954565b610529565b005b604051601281526020016101f3565b61027f61029e366004611954565b610553565b6101e76102b13660046118d5565b6105d6565b61027f6105f8565b61027f6102cc3660046118d5565b61068c565b61027f6102df36600461193b565b61072b565b61027f6102f2366004611a23565b610738565b61012d5460ff166101e7565b610228610311366004611a87565b6001600160a01b0316600090815260c9602052604090205490565b61027f61033a3660046118d5565b61084c565b61027f610861565b61035a610355366004611aa2565b6108f3565b6040516001600160a01b0390911681526020016101f3565b6101e7610380366004611954565b610912565b61020461093d565b610228600081565b6101e76103a33660046118d5565b61094c565b6101e76103b63660046118d5565b6109c7565b6102286103c936600461193b565b6109d5565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f610403366004611954565b6109ec565b610228610416366004611ac4565b610a11565b610228600080516020611c9083398151915281565b60006001600160e01b03198216635a05180f60e01b1480610455575061045582610a3c565b92915050565b606060cc805461046a90611aee565b80601f016020809104026020016040519081016040528092919081815260200182805461049690611aee565b80156104e35780601f106104b8576101008083540402835291602001916104e3565b820191906000526020600020905b8154815290600101906020018083116104c657829003601f168201915b5050505050905090565b6000336104fb818585610a71565b5060019392505050565b600033610513858285610b95565b61051e858585610c0f565b506001949350505050565b60008281526065602052604090206001015461054481610dc5565b61054e8383610dcf565b505050565b6001600160a01b03811633146105c85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105d28282610df1565b5050565b6000336104fb8185856105e98383610a11565b6105f39190611b3e565b610a71565b610610600080516020611c9083398151915233610912565b6106825760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105bf565b61068a610e13565b565b6106b67f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610912565b6107215760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105bf565b6105d28282610e66565b6107353382610f33565b50565b600054610100900460ff16158080156107585750600054600160ff909116105b806107725750303b158015610772575060005460ff166001145b6107d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105bf565b6000805460ff1916600117905580156107f8576000805461ff0019166101001790555b6108028383611073565b801561054e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b610857823383610b95565b6105d28282610f33565b610879600080516020611c9083398151915233610912565b6108eb5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105bf565b61068a6110b6565b600082815260976020526040812061090b90836110f4565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060cd805461046a90611aee565b6000338161095a8286610a11565b9050838110156109ba5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105bf565b61051e8286868403610a71565b6000336104fb818585610c0f565b600081815260976020526040812061045590611100565b600082815260656020526040902060010154610a0781610dc5565b61054e8383610df1565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061045557506301ffc9a760e01b6001600160e01b0319831614610455565b6001600160a01b038316610ad35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105bf565b6001600160a01b038216610b345760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105bf565b6001600160a01b03838116600081815260ca602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ba18484610a11565b90506000198114610c095781811015610bfc5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105bf565b610c098484848403610a71565b50505050565b6001600160a01b038316610c735760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105bf565b6001600160a01b038216610cd55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105bf565b610ce083838361110a565b6001600160a01b038316600090815260c9602052604090205481811015610d585760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105bf565b6001600160a01b03808516600081815260c9602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610db89086815260200190565b60405180910390a3610c09565b6107358133611115565b610dd9828261116e565b600082815260976020526040902061054e90826111f4565b610dfb8282611209565b600082815260976020526040902061054e9082611270565b610e1b611285565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610ebc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105bf565b610ec86000838361110a565b8060cb6000828254610eda9190611b3e565b90915550506001600160a01b038216600081815260c960209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f935760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105bf565b610f9f8260008361110a565b6001600160a01b038216600090815260c96020526040902054818110156110135760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105bf565b6001600160a01b038316600081815260c960209081526040808320868603905560cb80548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600054610100900460ff1661109a5760405162461bcd60e51b81526004016105bf90611b56565b6110a482826112cf565b6110ac61131d565b6105d28282611351565b6110be6113c5565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e493390565b600061090b838361140c565b6000610455825490565b61054e838383611436565b61111f8282610912565b6105d25761112c8161149d565b6111378360206114af565b604051602001611148929190611ba1565b60408051601f198184030181529082905262461bcd60e51b82526105bf91600401611886565b6111788282610912565b6105d25760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556111b03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061090b836001600160a01b03841661164b565b6112138282610912565b156105d25760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061090b836001600160a01b03841661169a565b61012d5460ff1661068a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105bf565b600054610100900460ff166112f65760405162461bcd60e51b81526004016105bf90611b56565b81516113099060cc906020850190611797565b50805161054e9060cd906020840190611797565b600054610100900460ff166113445760405162461bcd60e51b81526004016105bf90611b56565b61012d805460ff19169055565b600054610100900460ff166113785760405162461bcd60e51b81526004016105bf90611b56565b61138360003361178d565b6113ad7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361178d565b6105d2600080516020611c908339815191523361178d565b61012d5460ff161561068a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105bf565b600082600001828154811061142357611423611c16565b9060005260206000200154905092915050565b61012d5460ff161561054e5760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105bf565b60606104556001600160a01b03831660145b606060006114be836002611c2c565b6114c9906002611b3e565b67ffffffffffffffff8111156114e1576114e1611980565b6040519080825280601f01601f19166020018201604052801561150b576020820181803683370190505b509050600360fc1b8160008151811061152657611526611c16565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061155557611555611c16565b60200101906001600160f81b031916908160001a9053506000611579846002611c2c565b611584906001611b3e565b90505b60018111156115fc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106115b8576115b8611c16565b1a60f81b8282815181106115ce576115ce611c16565b60200101906001600160f81b031916908160001a90535060049490941c936115f581611c4b565b9050611587565b50831561090b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105bf565b600081815260018301602052604081205461169257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610455565b506000610455565b600081815260018301602052604081205480156117835760006116be600183611c62565b85549091506000906116d290600190611c62565b90508181146117375760008660000182815481106116f2576116f2611c16565b906000526020600020015490508087600001848154811061171557611715611c16565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061174857611748611c79565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610455565b6000915050610455565b6105d28282610dcf565b8280546117a390611aee565b90600052602060002090601f0160209004810192826117c5576000855561180b565b82601f106117de57805160ff191683800117855561180b565b8280016001018555821561180b579182015b8281111561180b5782518255916020019190600101906117f0565b5061181792915061181b565b5090565b5b80821115611817576000815560010161181c565b60006020828403121561184257600080fd5b81356001600160e01b03198116811461090b57600080fd5b60005b8381101561187557818101518382015260200161185d565b83811115610c095750506000910152565b60208152600082518060208401526118a581604085016020870161185a565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146118d057600080fd5b919050565b600080604083850312156118e857600080fd5b6118f1836118b9565b946020939093013593505050565b60008060006060848603121561191457600080fd5b61191d846118b9565b925061192b602085016118b9565b9150604084013590509250925092565b60006020828403121561194d57600080fd5b5035919050565b6000806040838503121561196757600080fd5b82359150611977602084016118b9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126119a757600080fd5b813567ffffffffffffffff808211156119c2576119c2611980565b604051601f8301601f19908116603f011681019082821181831017156119ea576119ea611980565b81604052838152866020858801011115611a0357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611a3657600080fd5b823567ffffffffffffffff80821115611a4e57600080fd5b611a5a86838701611996565b93506020850135915080821115611a7057600080fd5b50611a7d85828601611996565b9150509250929050565b600060208284031215611a9957600080fd5b61090b826118b9565b60008060408385031215611ab557600080fd5b50508035926020909101359150565b60008060408385031215611ad757600080fd5b611ae0836118b9565b9150611977602084016118b9565b600181811c90821680611b0257607f821691505b602082108103611b2257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b5157611b51611b28565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611bd981601785016020880161185a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c0a81602884016020880161185a565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615611c4657611c46611b28565b500290565b600081611c5a57611c5a611b28565b506000190190565b600082821015611c7457611c74611b28565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa2646970667358221220b2a58925fa532f9e285132e9eee480cb35222bc6d69051fbaf03f9fc062881ed64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635c975abb11610104578063a217fddf116100a2578063d539139311610071578063d5391393146103ce578063d547741f146103f5578063dd62ed3e14610408578063e63ab1e91461041b57600080fd5b8063a217fddf1461038d578063a457c2d714610395578063a9059cbb146103a8578063ca15c873146103bb57600080fd5b80638456cb59116100de5780638456cb591461033f5780639010d07c1461034757806391d148541461037257806395d89b411461038557600080fd5b80635c975abb146102f757806370a082311461030357806379cc67901461032c57600080fd5b8063313ce567116101715780633f4ba83a1161014b5780633f4ba83a146102b657806340c10f19146102be57806342966c68146102d15780634cd88b76146102e457600080fd5b8063313ce5671461028157806336568abe1461029057806339509351146102a357600080fd5b806318160ddd116101ad57806318160ddd1461022457806323b872dd14610236578063248a9ca3146102495780632f2ff15d1461026c57600080fd5b806301ffc9a7146101d457806306fdde03146101fc578063095ea7b314610211575b600080fd5b6101e76101e2366004611830565b610430565b60405190151581526020015b60405180910390f35b61020461045b565b6040516101f39190611886565b6101e761021f3660046118d5565b6104ed565b60cb545b6040519081526020016101f3565b6101e76102443660046118ff565b610505565b61022861025736600461193b565b60009081526065602052604090206001015490565b61027f61027a366004611954565b610529565b005b604051601281526020016101f3565b61027f61029e366004611954565b610553565b6101e76102b13660046118d5565b6105d6565b61027f6105f8565b61027f6102cc3660046118d5565b61068c565b61027f6102df36600461193b565b61072b565b61027f6102f2366004611a23565b610738565b61012d5460ff166101e7565b610228610311366004611a87565b6001600160a01b0316600090815260c9602052604090205490565b61027f61033a3660046118d5565b61084c565b61027f610861565b61035a610355366004611aa2565b6108f3565b6040516001600160a01b0390911681526020016101f3565b6101e7610380366004611954565b610912565b61020461093d565b610228600081565b6101e76103a33660046118d5565b61094c565b6101e76103b63660046118d5565b6109c7565b6102286103c936600461193b565b6109d5565b6102287f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027f610403366004611954565b6109ec565b610228610416366004611ac4565b610a11565b610228600080516020611c9083398151915281565b60006001600160e01b03198216635a05180f60e01b1480610455575061045582610a3c565b92915050565b606060cc805461046a90611aee565b80601f016020809104026020016040519081016040528092919081815260200182805461049690611aee565b80156104e35780601f106104b8576101008083540402835291602001916104e3565b820191906000526020600020905b8154815290600101906020018083116104c657829003601f168201915b5050505050905090565b6000336104fb818585610a71565b5060019392505050565b600033610513858285610b95565b61051e858585610c0f565b506001949350505050565b60008281526065602052604090206001015461054481610dc5565b61054e8383610dcf565b505050565b6001600160a01b03811633146105c85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6105d28282610df1565b5050565b6000336104fb8185856105e98383610a11565b6105f39190611b3e565b610a71565b610610600080516020611c9083398151915233610912565b6106825760405162461bcd60e51b815260206004820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e70617573650000000000000060648201526084016105bf565b61068a610e13565b565b6106b67f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610912565b6107215760405162461bcd60e51b815260206004820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b60648201526084016105bf565b6105d28282610e66565b6107353382610f33565b50565b600054610100900460ff16158080156107585750600054600160ff909116105b806107725750303b158015610772575060005460ff166001145b6107d55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105bf565b6000805460ff1916600117905580156107f8576000805461ff0019166101001790555b6108028383611073565b801561054e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b610857823383610b95565b6105d28282610f33565b610879600080516020611c9083398151915233610912565b6108eb5760405162461bcd60e51b815260206004820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20706175736500000000000000000060648201526084016105bf565b61068a6110b6565b600082815260976020526040812061090b90836110f4565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060cd805461046a90611aee565b6000338161095a8286610a11565b9050838110156109ba5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105bf565b61051e8286868403610a71565b6000336104fb818585610c0f565b600081815260976020526040812061045590611100565b600082815260656020526040902060010154610a0781610dc5565b61054e8383610df1565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205490565b60006001600160e01b03198216637965db0b60e01b148061045557506301ffc9a760e01b6001600160e01b0319831614610455565b6001600160a01b038316610ad35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105bf565b6001600160a01b038216610b345760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105bf565b6001600160a01b03838116600081815260ca602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610ba18484610a11565b90506000198114610c095781811015610bfc5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105bf565b610c098484848403610a71565b50505050565b6001600160a01b038316610c735760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105bf565b6001600160a01b038216610cd55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105bf565b610ce083838361110a565b6001600160a01b038316600090815260c9602052604090205481811015610d585760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105bf565b6001600160a01b03808516600081815260c9602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610db89086815260200190565b60405180910390a3610c09565b6107358133611115565b610dd9828261116e565b600082815260976020526040902061054e90826111f4565b610dfb8282611209565b600082815260976020526040902061054e9082611270565b610e1b611285565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216610ebc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105bf565b610ec86000838361110a565b8060cb6000828254610eda9190611b3e565b90915550506001600160a01b038216600081815260c960209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610f935760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105bf565b610f9f8260008361110a565b6001600160a01b038216600090815260c96020526040902054818110156110135760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105bf565b6001600160a01b038316600081815260c960209081526040808320868603905560cb80548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600054610100900460ff1661109a5760405162461bcd60e51b81526004016105bf90611b56565b6110a482826112cf565b6110ac61131d565b6105d28282611351565b6110be6113c5565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e493390565b600061090b838361140c565b6000610455825490565b61054e838383611436565b61111f8282610912565b6105d25761112c8161149d565b6111378360206114af565b604051602001611148929190611ba1565b60408051601f198184030181529082905262461bcd60e51b82526105bf91600401611886565b6111788282610912565b6105d25760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556111b03390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061090b836001600160a01b03841661164b565b6112138282610912565b156105d25760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061090b836001600160a01b03841661169a565b61012d5460ff1661068a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105bf565b600054610100900460ff166112f65760405162461bcd60e51b81526004016105bf90611b56565b81516113099060cc906020850190611797565b50805161054e9060cd906020840190611797565b600054610100900460ff166113445760405162461bcd60e51b81526004016105bf90611b56565b61012d805460ff19169055565b600054610100900460ff166113785760405162461bcd60e51b81526004016105bf90611b56565b61138360003361178d565b6113ad7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361178d565b6105d2600080516020611c908339815191523361178d565b61012d5460ff161561068a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105bf565b600082600001828154811061142357611423611c16565b9060005260206000200154905092915050565b61012d5460ff161561054e5760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b60648201526084016105bf565b60606104556001600160a01b03831660145b606060006114be836002611c2c565b6114c9906002611b3e565b67ffffffffffffffff8111156114e1576114e1611980565b6040519080825280601f01601f19166020018201604052801561150b576020820181803683370190505b509050600360fc1b8160008151811061152657611526611c16565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061155557611555611c16565b60200101906001600160f81b031916908160001a9053506000611579846002611c2c565b611584906001611b3e565b90505b60018111156115fc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106115b8576115b8611c16565b1a60f81b8282815181106115ce576115ce611c16565b60200101906001600160f81b031916908160001a90535060049490941c936115f581611c4b565b9050611587565b50831561090b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105bf565b600081815260018301602052604081205461169257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610455565b506000610455565b600081815260018301602052604081205480156117835760006116be600183611c62565b85549091506000906116d290600190611c62565b90508181146117375760008660000182815481106116f2576116f2611c16565b906000526020600020015490508087600001848154811061171557611715611c16565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061174857611748611c79565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610455565b6000915050610455565b6105d28282610dcf565b8280546117a390611aee565b90600052602060002090601f0160209004810192826117c5576000855561180b565b82601f106117de57805160ff191683800117855561180b565b8280016001018555821561180b579182015b8281111561180b5782518255916020019190600101906117f0565b5061181792915061181b565b5090565b5b80821115611817576000815560010161181c565b60006020828403121561184257600080fd5b81356001600160e01b03198116811461090b57600080fd5b60005b8381101561187557818101518382015260200161185d565b83811115610c095750506000910152565b60208152600082518060208401526118a581604085016020870161185a565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146118d057600080fd5b919050565b600080604083850312156118e857600080fd5b6118f1836118b9565b946020939093013593505050565b60008060006060848603121561191457600080fd5b61191d846118b9565b925061192b602085016118b9565b9150604084013590509250925092565b60006020828403121561194d57600080fd5b5035919050565b6000806040838503121561196757600080fd5b82359150611977602084016118b9565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126119a757600080fd5b813567ffffffffffffffff808211156119c2576119c2611980565b604051601f8301601f19908116603f011681019082821181831017156119ea576119ea611980565b81604052838152866020858801011115611a0357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611a3657600080fd5b823567ffffffffffffffff80821115611a4e57600080fd5b611a5a86838701611996565b93506020850135915080821115611a7057600080fd5b50611a7d85828601611996565b9150509250929050565b600060208284031215611a9957600080fd5b61090b826118b9565b60008060408385031215611ab557600080fd5b50508035926020909101359150565b60008060408385031215611ad757600080fd5b611ae0836118b9565b9150611977602084016118b9565b600181811c90821680611b0257607f821691505b602082108103611b2257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b5157611b51611b28565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611bd981601785016020880161185a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611c0a81602884016020880161185a565b01602801949350505050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615611c4657611c46611b28565b500290565b600081611c5a57611c5a611b28565b506000190190565b600082821015611c7457611c74611b28565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa2646970667358221220b2a58925fa532f9e285132e9eee480cb35222bc6d69051fbaf03f9fc062881ed64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json deleted file mode 100644 index af2d7c1d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20Upgradeable.json +++ /dev/null @@ -1,294 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20Upgradeable", - "sourceName": "contracts/token/ERC20/ERC20Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610863806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c391906106a1565b60405180910390f35b6100df6100da366004610712565b610232565b60405190151581526020016100c3565b6035545b6040519081526020016100c3565b6100df61010f36600461073c565b61024a565b604051601281526020016100c3565b6100df610131366004610712565b61026e565b6100f3610144366004610778565b6001600160a01b031660009081526033602052604090205490565b6100b6610290565b6100df610175366004610712565b61029f565b6100df610188366004610712565b61031f565b6100f361019b36600461079a565b61032d565b6060603680546101af906107cd565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107cd565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610807565b610358565b6060603780546101af906107cd565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260336020526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106949086815260200190565b60405180910390a36104f0565b600060208083528351808285015260005b818110156106ce578581018301518582016040015282016106b2565b818111156106e0576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070d57600080fd5b919050565b6000806040838503121561072557600080fd5b61072e836106f6565b946020939093013593505050565b60008060006060848603121561075157600080fd5b61075a846106f6565b9250610768602085016106f6565b9150604084013590509250925092565b60006020828403121561078a57600080fd5b610793826106f6565b9392505050565b600080604083850312156107ad57600080fd5b6107b6836106f6565b91506107c4602084016106f6565b90509250929050565b600181811c908216806107e157607f821691505b60208210810361080157634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082857634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212201114b53ba744d7f329c32fd9dc1dffc377bd6a1902555d4eadd933c250f42e3564736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c391906106a1565b60405180910390f35b6100df6100da366004610712565b610232565b60405190151581526020016100c3565b6035545b6040519081526020016100c3565b6100df61010f36600461073c565b61024a565b604051601281526020016100c3565b6100df610131366004610712565b61026e565b6100f3610144366004610778565b6001600160a01b031660009081526033602052604090205490565b6100b6610290565b6100df610175366004610712565b61029f565b6100df610188366004610712565b61031f565b6100f361019b36600461079a565b61032d565b6060603680546101af906107cd565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107cd565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610807565b610358565b6060603780546101af906107cd565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260336020526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906106949086815260200190565b60405180910390a36104f0565b600060208083528351808285015260005b818110156106ce578581018301518582016040015282016106b2565b818111156106e0576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070d57600080fd5b919050565b6000806040838503121561072557600080fd5b61072e836106f6565b946020939093013593505050565b60008060006060848603121561075157600080fd5b61075a846106f6565b9250610768602085016106f6565b9150604084013590509250925092565b60006020828403121561078a57600080fd5b610793826106f6565b9392505050565b600080604083850312156107ad57600080fd5b6107b6836106f6565b91506107c4602084016106f6565b90509250929050565b600181811c908216806107e157607f821691505b60208210810361080157634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082857634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212201114b53ba744d7f329c32fd9dc1dffc377bd6a1902555d4eadd933c250f42e3564736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json deleted file mode 100644 index a047184e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesCompUpgradeable.json +++ /dev/null @@ -1,724 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20VotesCompUpgradeable", - "sourceName": "contracts/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint32", - "name": "pos", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint224", - "name": "votes", - "type": "uint224" - } - ], - "internalType": "struct ERC20VotesUpgradeable.Checkpoint", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json deleted file mode 100644 index 91f3019a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721HolderUpgradeable.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC721HolderUpgradeable", - "sourceName": "contracts/token/ERC721/utils/ERC721HolderUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506101af806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea26469706673582212208118d8b307acc2428e77a3401a27f394c353bf27e3f4f5544333992986a65dcd64736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063150b7a0214610030575b600080fd5b61004e61003e36600461009d565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200160405180910390f35b80356001600160a01b038116811461008257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156100b357600080fd5b6100bc8561006b565b93506100ca6020860161006b565b925060408501359150606085013567ffffffffffffffff808211156100ee57600080fd5b818701915087601f83011261010257600080fd5b81358181111561011457610114610087565b604051601f8201601f19908116603f0116810190838211818310171561013c5761013c610087565b816040528281528a602084870101111561015557600080fd5b8260208601602083013760006020848301015280955050505050509295919450925056fea26469706673582212208118d8b307acc2428e77a3401a27f394c353bf27e3f4f5544333992986a65dcd64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json deleted file mode 100644 index 2b06fe92..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PresetMinterPauserAutoIdUpgradeable.json +++ /dev/null @@ -1,766 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC721PresetMinterPauserAutoIdUpgradeable", - "sourceName": "contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "string", - "name": "baseTokenURI", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenOfOwnerByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50612981806100206000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80636a6278421161010f578063a6487c53116100a2578063d539139311610071578063d539139314610416578063d547741f1461043d578063e63ab1e914610450578063e985e9c51461046557600080fd5b8063a6487c53146103ca578063b88d4fde146103dd578063c87b56dd146103f0578063ca15c8731461040357600080fd5b806391d14854116100de57806391d148541461039457806395d89b41146103a7578063a217fddf146103af578063a22cb465146103b757600080fd5b80636a6278421461035357806370a08231146103665780638456cb59146103795780639010d07c1461038157600080fd5b80632f745c591161018757806342966c681161015657806342966c681461030e5780634f6ccce7146103215780635c975abb146103345780636352211e1461034057600080fd5b80632f745c59146102cd57806336568abe146102e05780633f4ba83a146102f357806342842e0e146102fb57600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd14610284578063248a9ca3146102975780632f2ff15d146102ba57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b61020861020336600461227b565b6104a1565b60405190151581526020015b60405180910390f35b6102256104b2565b60405161021491906122f0565b610245610240366004612303565b610544565b6040516001600160a01b039091168152602001610214565b61027061026b366004612338565b61056b565b005b60fd545b604051908152602001610214565b610270610292366004612362565b610685565b6102766102a5366004612303565b60009081526065602052604090206001015490565b6102706102c836600461239e565b6106b7565b6102766102db366004612338565b6106dc565b6102706102ee36600461239e565b610772565b6102706107f0565b610270610309366004612362565b610886565b61027061031c366004612303565b6108a1565b61027661032f366004612303565b6108d2565b61015f5460ff16610208565b61024561034e366004612303565b610965565b6102706103613660046123ca565b6109c5565b6102766103743660046123ca565b610a83565b610270610b09565b61024561038f3660046123e5565b610b9b565b6102086103a236600461239e565b610bba565b610225610be5565b610276600081565b6102706103c5366004612407565b610bf4565b6102706103d83660046124ef565b610bff565b6102706103eb366004612577565b610d16565b6102256103fe366004612303565b610d48565b610276610411366004612303565b610dae565b6102767f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027061044b36600461239e565b610dc5565b61027660008051602061292c83398151915281565b6102086104733660046125f3565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205460ff1690565b60006104ac82610dea565b92915050565b606060c980546104c19061261d565b80601f01602080910402602001604051908101604052809291908181526020018280546104ed9061261d565b801561053a5780601f1061050f5761010080835404028352916020019161053a565b820191906000526020600020905b81548152906001019060200180831161051d57829003601f168201915b5050505050905090565b600061054f82610e0f565b50600090815260cd60205260409020546001600160a01b031690565b600061057682610965565b9050806001600160a01b0316836001600160a01b0316036105e85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061060457506106048133610473565b6106765760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105df565b6106808383610e6e565b505050565b610690335b82610edc565b6106ac5760405162461bcd60e51b81526004016105df90612657565b610680838383610f5b565b6000828152606560205260409020600101546106d2816110cc565b61068083836110d6565b60006106e783610a83565b82106107495760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105df565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b6001600160a01b03811633146107e25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105df565b6107ec82826110f8565b5050565b61080860008051602061292c83398151915233610bba565b61087c576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105df565b61088461111a565b565b61068083838360405180602001604052806000815250610d16565b6108aa3361068a565b6108c65760405162461bcd60e51b81526004016105df90612657565b6108cf8161116d565b50565b60006108dd60fd5490565b82106109405760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105df565b60fd8281548110610953576109536126a4565b90600052602060002001549050919050565b600081815260cb60205260408120546001600160a01b0316806104ac5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b6109ef7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bba565b610a615760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105df565b610a7481610a6f6101c35490565b611210565b6108cf6101c380546001019055565b60006001600160a01b038216610aed5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105df565b506001600160a01b0316600090815260cc602052604090205490565b610b2160008051602061292c83398151915233610bba565b610b935760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105df565b6108846113a9565b6000828152609760205260408120610bb390836113e7565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060ca80546104c19061261d565b6107ec3383836113f3565b600054610100900460ff1615808015610c1f5750600054600160ff909116105b80610c395750303b158015610c39575060005460ff166001145b610c9c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105df565b6000805460ff191660011790558015610cbf576000805461ff0019166101001790555b610cca8484846114c1565b8015610d10576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610d203383610edc565b610d3c5760405162461bcd60e51b81526004016105df90612657565b610d1084848484611505565b6060610d5382610e0f565b6000610d5d611538565b90506000815111610d7d5760405180602001604052806000815250610bb3565b80610d8784611548565b604051602001610d989291906126ba565b6040516020818303038152906040529392505050565b60008181526097602052604081206104ac906115db565b600082815260656020526040902060010154610de0816110cc565b61068083836110f8565b60006001600160e01b0319821663780e9d6360e01b14806104ac57506104ac826115e5565b600081815260cb60205260409020546001600160a01b03166108cf5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b600081815260cd6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610ea382610965565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610ee883610965565b9050806001600160a01b0316846001600160a01b03161480610f2f57506001600160a01b03808216600090815260ce602090815260408083209388168352929052205460ff165b80610f535750836001600160a01b0316610f4884610544565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f6e82610965565b6001600160a01b031614610f945760405162461bcd60e51b81526004016105df906126e9565b6001600160a01b038216610ff65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105df565b6110038383836001611625565b826001600160a01b031661101682610965565b6001600160a01b03161461103c5760405162461bcd60e51b81526004016105df906126e9565b600081815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260cc855283862080546000190190559087168086528386208054600101905586865260cb90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8133611631565b6110e0828261168a565b60008281526097602052604090206106809082611710565b6111028282611725565b6000828152609760205260409020610680908261178c565b6111226117a1565b61015f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061117882610965565b9050611188816000846001611625565b61119182610965565b600083815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b03851680855260cc8452828520805460001901905587855260cb909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112665760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105df565b600081815260cb60205260409020546001600160a01b0316156112cb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6112d9600083836001611625565b600081815260cb60205260409020546001600160a01b03161561133e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6001600160a01b038216600081815260cc602090815260408083208054600101905584835260cb90915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6113b16117eb565b61015f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111503390565b6000610bb38383611832565b816001600160a01b0316836001600160a01b0316036114545760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105df565b6001600160a01b03838116600081815260ce6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff166114e85760405162461bcd60e51b81526004016105df9061272e565b6114f2838361185c565b6114fa6118aa565b6106808383836118de565b611510848484610f5b565b61151c84848484611967565b610d105760405162461bcd60e51b81526004016105df90612779565b60606101c480546104c19061261d565b6060600061155583611a68565b600101905060008167ffffffffffffffff81111561157557611575612443565b6040519080825280601f01601f19166020018201604052801561159f576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115a957509392505050565b60006104ac825490565b60006001600160e01b031982166380ac58cd60e01b148061161657506001600160e01b03198216635b5e139f60e01b145b806104ac57506104ac82611b40565b610d1084848484611b65565b61163b8282610bba565b6107ec5761164881611bd9565b611653836020611beb565b6040516020016116649291906127cb565b60408051601f198184030181529082905262461bcd60e51b82526105df916004016122f0565b6116948282610bba565b6107ec5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116cc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bb3836001600160a01b038416611d87565b61172f8282610bba565b156107ec5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bb3836001600160a01b038416611dd6565b61015f5460ff166108845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105df565b61015f5460ff16156108845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105df565b6000826000018281548110611849576118496126a4565b9060005260206000200154905092915050565b600054610100900460ff166118835760405162461bcd60e51b81526004016105df9061272e565b81516118969060c99060208501906121cc565b5080516106809060ca9060208401906121cc565b600054610100900460ff166118d15760405162461bcd60e51b81526004016105df9061272e565b61015f805460ff19169055565b600054610100900460ff166119055760405162461bcd60e51b81526004016105df9061272e565b8051611919906101c49060208401906121cc565b50611925600033611ec9565b61194f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611ec9565b61068060008051602061292c83398151915233611ec9565b60006001600160a01b0384163b15611a5d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906119ab903390899088908890600401612840565b6020604051808303816000875af19250505080156119e6575060408051601f3d908101601f191682019092526119e39181019061287d565b60015b611a43573d808015611a14576040519150601f19603f3d011682016040523d82523d6000602084013e611a19565b606091505b508051600003611a3b5760405162461bcd60e51b81526004016105df90612779565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f53565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aa75772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad3576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af157662386f26fc10000830492506010015b6305f5e1008310611b09576305f5e100830492506008015b6127108310611b1d57612710830492506004015b60648310611b2f576064830492506002015b600a83106104ac5760010192915050565b60006001600160e01b03198216635a05180f60e01b14806104ac57506104ac82611ed3565b611b7184848484611f08565b61015f5460ff1615610d105760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105df565b60606104ac6001600160a01b03831660145b60606000611bfa8360026128b0565b611c059060026128cf565b67ffffffffffffffff811115611c1d57611c1d612443565b6040519080825280601f01601f191660200182016040528015611c47576020820181803683370190505b509050600360fc1b81600081518110611c6257611c626126a4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c9157611c916126a4565b60200101906001600160f81b031916908160001a9053506000611cb58460026128b0565b611cc09060016128cf565b90505b6001811115611d38576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cf457611cf46126a4565b1a60f81b828281518110611d0a57611d0a6126a4565b60200101906001600160f81b031916908160001a90535060049490941c93611d31816128e7565b9050611cc3565b508315610bb35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105df565b6000818152600183016020526040812054611dce575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104ac565b5060006104ac565b60008181526001830160205260408120548015611ebf576000611dfa6001836128fe565b8554909150600090611e0e906001906128fe565b9050818114611e73576000866000018281548110611e2e57611e2e6126a4565b9060005260206000200154905080876000018481548110611e5157611e516126a4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e8457611e84612915565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104ac565b60009150506104ac565b6107ec82826110d6565b60006001600160e01b03198216637965db0b60e01b14806104ac57506301ffc9a760e01b6001600160e01b03198316146104ac565b6001811115611f775760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105df565b816001600160a01b038516611fd357611fce8160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b611ff6565b836001600160a01b0316856001600160a01b031614611ff657611ff6858261203c565b6001600160a01b0384166120125761200d816120d9565b612035565b846001600160a01b0316846001600160a01b031614612035576120358482612188565b5050505050565b6000600161204984610a83565b61205391906128fe565b600083815260fc60205260409020549091508082146120a6576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906120eb906001906128fe565b600083815260fe602052604081205460fd8054939450909284908110612113576121136126a4565b906000526020600020015490508060fd8381548110612134576121346126a4565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061216c5761216c612915565b6001900381819060005260206000200160009055905550505050565b600061219383610a83565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b8280546121d89061261d565b90600052602060002090601f0160209004810192826121fa5760008555612240565b82601f1061221357805160ff1916838001178555612240565b82800160010185558215612240579182015b82811115612240578251825591602001919060010190612225565b5061224c929150612250565b5090565b5b8082111561224c5760008155600101612251565b6001600160e01b0319811681146108cf57600080fd5b60006020828403121561228d57600080fd5b8135610bb381612265565b60005b838110156122b357818101518382015260200161229b565b83811115610d105750506000910152565b600081518084526122dc816020860160208601612298565b601f01601f19169290920160200192915050565b602081526000610bb360208301846122c4565b60006020828403121561231557600080fd5b5035919050565b80356001600160a01b038116811461233357600080fd5b919050565b6000806040838503121561234b57600080fd5b6123548361231c565b946020939093013593505050565b60008060006060848603121561237757600080fd5b6123808461231c565b925061238e6020850161231c565b9150604084013590509250925092565b600080604083850312156123b157600080fd5b823591506123c16020840161231c565b90509250929050565b6000602082840312156123dc57600080fd5b610bb38261231c565b600080604083850312156123f857600080fd5b50508035926020909101359150565b6000806040838503121561241a57600080fd5b6124238361231c565b91506020830135801515811461243857600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561247457612474612443565b604051601f8501601f19908116603f0116810190828211818310171561249c5761249c612443565b816040528093508581528686860111156124b557600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126124e057600080fd5b610bb383833560208501612459565b60008060006060848603121561250457600080fd5b833567ffffffffffffffff8082111561251c57600080fd5b612528878388016124cf565b9450602086013591508082111561253e57600080fd5b61254a878388016124cf565b9350604086013591508082111561256057600080fd5b5061256d868287016124cf565b9150509250925092565b6000806000806080858703121561258d57600080fd5b6125968561231c565b93506125a46020860161231c565b925060408501359150606085013567ffffffffffffffff8111156125c757600080fd5b8501601f810187136125d857600080fd5b6125e787823560208401612459565b91505092959194509250565b6000806040838503121561260657600080fd5b61260f8361231c565b91506123c16020840161231c565b600181811c9082168061263157607f821691505b60208210810361265157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600083516126cc818460208801612298565b8351908301906126e0818360208801612298565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612803816017850160208801612298565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612834816028840160208801612298565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612873908301846122c4565b9695505050505050565b60006020828403121561288f57600080fd5b8151610bb381612265565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156128ca576128ca61289a565b500290565b600082198211156128e2576128e261289a565b500190565b6000816128f6576128f661289a565b506000190190565b6000828210156129105761291061289a565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212201b7252dec63958ca4364cbee917c87e2a12de519274a71ab71d044fe29c620c064736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80636a6278421161010f578063a6487c53116100a2578063d539139311610071578063d539139314610416578063d547741f1461043d578063e63ab1e914610450578063e985e9c51461046557600080fd5b8063a6487c53146103ca578063b88d4fde146103dd578063c87b56dd146103f0578063ca15c8731461040357600080fd5b806391d14854116100de57806391d148541461039457806395d89b41146103a7578063a217fddf146103af578063a22cb465146103b757600080fd5b80636a6278421461035357806370a08231146103665780638456cb59146103795780639010d07c1461038157600080fd5b80632f745c591161018757806342966c681161015657806342966c681461030e5780634f6ccce7146103215780635c975abb146103345780636352211e1461034057600080fd5b80632f745c59146102cd57806336568abe146102e05780633f4ba83a146102f357806342842e0e146102fb57600080fd5b806318160ddd116101c357806318160ddd1461027257806323b872dd14610284578063248a9ca3146102975780632f2ff15d146102ba57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b61020861020336600461227b565b6104a1565b60405190151581526020015b60405180910390f35b6102256104b2565b60405161021491906122f0565b610245610240366004612303565b610544565b6040516001600160a01b039091168152602001610214565b61027061026b366004612338565b61056b565b005b60fd545b604051908152602001610214565b610270610292366004612362565b610685565b6102766102a5366004612303565b60009081526065602052604090206001015490565b6102706102c836600461239e565b6106b7565b6102766102db366004612338565b6106dc565b6102706102ee36600461239e565b610772565b6102706107f0565b610270610309366004612362565b610886565b61027061031c366004612303565b6108a1565b61027661032f366004612303565b6108d2565b61015f5460ff16610208565b61024561034e366004612303565b610965565b6102706103613660046123ca565b6109c5565b6102766103743660046123ca565b610a83565b610270610b09565b61024561038f3660046123e5565b610b9b565b6102086103a236600461239e565b610bba565b610225610be5565b610276600081565b6102706103c5366004612407565b610bf4565b6102706103d83660046124ef565b610bff565b6102706103eb366004612577565b610d16565b6102256103fe366004612303565b610d48565b610276610411366004612303565b610dae565b6102767f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61027061044b36600461239e565b610dc5565b61027660008051602061292c83398151915281565b6102086104733660046125f3565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205460ff1690565b60006104ac82610dea565b92915050565b606060c980546104c19061261d565b80601f01602080910402602001604051908101604052809291908181526020018280546104ed9061261d565b801561053a5780601f1061050f5761010080835404028352916020019161053a565b820191906000526020600020905b81548152906001019060200180831161051d57829003601f168201915b5050505050905090565b600061054f82610e0f565b50600090815260cd60205260409020546001600160a01b031690565b600061057682610965565b9050806001600160a01b0316836001600160a01b0316036105e85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061060457506106048133610473565b6106765760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016105df565b6106808383610e6e565b505050565b610690335b82610edc565b6106ac5760405162461bcd60e51b81526004016105df90612657565b610680838383610f5b565b6000828152606560205260409020600101546106d2816110cc565b61068083836110d6565b60006106e783610a83565b82106107495760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105df565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b6001600160a01b03811633146107e25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105df565b6107ec82826110f8565b5050565b61080860008051602061292c83398151915233610bba565b61087c576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560648201526084016105df565b61088461111a565b565b61068083838360405180602001604052806000815250610d16565b6108aa3361068a565b6108c65760405162461bcd60e51b81526004016105df90612657565b6108cf8161116d565b50565b60006108dd60fd5490565b82106109405760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105df565b60fd8281548110610953576109536126a4565b90600052602060002001549050919050565b600081815260cb60205260408120546001600160a01b0316806104ac5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b6109ef7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610bba565b610a615760405162461bcd60e51b815260206004820152603d60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d7573742068617665206d696e74657220726f6c6520746f206d696e7400000060648201526084016105df565b610a7481610a6f6101c35490565b611210565b6108cf6101c380546001019055565b60006001600160a01b038216610aed5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105df565b506001600160a01b0316600090815260cc602052604090205490565b610b2160008051602061292c83398151915233610bba565b610b935760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060648201526084016105df565b6108846113a9565b6000828152609760205260408120610bb390836113e7565b9392505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060ca80546104c19061261d565b6107ec3383836113f3565b600054610100900460ff1615808015610c1f5750600054600160ff909116105b80610c395750303b158015610c39575060005460ff166001145b610c9c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105df565b6000805460ff191660011790558015610cbf576000805461ff0019166101001790555b610cca8484846114c1565b8015610d10576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b610d203383610edc565b610d3c5760405162461bcd60e51b81526004016105df90612657565b610d1084848484611505565b6060610d5382610e0f565b6000610d5d611538565b90506000815111610d7d5760405180602001604052806000815250610bb3565b80610d8784611548565b604051602001610d989291906126ba565b6040516020818303038152906040529392505050565b60008181526097602052604081206104ac906115db565b600082815260656020526040902060010154610de0816110cc565b61068083836110f8565b60006001600160e01b0319821663780e9d6360e01b14806104ac57506104ac826115e5565b600081815260cb60205260409020546001600160a01b03166108cf5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105df565b600081815260cd6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610ea382610965565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610ee883610965565b9050806001600160a01b0316846001600160a01b03161480610f2f57506001600160a01b03808216600090815260ce602090815260408083209388168352929052205460ff165b80610f535750836001600160a01b0316610f4884610544565b6001600160a01b0316145b949350505050565b826001600160a01b0316610f6e82610965565b6001600160a01b031614610f945760405162461bcd60e51b81526004016105df906126e9565b6001600160a01b038216610ff65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105df565b6110038383836001611625565b826001600160a01b031661101682610965565b6001600160a01b03161461103c5760405162461bcd60e51b81526004016105df906126e9565b600081815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260cc855283862080546000190190559087168086528386208054600101905586865260cb90945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6108cf8133611631565b6110e0828261168a565b60008281526097602052604090206106809082611710565b6111028282611725565b6000828152609760205260409020610680908261178c565b6111226117a1565b61015f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061117882610965565b9050611188816000846001611625565b61119182610965565b600083815260cd6020908152604080832080546001600160a01b03199081169091556001600160a01b03851680855260cc8452828520805460001901905587855260cb909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166112665760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105df565b600081815260cb60205260409020546001600160a01b0316156112cb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6112d9600083836001611625565b600081815260cb60205260409020546001600160a01b03161561133e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105df565b6001600160a01b038216600081815260cc602090815260408083208054600101905584835260cb90915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6113b16117eb565b61015f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111503390565b6000610bb38383611832565b816001600160a01b0316836001600160a01b0316036114545760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105df565b6001600160a01b03838116600081815260ce6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff166114e85760405162461bcd60e51b81526004016105df9061272e565b6114f2838361185c565b6114fa6118aa565b6106808383836118de565b611510848484610f5b565b61151c84848484611967565b610d105760405162461bcd60e51b81526004016105df90612779565b60606101c480546104c19061261d565b6060600061155583611a68565b600101905060008167ffffffffffffffff81111561157557611575612443565b6040519080825280601f01601f19166020018201604052801561159f576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115a957509392505050565b60006104ac825490565b60006001600160e01b031982166380ac58cd60e01b148061161657506001600160e01b03198216635b5e139f60e01b145b806104ac57506104ac82611b40565b610d1084848484611b65565b61163b8282610bba565b6107ec5761164881611bd9565b611653836020611beb565b6040516020016116649291906127cb565b60408051601f198184030181529082905262461bcd60e51b82526105df916004016122f0565b6116948282610bba565b6107ec5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116cc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610bb3836001600160a01b038416611d87565b61172f8282610bba565b156107ec5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610bb3836001600160a01b038416611dd6565b61015f5460ff166108845760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016105df565b61015f5460ff16156108845760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016105df565b6000826000018281548110611849576118496126a4565b9060005260206000200154905092915050565b600054610100900460ff166118835760405162461bcd60e51b81526004016105df9061272e565b81516118969060c99060208501906121cc565b5080516106809060ca9060208401906121cc565b600054610100900460ff166118d15760405162461bcd60e51b81526004016105df9061272e565b61015f805460ff19169055565b600054610100900460ff166119055760405162461bcd60e51b81526004016105df9061272e565b8051611919906101c49060208401906121cc565b50611925600033611ec9565b61194f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611ec9565b61068060008051602061292c83398151915233611ec9565b60006001600160a01b0384163b15611a5d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906119ab903390899088908890600401612840565b6020604051808303816000875af19250505080156119e6575060408051601f3d908101601f191682019092526119e39181019061287d565b60015b611a43573d808015611a14576040519150601f19603f3d011682016040523d82523d6000602084013e611a19565b606091505b508051600003611a3b5760405162461bcd60e51b81526004016105df90612779565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610f53565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611aa75772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611ad3576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611af157662386f26fc10000830492506010015b6305f5e1008310611b09576305f5e100830492506008015b6127108310611b1d57612710830492506004015b60648310611b2f576064830492506002015b600a83106104ac5760010192915050565b60006001600160e01b03198216635a05180f60e01b14806104ac57506104ac82611ed3565b611b7184848484611f08565b61015f5460ff1615610d105760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016105df565b60606104ac6001600160a01b03831660145b60606000611bfa8360026128b0565b611c059060026128cf565b67ffffffffffffffff811115611c1d57611c1d612443565b6040519080825280601f01601f191660200182016040528015611c47576020820181803683370190505b509050600360fc1b81600081518110611c6257611c626126a4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c9157611c916126a4565b60200101906001600160f81b031916908160001a9053506000611cb58460026128b0565b611cc09060016128cf565b90505b6001811115611d38576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611cf457611cf46126a4565b1a60f81b828281518110611d0a57611d0a6126a4565b60200101906001600160f81b031916908160001a90535060049490941c93611d31816128e7565b9050611cc3565b508315610bb35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105df565b6000818152600183016020526040812054611dce575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104ac565b5060006104ac565b60008181526001830160205260408120548015611ebf576000611dfa6001836128fe565b8554909150600090611e0e906001906128fe565b9050818114611e73576000866000018281548110611e2e57611e2e6126a4565b9060005260206000200154905080876000018481548110611e5157611e516126a4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611e8457611e84612915565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104ac565b60009150506104ac565b6107ec82826110d6565b60006001600160e01b03198216637965db0b60e01b14806104ac57506301ffc9a760e01b6001600160e01b03198316146104ac565b6001811115611f775760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016105df565b816001600160a01b038516611fd357611fce8160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b611ff6565b836001600160a01b0316856001600160a01b031614611ff657611ff6858261203c565b6001600160a01b0384166120125761200d816120d9565b612035565b846001600160a01b0316846001600160a01b031614612035576120358482612188565b5050505050565b6000600161204984610a83565b61205391906128fe565b600083815260fc60205260409020549091508082146120a6576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906120eb906001906128fe565b600083815260fe602052604081205460fd8054939450909284908110612113576121136126a4565b906000526020600020015490508060fd8381548110612134576121346126a4565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061216c5761216c612915565b6001900381819060005260206000200160009055905550505050565b600061219383610a83565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b8280546121d89061261d565b90600052602060002090601f0160209004810192826121fa5760008555612240565b82601f1061221357805160ff1916838001178555612240565b82800160010185558215612240579182015b82811115612240578251825591602001919060010190612225565b5061224c929150612250565b5090565b5b8082111561224c5760008155600101612251565b6001600160e01b0319811681146108cf57600080fd5b60006020828403121561228d57600080fd5b8135610bb381612265565b60005b838110156122b357818101518382015260200161229b565b83811115610d105750506000910152565b600081518084526122dc816020860160208601612298565b601f01601f19169290920160200192915050565b602081526000610bb360208301846122c4565b60006020828403121561231557600080fd5b5035919050565b80356001600160a01b038116811461233357600080fd5b919050565b6000806040838503121561234b57600080fd5b6123548361231c565b946020939093013593505050565b60008060006060848603121561237757600080fd5b6123808461231c565b925061238e6020850161231c565b9150604084013590509250925092565b600080604083850312156123b157600080fd5b823591506123c16020840161231c565b90509250929050565b6000602082840312156123dc57600080fd5b610bb38261231c565b600080604083850312156123f857600080fd5b50508035926020909101359150565b6000806040838503121561241a57600080fd5b6124238361231c565b91506020830135801515811461243857600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561247457612474612443565b604051601f8501601f19908116603f0116810190828211818310171561249c5761249c612443565b816040528093508581528686860111156124b557600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126124e057600080fd5b610bb383833560208501612459565b60008060006060848603121561250457600080fd5b833567ffffffffffffffff8082111561251c57600080fd5b612528878388016124cf565b9450602086013591508082111561253e57600080fd5b61254a878388016124cf565b9350604086013591508082111561256057600080fd5b5061256d868287016124cf565b9150509250925092565b6000806000806080858703121561258d57600080fd5b6125968561231c565b93506125a46020860161231c565b925060408501359150606085013567ffffffffffffffff8111156125c757600080fd5b8501601f810187136125d857600080fd5b6125e787823560208401612459565b91505092959194509250565b6000806040838503121561260657600080fd5b61260f8361231c565b91506123c16020840161231c565b600181811c9082168061263157607f821691505b60208210810361265157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600083516126cc818460208801612298565b8351908301906126e0818360208801612298565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612803816017850160208801612298565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612834816028840160208801612298565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612873908301846122c4565b9695505050505050565b60006020828403121561288f57600080fd5b8151610bb381612265565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156128ca576128ca61289a565b500290565b600082198211156128e2576128e261289a565b500190565b6000816128f6576128f661289a565b506000190190565b6000828210156129105761291061289a565b500390565b634e487b7160e01b600052603160045260246000fdfe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862aa26469706673582212201b7252dec63958ca4364cbee917c87e2a12de519274a71ab71d044fe29c620c064736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json deleted file mode 100644 index d72a04d8..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721Upgradeable.json +++ /dev/null @@ -1,354 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC721Upgradeable", - "sourceName": "contracts/token/ERC721/ERC721Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506110fb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606065805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152606960205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152606760205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526068602052604090205490565b60606066805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152606760205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea2646970667358221220f61e28cf38e2205efa30e3dfada16da5aefe80ca2a8d1c0cdb13ccb35670677864736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636352211e1161008c578063a22cb46511610066578063a22cb465146101b3578063b88d4fde146101c6578063c87b56dd146101d9578063e985e9c5146101ec57600080fd5b80636352211e1461017757806370a082311461018a57806395d89b41146101ab57600080fd5b806301ffc9a7146100d457806306fdde03146100fc578063081812fc14610111578063095ea7b31461013c57806323b872dd1461015157806342842e0e14610164575b600080fd5b6100e76100e2366004610c7f565b610228565b60405190151581526020015b60405180910390f35b61010461027a565b6040516100f39190610cf4565b61012461011f366004610d07565b61030c565b6040516001600160a01b0390911681526020016100f3565b61014f61014a366004610d3c565b610333565b005b61014f61015f366004610d66565b61044d565b61014f610172366004610d66565b61047e565b610124610185366004610d07565b610499565b61019d610198366004610da2565b6104f9565b6040519081526020016100f3565b61010461057f565b61014f6101c1366004610dbd565b61058e565b61014f6101d4366004610e0f565b61059d565b6101046101e7366004610d07565b6105d5565b6100e76101fa366004610eeb565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b148061025957506001600160e01b03198216635b5e139f60e01b145b8061027457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606065805461028990610f1e565b80601f01602080910402602001604051908101604052809291908181526020018280546102b590610f1e565b80156103025780601f106102d757610100808354040283529160200191610302565b820191906000526020600020905b8154815290600101906020018083116102e557829003601f168201915b5050505050905090565b600061031782610649565b506000908152606960205260409020546001600160a01b031690565b600061033e82610499565b9050806001600160a01b0316836001600160a01b0316036103b05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806103cc57506103cc81336101fa565b61043e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103a7565b61044883836106ab565b505050565b6104573382610719565b6104735760405162461bcd60e51b81526004016103a790610f58565b610448838383610798565b6104488383836040518060200160405280600081525061059d565b6000818152606760205260408120546001600160a01b0316806102745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b60006001600160a01b0382166105635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016103a7565b506001600160a01b031660009081526068602052604090205490565b60606066805461028990610f1e565b6105993383836108fc565b5050565b6105a73383610719565b6105c35760405162461bcd60e51b81526004016103a790610f58565b6105cf848484846109ca565b50505050565b60606105e082610649565b60006105f760408051602081019091526000815290565b905060008151116106175760405180602001604052806000815250610642565b80610621846109fd565b604051602001610632929190610fa5565b6040516020818303038152906040525b9392505050565b6000818152606760205260409020546001600160a01b03166106a85760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016103a7565b50565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906106e082610499565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061072583610499565b9050806001600160a01b0316846001600160a01b0316148061076c57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806107905750836001600160a01b03166107858461030c565b6001600160a01b0316145b949350505050565b826001600160a01b03166107ab82610499565b6001600160a01b0316146107d15760405162461bcd60e51b81526004016103a790610fd4565b6001600160a01b0382166108335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103a7565b826001600160a01b031661084682610499565b6001600160a01b03161461086c5760405162461bcd60e51b81526004016103a790610fd4565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03160361095d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103a7565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6109d5848484610798565b6109e184848484610a90565b6105cf5760405162461bcd60e51b81526004016103a790611019565b60606000610a0a83610b91565b600101905060008167ffffffffffffffff811115610a2a57610a2a610df9565b6040519080825280601f01601f191660200182016040528015610a54576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610a5e57509392505050565b60006001600160a01b0384163b15610b8657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610ad490339089908890889060040161106b565b6020604051808303816000875af1925050508015610b0f575060408051601f3d908101601f19168201909252610b0c918101906110a8565b60015b610b6c573d808015610b3d576040519150601f19603f3d011682016040523d82523d6000602084013e610b42565b606091505b508051600003610b645760405162461bcd60e51b81526004016103a790611019565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610790565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310610bd05772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310610bfc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310610c1a57662386f26fc10000830492506010015b6305f5e1008310610c32576305f5e100830492506008015b6127108310610c4657612710830492506004015b60648310610c58576064830492506002015b600a83106102745760010192915050565b6001600160e01b0319811681146106a857600080fd5b600060208284031215610c9157600080fd5b813561064281610c69565b60005b83811015610cb7578181015183820152602001610c9f565b838111156105cf5750506000910152565b60008151808452610ce0816020860160208601610c9c565b601f01601f19169290920160200192915050565b6020815260006106426020830184610cc8565b600060208284031215610d1957600080fd5b5035919050565b80356001600160a01b0381168114610d3757600080fd5b919050565b60008060408385031215610d4f57600080fd5b610d5883610d20565b946020939093013593505050565b600080600060608486031215610d7b57600080fd5b610d8484610d20565b9250610d9260208501610d20565b9150604084013590509250925092565b600060208284031215610db457600080fd5b61064282610d20565b60008060408385031215610dd057600080fd5b610dd983610d20565b915060208301358015158114610dee57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215610e2557600080fd5b610e2e85610d20565b9350610e3c60208601610d20565b925060408501359150606085013567ffffffffffffffff80821115610e6057600080fd5b818701915087601f830112610e7457600080fd5b813581811115610e8657610e86610df9565b604051601f8201601f19908116603f01168101908382118183101715610eae57610eae610df9565b816040528281528a6020848701011115610ec757600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215610efe57600080fd5b610f0783610d20565b9150610f1560208401610d20565b90509250929050565b600181811c90821680610f3257607f821691505b602082108103610f5257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60008351610fb7818460208801610c9c565b835190830190610fcb818360208801610c9c565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061109e90830184610cc8565b9695505050505050565b6000602082840312156110ba57600080fd5b815161064281610c6956fea2646970667358221220f61e28cf38e2205efa30e3dfada16da5aefe80ca2a8d1c0cdb13ccb35670677864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json deleted file mode 100644 index 4d607bf0..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777PresetFixedSupplyUpgradeable.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC777PresetFixedSupplyUpgradeable", - "sourceName": "contracts/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "AuthorizedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Burned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Minted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "RevokedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Sent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "authorizeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "defaultOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "granularity", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address[]", - "name": "defaultOperators", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "initialSupply", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "isOperatorFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "revokeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50611dad806100206000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063768f950a116100ad578063d95b637111610071578063d95b637114610249578063dd62ed3e1461025c578063fad8b32a14610295578063fc673c4f146102a8578063fe9d9303146102bb57600080fd5b8063768f950a146101f5578063959b8c3f1461020857806395d89b411461021b5780639bd9bbc614610223578063a9059cbb1461023657600080fd5b806323b872dd116100f457806323b872dd1461018e578063313ce567146101a1578063556f0dc7146101b057806362ad1b83146101b757806370a08231146101cc57600080fd5b806306e485381461012657806306fdde0314610144578063095ea7b31461015957806318160ddd1461017c575b600080fd5b61012e6102ce565b60405161013b9190611671565b60405180910390f35b61014c610330565b60405161013b919061170b565b61016c610167366004611746565b6103b9565b604051901515815260200161013b565b6034545b60405190815260200161013b565b61016c61019c366004611772565b6103d1565b6040516012815260200161013b565b6001610180565b6101ca6101c536600461186a565b610417565b005b6101806101da3660046118fd565b6001600160a01b031660009081526033602052604090205490565b6101ca61020336600461191a565b61045c565b6101ca6102163660046118fd565b610577565b61014c610694565b6101ca610231366004611a2d565b6106a3565b61016c610244366004611746565b6106c6565b61016c610257366004611a86565b6106fe565b61018061026a366004611a86565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101ca6102a33660046118fd565b6107a0565b6101ca6102b6366004611abf565b6108bb565b6101ca6102c9366004611b3f565b6108f3565b6060603780548060200260200160405190810160405280929190818152602001828054801561032657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610308575b5050505050905090565b60606035805461033f90611b86565b80601f016020809104026020016040519081016040528092919081815260200182805461036b90611b86565b80156103265780601f1061038d57610100808354040283529160200191610326565b820191906000526020600020905b81548152906001019060200180831161039b57509395945050505050565b6000336103c7818585610912565b5060019392505050565b6000336103df858285610a39565b61040c85858560405180602001604052806000815250604051806020016040528060008152506000610ac5565b506001949350505050565b61042133866106fe565b6104465760405162461bcd60e51b815260040161043d90611bc0565b60405180910390fd5b61045585858585856001610ac5565b5050505050565b600054610100900460ff161580801561047c5750600054600160ff909116105b806104965750303b158015610496575060005460ff166001145b6104f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161043d565b6000805460ff19166001179055801561051c576000805461ff0019166101001790555b6105298686868686610bc1565b801561056f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6001600160a01b03811633036105db5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561062c57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff1916905561065b565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b60606036805461033f90611b86565b6106c133848484604051806020016040528060008152506001610ac5565b505050565b60006106f533848460405180602001604052806000815250604051806020016040528060008152506000610ac5565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061076957506001600160a01b03831660009081526038602052604090205460ff16801561076957506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061079957506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036108025760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561085657336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610882565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b6108c533856106fe565b6108e15760405162461bcd60e51b815260040161043d90611bc0565b6108ed84848484610c00565b50505050565b61090e33838360405180602001604052806000815250610c00565b5050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043d565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043d565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146108ed5781811015610ab85760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161043d565b6108ed8484848403610912565b6001600160a01b038616610b2a5760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161043d565b6001600160a01b038516610b8c5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161043d565b33610b9b818888888888610db5565b610ba9818888888888610edc565b610bb881888888888888611042565b50505050505050565b600054610100900460ff16610be85760405162461bcd60e51b815260040161043d90611c0c565b610bf3858585611207565b61045585858585856113f1565b6001600160a01b038416610c615760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161043d565b33610c7181866000878787610db5565b6001600160a01b03851660009081526033602052604090205484811015610ce65760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161043d565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610d15908490611c6d565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610d6393929190611c84565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190611cb9565b90506001600160a01b03811615610bb857604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610ea1908a908a908a908a908a908a90600401611cd6565b600060405180830381600087803b158015610ebb57600080fd5b505af1158015610ecf573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610f555760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161043d565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610f8c908490611d30565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610fe493929190611c84565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161103191815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611cb9565b90506001600160a01b03811615611163576040516223de2960e01b81526001600160a01b038216906223de299061112c908b908b908b908b908b908b90600401611cd6565b600060405180830381600087803b15801561114657600080fd5b505af115801561115a573d6000803e3d6000fd5b505050506111fd565b81156111fd576001600160a01b0386163b156111fd5760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161043d565b5050505050505050565b600054610100900460ff1661122e5760405162461bcd60e51b815260040161043d90611c0c565b8251611241906035906020860190611583565b508151611255906036906020850190611583565b508051611269906037906020840190611607565b5060005b81518110156112d25760016038600084848151811061128e5761128e611d48565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806112ca81611d5e565b91505061126d565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b1580156113dd57600080fd5b505af1158015610bb8573d6000803e3d6000fd5b600054610100900460ff166114185760405162461bcd60e51b815260040161043d90611c0c565b610455818360405180602001604052806000815250604051806020016040528060008152506108ed8484848460016001600160a01b03851661149c5760405162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f2061646472657373604482015260640161043d565b600033905084603460008282546114b39190611d30565b90915550506001600160a01b038616600090815260336020526040812080548792906114e0908490611d30565b909155506114f690508160008888888888611042565b856001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d87878760405161153d93929190611c84565b60405180910390a36040518581526001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610da5565b82805461158f90611b86565b90600052602060002090601f0160209004810192826115b157600085556115f7565b82601f106115ca57805160ff19168380011785556115f7565b828001600101855582156115f7579182015b828111156115f75782518255916020019190600101906115dc565b5061160392915061165c565b5090565b8280548282559060005260206000209081019282156115f7579160200282015b828111156115f757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611627565b5b80821115611603576000815560010161165d565b6020808252825182820181905260009190848201906040850190845b818110156116b25783516001600160a01b03168352928401929184019160010161168d565b50909695505050505050565b6000815180845260005b818110156116e4576020818501810151868301820152016116c8565b818111156116f6576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061079960208301846116be565b6001600160a01b038116811461173357600080fd5b50565b80356117418161171e565b919050565b6000806040838503121561175957600080fd5b82356117648161171e565b946020939093013593505050565b60008060006060848603121561178757600080fd5b83356117928161171e565b925060208401356117a28161171e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117f2576117f26117b3565b604052919050565b600082601f83011261180b57600080fd5b813567ffffffffffffffff811115611825576118256117b3565b611838601f8201601f19166020016117c9565b81815284602083860101111561184d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561188257600080fd5b853561188d8161171e565b9450602086013561189d8161171e565b935060408601359250606086013567ffffffffffffffff808211156118c157600080fd5b6118cd89838a016117fa565b935060808801359150808211156118e357600080fd5b506118f0888289016117fa565b9150509295509295909350565b60006020828403121561190f57600080fd5b81356107998161171e565b600080600080600060a0868803121561193257600080fd5b853567ffffffffffffffff8082111561194a57600080fd5b61195689838a016117fa565b965060209150818801358181111561196d57600080fd5b6119798a828b016117fa565b96505060408801358181111561198e57600080fd5b8801601f81018a1361199f57600080fd5b8035828111156119b1576119b16117b3565b8060051b92506119c28484016117c9565b818152928201840192848101908c8511156119dc57600080fd5b928501925b84841015611a0657833592506119f68361171e565b82825292850192908501906119e1565b975050505060608801359350611a2191505060808701611736565b90509295509295909350565b600080600060608486031215611a4257600080fd5b8335611a4d8161171e565b925060208401359150604084013567ffffffffffffffff811115611a7057600080fd5b611a7c868287016117fa565b9150509250925092565b60008060408385031215611a9957600080fd5b8235611aa48161171e565b91506020830135611ab48161171e565b809150509250929050565b60008060008060808587031215611ad557600080fd5b8435611ae08161171e565b935060208501359250604085013567ffffffffffffffff80821115611b0457600080fd5b611b10888389016117fa565b93506060870135915080821115611b2657600080fd5b50611b33878288016117fa565b91505092959194509250565b60008060408385031215611b5257600080fd5b82359150602083013567ffffffffffffffff811115611b7057600080fd5b611b7c858286016117fa565b9150509250929050565b600181811c90821680611b9a57607f821691505b602082108103611bba57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611c7f57611c7f611c57565b500390565b838152606060208201526000611c9d60608301856116be565b8281036040840152611caf81856116be565b9695505050505050565b600060208284031215611ccb57600080fd5b81516107998161171e565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c060808201819052600090611d11908301856116be565b82810360a0840152611d2381856116be565b9998505050505050505050565b60008219821115611d4357611d43611c57565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201611d7057611d70611c57565b506001019056fea264697066735822122030a4d695002835d9c151a106b00acb1075e2875f4b101a145a9be16e6efcd56864736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063768f950a116100ad578063d95b637111610071578063d95b637114610249578063dd62ed3e1461025c578063fad8b32a14610295578063fc673c4f146102a8578063fe9d9303146102bb57600080fd5b8063768f950a146101f5578063959b8c3f1461020857806395d89b411461021b5780639bd9bbc614610223578063a9059cbb1461023657600080fd5b806323b872dd116100f457806323b872dd1461018e578063313ce567146101a1578063556f0dc7146101b057806362ad1b83146101b757806370a08231146101cc57600080fd5b806306e485381461012657806306fdde0314610144578063095ea7b31461015957806318160ddd1461017c575b600080fd5b61012e6102ce565b60405161013b9190611671565b60405180910390f35b61014c610330565b60405161013b919061170b565b61016c610167366004611746565b6103b9565b604051901515815260200161013b565b6034545b60405190815260200161013b565b61016c61019c366004611772565b6103d1565b6040516012815260200161013b565b6001610180565b6101ca6101c536600461186a565b610417565b005b6101806101da3660046118fd565b6001600160a01b031660009081526033602052604090205490565b6101ca61020336600461191a565b61045c565b6101ca6102163660046118fd565b610577565b61014c610694565b6101ca610231366004611a2d565b6106a3565b61016c610244366004611746565b6106c6565b61016c610257366004611a86565b6106fe565b61018061026a366004611a86565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101ca6102a33660046118fd565b6107a0565b6101ca6102b6366004611abf565b6108bb565b6101ca6102c9366004611b3f565b6108f3565b6060603780548060200260200160405190810160405280929190818152602001828054801561032657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610308575b5050505050905090565b60606035805461033f90611b86565b80601f016020809104026020016040519081016040528092919081815260200182805461036b90611b86565b80156103265780601f1061038d57610100808354040283529160200191610326565b820191906000526020600020905b81548152906001019060200180831161039b57509395945050505050565b6000336103c7818585610912565b5060019392505050565b6000336103df858285610a39565b61040c85858560405180602001604052806000815250604051806020016040528060008152506000610ac5565b506001949350505050565b61042133866106fe565b6104465760405162461bcd60e51b815260040161043d90611bc0565b60405180910390fd5b61045585858585856001610ac5565b5050505050565b600054610100900460ff161580801561047c5750600054600160ff909116105b806104965750303b158015610496575060005460ff166001145b6104f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161043d565b6000805460ff19166001179055801561051c576000805461ff0019166101001790555b6105298686868686610bc1565b801561056f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6001600160a01b03811633036105db5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561062c57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff1916905561065b565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b60606036805461033f90611b86565b6106c133848484604051806020016040528060008152506001610ac5565b505050565b60006106f533848460405180602001604052806000815250604051806020016040528060008152506000610ac5565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061076957506001600160a01b03831660009081526038602052604090205460ff16801561076957506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061079957506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036108025760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161043d565b6001600160a01b03811660009081526038602052604090205460ff161561085657336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610882565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b6108c533856106fe565b6108e15760405162461bcd60e51b815260040161043d90611bc0565b6108ed84848484610c00565b50505050565b61090e33838360405180602001604052806000815250610c00565b5050565b6001600160a01b0383166109765760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043d565b6001600160a01b0382166109d85760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043d565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146108ed5781811015610ab85760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161043d565b6108ed8484848403610912565b6001600160a01b038616610b2a5760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161043d565b6001600160a01b038516610b8c5760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161043d565b33610b9b818888888888610db5565b610ba9818888888888610edc565b610bb881888888888888611042565b50505050505050565b600054610100900460ff16610be85760405162461bcd60e51b815260040161043d90611c0c565b610bf3858585611207565b61045585858585856113f1565b6001600160a01b038416610c615760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161043d565b33610c7181866000878787610db5565b6001600160a01b03851660009081526033602052604090205484811015610ce65760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161043d565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610d15908490611c6d565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610d6393929190611c84565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190611cb9565b90506001600160a01b03811615610bb857604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610ea1908a908a908a908a908a908a90600401611cd6565b600060405180830381600087803b158015610ebb57600080fd5b505af1158015610ecf573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610f555760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161043d565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610f8c908490611d30565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610fe493929190611c84565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161103191815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa1580156110c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e79190611cb9565b90506001600160a01b03811615611163576040516223de2960e01b81526001600160a01b038216906223de299061112c908b908b908b908b908b908b90600401611cd6565b600060405180830381600087803b15801561114657600080fd5b505af115801561115a573d6000803e3d6000fd5b505050506111fd565b81156111fd576001600160a01b0386163b156111fd5760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161043d565b5050505050505050565b600054610100900460ff1661122e5760405162461bcd60e51b815260040161043d90611c0c565b8251611241906035906020860190611583565b508151611255906036906020850190611583565b508051611269906037906020840190611607565b5060005b81518110156112d25760016038600084848151811061128e5761128e611d48565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806112ca81611d5e565b91505061126d565b506040516329965a1d60e01b815230600482018190527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b50506040516329965a1d60e01b815230600482018190527faea199e31a596269b42cdafd93407f14436db6e4cad65417994c2eb37381e05a60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad2492506329965a1d9150606401600060405180830381600087803b1580156113dd57600080fd5b505af1158015610bb8573d6000803e3d6000fd5b600054610100900460ff166114185760405162461bcd60e51b815260040161043d90611c0c565b610455818360405180602001604052806000815250604051806020016040528060008152506108ed8484848460016001600160a01b03851661149c5760405162461bcd60e51b815260206004820181905260248201527f4552433737373a206d696e7420746f20746865207a65726f2061646472657373604482015260640161043d565b600033905084603460008282546114b39190611d30565b90915550506001600160a01b038616600090815260336020526040812080548792906114e0908490611d30565b909155506114f690508160008888888888611042565b856001600160a01b0316816001600160a01b03167f2fe5be0146f74c5bce36c0b80911af6c7d86ff27e89d5cfa61fc681327954e5d87878760405161153d93929190611c84565b60405180910390a36040518581526001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610da5565b82805461158f90611b86565b90600052602060002090601f0160209004810192826115b157600085556115f7565b82601f106115ca57805160ff19168380011785556115f7565b828001600101855582156115f7579182015b828111156115f75782518255916020019190600101906115dc565b5061160392915061165c565b5090565b8280548282559060005260206000209081019282156115f7579160200282015b828111156115f757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611627565b5b80821115611603576000815560010161165d565b6020808252825182820181905260009190848201906040850190845b818110156116b25783516001600160a01b03168352928401929184019160010161168d565b50909695505050505050565b6000815180845260005b818110156116e4576020818501810151868301820152016116c8565b818111156116f6576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061079960208301846116be565b6001600160a01b038116811461173357600080fd5b50565b80356117418161171e565b919050565b6000806040838503121561175957600080fd5b82356117648161171e565b946020939093013593505050565b60008060006060848603121561178757600080fd5b83356117928161171e565b925060208401356117a28161171e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156117f2576117f26117b3565b604052919050565b600082601f83011261180b57600080fd5b813567ffffffffffffffff811115611825576118256117b3565b611838601f8201601f19166020016117c9565b81815284602083860101111561184d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561188257600080fd5b853561188d8161171e565b9450602086013561189d8161171e565b935060408601359250606086013567ffffffffffffffff808211156118c157600080fd5b6118cd89838a016117fa565b935060808801359150808211156118e357600080fd5b506118f0888289016117fa565b9150509295509295909350565b60006020828403121561190f57600080fd5b81356107998161171e565b600080600080600060a0868803121561193257600080fd5b853567ffffffffffffffff8082111561194a57600080fd5b61195689838a016117fa565b965060209150818801358181111561196d57600080fd5b6119798a828b016117fa565b96505060408801358181111561198e57600080fd5b8801601f81018a1361199f57600080fd5b8035828111156119b1576119b16117b3565b8060051b92506119c28484016117c9565b818152928201840192848101908c8511156119dc57600080fd5b928501925b84841015611a0657833592506119f68361171e565b82825292850192908501906119e1565b975050505060608801359350611a2191505060808701611736565b90509295509295909350565b600080600060608486031215611a4257600080fd5b8335611a4d8161171e565b925060208401359150604084013567ffffffffffffffff811115611a7057600080fd5b611a7c868287016117fa565b9150509250925092565b60008060408385031215611a9957600080fd5b8235611aa48161171e565b91506020830135611ab48161171e565b809150509250929050565b60008060008060808587031215611ad557600080fd5b8435611ae08161171e565b935060208501359250604085013567ffffffffffffffff80821115611b0457600080fd5b611b10888389016117fa565b93506060870135915080821115611b2657600080fd5b50611b33878288016117fa565b91505092959194509250565b60008060408385031215611b5257600080fd5b82359150602083013567ffffffffffffffff811115611b7057600080fd5b611b7c858286016117fa565b9150509250929050565b600181811c90821680611b9a57607f821691505b602082108103611bba57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611c7f57611c7f611c57565b500390565b838152606060208201526000611c9d60608301856116be565b8281036040840152611caf81856116be565b9695505050505050565b600060208284031215611ccb57600080fd5b81516107998161171e565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c060808201819052600090611d11908301856116be565b82810360a0840152611d2381856116be565b9998505050505050505050565b60008219821115611d4357611d43611c57565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201611d7057611d70611c57565b506001019056fea264697066735822122030a4d695002835d9c151a106b00acb1075e2875f4b101a145a9be16e6efcd56864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json deleted file mode 100644 index 6ed2cba0..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC777Upgradeable.json +++ /dev/null @@ -1,579 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC777Upgradeable", - "sourceName": "contracts/token/ERC777/ERC777Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "AuthorizedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Burned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Minted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "RevokedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Sent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "authorizeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "defaultOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "granularity", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "isOperatorFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "revokeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50611619806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6034545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526033602052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060603780548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060603580546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff16156104f357336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060603680546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526038602052604090205460ff16801561063057506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff161561071d57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526033602052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea26469706673582212207111d819d18f7e65e31b6cee7ce658eff0abc06b305d910f2e82199e5f9faba864736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461022b578063dd62ed3e1461023e578063fad8b32a14610277578063fc673c4f1461028a578063fe9d93031461029d57600080fd5b8063959b8c3f146101ea57806395d89b41146101fd5780639bd9bbc614610205578063a9059cbb1461021857600080fd5b806323b872dd116100e957806323b872dd14610183578063313ce56714610196578063556f0dc7146101a557806362ad1b83146101ac57806370a08231146101c157600080fd5b806306e485381461011b57806306fdde0314610139578063095ea7b31461014e57806318160ddd14610171575b600080fd5b6101236102b0565b604051610130919061108e565b60405180910390f35b610141610312565b6040516101309190611128565b61016161015c366004611153565b61039b565b6040519015158152602001610130565b6034545b604051908152602001610130565b61016161019136600461117f565b6103b3565b60405160128152602001610130565b6001610175565b6101bf6101ba366004611263565b6103f9565b005b6101756101cf3660046112f6565b6001600160a01b031660009081526033602052604090205490565b6101bf6101f83660046112f6565b61043e565b61014161055b565b6101bf610213366004611313565b61056a565b610161610226366004611153565b61058d565b61016161023936600461136c565b6105c5565b61017561024c36600461136c565b6001600160a01b039182166000908152603b6020908152604080832093909416825291909152205490565b6101bf6102853660046112f6565b610667565b6101bf6102983660046113a5565b610782565b6101bf6102ab366004611425565b6107ba565b6060603780548060200260200160405190810160405280929190818152602001828054801561030857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102ea575b5050505050905090565b6060603580546103219061146c565b80601f016020809104026020016040519081016040528092919081815260200182805461034d9061146c565b80156103085780601f1061036f57610100808354040283529160200191610308565b820191906000526020600020905b81548152906001019060200180831161037d57509395945050505050565b6000336103a98185856107d9565b5060019392505050565b6000336103c1858285610900565b6103ee8585856040518060200160405280600081525060405180602001604052806000815250600061098c565b506001949350505050565b61040333866105c5565b6104285760405162461bcd60e51b815260040161041f906114a6565b60405180910390fd5b6104378585858585600161098c565b5050505050565b6001600160a01b03811633036104a25760405162461bcd60e51b8152602060048201526024808201527f4552433737373a20617574686f72697a696e672073656c66206173206f70657260448201526330ba37b960e11b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff16156104f357336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19169055610522565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191660011790555b60405133906001600160a01b038316907ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f990600090a350565b6060603680546103219061146c565b6105883384848460405180602001604052806000815250600161098c565b505050565b60006105bc3384846040518060200160405280600081525060405180602001604052806000815250600061098c565b50600192915050565b6000816001600160a01b0316836001600160a01b0316148061063057506001600160a01b03831660009081526038602052604090205460ff16801561063057506001600160a01b038083166000908152603a602090815260408083209387168352929052205460ff16155b8061066057506001600160a01b0380831660009081526039602090815260408083209387168352929052205460ff165b9392505050565b336001600160a01b038216036106c95760405162461bcd60e51b815260206004820152602160248201527f4552433737373a207265766f6b696e672073656c66206173206f70657261746f6044820152603960f91b606482015260840161041f565b6001600160a01b03811660009081526038602052604090205460ff161561071d57336000908152603a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610749565b3360009081526039602090815260408083206001600160a01b03851684529091529020805460ff191690555b60405133906001600160a01b038316907f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa190600090a350565b61078c33856105c5565b6107a85760405162461bcd60e51b815260040161041f906114a6565b6107b484848484610a88565b50505050565b6107d533838360405180602001604052806000815250610a88565b5050565b6001600160a01b03831661083d5760405162461bcd60e51b815260206004820152602560248201527f4552433737373a20617070726f76652066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b03821661089f5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a20617070726f766520746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b6001600160a01b038381166000818152603b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603b602090815260408083209386168352929052205460001981146107b4578181101561097f5760405162461bcd60e51b815260206004820152601e60248201527f4552433737373a20696e73756666696369656e7420616c6c6f77616e63650000604482015260640161041f565b6107b484848484036107d9565b6001600160a01b0386166109f15760405162461bcd60e51b815260206004820152602660248201527f4552433737373a207472616e736665722066726f6d20746865207a65726f206160448201526564647265737360d01b606482015260840161041f565b6001600160a01b038516610a535760405162461bcd60e51b8152602060048201526024808201527f4552433737373a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b33610a62818888888888610c3c565b610a70818888888888610d63565b610a7f81888888888888610ec9565b50505050505050565b6001600160a01b038416610ae95760405162461bcd60e51b815260206004820152602260248201527f4552433737373a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b33610af981866000878787610c3c565b6001600160a01b03851660009081526033602052604090205484811015610b6e5760405162461bcd60e51b815260206004820152602360248201527f4552433737373a206275726e20616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041f565b6001600160a01b0386166000908152603360205260408120868303905560348054879290610b9d908490611508565b92505081905550856001600160a01b0316826001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098878787604051610beb9392919061151f565b60405180910390a36040518581526000906001600160a01b038816907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe8956024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611554565b90506001600160a01b03811615610a7f57604051633ad5cbc160e11b81526001600160a01b038216906375ab978290610d28908a908a908a908a908a908a90600401611571565b600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b03851660009081526033602052604090205483811015610ddc5760405162461bcd60e51b815260206004820152602760248201527f4552433737373a207472616e7366657220616d6f756e7420657863656564732060448201526662616c616e636560c81b606482015260840161041f565b6001600160a01b03808716600090815260336020526040808220878503905591871681529081208054869290610e139084906115cb565b92505081905550846001600160a01b0316866001600160a01b0316886001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987878787604051610e6b9392919061151f565b60405180910390a4846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051610eb891815260200190565b60405180910390a350505050505050565b60405163555ddc6560e11b81526001600160a01b03861660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b6024820152600090731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca90604401602060405180830381865afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611554565b90506001600160a01b03811615610fea576040516223de2960e01b81526001600160a01b038216906223de2990610fb3908b908b908b908b908b908b90600401611571565b600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050611084565b8115611084576001600160a01b0386163b156110845760405162461bcd60e51b815260206004820152604d60248201527f4552433737373a20746f6b656e20726563697069656e7420636f6e747261637460448201527f20686173206e6f20696d706c656d656e74657220666f7220455243373737546f60648201526c1ad95b9cd49958da5c1a595b9d609a1b608482015260a40161041f565b5050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156110cf5783516001600160a01b0316835292840192918401916001016110aa565b50909695505050505050565b6000815180845260005b81811015611101576020818501810151868301820152016110e5565b81811115611113576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061066060208301846110db565b6001600160a01b038116811461115057600080fd5b50565b6000806040838503121561116657600080fd5b82356111718161113b565b946020939093013593505050565b60008060006060848603121561119457600080fd5b833561119f8161113b565b925060208401356111af8161113b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126111e757600080fd5b813567ffffffffffffffff80821115611202576112026111c0565b604051601f8301601f19908116603f0116810190828211818310171561122a5761122a6111c0565b8160405283815286602085880101111561124357600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561127b57600080fd5b85356112868161113b565b945060208601356112968161113b565b935060408601359250606086013567ffffffffffffffff808211156112ba57600080fd5b6112c689838a016111d6565b935060808801359150808211156112dc57600080fd5b506112e9888289016111d6565b9150509295509295909350565b60006020828403121561130857600080fd5b81356106608161113b565b60008060006060848603121561132857600080fd5b83356113338161113b565b925060208401359150604084013567ffffffffffffffff81111561135657600080fd5b611362868287016111d6565b9150509250925092565b6000806040838503121561137f57600080fd5b823561138a8161113b565b9150602083013561139a8161113b565b809150509250929050565b600080600080608085870312156113bb57600080fd5b84356113c68161113b565b935060208501359250604085013567ffffffffffffffff808211156113ea57600080fd5b6113f6888389016111d6565b9350606087013591508082111561140c57600080fd5b50611419878288016111d6565b91505092959194509250565b6000806040838503121561143857600080fd5b82359150602083013567ffffffffffffffff81111561145657600080fd5b611462858286016111d6565b9150509250929050565b600181811c9082168061148057607f821691505b6020821081036114a057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602c908201527f4552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f60408201526b39103337b9103437b63232b960a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008282101561151a5761151a6114f2565b500390565b83815260606020820152600061153860608301856110db565b828103604084015261154a81856110db565b9695505050505050565b60006020828403121561156657600080fd5b81516106608161113b565b6001600160a01b0387811682528681166020830152851660408201526060810184905260c0608082018190526000906115ac908301856110db565b82810360a08401526115be81856110db565b9998505050505050505050565b600082198211156115de576115de6114f2565b50019056fea26469706673582212207111d819d18f7e65e31b6cee7ce658eff0abc06b305d910f2e82199e5f9faba864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json deleted file mode 100644 index 2b7547ba..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableMapUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "EnumerableMapUpgradeable", - "sourceName": "contracts/utils/structs/EnumerableMapUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bd96dc64a5eb475047614c7fa721b2baf1792ed5cd4254417d9ae9e1c67e05a664736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220bd96dc64a5eb475047614c7fa721b2baf1792ed5cd4254417d9ae9e1c67e05a664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json deleted file mode 100644 index cdb814f1..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EnumerableSetUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "EnumerableSetUpgradeable", - "sourceName": "contracts/utils/structs/EnumerableSetUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201eab4f8eca1462662c5f28da8628f33400567893987a0647164a05fdc5dba30264736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201eab4f8eca1462662c5f28da8628f33400567893987a0647164a05fdc5dba30264736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json deleted file mode 100644 index 7f67508d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EscrowUpgradeable.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "EscrowUpgradeable", - "sourceName": "contracts/utils/escrow/EscrowUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "depositsOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "payee", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506106f2806100206000396000f3fe6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b146100c1578063e3a9db1a146100ee578063f2fde38b14610132578063f340fa011461015257600080fd5b806351cff8d914610075578063715018a6146100975780638129fc1c146100ac575b600080fd5b34801561008157600080fd5b50610095610090366004610627565b610165565b005b3480156100a357600080fd5b506100956101dc565b3480156100b857600080fd5b506100956101f0565b3480156100cd57600080fd5b506033546040516001600160a01b0390911681526020015b60405180910390f35b3480156100fa57600080fd5b50610124610109366004610627565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100e5565b34801561013e57600080fd5b5061009561014d366004610627565b610306565b610095610160366004610627565b61037c565b61016d6103ee565b6001600160a01b03811660008181526065602052604081208054919055906101959082610448565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101d091815260200190565b60405180910390a25050565b6101e46103ee565b6101ee6000610566565b565b600054610100900460ff16158080156102105750600054600160ff909116105b8061022a5750303b15801561022a575060005460ff166001145b6102925760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156102b5576000805461ff0019166101001790555b6102bd6105b8565b8015610303576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61030e6103ee565b6001600160a01b0381166103735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610289565b61030381610566565b6103846103ee565b6001600160a01b0381166000908152606560205260408120805434928392916103ae90849061064b565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101d0565b6033546001600160a01b031633146101ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610289565b804710156104985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610289565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146104e5576040519150601f19603f3d011682016040523d82523d6000602084013e6104ea565b606091505b50509050806105615760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610289565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166105df5760405162461bcd60e51b815260040161028990610671565b6101ee600054610100900460ff166106095760405162461bcd60e51b815260040161028990610671565b6101ee33610566565b6001600160a01b038116811461030357600080fd5b60006020828403121561063957600080fd5b813561064481610612565b9392505050565b6000821982111561066c57634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122023d227fb64677a6c46e7e32e5c723cde51856e37c95b1c55e9f926ce208756ac64736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b146100c1578063e3a9db1a146100ee578063f2fde38b14610132578063f340fa011461015257600080fd5b806351cff8d914610075578063715018a6146100975780638129fc1c146100ac575b600080fd5b34801561008157600080fd5b50610095610090366004610627565b610165565b005b3480156100a357600080fd5b506100956101dc565b3480156100b857600080fd5b506100956101f0565b3480156100cd57600080fd5b506033546040516001600160a01b0390911681526020015b60405180910390f35b3480156100fa57600080fd5b50610124610109366004610627565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100e5565b34801561013e57600080fd5b5061009561014d366004610627565b610306565b610095610160366004610627565b61037c565b61016d6103ee565b6001600160a01b03811660008181526065602052604081208054919055906101959082610448565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101d091815260200190565b60405180910390a25050565b6101e46103ee565b6101ee6000610566565b565b600054610100900460ff16158080156102105750600054600160ff909116105b8061022a5750303b15801561022a575060005460ff166001145b6102925760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156102b5576000805461ff0019166101001790555b6102bd6105b8565b8015610303576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b61030e6103ee565b6001600160a01b0381166103735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610289565b61030381610566565b6103846103ee565b6001600160a01b0381166000908152606560205260408120805434928392916103ae90849061064b565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101d0565b6033546001600160a01b031633146101ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610289565b804710156104985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610289565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146104e5576040519150601f19603f3d011682016040523d82523d6000602084013e6104ea565b606091505b50509050806105615760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610289565b505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166105df5760405162461bcd60e51b815260040161028990610671565b6101ee600054610100900460ff166106095760405162461bcd60e51b815260040161028990610671565b6101ee33610566565b6001600160a01b038116811461030357600080fd5b60006020828403121561063957600080fd5b813561064481610612565b9392505050565b6000821982111561066c57634e487b7160e01b600052601160045260246000fd5b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea264697066735822122023d227fb64677a6c46e7e32e5c723cde51856e37c95b1c55e9f926ce208756ac64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json deleted file mode 100644 index 0f46e924..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCountingSimpleUpgradeable.json +++ /dev/null @@ -1,1045 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorCountingSimpleUpgradeable", - "sourceName": "contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "abstainVotes", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernorUpgradeable.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json deleted file mode 100644 index e07ad163..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorProposalThresholdUpgradeable.json +++ /dev/null @@ -1,1016 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorProposalThresholdUpgradeable", - "sourceName": "contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernorUpgradeable.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json deleted file mode 100644 index 85d09455..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorUpgradeable.json +++ /dev/null @@ -1,1016 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorUpgradeable", - "sourceName": "contracts/governance/GovernorUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernorUpgradeable.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json deleted file mode 100644 index d0a0ed1e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesCompUpgradeable.json +++ /dev/null @@ -1,1029 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorVotesCompUpgradeable", - "sourceName": "contracts/governance/extensions/GovernorVotesCompUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernorUpgradeable.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract ERC20VotesCompUpgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json deleted file mode 100644 index 46e9649b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesUpgradeable.json +++ /dev/null @@ -1,1029 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GovernorVotesUpgradeable", - "sourceName": "contracts/governance/extensions/GovernorVotesUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "Empty", - "type": "error" - }, - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXTENDED_BALLOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "relay", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernorUpgradeable.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC5805Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json deleted file mode 100644 index 66bc1b0d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAMBUpgradeable.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IAMBUpgradeable", - "sourceName": "contracts/vendor/amb/IAMBUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "executor", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "name": "AffirmationCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "executor", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "name": "RelayedMessage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedData", - "type": "bytes" - } - ], - "name": "UserRequestForAffirmation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "messageId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "encodedData", - "type": "bytes" - } - ], - "name": "UserRequestForSignature", - "type": "event" - }, - { - "inputs": [], - "name": "destinationChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "failedMessageDataHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "failedMessageReceiver", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "failedMessageSender", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxGasPerTx", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_messageId", - "type": "bytes32" - } - ], - "name": "messageCallStatus", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageSender", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageSourceChainId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_contract", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_gas", - "type": "uint256" - } - ], - "name": "requireToConfirmMessage", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_contract", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_gas", - "type": "uint256" - } - ], - "name": "requireToPassMessage", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sourceChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "transactionHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json deleted file mode 100644 index dca0fedd..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlDefaultAdminRulesUpgradeable.json +++ /dev/null @@ -1,355 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IAccessControlDefaultAdminRulesUpgradeable", - "sourceName": "contracts/access/IAccessControlDefaultAdminRulesUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [], - "name": "DefaultAdminDelayChangeCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint48", - "name": "newDelay", - "type": "uint48" - }, - { - "indexed": false, - "internalType": "uint48", - "name": "effectSchedule", - "type": "uint48" - } - ], - "name": "DefaultAdminDelayChangeScheduled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "DefaultAdminTransferCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint48", - "name": "acceptSchedule", - "type": "uint48" - } - ], - "name": "DefaultAdminTransferScheduled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "acceptDefaultAdminTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "beginDefaultAdminTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "cancelDefaultAdminTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint48", - "name": "newDelay", - "type": "uint48" - } - ], - "name": "changeDefaultAdminDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "defaultAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultAdminDelay", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "defaultAdminDelayIncreaseWait", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingDefaultAdmin", - "outputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - }, - { - "internalType": "uint48", - "name": "acceptSchedule", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingDefaultAdminDelay", - "outputs": [ - { - "internalType": "uint48", - "name": "newDelay", - "type": "uint48" - }, - { - "internalType": "uint48", - "name": "effectSchedule", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rollbackDefaultAdminDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json deleted file mode 100644 index da71abff..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlEnumerableUpgradeable.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IAccessControlEnumerableUpgradeable", - "sourceName": "contracts/access/IAccessControlEnumerableUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json deleted file mode 100644 index 975c7175..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IAccessControlUpgradeable.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IAccessControlUpgradeable", - "sourceName": "contracts/access/IAccessControlUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json deleted file mode 100644 index 136a8cf3..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IArbSysUpgradeable.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IArbSysUpgradeable", - "sourceName": "contracts/vendor/arbitrum/IArbSysUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "uniqueId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "batchNumber", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "indexInBatch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "arbBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "callvalue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "L2ToL1Transaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "hash", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "position", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "arbBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethBlockNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "callvalue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "L2ToL1Tx", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "reserved", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "position", - "type": "uint256" - } - ], - "name": "SendMerkleUpdate", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "arbBlockNum", - "type": "uint256" - } - ], - "name": "arbBlockHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbChainID", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "arbOSVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStorageGasAvailable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isTopLevelCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "unused", - "type": "address" - } - ], - "name": "mapL1SenderContractAddressToL2Alias", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "myCallersAddressWithoutAliasing", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sendMerkleTreeState", - "outputs": [ - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - }, - { - "internalType": "bytes32[]", - "name": "partials", - "type": "bytes32[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendTxToL1", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "wasMyCallersAddressAliased", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "name": "withdrawEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json deleted file mode 100644 index 0ab362d8..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IDelayedMessageProviderUpgradeable.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IDelayedMessageProviderUpgradeable", - "sourceName": "contracts/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "InboxMessageDelivered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - } - ], - "name": "InboxMessageDeliveredFromOrigin", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json deleted file mode 100644 index 5b39940d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155Upgradeable.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC1155Upgradeable", - "sourceName": "contracts/token/ERC1155/IERC1155Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "value", - "type": "string" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "URI", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json deleted file mode 100644 index fde5bccc..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC165Upgradeable.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC165Upgradeable", - "sourceName": "contracts/utils/introspection/IERC165Upgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json deleted file mode 100644 index b6076613..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1820RegistryUpgradeable.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC1820RegistryUpgradeable", - "sourceName": "contracts/utils/introspection/IERC1820RegistryUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "interfaceHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "implementer", - "type": "address" - } - ], - "name": "InterfaceImplementerSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newManager", - "type": "address" - } - ], - "name": "ManagerChanged", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_interfaceHash", - "type": "bytes32" - } - ], - "name": "getInterfaceImplementer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "implementsERC165Interface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "implementsERC165InterfaceNoCache", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "interfaceName", - "type": "string" - } - ], - "name": "interfaceHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_interfaceHash", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "implementer", - "type": "address" - } - ], - "name": "setInterfaceImplementer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "newManager", - "type": "address" - } - ], - "name": "setManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "updateERC165Cache", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json deleted file mode 100644 index 2cd65da9..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1822ProxiableUpgradeable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC1822ProxiableUpgradeable", - "sourceName": "contracts/interfaces/draft-IERC1822Upgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json deleted file mode 100644 index cb005c9f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1967Upgradeable.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC1967Upgradeable", - "sourceName": "contracts/interfaces/IERC1967Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json deleted file mode 100644 index 87622fab..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC20PermitUpgradeable.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC20PermitUpgradeable", - "sourceName": "contracts/token/ERC20/extensions/IERC20PermitUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json deleted file mode 100644 index 79046d35..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2309Upgradeable.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC2309Upgradeable", - "sourceName": "contracts/interfaces/IERC2309Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromTokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "toTokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toAddress", - "type": "address" - } - ], - "name": "ConsecutiveTransfer", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json deleted file mode 100644 index 3d0f87a5..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2981Upgradeable.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC2981Upgradeable", - "sourceName": "contracts/interfaces/IERC2981Upgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "salePrice", - "type": "uint256" - } - ], - "name": "royaltyInfo", - "outputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "royaltyAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json deleted file mode 100644 index 84374d3c..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC3156FlashBorrowerUpgradeable.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC3156FlashBorrowerUpgradeable", - "sourceName": "contracts/interfaces/IERC3156FlashBorrowerUpgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "initiator", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "onFlashLoan", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json deleted file mode 100644 index c9a6c12e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC5805Upgradeable.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC5805Upgradeable", - "sourceName": "contracts/interfaces/IERC5805Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json deleted file mode 100644 index c6461595..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC6372Upgradeable.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC6372Upgradeable", - "sourceName": "contracts/interfaces/IERC6372Upgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json deleted file mode 100644 index 94424be2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721EnumerableUpgradeable.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC721EnumerableUpgradeable", - "sourceName": "contracts/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenOfOwnerByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json deleted file mode 100644 index 318f9e81..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721MetadataUpgradeable.json +++ /dev/null @@ -1,341 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC721MetadataUpgradeable", - "sourceName": "contracts/token/ERC721/extensions/IERC721MetadataUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json deleted file mode 100644 index a2962889..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC721Upgradeable.json +++ /dev/null @@ -1,296 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC721Upgradeable", - "sourceName": "contracts/token/ERC721/IERC721Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json deleted file mode 100644 index d582c935..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777RecipientUpgradeable.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC777RecipientUpgradeable", - "sourceName": "contracts/token/ERC777/IERC777RecipientUpgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "userData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "tokensReceived", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json deleted file mode 100644 index 5b484814..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777SenderUpgradeable.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC777SenderUpgradeable", - "sourceName": "contracts/token/ERC777/IERC777SenderUpgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "userData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "tokensToSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json deleted file mode 100644 index 5456a34d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC777Upgradeable.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IERC777Upgradeable", - "sourceName": "contracts/token/ERC777/IERC777Upgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "AuthorizedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Burned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Minted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "RevokedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Sent", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "authorizeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "defaultOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "granularity", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "isOperatorFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "revokeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json deleted file mode 100644 index ebcea6c1..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IFxMessageProcessorUpgradeable.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IFxMessageProcessorUpgradeable", - "sourceName": "contracts/vendor/polygon/IFxMessageProcessorUpgradeable.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "stateId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "rootMessageSender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "processMessageFromRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json deleted file mode 100644 index 166305cd..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorTimelockUpgradeable.json +++ /dev/null @@ -1,869 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IGovernorTimelockUpgradeable", - "sourceName": "contracts/governance/extensions/IGovernorTimelockUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "eta", - "type": "uint256" - } - ], - "name": "ProposalQueued", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalEta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "queue", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernorUpgradeable.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "timelock", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json deleted file mode 100644 index 87bc9125..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IGovernorUpgradeable.json +++ /dev/null @@ -1,784 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IGovernorUpgradeable", - "sourceName": "contracts/governance/IGovernorUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteStart", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "voteEnd", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "ProposalCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "ProposalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "VoteCast", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "voter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weight", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "VoteCastWithParams", - "type": "event" - }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "COUNTING_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - } - ], - "name": "castVote", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "castVoteWithReason", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "castVoteWithReasonAndParams", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "string", - "name": "reason", - "type": "string" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "castVoteWithReasonAndParamsBySig", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - } - ], - "name": "getVotesWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasVoted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "descriptionHash", - "type": "bytes32" - } - ], - "name": "hashProposal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalDeadline", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalProposer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", - "outputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "state", - "outputs": [ - { - "internalType": "enum IGovernorUpgradeable.ProposalState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "votingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json deleted file mode 100644 index 8dc02c76..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IInboxUpgradeable.json +++ /dev/null @@ -1,453 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IInboxUpgradeable", - "sourceName": "contracts/vendor/arbitrum/IInboxUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "InboxMessageDelivered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageNum", - "type": "uint256" - } - ], - "name": "InboxMessageDeliveredFromOrigin", - "type": "event" - }, - { - "inputs": [], - "name": "bridge", - "outputs": [ - { - "internalType": "contract IBridgeUpgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "dataLength", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "baseFee", - "type": "uint256" - } - ], - "name": "calculateRetryableSubmissionFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2CallValue", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxSubmissionCost", - "type": "uint256" - }, - { - "internalType": "address", - "name": "excessFeeRefundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "callValueRefundAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "createRetryableTicket", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "depositEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IBridgeUpgradeable", - "name": "_bridge", - "type": "address" - }, - { - "internalType": "address", - "name": "_sequencerInbox", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IBridgeUpgradeable", - "name": "_bridge", - "type": "address" - } - ], - "name": "postUpgradeInit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendContractTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendL1FundedContractTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendL1FundedUnsignedTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "messageData", - "type": "bytes" - } - ], - "name": "sendL2Message", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "messageData", - "type": "bytes" - } - ], - "name": "sendL2MessageFromOrigin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendUnsignedTransaction", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sequencerInbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2CallValue", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxSubmissionCost", - "type": "uint256" - }, - { - "internalType": "address", - "name": "excessFeeRefundAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "callValueRefundAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "unsafeCreateRetryableTicket", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json deleted file mode 100644 index 110449f7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IOutboxUpgradeable.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IOutboxUpgradeable", - "sourceName": "contracts/vendor/arbitrum/IOutboxUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "zero", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "transactionIndex", - "type": "uint256" - } - ], - "name": "OutBoxTransactionExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "outputRoot", - "type": "bytes32" - } - ], - "name": "SendRootUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "OUTBOX_VERSION", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridge", - "outputs": [ - { - "internalType": "contract IBridgeUpgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l1Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l2Timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "calculateItemHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "uint256", - "name": "path", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "item", - "type": "bytes32" - } - ], - "name": "calculateMerkleRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l1Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l2Timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "executeTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "l2Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l1Block", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "l2Timestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "executeTransactionSimulation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "isSpent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1Block", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1EthBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1OutputId", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1Sender", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2ToL1Timestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rollup", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "roots", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "spent", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "sendRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "l2BlockHash", - "type": "bytes32" - } - ], - "name": "updateSendRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json deleted file mode 100644 index 774cab68..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IVotesUpgradeable.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "IVotesUpgradeable", - "sourceName": "contracts/governance/utils/IVotesUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json deleted file mode 100644 index f2aee9b6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibAMBUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibAMBUpgradeable", - "sourceName": "contracts/crosschain/amb/LibAMBUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1491fb765213f903e09910386b22edec8801436ce19ab885f7b8ad8c722a42564736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f1491fb765213f903e09910386b22edec8801436ce19ab885f7b8ad8c722a42564736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json deleted file mode 100644 index f011295a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL1Upgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibArbitrumL1Upgradeable", - "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122038dfac37d38524b0388e49876faf180c9ce195a2183d1ad77bde369c8ed5f75864736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122038dfac37d38524b0388e49876faf180c9ce195a2183d1ad77bde369c8ed5f75864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json deleted file mode 100644 index 7dad3a43..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibArbitrumL2Upgradeable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibArbitrumL2Upgradeable", - "sourceName": "contracts/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "ARBSYS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x6091610038600b82828239805160001a607314602b57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea264697066735822122041edcd22687c945b2264459f842a8b1ca8b00492f7d9aa8f4a2a63976c2b9dcd64736f6c634300080d0033", - "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361060335760003560e01c8063bf0a12cf146038575b600080fd5b603f606481565b6040516001600160a01b03909116815260200160405180910390f3fea264697066735822122041edcd22687c945b2264459f842a8b1ca8b00492f7d9aa8f4a2a63976c2b9dcd64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json deleted file mode 100644 index 670fc434..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/LibOptimismUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "LibOptimismUpgradeable", - "sourceName": "contracts/crosschain/optimism/LibOptimismUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204b3d2249766ec485b134f2b8c0bb5adac51165e4de6cfe94d37ac538a487225564736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204b3d2249766ec485b134f2b8c0bb5adac51165e4de6cfe94d37ac538a487225564736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json deleted file mode 100644 index 93e4acaf..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MathUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "MathUpgradeable", - "sourceName": "contracts/utils/math/MathUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d019b557c428fbaf9d402cc149e687077a162d89762d23db77edab8b9f20f98364736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d019b557c428fbaf9d402cc149e687077a162d89762d23db77edab8b9f20f98364736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json deleted file mode 100644 index ec6b872b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MerkleProofUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "MerkleProofUpgradeable", - "sourceName": "contracts/utils/cryptography/MerkleProofUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205a5f945da4a17583952bcd669282ad3702193f194e6654d7a8bda29f6852e14a64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205a5f945da4a17583952bcd669282ad3702193f194e6654d7a8bda29f6852e14a64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json deleted file mode 100644 index 4eebe523..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MinimalForwarderUpgradeable.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "MinimalForwarderUpgradeable", - "sourceName": "contracts/metatx/MinimalForwarderUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [], - "name": "EIP712DomainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "internalType": "bytes1", - "name": "fields", - "type": "bytes1" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "version", - "type": "string" - }, - { - "internalType": "uint256", - "name": "chainId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "verifyingContract", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256[]", - "name": "extensions", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct MinimalForwarderUpgradeable.ForwardRequest", - "name": "req", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "execute", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - } - ], - "name": "getNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct MinimalForwarderUpgradeable.ForwardRequest", - "name": "req", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "verify", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610c63806100206000396000f3fe60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610918565b6001600160a01b031660009081526035602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610948565b610106565b604051610084929190610a43565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610a66565b3480156100e257600080fd5b506100f66100f1366004610948565b61033e565b6040519015158152602001610084565b6000606061011585858561033e565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610afc565b603560006101a16020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610918565b6001600160a01b0316606088013560408901356101fb60a08b018b610b22565b61020860208d018d610918565b60405160200161021a93929190610b69565b60408051601f198184030181529082905261023491610b8f565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610bab565b5a1161029457fe5b90969095509350505050565b6000606080600080600060606001546000801b1480156102c05750600254155b6103045760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610178565b61030c6104bd565b61031461054f565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061045184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061044b92507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e4891506103ae905060208a018a610918565b6103be60408b0160208c01610918565b60408b013560608c013560808d01356103da60a08f018f610b22565b6040516103e8929190610bcd565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e0810191909152610100016040516020818303038152906040528051906020012061055e565b90610591565b90506080850135603560006104696020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020541480156104b4575061049f6020860186610918565b6001600160a01b0316816001600160a01b0316145b95945050505050565b6060600380546104cc90610bdd565b80601f01602080910402602001604051908101604052809291908181526020018280546104f890610bdd565b80156105455780601f1061051a57610100808354040283529160200191610545565b820191906000526020600020905b81548152906001019060200180831161052857829003601f168201915b5050505050905090565b6060600480546104cc90610bdd565b600061058b61056b6105b5565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b60008060006105a085856105c4565b915091506105ad81610609565b509392505050565b60006105bf610756565b905090565b60008082516041036105fa5760208301516040840151606085015160001a6105ee878285856107ca565b94509450505050610602565b506000905060025b9250929050565b600081600481111561061d5761061d610c17565b036106255750565b600181600481111561063957610639610c17565b036106865760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561069a5761069a610c17565b036106e75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156106fb576106fb610c17565b036107535760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61078161088e565b6107896108e7565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156108015750600090506003610885565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610855573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661087e57600060019250925050610885565b9150600090505b94509492505050565b6000806108996104bd565b8051909150156108b0578051602090910120919050565b60015480156108bf5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b6000806108f261054f565b805190915015610909578051602090910120919050565b60025480156108bf5792915050565b60006020828403121561092a57600080fd5b81356001600160a01b038116811461094157600080fd5b9392505050565b60008060006040848603121561095d57600080fd5b833567ffffffffffffffff8082111561097557600080fd5b9085019060c0828803121561098957600080fd5b9093506020850135908082111561099f57600080fd5b818601915086601f8301126109b357600080fd5b8135818111156109c257600080fd5b8760208285010111156109d457600080fd5b6020830194508093505050509250925092565b60005b83811015610a025781810151838201526020016109ea565b83811115610a11576000848401525b50505050565b60008151808452610a2f8160208601602086016109e7565b601f01601f19169290920160200192915050565b8215158152604060208201526000610a5e6040830184610a17565b949350505050565b60ff60f81b881681526000602060e081840152610a8660e084018a610a17565b8381036040850152610a98818a610a17565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610aea57835183529284019291840191600101610ace565b50909c9b505050505050505050505050565b60008219821115610b1d57634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610b3957600080fd5b83018035915067ffffffffffffffff821115610b5457600080fd5b60200191503681900382131561060257600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610ba18184602087016109e7565b9190910192915050565b600082610bc857634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610bf157607f821691505b602082108103610c1157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122016f24dae0379773d4daec6ca726dd6e7b67421e2bb8326014ca8b1b49e806e8864736f6c634300080d0033", - "deployedBytecode": "0x60806040526004361061003f5760003560e01c80632d0335ab1461004457806347153f821461008d57806384b0196e146100ae578063bf5d3bdb146100d6575b600080fd5b34801561005057600080fd5b5061007a61005f366004610918565b6001600160a01b031660009081526035602052604090205490565b6040519081526020015b60405180910390f35b6100a061009b366004610948565b610106565b604051610084929190610a43565b3480156100ba57600080fd5b506100c36102a0565b6040516100849796959493929190610a66565b3480156100e257600080fd5b506100f66100f1366004610948565b61033e565b6040519015158152602001610084565b6000606061011585858561033e565b6101815760405162461bcd60e51b815260206004820152603260248201527f4d696e696d616c466f727761726465723a207369676e617475726520646f6573604482015271081b9bdd081b585d18da081c995c5d595cdd60721b60648201526084015b60405180910390fd5b61019060808601356001610afc565b603560006101a16020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000808660200160208101906101db9190610918565b6001600160a01b0316606088013560408901356101fb60a08b018b610b22565b61020860208d018d610918565b60405160200161021a93929190610b69565b60408051601f198184030181529082905261023491610b8f565b600060405180830381858888f193505050503d8060008114610272576040519150601f19603f3d011682016040523d82523d6000602084013e610277565b606091505b50909250905061028c603f6060890135610bab565b5a1161029457fe5b90969095509350505050565b6000606080600080600060606001546000801b1480156102c05750600254155b6103045760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610178565b61030c6104bd565b61031461054f565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b60008061045184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061044b92507fdd8f4b70b0f4393e889bd39128a30628a78b61816a9eb8199759e7a349657e4891506103ae905060208a018a610918565b6103be60408b0160208c01610918565b60408b013560608c013560808d01356103da60a08f018f610b22565b6040516103e8929190610bcd565b6040805191829003822060208301989098526001600160a01b0396871690820152949093166060850152608084019190915260a083015260c082015260e0810191909152610100016040516020818303038152906040528051906020012061055e565b90610591565b90506080850135603560006104696020890189610918565b6001600160a01b03166001600160a01b03168152602001908152602001600020541480156104b4575061049f6020860186610918565b6001600160a01b0316816001600160a01b0316145b95945050505050565b6060600380546104cc90610bdd565b80601f01602080910402602001604051908101604052809291908181526020018280546104f890610bdd565b80156105455780601f1061051a57610100808354040283529160200191610545565b820191906000526020600020905b81548152906001019060200180831161052857829003601f168201915b5050505050905090565b6060600480546104cc90610bdd565b600061058b61056b6105b5565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b60008060006105a085856105c4565b915091506105ad81610609565b509392505050565b60006105bf610756565b905090565b60008082516041036105fa5760208301516040840151606085015160001a6105ee878285856107ca565b94509450505050610602565b506000905060025b9250929050565b600081600481111561061d5761061d610c17565b036106255750565b600181600481111561063957610639610c17565b036106865760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610178565b600281600481111561069a5761069a610c17565b036106e75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610178565b60038160048111156106fb576106fb610c17565b036107535760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610178565b50565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61078161088e565b6107896108e7565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156108015750600090506003610885565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610855573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661087e57600060019250925050610885565b9150600090505b94509492505050565b6000806108996104bd565b8051909150156108b0578051602090910120919050565b60015480156108bf5792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b6000806108f261054f565b805190915015610909578051602090910120919050565b60025480156108bf5792915050565b60006020828403121561092a57600080fd5b81356001600160a01b038116811461094157600080fd5b9392505050565b60008060006040848603121561095d57600080fd5b833567ffffffffffffffff8082111561097557600080fd5b9085019060c0828803121561098957600080fd5b9093506020850135908082111561099f57600080fd5b818601915086601f8301126109b357600080fd5b8135818111156109c257600080fd5b8760208285010111156109d457600080fd5b6020830194508093505050509250925092565b60005b83811015610a025781810151838201526020016109ea565b83811115610a11576000848401525b50505050565b60008151808452610a2f8160208601602086016109e7565b601f01601f19169290920160200192915050565b8215158152604060208201526000610a5e6040830184610a17565b949350505050565b60ff60f81b881681526000602060e081840152610a8660e084018a610a17565b8381036040850152610a98818a610a17565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015610aea57835183529284019291840191600101610ace565b50909c9b505050505050505050505050565b60008219821115610b1d57634e487b7160e01b600052601160045260246000fd5b500190565b6000808335601e19843603018112610b3957600080fd5b83018035915067ffffffffffffffff821115610b5457600080fd5b60200191503681900382131561060257600080fd5b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008251610ba18184602087016109e7565b9190910192915050565b600082610bc857634e487b7160e01b600052601260045260246000fd5b500490565b8183823760009101908152919050565b600181811c90821680610bf157607f821691505b602082108103610c1157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122016f24dae0379773d4daec6ca726dd6e7b67421e2bb8326014ca8b1b49e806e8864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json deleted file mode 100644 index c585aee6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PaymentSplitterUpgradeable.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "PaymentSplitterUpgradeable", - "sourceName": "contracts/finance/PaymentSplitterUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ERC20PaymentReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "PayeeAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "PaymentReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "PaymentReleased", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "payee", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "account", - "type": "address" - } - ], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "shares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" - } - ], - "name": "totalReleased", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalReleased", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalShares", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610c57806100206000396000f3fe6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109cb565b6102c9565b005b34801561011c57600080fd5b506033545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e8565b6001600160a01b03918216600090815260396020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e8565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a21565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109cb565b6001600160a01b031660009081526036602052604090205490565b34801561021457600080fd5b506101216102233660046109cb565b6104fa565b34801561023457600080fd5b506101216102433660046109e8565b610542565b34801561025457600080fd5b506101216102633660046109cb565b6001600160a01b031660009081526035602052604090205490565b34801561028a57600080fd5b506101216102993660046109cb565b6001600160a01b031660009081526038602052604090205490565b3480156102c057600080fd5b50603454610121565b6001600160a01b0381166000908152603560205260409020546103075760405162461bcd60e51b81526004016102fe90610a3a565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a80565b80603460008282546103469190610ae1565b90915550506001600160a01b0382166000908152603660205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152603560205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a3a565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a80565b6001600160a01b03831660009081526038602052604081208054839290610444908490610ae1565b90915550506001600160a01b03808416600090815260396020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000603782815481106104df576104df610af9565b6000918252602090912001546001600160a01b031692915050565b60008061050660345490565b6105109047610ae1565b905061053b8382610536866001600160a01b031660009081526036602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526038602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0f565b6105cf9190610ae1565b6001600160a01b03808616600090815260396020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107bb565b6033546001600160a01b038416600090815260356020526040812054909183916107a79086610b28565b6107b19190610b47565b6106059190610b69565b6000610810826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108909092919063ffffffff16565b90508051600014806108315750808060200190518101906108319190610b80565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b79190610bd2565b60006040518083038185875af1925050503d80600081146108f4576040519150601f19603f3d011682016040523d82523d6000602084013e6108f9565b606091505b509150915061090a87838387610915565b979650505050505050565b6060831561098457825160000361097d576001600160a01b0385163b61097d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109995781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610bee565b6001600160a01b03811681146109c857600080fd5b50565b6000602082840312156109dd57600080fd5b813561053b816109b3565b600080604083850312156109fb57600080fd5b8235610a06816109b3565b91506020830135610a16816109b3565b809150509250929050565b600060208284031215610a3357600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af457610af4610acb565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b2157600080fd5b5051919050565b6000816000190483118215151615610b4257610b42610acb565b500290565b600082610b6457634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7b57610b7b610acb565b500390565b600060208284031215610b9257600080fd5b8151801515811461053b57600080fd5b60005b83811015610bbd578181015183820152602001610ba5565b83811115610bcc576000848401525b50505050565b60008251610be4818460208701610ba2565b9190910192915050565b6020815260008251806020840152610c0d816040850160208701610ba2565b601f01601f1916919091016040019291505056fea2646970667358221220c0c3e78560be498d02cd00f5d3bcb617aa84868e7b53eda278c881029f42910864736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100a05760003560e01c80639852595c116100645780639852595c146101d2578063a3f8eace14610208578063c45ac05014610228578063ce7c2ac214610248578063d79779b21461027e578063e33b7de3146102b457600080fd5b806319165587146100ee5780633a98ef3914610110578063406072a91461013457806348b750441461017a5780638b83209b1461019a57600080fd5b366100e9577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156100fa57600080fd5b5061010e6101093660046109cb565b6102c9565b005b34801561011c57600080fd5b506033545b6040519081526020015b60405180910390f35b34801561014057600080fd5b5061012161014f3660046109e8565b6001600160a01b03918216600090815260396020908152604080832093909416825291909152205490565b34801561018657600080fd5b5061010e6101953660046109e8565b6103b9565b3480156101a657600080fd5b506101ba6101b5366004610a21565b6104ca565b6040516001600160a01b03909116815260200161012b565b3480156101de57600080fd5b506101216101ed3660046109cb565b6001600160a01b031660009081526036602052604090205490565b34801561021457600080fd5b506101216102233660046109cb565b6104fa565b34801561023457600080fd5b506101216102433660046109e8565b610542565b34801561025457600080fd5b506101216102633660046109cb565b6001600160a01b031660009081526035602052604090205490565b34801561028a57600080fd5b506101216102993660046109cb565b6001600160a01b031660009081526038602052604090205490565b3480156102c057600080fd5b50603454610121565b6001600160a01b0381166000908152603560205260409020546103075760405162461bcd60e51b81526004016102fe90610a3a565b60405180910390fd5b6000610312826104fa565b9050806000036103345760405162461bcd60e51b81526004016102fe90610a80565b80603460008282546103469190610ae1565b90915550506001600160a01b0382166000908152603660205260409020805482019055610373828261060d565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152603560205260409020546103ee5760405162461bcd60e51b81526004016102fe90610a3a565b60006103fa8383610542565b90508060000361041c5760405162461bcd60e51b81526004016102fe90610a80565b6001600160a01b03831660009081526038602052604081208054839290610444908490610ae1565b90915550506001600160a01b03808416600090815260396020908152604080832093861683529290522080548201905561047f83838361072b565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000603782815481106104df576104df610af9565b6000918252602090912001546001600160a01b031692915050565b60008061050660345490565b6105109047610ae1565b905061053b8382610536866001600160a01b031660009081526036602052604090205490565b61077d565b9392505050565b6001600160a01b03821660009081526038602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c59190610b0f565b6105cf9190610ae1565b6001600160a01b03808616600090815260396020908152604080832093881683529290522054909150610605908490839061077d565b949350505050565b8047101561065d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102fe565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146106aa576040519150601f19603f3d011682016040523d82523d6000602084013e6106af565b606091505b50509050806107265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102fe565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526107269084906107bb565b6033546001600160a01b038416600090815260356020526040812054909183916107a79086610b28565b6107b19190610b47565b6106059190610b69565b6000610810826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108909092919063ffffffff16565b90508051600014806108315750808060200190518101906108319190610b80565b6107265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102fe565b6060610605848460008585600080866001600160a01b031685876040516108b79190610bd2565b60006040518083038185875af1925050503d80600081146108f4576040519150601f19603f3d011682016040523d82523d6000602084013e6108f9565b606091505b509150915061090a87838387610915565b979650505050505050565b6060831561098457825160000361097d576001600160a01b0385163b61097d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102fe565b5081610605565b61060583838151156109995781518083602001fd5b8060405162461bcd60e51b81526004016102fe9190610bee565b6001600160a01b03811681146109c857600080fd5b50565b6000602082840312156109dd57600080fd5b813561053b816109b3565b600080604083850312156109fb57600080fd5b8235610a06816109b3565b91506020830135610a16816109b3565b809150509250929050565b600060208284031215610a3357600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610af457610af4610acb565b500190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610b2157600080fd5b5051919050565b6000816000190483118215151615610b4257610b42610acb565b500290565b600082610b6457634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610b7b57610b7b610acb565b500390565b600060208284031215610b9257600080fd5b8151801515811461053b57600080fd5b60005b83811015610bbd578181015183820152602001610ba5565b83811115610bcc576000848401525b50505050565b60008251610be4818460208701610ba2565b9190910192915050565b6020815260008251806020840152610c0d816040850160208701610ba2565b601f01601f1916919091016040019291505056fea2646970667358221220c0c3e78560be498d02cd00f5d3bcb617aa84868e7b53eda278c881029f42910864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json deleted file mode 100644 index 1ea1638e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ReentrancyGuardUpgradeable.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ReentrancyGuardUpgradeable", - "sourceName": "contracts/security/ReentrancyGuardUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json deleted file mode 100644 index 0bfc52e4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/RefundEscrowUpgradeable.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "RefundEscrowUpgradeable", - "sourceName": "contracts/utils/escrow/RefundEscrowUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "RefundsClosed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "RefundsEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "weiAmount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [], - "name": "beneficiary", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "beneficiaryWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "close", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "refundee", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - } - ], - "name": "depositsOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "enableRefunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "state", - "outputs": [ - { - "internalType": "enum RefundEscrowUpgradeable.State", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "payee", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "withdrawalAllowed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610b94806100206000396000f3fe6080604052600436106100c25760003560e01c80638c52dc411161007f578063c19d93fb11610059578063c19d93fb146101dc578063e3a9db1a146101fc578063f2fde38b14610240578063f340fa011461026057600080fd5b80638c52dc41146101945780638da5cb5b146101a95780639af6549a146101c757600080fd5b806338af3eed146100c757806343d726d61461010357806351cff8d91461011a578063685ca1941461013a578063715018a61461016a5780638129fc1c1461017f575b600080fd5b3480156100d357600080fd5b5060c95461010090046001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010f57600080fd5b50610118610273565b005b34801561012657600080fd5b50610118610135366004610a8b565b610330565b34801561014657600080fd5b5061015a610155366004610a8b565b6103ad565b60405190151581526020016100fa565b34801561017657600080fd5b506101186103cf565b34801561018b57600080fd5b506101186103e3565b3480156101a057600080fd5b506101186104f3565b3480156101b557600080fd5b506033546001600160a01b03166100e6565b3480156101d357600080fd5b506101186105b4565b3480156101e857600080fd5b5060c95460ff166040516100fa9190610ac5565b34801561020857600080fd5b50610232610217366004610a8b565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100fa565b34801561024c57600080fd5b5061011861025b366004610a8b565b61066b565b61011861026e366004610a8b565b6106e1565b61027b610764565b600060c95460ff16600281111561029457610294610aaf565b146102f85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b60c9805460ff191660021790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b610339816103ad565b6103a15760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102ef565b6103aa816107be565b50565b6000600160c95460ff1660028111156103c8576103c8610aaf565b1492915050565b6103d7610764565b6103e16000610835565b565b600054610100900460ff16158080156104035750600054600160ff909116105b8061041d5750303b15801561041d575060005460ff166001145b6104805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ef565b6000805460ff1916600117905580156104a3576000805461ff0019166101001790555b6104ab610887565b80156103aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b6104fb610764565b600060c95460ff16600281111561051457610514610aaf565b1461057c5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102ef565b60c9805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b600260c95460ff1660028111156105cd576105cd610aaf565b146106405760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102ef565b6103e14761065c60c9546001600160a01b036101009091041690565b6001600160a01b0316906108b6565b610673610764565b6001600160a01b0381166106d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ef565b6103aa81610835565b600060c95460ff1660028111156106fa576106fa610aaf565b1461075b5760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102ef565b6103aa816109d4565b6033546001600160a01b031633146103e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ef565b6107c6610764565b6001600160a01b03811660008181526065602052604081208054919055906107ee90826108b6565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58260405161082991815260200190565b60405180910390a25050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108ae5760405162461bcd60e51b81526004016102ef90610aed565b6103e1610a46565b804710156109065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102ef565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610953576040519150601f19603f3d011682016040523d82523d6000602084013e610958565b606091505b50509050806109cf5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102ef565b505050565b6109dc610764565b6001600160a01b038116600090815260656020526040812080543492839291610a06908490610b38565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c490602001610829565b600054610100900460ff16610a6d5760405162461bcd60e51b81526004016102ef90610aed565b6103e133610835565b6001600160a01b03811681146103aa57600080fd5b600060208284031215610a9d57600080fd5b8135610aa881610a76565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310610ae757634e487b7160e01b600052602160045260246000fd5b91905290565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115610b5957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220384fceb4627b7e0169e9f36c7c727acb2a5bae003c8bec1f92825039fe6644c464736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100c25760003560e01c80638c52dc411161007f578063c19d93fb11610059578063c19d93fb146101dc578063e3a9db1a146101fc578063f2fde38b14610240578063f340fa011461026057600080fd5b80638c52dc41146101945780638da5cb5b146101a95780639af6549a146101c757600080fd5b806338af3eed146100c757806343d726d61461010357806351cff8d91461011a578063685ca1941461013a578063715018a61461016a5780638129fc1c1461017f575b600080fd5b3480156100d357600080fd5b5060c95461010090046001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010f57600080fd5b50610118610273565b005b34801561012657600080fd5b50610118610135366004610a8b565b610330565b34801561014657600080fd5b5061015a610155366004610a8b565b6103ad565b60405190151581526020016100fa565b34801561017657600080fd5b506101186103cf565b34801561018b57600080fd5b506101186103e3565b3480156101a057600080fd5b506101186104f3565b3480156101b557600080fd5b506033546001600160a01b03166100e6565b3480156101d357600080fd5b506101186105b4565b3480156101e857600080fd5b5060c95460ff166040516100fa9190610ac5565b34801561020857600080fd5b50610232610217366004610a8b565b6001600160a01b031660009081526065602052604090205490565b6040519081526020016100fa565b34801561024c57600080fd5b5061011861025b366004610a8b565b61066b565b61011861026e366004610a8b565b6106e1565b61027b610764565b600060c95460ff16600281111561029457610294610aaf565b146102f85760405162461bcd60e51b815260206004820152602960248201527f526566756e64457363726f773a2063616e206f6e6c7920636c6f7365207768696044820152686c652061637469766560b81b60648201526084015b60405180910390fd5b60c9805460ff191660021790556040517f088672c3a6e342f7cd94a65ba63b79df24a8973927b4d05d803c44bbf787d12f90600090a1565b610339816103ad565b6103a15760405162461bcd60e51b815260206004820152603360248201527f436f6e646974696f6e616c457363726f773a207061796565206973206e6f7420604482015272616c6c6f77656420746f20776974686472617760681b60648201526084016102ef565b6103aa816107be565b50565b6000600160c95460ff1660028111156103c8576103c8610aaf565b1492915050565b6103d7610764565b6103e16000610835565b565b600054610100900460ff16158080156104035750600054600160ff909116105b8061041d5750303b15801561041d575060005460ff166001145b6104805760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ef565b6000805460ff1916600117905580156104a3576000805461ff0019166101001790555b6104ab610887565b80156103aa576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b6104fb610764565b600060c95460ff16600281111561051457610514610aaf565b1461057c5760405162461bcd60e51b815260206004820152603260248201527f526566756e64457363726f773a2063616e206f6e6c7920656e61626c6520726560448201527166756e6473207768696c652061637469766560701b60648201526084016102ef565b60c9805460ff191660011790556040517f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8990600090a1565b600260c95460ff1660028111156105cd576105cd610aaf565b146106405760405162461bcd60e51b815260206004820152603860248201527f526566756e64457363726f773a2062656e65666963696172792063616e206f6e60448201527f6c79207769746864726177207768696c6520636c6f736564000000000000000060648201526084016102ef565b6103e14761065c60c9546001600160a01b036101009091041690565b6001600160a01b0316906108b6565b610673610764565b6001600160a01b0381166106d85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ef565b6103aa81610835565b600060c95460ff1660028111156106fa576106fa610aaf565b1461075b5760405162461bcd60e51b815260206004820152602b60248201527f526566756e64457363726f773a2063616e206f6e6c79206465706f736974207760448201526a68696c652061637469766560a81b60648201526084016102ef565b6103aa816109d4565b6033546001600160a01b031633146103e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ef565b6107c6610764565b6001600160a01b03811660008181526065602052604081208054919055906107ee90826108b6565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58260405161082991815260200190565b60405180910390a25050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108ae5760405162461bcd60e51b81526004016102ef90610aed565b6103e1610a46565b804710156109065760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102ef565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610953576040519150601f19603f3d011682016040523d82523d6000602084013e610958565b606091505b50509050806109cf5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102ef565b505050565b6109dc610764565b6001600160a01b038116600090815260656020526040812080543492839291610a06908490610b38565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c490602001610829565b600054610100900460ff16610a6d5760405162461bcd60e51b81526004016102ef90610aed565b6103e133610835565b6001600160a01b03811681146103aa57600080fd5b600060208284031215610a9d57600080fd5b8135610aa881610a76565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310610ae757634e487b7160e01b600052602160045260246000fd5b91905290565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115610b5957634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220384fceb4627b7e0169e9f36c7c727acb2a5bae003c8bec1f92825039fe6644c464736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json deleted file mode 100644 index 6153de49..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeCastUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeCastUpgradeable", - "sourceName": "contracts/utils/math/SafeCastUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d2a77af16ecd084e512a6178023471b0214c35d41bd15d20aedfea70b4540cf564736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220d2a77af16ecd084e512a6178023471b0214c35d41bd15d20aedfea70b4540cf564736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json deleted file mode 100644 index 83658ece..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeERC20Upgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeERC20Upgradeable", - "sourceName": "contracts/token/ERC20/utils/SafeERC20Upgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ebac9eff1b0224d4ef7928bde051273e4de24428e9021fdd2aa9f9190c82100764736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ebac9eff1b0224d4ef7928bde051273e4de24428e9021fdd2aa9f9190c82100764736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json deleted file mode 100644 index ec0206d9..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SafeMathUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SafeMathUpgradeable", - "sourceName": "contracts/utils/math/SafeMathUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122079076c714ca6ed81343f4920969e47dd0a850457e16ab0af9635f3e66e2d380964736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122079076c714ca6ed81343f4920969e47dd0a850457e16ab0af9635f3e66e2d380964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json deleted file mode 100644 index 185cc502..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ShortStringsUpgradeable.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ShortStringsUpgradeable", - "sourceName": "contracts/utils/ShortStringsUpgradeable.sol", - "abi": [ - { - "inputs": [], - "name": "InvalidShortString", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "str", - "type": "string" - } - ], - "name": "StringTooLong", - "type": "error" - } - ], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201103c0797f95514c1adb696f263b45f0f94bb39e77b630a16630699aa73cd0fd64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201103c0797f95514c1adb696f263b45f0f94bb39e77b630a16630699aa73cd0fd64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json deleted file mode 100644 index 13ace2ee..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignatureCheckerUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SignatureCheckerUpgradeable", - "sourceName": "contracts/utils/cryptography/SignatureCheckerUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3b459a7e817c77b0492ff3aeafaac868497026215b1e0df027214326eec16fd64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a3b459a7e817c77b0492ff3aeafaac868497026215b1e0df027214326eec16fd64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json deleted file mode 100644 index 9524566d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedMathUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SignedMathUpgradeable", - "sourceName": "contracts/utils/math/SignedMathUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dd79cd58f645b9ec9683e658789c42b6dfb56ceb16bb5deb55c3917d3513e6aa64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dd79cd58f645b9ec9683e658789c42b6dfb56ceb16bb5deb55c3917d3513e6aa64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json deleted file mode 100644 index b8cdf7f1..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/SignedSafeMathUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "SignedSafeMathUpgradeable", - "sourceName": "contracts/utils/math/SignedSafeMathUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204bab11c69037301c2804c2464b7b53e10ac9a33ad38852aca8388ab7c00944e964736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204bab11c69037301c2804c2464b7b53e10ac9a33ad38852aca8388ab7c00944e964736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json deleted file mode 100644 index 62c6dbbc..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StorageSlotUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "StorageSlotUpgradeable", - "sourceName": "contracts/utils/StorageSlotUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206054cfc53183d55799d57a724cb708337ae12ffb6c9e57f2bc9567311a9685b864736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212206054cfc53183d55799d57a724cb708337ae12ffb6c9e57f2bc9567311a9685b864736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json deleted file mode 100644 index b1a5f471..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/StringsUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "StringsUpgradeable", - "sourceName": "contracts/utils/StringsUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220779b9f65dfd128ab2efa61539390da0c5990e0c84fbb6d68d00b439ad821f38564736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220779b9f65dfd128ab2efa61539390da0c5990e0c84fbb6d68d00b439ad821f38564736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json deleted file mode 100644 index 26276951..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerUpgradeable.json +++ /dev/null @@ -1,887 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TimelockControllerUpgradeable", - "sourceName": "contracts/governance/TimelockControllerUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "CallExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "CallSalt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "CallScheduled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "Cancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldDuration", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newDuration", - "type": "uint256" - } - ], - "name": "MinDelayChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "CANCELLER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXECUTOR_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PROPOSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TIMELOCK_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "executeBatch", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getMinDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "hashOperation", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "hashOperationBatch", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperation", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationDone", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationPending", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationReady", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "schedule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "scheduleBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newDelay", - "type": "uint256" - } - ], - "name": "updateDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50611e4c806100206000396000f3fe6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610581578063e38335e5146105a1578063f23a6e61146105b4578063f27a0c92146105e057600080fd5b8063bc197c8114610508578063c4d252f514610534578063d45c44351461055457600080fd5b806391d14854116100c657806391d148541461047f578063a217fddf1461049f578063b08e51c0146104b4578063b1c5f427146104e857600080fd5b80638065657f1461040b5780638f2a0bb01461042b5780638f61f4f51461044b57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038b57806336568abe146103ab578063584b153e146103cb57806364d62353146103eb57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036b57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611447565b6105f5565b005b3480156101f557600080fd5b506102096102043660046114bb565b6106cb565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e5565b6106f6565b3480156102b357600080fd5b506102096102c2366004611550565b6107ab565b3480156102d357600080fd5b506102f26102e236600461161e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b50610252610326366004611550565b60009081526065602052604090206001015490565b34801561034757600080fd5b50610209610356366004611550565b60009081526097602052604090205460011490565b34801561037757600080fd5b506101e7610386366004611685565b6107d1565b34801561039757600080fd5b506102096103a6366004611550565b6107fb565b3480156103b757600080fd5b506101e76103c6366004611685565b610814565b3480156103d757600080fd5b506102096103e6366004611550565b610897565b3480156103f757600080fd5b506101e7610406366004611550565b6108ae565b34801561041757600080fd5b506102526104263660046114e5565b610952565b34801561043757600080fd5b506101e76104463660046116f5565b610991565b34801561045757600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048b57600080fd5b5061020961049a366004611685565b610b24565b3480156104ab57600080fd5b50610252600081565b3480156104c057600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f457600080fd5b506102526105033660046117a6565b610b4f565b34801561051457600080fd5b506102f26105233660046118cd565b63bc197c8160e01b95945050505050565b34801561054057600080fd5b506101e761054f366004611550565b610b94565b34801561056057600080fd5b5061025261056f366004611550565b60009081526097602052604090205490565b34801561058d57600080fd5b506101e761059c366004611685565b610c69565b6101e76105af3660046117a6565b610c8e565b3480156105c057600080fd5b506102f26105cf366004611976565b63f23a6e6160e01b95945050505050565b3480156105ec57600080fd5b50609854610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161061f81610e18565b600061062f898989898989610952565b905061063b8184610e25565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161067796959493929190611a03565b60405180910390a383156106c057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b791815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f057506106f082610f14565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610722816000610b24565b610730576107308133610f49565b6000610740888888888888610952565b905061074c8185610fa2565b6107588888888861103d565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107909493929190611a40565b60405180910390a36107a181611110565b5050505050505050565b6000818152609760205260408120546001811180156107ca5750428111155b9392505050565b6000828152606560205260409020600101546107ec81610e18565b6107f68383611149565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146108895760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089382826111cf565b5050565b60008181526097602052604081205460019061080d565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610880565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b600086868686868660405160200161096f96959493929190611a03565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e18565b8887146109da5760405162461bcd60e51b815260040161088090611a72565b8885146109f95760405162461bcd60e51b815260040161088090611a72565b6000610a0b8b8b8b8b8b8b8b8b610b4f565b9050610a178184610e25565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab5565b9050602002016020810190610a6c9190611acb565b8d8d86818110610a7e57610a7e611ab5565b905060200201358c8c87818110610a9757610a97611ab5565b9050602002810190610aa99190611ae6565b8c8b604051610abd96959493929190611a03565b60405180910390a3610ace81611b42565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b70989796959493929190611beb565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbe81610e18565b610bc782610897565b610c2d5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610880565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610c8481610e18565b6107f683836111cf565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cba816000610b24565b610cc857610cc88133610f49565b878614610ce75760405162461bcd60e51b815260040161088090611a72565b878414610d065760405162461bcd60e51b815260040161088090611a72565b6000610d188a8a8a8a8a8a8a8a610b4f565b9050610d248185610fa2565b60005b89811015610e025760008b8b83818110610d4357610d43611ab5565b9050602002016020810190610d589190611acb565b905060008a8a84818110610d6e57610d6e611ab5565b9050602002013590503660008a8a86818110610d8c57610d8c611ab5565b9050602002810190610d9e9190611ae6565b91509150610dae8484848461103d565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de59493929190611a40565b60405180910390a35050505080610dfb90611b42565b9050610d27565b50610e0c81611110565b50505050505050505050565b610e228133610f49565b50565b610e2e826107fb565b15610e935760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610880565b609854811015610ef45760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610880565b610efe8142611c96565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f057506301ffc9a760e01b6001600160e01b03198316146106f0565b610f538282610b24565b61089357610f6081611236565b610f6b836020611248565b604051602001610f7c929190611cde565b60408051601f198184030181529082905262461bcd60e51b825261088091600401611d53565b610fab826107ab565b610fc75760405162461bcd60e51b815260040161088090611d86565b801580610fe257506000818152609760205260409020546001145b6108935760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610880565b6000846001600160a01b031684848460405161105a929190611dd0565b60006040518083038185875af1925050503d8060008114611097576040519150601f19603f3d011682016040523d82523d6000602084013e61109c565b606091505b50509050806111095760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610880565b5050505050565b611119816107ab565b6111355760405162461bcd60e51b815260040161088090611d86565b600090815260976020526040902060019055565b6111538282610b24565b6108935760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561118b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d98282610b24565b156108935760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f06001600160a01b03831660145b60606000611257836002611de0565b611262906002611c96565b6001600160401b0381111561127957611279611569565b6040519080825280601f01601f1916602001820160405280156112a3576020820181803683370190505b509050600360fc1b816000815181106112be576112be611ab5565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112ed576112ed611ab5565b60200101906001600160f81b031916908160001a9053506000611311846002611de0565b61131c906001611c96565b90505b6001811115611394576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061135057611350611ab5565b1a60f81b82828151811061136657611366611ab5565b60200101906001600160f81b031916908160001a90535060049490941c9361138d81611dff565b905061131f565b5083156107ca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610880565b80356001600160a01b03811681146113fa57600080fd5b919050565b60008083601f84011261141157600080fd5b5081356001600160401b0381111561142857600080fd5b60208301915083602082850101111561144057600080fd5b9250929050565b600080600080600080600060c0888a03121561146257600080fd5b61146b886113e3565b96506020880135955060408801356001600160401b0381111561148d57600080fd5b6114998a828b016113ff565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114cd57600080fd5b81356001600160e01b0319811681146107ca57600080fd5b60008060008060008060a087890312156114fe57600080fd5b611507876113e3565b95506020870135945060408701356001600160401b0381111561152957600080fd5b61153589828a016113ff565b979a9699509760608101359660809091013595509350505050565b60006020828403121561156257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a7576115a7611569565b604052919050565b600082601f8301126115c057600080fd5b81356001600160401b038111156115d9576115d9611569565b6115ec601f8201601f191660200161157f565b81815284602083860101111561160157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561163457600080fd5b61163d856113e3565b935061164b602086016113e3565b92506040850135915060608501356001600160401b0381111561166d57600080fd5b611679878288016115af565b91505092959194509250565b6000806040838503121561169857600080fd5b823591506116a8602084016113e3565b90509250929050565b60008083601f8401126116c357600080fd5b5081356001600160401b038111156116da57600080fd5b6020830191508360208260051b850101111561144057600080fd5b600080600080600080600080600060c08a8c03121561171357600080fd5b89356001600160401b038082111561172a57600080fd5b6117368d838e016116b1565b909b50995060208c013591508082111561174f57600080fd5b61175b8d838e016116b1565b909950975060408c013591508082111561177457600080fd5b506117818c828d016116b1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117c257600080fd5b88356001600160401b03808211156117d957600080fd5b6117e58c838d016116b1565b909a50985060208b01359150808211156117fe57600080fd5b61180a8c838d016116b1565b909850965060408b013591508082111561182357600080fd5b506118308b828c016116b1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185f57600080fd5b813560206001600160401b0382111561187a5761187a611569565b8160051b61188982820161157f565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578235825291830191908301906118a9565b979650505050505050565b600080600080600060a086880312156118e557600080fd5b6118ee866113e3565b94506118fc602087016113e3565b935060408601356001600160401b038082111561191857600080fd5b61192489838a0161184e565b9450606088013591508082111561193a57600080fd5b61194689838a0161184e565b9350608088013591508082111561195c57600080fd5b50611969888289016115af565b9150509295509295909350565b600080600080600060a0868803121561198e57600080fd5b611997866113e3565b94506119a5602087016113e3565b9350604086013592506060860135915060808601356001600160401b038111156119ce57600080fd5b611969888289016115af565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2b60a0830186886119da565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a686060830184866119da565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611add57600080fd5b6107ca826113e3565b6000808335601e19843603018112611afd57600080fd5b8301803591506001600160401b03821115611b1757600080fd5b60200191503681900382131561144057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b5457611b54611b2c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bde5782840389528135601e19883603018112611b9657600080fd5b870180356001600160401b03811115611bae57600080fd5b803603891315611bbd57600080fd5b611bca86828985016119da565b9a87019a9550505090840190600101611b75565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c2c576001600160a01b03611c17846113e3565b16825260209283019290910190600101611bfe565b5083810360208501528881526001600160fb1b03891115611c4c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7d81888a611b5b565b6060850196909652505050608001529695505050505050565b60008219821115611ca957611ca9611b2c565b500190565b60005b83811015611cc9578181015183820152602001611cb1565b83811115611cd8576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d16816017850160208801611cae565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d47816028840160208801611cae565b01602801949350505050565b6020815260008251806020840152611d72816040850160208701611cae565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611dfa57611dfa611b2c565b500290565b600081611e0e57611e0e611b2c565b50600019019056fea26469706673582212206bced80116cf61341e6e1c0849b397290fa79bfaf89786bc9e3b4d13ea869a2464736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106101bb5760003560e01c80638065657f116100ec578063bc197c811161008a578063d547741f11610064578063d547741f14610581578063e38335e5146105a1578063f23a6e61146105b4578063f27a0c92146105e057600080fd5b8063bc197c8114610508578063c4d252f514610534578063d45c44351461055457600080fd5b806391d14854116100c657806391d148541461047f578063a217fddf1461049f578063b08e51c0146104b4578063b1c5f427146104e857600080fd5b80638065657f1461040b5780638f2a0bb01461042b5780638f61f4f51461044b57600080fd5b8063248a9ca31161015957806331d507501161013357806331d507501461038b57806336568abe146103ab578063584b153e146103cb57806364d62353146103eb57600080fd5b8063248a9ca31461030b5780632ab0f5291461033b5780632f2ff15d1461036b57600080fd5b80630d3cf6fc116101955780630d3cf6fc14610260578063134008d31461029457806313bc9f20146102a7578063150b7a02146102c757600080fd5b806301d5062a146101c757806301ffc9a7146101e957806307bd02651461021e57600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101e76101e2366004611447565b6105f5565b005b3480156101f557600080fd5b506102096102043660046114bb565b6106cb565b60405190151581526020015b60405180910390f35b34801561022a57600080fd5b506102527fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610215565b34801561026c57600080fd5b506102527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101e76102a23660046114e5565b6106f6565b3480156102b357600080fd5b506102096102c2366004611550565b6107ab565b3480156102d357600080fd5b506102f26102e236600461161e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610215565b34801561031757600080fd5b50610252610326366004611550565b60009081526065602052604090206001015490565b34801561034757600080fd5b50610209610356366004611550565b60009081526097602052604090205460011490565b34801561037757600080fd5b506101e7610386366004611685565b6107d1565b34801561039757600080fd5b506102096103a6366004611550565b6107fb565b3480156103b757600080fd5b506101e76103c6366004611685565b610814565b3480156103d757600080fd5b506102096103e6366004611550565b610897565b3480156103f757600080fd5b506101e7610406366004611550565b6108ae565b34801561041757600080fd5b506102526104263660046114e5565b610952565b34801561043757600080fd5b506101e76104463660046116f5565b610991565b34801561045757600080fd5b506102527fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561048b57600080fd5b5061020961049a366004611685565b610b24565b3480156104ab57600080fd5b50610252600081565b3480156104c057600080fd5b506102527ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156104f457600080fd5b506102526105033660046117a6565b610b4f565b34801561051457600080fd5b506102f26105233660046118cd565b63bc197c8160e01b95945050505050565b34801561054057600080fd5b506101e761054f366004611550565b610b94565b34801561056057600080fd5b5061025261056f366004611550565b60009081526097602052604090205490565b34801561058d57600080fd5b506101e761059c366004611685565b610c69565b6101e76105af3660046117a6565b610c8e565b3480156105c057600080fd5b506102f26105cf366004611976565b63f23a6e6160e01b95945050505050565b3480156105ec57600080fd5b50609854610252565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc161061f81610e18565b600061062f898989898989610952565b905061063b8184610e25565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161067796959493929190611a03565b60405180910390a383156106c057807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106b791815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106f057506106f082610f14565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610722816000610b24565b610730576107308133610f49565b6000610740888888888888610952565b905061074c8185610fa2565b6107588888888861103d565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a6040516107909493929190611a40565b60405180910390a36107a181611110565b5050505050505050565b6000818152609760205260408120546001811180156107ca5750428111155b9392505050565b6000828152606560205260409020600101546107ec81610e18565b6107f68383611149565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146108895760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61089382826111cf565b5050565b60008181526097602052604081205460019061080d565b3330146109115760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b6064820152608401610880565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b600086868686868660405160200161096f96959493929190611a03565b6040516020818303038152906040528051906020012090509695505050505050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc16109bb81610e18565b8887146109da5760405162461bcd60e51b815260040161088090611a72565b8885146109f95760405162461bcd60e51b815260040161088090611a72565b6000610a0b8b8b8b8b8b8b8b8b610b4f565b9050610a178184610e25565b60005b8a811015610ad55780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a5757610a57611ab5565b9050602002016020810190610a6c9190611acb565b8d8d86818110610a7e57610a7e611ab5565b905060200201358c8c87818110610a9757610a97611ab5565b9050602002810190610aa99190611ae6565b8c8b604051610abd96959493929190611a03565b60405180910390a3610ace81611b42565b9050610a1a565b508315610b1757807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610b0e91815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610b70989796959493929190611beb565b60405160208183030381529060405280519060200120905098975050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610bbe81610e18565b610bc782610897565b610c2d5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b6064820152608401610880565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610c8481610e18565b6107f683836111cf565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610cba816000610b24565b610cc857610cc88133610f49565b878614610ce75760405162461bcd60e51b815260040161088090611a72565b878414610d065760405162461bcd60e51b815260040161088090611a72565b6000610d188a8a8a8a8a8a8a8a610b4f565b9050610d248185610fa2565b60005b89811015610e025760008b8b83818110610d4357610d43611ab5565b9050602002016020810190610d589190611acb565b905060008a8a84818110610d6e57610d6e611ab5565b9050602002013590503660008a8a86818110610d8c57610d8c611ab5565b9050602002810190610d9e9190611ae6565b91509150610dae8484848461103d565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610de59493929190611a40565b60405180910390a35050505080610dfb90611b42565b9050610d27565b50610e0c81611110565b50505050505050505050565b610e228133610f49565b50565b610e2e826107fb565b15610e935760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b6064820152608401610880565b609854811015610ef45760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b6064820152608401610880565b610efe8142611c96565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106f057506301ffc9a760e01b6001600160e01b03198316146106f0565b610f538282610b24565b61089357610f6081611236565b610f6b836020611248565b604051602001610f7c929190611cde565b60408051601f198184030181529082905262461bcd60e51b825261088091600401611d53565b610fab826107ab565b610fc75760405162461bcd60e51b815260040161088090611d86565b801580610fe257506000818152609760205260409020546001145b6108935760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b6064820152608401610880565b6000846001600160a01b031684848460405161105a929190611dd0565b60006040518083038185875af1925050503d8060008114611097576040519150601f19603f3d011682016040523d82523d6000602084013e61109c565b606091505b50509050806111095760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b6064820152608401610880565b5050505050565b611119816107ab565b6111355760405162461bcd60e51b815260040161088090611d86565b600090815260976020526040902060019055565b6111538282610b24565b6108935760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561118b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6111d98282610b24565b156108935760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106f06001600160a01b03831660145b60606000611257836002611de0565b611262906002611c96565b6001600160401b0381111561127957611279611569565b6040519080825280601f01601f1916602001820160405280156112a3576020820181803683370190505b509050600360fc1b816000815181106112be576112be611ab5565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112ed576112ed611ab5565b60200101906001600160f81b031916908160001a9053506000611311846002611de0565b61131c906001611c96565b90505b6001811115611394576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061135057611350611ab5565b1a60f81b82828151811061136657611366611ab5565b60200101906001600160f81b031916908160001a90535060049490941c9361138d81611dff565b905061131f565b5083156107ca5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610880565b80356001600160a01b03811681146113fa57600080fd5b919050565b60008083601f84011261141157600080fd5b5081356001600160401b0381111561142857600080fd5b60208301915083602082850101111561144057600080fd5b9250929050565b600080600080600080600060c0888a03121561146257600080fd5b61146b886113e3565b96506020880135955060408801356001600160401b0381111561148d57600080fd5b6114998a828b016113ff565b989b979a50986060810135976080820135975060a09091013595509350505050565b6000602082840312156114cd57600080fd5b81356001600160e01b0319811681146107ca57600080fd5b60008060008060008060a087890312156114fe57600080fd5b611507876113e3565b95506020870135945060408701356001600160401b0381111561152957600080fd5b61153589828a016113ff565b979a9699509760608101359660809091013595509350505050565b60006020828403121561156257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156115a7576115a7611569565b604052919050565b600082601f8301126115c057600080fd5b81356001600160401b038111156115d9576115d9611569565b6115ec601f8201601f191660200161157f565b81815284602083860101111561160157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561163457600080fd5b61163d856113e3565b935061164b602086016113e3565b92506040850135915060608501356001600160401b0381111561166d57600080fd5b611679878288016115af565b91505092959194509250565b6000806040838503121561169857600080fd5b823591506116a8602084016113e3565b90509250929050565b60008083601f8401126116c357600080fd5b5081356001600160401b038111156116da57600080fd5b6020830191508360208260051b850101111561144057600080fd5b600080600080600080600080600060c08a8c03121561171357600080fd5b89356001600160401b038082111561172a57600080fd5b6117368d838e016116b1565b909b50995060208c013591508082111561174f57600080fd5b61175b8d838e016116b1565b909950975060408c013591508082111561177457600080fd5b506117818c828d016116b1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b0312156117c257600080fd5b88356001600160401b03808211156117d957600080fd5b6117e58c838d016116b1565b909a50985060208b01359150808211156117fe57600080fd5b61180a8c838d016116b1565b909850965060408b013591508082111561182357600080fd5b506118308b828c016116b1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261185f57600080fd5b813560206001600160401b0382111561187a5761187a611569565b8160051b61188982820161157f565b92835284810182019282810190878511156118a357600080fd5b83870192505b848310156118c2578235825291830191908301906118a9565b979650505050505050565b600080600080600060a086880312156118e557600080fd5b6118ee866113e3565b94506118fc602087016113e3565b935060408601356001600160401b038082111561191857600080fd5b61192489838a0161184e565b9450606088013591508082111561193a57600080fd5b61194689838a0161184e565b9350608088013591508082111561195c57600080fd5b50611969888289016115af565b9150509295509295909350565b600080600080600060a0868803121561198e57600080fd5b611997866113e3565b94506119a5602087016113e3565b9350604086013592506060860135915060808601356001600160401b038111156119ce57600080fd5b611969888289016115af565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611a2b60a0830186886119da565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611a686060830184866119da565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611add57600080fd5b6107ca826113e3565b6000808335601e19843603018112611afd57600080fd5b8301803591506001600160401b03821115611b1757600080fd5b60200191503681900382131561144057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b5457611b54611b2c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611bde5782840389528135601e19883603018112611b9657600080fd5b870180356001600160401b03811115611bae57600080fd5b803603891315611bbd57600080fd5b611bca86828985016119da565b9a87019a9550505090840190600101611b75565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611c2c576001600160a01b03611c17846113e3565b16825260209283019290910190600101611bfe565b5083810360208501528881526001600160fb1b03891115611c4c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611c7d81888a611b5b565b6060850196909652505050608001529695505050505050565b60008219821115611ca957611ca9611b2c565b500190565b60005b83811015611cc9578181015183820152602001611cb1565b83811115611cd8576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611d16816017850160208801611cae565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611d47816028840160208801611cae565b01602801949350505050565b6020815260008251806020840152611d72816040850160208701611cae565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611dfa57611dfa611b2c565b500290565b600081611e0e57611e0e611b2c565b50600019019056fea26469706673582212206bced80116cf61341e6e1c0849b397290fa79bfaf89786bc9e3b4d13ea869a2464736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json deleted file mode 100644 index d7daeb18..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimelockControllerWith46MigrationUpgradeable.json +++ /dev/null @@ -1,894 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TimelockControllerWith46MigrationUpgradeable", - "sourceName": "contracts/governance/TimelockControllerWith46MigrationUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "CallExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "CallSalt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "CallScheduled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "Cancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldDuration", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newDuration", - "type": "uint256" - } - ], - "name": "MinDelayChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "CANCELLER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "EXECUTOR_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PROPOSER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TIMELOCK_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "executeBatch", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getMinDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "getTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "hashOperation", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "hashOperationBatch", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperation", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationDone", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationPending", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "isOperationReady", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "migrateTo46", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "schedule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "payloads", - "type": "bytes[]" - }, - { - "internalType": "bytes32", - "name": "predecessor", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "scheduleBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newDelay", - "type": "uint256" - } - ], - "name": "updateDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50611fcc806100206000396000f3fe6080604052600436106101c65760003560e01c806364d62353116100f7578063b1c5f42711610095578063d547741f11610064578063d547741f1461057d578063e38335e51461059d578063f23a6e61146105b0578063f27a0c92146105dc57600080fd5b8063b1c5f427146104e4578063bc197c8114610504578063c4d252f514610530578063d45c44351461055057600080fd5b80638f61f4f5116100d15780638f61f4f51461046b57806391d148541461048d578063a217fddf146104ad578063b08e51c0146104c257600080fd5b806364d623531461040b5780638065657f1461042b5780638f2a0bb01461044b57600080fd5b80631fb78738116101645780632f2ff15d1161013e5780632f2ff15d1461038b57806331d50750146103ab57806336568abe146103cb578063584b153e146103eb57600080fd5b80631fb7873814610316578063248a9ca31461032b5780632ab0f5291461035b57600080fd5b80630d3cf6fc116101a05780630d3cf6fc1461026b578063134008d31461029f57806313bc9f20146102b2578063150b7a02146102d257600080fd5b806301d5062a146101d257806301ffc9a7146101f457806307bd02651461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611587565b6105f1565b005b34801561020057600080fd5b5061021461020f3660046115fb565b6106b5565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b5061025d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610220565b34801561027757600080fd5b5061025d7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101f26102ad366004611625565b6106e0565b3480156102be57600080fd5b506102146102cd366004611690565b610795565b3480156102de57600080fd5b506102fd6102ed36600461175e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610220565b34801561032257600080fd5b506101f26107bb565b34801561033757600080fd5b5061025d610346366004611690565b60009081526065602052604090206001015490565b34801561036757600080fd5b50610214610376366004611690565b60009081526097602052604090205460011490565b34801561039757600080fd5b506101f26103a63660046117c5565b6108ef565b3480156103b757600080fd5b506102146103c6366004611690565b610919565b3480156103d757600080fd5b506101f26103e63660046117c5565b610932565b3480156103f757600080fd5b50610214610406366004611690565b6109b0565b34801561041757600080fd5b506101f2610426366004611690565b6109c7565b34801561043757600080fd5b5061025d610446366004611625565b610a6b565b34801561045757600080fd5b506101f2610466366004611835565b610aaa565b34801561047757600080fd5b5061025d600080516020611f5783398151915281565b34801561049957600080fd5b506102146104a83660046117c5565b610c2b565b3480156104b957600080fd5b5061025d600081565b3480156104ce57600080fd5b5061025d600080516020611f7783398151915281565b3480156104f057600080fd5b5061025d6104ff3660046118e6565b610c56565b34801561051057600080fd5b506102fd61051f366004611a0d565b63bc197c8160e01b95945050505050565b34801561053c57600080fd5b506101f261054b366004611690565b610c9b565b34801561055c57600080fd5b5061025d61056b366004611690565b60009081526097602052604090205490565b34801561058957600080fd5b506101f26105983660046117c5565b610d5e565b6101f26105ab3660046118e6565b610d83565b3480156105bc57600080fd5b506102fd6105cb366004611ab6565b63f23a6e6160e01b95945050505050565b3480156105e857600080fd5b5060985461025d565b600080516020611f5783398151915261060981610f0d565b6000610619898989898989610a6b565b90506106258184610f1a565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161066196959493929190611b43565b60405180910390a383156106aa57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a191815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106da57506106da82611009565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6361070c816000610c2b565b61071a5761071a813361103e565b600061072a888888888888610a6b565b90506107368185611097565b61074288888888611132565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161077a9493929190611b80565b60405180910390a361078b81611205565b5050505050505050565b6000818152609760205260408120546001811180156107b45750428111155b9392505050565b600080516020611f5783398151915260005260656020527fafe71ff1fe81c59ca16af21c02420893e650adae4948ece1623218f842885478547f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca51480156108585750600080516020611f7783398151915260005260656020527fb33a3829f2d1f31fd111fcd13892b72b93a782f7b93bf968903b15b040efa32154155b6108b55760405162461bcd60e51b8152602060048201526024808201527f54696d656c6f636b436f6e74726f6c6c65723a20616c7265616479206d696772604482015263185d195960e21b60648201526084015b60405180910390fd5b6108ed600080516020611f778339815191527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca561123e565b565b60008281526065602052604090206001015461090a81610f0d565b6109148383611289565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146109a25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108ac565b6109ac828261130f565b5050565b60008181526097602052604081205460019061092b565b333014610a2a5760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b60648201526084016108ac565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b6000868686868686604051602001610a8896959493929190611b43565b6040516020818303038152906040528051906020012090509695505050505050565b600080516020611f57833981519152610ac281610f0d565b888714610ae15760405162461bcd60e51b81526004016108ac90611bb2565b888514610b005760405162461bcd60e51b81526004016108ac90611bb2565b6000610b128b8b8b8b8b8b8b8b610c56565b9050610b1e8184610f1a565b60005b8a811015610bdc5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610b5e57610b5e611bf5565b9050602002016020810190610b739190611c0b565b8d8d86818110610b8557610b85611bf5565b905060200201358c8c87818110610b9e57610b9e611bf5565b9050602002810190610bb09190611c26565b8c8b604051610bc496959493929190611b43565b60405180910390a3610bd581611c82565b9050610b21565b508315610c1e57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610c1591815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610c77989796959493929190611d2b565b60405160208183030381529060405280519060200120905098975050505050505050565b600080516020611f77833981519152610cb381610f0d565b610cbc826109b0565b610d225760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b60648201526084016108ac565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610d7981610f0d565b610914838361130f565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610daf816000610c2b565b610dbd57610dbd813361103e565b878614610ddc5760405162461bcd60e51b81526004016108ac90611bb2565b878414610dfb5760405162461bcd60e51b81526004016108ac90611bb2565b6000610e0d8a8a8a8a8a8a8a8a610c56565b9050610e198185611097565b60005b89811015610ef75760008b8b83818110610e3857610e38611bf5565b9050602002016020810190610e4d9190611c0b565b905060008a8a84818110610e6357610e63611bf5565b9050602002013590503660008a8a86818110610e8157610e81611bf5565b9050602002810190610e939190611c26565b91509150610ea384848484611132565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610eda9493929190611b80565b60405180910390a35050505080610ef090611c82565b9050610e1c565b50610f0181611205565b50505050505050505050565b610f17813361103e565b50565b610f2382610919565b15610f885760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b60648201526084016108ac565b609854811015610fe95760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b60648201526084016108ac565b610ff38142611dd6565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106da57506301ffc9a760e01b6001600160e01b03198316146106da565b6110488282610c2b565b6109ac5761105581611376565b611060836020611388565b604051602001611071929190611e1e565b60408051601f198184030181529082905262461bcd60e51b82526108ac91600401611e93565b6110a082610795565b6110bc5760405162461bcd60e51b81526004016108ac90611ec6565b8015806110d757506000818152609760205260409020546001145b6109ac5760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b60648201526084016108ac565b6000846001600160a01b031684848460405161114f929190611f10565b60006040518083038185875af1925050503d806000811461118c576040519150601f19603f3d011682016040523d82523d6000602084013e611191565b606091505b50509050806111fe5760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b60648201526084016108ac565b5050505050565b61120e81610795565b61122a5760405162461bcd60e51b81526004016108ac90611ec6565b600090815260976020526040902060019055565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6112938282610c2b565b6109ac5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556112cb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6113198282610c2b565b156109ac5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106da6001600160a01b03831660145b60606000611397836002611f20565b6113a2906002611dd6565b6001600160401b038111156113b9576113b96116a9565b6040519080825280601f01601f1916602001820160405280156113e3576020820181803683370190505b509050600360fc1b816000815181106113fe576113fe611bf5565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061142d5761142d611bf5565b60200101906001600160f81b031916908160001a9053506000611451846002611f20565b61145c906001611dd6565b90505b60018111156114d4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061149057611490611bf5565b1a60f81b8282815181106114a6576114a6611bf5565b60200101906001600160f81b031916908160001a90535060049490941c936114cd81611f3f565b905061145f565b5083156107b45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ac565b80356001600160a01b038116811461153a57600080fd5b919050565b60008083601f84011261155157600080fd5b5081356001600160401b0381111561156857600080fd5b60208301915083602082850101111561158057600080fd5b9250929050565b600080600080600080600060c0888a0312156115a257600080fd5b6115ab88611523565b96506020880135955060408801356001600160401b038111156115cd57600080fd5b6115d98a828b0161153f565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561160d57600080fd5b81356001600160e01b0319811681146107b457600080fd5b60008060008060008060a0878903121561163e57600080fd5b61164787611523565b95506020870135945060408701356001600160401b0381111561166957600080fd5b61167589828a0161153f565b979a9699509760608101359660809091013595509350505050565b6000602082840312156116a257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156116e7576116e76116a9565b604052919050565b600082601f83011261170057600080fd5b81356001600160401b03811115611719576117196116a9565b61172c601f8201601f19166020016116bf565b81815284602083860101111561174157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561177457600080fd5b61177d85611523565b935061178b60208601611523565b92506040850135915060608501356001600160401b038111156117ad57600080fd5b6117b9878288016116ef565b91505092959194509250565b600080604083850312156117d857600080fd5b823591506117e860208401611523565b90509250929050565b60008083601f84011261180357600080fd5b5081356001600160401b0381111561181a57600080fd5b6020830191508360208260051b850101111561158057600080fd5b600080600080600080600080600060c08a8c03121561185357600080fd5b89356001600160401b038082111561186a57600080fd5b6118768d838e016117f1565b909b50995060208c013591508082111561188f57600080fd5b61189b8d838e016117f1565b909950975060408c01359150808211156118b457600080fd5b506118c18c828d016117f1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561190257600080fd5b88356001600160401b038082111561191957600080fd5b6119258c838d016117f1565b909a50985060208b013591508082111561193e57600080fd5b61194a8c838d016117f1565b909850965060408b013591508082111561196357600080fd5b506119708b828c016117f1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261199f57600080fd5b813560206001600160401b038211156119ba576119ba6116a9565b8160051b6119c98282016116bf565b92835284810182019282810190878511156119e357600080fd5b83870192505b84831015611a02578235825291830191908301906119e9565b979650505050505050565b600080600080600060a08688031215611a2557600080fd5b611a2e86611523565b9450611a3c60208701611523565b935060408601356001600160401b0380821115611a5857600080fd5b611a6489838a0161198e565b94506060880135915080821115611a7a57600080fd5b611a8689838a0161198e565b93506080880135915080821115611a9c57600080fd5b50611aa9888289016116ef565b9150509295509295909350565b600080600080600060a08688031215611ace57600080fd5b611ad786611523565b9450611ae560208701611523565b9350604086013592506060860135915060808601356001600160401b03811115611b0e57600080fd5b611aa9888289016116ef565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611b6b60a083018688611b1a565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611ba8606083018486611b1a565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611c1d57600080fd5b6107b482611523565b6000808335601e19843603018112611c3d57600080fd5b8301803591506001600160401b03821115611c5757600080fd5b60200191503681900382131561158057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611c9457611c94611c6c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611d1e5782840389528135601e19883603018112611cd657600080fd5b870180356001600160401b03811115611cee57600080fd5b803603891315611cfd57600080fd5b611d0a8682898501611b1a565b9a87019a9550505090840190600101611cb5565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611d6c576001600160a01b03611d5784611523565b16825260209283019290910190600101611d3e565b5083810360208501528881526001600160fb1b03891115611d8c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611dbd81888a611c9b565b6060850196909652505050608001529695505050505050565b60008219821115611de957611de9611c6c565b500190565b60005b83811015611e09578181015183820152602001611df1565b83811115611e18576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611e56816017850160208801611dee565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e87816028840160208801611dee565b01602801949350505050565b6020815260008251806020840152611eb2816040850160208701611dee565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611f3a57611f3a611c6c565b500290565b600081611f4e57611f4e611c6c565b50600019019056feb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783a2646970667358221220d077a2e7d5f73ec1d1b9baca38e81476feb5ad3406db97f5aa84b06c3ddc1aa164736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106101c65760003560e01c806364d62353116100f7578063b1c5f42711610095578063d547741f11610064578063d547741f1461057d578063e38335e51461059d578063f23a6e61146105b0578063f27a0c92146105dc57600080fd5b8063b1c5f427146104e4578063bc197c8114610504578063c4d252f514610530578063d45c44351461055057600080fd5b80638f61f4f5116100d15780638f61f4f51461046b57806391d148541461048d578063a217fddf146104ad578063b08e51c0146104c257600080fd5b806364d623531461040b5780638065657f1461042b5780638f2a0bb01461044b57600080fd5b80631fb78738116101645780632f2ff15d1161013e5780632f2ff15d1461038b57806331d50750146103ab57806336568abe146103cb578063584b153e146103eb57600080fd5b80631fb7873814610316578063248a9ca31461032b5780632ab0f5291461035b57600080fd5b80630d3cf6fc116101a05780630d3cf6fc1461026b578063134008d31461029f57806313bc9f20146102b2578063150b7a02146102d257600080fd5b806301d5062a146101d257806301ffc9a7146101f457806307bd02651461022957600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611587565b6105f1565b005b34801561020057600080fd5b5061021461020f3660046115fb565b6106b5565b60405190151581526020015b60405180910390f35b34801561023557600080fd5b5061025d7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b604051908152602001610220565b34801561027757600080fd5b5061025d7f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b6101f26102ad366004611625565b6106e0565b3480156102be57600080fd5b506102146102cd366004611690565b610795565b3480156102de57600080fd5b506102fd6102ed36600461175e565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610220565b34801561032257600080fd5b506101f26107bb565b34801561033757600080fd5b5061025d610346366004611690565b60009081526065602052604090206001015490565b34801561036757600080fd5b50610214610376366004611690565b60009081526097602052604090205460011490565b34801561039757600080fd5b506101f26103a63660046117c5565b6108ef565b3480156103b757600080fd5b506102146103c6366004611690565b610919565b3480156103d757600080fd5b506101f26103e63660046117c5565b610932565b3480156103f757600080fd5b50610214610406366004611690565b6109b0565b34801561041757600080fd5b506101f2610426366004611690565b6109c7565b34801561043757600080fd5b5061025d610446366004611625565b610a6b565b34801561045757600080fd5b506101f2610466366004611835565b610aaa565b34801561047757600080fd5b5061025d600080516020611f5783398151915281565b34801561049957600080fd5b506102146104a83660046117c5565b610c2b565b3480156104b957600080fd5b5061025d600081565b3480156104ce57600080fd5b5061025d600080516020611f7783398151915281565b3480156104f057600080fd5b5061025d6104ff3660046118e6565b610c56565b34801561051057600080fd5b506102fd61051f366004611a0d565b63bc197c8160e01b95945050505050565b34801561053c57600080fd5b506101f261054b366004611690565b610c9b565b34801561055c57600080fd5b5061025d61056b366004611690565b60009081526097602052604090205490565b34801561058957600080fd5b506101f26105983660046117c5565b610d5e565b6101f26105ab3660046118e6565b610d83565b3480156105bc57600080fd5b506102fd6105cb366004611ab6565b63f23a6e6160e01b95945050505050565b3480156105e857600080fd5b5060985461025d565b600080516020611f5783398151915261060981610f0d565b6000610619898989898989610a6b565b90506106258184610f1a565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161066196959493929190611b43565b60405180910390a383156106aa57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d0387856040516106a191815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b14806106da57506106da82611009565b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6361070c816000610c2b565b61071a5761071a813361103e565b600061072a888888888888610a6b565b90506107368185611097565b61074288888888611132565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161077a9493929190611b80565b60405180910390a361078b81611205565b5050505050505050565b6000818152609760205260408120546001811180156107b45750428111155b9392505050565b600080516020611f5783398151915260005260656020527fafe71ff1fe81c59ca16af21c02420893e650adae4948ece1623218f842885478547f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca51480156108585750600080516020611f7783398151915260005260656020527fb33a3829f2d1f31fd111fcd13892b72b93a782f7b93bf968903b15b040efa32154155b6108b55760405162461bcd60e51b8152602060048201526024808201527f54696d656c6f636b436f6e74726f6c6c65723a20616c7265616479206d696772604482015263185d195960e21b60648201526084015b60405180910390fd5b6108ed600080516020611f778339815191527f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca561123e565b565b60008281526065602052604090206001015461090a81610f0d565b6109148383611289565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146109a25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108ac565b6109ac828261130f565b5050565b60008181526097602052604081205460019061092b565b333014610a2a5760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b60648201526084016108ac565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b6000868686868686604051602001610a8896959493929190611b43565b6040516020818303038152906040528051906020012090509695505050505050565b600080516020611f57833981519152610ac281610f0d565b888714610ae15760405162461bcd60e51b81526004016108ac90611bb2565b888514610b005760405162461bcd60e51b81526004016108ac90611bb2565b6000610b128b8b8b8b8b8b8b8b610c56565b9050610b1e8184610f1a565b60005b8a811015610bdc5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610b5e57610b5e611bf5565b9050602002016020810190610b739190611c0b565b8d8d86818110610b8557610b85611bf5565b905060200201358c8c87818110610b9e57610b9e611bf5565b9050602002810190610bb09190611c26565b8c8b604051610bc496959493929190611b43565b60405180910390a3610bd581611c82565b9050610b21565b508315610c1e57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610c1591815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610c77989796959493929190611d2b565b60405160208183030381529060405280519060200120905098975050505050505050565b600080516020611f77833981519152610cb381610f0d565b610cbc826109b0565b610d225760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b60648201526084016108ac565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610d7981610f0d565b610914838361130f565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610daf816000610c2b565b610dbd57610dbd813361103e565b878614610ddc5760405162461bcd60e51b81526004016108ac90611bb2565b878414610dfb5760405162461bcd60e51b81526004016108ac90611bb2565b6000610e0d8a8a8a8a8a8a8a8a610c56565b9050610e198185611097565b60005b89811015610ef75760008b8b83818110610e3857610e38611bf5565b9050602002016020810190610e4d9190611c0b565b905060008a8a84818110610e6357610e63611bf5565b9050602002013590503660008a8a86818110610e8157610e81611bf5565b9050602002810190610e939190611c26565b91509150610ea384848484611132565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610eda9493929190611b80565b60405180910390a35050505080610ef090611c82565b9050610e1c565b50610f0181611205565b50505050505050505050565b610f17813361103e565b50565b610f2382610919565b15610f885760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b60648201526084016108ac565b609854811015610fe95760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b60648201526084016108ac565b610ff38142611dd6565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b14806106da57506301ffc9a760e01b6001600160e01b03198316146106da565b6110488282610c2b565b6109ac5761105581611376565b611060836020611388565b604051602001611071929190611e1e565b60408051601f198184030181529082905262461bcd60e51b82526108ac91600401611e93565b6110a082610795565b6110bc5760405162461bcd60e51b81526004016108ac90611ec6565b8015806110d757506000818152609760205260409020546001145b6109ac5760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b60648201526084016108ac565b6000846001600160a01b031684848460405161114f929190611f10565b60006040518083038185875af1925050503d806000811461118c576040519150601f19603f3d011682016040523d82523d6000602084013e611191565b606091505b50509050806111fe5760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b60648201526084016108ac565b5050505050565b61120e81610795565b61122a5760405162461bcd60e51b81526004016108ac90611ec6565b600090815260976020526040902060019055565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6112938282610c2b565b6109ac5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556112cb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6113198282610c2b565b156109ac5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60606106da6001600160a01b03831660145b60606000611397836002611f20565b6113a2906002611dd6565b6001600160401b038111156113b9576113b96116a9565b6040519080825280601f01601f1916602001820160405280156113e3576020820181803683370190505b509050600360fc1b816000815181106113fe576113fe611bf5565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061142d5761142d611bf5565b60200101906001600160f81b031916908160001a9053506000611451846002611f20565b61145c906001611dd6565b90505b60018111156114d4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061149057611490611bf5565b1a60f81b8282815181106114a6576114a6611bf5565b60200101906001600160f81b031916908160001a90535060049490941c936114cd81611f3f565b905061145f565b5083156107b45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ac565b80356001600160a01b038116811461153a57600080fd5b919050565b60008083601f84011261155157600080fd5b5081356001600160401b0381111561156857600080fd5b60208301915083602082850101111561158057600080fd5b9250929050565b600080600080600080600060c0888a0312156115a257600080fd5b6115ab88611523565b96506020880135955060408801356001600160401b038111156115cd57600080fd5b6115d98a828b0161153f565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561160d57600080fd5b81356001600160e01b0319811681146107b457600080fd5b60008060008060008060a0878903121561163e57600080fd5b61164787611523565b95506020870135945060408701356001600160401b0381111561166957600080fd5b61167589828a0161153f565b979a9699509760608101359660809091013595509350505050565b6000602082840312156116a257600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156116e7576116e76116a9565b604052919050565b600082601f83011261170057600080fd5b81356001600160401b03811115611719576117196116a9565b61172c601f8201601f19166020016116bf565b81815284602083860101111561174157600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561177457600080fd5b61177d85611523565b935061178b60208601611523565b92506040850135915060608501356001600160401b038111156117ad57600080fd5b6117b9878288016116ef565b91505092959194509250565b600080604083850312156117d857600080fd5b823591506117e860208401611523565b90509250929050565b60008083601f84011261180357600080fd5b5081356001600160401b0381111561181a57600080fd5b6020830191508360208260051b850101111561158057600080fd5b600080600080600080600080600060c08a8c03121561185357600080fd5b89356001600160401b038082111561186a57600080fd5b6118768d838e016117f1565b909b50995060208c013591508082111561188f57600080fd5b61189b8d838e016117f1565b909950975060408c01359150808211156118b457600080fd5b506118c18c828d016117f1565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b03121561190257600080fd5b88356001600160401b038082111561191957600080fd5b6119258c838d016117f1565b909a50985060208b013591508082111561193e57600080fd5b61194a8c838d016117f1565b909850965060408b013591508082111561196357600080fd5b506119708b828c016117f1565b999c989b509699959896976060870135966080013595509350505050565b600082601f83011261199f57600080fd5b813560206001600160401b038211156119ba576119ba6116a9565b8160051b6119c98282016116bf565b92835284810182019282810190878511156119e357600080fd5b83870192505b84831015611a02578235825291830191908301906119e9565b979650505050505050565b600080600080600060a08688031215611a2557600080fd5b611a2e86611523565b9450611a3c60208701611523565b935060408601356001600160401b0380821115611a5857600080fd5b611a6489838a0161198e565b94506060880135915080821115611a7a57600080fd5b611a8689838a0161198e565b93506080880135915080821115611a9c57600080fd5b50611aa9888289016116ef565b9150509295509295909350565b600080600080600060a08688031215611ace57600080fd5b611ad786611523565b9450611ae560208701611523565b9350604086013592506060860135915060808601356001600160401b03811115611b0e57600080fd5b611aa9888289016116ef565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611b6b60a083018688611b1a565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611ba8606083018486611b1a565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611c1d57600080fd5b6107b482611523565b6000808335601e19843603018112611c3d57600080fd5b8301803591506001600160401b03821115611c5757600080fd5b60200191503681900382131561158057600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611c9457611c94611c6c565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611d1e5782840389528135601e19883603018112611cd657600080fd5b870180356001600160401b03811115611cee57600080fd5b803603891315611cfd57600080fd5b611d0a8682898501611b1a565b9a87019a9550505090840190600101611cb5565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611d6c576001600160a01b03611d5784611523565b16825260209283019290910190600101611d3e565b5083810360208501528881526001600160fb1b03891115611d8c57600080fd5b8860051b9150818a602083013781810191505060208101600081526020848303016040850152611dbd81888a611c9b565b6060850196909652505050608001529695505050505050565b60008219821115611de957611de9611c6c565b500190565b60005b83811015611e09578181015183820152602001611df1565b83811115611e18576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611e56816017850160208801611dee565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e87816028840160208801611dee565b01602801949350505050565b6020815260008251806020840152611eb2816040850160208701611dee565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6000816000190483118215151615611f3a57611f3a611c6c565b500290565b600081611f4e57611f4e611c6c565b50600019019056feb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783a2646970667358221220d077a2e7d5f73ec1d1b9baca38e81476feb5ad3406db97f5aa84b06c3ddc1aa164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json deleted file mode 100644 index 1aed81b3..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TimersUpgradeable.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TimersUpgradeable", - "sourceName": "contracts/utils/TimersUpgradeable.sol", - "abi": [], - "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ccb39ca7887c7d55dde815bef65def12a8b337409cfc81ec0548e6f977f8785f64736f6c634300080d0033", - "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ccb39ca7887c7d55dde815bef65def12a8b337409cfc81ec0548e6f977f8785f64736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json deleted file mode 100644 index 92c44838..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/TokenTimelockUpgradeable.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "TokenTimelockUpgradeable", - "sourceName": "contracts/token/ERC20/utils/TokenTimelockUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [], - "name": "beneficiary", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "releaseTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b506105de806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f1461007b578063b91d400114610085578063fc0c546a14610096575b600080fd5b6001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100836100ad565b005b600254604051908152602001610072565b6000546201000090046001600160a01b031661005e565b60025442101561011f5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b600080546201000090046001600160a01b03166040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019c91906104e7565b9050600081116101fa5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610116565b61022861020f6001546001600160a01b031690565b6000546201000090046001600160a01b0316908361022b565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261027d908490610282565b505050565b60006102d7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103579092919063ffffffff16565b90508051600014806102f85750808060200190518101906102f89190610500565b61027d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610116565b6060610366848460008561036e565b949350505050565b6060824710156103cf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610116565b600080866001600160a01b031685876040516103eb9190610559565b60006040518083038185875af1925050503d8060008114610428576040519150601f19603f3d011682016040523d82523d6000602084013e61042d565b606091505b509150915061043e87838387610449565b979650505050505050565b606083156104b85782516000036104b1576001600160a01b0385163b6104b15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610116565b5081610366565b61036683838151156104cd5781518083602001fd5b8060405162461bcd60e51b81526004016101169190610575565b6000602082840312156104f957600080fd5b5051919050565b60006020828403121561051257600080fd5b8151801515811461052257600080fd5b9392505050565b60005b8381101561054457818101518382015260200161052c565b83811115610553576000848401525b50505050565b6000825161056b818460208701610529565b9190910192915050565b6020815260008251806020840152610594816040850160208701610529565b601f01601f1916919091016040019291505056fea26469706673582212204747b23234c7135a16f967df9807faedc83cbf6deee2e1db3bad123b145662b664736f6c634300080d0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806338af3eed1461005157806386d1a69f1461007b578063b91d400114610085578063fc0c546a14610096575b600080fd5b6001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100836100ad565b005b600254604051908152602001610072565b6000546201000090046001600160a01b031661005e565b60025442101561011f5760405162461bcd60e51b815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527165666f72652072656c656173652074696d6560701b60648201526084015b60405180910390fd5b600080546201000090046001600160a01b03166040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019c91906104e7565b9050600081116101fa5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201526261736560e81b6064820152608401610116565b61022861020f6001546001600160a01b031690565b6000546201000090046001600160a01b0316908361022b565b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261027d908490610282565b505050565b60006102d7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103579092919063ffffffff16565b90508051600014806102f85750808060200190518101906102f89190610500565b61027d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610116565b6060610366848460008561036e565b949350505050565b6060824710156103cf5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610116565b600080866001600160a01b031685876040516103eb9190610559565b60006040518083038185875af1925050503d8060008114610428576040519150601f19603f3d011682016040523d82523d6000602084013e61042d565b606091505b509150915061043e87838387610449565b979650505050505050565b606083156104b85782516000036104b1576001600160a01b0385163b6104b15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610116565b5081610366565b61036683838151156104cd5781518083602001fd5b8060405162461bcd60e51b81526004016101169190610575565b6000602082840312156104f957600080fd5b5051919050565b60006020828403121561051257600080fd5b8151801515811461052257600080fd5b9392505050565b60005b8381101561054457818101518382015260200161052c565b83811115610553576000848401525b50505050565b6000825161056b818460208701610529565b9190910192915050565b6020815260008251806020840152610594816040850160208701610529565b601f01601f1916919091016040019291505056fea26469706673582212204747b23234c7135a16f967df9807faedc83cbf6deee2e1db3bad123b145662b664736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json deleted file mode 100644 index 0d8f5416..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VestingWalletUpgradeable.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "VestingWalletUpgradeable", - "sourceName": "contracts/finance/VestingWalletUpgradeable.sol", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ERC20Released", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "EtherReleased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "inputs": [], - "name": "beneficiary", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "duration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "releasable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "release", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "released", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "start", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - } - ], - "name": "vestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - } - ], - "name": "vestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50610aec806100206000396000f3fe6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f14610168578063961325211461017d5780639852595c14610192578063a3f8eace146101c8578063be9a6555146101e8578063fbccedae1461020e57600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df57806319165587146100fe57806338af3eed14610120578063810ec23b1461014857600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c73660046108f6565b610223565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b5060365467ffffffffffffffff166100cc565b34801561010a57600080fd5b5061011e610119366004610928565b610247565b005b34801561012c57600080fd5b506035546040516001600160a01b0390911681526020016100d6565b34801561015457600080fd5b506100cc610163366004610943565b6102e2565b34801561017457600080fd5b5061011e610378565b34801561018957600080fd5b506033546100cc565b34801561019e57600080fd5b506100cc6101ad366004610928565b6001600160a01b031660009081526034602052604090205490565b3480156101d457600080fd5b506100cc6101e3366004610928565b6103ec565b3480156101f457600080fd5b50603554600160a01b900467ffffffffffffffff166100cc565b34801561021a57600080fd5b506100cc610419565b600061024161023160335490565b61023b904761098c565b8361043c565b92915050565b6000610252826103ec565b6001600160a01b03831660009081526034602052604081208054929350839290919061027f90849061098c565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a26102de826102d86035546001600160a01b031690565b836104ff565b5050565b6001600160a01b038216600090815260346020526040812054610371906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015610343573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036791906109a4565b61023b919061098c565b9392505050565b6000610382610419565b90508060336000828254610396919061098c565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a16103e96103e36035546001600160a01b031690565b82610556565b50565b6001600160a01b03811660009081526034602052604081205461040f83426102e2565b61024191906109bd565b600061042460335490565b61042d42610223565b61043791906109bd565b905090565b603554600090600160a01b900467ffffffffffffffff168267ffffffffffffffff16101561046c57506000610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff16610497919061098c565b8267ffffffffffffffff1611156104af575081610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff166104e49067ffffffffffffffff85166109bd565b6104ee90856109d4565b6104f891906109f3565b9050610241565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610551908490610674565b505050565b804710156105ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146105f8576040519150601f19603f3d011682016040523d82523d6000602084013e6105fd565b606091505b50509050806105515760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016105a2565b60006106c9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107499092919063ffffffff16565b90508051600014806106ea5750808060200190518101906106ea9190610a15565b6105515760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a2565b60606107588484600085610760565b949350505050565b6060824710156107c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105a2565b600080866001600160a01b031685876040516107dd9190610a67565b60006040518083038185875af1925050503d806000811461081a576040519150601f19603f3d011682016040523d82523d6000602084013e61081f565b606091505b50915091506108308783838761083b565b979650505050505050565b606083156108aa5782516000036108a3576001600160a01b0385163b6108a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a2565b5081610758565b61075883838151156108bf5781518083602001fd5b8060405162461bcd60e51b81526004016105a29190610a83565b803567ffffffffffffffff811681146108f157600080fd5b919050565b60006020828403121561090857600080fd5b610371826108d9565b80356001600160a01b03811681146108f157600080fd5b60006020828403121561093a57600080fd5b61037182610911565b6000806040838503121561095657600080fd5b61095f83610911565b915061096d602084016108d9565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561099f5761099f610976565b500190565b6000602082840312156109b657600080fd5b5051919050565b6000828210156109cf576109cf610976565b500390565b60008160001904831182151516156109ee576109ee610976565b500290565b600082610a1057634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610a2757600080fd5b8151801515811461037157600080fd5b60005b83811015610a52578181015183820152602001610a3a565b83811115610a61576000848401525b50505050565b60008251610a79818460208701610a37565b9190910192915050565b6020815260008251806020840152610aa2816040850160208701610a37565b601f01601f1916919091016040019291505056fea2646970667358221220f3282a88c5acb4f0c81e9219e582257765313d4de0f7f49fcbe53dcc9c10d4a164736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100a05760003560e01c806386d1a69f1161006457806386d1a69f14610168578063961325211461017d5780639852595c14610192578063a3f8eace146101c8578063be9a6555146101e8578063fbccedae1461020e57600080fd5b80630a17b06b146100ac5780630fb5a6b4146100df57806319165587146100fe57806338af3eed14610120578063810ec23b1461014857600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c73660046108f6565b610223565b6040519081526020015b60405180910390f35b3480156100eb57600080fd5b5060365467ffffffffffffffff166100cc565b34801561010a57600080fd5b5061011e610119366004610928565b610247565b005b34801561012c57600080fd5b506035546040516001600160a01b0390911681526020016100d6565b34801561015457600080fd5b506100cc610163366004610943565b6102e2565b34801561017457600080fd5b5061011e610378565b34801561018957600080fd5b506033546100cc565b34801561019e57600080fd5b506100cc6101ad366004610928565b6001600160a01b031660009081526034602052604090205490565b3480156101d457600080fd5b506100cc6101e3366004610928565b6103ec565b3480156101f457600080fd5b50603554600160a01b900467ffffffffffffffff166100cc565b34801561021a57600080fd5b506100cc610419565b600061024161023160335490565b61023b904761098c565b8361043c565b92915050565b6000610252826103ec565b6001600160a01b03831660009081526034602052604081208054929350839290919061027f90849061098c565b90915550506040518181526001600160a01b038316907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a26102de826102d86035546001600160a01b031690565b836104ff565b5050565b6001600160a01b038216600090815260346020526040812054610371906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa158015610343573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036791906109a4565b61023b919061098c565b9392505050565b6000610382610419565b90508060336000828254610396919061098c565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a16103e96103e36035546001600160a01b031690565b82610556565b50565b6001600160a01b03811660009081526034602052604081205461040f83426102e2565b61024191906109bd565b600061042460335490565b61042d42610223565b61043791906109bd565b905090565b603554600090600160a01b900467ffffffffffffffff168267ffffffffffffffff16101561046c57506000610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff16610497919061098c565b8267ffffffffffffffff1611156104af575081610241565b60365467ffffffffffffffff16603554600160a01b900467ffffffffffffffff166104e49067ffffffffffffffff85166109bd565b6104ee90856109d4565b6104f891906109f3565b9050610241565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610551908490610674565b505050565b804710156105ab5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146105f8576040519150601f19603f3d011682016040523d82523d6000602084013e6105fd565b606091505b50509050806105515760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016105a2565b60006106c9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166107499092919063ffffffff16565b90508051600014806106ea5750808060200190518101906106ea9190610a15565b6105515760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105a2565b60606107588484600085610760565b949350505050565b6060824710156107c15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105a2565b600080866001600160a01b031685876040516107dd9190610a67565b60006040518083038185875af1925050503d806000811461081a576040519150601f19603f3d011682016040523d82523d6000602084013e61081f565b606091505b50915091506108308783838761083b565b979650505050505050565b606083156108aa5782516000036108a3576001600160a01b0385163b6108a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a2565b5081610758565b61075883838151156108bf5781518083602001fd5b8060405162461bcd60e51b81526004016105a29190610a83565b803567ffffffffffffffff811681146108f157600080fd5b919050565b60006020828403121561090857600080fd5b610371826108d9565b80356001600160a01b03811681146108f157600080fd5b60006020828403121561093a57600080fd5b61037182610911565b6000806040838503121561095657600080fd5b61095f83610911565b915061096d602084016108d9565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561099f5761099f610976565b500190565b6000602082840312156109b657600080fd5b5051919050565b6000828210156109cf576109cf610976565b500390565b60008160001904831182151516156109ee576109ee610976565b500290565b600082610a1057634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610a2757600080fd5b8151801515811461037157600080fd5b60005b83811015610a52578181015183820152602001610a3a565b83811115610a61576000848401525b50505050565b60008251610a79818460208701610a37565b9190910192915050565b6020815260008251806020840152610aa2816040850160208701610a37565b601f01601f1916919091016040019291505056fea2646970667358221220f3282a88c5acb4f0c81e9219e582257765313d4de0f7f49fcbe53dcc9c10d4a164736f6c634300080d0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol deleted file mode 100644 index 3a089afe..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/CrossChainEnabledUpgradeable.sol +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/CrossChainEnabled.sol) - -pragma solidity ^0.8.4; - -import "./errorsUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Provides information for building cross-chain aware contracts. This - * abstract contract provides accessors and modifiers to control the execution - * flow when receiving cross-chain messages. - * - * Actual implementations of cross-chain aware contracts, which are based on - * this abstraction, will have to inherit from a bridge-specific - * specialization. Such specializations are provided under - * `crosschain//CrossChainEnabled.sol`. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabledUpgradeable is Initializable { - /** - * @dev Throws if the current function call is not the result of a - * cross-chain execution. - */ - modifier onlyCrossChain() { - if (!_isCrossChain()) revert NotCrossChainCall(); - _; - } - - /** - * @dev Throws if the current function call is not the result of a - * cross-chain execution initiated by `account`. - */ - modifier onlyCrossChainSender(address expected) { - address actual = _crossChainSender(); - if (expected != actual) revert InvalidCrossChainSender(actual, expected); - _; - } - - function __CrossChainEnabled_init() internal onlyInitializing { - } - - function __CrossChainEnabled_init_unchained() internal onlyInitializing { - } - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message. - */ - function _isCrossChain() internal view virtual returns (bool); - - /** - * @dev Returns the address of the sender of the cross-chain message that - * triggered the current function call. - * - * IMPORTANT: Should revert with `NotCrossChainCall` if the current function - * call is not the result of a cross-chain message. - */ - function _crossChainSender() internal view virtual returns (address); - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc deleted file mode 100644 index 266b1530..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/README.adoc +++ /dev/null @@ -1,34 +0,0 @@ -= Cross Chain Awareness - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/crosschain - -This directory provides building blocks to improve cross-chain awareness of smart contracts. - -- {CrossChainEnabled} is an abstraction that contains accessors and modifiers to control the execution flow when receiving cross-chain messages. - -== CrossChainEnabled specializations - -The following specializations of {CrossChainEnabled} provide implementations of the {CrossChainEnabled} abstraction for specific bridges. This can be used to complex cross-chain aware components such as {AccessControlCrossChain}. - -{{CrossChainEnabledAMB}} - -{{CrossChainEnabledArbitrumL1}} - -{{CrossChainEnabledArbitrumL2}} - -{{CrossChainEnabledOptimism}} - -{{CrossChainEnabledPolygonChild}} - -== Libraries for cross-chain - -In addition to the {CrossChainEnabled} abstraction, cross-chain awareness is also available through libraries. These libraries can be used to build complex designs such as contracts with the ability to interact with multiple bridges. - -{{LibAMB}} - -{{LibArbitrumL1}} - -{{LibArbitrumL2}} - -{{LibOptimism}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol deleted file mode 100644 index 4329398e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/CrossChainEnabledAMBUpgradeable.sol +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/CrossChainEnabledAMB.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabledUpgradeable.sol"; -import "./LibAMBUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] - * specialization or the {CrossChainEnabled} abstraction. - * - * As of february 2020, AMB bridges are available between the following chains: - * - * - https://docs.tokenbridge.net/eth-xdai-amb-bridge/about-the-eth-xdai-amb[ETH ⇌ xDai] - * - https://docs.tokenbridge.net/eth-qdai-bridge/about-the-eth-qdai-amb[ETH ⇌ qDai] - * - https://docs.tokenbridge.net/eth-etc-amb-bridge/about-the-eth-etc-amb[ETH ⇌ ETC] - * - https://docs.tokenbridge.net/eth-bsc-amb/about-the-eth-bsc-amb[ETH ⇌ BSC] - * - https://docs.tokenbridge.net/eth-poa-amb-bridge/about-the-eth-poa-amb[ETH ⇌ POA] - * - https://docs.tokenbridge.net/bsc-xdai-amb/about-the-bsc-xdai-amb[BSC ⇌ xDai] - * - https://docs.tokenbridge.net/poa-xdai-amb/about-the-poa-xdai-amb[POA ⇌ xDai] - * - https://docs.tokenbridge.net/rinkeby-xdai-amb-bridge/about-the-rinkeby-xdai-amb[Rinkeby ⇌ xDai] - * - https://docs.tokenbridge.net/kovan-sokol-amb-bridge/about-the-kovan-sokol-amb[Kovan ⇌ Sokol] - * - * _Available since v4.6._ - */ -contract CrossChainEnabledAMBUpgradeable is Initializable, CrossChainEnabledUpgradeable { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _bridge; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address bridge) { - _bridge = bridge; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibAMBUpgradeable.isCrossChain(_bridge); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibAMBUpgradeable.crossChainSender(_bridge); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol deleted file mode 100644 index 313d2df4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/amb/LibAMBUpgradeable.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/amb/LibAMB.sol) - -pragma solidity ^0.8.4; - -import {IAMBUpgradeable as AMB_Bridge} from "../../vendor/amb/IAMBUpgradeable.sol"; -import "../errorsUpgradeable.sol"; - -/** - * @dev Primitives for cross-chain aware contracts using the - * https://docs.tokenbridge.net/amb-bridge/about-amb-bridge[AMB] - * family of bridges. - */ -library LibAMBUpgradeable { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by `bridge`. - */ - function isCrossChain(address bridge) internal view returns (bool) { - return msg.sender == bridge; - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through `bridge`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address bridge) internal view returns (address) { - if (!isCrossChain(bridge)) revert NotCrossChainCall(); - return AMB_Bridge(bridge).messageSender(); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol deleted file mode 100644 index a8625157..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL1Upgradeable.sol +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL1.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabledUpgradeable.sol"; -import "./LibArbitrumL1Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev https://arbitrum.io/[Arbitrum] specialization or the - * {CrossChainEnabled} abstraction the L1 side (mainnet). - * - * This version should only be deployed on L1 to process cross-chain messages - * originating from L2. For the other side, use {CrossChainEnabledArbitrumL2}. - * - * The bridge contract is provided and maintained by the arbitrum team. You can - * find the address of this contract on the rinkeby testnet in - * https://developer.offchainlabs.com/docs/useful_addresses[Arbitrum's developer documentation]. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabledArbitrumL1Upgradeable is Initializable, CrossChainEnabledUpgradeable { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _bridge; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address bridge) { - _bridge = bridge; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibArbitrumL1Upgradeable.isCrossChain(_bridge); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibArbitrumL1Upgradeable.crossChainSender(_bridge); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol deleted file mode 100644 index 80bb3a85..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/CrossChainEnabledArbitrumL2Upgradeable.sol +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabledUpgradeable.sol"; -import "./LibArbitrumL2Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev https://arbitrum.io/[Arbitrum] specialization or the - * {CrossChainEnabled} abstraction the L2 side (arbitrum). - * - * This version should only be deployed on L2 to process cross-chain messages - * originating from L1. For the other side, use {CrossChainEnabledArbitrumL1}. - * - * Arbitrum L2 includes the `ArbSys` contract at a fixed address. Therefore, - * this specialization of {CrossChainEnabled} does not include a constructor. - * - * _Available since v4.6._ - * - * WARNING: There is currently a bug in Arbitrum that causes this contract to - * fail to detect cross-chain calls when deployed behind a proxy. This will be - * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for - * August 31st 2022. - */ -abstract contract CrossChainEnabledArbitrumL2Upgradeable is Initializable, CrossChainEnabledUpgradeable { - function __CrossChainEnabledArbitrumL2_init() internal onlyInitializing { - } - - function __CrossChainEnabledArbitrumL2_init_unchained() internal onlyInitializing { - } - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibArbitrumL2Upgradeable.isCrossChain(LibArbitrumL2Upgradeable.ARBSYS); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibArbitrumL2Upgradeable.crossChainSender(LibArbitrumL2Upgradeable.ARBSYS); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol deleted file mode 100644 index a66ed348..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL1Upgradeable.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL1.sol) - -pragma solidity ^0.8.4; - -import {IBridgeUpgradeable as ArbitrumL1_Bridge} from "../../vendor/arbitrum/IBridgeUpgradeable.sol"; -import {IOutboxUpgradeable as ArbitrumL1_Outbox} from "../../vendor/arbitrum/IOutboxUpgradeable.sol"; -import "../errorsUpgradeable.sol"; - -/** - * @dev Primitives for cross-chain aware contracts for - * https://arbitrum.io/[Arbitrum]. - * - * This version should only be used on L1 to process cross-chain messages - * originating from L2. For the other side, use {LibArbitrumL2}. - */ -library LibArbitrumL1Upgradeable { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by the `bridge`. - */ - function isCrossChain(address bridge) internal view returns (bool) { - return msg.sender == bridge; - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through the `bridge`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address bridge) internal view returns (address) { - if (!isCrossChain(bridge)) revert NotCrossChainCall(); - - address sender = ArbitrumL1_Outbox(ArbitrumL1_Bridge(bridge).activeOutbox()).l2ToL1Sender(); - require(sender != address(0), "LibArbitrumL1: system messages without sender"); - - return sender; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol deleted file mode 100644 index e8abb606..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/arbitrum/LibArbitrumL2Upgradeable.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (crosschain/arbitrum/LibArbitrumL2.sol) - -pragma solidity ^0.8.4; - -import {IArbSysUpgradeable as ArbitrumL2_Bridge} from "../../vendor/arbitrum/IArbSysUpgradeable.sol"; -import "../errorsUpgradeable.sol"; - -/** - * @dev Primitives for cross-chain aware contracts for - * https://arbitrum.io/[Arbitrum]. - * - * This version should only be used on L2 to process cross-chain messages - * originating from L1. For the other side, use {LibArbitrumL1}. - * - * WARNING: There is currently a bug in Arbitrum that causes this contract to - * fail to detect cross-chain calls when deployed behind a proxy. This will be - * fixed when the network is upgraded to Arbitrum Nitro, currently scheduled for - * August 31st 2022. - */ -library LibArbitrumL2Upgradeable { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by `arbsys`. - */ - address public constant ARBSYS = 0x0000000000000000000000000000000000000064; - - function isCrossChain(address arbsys) internal view returns (bool) { - return ArbitrumL2_Bridge(arbsys).wasMyCallersAddressAliased(); - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through `arbsys`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address arbsys) internal view returns (address) { - if (!isCrossChain(arbsys)) revert NotCrossChainCall(); - - return ArbitrumL2_Bridge(arbsys).myCallersAddressWithoutAliasing(); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol deleted file mode 100644 index 004460e9..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/errorsUpgradeable.sol +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (crosschain/errors.sol) - -pragma solidity ^0.8.4; - -error NotCrossChainCall(); -error InvalidCrossChainSender(address actual, address expected); diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol deleted file mode 100644 index e6c5cd2d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/CrossChainEnabledOptimismUpgradeable.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/CrossChainEnabledOptimism.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabledUpgradeable.sol"; -import "./LibOptimismUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev https://www.optimism.io/[Optimism] specialization or the - * {CrossChainEnabled} abstraction. - * - * The messenger (`CrossDomainMessenger`) contract is provided and maintained by - * the optimism team. You can find the address of this contract on mainnet and - * kovan in the https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/deployments[deployments section of Optimism monorepo]. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabledOptimismUpgradeable is Initializable, CrossChainEnabledUpgradeable { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _messenger; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address messenger) { - _messenger = messenger; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return LibOptimismUpgradeable.isCrossChain(_messenger); - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return LibOptimismUpgradeable.crossChainSender(_messenger); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol deleted file mode 100644 index 9fb8ed55..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/optimism/LibOptimismUpgradeable.sol +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/optimism/LibOptimism.sol) - -pragma solidity ^0.8.4; - -import {ICrossDomainMessengerUpgradeable as Optimism_Bridge} from "../../vendor/optimism/ICrossDomainMessengerUpgradeable.sol"; -import "../errorsUpgradeable.sol"; - -/** - * @dev Primitives for cross-chain aware contracts for https://www.optimism.io/[Optimism]. - * See the https://community.optimism.io/docs/developers/bridge/messaging/#accessing-msg-sender[documentation] - * for the functionality used here. - */ -library LibOptimismUpgradeable { - /** - * @dev Returns whether the current function call is the result of a - * cross-chain message relayed by `messenger`. - */ - function isCrossChain(address messenger) internal view returns (bool) { - return msg.sender == messenger; - } - - /** - * @dev Returns the address of the sender that triggered the current - * cross-chain message through `messenger`. - * - * NOTE: {isCrossChain} should be checked before trying to recover the - * sender, as it will revert with `NotCrossChainCall` if the current - * function call is not the result of a cross-chain message. - */ - function crossChainSender(address messenger) internal view returns (address) { - if (!isCrossChain(messenger)) revert NotCrossChainCall(); - - return Optimism_Bridge(messenger).xDomainMessageSender(); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol deleted file mode 100644 index 6f76ec93..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/crosschain/polygon/CrossChainEnabledPolygonChildUpgradeable.sol +++ /dev/null @@ -1,80 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol) - -pragma solidity ^0.8.4; - -import "../CrossChainEnabledUpgradeable.sol"; -import "../../security/ReentrancyGuardUpgradeable.sol"; -import "../../utils/AddressUpgradeable.sol"; -import "../../vendor/polygon/IFxMessageProcessorUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -address constant DEFAULT_SENDER = 0x000000000000000000000000000000000000dEaD; - -/** - * @dev https://polygon.technology/[Polygon] specialization or the - * {CrossChainEnabled} abstraction the child side (polygon/mumbai). - * - * This version should only be deployed on child chain to process cross-chain - * messages originating from the parent chain. - * - * The fxChild contract is provided and maintained by the polygon team. You can - * find the address of this contract polygon and mumbai in - * https://docs.polygon.technology/docs/develop/l1-l2-communication/fx-portal/#contract-addresses[Polygon's Fx-Portal documentation]. - * - * _Available since v4.6._ - */ -abstract contract CrossChainEnabledPolygonChildUpgradeable is Initializable, IFxMessageProcessorUpgradeable, CrossChainEnabledUpgradeable, ReentrancyGuardUpgradeable { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _fxChild; - address private _sender = DEFAULT_SENDER; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address fxChild) { - _fxChild = fxChild; - } - - /** - * @dev see {CrossChainEnabled-_isCrossChain} - */ - function _isCrossChain() internal view virtual override returns (bool) { - return msg.sender == _fxChild; - } - - /** - * @dev see {CrossChainEnabled-_crossChainSender} - */ - function _crossChainSender() internal view virtual override onlyCrossChain returns (address) { - return _sender; - } - - /** - * @dev External entry point to receive and relay messages originating - * from the fxChild. - * - * Non-reentrancy is crucial to avoid a cross-chain call being able - * to impersonate anyone by just looping through this with user-defined - * arguments. - * - * Note: if _fxChild calls any other function that does a delegate-call, - * then security could be compromised. - */ - function processMessageFromRoot( - uint256 /* stateId */, - address rootMessageSender, - bytes calldata data - ) external override nonReentrant { - if (!_isCrossChain()) revert NotCrossChainCall(); - - _sender = rootMessageSender; - AddressUpgradeable.functionDelegateCall(address(this), data, "cross-chain execution failed"); - _sender = DEFAULT_SENDER; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol deleted file mode 100644 index f2d8b8b6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/PaymentSplitterUpgradeable.sol +++ /dev/null @@ -1,226 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/utils/SafeERC20Upgradeable.sol"; -import "../utils/AddressUpgradeable.sol"; -import "../utils/ContextUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @title PaymentSplitter - * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware - * that the Ether will be split in this way, since it is handled transparently by the contract. - * - * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each - * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim - * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the - * time of contract deployment and can't be updated thereafter. - * - * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the - * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} - * function. - * - * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and - * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you - * to run tests before sending real value to this contract. - */ -contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { - event PayeeAdded(address account, uint256 shares); - event PaymentReleased(address to, uint256 amount); - event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); - event PaymentReceived(address from, uint256 amount); - - uint256 private _totalShares; - uint256 private _totalReleased; - - mapping(address => uint256) private _shares; - mapping(address => uint256) private _released; - address[] private _payees; - - mapping(IERC20Upgradeable => uint256) private _erc20TotalReleased; - mapping(IERC20Upgradeable => mapping(address => uint256)) private _erc20Released; - - /** - * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at - * the matching position in the `shares` array. - * - * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no - * duplicates in `payees`. - */ - function __PaymentSplitter_init(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { - __PaymentSplitter_init_unchained(payees, shares_); - } - - function __PaymentSplitter_init_unchained(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { - require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); - require(payees.length > 0, "PaymentSplitter: no payees"); - - for (uint256 i = 0; i < payees.length; i++) { - _addPayee(payees[i], shares_[i]); - } - } - - /** - * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully - * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the - * reliability of the events, and not the actual splitting of Ether. - * - * To learn more about this see the Solidity documentation for - * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback - * functions]. - */ - receive() external payable virtual { - emit PaymentReceived(_msgSender(), msg.value); - } - - /** - * @dev Getter for the total shares held by payees. - */ - function totalShares() public view returns (uint256) { - return _totalShares; - } - - /** - * @dev Getter for the total amount of Ether already released. - */ - function totalReleased() public view returns (uint256) { - return _totalReleased; - } - - /** - * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 - * contract. - */ - function totalReleased(IERC20Upgradeable token) public view returns (uint256) { - return _erc20TotalReleased[token]; - } - - /** - * @dev Getter for the amount of shares held by an account. - */ - function shares(address account) public view returns (uint256) { - return _shares[account]; - } - - /** - * @dev Getter for the amount of Ether already released to a payee. - */ - function released(address account) public view returns (uint256) { - return _released[account]; - } - - /** - * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an - * IERC20 contract. - */ - function released(IERC20Upgradeable token, address account) public view returns (uint256) { - return _erc20Released[token][account]; - } - - /** - * @dev Getter for the address of the payee number `index`. - */ - function payee(uint256 index) public view returns (address) { - return _payees[index]; - } - - /** - * @dev Getter for the amount of payee's releasable Ether. - */ - function releasable(address account) public view returns (uint256) { - uint256 totalReceived = address(this).balance + totalReleased(); - return _pendingPayment(account, totalReceived, released(account)); - } - - /** - * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an - * IERC20 contract. - */ - function releasable(IERC20Upgradeable token, address account) public view returns (uint256) { - uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); - return _pendingPayment(account, totalReceived, released(token, account)); - } - - /** - * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the - * total shares and their previous withdrawals. - */ - function release(address payable account) public virtual { - require(_shares[account] > 0, "PaymentSplitter: account has no shares"); - - uint256 payment = releasable(account); - - require(payment != 0, "PaymentSplitter: account is not due payment"); - - // _totalReleased is the sum of all values in _released. - // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. - _totalReleased += payment; - unchecked { - _released[account] += payment; - } - - AddressUpgradeable.sendValue(account, payment); - emit PaymentReleased(account, payment); - } - - /** - * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their - * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 - * contract. - */ - function release(IERC20Upgradeable token, address account) public virtual { - require(_shares[account] > 0, "PaymentSplitter: account has no shares"); - - uint256 payment = releasable(token, account); - - require(payment != 0, "PaymentSplitter: account is not due payment"); - - // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. - // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" - // cannot overflow. - _erc20TotalReleased[token] += payment; - unchecked { - _erc20Released[token][account] += payment; - } - - SafeERC20Upgradeable.safeTransfer(token, account, payment); - emit ERC20PaymentReleased(token, account, payment); - } - - /** - * @dev internal logic for computing the pending payment of an `account` given the token historical balances and - * already released amounts. - */ - function _pendingPayment( - address account, - uint256 totalReceived, - uint256 alreadyReleased - ) private view returns (uint256) { - return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; - } - - /** - * @dev Add a new payee to the contract. - * @param account The address of the payee to add. - * @param shares_ The number of shares owned by the payee. - */ - function _addPayee(address account, uint256 shares_) private { - require(account != address(0), "PaymentSplitter: account is the zero address"); - require(shares_ > 0, "PaymentSplitter: shares are 0"); - require(_shares[account] == 0, "PaymentSplitter: account already has shares"); - - _payees.push(account); - _shares[account] = shares_; - _totalShares = _totalShares + shares_; - emit PayeeAdded(account, shares_); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[43] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc deleted file mode 100644 index b64af312..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/README.adoc +++ /dev/null @@ -1,20 +0,0 @@ -= Finance - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance - -This directory includes primitives for financial systems: - -- {PaymentSplitter} allows to split Ether and ERC20 payments among a group of accounts. The sender does not need to be - aware that the assets will be split in this way, since it is handled transparently by the contract. The split can be - in equal parts or in any other arbitrary proportion. - -- {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can - be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting - schedule. - -== Contracts - -{{PaymentSplitter}} - -{{VestingWallet}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol deleted file mode 100644 index 32854c6e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/finance/VestingWalletUpgradeable.sol +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (finance/VestingWallet.sol) -pragma solidity ^0.8.0; - -import "../token/ERC20/utils/SafeERC20Upgradeable.sol"; -import "../utils/AddressUpgradeable.sol"; -import "../utils/ContextUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @title VestingWallet - * @dev This contract handles the vesting of Eth and ERC20 tokens for a given beneficiary. Custody of multiple tokens - * can be given to this contract, which will release the token to the beneficiary following a given vesting schedule. - * The vesting schedule is customizable through the {vestedAmount} function. - * - * Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning. - * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly) - * be immediately releasable. - * - * @custom:storage-size 52 - */ -contract VestingWalletUpgradeable is Initializable, ContextUpgradeable { - event EtherReleased(uint256 amount); - event ERC20Released(address indexed token, uint256 amount); - - uint256 private _released; - mapping(address => uint256) private _erc20Released; - address private _beneficiary; - uint64 private _start; - uint64 private _duration; - - /** - * @dev Set the beneficiary, start timestamp and vesting duration of the vesting wallet. - */ - function __VestingWallet_init(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) internal onlyInitializing { - __VestingWallet_init_unchained(beneficiaryAddress, startTimestamp, durationSeconds); - } - - function __VestingWallet_init_unchained(address beneficiaryAddress, uint64 startTimestamp, uint64 durationSeconds) internal onlyInitializing { - require(beneficiaryAddress != address(0), "VestingWallet: beneficiary is zero address"); - _beneficiary = beneficiaryAddress; - _start = startTimestamp; - _duration = durationSeconds; - } - - /** - * @dev The contract should be able to receive Eth. - */ - receive() external payable virtual {} - - /** - * @dev Getter for the beneficiary address. - */ - function beneficiary() public view virtual returns (address) { - return _beneficiary; - } - - /** - * @dev Getter for the start timestamp. - */ - function start() public view virtual returns (uint256) { - return _start; - } - - /** - * @dev Getter for the vesting duration. - */ - function duration() public view virtual returns (uint256) { - return _duration; - } - - /** - * @dev Amount of eth already released - */ - function released() public view virtual returns (uint256) { - return _released; - } - - /** - * @dev Amount of token already released - */ - function released(address token) public view virtual returns (uint256) { - return _erc20Released[token]; - } - - /** - * @dev Getter for the amount of releasable eth. - */ - function releasable() public view virtual returns (uint256) { - return vestedAmount(uint64(block.timestamp)) - released(); - } - - /** - * @dev Getter for the amount of releasable `token` tokens. `token` should be the address of an - * IERC20 contract. - */ - function releasable(address token) public view virtual returns (uint256) { - return vestedAmount(token, uint64(block.timestamp)) - released(token); - } - - /** - * @dev Release the native token (ether) that have already vested. - * - * Emits a {EtherReleased} event. - */ - function release() public virtual { - uint256 amount = releasable(); - _released += amount; - emit EtherReleased(amount); - AddressUpgradeable.sendValue(payable(beneficiary()), amount); - } - - /** - * @dev Release the tokens that have already vested. - * - * Emits a {ERC20Released} event. - */ - function release(address token) public virtual { - uint256 amount = releasable(token); - _erc20Released[token] += amount; - emit ERC20Released(token, amount); - SafeERC20Upgradeable.safeTransfer(IERC20Upgradeable(token), beneficiary(), amount); - } - - /** - * @dev Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve. - */ - function vestedAmount(uint64 timestamp) public view virtual returns (uint256) { - return _vestingSchedule(address(this).balance + released(), timestamp); - } - - /** - * @dev Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve. - */ - function vestedAmount(address token, uint64 timestamp) public view virtual returns (uint256) { - return _vestingSchedule(IERC20Upgradeable(token).balanceOf(address(this)) + released(token), timestamp); - } - - /** - * @dev Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for - * an asset given its total historical allocation. - */ - function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) { - if (timestamp < start()) { - return 0; - } else if (timestamp > start() + duration()) { - return totalAllocation; - } else { - return (totalAllocation * (timestamp - start())) / duration(); - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol deleted file mode 100644 index f5af5733..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/GovernorUpgradeable.sol +++ /dev/null @@ -1,736 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.1) (governance/Governor.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/IERC721ReceiverUpgradeable.sol"; -import "../token/ERC1155/IERC1155ReceiverUpgradeable.sol"; -import "../utils/cryptography/ECDSAUpgradeable.sol"; -import "../utils/cryptography/EIP712Upgradeable.sol"; -import "../utils/introspection/ERC165Upgradeable.sol"; -import "../utils/math/SafeCastUpgradeable.sol"; -import "../utils/structs/DoubleEndedQueueUpgradeable.sol"; -import "../utils/AddressUpgradeable.sol"; -import "../utils/ContextUpgradeable.sol"; -import "./IGovernorUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Core of the governance system, designed to be extended though various modules. - * - * This contract is abstract and requires several functions to be implemented in various modules: - * - * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} - * - A voting module must implement {_getVotes} - * - Additionally, {votingPeriod} must also be implemented - * - * _Available since v4.3._ - */ -abstract contract GovernorUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, EIP712Upgradeable, IGovernorUpgradeable, IERC721ReceiverUpgradeable, IERC1155ReceiverUpgradeable { - using DoubleEndedQueueUpgradeable for DoubleEndedQueueUpgradeable.Bytes32Deque; - - bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); - bytes32 public constant EXTENDED_BALLOT_TYPEHASH = - keccak256("ExtendedBallot(uint256 proposalId,uint8 support,string reason,bytes params)"); - - // solhint-disable var-name-mixedcase - struct ProposalCore { - // --- start retyped from Timers.BlockNumber at offset 0x00 --- - uint64 voteStart; - address proposer; - bytes4 __gap_unused0; - // --- start retyped from Timers.BlockNumber at offset 0x20 --- - uint64 voteEnd; - bytes24 __gap_unused1; - // --- Remaining fields starting at offset 0x40 --------------- - bool executed; - bool canceled; - } - // solhint-enable var-name-mixedcase - - string private _name; - - /// @custom:oz-retyped-from mapping(uint256 => Governor.ProposalCore) - mapping(uint256 => ProposalCore) private _proposals; - - // This queue keeps track of the governor operating on itself. Calls to functions protected by the - // {onlyGovernance} modifier needs to be whitelisted in this queue. Whitelisting is set in {_beforeExecute}, - // consumed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the - // execution of {onlyGovernance} protected calls can only be achieved through successful proposals. - DoubleEndedQueueUpgradeable.Bytes32Deque private _governanceCall; - - /** - * @dev Restricts a function so it can only be executed through governance proposals. For example, governance - * parameter setters in {GovernorSettings} are protected using this modifier. - * - * The governance executing address may be different from the Governor's own address, for example it could be a - * timelock. This can be customized by modules by overriding {_executor}. The executor is only able to invoke these - * functions during the execution of the governor's {execute} function, and not under any other circumstances. Thus, - * for example, additional timelock proposers are not able to change governance parameters without going through the - * governance protocol (since v4.6). - */ - modifier onlyGovernance() { - require(_msgSender() == _executor(), "Governor: onlyGovernance"); - if (_executor() != address(this)) { - bytes32 msgDataHash = keccak256(_msgData()); - // loop until popping the expected operation - throw if deque is empty (operation not authorized) - while (_governanceCall.popFront() != msgDataHash) {} - } - _; - } - - /** - * @dev Sets the value for {name} and {version} - */ - function __Governor_init(string memory name_) internal onlyInitializing { - __EIP712_init_unchained(name_, version()); - __Governor_init_unchained(name_); - } - - function __Governor_init_unchained(string memory name_) internal onlyInitializing { - _name = name_; - } - - /** - * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) - */ - receive() external payable virtual { - require(_executor() == address(this), "Governor: must send to executor"); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { - bytes4 governorCancelId = this.cancel.selector ^ this.proposalProposer.selector; - - bytes4 governorParamsId = this.castVoteWithReasonAndParams.selector ^ - this.castVoteWithReasonAndParamsBySig.selector ^ - this.getVotesWithParams.selector; - - // The original interface id in v4.3. - bytes4 governor43Id = type(IGovernorUpgradeable).interfaceId ^ - type(IERC6372Upgradeable).interfaceId ^ - governorCancelId ^ - governorParamsId; - - // An updated interface id in v4.6, with params added. - bytes4 governor46Id = type(IGovernorUpgradeable).interfaceId ^ type(IERC6372Upgradeable).interfaceId ^ governorCancelId; - - // For the updated interface id in v4.9, we use governorCancelId directly. - - return - interfaceId == governor43Id || - interfaceId == governor46Id || - interfaceId == governorCancelId || - interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || - super.supportsInterface(interfaceId); - } - - /** - * @dev See {IGovernor-name}. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev See {IGovernor-version}. - */ - function version() public view virtual override returns (string memory) { - return "1"; - } - - /** - * @dev See {IGovernor-hashProposal}. - * - * The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array - * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id - * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in - * advance, before the proposal is submitted. - * - * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the - * same proposal (with same operation and same description) will have the same id if submitted on multiple governors - * across multiple networks. This also means that in order to execute the same operation twice (on the same - * governor) the proposer will have to change the description in order to avoid proposal id conflicts. - */ - function hashProposal( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public pure virtual override returns (uint256) { - return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); - } - - /** - * @dev See {IGovernor-state}. - */ - function state(uint256 proposalId) public view virtual override returns (ProposalState) { - ProposalCore storage proposal = _proposals[proposalId]; - - if (proposal.executed) { - return ProposalState.Executed; - } - - if (proposal.canceled) { - return ProposalState.Canceled; - } - - uint256 snapshot = proposalSnapshot(proposalId); - - if (snapshot == 0) { - revert("Governor: unknown proposal id"); - } - - uint256 currentTimepoint = clock(); - - if (snapshot >= currentTimepoint) { - return ProposalState.Pending; - } - - uint256 deadline = proposalDeadline(proposalId); - - if (deadline >= currentTimepoint) { - return ProposalState.Active; - } - - if (_quorumReached(proposalId) && _voteSucceeded(proposalId)) { - return ProposalState.Succeeded; - } else { - return ProposalState.Defeated; - } - } - - /** - * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. - */ - function proposalThreshold() public view virtual returns (uint256) { - return 0; - } - - /** - * @dev See {IGovernor-proposalSnapshot}. - */ - function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { - return _proposals[proposalId].voteStart; - } - - /** - * @dev See {IGovernor-proposalDeadline}. - */ - function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { - return _proposals[proposalId].voteEnd; - } - - /** - * @dev Returns the account that created a given proposal. - */ - function proposalProposer(uint256 proposalId) public view virtual override returns (address) { - return _proposals[proposalId].proposer; - } - - /** - * @dev Amount of votes already cast passes the threshold limit. - */ - function _quorumReached(uint256 proposalId) internal view virtual returns (bool); - - /** - * @dev Is the proposal successful or not. - */ - function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); - - /** - * @dev Get the voting weight of `account` at a specific `timepoint`, for a vote as described by `params`. - */ - function _getVotes(address account, uint256 timepoint, bytes memory params) internal view virtual returns (uint256); - - /** - * @dev Register a vote for `proposalId` by `account` with a given `support`, voting `weight` and voting `params`. - * - * Note: Support is generic and can represent various things depending on the voting system used. - */ - function _countVote( - uint256 proposalId, - address account, - uint8 support, - uint256 weight, - bytes memory params - ) internal virtual; - - /** - * @dev Default additional encoded parameters used by castVote methods that don't include them - * - * Note: Should be overridden by specific implementations to use an appropriate value, the - * meaning of the additional params, in the context of that implementation - */ - function _defaultParams() internal view virtual returns (bytes memory) { - return ""; - } - - /** - * @dev See {IGovernor-propose}. This function has opt-in frontrunning protection, described in {_isValidDescriptionForProposer}. - */ - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual override returns (uint256) { - address proposer = _msgSender(); - require(_isValidDescriptionForProposer(proposer, description), "Governor: proposer restricted"); - - uint256 currentTimepoint = clock(); - require( - getVotes(proposer, currentTimepoint - 1) >= proposalThreshold(), - "Governor: proposer votes below proposal threshold" - ); - - uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); - - require(targets.length == values.length, "Governor: invalid proposal length"); - require(targets.length == calldatas.length, "Governor: invalid proposal length"); - require(targets.length > 0, "Governor: empty proposal"); - require(_proposals[proposalId].voteStart == 0, "Governor: proposal already exists"); - - uint256 snapshot = currentTimepoint + votingDelay(); - uint256 deadline = snapshot + votingPeriod(); - - _proposals[proposalId] = ProposalCore({ - proposer: proposer, - voteStart: SafeCastUpgradeable.toUint64(snapshot), - voteEnd: SafeCastUpgradeable.toUint64(deadline), - executed: false, - canceled: false, - __gap_unused0: 0, - __gap_unused1: 0 - }); - - emit ProposalCreated( - proposalId, - proposer, - targets, - values, - new string[](targets.length), - calldatas, - snapshot, - deadline, - description - ); - - return proposalId; - } - - /** - * @dev See {IGovernor-execute}. - */ - function execute( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public payable virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - ProposalState currentState = state(proposalId); - require( - currentState == ProposalState.Succeeded || currentState == ProposalState.Queued, - "Governor: proposal not successful" - ); - _proposals[proposalId].executed = true; - - emit ProposalExecuted(proposalId); - - _beforeExecute(proposalId, targets, values, calldatas, descriptionHash); - _execute(proposalId, targets, values, calldatas, descriptionHash); - _afterExecute(proposalId, targets, values, calldatas, descriptionHash); - - return proposalId; - } - - /** - * @dev See {IGovernor-cancel}. - */ - function cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - require(state(proposalId) == ProposalState.Pending, "Governor: too late to cancel"); - require(_msgSender() == _proposals[proposalId].proposer, "Governor: only proposer can cancel"); - return _cancel(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Internal execution mechanism. Can be overridden to implement different execution mechanism - */ - function _execute( - uint256 /* proposalId */, - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 /*descriptionHash*/ - ) internal virtual { - string memory errorMessage = "Governor: call reverted without message"; - for (uint256 i = 0; i < targets.length; ++i) { - (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); - AddressUpgradeable.verifyCallResult(success, returndata, errorMessage); - } - } - - /** - * @dev Hook before execution is triggered. - */ - function _beforeExecute( - uint256 /* proposalId */, - address[] memory targets, - uint256[] memory /* values */, - bytes[] memory calldatas, - bytes32 /*descriptionHash*/ - ) internal virtual { - if (_executor() != address(this)) { - for (uint256 i = 0; i < targets.length; ++i) { - if (targets[i] == address(this)) { - _governanceCall.pushBack(keccak256(calldatas[i])); - } - } - } - } - - /** - * @dev Hook after execution is triggered. - */ - function _afterExecute( - uint256 /* proposalId */, - address[] memory /* targets */, - uint256[] memory /* values */, - bytes[] memory /* calldatas */, - bytes32 /*descriptionHash*/ - ) internal virtual { - if (_executor() != address(this)) { - if (!_governanceCall.empty()) { - _governanceCall.clear(); - } - } - } - - /** - * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as - * canceled to allow distinguishing it from executed proposals. - * - * Emits a {IGovernor-ProposalCanceled} event. - */ - function _cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) internal virtual returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - ProposalState currentState = state(proposalId); - - require( - currentState != ProposalState.Canceled && - currentState != ProposalState.Expired && - currentState != ProposalState.Executed, - "Governor: proposal not active" - ); - _proposals[proposalId].canceled = true; - - emit ProposalCanceled(proposalId); - - return proposalId; - } - - /** - * @dev See {IGovernor-getVotes}. - */ - function getVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { - return _getVotes(account, timepoint, _defaultParams()); - } - - /** - * @dev See {IGovernor-getVotesWithParams}. - */ - function getVotesWithParams( - address account, - uint256 timepoint, - bytes memory params - ) public view virtual override returns (uint256) { - return _getVotes(account, timepoint, params); - } - - /** - * @dev See {IGovernor-castVote}. - */ - function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { - address voter = _msgSender(); - return _castVote(proposalId, voter, support, ""); - } - - /** - * @dev See {IGovernor-castVoteWithReason}. - */ - function castVoteWithReason( - uint256 proposalId, - uint8 support, - string calldata reason - ) public virtual override returns (uint256) { - address voter = _msgSender(); - return _castVote(proposalId, voter, support, reason); - } - - /** - * @dev See {IGovernor-castVoteWithReasonAndParams}. - */ - function castVoteWithReasonAndParams( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params - ) public virtual override returns (uint256) { - address voter = _msgSender(); - return _castVote(proposalId, voter, support, reason, params); - } - - /** - * @dev See {IGovernor-castVoteBySig}. - */ - function castVoteBySig( - uint256 proposalId, - uint8 support, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override returns (uint256) { - address voter = ECDSAUpgradeable.recover( - _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))), - v, - r, - s - ); - return _castVote(proposalId, voter, support, ""); - } - - /** - * @dev See {IGovernor-castVoteWithReasonAndParamsBySig}. - */ - function castVoteWithReasonAndParamsBySig( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override returns (uint256) { - address voter = ECDSAUpgradeable.recover( - _hashTypedDataV4( - keccak256( - abi.encode( - EXTENDED_BALLOT_TYPEHASH, - proposalId, - support, - keccak256(bytes(reason)), - keccak256(params) - ) - ) - ), - v, - r, - s - ); - - return _castVote(proposalId, voter, support, reason, params); - } - - /** - * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve - * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. Uses the _defaultParams(). - * - * Emits a {IGovernor-VoteCast} event. - */ - function _castVote( - uint256 proposalId, - address account, - uint8 support, - string memory reason - ) internal virtual returns (uint256) { - return _castVote(proposalId, account, support, reason, _defaultParams()); - } - - /** - * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve - * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. - * - * Emits a {IGovernor-VoteCast} event. - */ - function _castVote( - uint256 proposalId, - address account, - uint8 support, - string memory reason, - bytes memory params - ) internal virtual returns (uint256) { - ProposalCore storage proposal = _proposals[proposalId]; - require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active"); - - uint256 weight = _getVotes(account, proposal.voteStart, params); - _countVote(proposalId, account, support, weight, params); - - if (params.length == 0) { - emit VoteCast(account, proposalId, support, weight, reason); - } else { - emit VoteCastWithParams(account, proposalId, support, weight, reason, params); - } - - return weight; - } - - /** - * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor - * is some contract other than the governor itself, like when using a timelock, this function can be invoked - * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. - * Note that if the executor is simply the governor itself, use of `relay` is redundant. - */ - function relay(address target, uint256 value, bytes calldata data) external payable virtual onlyGovernance { - (bool success, bytes memory returndata) = target.call{value: value}(data); - AddressUpgradeable.verifyCallResult(success, returndata, "Governor: relay reverted without message"); - } - - /** - * @dev Address through which the governor executes action. Will be overloaded by module that execute actions - * through another contract such as a timelock. - */ - function _executor() internal view virtual returns (address) { - return address(this); - } - - /** - * @dev See {IERC721Receiver-onERC721Received}. - */ - function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { - return this.onERC721Received.selector; - } - - /** - * @dev See {IERC1155Receiver-onERC1155Received}. - */ - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155Received.selector; - } - - /** - * @dev See {IERC1155Receiver-onERC1155BatchReceived}. - */ - function onERC1155BatchReceived( - address, - address, - uint256[] memory, - uint256[] memory, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155BatchReceived.selector; - } - - /** - * @dev Check if the proposer is authorized to submit a proposal with the given description. - * - * If the proposal description ends with `#proposer=0x???`, where `0x???` is an address written as a hex string - * (case insensitive), then the submission of this proposal will only be authorized to said address. - * - * This is used for frontrunning protection. By adding this pattern at the end of their proposal, one can ensure - * that no other address can submit the same proposal. An attacker would have to either remove or change that part, - * which would result in a different proposal id. - * - * If the description does not match this pattern, it is unrestricted and anyone can submit it. This includes: - * - If the `0x???` part is not a valid hex string. - * - If the `0x???` part is a valid hex string, but does not contain exactly 40 hex digits. - * - If it ends with the expected suffix followed by newlines or other whitespace. - * - If it ends with some other similar suffix, e.g. `#other=abc`. - * - If it does not end with any such suffix. - */ - function _isValidDescriptionForProposer( - address proposer, - string memory description - ) internal view virtual returns (bool) { - uint256 len = bytes(description).length; - - // Length is too short to contain a valid proposer suffix - if (len < 52) { - return true; - } - - // Extract what would be the `#proposer=0x` marker beginning the suffix - bytes12 marker; - assembly { - // - Start of the string contents in memory = description + 32 - // - First character of the marker = len - 52 - // - Length of "#proposer=0x0000000000000000000000000000000000000000" = 52 - // - We read the memory word starting at the first character of the marker: - // - (description + 32) + (len - 52) = description + (len - 20) - // - Note: Solidity will ignore anything past the first 12 bytes - marker := mload(add(description, sub(len, 20))) - } - - // If the marker is not found, there is no proposer suffix to check - if (marker != bytes12("#proposer=0x")) { - return true; - } - - // Parse the 40 characters following the marker as uint160 - uint160 recovered = 0; - for (uint256 i = len - 40; i < len; ++i) { - (bool isHex, uint8 value) = _tryHexToUint(bytes(description)[i]); - // If any of the characters is not a hex digit, ignore the suffix entirely - if (!isHex) { - return true; - } - recovered = (recovered << 4) | value; - } - - return recovered == uint160(proposer); - } - - /** - * @dev Try to parse a character from a string as a hex value. Returns `(true, value)` if the char is in - * `[0-9a-fA-F]` and `(false, 0)` otherwise. Value is guaranteed to be in the range `0 <= value < 16` - */ - function _tryHexToUint(bytes1 char) private pure returns (bool, uint8) { - uint8 c = uint8(char); - unchecked { - // Case 0-9 - if (47 < c && c < 58) { - return (true, c - 48); - } - // Case A-F - else if (64 < c && c < 71) { - return (true, c - 55); - } - // Case a-f - else if (96 < c && c < 103) { - return (true, c - 87); - } - // Else: not a hex char - else { - return (false, 0); - } - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[46] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol deleted file mode 100644 index 7b5485e7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/IGovernorUpgradeable.sol +++ /dev/null @@ -1,326 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/IGovernor.sol) - -pragma solidity ^0.8.0; - -import "../interfaces/IERC165Upgradeable.sol"; -import "../interfaces/IERC6372Upgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Interface of the {Governor} core. - * - * _Available since v4.3._ - */ -abstract contract IGovernorUpgradeable is Initializable, IERC165Upgradeable, IERC6372Upgradeable { - enum ProposalState { - Pending, - Active, - Canceled, - Defeated, - Succeeded, - Queued, - Expired, - Executed - } - - /** - * @dev Emitted when a proposal is created. - */ - event ProposalCreated( - uint256 proposalId, - address proposer, - address[] targets, - uint256[] values, - string[] signatures, - bytes[] calldatas, - uint256 voteStart, - uint256 voteEnd, - string description - ); - - /** - * @dev Emitted when a proposal is canceled. - */ - event ProposalCanceled(uint256 proposalId); - - /** - * @dev Emitted when a proposal is executed. - */ - event ProposalExecuted(uint256 proposalId); - - /** - * @dev Emitted when a vote is cast without params. - * - * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. - */ - event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); - - /** - * @dev Emitted when a vote is cast with params. - * - * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used. - * `params` are additional encoded parameters. Their interpepretation also depends on the voting module used. - */ - event VoteCastWithParams( - address indexed voter, - uint256 proposalId, - uint8 support, - uint256 weight, - string reason, - bytes params - ); - - function __IGovernor_init() internal onlyInitializing { - } - - function __IGovernor_init_unchained() internal onlyInitializing { - } - /** - * @notice module:core - * @dev Name of the governor instance (used in building the ERC712 domain separator). - */ - function name() public view virtual returns (string memory); - - /** - * @notice module:core - * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1" - */ - function version() public view virtual returns (string memory); - - /** - * @notice module:core - * @dev See {IERC6372} - */ - function clock() public view virtual override returns (uint48); - - /** - * @notice module:core - * @dev See EIP-6372. - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory); - - /** - * @notice module:voting - * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to - * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of - * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`. - * - * There are 2 standard keys: `support` and `quorum`. - * - * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`. - * - `quorum=bravo` means that only For votes are counted towards quorum. - * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum. - * - * If a counting module makes use of encoded `params`, it should include this under a `params` key with a unique - * name that describes the behavior. For example: - * - * - `params=fractional` might refer to a scheme where votes are divided fractionally between for/against/abstain. - * - `params=erc721` might refer to a scheme where specific NFTs are delegated to vote. - * - * NOTE: The string can be decoded by the standard - * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`] - * JavaScript class. - */ - // solhint-disable-next-line func-name-mixedcase - function COUNTING_MODE() public view virtual returns (string memory); - - /** - * @notice module:core - * @dev Hashing function used to (re)build the proposal id from the proposal details.. - */ - function hashProposal( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public pure virtual returns (uint256); - - /** - * @notice module:core - * @dev Current state of a proposal, following Compound's convention - */ - function state(uint256 proposalId) public view virtual returns (ProposalState); - - /** - * @notice module:core - * @dev Timepoint used to retrieve user's votes and quorum. If using block number (as per Compound's Comp), the - * snapshot is performed at the end of this block. Hence, voting for this proposal starts at the beginning of the - * following block. - */ - function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256); - - /** - * @notice module:core - * @dev Timepoint at which votes close. If using block number, votes close at the end of this block, so it is - * possible to cast a vote during this block. - */ - function proposalDeadline(uint256 proposalId) public view virtual returns (uint256); - - /** - * @notice module:core - * @dev The account that created a proposal. - */ - function proposalProposer(uint256 proposalId) public view virtual returns (address); - - /** - * @notice module:user-config - * @dev Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends - * on the clock (see EIP-6372) this contract uses. - * - * This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a - * proposal starts. - */ - function votingDelay() public view virtual returns (uint256); - - /** - * @notice module:user-config - * @dev Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock - * (see EIP-6372) this contract uses. - * - * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting - * duration compared to the voting delay. - */ - function votingPeriod() public view virtual returns (uint256); - - /** - * @notice module:user-config - * @dev Minimum number of cast voted required for a proposal to be successful. - * - * NOTE: The `timepoint` parameter corresponds to the snapshot used for counting vote. This allows to scale the - * quorum depending on values such as the totalSupply of a token at this timepoint (see {ERC20Votes}). - */ - function quorum(uint256 timepoint) public view virtual returns (uint256); - - /** - * @notice module:reputation - * @dev Voting power of an `account` at a specific `timepoint`. - * - * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or - * multiple), {ERC20Votes} tokens. - */ - function getVotes(address account, uint256 timepoint) public view virtual returns (uint256); - - /** - * @notice module:reputation - * @dev Voting power of an `account` at a specific `timepoint` given additional encoded parameters. - */ - function getVotesWithParams( - address account, - uint256 timepoint, - bytes memory params - ) public view virtual returns (uint256); - - /** - * @notice module:voting - * @dev Returns whether `account` has cast a vote on `proposalId`. - */ - function hasVoted(uint256 proposalId, address account) public view virtual returns (bool); - - /** - * @dev Create a new proposal. Vote start after a delay specified by {IGovernor-votingDelay} and lasts for a - * duration specified by {IGovernor-votingPeriod}. - * - * Emits a {ProposalCreated} event. - */ - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual returns (uint256 proposalId); - - /** - * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the - * deadline to be reached. - * - * Emits a {ProposalExecuted} event. - * - * Note: some module can modify the requirements for execution, for example by adding an additional timelock. - */ - function execute( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public payable virtual returns (uint256 proposalId); - - /** - * @dev Cancel a proposal. A proposal is cancellable by the proposer, but only while it is Pending state, i.e. - * before the vote starts. - * - * Emits a {ProposalCanceled} event. - */ - function cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual returns (uint256 proposalId); - - /** - * @dev Cast a vote - * - * Emits a {VoteCast} event. - */ - function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote with a reason - * - * Emits a {VoteCast} event. - */ - function castVoteWithReason( - uint256 proposalId, - uint8 support, - string calldata reason - ) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote with a reason and additional encoded parameters - * - * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. - */ - function castVoteWithReasonAndParams( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params - ) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote using the user's cryptographic signature. - * - * Emits a {VoteCast} event. - */ - function castVoteBySig( - uint256 proposalId, - uint8 support, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual returns (uint256 balance); - - /** - * @dev Cast a vote with a reason and additional encoded parameters using the user's cryptographic signature. - * - * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params. - */ - function castVoteWithReasonAndParamsBySig( - uint256 proposalId, - uint8 support, - string calldata reason, - bytes memory params, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual returns (uint256 balance); - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc deleted file mode 100644 index 6d53e973..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/README.adoc +++ /dev/null @@ -1,176 +0,0 @@ -= Governance - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/governance - -This directory includes primitives for on-chain governance. - -== Governor - -This modular system of Governor contracts allows the deployment on-chain voting protocols similar to https://compound.finance/docs/governance[Compound's Governor Alpha & Bravo] and beyond, through the ability to easily customize multiple aspects of the protocol. - -[TIP] -==== -For a guided experience, set up your Governor contract using https://wizard.openzeppelin.com/#governor[Contracts Wizard]. - -For a written walkthrough, check out our guide on xref:ROOT:governance.adoc[How to set up on-chain governance]. -==== - -* {Governor}: The core contract that contains all the logic and primitives. It is abstract and requires choosing one of each of the modules below, or custom ones. - -Votes modules determine the source of voting power, and sometimes quorum number. - -* {GovernorVotes}: Extracts voting weight from an {ERC20Votes}, or since v4.5 an {ERC721Votes} token. - -* {GovernorVotesComp}: Extracts voting weight from a COMP-like or {ERC20VotesComp} token. - -* {GovernorVotesQuorumFraction}: Combines with `GovernorVotes` to set the quorum as a fraction of the total token supply. - -Counting modules determine valid voting options. - -* {GovernorCountingSimple}: Simple voting mechanism with 3 voting options: Against, For and Abstain. - -Timelock extensions add a delay for governance decisions to be executed. The workflow is extended to require a `queue` step before execution. With these modules, proposals are executed by the external timelock contract, thus it is the timelock that has to hold the assets that are being governed. - -* {GovernorTimelockControl}: Connects with an instance of {TimelockController}. Allows multiple proposers and executors, in addition to the Governor itself. - -* {GovernorTimelockCompound}: Connects with an instance of Compound's https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[`Timelock`] contract. - -Other extensions can customize the behavior or interface in multiple ways. - -* {GovernorCompatibilityBravo}: Extends the interface to be fully `GovernorBravo`-compatible. Note that events are compatible regardless of whether this extension is included or not. - -* {GovernorSettings}: Manages some of the settings (voting delay, voting period duration, and proposal threshold) in a way that can be updated through a governance proposal, without requiring an upgrade. - -* {GovernorPreventLateQuorum}: Ensures there is a minimum voting period after quorum is reached as a security protection against large voters. - -In addition to modules and extensions, the core contract requires a few virtual functions to be implemented to your particular specifications: - -* <>: Delay (in EIP-6372 clock) since the proposal is submitted until voting power is fixed and voting starts. This can be used to enforce a delay after a proposal is published for users to buy tokens, or delegate their votes. -* <>: Delay (in EIP-6372 clock) since the proposal starts until voting ends. -* <>: Quorum required for a proposal to be successful. This function includes a `timepoint` argument (see EIP-6372) so the quorum can adapt through time, for example, to follow a token's `totalSupply`. - -NOTE: Functions of the `Governor` contract do not include access control. If you want to restrict access, you should add these checks by overloading the particular functions. Among these, {Governor-_cancel} is internal by default, and you will have to expose it (with the right access control mechanism) yourself if this function is needed. - -=== Core - -{{IGovernor}} - -{{Governor}} - -=== Modules - -{{GovernorCountingSimple}} - -{{GovernorVotes}} - -{{GovernorVotesQuorumFraction}} - -{{GovernorVotesComp}} - -=== Extensions - -{{GovernorTimelockControl}} - -{{GovernorTimelockCompound}} - -{{GovernorSettings}} - -{{GovernorPreventLateQuorum}} - -{{GovernorCompatibilityBravo}} - -=== Deprecated - -{{GovernorProposalThreshold}} - -== Utils - -{{Votes}} - -== Timelock - -In a governance system, the {TimelockController} contract is in charge of introducing a delay between a proposal and its execution. It can be used with or without a {Governor}. - -{{TimelockController}} - -[[timelock-terminology]] -==== Terminology - -* *Operation:* A transaction (or a set of transactions) that is the subject of the timelock. It has to be scheduled by a proposer and executed by an executor. The timelock enforces a minimum delay between the proposition and the execution (see xref:access-control.adoc#operation_lifecycle[operation lifecycle]). If the operation contains multiple transactions (batch mode), they are executed atomically. Operations are identified by the hash of their content. -* *Operation status:* -** *Unset:* An operation that is not part of the timelock mechanism. -** *Pending:* An operation that has been scheduled, before the timer expires. -** *Ready:* An operation that has been scheduled, after the timer expires. -** *Done:* An operation that has been executed. -* *Predecessor*: An (optional) dependency between operations. An operation can depend on another operation (its predecessor), forcing the execution order of these two operations. -* *Role*: -** *Admin:* An address (smart contract or EOA) that is in charge of granting the roles of Proposer and Executor. -** *Proposer:* An address (smart contract or EOA) that is in charge of scheduling (and cancelling) operations. -** *Executor:* An address (smart contract or EOA) that is in charge of executing operations once the timelock has expired. This role can be given to the zero address to allow anyone to execute operations. - -[[timelock-operation]] -==== Operation structure - -Operation executed by the xref:api:governance.adoc#TimelockController[`TimelockController`] can contain one or multiple subsequent calls. Depending on whether you need to multiple calls to be executed atomically, you can either use simple or batched operations. - -Both operations contain: - -* *Target*, the address of the smart contract that the timelock should operate on. -* *Value*, in wei, that should be sent with the transaction. Most of the time this will be 0. Ether can be deposited before-end or passed along when executing the transaction. -* *Data*, containing the encoded function selector and parameters of the call. This can be produced using a number of tools. For example, a maintenance operation granting role `ROLE` to `ACCOUNT` can be encoded using web3js as follows: - -```javascript -const data = timelock.contract.methods.grantRole(ROLE, ACCOUNT).encodeABI() -``` - -* *Predecessor*, that specifies a dependency between operations. This dependency is optional. Use `bytes32(0)` if the operation does not have any dependency. -* *Salt*, used to disambiguate two otherwise identical operations. This can be any random value. - -In the case of batched operations, `target`, `value` and `data` are specified as arrays, which must be of the same length. - -[[timelock-operation-lifecycle]] -==== Operation lifecycle - -Timelocked operations are identified by a unique id (their hash) and follow a specific lifecycle: - -`Unset` -> `Pending` -> `Pending` + `Ready` -> `Done` - -* By calling xref:api:governance.adoc#TimelockController-schedule-address-uint256-bytes-bytes32-bytes32-uint256-[`schedule`] (or xref:api:governance.adoc#TimelockController-scheduleBatch-address---uint256---bytes---bytes32-bytes32-uint256-[`scheduleBatch`]), a proposer moves the operation from the `Unset` to the `Pending` state. This starts a timer that must be longer than the minimum delay. The timer expires at a timestamp accessible through the xref:api:governance.adoc#TimelockController-getTimestamp-bytes32-[`getTimestamp`] method. -* Once the timer expires, the operation automatically gets the `Ready` state. At this point, it can be executed. -* By calling xref:api:governance.adoc#TimelockController-TimelockController-execute-address-uint256-bytes-bytes32-bytes32-[`execute`] (or xref:api:governance.adoc#TimelockController-executeBatch-address---uint256---bytes---bytes32-bytes32-[`executeBatch`]), an executor triggers the operation's underlying transactions and moves it to the `Done` state. If the operation has a predecessor, it has to be in the `Done` state for this transition to succeed. -* xref:api:governance.adoc#TimelockController-TimelockController-cancel-bytes32-[`cancel`] allows proposers to cancel any `Pending` operation. This resets the operation to the `Unset` state. It is thus possible for a proposer to re-schedule an operation that has been cancelled. In this case, the timer restarts when the operation is re-scheduled. - -Operations status can be queried using the functions: - -* xref:api:governance.adoc#TimelockController-isOperationPending-bytes32-[`isOperationPending(bytes32)`] -* xref:api:governance.adoc#TimelockController-isOperationReady-bytes32-[`isOperationReady(bytes32)`] -* xref:api:governance.adoc#TimelockController-isOperationDone-bytes32-[`isOperationDone(bytes32)`] - -[[timelock-roles]] -==== Roles - -[[timelock-admin]] -===== Admin - -The admins are in charge of managing proposers and executors. For the timelock to be self-governed, this role should only be given to the timelock itself. Upon deployment, the admin role can be granted to any address (in addition to the timelock itself). After further configuration and testing, this optional admin should renounce its role such that all further maintenance operations have to go through the timelock process. - -This role is identified by the *TIMELOCK_ADMIN_ROLE* value: `0x5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5` - -[[timelock-proposer]] -===== Proposer - -The proposers are in charge of scheduling (and cancelling) operations. This is a critical role, that should be given to governing entities. This could be an EOA, a multisig, or a DAO. - -WARNING: *Proposer fight:* Having multiple proposers, while providing redundancy in case one becomes unavailable, can be dangerous. As proposer have their say on all operations, they could cancel operations they disagree with, including operations to remove them for the proposers. - -This role is identified by the *PROPOSER_ROLE* value: `0xb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1` - -[[timelock-executor]] -===== Executor - -The executors are in charge of executing the operations scheduled by the proposers once the timelock expires. Logic dictates that multisig or DAO that are proposers should also be executors in order to guarantee operations that have been scheduled will eventually be executed. However, having additional executors can reduce the cost (the executing transaction does not require validation by the multisig or DAO that proposed it), while ensuring whoever is in charge of execution cannot trigger actions that have not been scheduled by the proposers. Alternatively, it is possible to allow _any_ address to execute a proposal once the timelock has expired by granting the executor role to the zero address. - -This role is identified by the *EXECUTOR_ROLE* value: `0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63` - -WARNING: A live contract without at least one proposer and one executor is locked. Make sure these roles are filled by reliable entities before the deployer renounces its administrative rights in favour of the timelock contract itself. See the {AccessControl} documentation to learn more about role management. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol deleted file mode 100644 index c24ddf52..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerWith46MigrationUpgradeable.sol +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.6.0 (governance/TimelockControllerWith46Migration.sol) - -pragma solidity ^0.8.0; - -import "./TimelockControllerUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of the TimelockController that includes an additional - * function to migrate from OpenZeppelin Upgradeable Contracts <4.6 to >=4.6. - * - * This migration is necessary to setup administration rights over the new - * `CANCELLER_ROLE`. - * - * The migration is trustless and can be performed by anyone. - * - * _Available since v4.6._ - */ -contract TimelockControllerWith46MigrationUpgradeable is Initializable, TimelockControllerUpgradeable { - function __TimelockControllerWith46Migration_init( - uint256 minDelay, - address[] memory proposers, - address[] memory executors, - address admin - ) internal onlyInitializing { - __TimelockController_init_unchained(minDelay, proposers, executors, admin); - } - - function __TimelockControllerWith46Migration_init_unchained( - uint256, - address[] memory, - address[] memory, - address - ) internal onlyInitializing {} - - /** - * @dev Migration function. Running it is necessary for upgradeable - * instances that were initially setup with code <4.6 and that upgraded - * to >=4.6. - */ - function migrateTo46() public virtual { - require( - getRoleAdmin(PROPOSER_ROLE) == TIMELOCK_ADMIN_ROLE && getRoleAdmin(CANCELLER_ROLE) == DEFAULT_ADMIN_ROLE, - "TimelockController: already migrated" - ); - _setRoleAdmin(CANCELLER_ROLE, TIMELOCK_ADMIN_ROLE); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol deleted file mode 100644 index 09e9e820..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol +++ /dev/null @@ -1,346 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/GovernorCompatibilityBravo.sol) - -pragma solidity ^0.8.0; - -import "../../utils/math/SafeCastUpgradeable.sol"; -import "../extensions/IGovernorTimelockUpgradeable.sol"; -import "../GovernorUpgradeable.sol"; -import "./IGovernorCompatibilityBravoUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Compatibility layer that implements GovernorBravo compatibility on top of {Governor}. - * - * This compatibility layer includes a voting system and requires a {IGovernorTimelock} compatible module to be added - * through inheritance. It does not include token bindings, nor does it include any variable upgrade patterns. - * - * NOTE: When using this module, you may need to enable the Solidity optimizer to avoid hitting the contract size limit. - * - * _Available since v4.3._ - */ -abstract contract GovernorCompatibilityBravoUpgradeable is Initializable, IGovernorTimelockUpgradeable, IGovernorCompatibilityBravoUpgradeable, GovernorUpgradeable { - enum VoteType { - Against, - For, - Abstain - } - - struct ProposalDetails { - address proposer; - address[] targets; - uint256[] values; - string[] signatures; - bytes[] calldatas; - uint256 forVotes; - uint256 againstVotes; - uint256 abstainVotes; - mapping(address => Receipt) receipts; - bytes32 descriptionHash; - } - - mapping(uint256 => ProposalDetails) private _proposalDetails; - - function __GovernorCompatibilityBravo_init() internal onlyInitializing { - } - - function __GovernorCompatibilityBravo_init_unchained() internal onlyInitializing { - } - // solhint-disable-next-line func-name-mixedcase - function COUNTING_MODE() public pure virtual override returns (string memory) { - return "support=bravo&quorum=bravo"; - } - - // ============================================== Proposal lifecycle ============================================== - /** - * @dev See {IGovernor-propose}. - */ - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (uint256) { - // Stores the proposal details (if not already present) and executes the propose logic from the core. - _storeProposal(_msgSender(), targets, values, new string[](calldatas.length), calldatas, description); - return super.propose(targets, values, calldatas, description); - } - - /** - * @dev See {IGovernorCompatibilityBravo-propose}. - */ - function propose( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas, - string memory description - ) public virtual override returns (uint256) { - require(signatures.length == calldatas.length, "GovernorBravo: invalid signatures length"); - // Stores the full proposal and fallback to the public (possibly overridden) propose. The fallback is done - // after the full proposal is stored, so the store operation included in the fallback will be skipped. Here we - // call `propose` and not `super.propose` to make sure if a child contract override `propose`, whatever code - // is added there is also executed when calling this alternative interface. - _storeProposal(_msgSender(), targets, values, signatures, calldatas, description); - return propose(targets, values, _encodeCalldata(signatures, calldatas), description); - } - - /** - * @dev See {IGovernorCompatibilityBravo-queue}. - */ - function queue(uint256 proposalId) public virtual override { - ( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) = _getProposalParameters(proposalId); - - queue(targets, values, calldatas, descriptionHash); - } - - /** - * @dev See {IGovernorCompatibilityBravo-execute}. - */ - function execute(uint256 proposalId) public payable virtual override { - ( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) = _getProposalParameters(proposalId); - - execute(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Cancel a proposal with GovernorBravo logic. - */ - function cancel(uint256 proposalId) public virtual override { - ( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) = _getProposalParameters(proposalId); - - cancel(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Cancel a proposal with GovernorBravo logic. At any moment a proposal can be cancelled, either by the - * proposer, or by third parties if the proposer's voting power has dropped below the proposal threshold. - */ - function cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - address proposer = _proposalDetails[proposalId].proposer; - - require( - _msgSender() == proposer || getVotes(proposer, clock() - 1) < proposalThreshold(), - "GovernorBravo: proposer above threshold" - ); - - return _cancel(targets, values, calldatas, descriptionHash); - } - - /** - * @dev Encodes calldatas with optional function signature. - */ - function _encodeCalldata( - string[] memory signatures, - bytes[] memory calldatas - ) private pure returns (bytes[] memory) { - bytes[] memory fullcalldatas = new bytes[](calldatas.length); - for (uint256 i = 0; i < fullcalldatas.length; ++i) { - fullcalldatas[i] = bytes(signatures[i]).length == 0 - ? calldatas[i] - : abi.encodePacked(bytes4(keccak256(bytes(signatures[i]))), calldatas[i]); - } - - return fullcalldatas; - } - - /** - * @dev Retrieve proposal parameters by id, with fully encoded calldatas. - */ - function _getProposalParameters( - uint256 proposalId - ) - private - view - returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash) - { - ProposalDetails storage details = _proposalDetails[proposalId]; - return ( - details.targets, - details.values, - _encodeCalldata(details.signatures, details.calldatas), - details.descriptionHash - ); - } - - /** - * @dev Store proposal metadata (if not already present) for later lookup. - */ - function _storeProposal( - address proposer, - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas, - string memory description - ) private { - bytes32 descriptionHash = keccak256(bytes(description)); - uint256 proposalId = hashProposal(targets, values, _encodeCalldata(signatures, calldatas), descriptionHash); - - ProposalDetails storage details = _proposalDetails[proposalId]; - if (details.descriptionHash == bytes32(0)) { - details.proposer = proposer; - details.targets = targets; - details.values = values; - details.signatures = signatures; - details.calldatas = calldatas; - details.descriptionHash = descriptionHash; - } - } - - // ==================================================== Views ===================================================== - /** - * @dev See {IGovernorCompatibilityBravo-proposals}. - */ - function proposals( - uint256 proposalId - ) - public - view - virtual - override - returns ( - uint256 id, - address proposer, - uint256 eta, - uint256 startBlock, - uint256 endBlock, - uint256 forVotes, - uint256 againstVotes, - uint256 abstainVotes, - bool canceled, - bool executed - ) - { - id = proposalId; - eta = proposalEta(proposalId); - startBlock = proposalSnapshot(proposalId); - endBlock = proposalDeadline(proposalId); - - ProposalDetails storage details = _proposalDetails[proposalId]; - proposer = details.proposer; - forVotes = details.forVotes; - againstVotes = details.againstVotes; - abstainVotes = details.abstainVotes; - - ProposalState currentState = state(proposalId); - canceled = currentState == ProposalState.Canceled; - executed = currentState == ProposalState.Executed; - } - - /** - * @dev See {IGovernorCompatibilityBravo-getActions}. - */ - function getActions( - uint256 proposalId - ) - public - view - virtual - override - returns ( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas - ) - { - ProposalDetails storage details = _proposalDetails[proposalId]; - return (details.targets, details.values, details.signatures, details.calldatas); - } - - /** - * @dev See {IGovernorCompatibilityBravo-getReceipt}. - */ - function getReceipt(uint256 proposalId, address voter) public view virtual override returns (Receipt memory) { - return _proposalDetails[proposalId].receipts[voter]; - } - - /** - * @dev See {IGovernorCompatibilityBravo-quorumVotes}. - */ - function quorumVotes() public view virtual override returns (uint256) { - return quorum(clock() - 1); - } - - // ==================================================== Voting ==================================================== - /** - * @dev See {IGovernor-hasVoted}. - */ - function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { - return _proposalDetails[proposalId].receipts[account].hasVoted; - } - - /** - * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum. - */ - function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { - ProposalDetails storage details = _proposalDetails[proposalId]; - return quorum(proposalSnapshot(proposalId)) <= details.forVotes; - } - - /** - * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. - */ - function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { - ProposalDetails storage details = _proposalDetails[proposalId]; - return details.forVotes > details.againstVotes; - } - - /** - * @dev See {Governor-_countVote}. In this module, the support follows Governor Bravo. - */ - function _countVote( - uint256 proposalId, - address account, - uint8 support, - uint256 weight, - bytes memory // params - ) internal virtual override { - ProposalDetails storage details = _proposalDetails[proposalId]; - Receipt storage receipt = details.receipts[account]; - - require(!receipt.hasVoted, "GovernorCompatibilityBravo: vote already cast"); - receipt.hasVoted = true; - receipt.support = support; - receipt.votes = SafeCastUpgradeable.toUint96(weight); - - if (support == uint8(VoteType.Against)) { - details.againstVotes += weight; - } else if (support == uint8(VoteType.For)) { - details.forVotes += weight; - } else if (support == uint8(VoteType.Abstain)) { - details.abstainVotes += weight; - } else { - revert("GovernorCompatibilityBravo: invalid vote type"); - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol deleted file mode 100644 index e2c309e2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/compatibility/IGovernorCompatibilityBravoUpgradeable.sol +++ /dev/null @@ -1,131 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/compatibility/IGovernorCompatibilityBravo.sol) - -pragma solidity ^0.8.0; - -import "../IGovernorUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility. - * - * _Available since v4.3._ - */ -abstract contract IGovernorCompatibilityBravoUpgradeable is Initializable, IGovernorUpgradeable { - /** - * @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as - * {{proposal}} returns a very different structure. - */ - struct Proposal { - uint256 id; - address proposer; - uint256 eta; - address[] targets; - uint256[] values; - string[] signatures; - bytes[] calldatas; - uint256 startBlock; - uint256 endBlock; - uint256 forVotes; - uint256 againstVotes; - uint256 abstainVotes; - bool canceled; - bool executed; - mapping(address => Receipt) receipts; - } - - /** - * @dev Receipt structure from Compound Governor Bravo - */ - struct Receipt { - bool hasVoted; - uint8 support; - uint96 votes; - } - - function __IGovernorCompatibilityBravo_init() internal onlyInitializing { - } - - function __IGovernorCompatibilityBravo_init_unchained() internal onlyInitializing { - } - /** - * @dev Part of the Governor Bravo's interface. - */ - function quorumVotes() public view virtual returns (uint256); - - /** - * @dev Part of the Governor Bravo's interface: _"The official record of all proposals ever proposed"_. - */ - function proposals( - uint256 - ) - public - view - virtual - returns ( - uint256 id, - address proposer, - uint256 eta, - uint256 startBlock, - uint256 endBlock, - uint256 forVotes, - uint256 againstVotes, - uint256 abstainVotes, - bool canceled, - bool executed - ); - - /** - * @dev Part of the Governor Bravo's interface: _"Function used to propose a new proposal"_. - */ - function propose( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas, - string memory description - ) public virtual returns (uint256); - - /** - * @dev Part of the Governor Bravo's interface: _"Queues a proposal of state succeeded"_. - */ - function queue(uint256 proposalId) public virtual; - - /** - * @dev Part of the Governor Bravo's interface: _"Executes a queued proposal if eta has passed"_. - */ - function execute(uint256 proposalId) public payable virtual; - - /** - * @dev Cancels a proposal only if the sender is the proposer or the proposer delegates' voting power dropped below the proposal threshold. - */ - function cancel(uint256 proposalId) public virtual; - - /** - * @dev Part of the Governor Bravo's interface: _"Gets actions of a proposal"_. - */ - function getActions( - uint256 proposalId - ) - public - view - virtual - returns ( - address[] memory targets, - uint256[] memory values, - string[] memory signatures, - bytes[] memory calldatas - ); - - /** - * @dev Part of the Governor Bravo's interface: _"Gets the receipt for a voter on a given proposal"_. - */ - function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory); - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol deleted file mode 100644 index 6a7f58e9..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorCountingSimpleUpgradeable.sol +++ /dev/null @@ -1,113 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorCountingSimple.sol) - -pragma solidity ^0.8.0; - -import "../GovernorUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} for simple, 3 options, vote counting. - * - * _Available since v4.3._ - */ -abstract contract GovernorCountingSimpleUpgradeable is Initializable, GovernorUpgradeable { - /** - * @dev Supported vote types. Matches Governor Bravo ordering. - */ - enum VoteType { - Against, - For, - Abstain - } - - struct ProposalVote { - uint256 againstVotes; - uint256 forVotes; - uint256 abstainVotes; - mapping(address => bool) hasVoted; - } - - mapping(uint256 => ProposalVote) private _proposalVotes; - - function __GovernorCountingSimple_init() internal onlyInitializing { - } - - function __GovernorCountingSimple_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IGovernor-COUNTING_MODE}. - */ - // solhint-disable-next-line func-name-mixedcase - function COUNTING_MODE() public pure virtual override returns (string memory) { - return "support=bravo&quorum=for,abstain"; - } - - /** - * @dev See {IGovernor-hasVoted}. - */ - function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { - return _proposalVotes[proposalId].hasVoted[account]; - } - - /** - * @dev Accessor to the internal vote counts. - */ - function proposalVotes( - uint256 proposalId - ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { - ProposalVote storage proposalVote = _proposalVotes[proposalId]; - return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); - } - - /** - * @dev See {Governor-_quorumReached}. - */ - function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { - ProposalVote storage proposalVote = _proposalVotes[proposalId]; - - return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes; - } - - /** - * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. - */ - function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { - ProposalVote storage proposalVote = _proposalVotes[proposalId]; - - return proposalVote.forVotes > proposalVote.againstVotes; - } - - /** - * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo). - */ - function _countVote( - uint256 proposalId, - address account, - uint8 support, - uint256 weight, - bytes memory // params - ) internal virtual override { - ProposalVote storage proposalVote = _proposalVotes[proposalId]; - - require(!proposalVote.hasVoted[account], "GovernorVotingSimple: vote already cast"); - proposalVote.hasVoted[account] = true; - - if (support == uint8(VoteType.Against)) { - proposalVote.againstVotes += weight; - } else if (support == uint8(VoteType.For)) { - proposalVote.forVotes += weight; - } else if (support == uint8(VoteType.Abstain)) { - proposalVote.abstainVotes += weight; - } else { - revert("GovernorVotingSimple: invalid value for enum VoteType"); - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol deleted file mode 100644 index 6b266cda..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorProposalThresholdUpgradeable.sol +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorProposalThreshold.sol) - -pragma solidity ^0.8.0; - -import "../GovernorUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance. - * - * _Available since v4.3._ - * _Deprecated since v4.4._ - */ -abstract contract GovernorProposalThresholdUpgradeable is Initializable, GovernorUpgradeable { - function __GovernorProposalThreshold_init() internal onlyInitializing { - } - - function __GovernorProposalThreshold_init_unchained() internal onlyInitializing { - } - function propose( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - string memory description - ) public virtual override returns (uint256) { - return super.propose(targets, values, calldatas, description); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol deleted file mode 100644 index 6d95992a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorSettingsUpgradeable.sol +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorSettings.sol) - -pragma solidity ^0.8.0; - -import "../GovernorUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} for settings updatable through governance. - * - * _Available since v4.4._ - */ -abstract contract GovernorSettingsUpgradeable is Initializable, GovernorUpgradeable { - uint256 private _votingDelay; - uint256 private _votingPeriod; - uint256 private _proposalThreshold; - - event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay); - event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod); - event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold); - - /** - * @dev Initialize the governance parameters. - */ - function __GovernorSettings_init(uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold) internal onlyInitializing { - __GovernorSettings_init_unchained(initialVotingDelay, initialVotingPeriod, initialProposalThreshold); - } - - function __GovernorSettings_init_unchained(uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold) internal onlyInitializing { - _setVotingDelay(initialVotingDelay); - _setVotingPeriod(initialVotingPeriod); - _setProposalThreshold(initialProposalThreshold); - } - - /** - * @dev See {IGovernor-votingDelay}. - */ - function votingDelay() public view virtual override returns (uint256) { - return _votingDelay; - } - - /** - * @dev See {IGovernor-votingPeriod}. - */ - function votingPeriod() public view virtual override returns (uint256) { - return _votingPeriod; - } - - /** - * @dev See {Governor-proposalThreshold}. - */ - function proposalThreshold() public view virtual override returns (uint256) { - return _proposalThreshold; - } - - /** - * @dev Update the voting delay. This operation can only be performed through a governance proposal. - * - * Emits a {VotingDelaySet} event. - */ - function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance { - _setVotingDelay(newVotingDelay); - } - - /** - * @dev Update the voting period. This operation can only be performed through a governance proposal. - * - * Emits a {VotingPeriodSet} event. - */ - function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance { - _setVotingPeriod(newVotingPeriod); - } - - /** - * @dev Update the proposal threshold. This operation can only be performed through a governance proposal. - * - * Emits a {ProposalThresholdSet} event. - */ - function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance { - _setProposalThreshold(newProposalThreshold); - } - - /** - * @dev Internal setter for the voting delay. - * - * Emits a {VotingDelaySet} event. - */ - function _setVotingDelay(uint256 newVotingDelay) internal virtual { - emit VotingDelaySet(_votingDelay, newVotingDelay); - _votingDelay = newVotingDelay; - } - - /** - * @dev Internal setter for the voting period. - * - * Emits a {VotingPeriodSet} event. - */ - function _setVotingPeriod(uint256 newVotingPeriod) internal virtual { - // voting period must be at least one block long - require(newVotingPeriod > 0, "GovernorSettings: voting period too low"); - emit VotingPeriodSet(_votingPeriod, newVotingPeriod); - _votingPeriod = newVotingPeriod; - } - - /** - * @dev Internal setter for the proposal threshold. - * - * Emits a {ProposalThresholdSet} event. - */ - function _setProposalThreshold(uint256 newProposalThreshold) internal virtual { - emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold); - _proposalThreshold = newProposalThreshold; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[47] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol deleted file mode 100644 index 0032b66a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockCompoundUpgradeable.sol +++ /dev/null @@ -1,202 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockCompound.sol) - -pragma solidity ^0.8.0; - -import "./IGovernorTimelockUpgradeable.sol"; -import "../GovernorUpgradeable.sol"; -import "../../utils/math/SafeCastUpgradeable.sol"; -import "../../vendor/compound/ICompoundTimelockUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by - * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be - * the admin of the timelock for any operation to be performed. A public, unrestricted, - * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock. - * - * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, - * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be - * inaccessible. - * - * _Available since v4.3._ - */ -abstract contract GovernorTimelockCompoundUpgradeable is Initializable, IGovernorTimelockUpgradeable, GovernorUpgradeable { - ICompoundTimelockUpgradeable private _timelock; - - /// @custom:oz-retyped-from mapping(uint256 => GovernorTimelockCompound.ProposalTimelock) - mapping(uint256 => uint64) private _proposalTimelocks; - - /** - * @dev Emitted when the timelock controller used for proposal execution is modified. - */ - event TimelockChange(address oldTimelock, address newTimelock); - - /** - * @dev Set the timelock. - */ - function __GovernorTimelockCompound_init(ICompoundTimelockUpgradeable timelockAddress) internal onlyInitializing { - __GovernorTimelockCompound_init_unchained(timelockAddress); - } - - function __GovernorTimelockCompound_init_unchained(ICompoundTimelockUpgradeable timelockAddress) internal onlyInitializing { - _updateTimelock(timelockAddress); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, GovernorUpgradeable) returns (bool) { - return interfaceId == type(IGovernorTimelockUpgradeable).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev Overridden version of the {Governor-state} function with added support for the `Queued` and `Expired` state. - */ - function state(uint256 proposalId) public view virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (ProposalState) { - ProposalState currentState = super.state(proposalId); - - if (currentState != ProposalState.Succeeded) { - return currentState; - } - - uint256 eta = proposalEta(proposalId); - if (eta == 0) { - return currentState; - } else if (block.timestamp >= eta + _timelock.GRACE_PERIOD()) { - return ProposalState.Expired; - } else { - return ProposalState.Queued; - } - } - - /** - * @dev Public accessor to check the address of the timelock - */ - function timelock() public view virtual override returns (address) { - return address(_timelock); - } - - /** - * @dev Public accessor to check the eta of a queued proposal - */ - function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { - return _proposalTimelocks[proposalId]; - } - - /** - * @dev Function to queue a proposal to the timelock. - */ - function queue( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); - - uint256 eta = block.timestamp + _timelock.delay(); - _proposalTimelocks[proposalId] = SafeCastUpgradeable.toUint64(eta); - - for (uint256 i = 0; i < targets.length; ++i) { - require( - !_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], eta))), - "GovernorTimelockCompound: identical proposal action already queued" - ); - _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], eta); - } - - emit ProposalQueued(proposalId, eta); - - return proposalId; - } - - /** - * @dev Overridden execute function that run the already queued proposal through the timelock. - */ - function _execute( - uint256 proposalId, - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 /*descriptionHash*/ - ) internal virtual override { - uint256 eta = proposalEta(proposalId); - require(eta > 0, "GovernorTimelockCompound: proposal not yet queued"); - AddressUpgradeable.sendValue(payable(_timelock), msg.value); - for (uint256 i = 0; i < targets.length; ++i) { - _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta); - } - } - - /** - * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already - * been queued. - */ - function _cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) internal virtual override returns (uint256) { - uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); - - uint256 eta = proposalEta(proposalId); - if (eta > 0) { - // update state first - delete _proposalTimelocks[proposalId]; - // do external call later - for (uint256 i = 0; i < targets.length; ++i) { - _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], eta); - } - } - - return proposalId; - } - - /** - * @dev Address through which the governor executes action. In this case, the timelock. - */ - function _executor() internal view virtual override returns (address) { - return address(_timelock); - } - - /** - * @dev Accept admin right over the timelock. - */ - // solhint-disable-next-line private-vars-leading-underscore - function __acceptAdmin() public { - _timelock.acceptAdmin(); - } - - /** - * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates - * must be proposed, scheduled, and executed through governance proposals. - * - * For security reasons, the timelock must be handed over to another admin before setting up a new one. The two - * operations (hand over the timelock) and do the update can be batched in a single proposal. - * - * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the - * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of - * governance. - - * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. - */ - function updateTimelock(ICompoundTimelockUpgradeable newTimelock) external virtual onlyGovernance { - _updateTimelock(newTimelock); - } - - function _updateTimelock(ICompoundTimelockUpgradeable newTimelock) private { - emit TimelockChange(address(_timelock), address(newTimelock)); - _timelock = newTimelock; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol deleted file mode 100644 index 2112d19e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorTimelockControlUpgradeable.sol +++ /dev/null @@ -1,178 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorTimelockControl.sol) - -pragma solidity ^0.8.0; - -import "./IGovernorTimelockUpgradeable.sol"; -import "../GovernorUpgradeable.sol"; -import "../TimelockControllerUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a - * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The - * {Governor} needs the proposer (and ideally the executor) roles for the {Governor} to work properly. - * - * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, - * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be - * inaccessible. - * - * WARNING: Setting up the TimelockController to have additional proposers besides the governor is very risky, as it - * grants them powers that they must be trusted or known not to use: 1) {onlyGovernance} functions like {relay} are - * available to them through the timelock, and 2) approved governance proposals can be blocked by them, effectively - * executing a Denial of Service attack. This risk will be mitigated in a future release. - * - * _Available since v4.3._ - */ -abstract contract GovernorTimelockControlUpgradeable is Initializable, IGovernorTimelockUpgradeable, GovernorUpgradeable { - TimelockControllerUpgradeable private _timelock; - mapping(uint256 => bytes32) private _timelockIds; - - /** - * @dev Emitted when the timelock controller used for proposal execution is modified. - */ - event TimelockChange(address oldTimelock, address newTimelock); - - /** - * @dev Set the timelock. - */ - function __GovernorTimelockControl_init(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing { - __GovernorTimelockControl_init_unchained(timelockAddress); - } - - function __GovernorTimelockControl_init_unchained(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing { - _updateTimelock(timelockAddress); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, GovernorUpgradeable) returns (bool) { - return interfaceId == type(IGovernorTimelockUpgradeable).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev Overridden version of the {Governor-state} function with added support for the `Queued` state. - */ - function state(uint256 proposalId) public view virtual override(IGovernorUpgradeable, GovernorUpgradeable) returns (ProposalState) { - ProposalState currentState = super.state(proposalId); - - if (currentState != ProposalState.Succeeded) { - return currentState; - } - - // core tracks execution, so we just have to check if successful proposal have been queued. - bytes32 queueid = _timelockIds[proposalId]; - if (queueid == bytes32(0)) { - return currentState; - } else if (_timelock.isOperationDone(queueid)) { - return ProposalState.Executed; - } else if (_timelock.isOperationPending(queueid)) { - return ProposalState.Queued; - } else { - return ProposalState.Canceled; - } - } - - /** - * @dev Public accessor to check the address of the timelock - */ - function timelock() public view virtual override returns (address) { - return address(_timelock); - } - - /** - * @dev Public accessor to check the eta of a queued proposal - */ - function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { - uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]); - return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value - } - - /** - * @dev Function to queue a proposal to the timelock. - */ - function queue( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual override returns (uint256) { - uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); - - require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); - - uint256 delay = _timelock.getMinDelay(); - _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash); - _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay); - - emit ProposalQueued(proposalId, block.timestamp + delay); - - return proposalId; - } - - /** - * @dev Overridden execute function that run the already queued proposal through the timelock. - */ - function _execute( - uint256 /* proposalId */, - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) internal virtual override { - _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash); - } - - /** - * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already - * been queued. - */ - // This function can reenter through the external call to the timelock, but we assume the timelock is trusted and - // well behaved (according to TimelockController) and this will not happen. - // slither-disable-next-line reentrancy-no-eth - function _cancel( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) internal virtual override returns (uint256) { - uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); - - if (_timelockIds[proposalId] != 0) { - _timelock.cancel(_timelockIds[proposalId]); - delete _timelockIds[proposalId]; - } - - return proposalId; - } - - /** - * @dev Address through which the governor executes action. In this case, the timelock. - */ - function _executor() internal view virtual override returns (address) { - return address(_timelock); - } - - /** - * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates - * must be proposed, scheduled, and executed through governance proposals. - * - * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. - */ - function updateTimelock(TimelockControllerUpgradeable newTimelock) external virtual onlyGovernance { - _updateTimelock(newTimelock); - } - - function _updateTimelock(TimelockControllerUpgradeable newTimelock) private { - emit TimelockChange(address(_timelock), address(newTimelock)); - _timelock = newTimelock; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol deleted file mode 100644 index 7ef657ab..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesCompUpgradeable.sol +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesComp.sol) - -pragma solidity ^0.8.0; - -import "../GovernorUpgradeable.sol"; -import "../../token/ERC20/extensions/ERC20VotesCompUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} for voting weight extraction from a Comp token. - * - * _Available since v4.3._ - * - * @custom:storage-size 51 - */ -abstract contract GovernorVotesCompUpgradeable is Initializable, GovernorUpgradeable { - ERC20VotesCompUpgradeable public token; - - function __GovernorVotesComp_init(ERC20VotesCompUpgradeable token_) internal onlyInitializing { - __GovernorVotesComp_init_unchained(token_); - } - - function __GovernorVotesComp_init_unchained(ERC20VotesCompUpgradeable token_) internal onlyInitializing { - token = token_; - } - - /** - * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token - * does not implement EIP-6372. - */ - function clock() public view virtual override returns (uint48) { - try token.clock() returns (uint48 timepoint) { - return timepoint; - } catch { - return SafeCastUpgradeable.toUint48(block.number); - } - } - - /** - * @dev Machine-readable description of the clock as specified in EIP-6372. - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory) { - try token.CLOCK_MODE() returns (string memory clockmode) { - return clockmode; - } catch { - return "mode=blocknumber&from=default"; - } - } - - /** - * Read the voting weight from the token's built-in snapshot mechanism (see {Governor-_getVotes}). - */ - function _getVotes( - address account, - uint256 timepoint, - bytes memory /*params*/ - ) internal view virtual override returns (uint256) { - return token.getPriorVotes(account, timepoint); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol deleted file mode 100644 index 80c09f5f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol +++ /dev/null @@ -1,133 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotesQuorumFraction.sol) - -pragma solidity ^0.8.0; - -import "./GovernorVotesUpgradeable.sol"; -import "../../utils/CheckpointsUpgradeable.sol"; -import "../../utils/math/SafeCastUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a - * fraction of the total supply. - * - * _Available since v4.3._ - */ -abstract contract GovernorVotesQuorumFractionUpgradeable is Initializable, GovernorVotesUpgradeable { - using CheckpointsUpgradeable for CheckpointsUpgradeable.Trace224; - - uint256 private _quorumNumerator; // DEPRECATED in favor of _quorumNumeratorHistory - - /// @custom:oz-retyped-from Checkpoints.History - CheckpointsUpgradeable.Trace224 private _quorumNumeratorHistory; - - event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator); - - /** - * @dev Initialize quorum as a fraction of the token's total supply. - * - * The fraction is specified as `numerator / denominator`. By default the denominator is 100, so quorum is - * specified as a percent: a numerator of 10 corresponds to quorum being 10% of total supply. The denominator can be - * customized by overriding {quorumDenominator}. - */ - function __GovernorVotesQuorumFraction_init(uint256 quorumNumeratorValue) internal onlyInitializing { - __GovernorVotesQuorumFraction_init_unchained(quorumNumeratorValue); - } - - function __GovernorVotesQuorumFraction_init_unchained(uint256 quorumNumeratorValue) internal onlyInitializing { - _updateQuorumNumerator(quorumNumeratorValue); - } - - /** - * @dev Returns the current quorum numerator. See {quorumDenominator}. - */ - function quorumNumerator() public view virtual returns (uint256) { - return _quorumNumeratorHistory._checkpoints.length == 0 ? _quorumNumerator : _quorumNumeratorHistory.latest(); - } - - /** - * @dev Returns the quorum numerator at a specific timepoint. See {quorumDenominator}. - */ - function quorumNumerator(uint256 timepoint) public view virtual returns (uint256) { - // If history is empty, fallback to old storage - uint256 length = _quorumNumeratorHistory._checkpoints.length; - if (length == 0) { - return _quorumNumerator; - } - - // Optimistic search, check the latest checkpoint - CheckpointsUpgradeable.Checkpoint224 memory latest = _quorumNumeratorHistory._checkpoints[length - 1]; - if (latest._key <= timepoint) { - return latest._value; - } - - // Otherwise, do the binary search - return _quorumNumeratorHistory.upperLookupRecent(SafeCastUpgradeable.toUint32(timepoint)); - } - - /** - * @dev Returns the quorum denominator. Defaults to 100, but may be overridden. - */ - function quorumDenominator() public view virtual returns (uint256) { - return 100; - } - - /** - * @dev Returns the quorum for a timepoint, in terms of number of votes: `supply * numerator / denominator`. - */ - function quorum(uint256 timepoint) public view virtual override returns (uint256) { - return (token.getPastTotalSupply(timepoint) * quorumNumerator(timepoint)) / quorumDenominator(); - } - - /** - * @dev Changes the quorum numerator. - * - * Emits a {QuorumNumeratorUpdated} event. - * - * Requirements: - * - * - Must be called through a governance proposal. - * - New numerator must be smaller or equal to the denominator. - */ - function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance { - _updateQuorumNumerator(newQuorumNumerator); - } - - /** - * @dev Changes the quorum numerator. - * - * Emits a {QuorumNumeratorUpdated} event. - * - * Requirements: - * - * - New numerator must be smaller or equal to the denominator. - */ - function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual { - require( - newQuorumNumerator <= quorumDenominator(), - "GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator" - ); - - uint256 oldQuorumNumerator = quorumNumerator(); - - // Make sure we keep track of the original numerator in contracts upgraded from a version without checkpoints. - if (oldQuorumNumerator != 0 && _quorumNumeratorHistory._checkpoints.length == 0) { - _quorumNumeratorHistory._checkpoints.push( - CheckpointsUpgradeable.Checkpoint224({_key: 0, _value: SafeCastUpgradeable.toUint224(oldQuorumNumerator)}) - ); - } - - // Set new quorum for future proposals - _quorumNumeratorHistory.push(SafeCastUpgradeable.toUint32(clock()), SafeCastUpgradeable.toUint224(newQuorumNumerator)); - - emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol deleted file mode 100644 index 85a58282..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorVotesUpgradeable.sol +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorVotes.sol) - -pragma solidity ^0.8.0; - -import "../GovernorUpgradeable.sol"; -import "../../interfaces/IERC5805Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. - * - * _Available since v4.3._ - * - * @custom:storage-size 51 - */ -abstract contract GovernorVotesUpgradeable is Initializable, GovernorUpgradeable { - IERC5805Upgradeable public token; - - function __GovernorVotes_init(IVotesUpgradeable tokenAddress) internal onlyInitializing { - __GovernorVotes_init_unchained(tokenAddress); - } - - function __GovernorVotes_init_unchained(IVotesUpgradeable tokenAddress) internal onlyInitializing { - token = IERC5805Upgradeable(address(tokenAddress)); - } - - /** - * @dev Clock (as specified in EIP-6372) is set to match the token's clock. Fallback to block numbers if the token - * does not implement EIP-6372. - */ - function clock() public view virtual override returns (uint48) { - try token.clock() returns (uint48 timepoint) { - return timepoint; - } catch { - return SafeCastUpgradeable.toUint48(block.number); - } - } - - /** - * @dev Machine-readable description of the clock as specified in EIP-6372. - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory) { - try token.CLOCK_MODE() returns (string memory clockmode) { - return clockmode; - } catch { - return "mode=blocknumber&from=default"; - } - } - - /** - * Read the voting weight from the token's built in snapshot mechanism (see {Governor-_getVotes}). - */ - function _getVotes( - address account, - uint256 timepoint, - bytes memory /*params*/ - ) internal view virtual override returns (uint256) { - return token.getPastVotes(account, timepoint); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol deleted file mode 100644 index 0cfd5fb8..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/IGovernorTimelockUpgradeable.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol) - -pragma solidity ^0.8.0; - -import "../IGovernorUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of the {IGovernor} for timelock supporting modules. - * - * _Available since v4.3._ - */ -abstract contract IGovernorTimelockUpgradeable is Initializable, IGovernorUpgradeable { - event ProposalQueued(uint256 proposalId, uint256 eta); - - function __IGovernorTimelock_init() internal onlyInitializing { - } - - function __IGovernorTimelock_init_unchained() internal onlyInitializing { - } - function timelock() public view virtual returns (address); - - function proposalEta(uint256 proposalId) public view virtual returns (uint256); - - function queue( - address[] memory targets, - uint256[] memory values, - bytes[] memory calldatas, - bytes32 descriptionHash - ) public virtual returns (uint256 proposalId); - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol deleted file mode 100644 index eeb5d94b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/IVotesUpgradeable.sol +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/IVotes.sol) -pragma solidity ^0.8.0; - -/** - * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. - * - * _Available since v4.5._ - */ -interface IVotesUpgradeable { - /** - * @dev Emitted when an account changes their delegate. - */ - event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); - - /** - * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. - */ - event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); - - /** - * @dev Returns the current amount of votes that `account` has. - */ - function getVotes(address account) external view returns (uint256); - - /** - * @dev Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is - * configured to use block numbers, this will return the value at the end of the corresponding block. - */ - function getPastVotes(address account, uint256 timepoint) external view returns (uint256); - - /** - * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is - * configured to use block numbers, this will return the value at the end of the corresponding block. - * - * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. - * Votes that have not been delegated are still part of total supply, even though they would not participate in a - * vote. - */ - function getPastTotalSupply(uint256 timepoint) external view returns (uint256); - - /** - * @dev Returns the delegate that `account` has chosen. - */ - function delegates(address account) external view returns (address); - - /** - * @dev Delegates votes from the sender to `delegatee`. - */ - function delegate(address delegatee) external; - - /** - * @dev Delegates votes from signer to `delegatee`. - */ - function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol deleted file mode 100644 index 35c3f851..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155MetadataURIUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol deleted file mode 100644 index 1e9e6e32..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155ReceiverUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC1155/IERC1155ReceiverUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol deleted file mode 100644 index 3df26dc5..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1155Upgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC1155/IERC1155Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol deleted file mode 100644 index 631d222a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1271Upgradeable.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC1271 standard signature validation method for - * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. - * - * _Available since v4.1._ - */ -interface IERC1271Upgradeable { - /** - * @dev Should return whether the signature provided is valid for the provided data - * @param hash Hash of the data to be signed - * @param signature Signature byte array associated with _data - */ - function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol deleted file mode 100644 index 3aa402b6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363ReceiverUpgradeable.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Receiver.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface for any contract that wants to support {IERC1363-transferAndCall} - * or {IERC1363-transferFromAndCall} from {ERC1363} token contracts. - */ -interface IERC1363ReceiverUpgradeable { - /* - * Note: the ERC-165 identifier for this interface is 0x88a7ca5c. - * 0x88a7ca5c === bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)")) - */ - - /** - * @notice Handle the receipt of ERC1363 tokens - * @dev Any ERC1363 smart contract calls this function on the recipient - * after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the - * transfer. Return of other than the magic value MUST result in the - * transaction being reverted. - * Note: the token contract address is always the message sender. - * @param operator address The address which called `transferAndCall` or `transferFromAndCall` function - * @param from address The address which are token transferred from - * @param amount uint256 The amount of tokens transferred - * @param data bytes Additional data with no specified format - * @return `bytes4(keccak256("onTransferReceived(address,address,uint256,bytes)"))` unless throwing - */ - function onTransferReceived( - address operator, - address from, - uint256 amount, - bytes memory data - ) external returns (bytes4); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol deleted file mode 100644 index 2ef81c43..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363SpenderUpgradeable.sol +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363Spender.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface for any contract that wants to support {IERC1363-approveAndCall} - * from {ERC1363} token contracts. - */ -interface IERC1363SpenderUpgradeable { - /* - * Note: the ERC-165 identifier for this interface is 0x7b04a2d0. - * 0x7b04a2d0 === bytes4(keccak256("onApprovalReceived(address,uint256,bytes)")) - */ - - /** - * @notice Handle the approval of ERC1363 tokens - * @dev Any ERC1363 smart contract calls this function on the recipient - * after an `approve`. This function MAY throw to revert and reject the - * approval. Return of other than the magic value MUST result in the - * transaction being reverted. - * Note: the token contract address is always the message sender. - * @param owner address The address which called `approveAndCall` function - * @param amount uint256 The amount of tokens to be spent - * @param data bytes Additional data with no specified format - * @return `bytes4(keccak256("onApprovalReceived(address,uint256,bytes)"))`unless throwing - */ - function onApprovalReceived(address owner, uint256 amount, bytes memory data) external returns (bytes4); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol deleted file mode 100644 index 724605e6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1363Upgradeable.sol +++ /dev/null @@ -1,80 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1363.sol) - -pragma solidity ^0.8.0; - -import "./IERC20Upgradeable.sol"; -import "./IERC165Upgradeable.sol"; - -/** - * @dev Interface of an ERC1363 compliant contract, as defined in the - * https://eips.ethereum.org/EIPS/eip-1363[EIP]. - * - * Defines a interface for ERC20 tokens that supports executing recipient - * code after `transfer` or `transferFrom`, or spender code after `approve`. - */ -interface IERC1363Upgradeable is IERC165Upgradeable, IERC20Upgradeable { - /* - * Note: the ERC-165 identifier for this interface is 0xb0202a11. - * 0xb0202a11 === - * bytes4(keccak256('transferAndCall(address,uint256)')) ^ - * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ - * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ - * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ - * bytes4(keccak256('approveAndCall(address,uint256)')) ^ - * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) - */ - - /** - * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @return true unless throwing - */ - function transferAndCall(address to, uint256 amount) external returns (bool); - - /** - * @dev Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @param data bytes Additional data with no specified format, sent in call to `to` - * @return true unless throwing - */ - function transferAndCall(address to, uint256 amount, bytes memory data) external returns (bool); - - /** - * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver - * @param from address The address which you want to send tokens from - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @return true unless throwing - */ - function transferFromAndCall(address from, address to, uint256 amount) external returns (bool); - - /** - * @dev Transfer tokens from one address to another and then call `onTransferReceived` on receiver - * @param from address The address which you want to send tokens from - * @param to address The address which you want to transfer to - * @param amount uint256 The amount of tokens to be transferred - * @param data bytes Additional data with no specified format, sent in call to `to` - * @return true unless throwing - */ - function transferFromAndCall(address from, address to, uint256 amount, bytes memory data) external returns (bool); - - /** - * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender - * and then call `onApprovalReceived` on spender. - * @param spender address The address which will spend the funds - * @param amount uint256 The amount of tokens to be spent - */ - function approveAndCall(address spender, uint256 amount) external returns (bool); - - /** - * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender - * and then call `onApprovalReceived` on spender. - * @param spender address The address which will spend the funds - * @param amount uint256 The amount of tokens to be spent - * @param data bytes Additional data with no specified format, sent in call to `spender` - */ - function approveAndCall(address spender, uint256 amount, bytes memory data) external returns (bool); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol deleted file mode 100644 index 08eb433b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC165Upgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) - -pragma solidity ^0.8.0; - -import "../utils/introspection/IERC165Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol deleted file mode 100644 index 1f5aeba5..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820ImplementerUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol) - -pragma solidity ^0.8.0; - -import "../utils/introspection/IERC1820ImplementerUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol deleted file mode 100644 index 088fbd68..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1820RegistryUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol) - -pragma solidity ^0.8.0; - -import "../utils/introspection/IERC1820RegistryUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol deleted file mode 100644 index d576dff4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC1967Upgradeable.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) - -pragma solidity ^0.8.0; - -/** - * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. - * - * _Available since v4.8.3._ - */ -interface IERC1967Upgradeable { - /** - * @dev Emitted when the implementation is upgraded. - */ - event Upgraded(address indexed implementation); - - /** - * @dev Emitted when the admin account has changed. - */ - event AdminChanged(address previousAdmin, address newAdmin); - - /** - * @dev Emitted when the beacon is changed. - */ - event BeaconUpgraded(address indexed beacon); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol deleted file mode 100644 index c24417a2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20MetadataUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol deleted file mode 100644 index a0d5cdbf..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC20Upgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/IERC20Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol deleted file mode 100644 index 9cb0aae6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2309Upgradeable.sol +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (interfaces/IERC2309.sol) - -pragma solidity ^0.8.0; - -/** - * @dev ERC-2309: ERC-721 Consecutive Transfer Extension. - * - * _Available since v4.8._ - */ -interface IERC2309Upgradeable { - /** - * @dev Emitted when the tokens from `fromTokenId` to `toTokenId` are transferred from `fromAddress` to `toAddress`. - */ - event ConsecutiveTransfer( - uint256 indexed fromTokenId, - uint256 toTokenId, - address indexed fromAddress, - address indexed toAddress - ); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol deleted file mode 100644 index a8d1cef4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2612Upgradeable.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2612.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/extensions/IERC20PermitUpgradeable.sol"; - -interface IERC2612Upgradeable is IERC20PermitUpgradeable {} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol deleted file mode 100644 index fd5a7033..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC2981Upgradeable.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) - -pragma solidity ^0.8.0; - -import "../utils/introspection/IERC165Upgradeable.sol"; - -/** - * @dev Interface for the NFT Royalty Standard. - * - * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal - * support for royalty payments across all NFT marketplaces and ecosystem participants. - * - * _Available since v4.5._ - */ -interface IERC2981Upgradeable is IERC165Upgradeable { - /** - * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of - * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. - */ - function royaltyInfo( - uint256 tokenId, - uint256 salePrice - ) external view returns (address receiver, uint256 royaltyAmount); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol deleted file mode 100644 index a786fb13..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashBorrowerUpgradeable.sol +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC3156FlashBorrower.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC3156 FlashBorrower, as defined in - * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. - * - * _Available since v4.1._ - */ -interface IERC3156FlashBorrowerUpgradeable { - /** - * @dev Receive a flash loan. - * @param initiator The initiator of the loan. - * @param token The loan currency. - * @param amount The amount of tokens lent. - * @param fee The additional amount of tokens to repay. - * @param data Arbitrary data structure, intended to contain user-defined parameters. - * @return The keccak256 hash of "ERC3156FlashBorrower.onFlashLoan" - */ - function onFlashLoan( - address initiator, - address token, - uint256 amount, - uint256 fee, - bytes calldata data - ) external returns (bytes32); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol deleted file mode 100644 index d2543d1f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156FlashLenderUpgradeable.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156FlashLender.sol) - -pragma solidity ^0.8.0; - -import "./IERC3156FlashBorrowerUpgradeable.sol"; - -/** - * @dev Interface of the ERC3156 FlashLender, as defined in - * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. - * - * _Available since v4.1._ - */ -interface IERC3156FlashLenderUpgradeable { - /** - * @dev The amount of currency available to be lended. - * @param token The loan currency. - * @return The amount of `token` that can be borrowed. - */ - function maxFlashLoan(address token) external view returns (uint256); - - /** - * @dev The fee to be charged for a given loan. - * @param token The loan currency. - * @param amount The amount of tokens lent. - * @return The amount of `token` to be charged for the loan, on top of the returned principal. - */ - function flashFee(address token, uint256 amount) external view returns (uint256); - - /** - * @dev Initiate a flash loan. - * @param receiver The receiver of the tokens in the loan, and the receiver of the callback. - * @param token The loan currency. - * @param amount The amount of tokens lent. - * @param data Arbitrary data structure, intended to contain user-defined parameters. - */ - function flashLoan( - IERC3156FlashBorrowerUpgradeable receiver, - address token, - uint256 amount, - bytes calldata data - ) external returns (bool); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol deleted file mode 100644 index 1a9fd642..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC3156Upgradeable.sol +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol) - -pragma solidity ^0.8.0; - -import "./IERC3156FlashBorrowerUpgradeable.sol"; -import "./IERC3156FlashLenderUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol deleted file mode 100644 index 16a4cda7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4626Upgradeable.sol +++ /dev/null @@ -1,232 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4626.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC20/IERC20Upgradeable.sol"; -import "../token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; - -/** - * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in - * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. - * - * _Available since v4.7._ - */ -interface IERC4626Upgradeable is IERC20Upgradeable, IERC20MetadataUpgradeable { - event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); - - event Withdraw( - address indexed sender, - address indexed receiver, - address indexed owner, - uint256 assets, - uint256 shares - ); - - /** - * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. - * - * - MUST be an ERC-20 token contract. - * - MUST NOT revert. - */ - function asset() external view returns (address assetTokenAddress); - - /** - * @dev Returns the total amount of the underlying asset that is “managed” by Vault. - * - * - SHOULD include any compounding that occurs from yield. - * - MUST be inclusive of any fees that are charged against assets in the Vault. - * - MUST NOT revert. - */ - function totalAssets() external view returns (uint256 totalManagedAssets); - - /** - * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal - * scenario where all the conditions are met. - * - * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. - * - MUST NOT show any variations depending on the caller. - * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. - * - MUST NOT revert. - * - * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the - * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and - * from. - */ - function convertToShares(uint256 assets) external view returns (uint256 shares); - - /** - * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal - * scenario where all the conditions are met. - * - * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. - * - MUST NOT show any variations depending on the caller. - * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. - * - MUST NOT revert. - * - * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the - * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and - * from. - */ - function convertToAssets(uint256 shares) external view returns (uint256 assets); - - /** - * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, - * through a deposit call. - * - * - MUST return a limited value if receiver is subject to some deposit limit. - * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. - * - MUST NOT revert. - */ - function maxDeposit(address receiver) external view returns (uint256 maxAssets); - - /** - * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given - * current on-chain conditions. - * - * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit - * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called - * in the same transaction. - * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the - * deposit would be accepted, regardless if the user has enough tokens approved, etc. - * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. - * - MUST NOT revert. - * - * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in - * share price or some other type of condition, meaning the depositor will lose assets by depositing. - */ - function previewDeposit(uint256 assets) external view returns (uint256 shares); - - /** - * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. - * - * - MUST emit the Deposit event. - * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the - * deposit execution, and are accounted for during deposit. - * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not - * approving enough underlying tokens to the Vault contract, etc). - * - * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. - */ - function deposit(uint256 assets, address receiver) external returns (uint256 shares); - - /** - * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. - * - MUST return a limited value if receiver is subject to some mint limit. - * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. - * - MUST NOT revert. - */ - function maxMint(address receiver) external view returns (uint256 maxShares); - - /** - * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given - * current on-chain conditions. - * - * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call - * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the - * same transaction. - * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint - * would be accepted, regardless if the user has enough tokens approved, etc. - * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. - * - MUST NOT revert. - * - * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in - * share price or some other type of condition, meaning the depositor will lose assets by minting. - */ - function previewMint(uint256 shares) external view returns (uint256 assets); - - /** - * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. - * - * - MUST emit the Deposit event. - * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint - * execution, and are accounted for during mint. - * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not - * approving enough underlying tokens to the Vault contract, etc). - * - * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. - */ - function mint(uint256 shares, address receiver) external returns (uint256 assets); - - /** - * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the - * Vault, through a withdraw call. - * - * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. - * - MUST NOT revert. - */ - function maxWithdraw(address owner) external view returns (uint256 maxAssets); - - /** - * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, - * given current on-chain conditions. - * - * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw - * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if - * called - * in the same transaction. - * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though - * the withdrawal would be accepted, regardless if the user has enough shares, etc. - * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. - * - MUST NOT revert. - * - * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in - * share price or some other type of condition, meaning the depositor will lose assets by depositing. - */ - function previewWithdraw(uint256 assets) external view returns (uint256 shares); - - /** - * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. - * - * - MUST emit the Withdraw event. - * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the - * withdraw execution, and are accounted for during withdraw. - * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner - * not having enough shares, etc). - * - * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. - * Those methods should be performed separately. - */ - function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); - - /** - * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, - * through a redeem call. - * - * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. - * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. - * - MUST NOT revert. - */ - function maxRedeem(address owner) external view returns (uint256 maxShares); - - /** - * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, - * given current on-chain conditions. - * - * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call - * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the - * same transaction. - * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the - * redemption would be accepted, regardless if the user has enough shares, etc. - * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. - * - MUST NOT revert. - * - * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in - * share price or some other type of condition, meaning the depositor will lose assets by redeeming. - */ - function previewRedeem(uint256 shares) external view returns (uint256 assets); - - /** - * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. - * - * - MUST emit the Withdraw event. - * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the - * redeem execution, and are accounted for during redeem. - * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner - * not having enough shares, etc). - * - * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. - * Those methods should be performed separately. - */ - function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol deleted file mode 100644 index 103e7e5e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC4906Upgradeable.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC4906.sol) - -pragma solidity ^0.8.0; - -import "./IERC165Upgradeable.sol"; -import "./IERC721Upgradeable.sol"; - -/// @title EIP-721 Metadata Update Extension -interface IERC4906Upgradeable is IERC165Upgradeable, IERC721Upgradeable { - /// @dev This event emits when the metadata of a token is changed. - /// So that the third-party platforms such as NFT market could - /// timely update the images and related attributes of the NFT. - event MetadataUpdate(uint256 _tokenId); - - /// @dev This event emits when the metadata of a range of tokens is changed. - /// So that the third-party platforms such as NFT market could - /// timely update the images and related attributes of the NFTs. - event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol deleted file mode 100644 index 66d0007d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5267Upgradeable.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) - -pragma solidity ^0.8.0; - -interface IERC5267Upgradeable { - /** - * @dev MAY be emitted to signal that the domain could have changed. - */ - event EIP712DomainChanged(); - - /** - * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 - * signature. - */ - function eip712Domain() - external - view - returns ( - bytes1 fields, - string memory name, - string memory version, - uint256 chainId, - address verifyingContract, - bytes32 salt, - uint256[] memory extensions - ); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol deleted file mode 100644 index 04f88041..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5313Upgradeable.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5313.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface for the Light Contract Ownership Standard. - * - * A standardized minimal interface required to identify an account that controls a contract - * - * _Available since v4.9._ - */ -interface IERC5313Upgradeable { - /** - * @dev Gets the address of the owner. - */ - function owner() external view returns (address); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol deleted file mode 100644 index 75d9b3ae..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC5805Upgradeable.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol) - -pragma solidity ^0.8.0; - -import "../governance/utils/IVotesUpgradeable.sol"; -import "./IERC6372Upgradeable.sol"; - -interface IERC5805Upgradeable is IERC6372Upgradeable, IVotesUpgradeable {} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol deleted file mode 100644 index 262513ac..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC6372Upgradeable.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC6372.sol) - -pragma solidity ^0.8.0; - -interface IERC6372Upgradeable { - /** - * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). - */ - function clock() external view returns (uint48); - - /** - * @dev Description of the clock - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() external view returns (string memory); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol deleted file mode 100644 index 06e732d0..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721EnumerableUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol deleted file mode 100644 index 1ec3b802..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721MetadataUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/extensions/IERC721MetadataUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol deleted file mode 100644 index bdbe94c2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721ReceiverUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/IERC721ReceiverUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol deleted file mode 100644 index 414e630f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC721Upgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC721/IERC721Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol deleted file mode 100644 index 219b28df..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777RecipientUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC777/IERC777RecipientUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol deleted file mode 100644 index 0e1440b2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777SenderUpgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC777/IERC777SenderUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol deleted file mode 100644 index 858d3f48..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/IERC777Upgradeable.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol) - -pragma solidity ^0.8.0; - -import "../token/ERC777/IERC777Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc deleted file mode 100644 index 4525bc9a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/README.adoc +++ /dev/null @@ -1,73 +0,0 @@ -= Interfaces - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/interfaces - -== List of standardized interfaces -These interfaces are available as `.sol` files, and also as compiler `.json` ABI files (through the npm package). These -are useful to interact with third party contracts that implement them. - -- {IERC20} -- {IERC20Metadata} -- {IERC165} -- {IERC721} -- {IERC721Receiver} -- {IERC721Enumerable} -- {IERC721Metadata} -- {IERC777} -- {IERC777Recipient} -- {IERC777Sender} -- {IERC1155} -- {IERC1155Receiver} -- {IERC1155MetadataURI} -- {IERC1271} -- {IERC1363} -- {IERC1363Receiver} -- {IERC1363Spender} -- {IERC1820Implementer} -- {IERC1820Registry} -- {IERC1822Proxiable} -- {IERC2612} -- {IERC2981} -- {IERC3156FlashLender} -- {IERC3156FlashBorrower} -- {IERC4626} -- {IERC4906} -- {IERC5267} -- {IERC5313} -- {IERC5805} -- {IERC6372} - -== Detailed ABI - -{{IERC1271}} - -{{IERC1363}} - -{{IERC1363Receiver}} - -{{IERC1363Spender}} - -{{IERC1820Implementer}} - -{{IERC1820Registry}} - -{{IERC1822Proxiable}} - -{{IERC2612}} - -{{IERC2981}} - -{{IERC3156FlashLender}} - -{{IERC3156FlashBorrower}} - -{{IERC4626}} - -{{IERC5313}} - -{{IERC5267}} - -{{IERC5805}} - -{{IERC6372}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol deleted file mode 100644 index e14596ab..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC1822Upgradeable.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) - -pragma solidity ^0.8.0; - -/** - * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified - * proxy whose upgrades are fully controlled by the current implementation. - */ -interface IERC1822ProxiableUpgradeable { - /** - * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation - * address. - * - * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks - * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this - * function revert if invoked through a proxy. - */ - function proxiableUUID() external view returns (bytes32); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol deleted file mode 100644 index ee7297fb..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/interfaces/draft-IERC2612Upgradeable.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/draft-IERC2612.sol) - -pragma solidity ^0.8.0; - -// EIP-2612 is Final as of 2022-11-01. This file is deprecated. - -import "./IERC2612Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol deleted file mode 100644 index e18ca1b4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/ERC2771ContextUpgradeable.sol +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (metatx/ERC2771Context.sol) - -pragma solidity ^0.8.9; - -import "../utils/ContextUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Context variant with ERC2771 support. - * - * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption. - * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender} - * recovery. - */ -abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable - address private immutable _trustedForwarder; - - /// @custom:oz-upgrades-unsafe-allow constructor - constructor(address trustedForwarder) { - _trustedForwarder = trustedForwarder; - } - - function isTrustedForwarder(address forwarder) public view virtual returns (bool) { - return forwarder == _trustedForwarder; - } - - function _msgSender() internal view virtual override returns (address) { - uint256 calldataLength = msg.data.length; - uint256 contextSuffixLength = _contextSuffixLength(); - if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { - return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); - } else { - return super._msgSender(); - } - } - - function _msgData() internal view virtual override returns (bytes calldata) { - uint256 calldataLength = msg.data.length; - uint256 contextSuffixLength = _contextSuffixLength(); - if (isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) { - return msg.data[:calldataLength - contextSuffixLength]; - } else { - return super._msgData(); - } - } - - /** - * @dev ERC-2771 specifies the context as being a single address (20 bytes). - */ - function _contextSuffixLength() internal view virtual override returns (uint256) { - return 20; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol deleted file mode 100644 index 563ce2c5..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/MinimalForwarderUpgradeable.sol +++ /dev/null @@ -1,84 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (metatx/MinimalForwarder.sol) - -pragma solidity ^0.8.0; - -import "../utils/cryptography/ECDSAUpgradeable.sol"; -import "../utils/cryptography/EIP712Upgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Simple minimal forwarder to be used together with an ERC2771 compatible contract. See {ERC2771Context}. - * - * MinimalForwarder is mainly meant for testing, as it is missing features to be a good production-ready forwarder. This - * contract does not intend to have all the properties that are needed for a sound forwarding system. A fully - * functioning forwarding system with good properties requires more complexity. We suggest you look at other projects - * such as the GSN which do have the goal of building a system like that. - */ -contract MinimalForwarderUpgradeable is Initializable, EIP712Upgradeable { - using ECDSAUpgradeable for bytes32; - - struct ForwardRequest { - address from; - address to; - uint256 value; - uint256 gas; - uint256 nonce; - bytes data; - } - - bytes32 private constant _TYPEHASH = - keccak256("ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data)"); - - mapping(address => uint256) private _nonces; - - function __MinimalForwarder_init() internal onlyInitializing { - __EIP712_init_unchained("MinimalForwarder", "0.0.1"); - } - - function __MinimalForwarder_init_unchained() internal onlyInitializing {} - - function getNonce(address from) public view returns (uint256) { - return _nonces[from]; - } - - function verify(ForwardRequest calldata req, bytes calldata signature) public view returns (bool) { - address signer = _hashTypedDataV4( - keccak256(abi.encode(_TYPEHASH, req.from, req.to, req.value, req.gas, req.nonce, keccak256(req.data))) - ).recover(signature); - return _nonces[req.from] == req.nonce && signer == req.from; - } - - function execute( - ForwardRequest calldata req, - bytes calldata signature - ) public payable returns (bool, bytes memory) { - require(verify(req, signature), "MinimalForwarder: signature does not match request"); - _nonces[req.from] = req.nonce + 1; - - (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}( - abi.encodePacked(req.data, req.from) - ); - - // Validate that the relayer has sent enough gas for the call. - // See https://ronan.eth.limo/blog/ethereum-gas-dangers/ - if (gasleft() <= req.gas / 63) { - // We explicitly trigger invalid opcode to consume all gas and bubble-up the effects, since - // neither revert or assert consume all gas since Solidity 0.8.0 - // https://docs.soliditylang.org/en/v0.8.0/control-structures.html#panic-via-assert-and-error-via-require - /// @solidity memory-safe-assembly - assembly { - invalid() - } - } - - return (success, returndata); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc deleted file mode 100644 index eccdeaf9..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/metatx/README.adoc +++ /dev/null @@ -1,12 +0,0 @@ -= Meta Transactions - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/metatx - -== Core - -{{ERC2771Context}} - -== Utils - -{{MinimalForwarder}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json deleted file mode 100644 index d9059593..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@openzeppelin/contracts-upgradeable", - "description": "Secure Smart Contract library for Solidity", - "version": "4.9.6", - "files": [ - "**/*.sol", - "/build/contracts/*.json", - "!/mocks/**/*" - ], - "scripts": { - "prepare": "bash ../scripts/prepare-contracts-package.sh", - "prepare-docs": "cd ..; npm run prepare-docs" - }, - "repository": { - "type": "git", - "url": "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable.git" - }, - "keywords": [ - "solidity", - "ethereum", - "smart", - "contracts", - "security", - "zeppelin" - ], - "author": "OpenZeppelin Community ", - "license": "MIT", - "bugs": { - "url": "https://github.com/OpenZeppelin/openzeppelin-contracts/issues" - }, - "homepage": "https://openzeppelin.com/contracts/" -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol deleted file mode 100644 index 450fd0e4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ClonesUpgradeable.sol +++ /dev/null @@ -1,88 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol) - -pragma solidity ^0.8.0; - -/** - * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for - * deploying minimal proxy contracts, also known as "clones". - * - * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies - * > a minimal bytecode implementation that delegates all calls to a known, fixed address. - * - * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` - * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the - * deterministic method. - * - * _Available since v3.4._ - */ -library ClonesUpgradeable { - /** - * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. - * - * This function uses the create opcode, which should never revert. - */ - function clone(address implementation) internal returns (address instance) { - /// @solidity memory-safe-assembly - assembly { - // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes - // of the `implementation` address with the bytecode before the address. - mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) - // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. - mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) - instance := create(0, 0x09, 0x37) - } - require(instance != address(0), "ERC1167: create failed"); - } - - /** - * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. - * - * This function uses the create2 opcode and a `salt` to deterministically deploy - * the clone. Using the same `implementation` and `salt` multiple time will revert, since - * the clones cannot be deployed twice at the same address. - */ - function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { - /// @solidity memory-safe-assembly - assembly { - // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes - // of the `implementation` address with the bytecode before the address. - mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) - // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. - mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) - instance := create2(0, 0x09, 0x37, salt) - } - require(instance != address(0), "ERC1167: create2 failed"); - } - - /** - * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. - */ - function predictDeterministicAddress( - address implementation, - bytes32 salt, - address deployer - ) internal pure returns (address predicted) { - /// @solidity memory-safe-assembly - assembly { - let ptr := mload(0x40) - mstore(add(ptr, 0x38), deployer) - mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) - mstore(add(ptr, 0x14), implementation) - mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) - mstore(add(ptr, 0x58), salt) - mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) - predicted := keccak256(add(ptr, 0x43), 0x55) - } - } - - /** - * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. - */ - function predictDeterministicAddress( - address implementation, - bytes32 salt - ) internal view returns (address predicted) { - return predictDeterministicAddress(implementation, salt, address(this)); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol deleted file mode 100644 index 14868cc9..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol +++ /dev/null @@ -1,170 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) - -pragma solidity ^0.8.2; - -import "../beacon/IBeaconUpgradeable.sol"; -import "../../interfaces/IERC1967Upgradeable.sol"; -import "../../interfaces/draft-IERC1822Upgradeable.sol"; -import "../../utils/AddressUpgradeable.sol"; -import "../../utils/StorageSlotUpgradeable.sol"; -import {Initializable} from "../utils/Initializable.sol"; - -/** - * @dev This abstract contract provides getters and event emitting update functions for - * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. - * - * _Available since v4.1._ - */ -abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable { - // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 - bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; - - /** - * @dev Storage slot with the address of the current implementation. - * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is - * validated in the constructor. - */ - bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - - function __ERC1967Upgrade_init() internal onlyInitializing { - } - - function __ERC1967Upgrade_init_unchained() internal onlyInitializing { - } - /** - * @dev Returns the current implementation address. - */ - function _getImplementation() internal view returns (address) { - return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; - } - - /** - * @dev Stores a new address in the EIP1967 implementation slot. - */ - function _setImplementation(address newImplementation) private { - require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); - StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; - } - - /** - * @dev Perform implementation upgrade - * - * Emits an {Upgraded} event. - */ - function _upgradeTo(address newImplementation) internal { - _setImplementation(newImplementation); - emit Upgraded(newImplementation); - } - - /** - * @dev Perform implementation upgrade with additional setup call. - * - * Emits an {Upgraded} event. - */ - function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { - _upgradeTo(newImplementation); - if (data.length > 0 || forceCall) { - AddressUpgradeable.functionDelegateCall(newImplementation, data); - } - } - - /** - * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. - * - * Emits an {Upgraded} event. - */ - function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { - // Upgrades from old implementations will perform a rollback test. This test requires the new - // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing - // this special case will break upgrade paths from old UUPS implementation to new ones. - if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { - _setImplementation(newImplementation); - } else { - try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { - require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); - } catch { - revert("ERC1967Upgrade: new implementation is not UUPS"); - } - _upgradeToAndCall(newImplementation, data, forceCall); - } - } - - /** - * @dev Storage slot with the admin of the contract. - * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is - * validated in the constructor. - */ - bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; - - /** - * @dev Returns the current admin. - */ - function _getAdmin() internal view returns (address) { - return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; - } - - /** - * @dev Stores a new address in the EIP1967 admin slot. - */ - function _setAdmin(address newAdmin) private { - require(newAdmin != address(0), "ERC1967: new admin is the zero address"); - StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; - } - - /** - * @dev Changes the admin of the proxy. - * - * Emits an {AdminChanged} event. - */ - function _changeAdmin(address newAdmin) internal { - emit AdminChanged(_getAdmin(), newAdmin); - _setAdmin(newAdmin); - } - - /** - * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. - * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. - */ - bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; - - /** - * @dev Returns the current beacon. - */ - function _getBeacon() internal view returns (address) { - return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; - } - - /** - * @dev Stores a new beacon in the EIP1967 beacon slot. - */ - function _setBeacon(address newBeacon) private { - require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); - require( - AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), - "ERC1967: beacon implementation is not a contract" - ); - StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; - } - - /** - * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does - * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). - * - * Emits a {BeaconUpgraded} event. - */ - function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { - _setBeacon(newBeacon); - emit BeaconUpgraded(newBeacon); - if (data.length > 0 || forceCall) { - AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc deleted file mode 100644 index 89717a7b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/README.adoc +++ /dev/null @@ -1,87 +0,0 @@ -= Proxies - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/proxy - -This is a low-level set of contracts implementing different proxy patterns with and without upgradeability. For an in-depth overview of this pattern check out the xref:upgrades-plugins::proxies.adoc[Proxy Upgrade Pattern] page. - -Most of the proxies below are built on an abstract base contract. - -- {Proxy}: Abstract contract implementing the core delegation functionality. - -In order to avoid clashes with the storage variables of the implementation contract behind a proxy, we use https://eips.ethereum.org/EIPS/eip-1967[EIP1967] storage slots. - -- {ERC1967Upgrade}: Internal functions to get and set the storage slots defined in EIP1967. -- {ERC1967Proxy}: A proxy using EIP1967 storage slots. Not upgradeable by default. - -There are two alternative ways to add upgradeability to an ERC1967 proxy. Their differences are explained below in <>. - -- {TransparentUpgradeableProxy}: A proxy with a built in admin and upgrade interface. -- {UUPSUpgradeable}: An upgradeability mechanism to be included in the implementation contract. - -CAUTION: Using upgradeable proxies correctly and securely is a difficult task that requires deep knowledge of the proxy pattern, Solidity, and the EVM. Unless you want a lot of low level control, we recommend using the xref:upgrades-plugins::index.adoc[OpenZeppelin Upgrades Plugins] for Truffle and Hardhat. - -A different family of proxies are beacon proxies. This pattern, popularized by Dharma, allows multiple proxies to be upgraded to a different implementation in a single transaction. - -- {BeaconProxy}: A proxy that retrieves its implementation from a beacon contract. -- {UpgradeableBeacon}: A beacon contract with a built in admin that can upgrade the {BeaconProxy} pointing to it. - -In this pattern, the proxy contract doesn't hold the implementation address in storage like an ERC1967 proxy. Instead, the address is stored in a separate beacon contract. The `upgrade` operations are sent to the beacon instead of to the proxy contract, and all proxies that follow that beacon are automatically upgraded. - -Outside the realm of upgradeability, proxies can also be useful to make cheap contract clones, such as those created by an on-chain factory contract that creates many instances of the same contract. These instances are designed to be both cheap to deploy, and cheap to call. - -- {Clones}: A library that can deploy cheap minimal non-upgradeable proxies. - -[[transparent-vs-uups]] -== Transparent vs UUPS Proxies - -The original proxies included in OpenZeppelin followed the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[Transparent Proxy Pattern]. While this pattern is still provided, our recommendation is now shifting towards UUPS proxies, which are both lightweight and versatile. The name UUPS comes from https://eips.ethereum.org/EIPS/eip-1822[EIP1822], which first documented the pattern. - -While both of these share the same interface for upgrades, in UUPS proxies the upgrade is handled by the implementation, and can eventually be removed. Transparent proxies, on the other hand, include the upgrade and admin logic in the proxy itself. This means {TransparentUpgradeableProxy} is more expensive to deploy than what is possible with UUPS proxies. - -UUPS proxies are implemented using an {ERC1967Proxy}. Note that this proxy is not by itself upgradeable. It is the role of the implementation to include, alongside the contract's logic, all the code necessary to update the implementation's address that is stored at a specific slot in the proxy's storage space. This is where the {UUPSUpgradeable} contract comes in. Inheriting from it (and overriding the {xref-UUPSUpgradeable-_authorizeUpgrade-address-}[`_authorizeUpgrade`] function with the relevant access control mechanism) will turn your contract into a UUPS compliant implementation. - -Note that since both proxies use the same storage slot for the implementation address, using a UUPS compliant implementation with a {TransparentUpgradeableProxy} might allow non-admins to perform upgrade operations. - -By default, the upgrade functionality included in {UUPSUpgradeable} contains a security mechanism that will prevent any upgrades to a non UUPS compliant implementation. This prevents upgrades to an implementation contract that wouldn't contain the necessary upgrade mechanism, as it would lock the upgradeability of the proxy forever. This security mechanism can be bypassed by either of: - -- Adding a flag mechanism in the implementation that will disable the upgrade function when triggered. -- Upgrading to an implementation that features an upgrade mechanism without the additional security check, and then upgrading again to another implementation without the upgrade mechanism. - -The current implementation of this security mechanism uses https://eips.ethereum.org/EIPS/eip-1822[EIP1822] to detect the storage slot used by the implementation. A previous implementation, now deprecated, relied on a rollback check. It is possible to upgrade from a contract using the old mechanism to a new one. The inverse is however not possible, as old implementations (before version 4.5) did not include the `ERC1822` interface. - -== Core - -{{Proxy}} - -== ERC1967 - -{{IERC1967}} - -{{ERC1967Proxy}} - -{{ERC1967Upgrade}} - -== Transparent Proxy - -{{TransparentUpgradeableProxy}} - -{{ProxyAdmin}} - -== Beacon - -{{BeaconProxy}} - -{{IBeacon}} - -{{UpgradeableBeacon}} - -== Minimal Clones - -{{Clones}} - -== Utils - -{{Initializable}} - -{{UUPSUpgradeable}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol deleted file mode 100644 index 7a17d4fc..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/beacon/IBeaconUpgradeable.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) - -pragma solidity ^0.8.0; - -/** - * @dev This is the interface that {BeaconProxy} expects of its beacon. - */ -interface IBeaconUpgradeable { - /** - * @dev Must return an address that can be used as a delegate call target. - * - * {BeaconProxy} will check that this address is a contract. - */ - function implementation() external view returns (address); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol deleted file mode 100644 index 134d6565..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/proxy/utils/UUPSUpgradeable.sol +++ /dev/null @@ -1,112 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) - -pragma solidity ^0.8.0; - -import "../../interfaces/draft-IERC1822Upgradeable.sol"; -import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; -import {Initializable} from "./Initializable.sol"; - -/** - * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an - * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. - * - * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is - * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing - * `UUPSUpgradeable` with a custom implementation of upgrades. - * - * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. - * - * _Available since v4.1._ - */ -abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { - /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment - address private immutable __self = address(this); - - /** - * @dev Check that the execution is being performed through a delegatecall call and that the execution context is - * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case - * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a - * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to - * fail. - */ - modifier onlyProxy() { - require(address(this) != __self, "Function must be called through delegatecall"); - require(_getImplementation() == __self, "Function must be called through active proxy"); - _; - } - - /** - * @dev Check that the execution is not being performed through a delegate call. This allows a function to be - * callable on the implementing contract but not through proxies. - */ - modifier notDelegated() { - require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); - _; - } - - function __UUPSUpgradeable_init() internal onlyInitializing { - } - - function __UUPSUpgradeable_init_unchained() internal onlyInitializing { - } - /** - * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the - * implementation. It is used to validate the implementation's compatibility when performing an upgrade. - * - * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks - * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this - * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. - */ - function proxiableUUID() external view virtual override notDelegated returns (bytes32) { - return _IMPLEMENTATION_SLOT; - } - - /** - * @dev Upgrade the implementation of the proxy to `newImplementation`. - * - * Calls {_authorizeUpgrade}. - * - * Emits an {Upgraded} event. - * - * @custom:oz-upgrades-unsafe-allow-reachable delegatecall - */ - function upgradeTo(address newImplementation) public virtual onlyProxy { - _authorizeUpgrade(newImplementation); - _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); - } - - /** - * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call - * encoded in `data`. - * - * Calls {_authorizeUpgrade}. - * - * Emits an {Upgraded} event. - * - * @custom:oz-upgrades-unsafe-allow-reachable delegatecall - */ - function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { - _authorizeUpgrade(newImplementation); - _upgradeToAndCallUUPS(newImplementation, data, true); - } - - /** - * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by - * {upgradeTo} and {upgradeToAndCall}. - * - * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. - * - * ```solidity - * function _authorizeUpgrade(address) internal override onlyOwner {} - * ``` - */ - function _authorizeUpgrade(address newImplementation) internal virtual; - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol deleted file mode 100644 index 2fa331bc..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PullPaymentUpgradeable.sol +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (security/PullPayment.sol) - -pragma solidity ^0.8.0; - -import "../utils/escrow/EscrowUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Simple implementation of a - * https://consensys.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/#favor-pull-over-push-for-external-calls[pull-payment] - * strategy, where the paying contract doesn't interact directly with the - * receiver account, which must withdraw its payments itself. - * - * Pull-payments are often considered the best practice when it comes to sending - * Ether, security-wise. It prevents recipients from blocking execution, and - * eliminates reentrancy concerns. - * - * TIP: If you would like to learn more about reentrancy and alternative ways - * to protect against it, check out our blog post - * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. - * - * To use, derive from the `PullPayment` contract, and use {_asyncTransfer} - * instead of Solidity's `transfer` function. Payees can query their due - * payments with {payments}, and retrieve them with {withdrawPayments}. - * - * @custom:storage-size 51 - */ -abstract contract PullPaymentUpgradeable is Initializable { - EscrowUpgradeable private _escrow; - - function __PullPayment_init() internal onlyInitializing { - __PullPayment_init_unchained(); - } - - function __PullPayment_init_unchained() internal onlyInitializing { - _escrow = new EscrowUpgradeable(); - _escrow.initialize(); - } - - /** - * @dev Withdraw accumulated payments, forwarding all gas to the recipient. - * - * Note that _any_ account can call this function, not just the `payee`. - * This means that contracts unaware of the `PullPayment` protocol can still - * receive funds this way, by having a separate account call - * {withdrawPayments}. - * - * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. - * Make sure you trust the recipient, or are either following the - * checks-effects-interactions pattern or using {ReentrancyGuard}. - * - * @param payee Whose payments will be withdrawn. - * - * Causes the `escrow` to emit a {Withdrawn} event. - */ - function withdrawPayments(address payable payee) public virtual { - _escrow.withdraw(payee); - } - - /** - * @dev Returns the payments owed to an address. - * @param dest The creditor's address. - */ - function payments(address dest) public view returns (uint256) { - return _escrow.depositsOf(dest); - } - - /** - * @dev Called by the payer to store the sent amount as credit to be pulled. - * Funds sent in this way are stored in an intermediate {Escrow} contract, so - * there is no danger of them being spent before withdrawal. - * - * @param dest The destination address of the funds. - * @param amount The amount to transfer. - * - * Causes the `escrow` to emit a {Deposited} event. - */ - function _asyncTransfer(address dest, uint256 amount) internal virtual { - _escrow.deposit{value: amount}(dest); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc deleted file mode 100644 index 66f398fe..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/README.adoc +++ /dev/null @@ -1,20 +0,0 @@ -= Security - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/security - -These contracts aim to cover common security practices. - -* {PullPayment}: A pattern that can be used to avoid reentrancy attacks. -* {ReentrancyGuard}: A modifier that can prevent reentrancy during certain functions. -* {Pausable}: A common emergency response mechanism that can pause functionality while a remediation is pending. - -TIP: For an overview on reentrancy and the possible mechanisms to prevent it, read our article https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. - -== Contracts - -{{PullPayment}} - -{{ReentrancyGuard}} - -{{Pausable}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol deleted file mode 100644 index 66b24250..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/ReentrancyGuardUpgradeable.sol +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) - -pragma solidity ^0.8.0; -import {Initializable} from "../proxy/utils/Initializable.sol"; - -/** - * @dev Contract module that helps prevent reentrant calls to a function. - * - * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier - * available, which can be applied to functions to make sure there are no nested - * (reentrant) calls to them. - * - * Note that because there is a single `nonReentrant` guard, functions marked as - * `nonReentrant` may not call one another. This can be worked around by making - * those functions `private`, and then adding `external` `nonReentrant` entry - * points to them. - * - * TIP: If you would like to learn more about reentrancy and alternative ways - * to protect against it, check out our blog post - * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. - */ -abstract contract ReentrancyGuardUpgradeable is Initializable { - // Booleans are more expensive than uint256 or any type that takes up a full - // word because each write operation emits an extra SLOAD to first read the - // slot's contents, replace the bits taken up by the boolean, and then write - // back. This is the compiler's defense against contract upgrades and - // pointer aliasing, and it cannot be disabled. - - // The values being non-zero value makes deployment a bit more expensive, - // but in exchange the refund on every call to nonReentrant will be lower in - // amount. Since refunds are capped to a percentage of the total - // transaction's gas, it is best to keep them low in cases like this one, to - // increase the likelihood of the full refund coming into effect. - uint256 private constant _NOT_ENTERED = 1; - uint256 private constant _ENTERED = 2; - - uint256 private _status; - - function __ReentrancyGuard_init() internal onlyInitializing { - __ReentrancyGuard_init_unchained(); - } - - function __ReentrancyGuard_init_unchained() internal onlyInitializing { - _status = _NOT_ENTERED; - } - - /** - * @dev Prevents a contract from calling itself, directly or indirectly. - * Calling a `nonReentrant` function from another `nonReentrant` - * function is not supported. It is possible to prevent this from happening - * by making the `nonReentrant` function external, and making it call a - * `private` function that does the actual work. - */ - modifier nonReentrant() { - _nonReentrantBefore(); - _; - _nonReentrantAfter(); - } - - function _nonReentrantBefore() private { - // On the first call to nonReentrant, _status will be _NOT_ENTERED - require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); - - // Any calls to nonReentrant after this point will fail - _status = _ENTERED; - } - - function _nonReentrantAfter() private { - // By storing the original value once again, a refund is triggered (see - // https://eips.ethereum.org/EIPS/eip-2200) - _status = _NOT_ENTERED; - } - - /** - * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a - * `nonReentrant` function in the call stack. - */ - function _reentrancyGuardEntered() internal view returns (bool) { - return _status == _ENTERED; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol deleted file mode 100644 index 90561110..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/ERC1155Upgradeable.sol +++ /dev/null @@ -1,509 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol) - -pragma solidity ^0.8.0; - -import "./IERC1155Upgradeable.sol"; -import "./IERC1155ReceiverUpgradeable.sol"; -import "./extensions/IERC1155MetadataURIUpgradeable.sol"; -import "../../utils/AddressUpgradeable.sol"; -import "../../utils/ContextUpgradeable.sol"; -import "../../utils/introspection/ERC165Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the basic standard multi-token. - * See https://eips.ethereum.org/EIPS/eip-1155 - * Originally based on code by Enjin: https://github.com/enjin/erc-1155 - * - * _Available since v3.1._ - */ -contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { - using AddressUpgradeable for address; - - // Mapping from token ID to account balances - mapping(uint256 => mapping(address => uint256)) private _balances; - - // Mapping from account to operator approvals - mapping(address => mapping(address => bool)) private _operatorApprovals; - - // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json - string private _uri; - - /** - * @dev See {_setURI}. - */ - function __ERC1155_init(string memory uri_) internal onlyInitializing { - __ERC1155_init_unchained(uri_); - } - - function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { - _setURI(uri_); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { - return - interfaceId == type(IERC1155Upgradeable).interfaceId || - interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || - super.supportsInterface(interfaceId); - } - - /** - * @dev See {IERC1155MetadataURI-uri}. - * - * This implementation returns the same URI for *all* token types. It relies - * on the token type ID substitution mechanism - * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. - * - * Clients calling this function must replace the `\{id\}` substring with the - * actual token type ID. - */ - function uri(uint256) public view virtual override returns (string memory) { - return _uri; - } - - /** - * @dev See {IERC1155-balanceOf}. - * - * Requirements: - * - * - `account` cannot be the zero address. - */ - function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { - require(account != address(0), "ERC1155: address zero is not a valid owner"); - return _balances[id][account]; - } - - /** - * @dev See {IERC1155-balanceOfBatch}. - * - * Requirements: - * - * - `accounts` and `ids` must have the same length. - */ - function balanceOfBatch( - address[] memory accounts, - uint256[] memory ids - ) public view virtual override returns (uint256[] memory) { - require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); - - uint256[] memory batchBalances = new uint256[](accounts.length); - - for (uint256 i = 0; i < accounts.length; ++i) { - batchBalances[i] = balanceOf(accounts[i], ids[i]); - } - - return batchBalances; - } - - /** - * @dev See {IERC1155-setApprovalForAll}. - */ - function setApprovalForAll(address operator, bool approved) public virtual override { - _setApprovalForAll(_msgSender(), operator, approved); - } - - /** - * @dev See {IERC1155-isApprovedForAll}. - */ - function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { - return _operatorApprovals[account][operator]; - } - - /** - * @dev See {IERC1155-safeTransferFrom}. - */ - function safeTransferFrom( - address from, - address to, - uint256 id, - uint256 amount, - bytes memory data - ) public virtual override { - require( - from == _msgSender() || isApprovedForAll(from, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); - _safeTransferFrom(from, to, id, amount, data); - } - - /** - * @dev See {IERC1155-safeBatchTransferFrom}. - */ - function safeBatchTransferFrom( - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) public virtual override { - require( - from == _msgSender() || isApprovedForAll(from, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); - _safeBatchTransferFrom(from, to, ids, amounts, data); - } - - /** - * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. - * - * Emits a {TransferSingle} event. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - `from` must have a balance of tokens of type `id` of at least `amount`. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the - * acceptance magic value. - */ - function _safeTransferFrom( - address from, - address to, - uint256 id, - uint256 amount, - bytes memory data - ) internal virtual { - require(to != address(0), "ERC1155: transfer to the zero address"); - - address operator = _msgSender(); - uint256[] memory ids = _asSingletonArray(id); - uint256[] memory amounts = _asSingletonArray(amount); - - _beforeTokenTransfer(operator, from, to, ids, amounts, data); - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - _balances[id][to] += amount; - - emit TransferSingle(operator, from, to, id, amount); - - _afterTokenTransfer(operator, from, to, ids, amounts, data); - - _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. - * - * Emits a {TransferBatch} event. - * - * Requirements: - * - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the - * acceptance magic value. - */ - function _safeBatchTransferFrom( - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual { - require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); - require(to != address(0), "ERC1155: transfer to the zero address"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, from, to, ids, amounts, data); - - for (uint256 i = 0; i < ids.length; ++i) { - uint256 id = ids[i]; - uint256 amount = amounts[i]; - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - _balances[id][to] += amount; - } - - emit TransferBatch(operator, from, to, ids, amounts); - - _afterTokenTransfer(operator, from, to, ids, amounts, data); - - _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); - } - - /** - * @dev Sets a new URI for all token types, by relying on the token type ID - * substitution mechanism - * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. - * - * By this mechanism, any occurrence of the `\{id\}` substring in either the - * URI or any of the amounts in the JSON file at said URI will be replaced by - * clients with the token type ID. - * - * For example, the `https://token-cdn-domain/\{id\}.json` URI would be - * interpreted by clients as - * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` - * for token type ID 0x4cce0. - * - * See {uri}. - * - * Because these URIs cannot be meaningfully represented by the {URI} event, - * this function emits no events. - */ - function _setURI(string memory newuri) internal virtual { - _uri = newuri; - } - - /** - * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. - * - * Emits a {TransferSingle} event. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the - * acceptance magic value. - */ - function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { - require(to != address(0), "ERC1155: mint to the zero address"); - - address operator = _msgSender(); - uint256[] memory ids = _asSingletonArray(id); - uint256[] memory amounts = _asSingletonArray(amount); - - _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); - - _balances[id][to] += amount; - emit TransferSingle(operator, address(0), to, id, amount); - - _afterTokenTransfer(operator, address(0), to, ids, amounts, data); - - _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. - * - * Emits a {TransferBatch} event. - * - * Requirements: - * - * - `ids` and `amounts` must have the same length. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the - * acceptance magic value. - */ - function _mintBatch( - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual { - require(to != address(0), "ERC1155: mint to the zero address"); - require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); - - for (uint256 i = 0; i < ids.length; i++) { - _balances[ids[i]][to] += amounts[i]; - } - - emit TransferBatch(operator, address(0), to, ids, amounts); - - _afterTokenTransfer(operator, address(0), to, ids, amounts, data); - - _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); - } - - /** - * @dev Destroys `amount` tokens of token type `id` from `from` - * - * Emits a {TransferSingle} event. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `from` must have at least `amount` tokens of token type `id`. - */ - function _burn(address from, uint256 id, uint256 amount) internal virtual { - require(from != address(0), "ERC1155: burn from the zero address"); - - address operator = _msgSender(); - uint256[] memory ids = _asSingletonArray(id); - uint256[] memory amounts = _asSingletonArray(amount); - - _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - - emit TransferSingle(operator, from, address(0), id, amount); - - _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. - * - * Emits a {TransferBatch} event. - * - * Requirements: - * - * - `ids` and `amounts` must have the same length. - */ - function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { - require(from != address(0), "ERC1155: burn from the zero address"); - require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); - - for (uint256 i = 0; i < ids.length; i++) { - uint256 id = ids[i]; - uint256 amount = amounts[i]; - - uint256 fromBalance = _balances[id][from]; - require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); - unchecked { - _balances[id][from] = fromBalance - amount; - } - } - - emit TransferBatch(operator, from, address(0), ids, amounts); - - _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); - } - - /** - * @dev Approve `operator` to operate on all of `owner` tokens - * - * Emits an {ApprovalForAll} event. - */ - function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { - require(owner != operator, "ERC1155: setting approval status for self"); - _operatorApprovals[owner][operator] = approved; - emit ApprovalForAll(owner, operator, approved); - } - - /** - * @dev Hook that is called before any token transfer. This includes minting - * and burning, as well as batched variants. - * - * The same hook is called on both single and batched variants. For single - * transfers, the length of the `ids` and `amounts` arrays will be 1. - * - * Calling conditions (for each `id` and `amount` pair): - * - * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * of token type `id` will be transferred to `to`. - * - When `from` is zero, `amount` tokens of token type `id` will be minted - * for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` - * will be burned. - * - `from` and `to` are never both zero. - * - `ids` and `amounts` have the same, non-zero length. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual {} - - /** - * @dev Hook that is called after any token transfer. This includes minting - * and burning, as well as batched variants. - * - * The same hook is called on both single and batched variants. For single - * transfers, the length of the `id` and `amount` arrays will be 1. - * - * Calling conditions (for each `id` and `amount` pair): - * - * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * of token type `id` will be transferred to `to`. - * - When `from` is zero, `amount` tokens of token type `id` will be minted - * for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` - * will be burned. - * - `from` and `to` are never both zero. - * - `ids` and `amounts` have the same, non-zero length. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _afterTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual {} - - function _doSafeTransferAcceptanceCheck( - address operator, - address from, - address to, - uint256 id, - uint256 amount, - bytes memory data - ) private { - if (to.isContract()) { - try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { - if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) { - revert("ERC1155: ERC1155Receiver rejected tokens"); - } - } catch Error(string memory reason) { - revert(reason); - } catch { - revert("ERC1155: transfer to non-ERC1155Receiver implementer"); - } - } - } - - function _doSafeBatchTransferAcceptanceCheck( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) private { - if (to.isContract()) { - try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( - bytes4 response - ) { - if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) { - revert("ERC1155: ERC1155Receiver rejected tokens"); - } - } catch Error(string memory reason) { - revert(reason); - } catch { - revert("ERC1155: transfer to non-ERC1155Receiver implementer"); - } - } - } - - function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { - uint256[] memory array = new uint256[](1); - array[0] = element; - - return array; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[47] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol deleted file mode 100644 index 2a40cc5a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155ReceiverUpgradeable.sol +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) - -pragma solidity ^0.8.0; - -import "../../utils/introspection/IERC165Upgradeable.sol"; - -/** - * @dev _Available since v3.1._ - */ -interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { - /** - * @dev Handles the receipt of a single ERC1155 token type. This function is - * called at the end of a `safeTransferFrom` after the balance has been updated. - * - * NOTE: To accept the transfer, this must return - * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` - * (i.e. 0xf23a6e61, or its own function selector). - * - * @param operator The address which initiated the transfer (i.e. msg.sender) - * @param from The address which previously owned the token - * @param id The ID of the token being transferred - * @param value The amount of tokens being transferred - * @param data Additional data with no specified format - * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed - */ - function onERC1155Received( - address operator, - address from, - uint256 id, - uint256 value, - bytes calldata data - ) external returns (bytes4); - - /** - * @dev Handles the receipt of a multiple ERC1155 token types. This function - * is called at the end of a `safeBatchTransferFrom` after the balances have - * been updated. - * - * NOTE: To accept the transfer(s), this must return - * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` - * (i.e. 0xbc197c81, or its own function selector). - * - * @param operator The address which initiated the batch transfer (i.e. msg.sender) - * @param from The address which previously owned the token - * @param ids An array containing ids of each token being transferred (order and length must match values array) - * @param values An array containing amounts of each token being transferred (order and length must match ids array) - * @param data Additional data with no specified format - * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed - */ - function onERC1155BatchReceived( - address operator, - address from, - uint256[] calldata ids, - uint256[] calldata values, - bytes calldata data - ) external returns (bytes4); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol deleted file mode 100644 index 461a6d00..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/IERC1155Upgradeable.sol +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) - -pragma solidity ^0.8.0; - -import "../../utils/introspection/IERC165Upgradeable.sol"; - -/** - * @dev Required interface of an ERC1155 compliant contract, as defined in the - * https://eips.ethereum.org/EIPS/eip-1155[EIP]. - * - * _Available since v3.1._ - */ -interface IERC1155Upgradeable is IERC165Upgradeable { - /** - * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. - */ - event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); - - /** - * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all - * transfers. - */ - event TransferBatch( - address indexed operator, - address indexed from, - address indexed to, - uint256[] ids, - uint256[] values - ); - - /** - * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to - * `approved`. - */ - event ApprovalForAll(address indexed account, address indexed operator, bool approved); - - /** - * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. - * - * If an {URI} event was emitted for `id`, the standard - * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value - * returned by {IERC1155MetadataURI-uri}. - */ - event URI(string value, uint256 indexed id); - - /** - * @dev Returns the amount of tokens of token type `id` owned by `account`. - * - * Requirements: - * - * - `account` cannot be the zero address. - */ - function balanceOf(address account, uint256 id) external view returns (uint256); - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. - * - * Requirements: - * - * - `accounts` and `ids` must have the same length. - */ - function balanceOfBatch( - address[] calldata accounts, - uint256[] calldata ids - ) external view returns (uint256[] memory); - - /** - * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, - * - * Emits an {ApprovalForAll} event. - * - * Requirements: - * - * - `operator` cannot be the caller. - */ - function setApprovalForAll(address operator, bool approved) external; - - /** - * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. - * - * See {setApprovalForAll}. - */ - function isApprovedForAll(address account, address operator) external view returns (bool); - - /** - * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. - * - * Emits a {TransferSingle} event. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. - * - `from` must have a balance of tokens of type `id` of at least `amount`. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the - * acceptance magic value. - */ - function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. - * - * Emits a {TransferBatch} event. - * - * Requirements: - * - * - `ids` and `amounts` must have the same length. - * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the - * acceptance magic value. - */ - function safeBatchTransferFrom( - address from, - address to, - uint256[] calldata ids, - uint256[] calldata amounts, - bytes calldata data - ) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc deleted file mode 100644 index 13ffbdbd..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/README.adoc +++ /dev/null @@ -1,49 +0,0 @@ -= ERC 1155 - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc1155 - -This set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-1155[ERC1155 Multi Token Standard]. - -The EIP consists of three interfaces which fulfill different roles, found here as {IERC1155}, {IERC1155MetadataURI} and {IERC1155Receiver}. - -{ERC1155} implements the mandatory {IERC1155} interface, as well as the optional extension {IERC1155MetadataURI}, by relying on the substitution mechanism to use the same URI for all token types, dramatically reducing gas costs. - -Additionally there are multiple custom extensions, including: - -* designation of addresses that can pause token transfers for all users ({ERC1155Pausable}). -* destruction of own tokens ({ERC1155Burnable}). - -NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC1155 (such as <>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc1155.adoc#Presets[ERC1155 Presets] (such as {ERC1155PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts. - -== Core - -{{IERC1155}} - -{{IERC1155MetadataURI}} - -{{ERC1155}} - -{{IERC1155Receiver}} - -{{ERC1155Receiver}} - -== Extensions - -{{ERC1155Pausable}} - -{{ERC1155Burnable}} - -{{ERC1155Supply}} - -{{ERC1155URIStorage}} - -== Presets - -These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code. - -{{ERC1155PresetMinterPauser}} - -== Utilities - -{{ERC1155Holder}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol deleted file mode 100644 index 112ec6ce..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/extensions/ERC1155Burnable.sol) - -pragma solidity ^0.8.0; - -import "../ERC1155Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {ERC1155} that allows token holders to destroy both their - * own tokens and those that they have been approved to use. - * - * _Available since v3.1._ - */ -abstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable { - function __ERC1155Burnable_init() internal onlyInitializing { - } - - function __ERC1155Burnable_init_unchained() internal onlyInitializing { - } - function burn(address account, uint256 id, uint256 value) public virtual { - require( - account == _msgSender() || isApprovedForAll(account, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); - - _burn(account, id, value); - } - - function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { - require( - account == _msgSender() || isApprovedForAll(account, _msgSender()), - "ERC1155: caller is not token owner or approved" - ); - - _burnBatch(account, ids, values); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol deleted file mode 100644 index dc766cf7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC1155/extensions/ERC1155Pausable.sol) - -pragma solidity ^0.8.0; - -import "../ERC1155Upgradeable.sol"; -import "../../../security/PausableUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev ERC1155 token with pausable token transfers, minting and burning. - * - * Useful for scenarios such as preventing trades until the end of an evaluation - * period, or having an emergency switch for freezing all token transfers in the - * event of a large bug. - * - * IMPORTANT: This contract does not include public pause and unpause functions. In - * addition to inheriting this contract, you must define both functions, invoking the - * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate - * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will - * make the contract unpausable. - * - * _Available since v3.1._ - */ -abstract contract ERC1155PausableUpgradeable is Initializable, ERC1155Upgradeable, PausableUpgradeable { - function __ERC1155Pausable_init() internal onlyInitializing { - __Pausable_init_unchained(); - } - - function __ERC1155Pausable_init_unchained() internal onlyInitializing { - } - /** - * @dev See {ERC1155-_beforeTokenTransfer}. - * - * Requirements: - * - * - the contract must not be paused. - */ - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual override { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - - require(!paused(), "ERC1155Pausable: token transfer while paused"); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol deleted file mode 100644 index 1b97ad16..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) - -pragma solidity ^0.8.0; - -import "../ERC1155Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of ERC1155 that adds tracking of total supply per id. - * - * Useful for scenarios where Fungible and Non-fungible tokens have to be - * clearly identified. Note: While a totalSupply of 1 might mean the - * corresponding is an NFT, there is no guarantees that no other token with the - * same id are not going to be minted. - */ -abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { - mapping(uint256 => uint256) private _totalSupply; - - function __ERC1155Supply_init() internal onlyInitializing { - } - - function __ERC1155Supply_init_unchained() internal onlyInitializing { - } - /** - * @dev Total amount of tokens in with a given id. - */ - function totalSupply(uint256 id) public view virtual returns (uint256) { - return _totalSupply[id]; - } - - /** - * @dev Indicates whether any token exist with a given id, or not. - */ - function exists(uint256 id) public view virtual returns (bool) { - return ERC1155SupplyUpgradeable.totalSupply(id) > 0; - } - - /** - * @dev See {ERC1155-_beforeTokenTransfer}. - */ - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual override { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - - if (from == address(0)) { - for (uint256 i = 0; i < ids.length; ++i) { - _totalSupply[ids[i]] += amounts[i]; - } - } - - if (to == address(0)) { - for (uint256 i = 0; i < ids.length; ++i) { - uint256 id = ids[i]; - uint256 amount = amounts[i]; - uint256 supply = _totalSupply[id]; - require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); - unchecked { - _totalSupply[id] = supply - amount; - } - } - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol deleted file mode 100644 index d07e60bc..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) - -pragma solidity ^0.8.0; - -import "../../../utils/StringsUpgradeable.sol"; -import "../ERC1155Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev ERC1155 token with storage based token URI management. - * Inspired by the ERC721URIStorage extension - * - * _Available since v4.6._ - */ -abstract contract ERC1155URIStorageUpgradeable is Initializable, ERC1155Upgradeable { - using StringsUpgradeable for uint256; - - // Optional base URI - string private _baseURI; - - // Optional mapping for token URIs - mapping(uint256 => string) private _tokenURIs; - - function __ERC1155URIStorage_init() internal onlyInitializing { - __ERC1155URIStorage_init_unchained(); - } - - function __ERC1155URIStorage_init_unchained() internal onlyInitializing { - _baseURI = ""; - } - /** - * @dev See {IERC1155MetadataURI-uri}. - * - * This implementation returns the concatenation of the `_baseURI` - * and the token-specific uri if the latter is set - * - * This enables the following behaviors: - * - * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation - * of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` - * is empty per default); - * - * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` - * which in most cases will contain `ERC1155._uri`; - * - * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a - * uri value set, then the result is empty. - */ - function uri(uint256 tokenId) public view virtual override returns (string memory) { - string memory tokenURI = _tokenURIs[tokenId]; - - // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). - return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); - } - - /** - * @dev Sets `tokenURI` as the tokenURI of `tokenId`. - */ - function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { - _tokenURIs[tokenId] = tokenURI; - emit URI(uri(tokenId), tokenId); - } - - /** - * @dev Sets `baseURI` as the `_baseURI` for all tokens - */ - function _setBaseURI(string memory baseURI) internal virtual { - _baseURI = baseURI; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol deleted file mode 100644 index e47f021d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) - -pragma solidity ^0.8.0; - -import "../IERC1155Upgradeable.sol"; - -/** - * @dev Interface of the optional ERC1155MetadataExtension interface, as defined - * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. - * - * _Available since v3.1._ - */ -interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { - /** - * @dev Returns the URI for token type `id`. - * - * If the `\{id\}` substring is present in the URI, it must be replaced by - * clients with the actual token type ID. - */ - function uri(uint256 id) external view returns (string memory); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol deleted file mode 100644 index 9b807b19..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol +++ /dev/null @@ -1,131 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol) - -pragma solidity ^0.8.0; - -import "../ERC1155Upgradeable.sol"; -import "../extensions/ERC1155BurnableUpgradeable.sol"; -import "../extensions/ERC1155PausableUpgradeable.sol"; -import "../../../access/AccessControlEnumerableUpgradeable.sol"; -import "../../../utils/ContextUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev {ERC1155} token, including: - * - * - ability for holders to burn (destroy) their tokens - * - a minter role that allows for token minting (creation) - * - a pauser role that allows to stop all token transfers - * - * This contract uses {AccessControl} to lock permissioned functions using the - * different roles - head to its documentation for details. - * - * The account that deploys the contract will be granted the minter and pauser - * roles, as well as the default admin role, which will let it grant both minter - * and pauser roles to other accounts. - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC1155PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC1155BurnableUpgradeable, ERC1155PausableUpgradeable { - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); - - function initialize(string memory uri) public virtual initializer { - __ERC1155PresetMinterPauser_init(uri); - } - /** - * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that - * deploys the contract. - */ - function __ERC1155PresetMinterPauser_init(string memory uri) internal onlyInitializing { - __ERC1155_init_unchained(uri); - __Pausable_init_unchained(); - __ERC1155PresetMinterPauser_init_unchained(uri); - } - - function __ERC1155PresetMinterPauser_init_unchained(string memory) internal onlyInitializing { - _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); - - _setupRole(MINTER_ROLE, _msgSender()); - _setupRole(PAUSER_ROLE, _msgSender()); - } - - /** - * @dev Creates `amount` new tokens for `to`, of token type `id`. - * - * See {ERC1155-_mint}. - * - * Requirements: - * - * - the caller must have the `MINTER_ROLE`. - */ - function mint(address to, uint256 id, uint256 amount, bytes memory data) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); - - _mint(to, id, amount, data); - } - - /** - * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}. - */ - function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); - - _mintBatch(to, ids, amounts, data); - } - - /** - * @dev Pauses all token transfers. - * - * See {ERC1155Pausable} and {Pausable-_pause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function pause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to pause"); - _pause(); - } - - /** - * @dev Unpauses all token transfers. - * - * See {ERC1155Pausable} and {Pausable-_unpause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function unpause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to unpause"); - _unpause(); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface( - bytes4 interfaceId - ) public view virtual override(AccessControlEnumerableUpgradeable, ERC1155Upgradeable) returns (bool) { - return super.supportsInterface(interfaceId); - } - - function _beforeTokenTransfer( - address operator, - address from, - address to, - uint256[] memory ids, - uint256[] memory amounts, - bytes memory data - ) internal virtual override(ERC1155Upgradeable, ERC1155PausableUpgradeable) { - super._beforeTokenTransfer(operator, from, to, ids, amounts, data); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md deleted file mode 100644 index 468200b7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/presets/README.md +++ /dev/null @@ -1 +0,0 @@ -Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol deleted file mode 100644 index 00b16a4a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155HolderUpgradeable.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) - -pragma solidity ^0.8.0; - -import "./ERC1155ReceiverUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. - * - * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be - * stuck. - * - * @dev _Available since v3.1._ - */ -contract ERC1155HolderUpgradeable is Initializable, ERC1155ReceiverUpgradeable { - function __ERC1155Holder_init() internal onlyInitializing { - } - - function __ERC1155Holder_init_unchained() internal onlyInitializing { - } - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155Received.selector; - } - - function onERC1155BatchReceived( - address, - address, - uint256[] memory, - uint256[] memory, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155BatchReceived.selector; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol deleted file mode 100644 index 19b7cc60..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) - -pragma solidity ^0.8.0; - -import "../IERC1155ReceiverUpgradeable.sol"; -import "../../../utils/introspection/ERC165Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev _Available since v3.1._ - */ -abstract contract ERC1155ReceiverUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable { - function __ERC1155Receiver_init() internal onlyInitializing { - } - - function __ERC1155Receiver_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { - return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol deleted file mode 100644 index bbb2c87b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/ERC20Upgradeable.sol +++ /dev/null @@ -1,377 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) - -pragma solidity ^0.8.0; - -import "./IERC20Upgradeable.sol"; -import "./extensions/IERC20MetadataUpgradeable.sol"; -import "../../utils/ContextUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the {IERC20} interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using {_mint}. - * For a generic mechanism see {ERC20PresetMinterPauser}. - * - * TIP: For a detailed writeup see our guide - * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How - * to implement supply mechanisms]. - * - * The default value of {decimals} is 18. To change this, you should override - * this function so it returns a different value. - * - * We have followed general OpenZeppelin Contracts guidelines: functions revert - * instead returning `false` on failure. This behavior is nonetheless - * conventional and does not conflict with the expectations of ERC20 - * applications. - * - * Additionally, an {Approval} event is emitted on calls to {transferFrom}. - * This allows applications to reconstruct the allowance for all accounts just - * by listening to said events. Other implementations of the EIP may not emit - * these events, as it isn't required by the specification. - * - * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} - * functions have been added to mitigate the well-known issues around setting - * allowances. See {IERC20-approve}. - */ -contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { - mapping(address => uint256) private _balances; - - mapping(address => mapping(address => uint256)) private _allowances; - - uint256 private _totalSupply; - - string private _name; - string private _symbol; - - /** - * @dev Sets the values for {name} and {symbol}. - * - * All two of these values are immutable: they can only be set once during - * construction. - */ - function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { - __ERC20_init_unchained(name_, symbol_); - } - - function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { - _name = name_; - _symbol = symbol_; - } - - /** - * @dev Returns the name of the token. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev Returns the symbol of the token, usually a shorter version of the - * name. - */ - function symbol() public view virtual override returns (string memory) { - return _symbol; - } - - /** - * @dev Returns the number of decimals used to get its user representation. - * For example, if `decimals` equals `2`, a balance of `505` tokens should - * be displayed to a user as `5.05` (`505 / 10 ** 2`). - * - * Tokens usually opt for a value of 18, imitating the relationship between - * Ether and Wei. This is the default value returned by this function, unless - * it's overridden. - * - * NOTE: This information is only used for _display_ purposes: it in - * no way affects any of the arithmetic of the contract, including - * {IERC20-balanceOf} and {IERC20-transfer}. - */ - function decimals() public view virtual override returns (uint8) { - return 18; - } - - /** - * @dev See {IERC20-totalSupply}. - */ - function totalSupply() public view virtual override returns (uint256) { - return _totalSupply; - } - - /** - * @dev See {IERC20-balanceOf}. - */ - function balanceOf(address account) public view virtual override returns (uint256) { - return _balances[account]; - } - - /** - * @dev See {IERC20-transfer}. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - the caller must have a balance of at least `amount`. - */ - function transfer(address to, uint256 amount) public virtual override returns (bool) { - address owner = _msgSender(); - _transfer(owner, to, amount); - return true; - } - - /** - * @dev See {IERC20-allowance}. - */ - function allowance(address owner, address spender) public view virtual override returns (uint256) { - return _allowances[owner][spender]; - } - - /** - * @dev See {IERC20-approve}. - * - * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on - * `transferFrom`. This is semantically equivalent to an infinite approval. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function approve(address spender, uint256 amount) public virtual override returns (bool) { - address owner = _msgSender(); - _approve(owner, spender, amount); - return true; - } - - /** - * @dev See {IERC20-transferFrom}. - * - * Emits an {Approval} event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of {ERC20}. - * - * NOTE: Does not update the allowance if the current allowance - * is the maximum `uint256`. - * - * Requirements: - * - * - `from` and `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - * - the caller must have allowance for ``from``'s tokens of at least - * `amount`. - */ - function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { - address spender = _msgSender(); - _spendAllowance(from, spender, amount); - _transfer(from, to, amount); - return true; - } - - /** - * @dev Atomically increases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - */ - function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { - address owner = _msgSender(); - _approve(owner, spender, allowance(owner, spender) + addedValue); - return true; - } - - /** - * @dev Atomically decreases the allowance granted to `spender` by the caller. - * - * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {IERC20-approve}. - * - * Emits an {Approval} event indicating the updated allowance. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `spender` must have allowance for the caller of at least - * `subtractedValue`. - */ - function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { - address owner = _msgSender(); - uint256 currentAllowance = allowance(owner, spender); - require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); - unchecked { - _approve(owner, spender, currentAllowance - subtractedValue); - } - - return true; - } - - /** - * @dev Moves `amount` of tokens from `from` to `to`. - * - * This internal function is equivalent to {transfer}, and can be used to - * e.g. implement automatic token fees, slashing mechanisms, etc. - * - * Emits a {Transfer} event. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `from` must have a balance of at least `amount`. - */ - function _transfer(address from, address to, uint256 amount) internal virtual { - require(from != address(0), "ERC20: transfer from the zero address"); - require(to != address(0), "ERC20: transfer to the zero address"); - - _beforeTokenTransfer(from, to, amount); - - uint256 fromBalance = _balances[from]; - require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); - unchecked { - _balances[from] = fromBalance - amount; - // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by - // decrementing then incrementing. - _balances[to] += amount; - } - - emit Transfer(from, to, amount); - - _afterTokenTransfer(from, to, amount); - } - - /** @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * Emits a {Transfer} event with `from` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - */ - function _mint(address account, uint256 amount) internal virtual { - require(account != address(0), "ERC20: mint to the zero address"); - - _beforeTokenTransfer(address(0), account, amount); - - _totalSupply += amount; - unchecked { - // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. - _balances[account] += amount; - } - emit Transfer(address(0), account, amount); - - _afterTokenTransfer(address(0), account, amount); - } - - /** - * @dev Destroys `amount` tokens from `account`, reducing the - * total supply. - * - * Emits a {Transfer} event with `to` set to the zero address. - * - * Requirements: - * - * - `account` cannot be the zero address. - * - `account` must have at least `amount` tokens. - */ - function _burn(address account, uint256 amount) internal virtual { - require(account != address(0), "ERC20: burn from the zero address"); - - _beforeTokenTransfer(account, address(0), amount); - - uint256 accountBalance = _balances[account]; - require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); - unchecked { - _balances[account] = accountBalance - amount; - // Overflow not possible: amount <= accountBalance <= totalSupply. - _totalSupply -= amount; - } - - emit Transfer(account, address(0), amount); - - _afterTokenTransfer(account, address(0), amount); - } - - /** - * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. - * - * This internal function is equivalent to `approve`, and can be used to - * e.g. set automatic allowances for certain subsystems, etc. - * - * Emits an {Approval} event. - * - * Requirements: - * - * - `owner` cannot be the zero address. - * - `spender` cannot be the zero address. - */ - function _approve(address owner, address spender, uint256 amount) internal virtual { - require(owner != address(0), "ERC20: approve from the zero address"); - require(spender != address(0), "ERC20: approve to the zero address"); - - _allowances[owner][spender] = amount; - emit Approval(owner, spender, amount); - } - - /** - * @dev Updates `owner` s allowance for `spender` based on spent `amount`. - * - * Does not update the allowance amount in case of infinite allowance. - * Revert if not enough allowance is available. - * - * Might emit an {Approval} event. - */ - function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { - uint256 currentAllowance = allowance(owner, spender); - if (currentAllowance != type(uint256).max) { - require(currentAllowance >= amount, "ERC20: insufficient allowance"); - unchecked { - _approve(owner, spender, currentAllowance - amount); - } - } - } - - /** - * @dev Hook that is called before any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * will be transferred to `to`. - * - when `from` is zero, `amount` tokens will be minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} - - /** - * @dev Hook that is called after any transfer of tokens. This includes - * minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * has been transferred to `to`. - * - when `from` is zero, `amount` tokens have been minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens have been burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[45] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol deleted file mode 100644 index f57407b4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/IERC20Upgradeable.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. - */ -interface IERC20Upgradeable { - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to {approve}. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); - - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `to`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transfer(address to, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through {transferFrom}. This is - * zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `from` to `to` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transferFrom(address from, address to, uint256 amount) external returns (bool); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc deleted file mode 100644 index 4d1cc0f2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/README.adoc +++ /dev/null @@ -1,80 +0,0 @@ -= ERC 20 - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc20 - -This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-20[ERC20 Token Standard]. - -TIP: For an overview of ERC20 tokens and a walk through on how to create a token contract read our xref:ROOT:erc20.adoc[ERC20 guide]. - -There are a few core contracts that implement the behavior specified in the EIP: - -* {IERC20}: the interface all ERC20 implementations should conform to. -* {IERC20Metadata}: the extended ERC20 interface including the <>, <> and <> functions. -* {ERC20}: the implementation of the ERC20 interface, including the <>, <> and <> optional standard extension to the base interface. - -Additionally there are multiple custom extensions, including: - -* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612). -* {ERC20Burnable}: destruction of own tokens. -* {ERC20Capped}: enforcement of a cap to the total supply when minting tokens. -* {ERC20Pausable}: ability to pause token transfers. -* {ERC20Snapshot}: efficient storage of past token balances to be later queried at any point in time. -* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156). -* {ERC20Votes}: support for voting and vote delegation. -* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions). -* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}. -* {ERC4626}: tokenized vault that manages shares (represented as ERC20) that are backed by assets (another ERC20). - -Finally, there are some utilities to interact with ERC20 contracts in various ways. - -* {SafeERC20}: a wrapper around the interface that eliminates the need to handle boolean return values. -* {TokenTimelock}: hold tokens for a beneficiary until a specified time. - -NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as <>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc20.adoc#Presets[ERC20 Presets] (such as {ERC20PresetMinterPauser}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts. - -== Core - -{{IERC20}} - -{{IERC20Metadata}} - -{{ERC20}} - -== Extensions - -{{IERC20Permit}} - -{{ERC20Permit}} - -{{ERC20Burnable}} - -{{ERC20Capped}} - -{{ERC20Pausable}} - -{{ERC20Snapshot}} - -{{ERC20Votes}} - -{{ERC20VotesComp}} - -{{ERC20Wrapper}} - -{{ERC20FlashMint}} - -{{ERC4626}} - -== Presets - -These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code. - -{{ERC20PresetMinterPauser}} - -{{ERC20PresetFixedSupply}} - -== Utilities - -{{SafeERC20}} - -{{TokenTimelock}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol deleted file mode 100644 index 7fabbcaa..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20BurnableUpgradeable.sol +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) - -pragma solidity ^0.8.0; - -import "../ERC20Upgradeable.sol"; -import "../../../utils/ContextUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {ERC20} that allows token holders to destroy both their own - * tokens and those that they have an allowance for, in a way that can be - * recognized off-chain (via event analysis). - */ -abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable { - function __ERC20Burnable_init() internal onlyInitializing { - } - - function __ERC20Burnable_init_unchained() internal onlyInitializing { - } - /** - * @dev Destroys `amount` tokens from the caller. - * - * See {ERC20-_burn}. - */ - function burn(uint256 amount) public virtual { - _burn(_msgSender(), amount); - } - - /** - * @dev Destroys `amount` tokens from `account`, deducting from the caller's - * allowance. - * - * See {ERC20-_burn} and {ERC20-allowance}. - * - * Requirements: - * - * - the caller must have allowance for ``accounts``'s tokens of at least - * `amount`. - */ - function burnFrom(address account, uint256 amount) public virtual { - _spendAllowance(account, _msgSender(), amount); - _burn(account, amount); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol deleted file mode 100644 index b85257e2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20CappedUpgradeable.sol +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) - -pragma solidity ^0.8.0; - -import "../ERC20Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of {ERC20} that adds a cap to the supply of tokens. - * - * @custom:storage-size 51 - */ -abstract contract ERC20CappedUpgradeable is Initializable, ERC20Upgradeable { - uint256 private _cap; - - /** - * @dev Sets the value of the `cap`. This value is immutable, it can only be - * set once during construction. - */ - function __ERC20Capped_init(uint256 cap_) internal onlyInitializing { - __ERC20Capped_init_unchained(cap_); - } - - function __ERC20Capped_init_unchained(uint256 cap_) internal onlyInitializing { - require(cap_ > 0, "ERC20Capped: cap is 0"); - _cap = cap_; - } - - /** - * @dev Returns the cap on the token's total supply. - */ - function cap() public view virtual returns (uint256) { - return _cap; - } - - /** - * @dev See {ERC20-_mint}. - */ - function _mint(address account, uint256 amount) internal virtual override { - require(ERC20Upgradeable.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded"); - super._mint(account, amount); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol deleted file mode 100644 index 2db1ef52..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PausableUpgradeable.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Pausable.sol) - -pragma solidity ^0.8.0; - -import "../ERC20Upgradeable.sol"; -import "../../../security/PausableUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev ERC20 token with pausable token transfers, minting and burning. - * - * Useful for scenarios such as preventing trades until the end of an evaluation - * period, or having an emergency switch for freezing all token transfers in the - * event of a large bug. - * - * IMPORTANT: This contract does not include public pause and unpause functions. In - * addition to inheriting this contract, you must define both functions, invoking the - * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate - * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will - * make the contract unpausable. - */ -abstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable { - function __ERC20Pausable_init() internal onlyInitializing { - __Pausable_init_unchained(); - } - - function __ERC20Pausable_init_unchained() internal onlyInitializing { - } - /** - * @dev See {ERC20-_beforeTokenTransfer}. - * - * Requirements: - * - * - the contract must not be paused. - */ - function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { - super._beforeTokenTransfer(from, to, amount); - - require(!paused(), "ERC20Pausable: token transfer while paused"); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol deleted file mode 100644 index 1d84d386..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20PermitUpgradeable.sol +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol) - -pragma solidity ^0.8.0; - -import "./IERC20PermitUpgradeable.sol"; -import "../ERC20Upgradeable.sol"; -import "../../../utils/cryptography/ECDSAUpgradeable.sol"; -import "../../../utils/cryptography/EIP712Upgradeable.sol"; -import "../../../utils/CountersUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in - * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. - * - * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by - * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't - * need to send a transaction, and thus is not required to hold Ether at all. - * - * _Available since v3.4._ - * - * @custom:storage-size 51 - */ -abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable { - using CountersUpgradeable for CountersUpgradeable.Counter; - - mapping(address => CountersUpgradeable.Counter) private _nonces; - - // solhint-disable-next-line var-name-mixedcase - bytes32 private constant _PERMIT_TYPEHASH = - keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); - /** - * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. - * However, to ensure consistency with the upgradeable transpiler, we will continue - * to reserve a slot. - * @custom:oz-renamed-from _PERMIT_TYPEHASH - */ - // solhint-disable-next-line var-name-mixedcase - bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; - - /** - * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. - * - * It's a good idea to use the same `name` that is defined as the ERC20 token name. - */ - function __ERC20Permit_init(string memory name) internal onlyInitializing { - __EIP712_init_unchained(name, "1"); - } - - function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {} - - /** - * @inheritdoc IERC20PermitUpgradeable - */ - function permit( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override { - require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); - - bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); - - bytes32 hash = _hashTypedDataV4(structHash); - - address signer = ECDSAUpgradeable.recover(hash, v, r, s); - require(signer == owner, "ERC20Permit: invalid signature"); - - _approve(owner, spender, value); - } - - /** - * @inheritdoc IERC20PermitUpgradeable - */ - function nonces(address owner) public view virtual override returns (uint256) { - return _nonces[owner].current(); - } - - /** - * @inheritdoc IERC20PermitUpgradeable - */ - // solhint-disable-next-line func-name-mixedcase - function DOMAIN_SEPARATOR() external view override returns (bytes32) { - return _domainSeparatorV4(); - } - - /** - * @dev "Consume a nonce": return the current value and increment. - * - * _Available since v4.1._ - */ - function _useNonce(address owner) internal virtual returns (uint256 current) { - CountersUpgradeable.Counter storage nonce = _nonces[owner]; - current = nonce.current(); - nonce.increment(); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol deleted file mode 100644 index 13c9b8fa..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol +++ /dev/null @@ -1,204 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Snapshot.sol) - -pragma solidity ^0.8.0; - -import "../ERC20Upgradeable.sol"; -import "../../../utils/ArraysUpgradeable.sol"; -import "../../../utils/CountersUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and - * total supply at the time are recorded for later access. - * - * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. - * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different - * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be - * used to create an efficient ERC20 forking mechanism. - * - * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a - * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot - * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id - * and the account address. - * - * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it - * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this - * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract. - * - * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient - * alternative consider {ERC20Votes}. - * - * ==== Gas Costs - * - * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log - * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much - * smaller since identical balances in subsequent snapshots are stored as a single entry. - * - * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is - * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent - * transfers will have normal cost until the next snapshot, and so on. - */ - -abstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable { - // Inspired by Jordi Baylina's MiniMeToken to record historical balances: - // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol - - using ArraysUpgradeable for uint256[]; - using CountersUpgradeable for CountersUpgradeable.Counter; - - // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a - // Snapshot struct, but that would impede usage of functions that work on an array. - struct Snapshots { - uint256[] ids; - uint256[] values; - } - - mapping(address => Snapshots) private _accountBalanceSnapshots; - Snapshots private _totalSupplySnapshots; - - // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. - CountersUpgradeable.Counter private _currentSnapshotId; - - /** - * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. - */ - event Snapshot(uint256 id); - - function __ERC20Snapshot_init() internal onlyInitializing { - } - - function __ERC20Snapshot_init_unchained() internal onlyInitializing { - } - /** - * @dev Creates a new snapshot and returns its snapshot id. - * - * Emits a {Snapshot} event that contains the same id. - * - * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a - * set of accounts, for example using {AccessControl}, or it may be open to the public. - * - * [WARNING] - * ==== - * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, - * you must consider that it can potentially be used by attackers in two ways. - * - * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow - * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target - * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs - * section above. - * - * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. - * ==== - */ - function _snapshot() internal virtual returns (uint256) { - _currentSnapshotId.increment(); - - uint256 currentId = _getCurrentSnapshotId(); - emit Snapshot(currentId); - return currentId; - } - - /** - * @dev Get the current snapshotId - */ - function _getCurrentSnapshotId() internal view virtual returns (uint256) { - return _currentSnapshotId.current(); - } - - /** - * @dev Retrieves the balance of `account` at the time `snapshotId` was created. - */ - function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) { - (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); - - return snapshotted ? value : balanceOf(account); - } - - /** - * @dev Retrieves the total supply at the time `snapshotId` was created. - */ - function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) { - (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); - - return snapshotted ? value : totalSupply(); - } - - // Update balance and/or total supply snapshots before the values are modified. This is implemented - // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. - function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { - super._beforeTokenTransfer(from, to, amount); - - if (from == address(0)) { - // mint - _updateAccountSnapshot(to); - _updateTotalSupplySnapshot(); - } else if (to == address(0)) { - // burn - _updateAccountSnapshot(from); - _updateTotalSupplySnapshot(); - } else { - // transfer - _updateAccountSnapshot(from); - _updateAccountSnapshot(to); - } - } - - function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { - require(snapshotId > 0, "ERC20Snapshot: id is 0"); - require(snapshotId <= _getCurrentSnapshotId(), "ERC20Snapshot: nonexistent id"); - - // When a valid snapshot is queried, there are three possibilities: - // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never - // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds - // to this id is the current one. - // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the - // requested id, and its value is the one to return. - // c) More snapshots were created after the requested one, and the queried value was later modified. There will be - // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is - // larger than the requested one. - // - // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if - // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does - // exactly this. - - uint256 index = snapshots.ids.findUpperBound(snapshotId); - - if (index == snapshots.ids.length) { - return (false, 0); - } else { - return (true, snapshots.values[index]); - } - } - - function _updateAccountSnapshot(address account) private { - _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); - } - - function _updateTotalSupplySnapshot() private { - _updateSnapshot(_totalSupplySnapshots, totalSupply()); - } - - function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { - uint256 currentId = _getCurrentSnapshotId(); - if (_lastSnapshotId(snapshots.ids) < currentId) { - snapshots.ids.push(currentId); - snapshots.values.push(currentValue); - } - } - - function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { - if (ids.length == 0) { - return 0; - } else { - return ids[ids.length - 1]; - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[46] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol deleted file mode 100644 index 73c9ae55..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20VotesComp.sol) - -pragma solidity ^0.8.0; - -import "./ERC20VotesUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of ERC20 to support Compound's voting and delegation. This version exactly matches Compound's - * interface, with the drawback of only supporting supply up to (2^96^ - 1). - * - * NOTE: You should use this contract if you need exact compatibility with COMP (for example in order to use your token - * with Governor Alpha or Bravo) and if you are sure the supply cap of 2^96^ is enough for you. Otherwise, use the - * {ERC20Votes} variant of this module. - * - * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either - * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting - * power can be queried through the public accessors {getCurrentVotes} and {getPriorVotes}. - * - * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it - * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. - * - * _Available since v4.2._ - */ -abstract contract ERC20VotesCompUpgradeable is Initializable, ERC20VotesUpgradeable { - function __ERC20VotesComp_init() internal onlyInitializing { - } - - function __ERC20VotesComp_init_unchained() internal onlyInitializing { - } - /** - * @dev Comp version of the {getVotes} accessor, with `uint96` return type. - */ - function getCurrentVotes(address account) external view virtual returns (uint96) { - return SafeCastUpgradeable.toUint96(getVotes(account)); - } - - /** - * @dev Comp version of the {getPastVotes} accessor, with `uint96` return type. - */ - function getPriorVotes(address account, uint256 blockNumber) external view virtual returns (uint96) { - return SafeCastUpgradeable.toUint96(getPastVotes(account, blockNumber)); - } - - /** - * @dev Maximum token supply. Reduced to `type(uint96).max` (2^96^ - 1) to fit COMP interface. - */ - function _maxSupply() internal view virtual override returns (uint224) { - return type(uint96).max; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol deleted file mode 100644 index aefd66b8..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20VotesUpgradeable.sol +++ /dev/null @@ -1,303 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Votes.sol) - -pragma solidity ^0.8.0; - -import "./ERC20PermitUpgradeable.sol"; -import "../../../interfaces/IERC5805Upgradeable.sol"; -import "../../../utils/math/MathUpgradeable.sol"; -import "../../../utils/math/SafeCastUpgradeable.sol"; -import "../../../utils/cryptography/ECDSAUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, - * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. - * - * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module. - * - * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either - * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting - * power can be queried through the public accessors {getVotes} and {getPastVotes}. - * - * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it - * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. - * - * _Available since v4.2._ - */ -abstract contract ERC20VotesUpgradeable is Initializable, ERC20PermitUpgradeable, IERC5805Upgradeable { - struct Checkpoint { - uint32 fromBlock; - uint224 votes; - } - - bytes32 private constant _DELEGATION_TYPEHASH = - keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); - - mapping(address => address) private _delegates; - mapping(address => Checkpoint[]) private _checkpoints; - Checkpoint[] private _totalSupplyCheckpoints; - - function __ERC20Votes_init() internal onlyInitializing { - } - - function __ERC20Votes_init_unchained() internal onlyInitializing { - } - /** - * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). - */ - function clock() public view virtual override returns (uint48) { - return SafeCastUpgradeable.toUint48(block.number); - } - - /** - * @dev Description of the clock - */ - // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory) { - // Check that the clock was not modified - require(clock() == block.number, "ERC20Votes: broken clock mode"); - return "mode=blocknumber&from=default"; - } - - /** - * @dev Get the `pos`-th checkpoint for `account`. - */ - function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) { - return _checkpoints[account][pos]; - } - - /** - * @dev Get number of checkpoints for `account`. - */ - function numCheckpoints(address account) public view virtual returns (uint32) { - return SafeCastUpgradeable.toUint32(_checkpoints[account].length); - } - - /** - * @dev Get the address `account` is currently delegating to. - */ - function delegates(address account) public view virtual override returns (address) { - return _delegates[account]; - } - - /** - * @dev Gets the current votes balance for `account` - */ - function getVotes(address account) public view virtual override returns (uint256) { - uint256 pos = _checkpoints[account].length; - unchecked { - return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes; - } - } - - /** - * @dev Retrieve the number of votes for `account` at the end of `timepoint`. - * - * Requirements: - * - * - `timepoint` must be in the past - */ - function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "ERC20Votes: future lookup"); - return _checkpointsLookup(_checkpoints[account], timepoint); - } - - /** - * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. - * It is NOT the sum of all the delegated votes! - * - * Requirements: - * - * - `timepoint` must be in the past - */ - function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "ERC20Votes: future lookup"); - return _checkpointsLookup(_totalSupplyCheckpoints, timepoint); - } - - /** - * @dev Lookup a value in a list of (sorted) checkpoints. - */ - function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 timepoint) private view returns (uint256) { - // We run a binary search to look for the last (most recent) checkpoint taken before (or at) `timepoint`. - // - // Initially we check if the block is recent to narrow the search range. - // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). - // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. - // - If the middle checkpoint is after `timepoint`, we look in [low, mid) - // - If the middle checkpoint is before or equal to `timepoint`, we look in [mid+1, high) - // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not - // out of bounds (in which case we're looking too far in the past and the result is 0). - // Note that if the latest checkpoint available is exactly for `timepoint`, we end up with an index that is - // past the end of the array, so we technically don't find a checkpoint after `timepoint`, but it works out - // the same. - uint256 length = ckpts.length; - - uint256 low = 0; - uint256 high = length; - - if (length > 5) { - uint256 mid = length - MathUpgradeable.sqrt(length); - if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { - high = mid; - } else { - low = mid + 1; - } - } - - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - if (_unsafeAccess(ckpts, mid).fromBlock > timepoint) { - high = mid; - } else { - low = mid + 1; - } - } - - unchecked { - return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes; - } - } - - /** - * @dev Delegate votes from the sender to `delegatee`. - */ - function delegate(address delegatee) public virtual override { - _delegate(_msgSender(), delegatee); - } - - /** - * @dev Delegates votes from signer to `delegatee` - */ - function delegateBySig( - address delegatee, - uint256 nonce, - uint256 expiry, - uint8 v, - bytes32 r, - bytes32 s - ) public virtual override { - require(block.timestamp <= expiry, "ERC20Votes: signature expired"); - address signer = ECDSAUpgradeable.recover( - _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), - v, - r, - s - ); - require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce"); - _delegate(signer, delegatee); - } - - /** - * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). - */ - function _maxSupply() internal view virtual returns (uint224) { - return type(uint224).max; - } - - /** - * @dev Snapshots the totalSupply after it has been increased. - */ - function _mint(address account, uint256 amount) internal virtual override { - super._mint(account, amount); - require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes"); - - _writeCheckpoint(_totalSupplyCheckpoints, _add, amount); - } - - /** - * @dev Snapshots the totalSupply after it has been decreased. - */ - function _burn(address account, uint256 amount) internal virtual override { - super._burn(account, amount); - - _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount); - } - - /** - * @dev Move voting power when tokens are transferred. - * - * Emits a {IVotes-DelegateVotesChanged} event. - */ - function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override { - super._afterTokenTransfer(from, to, amount); - - _moveVotingPower(delegates(from), delegates(to), amount); - } - - /** - * @dev Change delegation for `delegator` to `delegatee`. - * - * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. - */ - function _delegate(address delegator, address delegatee) internal virtual { - address currentDelegate = delegates(delegator); - uint256 delegatorBalance = balanceOf(delegator); - _delegates[delegator] = delegatee; - - emit DelegateChanged(delegator, currentDelegate, delegatee); - - _moveVotingPower(currentDelegate, delegatee, delegatorBalance); - } - - function _moveVotingPower(address src, address dst, uint256 amount) private { - if (src != dst && amount > 0) { - if (src != address(0)) { - (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount); - emit DelegateVotesChanged(src, oldWeight, newWeight); - } - - if (dst != address(0)) { - (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount); - emit DelegateVotesChanged(dst, oldWeight, newWeight); - } - } - } - - function _writeCheckpoint( - Checkpoint[] storage ckpts, - function(uint256, uint256) view returns (uint256) op, - uint256 delta - ) private returns (uint256 oldWeight, uint256 newWeight) { - uint256 pos = ckpts.length; - - unchecked { - Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1); - - oldWeight = oldCkpt.votes; - newWeight = op(oldWeight, delta); - - if (pos > 0 && oldCkpt.fromBlock == clock()) { - _unsafeAccess(ckpts, pos - 1).votes = SafeCastUpgradeable.toUint224(newWeight); - } else { - ckpts.push(Checkpoint({fromBlock: SafeCastUpgradeable.toUint32(clock()), votes: SafeCastUpgradeable.toUint224(newWeight)})); - } - } - } - - function _add(uint256 a, uint256 b) private pure returns (uint256) { - return a + b; - } - - function _subtract(uint256 a, uint256 b) private pure returns (uint256) { - return a - b; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) { - assembly { - mstore(0, ckpts.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[47] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol deleted file mode 100644 index 349bf811..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20WrapperUpgradeable.sol +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC20Wrapper.sol) - -pragma solidity ^0.8.0; - -import "../ERC20Upgradeable.sol"; -import "../utils/SafeERC20Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of the ERC20 token contract to support token wrapping. - * - * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful - * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the - * wrapping of an existing "basic" ERC20 into a governance token. - * - * _Available since v4.2._ - * - * @custom:storage-size 51 - */ -abstract contract ERC20WrapperUpgradeable is Initializable, ERC20Upgradeable { - IERC20Upgradeable private _underlying; - - function __ERC20Wrapper_init(IERC20Upgradeable underlyingToken) internal onlyInitializing { - __ERC20Wrapper_init_unchained(underlyingToken); - } - - function __ERC20Wrapper_init_unchained(IERC20Upgradeable underlyingToken) internal onlyInitializing { - require(underlyingToken != this, "ERC20Wrapper: cannot self wrap"); - _underlying = underlyingToken; - } - - /** - * @dev See {ERC20-decimals}. - */ - function decimals() public view virtual override returns (uint8) { - try IERC20MetadataUpgradeable(address(_underlying)).decimals() returns (uint8 value) { - return value; - } catch { - return super.decimals(); - } - } - - /** - * @dev Returns the address of the underlying ERC-20 token that is being wrapped. - */ - function underlying() public view returns (IERC20Upgradeable) { - return _underlying; - } - - /** - * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens. - */ - function depositFor(address account, uint256 amount) public virtual returns (bool) { - address sender = _msgSender(); - require(sender != address(this), "ERC20Wrapper: wrapper can't deposit"); - SafeERC20Upgradeable.safeTransferFrom(_underlying, sender, address(this), amount); - _mint(account, amount); - return true; - } - - /** - * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens. - */ - function withdrawTo(address account, uint256 amount) public virtual returns (bool) { - _burn(_msgSender(), amount); - SafeERC20Upgradeable.safeTransfer(_underlying, account, amount); - return true; - } - - /** - * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake. Internal - * function that can be exposed with access control if desired. - */ - function _recover(address account) internal virtual returns (uint256) { - uint256 value = _underlying.balanceOf(address(this)) - totalSupply(); - _mint(account, value); - return value; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol deleted file mode 100644 index 1470be61..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC4626Upgradeable.sol +++ /dev/null @@ -1,268 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/ERC4626.sol) - -pragma solidity ^0.8.0; - -import "../ERC20Upgradeable.sol"; -import "../utils/SafeERC20Upgradeable.sol"; -import "../../../interfaces/IERC4626Upgradeable.sol"; -import "../../../utils/math/MathUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the ERC4626 "Tokenized Vault Standard" as defined in - * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626]. - * - * This extension allows the minting and burning of "shares" (represented using the ERC20 inheritance) in exchange for - * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends - * the ERC20 standard. Any additional extensions included along it would affect the "shares" token represented by this - * contract and not the "assets" token which is an independent contract. - * - * [CAUTION] - * ==== - * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning - * with a "donation" to the vault that inflates the price of a share. This is variously known as a donation or inflation - * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial - * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may - * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by - * verifying the amount received is as expected, using a wrapper that performs these checks such as - * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. - * - * Since v4.9, this implementation uses virtual assets and shares to mitigate that risk. The `_decimalsOffset()` - * corresponds to an offset in the decimal representation between the underlying asset's decimals and the vault - * decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which itself - * determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default offset - * (0) makes it non-profitable, as a result of the value being captured by the virtual shares (out of the attacker's - * donation) matching the attacker's expected gains. With a larger offset, the attack becomes orders of magnitude more - * expensive than it is profitable. More details about the underlying math can be found - * xref:erc4626.adoc#inflation-attack[here]. - * - * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued - * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets - * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience - * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the - * `_convertToShares` and `_convertToAssets` functions. - * - * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide]. - * ==== - * - * _Available since v4.7._ - */ -abstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC4626Upgradeable { - using MathUpgradeable for uint256; - - IERC20Upgradeable private _asset; - uint8 private _underlyingDecimals; - - /** - * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777). - */ - function __ERC4626_init(IERC20Upgradeable asset_) internal onlyInitializing { - __ERC4626_init_unchained(asset_); - } - - function __ERC4626_init_unchained(IERC20Upgradeable asset_) internal onlyInitializing { - (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_); - _underlyingDecimals = success ? assetDecimals : 18; - _asset = asset_; - } - - /** - * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way. - */ - function _tryGetAssetDecimals(IERC20Upgradeable asset_) private view returns (bool, uint8) { - (bool success, bytes memory encodedDecimals) = address(asset_).staticcall( - abi.encodeWithSelector(IERC20MetadataUpgradeable.decimals.selector) - ); - if (success && encodedDecimals.length >= 32) { - uint256 returnedDecimals = abi.decode(encodedDecimals, (uint256)); - if (returnedDecimals <= type(uint8).max) { - return (true, uint8(returnedDecimals)); - } - } - return (false, 0); - } - - /** - * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This - * "original" value is cached during construction of the vault contract. If this read operation fails (e.g., the - * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals. - * - * See {IERC20Metadata-decimals}. - */ - function decimals() public view virtual override(IERC20MetadataUpgradeable, ERC20Upgradeable) returns (uint8) { - return _underlyingDecimals + _decimalsOffset(); - } - - /** @dev See {IERC4626-asset}. */ - function asset() public view virtual override returns (address) { - return address(_asset); - } - - /** @dev See {IERC4626-totalAssets}. */ - function totalAssets() public view virtual override returns (uint256) { - return _asset.balanceOf(address(this)); - } - - /** @dev See {IERC4626-convertToShares}. */ - function convertToShares(uint256 assets) public view virtual override returns (uint256) { - return _convertToShares(assets, MathUpgradeable.Rounding.Down); - } - - /** @dev See {IERC4626-convertToAssets}. */ - function convertToAssets(uint256 shares) public view virtual override returns (uint256) { - return _convertToAssets(shares, MathUpgradeable.Rounding.Down); - } - - /** @dev See {IERC4626-maxDeposit}. */ - function maxDeposit(address) public view virtual override returns (uint256) { - return type(uint256).max; - } - - /** @dev See {IERC4626-maxMint}. */ - function maxMint(address) public view virtual override returns (uint256) { - return type(uint256).max; - } - - /** @dev See {IERC4626-maxWithdraw}. */ - function maxWithdraw(address owner) public view virtual override returns (uint256) { - return _convertToAssets(balanceOf(owner), MathUpgradeable.Rounding.Down); - } - - /** @dev See {IERC4626-maxRedeem}. */ - function maxRedeem(address owner) public view virtual override returns (uint256) { - return balanceOf(owner); - } - - /** @dev See {IERC4626-previewDeposit}. */ - function previewDeposit(uint256 assets) public view virtual override returns (uint256) { - return _convertToShares(assets, MathUpgradeable.Rounding.Down); - } - - /** @dev See {IERC4626-previewMint}. */ - function previewMint(uint256 shares) public view virtual override returns (uint256) { - return _convertToAssets(shares, MathUpgradeable.Rounding.Up); - } - - /** @dev See {IERC4626-previewWithdraw}. */ - function previewWithdraw(uint256 assets) public view virtual override returns (uint256) { - return _convertToShares(assets, MathUpgradeable.Rounding.Up); - } - - /** @dev See {IERC4626-previewRedeem}. */ - function previewRedeem(uint256 shares) public view virtual override returns (uint256) { - return _convertToAssets(shares, MathUpgradeable.Rounding.Down); - } - - /** @dev See {IERC4626-deposit}. */ - function deposit(uint256 assets, address receiver) public virtual override returns (uint256) { - require(assets <= maxDeposit(receiver), "ERC4626: deposit more than max"); - - uint256 shares = previewDeposit(assets); - _deposit(_msgSender(), receiver, assets, shares); - - return shares; - } - - /** @dev See {IERC4626-mint}. - * - * As opposed to {deposit}, minting is allowed even if the vault is in a state where the price of a share is zero. - * In this case, the shares will be minted without requiring any assets to be deposited. - */ - function mint(uint256 shares, address receiver) public virtual override returns (uint256) { - require(shares <= maxMint(receiver), "ERC4626: mint more than max"); - - uint256 assets = previewMint(shares); - _deposit(_msgSender(), receiver, assets, shares); - - return assets; - } - - /** @dev See {IERC4626-withdraw}. */ - function withdraw(uint256 assets, address receiver, address owner) public virtual override returns (uint256) { - require(assets <= maxWithdraw(owner), "ERC4626: withdraw more than max"); - - uint256 shares = previewWithdraw(assets); - _withdraw(_msgSender(), receiver, owner, assets, shares); - - return shares; - } - - /** @dev See {IERC4626-redeem}. */ - function redeem(uint256 shares, address receiver, address owner) public virtual override returns (uint256) { - require(shares <= maxRedeem(owner), "ERC4626: redeem more than max"); - - uint256 assets = previewRedeem(shares); - _withdraw(_msgSender(), receiver, owner, assets, shares); - - return assets; - } - - /** - * @dev Internal conversion function (from assets to shares) with support for rounding direction. - */ - function _convertToShares(uint256 assets, MathUpgradeable.Rounding rounding) internal view virtual returns (uint256) { - return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding); - } - - /** - * @dev Internal conversion function (from shares to assets) with support for rounding direction. - */ - function _convertToAssets(uint256 shares, MathUpgradeable.Rounding rounding) internal view virtual returns (uint256) { - return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding); - } - - /** - * @dev Deposit/mint common workflow. - */ - function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual { - // If _asset is ERC777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the - // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, - // calls the vault, which is assumed not malicious. - // - // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the - // assets are transferred and before the shares are minted, which is a valid state. - // slither-disable-next-line reentrancy-no-eth - SafeERC20Upgradeable.safeTransferFrom(_asset, caller, address(this), assets); - _mint(receiver, shares); - - emit Deposit(caller, receiver, assets, shares); - } - - /** - * @dev Withdraw/redeem common workflow. - */ - function _withdraw( - address caller, - address receiver, - address owner, - uint256 assets, - uint256 shares - ) internal virtual { - if (caller != owner) { - _spendAllowance(owner, caller, shares); - } - - // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the - // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, - // calls the vault, which is assumed not malicious. - // - // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the - // shares are burned and after the assets are transferred, which is a valid state. - _burn(owner, shares); - SafeERC20Upgradeable.safeTransfer(_asset, receiver, assets); - - emit Withdraw(caller, receiver, owner, assets, shares); - } - - function _decimalsOffset() internal view virtual returns (uint8) { - return 0; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol deleted file mode 100644 index 381d8ea2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20MetadataUpgradeable.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) - -pragma solidity ^0.8.0; - -import "../IERC20Upgradeable.sol"; - -/** - * @dev Interface for the optional metadata functions from the ERC20 standard. - * - * _Available since v4.1._ - */ -interface IERC20MetadataUpgradeable is IERC20Upgradeable { - /** - * @dev Returns the name of the token. - */ - function name() external view returns (string memory); - - /** - * @dev Returns the symbol of the token. - */ - function symbol() external view returns (string memory); - - /** - * @dev Returns the decimals places of the token. - */ - function decimals() external view returns (uint8); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol deleted file mode 100644 index 09e89a9a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/IERC20PermitUpgradeable.sol +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in - * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. - * - * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by - * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't - * need to send a transaction, and thus is not required to hold Ether at all. - * - * ==== Security Considerations - * - * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature - * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be - * considered as an intention to spend the allowance in any specific way. The second is that because permits have - * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should - * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be - * generally recommended is: - * - * ```solidity - * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { - * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} - * doThing(..., value); - * } - * - * function doThing(..., uint256 value) public { - * token.safeTransferFrom(msg.sender, address(this), value); - * ... - * } - * ``` - * - * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of - * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also - * {SafeERC20-safeTransferFrom}). - * - * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so - * contracts should have entry points that don't rely on permit. - */ -interface IERC20PermitUpgradeable { - /** - * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, - * given ``owner``'s signed approval. - * - * IMPORTANT: The same issues {IERC20-approve} has related to transaction - * ordering also apply here. - * - * Emits an {Approval} event. - * - * Requirements: - * - * - `spender` cannot be the zero address. - * - `deadline` must be a timestamp in the future. - * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` - * over the EIP712-formatted function arguments. - * - the signature must use ``owner``'s current nonce (see {nonces}). - * - * For more information on the signature format, see the - * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP - * section]. - * - * CAUTION: See Security Considerations above. - */ - function permit( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) external; - - /** - * @dev Returns the current nonce for `owner`. This value must be - * included whenever a signature is generated for {permit}. - * - * Every successful call to {permit} increases ``owner``'s nonce by one. This - * prevents a signature from being used multiple times. - */ - function nonces(address owner) external view returns (uint256); - - /** - * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. - */ - // solhint-disable-next-line func-name-mixedcase - function DOMAIN_SEPARATOR() external view returns (bytes32); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol deleted file mode 100644 index 74ded65d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-ERC20Permit.sol) - -pragma solidity ^0.8.0; - -// EIP-2612 is Final as of 2022-11-01. This file is deprecated. - -import "./ERC20PermitUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol deleted file mode 100644 index 72fd7ceb..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol) - -pragma solidity ^0.8.0; - -// EIP-2612 is Final as of 2022-11-01. This file is deprecated. - -import "./IERC20PermitUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol deleted file mode 100644 index 09e26650..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetFixedSupplyUpgradeable.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/presets/ERC20PresetFixedSupply.sol) -pragma solidity ^0.8.0; - -import "../extensions/ERC20BurnableUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev {ERC20} token, including: - * - * - Preminted initial supply - * - Ability for holders to burn (destroy) their tokens - * - No access control mechanism (for minting/pausing) and hence no governance - * - * This contract uses {ERC20Burnable} to include burn capabilities - head to - * its documentation for details. - * - * _Available since v3.4._ - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC20PresetFixedSupplyUpgradeable is Initializable, ERC20BurnableUpgradeable { - function initialize(string memory name, string memory symbol, uint256 initialSupply, address owner) public virtual initializer { - __ERC20PresetFixedSupply_init(name, symbol, initialSupply, owner); - } - /** - * @dev Mints `initialSupply` amount of token and transfers them to `owner`. - * - * See {ERC20-constructor}. - */ - function __ERC20PresetFixedSupply_init(string memory name, string memory symbol, uint256 initialSupply, address owner) internal onlyInitializing { - __ERC20_init_unchained(name, symbol); - __ERC20PresetFixedSupply_init_unchained(name, symbol, initialSupply, owner); - } - - function __ERC20PresetFixedSupply_init_unchained(string memory, string memory, uint256 initialSupply, address owner) internal onlyInitializing { - _mint(owner, initialSupply); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol deleted file mode 100644 index 9bbec096..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/ERC20PresetMinterPauserUpgradeable.sol +++ /dev/null @@ -1,111 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol) - -pragma solidity ^0.8.0; - -import "../ERC20Upgradeable.sol"; -import "../extensions/ERC20BurnableUpgradeable.sol"; -import "../extensions/ERC20PausableUpgradeable.sol"; -import "../../../access/AccessControlEnumerableUpgradeable.sol"; -import "../../../utils/ContextUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev {ERC20} token, including: - * - * - ability for holders to burn (destroy) their tokens - * - a minter role that allows for token minting (creation) - * - a pauser role that allows to stop all token transfers - * - * This contract uses {AccessControl} to lock permissioned functions using the - * different roles - head to its documentation for details. - * - * The account that deploys the contract will be granted the minter and pauser - * roles, as well as the default admin role, which will let it grant both minter - * and pauser roles to other accounts. - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlEnumerableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable { - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); - - function initialize(string memory name, string memory symbol) public virtual initializer { - __ERC20PresetMinterPauser_init(name, symbol); - } - /** - * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the - * account that deploys the contract. - * - * See {ERC20-constructor}. - */ - function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal onlyInitializing { - __ERC20_init_unchained(name, symbol); - __Pausable_init_unchained(); - __ERC20PresetMinterPauser_init_unchained(name, symbol); - } - - function __ERC20PresetMinterPauser_init_unchained(string memory, string memory) internal onlyInitializing { - _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); - - _setupRole(MINTER_ROLE, _msgSender()); - _setupRole(PAUSER_ROLE, _msgSender()); - } - - /** - * @dev Creates `amount` new tokens for `to`. - * - * See {ERC20-_mint}. - * - * Requirements: - * - * - the caller must have the `MINTER_ROLE`. - */ - function mint(address to, uint256 amount) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint"); - _mint(to, amount); - } - - /** - * @dev Pauses all token transfers. - * - * See {ERC20Pausable} and {Pausable-_pause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function pause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause"); - _pause(); - } - - /** - * @dev Unpauses all token transfers. - * - * See {ERC20Pausable} and {Pausable-_unpause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function unpause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause"); - _unpause(); - } - - function _beforeTokenTransfer( - address from, - address to, - uint256 amount - ) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) { - super._beforeTokenTransfer(from, to, amount); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md deleted file mode 100644 index 468200b7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/presets/README.md +++ /dev/null @@ -1 +0,0 @@ -Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol deleted file mode 100644 index ec47efc7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/SafeERC20Upgradeable.sol +++ /dev/null @@ -1,143 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) - -pragma solidity ^0.8.0; - -import "../IERC20Upgradeable.sol"; -import "../extensions/IERC20PermitUpgradeable.sol"; -import "../../../utils/AddressUpgradeable.sol"; - -/** - * @title SafeERC20 - * @dev Wrappers around ERC20 operations that throw on failure (when the token - * contract returns false). Tokens that return no value (and instead revert or - * throw on failure) are also supported, non-reverting calls are assumed to be - * successful. - * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, - * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. - */ -library SafeERC20Upgradeable { - using AddressUpgradeable for address; - - /** - * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, - * non-reverting calls are assumed to be successful. - */ - function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); - } - - /** - * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the - * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. - */ - function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal { - _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); - } - - /** - * @dev Deprecated. This function has issues similar to the ones found in - * {IERC20-approve}, and its usage is discouraged. - * - * Whenever possible, use {safeIncreaseAllowance} and - * {safeDecreaseAllowance} instead. - */ - function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal { - // safeApprove should only be called when setting an initial allowance, - // or when resetting it to zero. To increase and decrease it, use - // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' - require( - (value == 0) || (token.allowance(address(this), spender) == 0), - "SafeERC20: approve from non-zero to non-zero allowance" - ); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); - } - - /** - * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, - * non-reverting calls are assumed to be successful. - */ - function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { - uint256 oldAllowance = token.allowance(address(this), spender); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); - } - - /** - * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, - * non-reverting calls are assumed to be successful. - */ - function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { - unchecked { - uint256 oldAllowance = token.allowance(address(this), spender); - require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); - } - } - - /** - * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, - * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval - * to be set to zero before setting it to a non-zero value, such as USDT. - */ - function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal { - bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); - - if (!_callOptionalReturnBool(token, approvalCall)) { - _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); - _callOptionalReturn(token, approvalCall); - } - } - - /** - * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. - * Revert on invalid signature. - */ - function safePermit( - IERC20PermitUpgradeable token, - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) internal { - uint256 nonceBefore = token.nonces(owner); - token.permit(owner, spender, value, deadline, v, r, s); - uint256 nonceAfter = token.nonces(owner); - require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); - } - - /** - * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement - * on the return value: the return value is optional (but if data is returned, it must not be false). - * @param token The token targeted by the call. - * @param data The call data (encoded using abi.encode or one of its variants). - */ - function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since - // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that - // the target address contains contract code and also asserts for success in the low-level call. - - bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); - require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); - } - - /** - * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement - * on the return value: the return value is optional (but if data is returned, it must not be false). - * @param token The token targeted by the call. - * @param data The call data (encoded using abi.encode or one of its variants). - * - * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. - */ - function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) { - // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since - // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false - // and not revert is the subcall reverts. - - (bool success, bytes memory returndata) = address(token).call(data); - return - success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token)); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol deleted file mode 100644 index 821781c3..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/utils/TokenTimelockUpgradeable.sol +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/TokenTimelock.sol) - -pragma solidity ^0.8.0; - -import "./SafeERC20Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev A token holder contract that will allow a beneficiary to extract the - * tokens after a given release time. - * - * Useful for simple vesting schedules like "advisors get all of their tokens - * after 1 year". - * - * @custom:storage-size 53 - */ -contract TokenTimelockUpgradeable is Initializable { - using SafeERC20Upgradeable for IERC20Upgradeable; - - // ERC20 basic token contract being held - IERC20Upgradeable private _token; - - // beneficiary of tokens after they are released - address private _beneficiary; - - // timestamp when token release is enabled - uint256 private _releaseTime; - - /** - * @dev Deploys a timelock instance that is able to hold the token specified, and will only release it to - * `beneficiary_` when {release} is invoked after `releaseTime_`. The release time is specified as a Unix timestamp - * (in seconds). - */ - function __TokenTimelock_init(IERC20Upgradeable token_, address beneficiary_, uint256 releaseTime_) internal onlyInitializing { - __TokenTimelock_init_unchained(token_, beneficiary_, releaseTime_); - } - - function __TokenTimelock_init_unchained(IERC20Upgradeable token_, address beneficiary_, uint256 releaseTime_) internal onlyInitializing { - require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time"); - _token = token_; - _beneficiary = beneficiary_; - _releaseTime = releaseTime_; - } - - /** - * @dev Returns the token being held. - */ - function token() public view virtual returns (IERC20Upgradeable) { - return _token; - } - - /** - * @dev Returns the beneficiary that will receive the tokens. - */ - function beneficiary() public view virtual returns (address) { - return _beneficiary; - } - - /** - * @dev Returns the time when the tokens are released in seconds since Unix epoch (i.e. Unix timestamp). - */ - function releaseTime() public view virtual returns (uint256) { - return _releaseTime; - } - - /** - * @dev Transfers tokens held by the timelock to the beneficiary. Will only succeed if invoked after the release - * time. - */ - function release() public virtual { - require(block.timestamp >= releaseTime(), "TokenTimelock: current time is before release time"); - - uint256 amount = token().balanceOf(address(this)); - require(amount > 0, "TokenTimelock: no tokens to release"); - - token().safeTransfer(beneficiary(), amount); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol deleted file mode 100644 index 68f9420b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/ERC721Upgradeable.sol +++ /dev/null @@ -1,478 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) - -pragma solidity ^0.8.0; - -import "./IERC721Upgradeable.sol"; -import "./IERC721ReceiverUpgradeable.sol"; -import "./extensions/IERC721MetadataUpgradeable.sol"; -import "../../utils/AddressUpgradeable.sol"; -import "../../utils/ContextUpgradeable.sol"; -import "../../utils/StringsUpgradeable.sol"; -import "../../utils/introspection/ERC165Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including - * the Metadata extension, but not including the Enumerable extension, which is available separately as - * {ERC721Enumerable}. - */ -contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { - using AddressUpgradeable for address; - using StringsUpgradeable for uint256; - - // Token name - string private _name; - - // Token symbol - string private _symbol; - - // Mapping from token ID to owner address - mapping(uint256 => address) private _owners; - - // Mapping owner address to token count - mapping(address => uint256) private _balances; - - // Mapping from token ID to approved address - mapping(uint256 => address) private _tokenApprovals; - - // Mapping from owner to operator approvals - mapping(address => mapping(address => bool)) private _operatorApprovals; - - /** - * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. - */ - function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { - __ERC721_init_unchained(name_, symbol_); - } - - function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { - _name = name_; - _symbol = symbol_; - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { - return - interfaceId == type(IERC721Upgradeable).interfaceId || - interfaceId == type(IERC721MetadataUpgradeable).interfaceId || - super.supportsInterface(interfaceId); - } - - /** - * @dev See {IERC721-balanceOf}. - */ - function balanceOf(address owner) public view virtual override returns (uint256) { - require(owner != address(0), "ERC721: address zero is not a valid owner"); - return _balances[owner]; - } - - /** - * @dev See {IERC721-ownerOf}. - */ - function ownerOf(uint256 tokenId) public view virtual override returns (address) { - address owner = _ownerOf(tokenId); - require(owner != address(0), "ERC721: invalid token ID"); - return owner; - } - - /** - * @dev See {IERC721Metadata-name}. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev See {IERC721Metadata-symbol}. - */ - function symbol() public view virtual override returns (string memory) { - return _symbol; - } - - /** - * @dev See {IERC721Metadata-tokenURI}. - */ - function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { - _requireMinted(tokenId); - - string memory baseURI = _baseURI(); - return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; - } - - /** - * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each - * token will be the concatenation of the `baseURI` and the `tokenId`. Empty - * by default, can be overridden in child contracts. - */ - function _baseURI() internal view virtual returns (string memory) { - return ""; - } - - /** - * @dev See {IERC721-approve}. - */ - function approve(address to, uint256 tokenId) public virtual override { - address owner = ERC721Upgradeable.ownerOf(tokenId); - require(to != owner, "ERC721: approval to current owner"); - - require( - _msgSender() == owner || isApprovedForAll(owner, _msgSender()), - "ERC721: approve caller is not token owner or approved for all" - ); - - _approve(to, tokenId); - } - - /** - * @dev See {IERC721-getApproved}. - */ - function getApproved(uint256 tokenId) public view virtual override returns (address) { - _requireMinted(tokenId); - - return _tokenApprovals[tokenId]; - } - - /** - * @dev See {IERC721-setApprovalForAll}. - */ - function setApprovalForAll(address operator, bool approved) public virtual override { - _setApprovalForAll(_msgSender(), operator, approved); - } - - /** - * @dev See {IERC721-isApprovedForAll}. - */ - function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { - return _operatorApprovals[owner][operator]; - } - - /** - * @dev See {IERC721-transferFrom}. - */ - function transferFrom(address from, address to, uint256 tokenId) public virtual override { - //solhint-disable-next-line max-line-length - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); - - _transfer(from, to, tokenId); - } - - /** - * @dev See {IERC721-safeTransferFrom}. - */ - function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { - safeTransferFrom(from, to, tokenId, ""); - } - - /** - * @dev See {IERC721-safeTransferFrom}. - */ - function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); - _safeTransfer(from, to, tokenId, data); - } - - /** - * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients - * are aware of the ERC721 protocol to prevent tokens from being forever locked. - * - * `data` is additional data, it has no specified format and it is sent in call to `to`. - * - * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. - * implement alternative mechanisms to perform token transfer, such as signature-based. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `tokenId` token must exist and be owned by `from`. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. - * - * Emits a {Transfer} event. - */ - function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { - _transfer(from, to, tokenId); - require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); - } - - /** - * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist - */ - function _ownerOf(uint256 tokenId) internal view virtual returns (address) { - return _owners[tokenId]; - } - - /** - * @dev Returns whether `tokenId` exists. - * - * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. - * - * Tokens start existing when they are minted (`_mint`), - * and stop existing when they are burned (`_burn`). - */ - function _exists(uint256 tokenId) internal view virtual returns (bool) { - return _ownerOf(tokenId) != address(0); - } - - /** - * @dev Returns whether `spender` is allowed to manage `tokenId`. - * - * Requirements: - * - * - `tokenId` must exist. - */ - function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { - address owner = ERC721Upgradeable.ownerOf(tokenId); - return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); - } - - /** - * @dev Safely mints `tokenId` and transfers it to `to`. - * - * Requirements: - * - * - `tokenId` must not exist. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. - * - * Emits a {Transfer} event. - */ - function _safeMint(address to, uint256 tokenId) internal virtual { - _safeMint(to, tokenId, ""); - } - - /** - * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is - * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. - */ - function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { - _mint(to, tokenId); - require( - _checkOnERC721Received(address(0), to, tokenId, data), - "ERC721: transfer to non ERC721Receiver implementer" - ); - } - - /** - * @dev Mints `tokenId` and transfers it to `to`. - * - * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible - * - * Requirements: - * - * - `tokenId` must not exist. - * - `to` cannot be the zero address. - * - * Emits a {Transfer} event. - */ - function _mint(address to, uint256 tokenId) internal virtual { - require(to != address(0), "ERC721: mint to the zero address"); - require(!_exists(tokenId), "ERC721: token already minted"); - - _beforeTokenTransfer(address(0), to, tokenId, 1); - - // Check that tokenId was not minted by `_beforeTokenTransfer` hook - require(!_exists(tokenId), "ERC721: token already minted"); - - unchecked { - // Will not overflow unless all 2**256 token ids are minted to the same owner. - // Given that tokens are minted one by one, it is impossible in practice that - // this ever happens. Might change if we allow batch minting. - // The ERC fails to describe this case. - _balances[to] += 1; - } - - _owners[tokenId] = to; - - emit Transfer(address(0), to, tokenId); - - _afterTokenTransfer(address(0), to, tokenId, 1); - } - - /** - * @dev Destroys `tokenId`. - * The approval is cleared when the token is burned. - * This is an internal function that does not check if the sender is authorized to operate on the token. - * - * Requirements: - * - * - `tokenId` must exist. - * - * Emits a {Transfer} event. - */ - function _burn(uint256 tokenId) internal virtual { - address owner = ERC721Upgradeable.ownerOf(tokenId); - - _beforeTokenTransfer(owner, address(0), tokenId, 1); - - // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook - owner = ERC721Upgradeable.ownerOf(tokenId); - - // Clear approvals - delete _tokenApprovals[tokenId]; - - unchecked { - // Cannot overflow, as that would require more tokens to be burned/transferred - // out than the owner initially received through minting and transferring in. - _balances[owner] -= 1; - } - delete _owners[tokenId]; - - emit Transfer(owner, address(0), tokenId); - - _afterTokenTransfer(owner, address(0), tokenId, 1); - } - - /** - * @dev Transfers `tokenId` from `from` to `to`. - * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. - * - * Requirements: - * - * - `to` cannot be the zero address. - * - `tokenId` token must be owned by `from`. - * - * Emits a {Transfer} event. - */ - function _transfer(address from, address to, uint256 tokenId) internal virtual { - require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); - require(to != address(0), "ERC721: transfer to the zero address"); - - _beforeTokenTransfer(from, to, tokenId, 1); - - // Check that tokenId was not transferred by `_beforeTokenTransfer` hook - require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); - - // Clear approvals from the previous owner - delete _tokenApprovals[tokenId]; - - unchecked { - // `_balances[from]` cannot overflow for the same reason as described in `_burn`: - // `from`'s balance is the number of token held, which is at least one before the current - // transfer. - // `_balances[to]` could overflow in the conditions described in `_mint`. That would require - // all 2**256 token ids to be minted, which in practice is impossible. - _balances[from] -= 1; - _balances[to] += 1; - } - _owners[tokenId] = to; - - emit Transfer(from, to, tokenId); - - _afterTokenTransfer(from, to, tokenId, 1); - } - - /** - * @dev Approve `to` to operate on `tokenId` - * - * Emits an {Approval} event. - */ - function _approve(address to, uint256 tokenId) internal virtual { - _tokenApprovals[tokenId] = to; - emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); - } - - /** - * @dev Approve `operator` to operate on all of `owner` tokens - * - * Emits an {ApprovalForAll} event. - */ - function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { - require(owner != operator, "ERC721: approve to caller"); - _operatorApprovals[owner][operator] = approved; - emit ApprovalForAll(owner, operator, approved); - } - - /** - * @dev Reverts if the `tokenId` has not been minted yet. - */ - function _requireMinted(uint256 tokenId) internal view virtual { - require(_exists(tokenId), "ERC721: invalid token ID"); - } - - /** - * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. - * The call is not executed if the target address is not a contract. - * - * @param from address representing the previous owner of the given token ID - * @param to target address that will receive the tokens - * @param tokenId uint256 ID of the token to be transferred - * @param data bytes optional data to send along with the call - * @return bool whether the call correctly returned the expected magic value - */ - function _checkOnERC721Received( - address from, - address to, - uint256 tokenId, - bytes memory data - ) private returns (bool) { - if (to.isContract()) { - try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { - return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; - } catch (bytes memory reason) { - if (reason.length == 0) { - revert("ERC721: transfer to non ERC721Receiver implementer"); - } else { - /// @solidity memory-safe-assembly - assembly { - revert(add(32, reason), mload(reason)) - } - } - } - } else { - return true; - } - } - - /** - * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is - * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. - * - * Calling conditions: - * - * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. - * - When `from` is zero, the tokens will be minted for `to`. - * - When `to` is zero, ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - `batchSize` is non-zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} - - /** - * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is - * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. - * - * Calling conditions: - * - * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. - * - When `from` is zero, the tokens were minted for `to`. - * - When `to` is zero, ``from``'s tokens were burned. - * - `from` and `to` are never both zero. - * - `batchSize` is non-zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} - - /** - * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. - * - * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant - * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such - * that `ownerOf(tokenId)` is `a`. - */ - // solhint-disable-next-line func-name-mixedcase - function __unsafe_increaseBalance(address account, uint256 amount) internal { - _balances[account] += amount; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[44] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol deleted file mode 100644 index c8328178..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721ReceiverUpgradeable.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) - -pragma solidity ^0.8.0; - -/** - * @title ERC721 token receiver interface - * @dev Interface for any contract that wants to support safeTransfers - * from ERC721 asset contracts. - */ -interface IERC721ReceiverUpgradeable { - /** - * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} - * by `operator` from `from`, this function is called. - * - * It must return its Solidity selector to confirm the token transfer. - * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. - * - * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. - */ - function onERC721Received( - address operator, - address from, - uint256 tokenId, - bytes calldata data - ) external returns (bytes4); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol deleted file mode 100644 index 70fdcdcb..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/IERC721Upgradeable.sol +++ /dev/null @@ -1,132 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) - -pragma solidity ^0.8.0; - -import "../../utils/introspection/IERC165Upgradeable.sol"; - -/** - * @dev Required interface of an ERC721 compliant contract. - */ -interface IERC721Upgradeable is IERC165Upgradeable { - /** - * @dev Emitted when `tokenId` token is transferred from `from` to `to`. - */ - event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); - - /** - * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. - */ - event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); - - /** - * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. - */ - event ApprovalForAll(address indexed owner, address indexed operator, bool approved); - - /** - * @dev Returns the number of tokens in ``owner``'s account. - */ - function balanceOf(address owner) external view returns (uint256 balance); - - /** - * @dev Returns the owner of the `tokenId` token. - * - * Requirements: - * - * - `tokenId` must exist. - */ - function ownerOf(uint256 tokenId) external view returns (address owner); - - /** - * @dev Safely transfers `tokenId` token from `from` to `to`. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `tokenId` token must exist and be owned by `from`. - * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. - * - * Emits a {Transfer} event. - */ - function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; - - /** - * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients - * are aware of the ERC721 protocol to prevent tokens from being forever locked. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `tokenId` token must exist and be owned by `from`. - * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. - * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. - * - * Emits a {Transfer} event. - */ - function safeTransferFrom(address from, address to, uint256 tokenId) external; - - /** - * @dev Transfers `tokenId` token from `from` to `to`. - * - * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 - * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must - * understand this adds an external call which potentially creates a reentrancy vulnerability. - * - * Requirements: - * - * - `from` cannot be the zero address. - * - `to` cannot be the zero address. - * - `tokenId` token must be owned by `from`. - * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. - * - * Emits a {Transfer} event. - */ - function transferFrom(address from, address to, uint256 tokenId) external; - - /** - * @dev Gives permission to `to` to transfer `tokenId` token to another account. - * The approval is cleared when the token is transferred. - * - * Only a single account can be approved at a time, so approving the zero address clears previous approvals. - * - * Requirements: - * - * - The caller must own the token or be an approved operator. - * - `tokenId` must exist. - * - * Emits an {Approval} event. - */ - function approve(address to, uint256 tokenId) external; - - /** - * @dev Approve or remove `operator` as an operator for the caller. - * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. - * - * Requirements: - * - * - The `operator` cannot be the caller. - * - * Emits an {ApprovalForAll} event. - */ - function setApprovalForAll(address operator, bool approved) external; - - /** - * @dev Returns the account approved for `tokenId` token. - * - * Requirements: - * - * - `tokenId` must exist. - */ - function getApproved(uint256 tokenId) external view returns (address operator); - - /** - * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. - * - * See {setApprovalForAll} - */ - function isApprovedForAll(address owner, address operator) external view returns (bool); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc deleted file mode 100644 index f571f5c5..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/README.adoc +++ /dev/null @@ -1,73 +0,0 @@ -= ERC 721 - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc721 - -This set of interfaces, contracts, and utilities are all related to the https://eips.ethereum.org/EIPS/eip-721[ERC721 Non-Fungible Token Standard]. - -TIP: For a walk through on how to create an ERC721 token read our xref:ROOT:erc721.adoc[ERC721 guide]. - -The EIP specifies four interfaces: - -* {IERC721}: Core functionality required in all compliant implementation. -* {IERC721Metadata}: Optional extension that adds name, symbol, and token URI, almost always included. -* {IERC721Enumerable}: Optional extension that allows enumerating the tokens on chain, often not included since it requires large gas overhead. -* {IERC721Receiver}: An interface that must be implemented by contracts if they want to accept tokens through `safeTransferFrom`. - -OpenZeppelin Contracts provides implementations of all four interfaces: - -* {ERC721}: The core and metadata extensions, with a base URI mechanism. -* {ERC721Enumerable}: The enumerable extension. -* {ERC721Holder}: A bare bones implementation of the receiver interface. - -Additionally there are a few of other extensions: - -* {ERC721Consecutive}: An implementation of https://eips.ethereum.org/EIPS/eip-2309[ERC2309] for minting batchs of tokens during construction, in accordance with ERC721. -* {ERC721URIStorage}: A more flexible but more expensive way of storing metadata. -* {ERC721Votes}: Support for voting and vote delegation. -* {ERC721Royalty}: A way to signal royalty information following ERC2981. -* {ERC721Pausable}: A primitive to pause contract operation. -* {ERC721Burnable}: A way for token holders to burn their own tokens. -* {ERC721Wrapper}: Wrapper to create an ERC721 backed by another ERC721, with deposit and withdraw methods. Useful in conjunction with {ERC721Votes}. - -NOTE: This core set of contracts is designed to be unopinionated, allowing developers to access the internal functions in ERC721 (such as <>) and expose them as external functions in the way they prefer. On the other hand, xref:ROOT:erc721.adoc#Presets[ERC721 Presets] (such as {ERC721PresetMinterPauserAutoId}) are designed using opinionated patterns to provide developers with ready to use, deployable contracts. - -== Core - -{{IERC721}} - -{{IERC721Metadata}} - -{{IERC721Enumerable}} - -{{ERC721}} - -{{ERC721Enumerable}} - -{{IERC721Receiver}} - -== Extensions - -{{ERC721Pausable}} - -{{ERC721Burnable}} - -{{ERC721Consecutive}} - -{{ERC721URIStorage}} - -{{ERC721Votes}} - -{{ERC721Royalty}} - -{{ERC721Wrapper}} - -== Presets - -These contracts are preconfigured combinations of the above features. They can be used through inheritance or as models to copy and paste their source code. - -{{ERC721PresetMinterPauserAutoId}} - -== Utilities - -{{ERC721Holder}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol deleted file mode 100644 index 0cefa958..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721BurnableUpgradeable.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "../../../utils/ContextUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @title ERC721 Burnable Token - * @dev ERC721 Token that can be burned (destroyed). - */ -abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { - function __ERC721Burnable_init() internal onlyInitializing { - } - - function __ERC721Burnable_init_unchained() internal onlyInitializing { - } - /** - * @dev Burns `tokenId`. See {ERC721-_burn}. - * - * Requirements: - * - * - The caller must own `tokenId` or be an approved operator. - */ - function burn(uint256 tokenId) public virtual { - //solhint-disable-next-line max-line-length - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); - _burn(tokenId); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol deleted file mode 100644 index 31208a7c..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol +++ /dev/null @@ -1,161 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Consecutive.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "../../../interfaces/IERC2309Upgradeable.sol"; -import "../../../utils/CheckpointsUpgradeable.sol"; -import "../../../utils/structs/BitMapsUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the ERC2309 "Consecutive Transfer Extension" as defined in - * https://eips.ethereum.org/EIPS/eip-2309[EIP-2309]. - * - * This extension allows the minting of large batches of tokens, during contract construction only. For upgradeable - * contracts this implies that batch minting is only available during proxy deployment, and not in subsequent upgrades. - * These batches are limited to 5000 tokens at a time by default to accommodate off-chain indexers. - * - * Using this extension removes the ability to mint single tokens during contract construction. This ability is - * regained after construction. During construction, only batch minting is allowed. - * - * IMPORTANT: This extension bypasses the hooks {_beforeTokenTransfer} and {_afterTokenTransfer} for tokens minted in - * batch. When using this extension, you should consider the {_beforeConsecutiveTokenTransfer} and - * {_afterConsecutiveTokenTransfer} hooks in addition to {_beforeTokenTransfer} and {_afterTokenTransfer}. - * - * IMPORTANT: When overriding {_afterTokenTransfer}, be careful about call ordering. {ownerOf} may return invalid - * values during the {_afterTokenTransfer} execution if the super call is not called first. To be safe, execute the - * super call before your custom logic. - * - * _Available since v4.8._ - */ -abstract contract ERC721ConsecutiveUpgradeable is Initializable, IERC2309Upgradeable, ERC721Upgradeable { - using BitMapsUpgradeable for BitMapsUpgradeable.BitMap; - using CheckpointsUpgradeable for CheckpointsUpgradeable.Trace160; - - CheckpointsUpgradeable.Trace160 private _sequentialOwnership; - BitMapsUpgradeable.BitMap private _sequentialBurn; - - function __ERC721Consecutive_init() internal onlyInitializing { - } - - function __ERC721Consecutive_init_unchained() internal onlyInitializing { - } - /** - * @dev Maximum size of a batch of consecutive tokens. This is designed to limit stress on off-chain indexing - * services that have to record one entry per token, and have protections against "unreasonably large" batches of - * tokens. - * - * NOTE: Overriding the default value of 5000 will not cause on-chain issues, but may result in the asset not being - * correctly supported by off-chain indexing services (including marketplaces). - */ - function _maxBatchSize() internal view virtual returns (uint96) { - return 5000; - } - - /** - * @dev See {ERC721-_ownerOf}. Override that checks the sequential ownership structure for tokens that have - * been minted as part of a batch, and not yet transferred. - */ - function _ownerOf(uint256 tokenId) internal view virtual override returns (address) { - address owner = super._ownerOf(tokenId); - - // If token is owned by the core, or beyond consecutive range, return base value - if (owner != address(0) || tokenId > type(uint96).max) { - return owner; - } - - // Otherwise, check the token was not burned, and fetch ownership from the anchors - // Note: no need for safe cast, we know that tokenId <= type(uint96).max - return _sequentialBurn.get(tokenId) ? address(0) : address(_sequentialOwnership.lowerLookup(uint96(tokenId))); - } - - /** - * @dev Mint a batch of tokens of length `batchSize` for `to`. Returns the token id of the first token minted in the - * batch; if `batchSize` is 0, returns the number of consecutive ids minted so far. - * - * Requirements: - * - * - `batchSize` must not be greater than {_maxBatchSize}. - * - The function is called in the constructor of the contract (directly or indirectly). - * - * CAUTION: Does not emit a `Transfer` event. This is ERC721 compliant as long as it is done inside of the - * constructor, which is enforced by this function. - * - * CAUTION: Does not invoke `onERC721Received` on the receiver. - * - * Emits a {IERC2309-ConsecutiveTransfer} event. - */ - function _mintConsecutive(address to, uint96 batchSize) internal virtual returns (uint96) { - uint96 first = _totalConsecutiveSupply(); - - // minting a batch of size 0 is a no-op - if (batchSize > 0) { - require(!AddressUpgradeable.isContract(address(this)), "ERC721Consecutive: batch minting restricted to constructor"); - require(to != address(0), "ERC721Consecutive: mint to the zero address"); - require(batchSize <= _maxBatchSize(), "ERC721Consecutive: batch too large"); - - // hook before - _beforeTokenTransfer(address(0), to, first, batchSize); - - // push an ownership checkpoint & emit event - uint96 last = first + batchSize - 1; - _sequentialOwnership.push(last, uint160(to)); - - // The invariant required by this function is preserved because the new sequentialOwnership checkpoint - // is attributing ownership of `batchSize` new tokens to account `to`. - __unsafe_increaseBalance(to, batchSize); - - emit ConsecutiveTransfer(first, last, address(0), to); - - // hook after - _afterTokenTransfer(address(0), to, first, batchSize); - } - - return first; - } - - /** - * @dev See {ERC721-_mint}. Override version that restricts normal minting to after construction. - * - * Warning: Using {ERC721Consecutive} prevents using {_mint} during construction in favor of {_mintConsecutive}. - * After construction, {_mintConsecutive} is no longer available and {_mint} becomes available. - */ - function _mint(address to, uint256 tokenId) internal virtual override { - require(AddressUpgradeable.isContract(address(this)), "ERC721Consecutive: can't mint during construction"); - super._mint(to, tokenId); - } - - /** - * @dev See {ERC721-_afterTokenTransfer}. Burning of tokens that have been sequentially minted must be explicit. - */ - function _afterTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - if ( - to == address(0) && // if we burn - firstTokenId < _totalConsecutiveSupply() && // and the tokenId was minted in a batch - !_sequentialBurn.get(firstTokenId) // and the token was never marked as burnt - ) { - require(batchSize == 1, "ERC721Consecutive: batch burn not supported"); - _sequentialBurn.set(firstTokenId); - } - super._afterTokenTransfer(from, to, firstTokenId, batchSize); - } - - function _totalConsecutiveSupply() private view returns (uint96) { - (bool exists, uint96 latestId, ) = _sequentialOwnership.latestCheckpoint(); - return exists ? latestId + 1 : 0; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol deleted file mode 100644 index 5966eb65..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol +++ /dev/null @@ -1,172 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "./IERC721EnumerableUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev This implements an optional extension of {ERC721} defined in the EIP that adds - * enumerability of all the token ids in the contract as well as all token ids owned by each - * account. - */ -abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { - // Mapping from owner to list of owned token IDs - mapping(address => mapping(uint256 => uint256)) private _ownedTokens; - - // Mapping from token ID to index of the owner tokens list - mapping(uint256 => uint256) private _ownedTokensIndex; - - // Array with all token ids, used for enumeration - uint256[] private _allTokens; - - // Mapping from token id to position in the allTokens array - mapping(uint256 => uint256) private _allTokensIndex; - - function __ERC721Enumerable_init() internal onlyInitializing { - } - - function __ERC721Enumerable_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { - return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. - */ - function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { - require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); - return _ownedTokens[owner][index]; - } - - /** - * @dev See {IERC721Enumerable-totalSupply}. - */ - function totalSupply() public view virtual override returns (uint256) { - return _allTokens.length; - } - - /** - * @dev See {IERC721Enumerable-tokenByIndex}. - */ - function tokenByIndex(uint256 index) public view virtual override returns (uint256) { - require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); - return _allTokens[index]; - } - - /** - * @dev See {ERC721-_beforeTokenTransfer}. - */ - function _beforeTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - super._beforeTokenTransfer(from, to, firstTokenId, batchSize); - - if (batchSize > 1) { - // Will only trigger during construction. Batch transferring (minting) is not available afterwards. - revert("ERC721Enumerable: consecutive transfers not supported"); - } - - uint256 tokenId = firstTokenId; - - if (from == address(0)) { - _addTokenToAllTokensEnumeration(tokenId); - } else if (from != to) { - _removeTokenFromOwnerEnumeration(from, tokenId); - } - if (to == address(0)) { - _removeTokenFromAllTokensEnumeration(tokenId); - } else if (to != from) { - _addTokenToOwnerEnumeration(to, tokenId); - } - } - - /** - * @dev Private function to add a token to this extension's ownership-tracking data structures. - * @param to address representing the new owner of the given token ID - * @param tokenId uint256 ID of the token to be added to the tokens list of the given address - */ - function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { - uint256 length = ERC721Upgradeable.balanceOf(to); - _ownedTokens[to][length] = tokenId; - _ownedTokensIndex[tokenId] = length; - } - - /** - * @dev Private function to add a token to this extension's token tracking data structures. - * @param tokenId uint256 ID of the token to be added to the tokens list - */ - function _addTokenToAllTokensEnumeration(uint256 tokenId) private { - _allTokensIndex[tokenId] = _allTokens.length; - _allTokens.push(tokenId); - } - - /** - * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that - * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for - * gas optimizations e.g. when performing a transfer operation (avoiding double writes). - * This has O(1) time complexity, but alters the order of the _ownedTokens array. - * @param from address representing the previous owner of the given token ID - * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address - */ - function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { - // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and - // then delete the last slot (swap and pop). - - uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; - uint256 tokenIndex = _ownedTokensIndex[tokenId]; - - // When the token to delete is the last token, the swap operation is unnecessary - if (tokenIndex != lastTokenIndex) { - uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; - - _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token - _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index - } - - // This also deletes the contents at the last position of the array - delete _ownedTokensIndex[tokenId]; - delete _ownedTokens[from][lastTokenIndex]; - } - - /** - * @dev Private function to remove a token from this extension's token tracking data structures. - * This has O(1) time complexity, but alters the order of the _allTokens array. - * @param tokenId uint256 ID of the token to be removed from the tokens list - */ - function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { - // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and - // then delete the last slot (swap and pop). - - uint256 lastTokenIndex = _allTokens.length - 1; - uint256 tokenIndex = _allTokensIndex[tokenId]; - - // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so - // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding - // an 'if' statement (like in _removeTokenFromOwnerEnumeration) - uint256 lastTokenId = _allTokens[lastTokenIndex]; - - _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token - _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index - - // This also deletes the contents at the last position of the array - delete _allTokensIndex[tokenId]; - _allTokens.pop(); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[46] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol deleted file mode 100644 index bac42a77..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721PausableUpgradeable.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/extensions/ERC721Pausable.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "../../../security/PausableUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev ERC721 token with pausable token transfers, minting and burning. - * - * Useful for scenarios such as preventing trades until the end of an evaluation - * period, or having an emergency switch for freezing all token transfers in the - * event of a large bug. - * - * IMPORTANT: This contract does not include public pause and unpause functions. In - * addition to inheriting this contract, you must define both functions, invoking the - * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate - * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will - * make the contract unpausable. - */ -abstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable { - function __ERC721Pausable_init() internal onlyInitializing { - __Pausable_init_unchained(); - } - - function __ERC721Pausable_init_unchained() internal onlyInitializing { - } - /** - * @dev See {ERC721-_beforeTokenTransfer}. - * - * Requirements: - * - * - the contract must not be paused. - */ - function _beforeTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - super._beforeTokenTransfer(from, to, firstTokenId, batchSize); - - require(!paused(), "ERC721Pausable: token transfer while paused"); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol deleted file mode 100644 index 7f09d51c..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "../../common/ERC2981Upgradeable.sol"; -import "../../../utils/introspection/ERC165Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment - * information. - * - * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for - * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. - * - * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See - * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to - * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. - * - * _Available since v4.5._ - */ -abstract contract ERC721RoyaltyUpgradeable is Initializable, ERC2981Upgradeable, ERC721Upgradeable { - function __ERC721Royalty_init() internal onlyInitializing { - } - - function __ERC721Royalty_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, ERC2981Upgradeable) returns (bool) { - return super.supportsInterface(interfaceId); - } - - /** - * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. - */ - function _burn(uint256 tokenId) internal virtual override { - super._burn(tokenId); - _resetTokenRoyalty(tokenId); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol deleted file mode 100644 index a811eabc..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721URIStorage.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "../../../interfaces/IERC4906Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev ERC721 token with storage based token URI management. - */ -abstract contract ERC721URIStorageUpgradeable is Initializable, IERC4906Upgradeable, ERC721Upgradeable { - using StringsUpgradeable for uint256; - - // Optional mapping for token URIs - mapping(uint256 => string) private _tokenURIs; - - function __ERC721URIStorage_init() internal onlyInitializing { - } - - function __ERC721URIStorage_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface} - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, IERC165Upgradeable) returns (bool) { - return interfaceId == bytes4(0x49064906) || super.supportsInterface(interfaceId); - } - - /** - * @dev See {IERC721Metadata-tokenURI}. - */ - function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { - _requireMinted(tokenId); - - string memory _tokenURI = _tokenURIs[tokenId]; - string memory base = _baseURI(); - - // If there is no base URI, return the token URI. - if (bytes(base).length == 0) { - return _tokenURI; - } - // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). - if (bytes(_tokenURI).length > 0) { - return string(abi.encodePacked(base, _tokenURI)); - } - - return super.tokenURI(tokenId); - } - - /** - * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. - * - * Emits {MetadataUpdate}. - * - * Requirements: - * - * - `tokenId` must exist. - */ - function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { - require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); - _tokenURIs[tokenId] = _tokenURI; - - emit MetadataUpdate(tokenId); - } - - /** - * @dev See {ERC721-_burn}. This override additionally checks to see if a - * token-specific URI was set for the token, and if so, it deletes the token URI from - * the storage mapping. - */ - function _burn(uint256 tokenId) internal virtual override { - super._burn(tokenId); - - if (bytes(_tokenURIs[tokenId]).length != 0) { - delete _tokenURIs[tokenId]; - } - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol deleted file mode 100644 index 649d810c..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721VotesUpgradeable.sol +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Votes.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "../../../governance/utils/VotesUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of ERC721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts - * as 1 vote unit. - * - * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost - * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of - * the votes in governance decisions, or they can delegate to themselves to be their own representative. - * - * _Available since v4.5._ - */ -abstract contract ERC721VotesUpgradeable is Initializable, ERC721Upgradeable, VotesUpgradeable { - function __ERC721Votes_init() internal onlyInitializing { - } - - function __ERC721Votes_init_unchained() internal onlyInitializing { - } - /** - * @dev See {ERC721-_afterTokenTransfer}. Adjusts votes when tokens are transferred. - * - * Emits a {IVotes-DelegateVotesChanged} event. - */ - function _afterTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override { - _transferVotingUnits(from, to, batchSize); - super._afterTokenTransfer(from, to, firstTokenId, batchSize); - } - - /** - * @dev Returns the balance of `account`. - * - * WARNING: Overriding this function will likely result in incorrect vote tracking. - */ - function _getVotingUnits(address account) internal view virtual override returns (uint256) { - return balanceOf(account); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol deleted file mode 100644 index 6be9df96..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/ERC721WrapperUpgradeable.sol +++ /dev/null @@ -1,109 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/extensions/ERC721Wrapper.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Extension of the ERC721 token contract to support token wrapping. - * - * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is useful - * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow the - * wrapping of an existing "basic" ERC721 into a governance token. - * - * _Available since v4.9.0_ - */ -abstract contract ERC721WrapperUpgradeable is Initializable, ERC721Upgradeable, IERC721ReceiverUpgradeable { - IERC721Upgradeable private _underlying; - - function __ERC721Wrapper_init(IERC721Upgradeable underlyingToken) internal onlyInitializing { - __ERC721Wrapper_init_unchained(underlyingToken); - } - - function __ERC721Wrapper_init_unchained(IERC721Upgradeable underlyingToken) internal onlyInitializing { - _underlying = underlyingToken; - } - - /** - * @dev Allow a user to deposit underlying tokens and mint the corresponding tokenIds. - */ - function depositFor(address account, uint256[] memory tokenIds) public virtual returns (bool) { - uint256 length = tokenIds.length; - for (uint256 i = 0; i < length; ++i) { - uint256 tokenId = tokenIds[i]; - - // This is an "unsafe" transfer that doesn't call any hook on the receiver. With underlying() being trusted - // (by design of this contract) and no other contracts expected to be called from there, we are safe. - // slither-disable-next-line reentrancy-no-eth - underlying().transferFrom(_msgSender(), address(this), tokenId); - _safeMint(account, tokenId); - } - - return true; - } - - /** - * @dev Allow a user to burn wrapped tokens and withdraw the corresponding tokenIds of the underlying tokens. - */ - function withdrawTo(address account, uint256[] memory tokenIds) public virtual returns (bool) { - uint256 length = tokenIds.length; - for (uint256 i = 0; i < length; ++i) { - uint256 tokenId = tokenIds[i]; - require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Wrapper: caller is not token owner or approved"); - _burn(tokenId); - // Checks were already performed at this point, and there's no way to retake ownership or approval from - // the wrapped tokenId after this point, so it's safe to remove the reentrancy check for the next line. - // slither-disable-next-line reentrancy-no-eth - underlying().safeTransferFrom(address(this), account, tokenId); - } - - return true; - } - - /** - * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC721 transfers to - * this contract. - * - * In case there's data attached, it validates that the operator is this contract, so only trusted data - * is accepted from {depositFor}. - * - * WARNING: Doesn't work with unsafe transfers (eg. {IERC721-transferFrom}). Use {ERC721Wrapper-_recover} - * for recovering in that scenario. - */ - function onERC721Received( - address, - address from, - uint256 tokenId, - bytes memory - ) public virtual override returns (bytes4) { - require(address(underlying()) == _msgSender(), "ERC721Wrapper: caller is not underlying"); - _safeMint(from, tokenId); - return IERC721ReceiverUpgradeable.onERC721Received.selector; - } - - /** - * @dev Mint a wrapped token to cover any underlyingToken that would have been transferred by mistake. Internal - * function that can be exposed with access control if desired. - */ - function _recover(address account, uint256 tokenId) internal virtual returns (uint256) { - require(underlying().ownerOf(tokenId) == address(this), "ERC721Wrapper: wrapper is not token owner"); - _safeMint(account, tokenId); - return tokenId; - } - - /** - * @dev Returns the underlying token. - */ - function underlying() public view virtual returns (IERC721Upgradeable) { - return _underlying; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol deleted file mode 100644 index 77a76317..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) - -pragma solidity ^0.8.0; - -import "../IERC721Upgradeable.sol"; - -/** - * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension - * @dev See https://eips.ethereum.org/EIPS/eip-721 - */ -interface IERC721EnumerableUpgradeable is IERC721Upgradeable { - /** - * @dev Returns the total amount of tokens stored by the contract. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns a token ID owned by `owner` at a given `index` of its token list. - * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. - */ - function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); - - /** - * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. - * Use along with {totalSupply} to enumerate all tokens. - */ - function tokenByIndex(uint256 index) external view returns (uint256); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol deleted file mode 100644 index 2a3ce91d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/IERC721MetadataUpgradeable.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) - -pragma solidity ^0.8.0; - -import "../IERC721Upgradeable.sol"; - -/** - * @title ERC-721 Non-Fungible Token Standard, optional metadata extension - * @dev See https://eips.ethereum.org/EIPS/eip-721 - */ -interface IERC721MetadataUpgradeable is IERC721Upgradeable { - /** - * @dev Returns the token collection name. - */ - function name() external view returns (string memory); - - /** - * @dev Returns the token collection symbol. - */ - function symbol() external view returns (string memory); - - /** - * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. - */ - function tokenURI(uint256 tokenId) external view returns (string memory); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol deleted file mode 100644 index 80e8f442..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol +++ /dev/null @@ -1,9 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/draft-ERC721Votes.sol) - -pragma solidity ^0.8.0; - -// ERC721Votes was marked as draft due to the EIP-712 dependency. -// EIP-712 is Final as of 2022-08-11. This file is deprecated. - -import "./ERC721VotesUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol deleted file mode 100644 index 41b10a87..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/ERC721PresetMinterPauserAutoIdUpgradeable.sol +++ /dev/null @@ -1,149 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol) - -pragma solidity ^0.8.0; - -import "../ERC721Upgradeable.sol"; -import "../extensions/ERC721EnumerableUpgradeable.sol"; -import "../extensions/ERC721BurnableUpgradeable.sol"; -import "../extensions/ERC721PausableUpgradeable.sol"; -import "../../../access/AccessControlEnumerableUpgradeable.sol"; -import "../../../utils/ContextUpgradeable.sol"; -import "../../../utils/CountersUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev {ERC721} token, including: - * - * - ability for holders to burn (destroy) their tokens - * - a minter role that allows for token minting (creation) - * - a pauser role that allows to stop all token transfers - * - token ID and URI autogeneration - * - * This contract uses {AccessControl} to lock permissioned functions using the - * different roles - head to its documentation for details. - * - * The account that deploys the contract will be granted the minter and pauser - * roles, as well as the default admin role, which will let it grant both minter - * and pauser roles to other accounts. - * - * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ - */ -contract ERC721PresetMinterPauserAutoIdUpgradeable is - Initializable, ContextUpgradeable, - AccessControlEnumerableUpgradeable, - ERC721EnumerableUpgradeable, - ERC721BurnableUpgradeable, - ERC721PausableUpgradeable -{ - using CountersUpgradeable for CountersUpgradeable.Counter; - - bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); - bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); - - CountersUpgradeable.Counter private _tokenIdTracker; - - string private _baseTokenURI; - - function initialize(string memory name, string memory symbol, string memory baseTokenURI) public virtual initializer { - __ERC721PresetMinterPauserAutoId_init(name, symbol, baseTokenURI); - } - /** - * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the - * account that deploys the contract. - * - * Token URIs will be autogenerated based on `baseURI` and their token IDs. - * See {ERC721-tokenURI}. - */ - function __ERC721PresetMinterPauserAutoId_init(string memory name, string memory symbol, string memory baseTokenURI) internal onlyInitializing { - __ERC721_init_unchained(name, symbol); - __Pausable_init_unchained(); - __ERC721PresetMinterPauserAutoId_init_unchained(name, symbol, baseTokenURI); - } - - function __ERC721PresetMinterPauserAutoId_init_unchained(string memory, string memory, string memory baseTokenURI) internal onlyInitializing { - _baseTokenURI = baseTokenURI; - - _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); - - _setupRole(MINTER_ROLE, _msgSender()); - _setupRole(PAUSER_ROLE, _msgSender()); - } - - function _baseURI() internal view virtual override returns (string memory) { - return _baseTokenURI; - } - - /** - * @dev Creates a new token for `to`. Its token ID will be automatically - * assigned (and available on the emitted {IERC721-Transfer} event), and the token - * URI autogenerated based on the base URI passed at construction. - * - * See {ERC721-_mint}. - * - * Requirements: - * - * - the caller must have the `MINTER_ROLE`. - */ - function mint(address to) public virtual { - require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); - - // We cannot just use balanceOf to create the new tokenId because tokens - // can be burned (destroyed), so we need a separate counter. - _mint(to, _tokenIdTracker.current()); - _tokenIdTracker.increment(); - } - - /** - * @dev Pauses all token transfers. - * - * See {ERC721Pausable} and {Pausable-_pause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function pause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); - _pause(); - } - - /** - * @dev Unpauses all token transfers. - * - * See {ERC721Pausable} and {Pausable-_unpause}. - * - * Requirements: - * - * - the caller must have the `PAUSER_ROLE`. - */ - function unpause() public virtual { - require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); - _unpause(); - } - - function _beforeTokenTransfer( - address from, - address to, - uint256 firstTokenId, - uint256 batchSize - ) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable) { - super._beforeTokenTransfer(from, to, firstTokenId, batchSize); - } - - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface( - bytes4 interfaceId - ) public view virtual override(AccessControlEnumerableUpgradeable, ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (bool) { - return super.supportsInterface(interfaceId); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md deleted file mode 100644 index 468200b7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/presets/README.md +++ /dev/null @@ -1 +0,0 @@ -Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol deleted file mode 100644 index 72544add..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC721/utils/ERC721HolderUpgradeable.sol +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/utils/ERC721Holder.sol) - -pragma solidity ^0.8.0; - -import "../IERC721ReceiverUpgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the {IERC721Receiver} interface. - * - * Accepts all token transfers. - * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. - */ -contract ERC721HolderUpgradeable is Initializable, IERC721ReceiverUpgradeable { - function __ERC721Holder_init() internal onlyInitializing { - } - - function __ERC721Holder_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC721Receiver-onERC721Received}. - * - * Always returns `IERC721Receiver.onERC721Received.selector`. - */ - function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { - return this.onERC721Received.selector; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol deleted file mode 100644 index 17632bf4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/ERC777Upgradeable.sol +++ /dev/null @@ -1,526 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/ERC777.sol) - -pragma solidity ^0.8.0; - -import "./IERC777Upgradeable.sol"; -import "./IERC777RecipientUpgradeable.sol"; -import "./IERC777SenderUpgradeable.sol"; -import "../ERC20/IERC20Upgradeable.sol"; -import "../../utils/AddressUpgradeable.sol"; -import "../../utils/ContextUpgradeable.sol"; -import "../../utils/introspection/IERC1820RegistryUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the {IERC777} interface. - * - * This implementation is agnostic to the way tokens are created. This means - * that a supply mechanism has to be added in a derived contract using {_mint}. - * - * Support for ERC20 is included in this contract, as specified by the EIP: both - * the ERC777 and ERC20 interfaces can be safely used when interacting with it. - * Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token - * movements. - * - * Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there - * are no special restrictions in the amount of tokens that created, moved, or - * destroyed. This makes integration with ERC20 applications seamless. - * - * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. - */ -contract ERC777Upgradeable is Initializable, ContextUpgradeable, IERC777Upgradeable, IERC20Upgradeable { - using AddressUpgradeable for address; - - IERC1820RegistryUpgradeable internal constant _ERC1820_REGISTRY = IERC1820RegistryUpgradeable(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24); - - mapping(address => uint256) private _balances; - - uint256 private _totalSupply; - - string private _name; - string private _symbol; - - bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender"); - bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient"); - - // This isn't ever read from - it's only used to respond to the defaultOperators query. - address[] private _defaultOperatorsArray; - - // Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators). - mapping(address => bool) private _defaultOperators; - - // For each account, a mapping of its operators and revoked default operators. - mapping(address => mapping(address => bool)) private _operators; - mapping(address => mapping(address => bool)) private _revokedDefaultOperators; - - // ERC20-allowances - mapping(address => mapping(address => uint256)) private _allowances; - - /** - * @dev `defaultOperators` may be an empty array. - */ - function __ERC777_init(string memory name_, string memory symbol_, address[] memory defaultOperators_) internal onlyInitializing { - __ERC777_init_unchained(name_, symbol_, defaultOperators_); - } - - function __ERC777_init_unchained(string memory name_, string memory symbol_, address[] memory defaultOperators_) internal onlyInitializing { - _name = name_; - _symbol = symbol_; - - _defaultOperatorsArray = defaultOperators_; - for (uint256 i = 0; i < defaultOperators_.length; i++) { - _defaultOperators[defaultOperators_[i]] = true; - } - - // register interfaces - _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC777Token"), address(this)); - _ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC20Token"), address(this)); - } - - /** - * @dev See {IERC777-name}. - */ - function name() public view virtual override returns (string memory) { - return _name; - } - - /** - * @dev See {IERC777-symbol}. - */ - function symbol() public view virtual override returns (string memory) { - return _symbol; - } - - /** - * @dev See {ERC20-decimals}. - * - * Always returns 18, as per the - * [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility). - */ - function decimals() public pure virtual returns (uint8) { - return 18; - } - - /** - * @dev See {IERC777-granularity}. - * - * This implementation always returns `1`. - */ - function granularity() public view virtual override returns (uint256) { - return 1; - } - - /** - * @dev See {IERC777-totalSupply}. - */ - function totalSupply() public view virtual override(IERC20Upgradeable, IERC777Upgradeable) returns (uint256) { - return _totalSupply; - } - - /** - * @dev Returns the amount of tokens owned by an account (`tokenHolder`). - */ - function balanceOf(address tokenHolder) public view virtual override(IERC20Upgradeable, IERC777Upgradeable) returns (uint256) { - return _balances[tokenHolder]; - } - - /** - * @dev See {IERC777-send}. - * - * Also emits a {IERC20-Transfer} event for ERC20 compatibility. - */ - function send(address recipient, uint256 amount, bytes memory data) public virtual override { - _send(_msgSender(), recipient, amount, data, "", true); - } - - /** - * @dev See {IERC20-transfer}. - * - * Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient} - * interface if it is a contract. - * - * Also emits a {Sent} event. - */ - function transfer(address recipient, uint256 amount) public virtual override returns (bool) { - _send(_msgSender(), recipient, amount, "", "", false); - return true; - } - - /** - * @dev See {IERC777-burn}. - * - * Also emits a {IERC20-Transfer} event for ERC20 compatibility. - */ - function burn(uint256 amount, bytes memory data) public virtual override { - _burn(_msgSender(), amount, data, ""); - } - - /** - * @dev See {IERC777-isOperatorFor}. - */ - function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) { - return - operator == tokenHolder || - (_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) || - _operators[tokenHolder][operator]; - } - - /** - * @dev See {IERC777-authorizeOperator}. - */ - function authorizeOperator(address operator) public virtual override { - require(_msgSender() != operator, "ERC777: authorizing self as operator"); - - if (_defaultOperators[operator]) { - delete _revokedDefaultOperators[_msgSender()][operator]; - } else { - _operators[_msgSender()][operator] = true; - } - - emit AuthorizedOperator(operator, _msgSender()); - } - - /** - * @dev See {IERC777-revokeOperator}. - */ - function revokeOperator(address operator) public virtual override { - require(operator != _msgSender(), "ERC777: revoking self as operator"); - - if (_defaultOperators[operator]) { - _revokedDefaultOperators[_msgSender()][operator] = true; - } else { - delete _operators[_msgSender()][operator]; - } - - emit RevokedOperator(operator, _msgSender()); - } - - /** - * @dev See {IERC777-defaultOperators}. - */ - function defaultOperators() public view virtual override returns (address[] memory) { - return _defaultOperatorsArray; - } - - /** - * @dev See {IERC777-operatorSend}. - * - * Emits {Sent} and {IERC20-Transfer} events. - */ - function operatorSend( - address sender, - address recipient, - uint256 amount, - bytes memory data, - bytes memory operatorData - ) public virtual override { - require(isOperatorFor(_msgSender(), sender), "ERC777: caller is not an operator for holder"); - _send(sender, recipient, amount, data, operatorData, true); - } - - /** - * @dev See {IERC777-operatorBurn}. - * - * Emits {Burned} and {IERC20-Transfer} events. - */ - function operatorBurn( - address account, - uint256 amount, - bytes memory data, - bytes memory operatorData - ) public virtual override { - require(isOperatorFor(_msgSender(), account), "ERC777: caller is not an operator for holder"); - _burn(account, amount, data, operatorData); - } - - /** - * @dev See {IERC20-allowance}. - * - * Note that operator and allowance concepts are orthogonal: operators may - * not have allowance, and accounts with allowance may not be operators - * themselves. - */ - function allowance(address holder, address spender) public view virtual override returns (uint256) { - return _allowances[holder][spender]; - } - - /** - * @dev See {IERC20-approve}. - * - * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on - * `transferFrom`. This is semantically equivalent to an infinite approval. - * - * Note that accounts cannot have allowance issued by their operators. - */ - function approve(address spender, uint256 value) public virtual override returns (bool) { - address holder = _msgSender(); - _approve(holder, spender, value); - return true; - } - - /** - * @dev See {IERC20-transferFrom}. - * - * NOTE: Does not update the allowance if the current allowance - * is the maximum `uint256`. - * - * Note that operator and allowance concepts are orthogonal: operators cannot - * call `transferFrom` (unless they have allowance), and accounts with - * allowance cannot call `operatorSend` (unless they are operators). - * - * Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events. - */ - function transferFrom(address holder, address recipient, uint256 amount) public virtual override returns (bool) { - address spender = _msgSender(); - _spendAllowance(holder, spender, amount); - _send(holder, recipient, amount, "", "", false); - return true; - } - - /** - * @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * If a send hook is registered for `account`, the corresponding function - * will be called with the caller address as the `operator` and with - * `userData` and `operatorData`. - * - * See {IERC777Sender} and {IERC777Recipient}. - * - * Emits {Minted} and {IERC20-Transfer} events. - * - * Requirements - * - * - `account` cannot be the zero address. - * - if `account` is a contract, it must implement the {IERC777Recipient} - * interface. - */ - function _mint(address account, uint256 amount, bytes memory userData, bytes memory operatorData) internal virtual { - _mint(account, amount, userData, operatorData, true); - } - - /** - * @dev Creates `amount` tokens and assigns them to `account`, increasing - * the total supply. - * - * If `requireReceptionAck` is set to true, and if a send hook is - * registered for `account`, the corresponding function will be called with - * `operator`, `data` and `operatorData`. - * - * See {IERC777Sender} and {IERC777Recipient}. - * - * Emits {Minted} and {IERC20-Transfer} events. - * - * Requirements - * - * - `account` cannot be the zero address. - * - if `account` is a contract, it must implement the {IERC777Recipient} - * interface. - */ - function _mint( - address account, - uint256 amount, - bytes memory userData, - bytes memory operatorData, - bool requireReceptionAck - ) internal virtual { - require(account != address(0), "ERC777: mint to the zero address"); - - address operator = _msgSender(); - - _beforeTokenTransfer(operator, address(0), account, amount); - - // Update state variables - _totalSupply += amount; - _balances[account] += amount; - - _callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck); - - emit Minted(operator, account, amount, userData, operatorData); - emit Transfer(address(0), account, amount); - } - - /** - * @dev Send tokens - * @param from address token holder address - * @param to address recipient address - * @param amount uint256 amount of tokens to transfer - * @param userData bytes extra information provided by the token holder (if any) - * @param operatorData bytes extra information provided by the operator (if any) - * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient - */ - function _send( - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData, - bool requireReceptionAck - ) internal virtual { - require(from != address(0), "ERC777: transfer from the zero address"); - require(to != address(0), "ERC777: transfer to the zero address"); - - address operator = _msgSender(); - - _callTokensToSend(operator, from, to, amount, userData, operatorData); - - _move(operator, from, to, amount, userData, operatorData); - - _callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck); - } - - /** - * @dev Burn tokens - * @param from address token holder address - * @param amount uint256 amount of tokens to burn - * @param data bytes extra information provided by the token holder - * @param operatorData bytes extra information provided by the operator (if any) - */ - function _burn(address from, uint256 amount, bytes memory data, bytes memory operatorData) internal virtual { - require(from != address(0), "ERC777: burn from the zero address"); - - address operator = _msgSender(); - - _callTokensToSend(operator, from, address(0), amount, data, operatorData); - - _beforeTokenTransfer(operator, from, address(0), amount); - - // Update state variables - uint256 fromBalance = _balances[from]; - require(fromBalance >= amount, "ERC777: burn amount exceeds balance"); - unchecked { - _balances[from] = fromBalance - amount; - } - _totalSupply -= amount; - - emit Burned(operator, from, amount, data, operatorData); - emit Transfer(from, address(0), amount); - } - - function _move( - address operator, - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData - ) private { - _beforeTokenTransfer(operator, from, to, amount); - - uint256 fromBalance = _balances[from]; - require(fromBalance >= amount, "ERC777: transfer amount exceeds balance"); - unchecked { - _balances[from] = fromBalance - amount; - } - _balances[to] += amount; - - emit Sent(operator, from, to, amount, userData, operatorData); - emit Transfer(from, to, amount); - } - - /** - * @dev See {ERC20-_approve}. - * - * Note that accounts cannot have allowance issued by their operators. - */ - function _approve(address holder, address spender, uint256 value) internal virtual { - require(holder != address(0), "ERC777: approve from the zero address"); - require(spender != address(0), "ERC777: approve to the zero address"); - - _allowances[holder][spender] = value; - emit Approval(holder, spender, value); - } - - /** - * @dev Call from.tokensToSend() if the interface is registered - * @param operator address operator requesting the transfer - * @param from address token holder address - * @param to address recipient address - * @param amount uint256 amount of tokens to transfer - * @param userData bytes extra information provided by the token holder (if any) - * @param operatorData bytes extra information provided by the operator (if any) - */ - function _callTokensToSend( - address operator, - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData - ) private { - address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH); - if (implementer != address(0)) { - IERC777SenderUpgradeable(implementer).tokensToSend(operator, from, to, amount, userData, operatorData); - } - } - - /** - * @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but - * tokensReceived() was not registered for the recipient - * @param operator address operator requesting the transfer - * @param from address token holder address - * @param to address recipient address - * @param amount uint256 amount of tokens to transfer - * @param userData bytes extra information provided by the token holder (if any) - * @param operatorData bytes extra information provided by the operator (if any) - * @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient - */ - function _callTokensReceived( - address operator, - address from, - address to, - uint256 amount, - bytes memory userData, - bytes memory operatorData, - bool requireReceptionAck - ) private { - address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH); - if (implementer != address(0)) { - IERC777RecipientUpgradeable(implementer).tokensReceived(operator, from, to, amount, userData, operatorData); - } else if (requireReceptionAck) { - require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient"); - } - } - - /** - * @dev Updates `owner` s allowance for `spender` based on spent `amount`. - * - * Does not update the allowance amount in case of infinite allowance. - * Revert if not enough allowance is available. - * - * Might emit an {IERC20-Approval} event. - */ - function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { - uint256 currentAllowance = allowance(owner, spender); - if (currentAllowance != type(uint256).max) { - require(currentAllowance >= amount, "ERC777: insufficient allowance"); - unchecked { - _approve(owner, spender, currentAllowance - amount); - } - } - } - - /** - * @dev Hook that is called before any token transfer. This includes - * calls to {send}, {transfer}, {operatorSend}, {transferFrom}, minting and burning. - * - * Calling conditions: - * - * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens - * will be to transferred to `to`. - * - when `from` is zero, `amount` tokens will be minted for `to`. - * - when `to` is zero, `amount` of ``from``'s tokens will be burned. - * - `from` and `to` are never both zero. - * - * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. - */ - function _beforeTokenTransfer(address operator, address from, address to, uint256 amount) internal virtual {} - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[41] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol deleted file mode 100644 index 9ffe79cf..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777RecipientUpgradeable.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. - * - * Accounts can be notified of {IERC777} tokens being sent to them by having a - * contract implement this interface (contract holders can be their own - * implementer) and registering it on the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. - * - * See {IERC1820Registry} and {ERC1820Implementer}. - */ -interface IERC777RecipientUpgradeable { - /** - * @dev Called by an {IERC777} token contract whenever tokens are being - * moved or created into a registered account (`to`). The type of operation - * is conveyed by `from` being the zero address or not. - * - * This call occurs _after_ the token contract's state is updated, so - * {IERC777-balanceOf}, etc., can be used to query the post-operation state. - * - * This function may revert to prevent the operation from being executed. - */ - function tokensReceived( - address operator, - address from, - address to, - uint256 amount, - bytes calldata userData, - bytes calldata operatorData - ) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol deleted file mode 100644 index 3455d0ac..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777SenderUpgradeable.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Sender.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC777TokensSender standard as defined in the EIP. - * - * {IERC777} Token holders can be notified of operations performed on their - * tokens by having a contract implement this interface (contract holders can be - * their own implementer) and registering it on the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. - * - * See {IERC1820Registry} and {ERC1820Implementer}. - */ -interface IERC777SenderUpgradeable { - /** - * @dev Called by an {IERC777} token contract whenever a registered holder's - * (`from`) tokens are about to be moved or destroyed. The type of operation - * is conveyed by `to` being the zero address or not. - * - * This call occurs _before_ the token contract's state is updated, so - * {IERC777-balanceOf}, etc., can be used to query the pre-operation state. - * - * This function may revert to prevent the operation from being executed. - */ - function tokensToSend( - address operator, - address from, - address to, - uint256 amount, - bytes calldata userData, - bytes calldata operatorData - ) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol deleted file mode 100644 index 18be45b3..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/IERC777Upgradeable.sol +++ /dev/null @@ -1,200 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC777/IERC777.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC777Token standard as defined in the EIP. - * - * This contract uses the - * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let - * token holders and recipients react to token movements by using setting implementers - * for the associated interfaces in said registry. See {IERC1820Registry} and - * {ERC1820Implementer}. - */ -interface IERC777Upgradeable { - /** - * @dev Emitted when `amount` tokens are created by `operator` and assigned to `to`. - * - * Note that some additional user `data` and `operatorData` can be logged in the event. - */ - event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); - - /** - * @dev Emitted when `operator` destroys `amount` tokens from `account`. - * - * Note that some additional user `data` and `operatorData` can be logged in the event. - */ - event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); - - /** - * @dev Emitted when `operator` is made operator for `tokenHolder`. - */ - event AuthorizedOperator(address indexed operator, address indexed tokenHolder); - - /** - * @dev Emitted when `operator` is revoked its operator status for `tokenHolder`. - */ - event RevokedOperator(address indexed operator, address indexed tokenHolder); - - /** - * @dev Returns the name of the token. - */ - function name() external view returns (string memory); - - /** - * @dev Returns the symbol of the token, usually a shorter version of the - * name. - */ - function symbol() external view returns (string memory); - - /** - * @dev Returns the smallest part of the token that is not divisible. This - * means all token operations (creation, movement and destruction) must have - * amounts that are a multiple of this number. - * - * For most token contracts, this value will equal 1. - */ - function granularity() external view returns (uint256); - - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns the amount of tokens owned by an account (`owner`). - */ - function balanceOf(address owner) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `recipient`. - * - * If send or receive hooks are registered for the caller and `recipient`, - * the corresponding functions will be called with `data` and empty - * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. - * - * Emits a {Sent} event. - * - * Requirements - * - * - the caller must have at least `amount` tokens. - * - `recipient` cannot be the zero address. - * - if `recipient` is a contract, it must implement the {IERC777Recipient} - * interface. - */ - function send(address recipient, uint256 amount, bytes calldata data) external; - - /** - * @dev Destroys `amount` tokens from the caller's account, reducing the - * total supply. - * - * If a send hook is registered for the caller, the corresponding function - * will be called with `data` and empty `operatorData`. See {IERC777Sender}. - * - * Emits a {Burned} event. - * - * Requirements - * - * - the caller must have at least `amount` tokens. - */ - function burn(uint256 amount, bytes calldata data) external; - - /** - * @dev Returns true if an account is an operator of `tokenHolder`. - * Operators can send and burn tokens on behalf of their owners. All - * accounts are their own operator. - * - * See {operatorSend} and {operatorBurn}. - */ - function isOperatorFor(address operator, address tokenHolder) external view returns (bool); - - /** - * @dev Make an account an operator of the caller. - * - * See {isOperatorFor}. - * - * Emits an {AuthorizedOperator} event. - * - * Requirements - * - * - `operator` cannot be calling address. - */ - function authorizeOperator(address operator) external; - - /** - * @dev Revoke an account's operator status for the caller. - * - * See {isOperatorFor} and {defaultOperators}. - * - * Emits a {RevokedOperator} event. - * - * Requirements - * - * - `operator` cannot be calling address. - */ - function revokeOperator(address operator) external; - - /** - * @dev Returns the list of default operators. These accounts are operators - * for all token holders, even if {authorizeOperator} was never called on - * them. - * - * This list is immutable, but individual holders may revoke these via - * {revokeOperator}, in which case {isOperatorFor} will return false. - */ - function defaultOperators() external view returns (address[] memory); - - /** - * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must - * be an operator of `sender`. - * - * If send or receive hooks are registered for `sender` and `recipient`, - * the corresponding functions will be called with `data` and - * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. - * - * Emits a {Sent} event. - * - * Requirements - * - * - `sender` cannot be the zero address. - * - `sender` must have at least `amount` tokens. - * - the caller must be an operator for `sender`. - * - `recipient` cannot be the zero address. - * - if `recipient` is a contract, it must implement the {IERC777Recipient} - * interface. - */ - function operatorSend( - address sender, - address recipient, - uint256 amount, - bytes calldata data, - bytes calldata operatorData - ) external; - - /** - * @dev Destroys `amount` tokens from `account`, reducing the total supply. - * The caller must be an operator of `account`. - * - * If a send hook is registered for `account`, the corresponding function - * will be called with `data` and `operatorData`. See {IERC777Sender}. - * - * Emits a {Burned} event. - * - * Requirements - * - * - `account` cannot be the zero address. - * - `account` must have at least `amount` tokens. - * - the caller must be an operator for `account`. - */ - function operatorBurn(address account, uint256 amount, bytes calldata data, bytes calldata operatorData) external; - - event Sent( - address indexed operator, - address indexed from, - address indexed to, - uint256 amount, - bytes data, - bytes operatorData - ); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc deleted file mode 100644 index ac326abe..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/README.adoc +++ /dev/null @@ -1,32 +0,0 @@ -= ERC 777 - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/token/erc777 - -CAUTION: As of v4.9, OpenZeppelin's implementation of ERC-777 is deprecated and will be removed in the next major release. - -This set of interfaces and contracts are all related to the https://eips.ethereum.org/EIPS/eip-777[ERC777 token standard]. - -TIP: For an overview of ERC777 tokens and a walk through on how to create a token contract read our xref:ROOT:erc777.adoc[ERC777 guide]. - -The token behavior itself is implemented in the core contracts: {IERC777}, {ERC777}. - -Additionally there are interfaces used to develop contracts that react to token movements: {IERC777Sender}, {IERC777Recipient}. - -== Core - -{{IERC777}} - -{{ERC777}} - -== Hooks - -{{IERC777Sender}} - -{{IERC777Recipient}} - -== Presets - -These contracts are preconfigured combinations of features. They can be used through inheritance or as models to copy and paste their source code. - -{{ERC777PresetFixedSupply}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol deleted file mode 100644 index 71827f94..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC777/presets/ERC777PresetFixedSupplyUpgradeable.sol +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (token/ERC777/presets/ERC777PresetFixedSupply.sol) -pragma solidity ^0.8.0; - -import "../ERC777Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; - -/** - * @dev {ERC777} token, including: - * - * - Preminted initial supply - * - No access control mechanism (for minting/pausing) and hence no governance - * - * _Available since v3.4._ - */ -contract ERC777PresetFixedSupplyUpgradeable is Initializable, ERC777Upgradeable { - function initialize( - string memory name, - string memory symbol, - address[] memory defaultOperators, - uint256 initialSupply, - address owner - ) public virtual initializer { - __ERC777PresetFixedSupply_init(name, symbol, defaultOperators, initialSupply, owner); - } - /** - * @dev Mints `initialSupply` amount of token and transfers them to `owner`. - * - * See {ERC777-constructor}. - */ - function __ERC777PresetFixedSupply_init( - string memory name, - string memory symbol, - address[] memory defaultOperators, - uint256 initialSupply, - address owner - ) internal onlyInitializing { - __ERC777_init_unchained(name, symbol, defaultOperators); - __ERC777PresetFixedSupply_init_unchained(name, symbol, defaultOperators, initialSupply, owner); - } - - function __ERC777PresetFixedSupply_init_unchained( - string memory, - string memory, - address[] memory, - uint256 initialSupply, - address owner - ) internal onlyInitializing { - _mint(owner, initialSupply, "", ""); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol deleted file mode 100644 index 6420b8b5..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/ERC2981Upgradeable.sol +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) - -pragma solidity ^0.8.0; - -import "../../interfaces/IERC2981Upgradeable.sol"; -import "../../utils/introspection/ERC165Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. - * - * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for - * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. - * - * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the - * fee is specified in basis points by default. - * - * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See - * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to - * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. - * - * _Available since v4.5._ - */ -abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { - struct RoyaltyInfo { - address receiver; - uint96 royaltyFraction; - } - - RoyaltyInfo private _defaultRoyaltyInfo; - mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; - - function __ERC2981_init() internal onlyInitializing { - } - - function __ERC2981_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { - return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); - } - - /** - * @inheritdoc IERC2981Upgradeable - */ - function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { - RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; - - if (royalty.receiver == address(0)) { - royalty = _defaultRoyaltyInfo; - } - - uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); - - return (royalty.receiver, royaltyAmount); - } - - /** - * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a - * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an - * override. - */ - function _feeDenominator() internal pure virtual returns (uint96) { - return 10000; - } - - /** - * @dev Sets the royalty information that all ids in this contract will default to. - * - * Requirements: - * - * - `receiver` cannot be the zero address. - * - `feeNumerator` cannot be greater than the fee denominator. - */ - function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { - require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); - require(receiver != address(0), "ERC2981: invalid receiver"); - - _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); - } - - /** - * @dev Removes default royalty information. - */ - function _deleteDefaultRoyalty() internal virtual { - delete _defaultRoyaltyInfo; - } - - /** - * @dev Sets the royalty information for a specific token id, overriding the global default. - * - * Requirements: - * - * - `receiver` cannot be the zero address. - * - `feeNumerator` cannot be greater than the fee denominator. - */ - function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { - require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); - require(receiver != address(0), "ERC2981: Invalid parameters"); - - _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); - } - - /** - * @dev Resets royalty information for the token id back to the global default. - */ - function _resetTokenRoyalty(uint256 tokenId) internal virtual { - delete _tokenRoyaltyInfo[tokenId]; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc deleted file mode 100644 index af616746..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/common/README.adoc +++ /dev/null @@ -1,10 +0,0 @@ -= Common (Tokens) - -Functionality that is common to multiple token standards. - -* {ERC2981}: NFT Royalties compatible with both ERC721 and ERC1155. -** For ERC721 consider {ERC721Royalty} which clears the royalty information from storage on burn. - -== Contracts - -{{ERC2981}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol deleted file mode 100644 index 3201666f..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/AddressUpgradeable.sol +++ /dev/null @@ -1,244 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) - -pragma solidity ^0.8.1; - -/** - * @dev Collection of functions related to the address type - */ -library AddressUpgradeable { - /** - * @dev Returns true if `account` is a contract. - * - * [IMPORTANT] - * ==== - * It is unsafe to assume that an address for which this function returns - * false is an externally-owned account (EOA) and not a contract. - * - * Among others, `isContract` will return false for the following - * types of addresses: - * - * - an externally-owned account - * - a contract in construction - * - an address where a contract will be created - * - an address where a contract lived, but was destroyed - * - * Furthermore, `isContract` will also return true if the target contract within - * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, - * which only has an effect at the end of a transaction. - * ==== - * - * [IMPORTANT] - * ==== - * You shouldn't rely on `isContract` to protect against flash loan attacks! - * - * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets - * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract - * constructor. - * ==== - */ - function isContract(address account) internal view returns (bool) { - // This method relies on extcodesize/address.code.length, which returns 0 - // for contracts in construction, since the code is only stored at the end - // of the constructor execution. - - return account.code.length > 0; - } - - /** - * @dev Replacement for Solidity's `transfer`: sends `amount` wei to - * `recipient`, forwarding all available gas and reverting on errors. - * - * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost - * of certain opcodes, possibly making contracts go over the 2300 gas limit - * imposed by `transfer`, making them unable to receive funds via - * `transfer`. {sendValue} removes this limitation. - * - * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. - * - * IMPORTANT: because control is transferred to `recipient`, care must be - * taken to not create reentrancy vulnerabilities. Consider using - * {ReentrancyGuard} or the - * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. - */ - function sendValue(address payable recipient, uint256 amount) internal { - require(address(this).balance >= amount, "Address: insufficient balance"); - - (bool success, ) = recipient.call{value: amount}(""); - require(success, "Address: unable to send value, recipient may have reverted"); - } - - /** - * @dev Performs a Solidity function call using a low level `call`. A - * plain `call` is an unsafe replacement for a function call: use this - * function instead. - * - * If `target` reverts with a revert reason, it is bubbled up by this - * function (like regular Solidity function calls). - * - * Returns the raw returned data. To convert to the expected return value, - * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. - * - * Requirements: - * - * - `target` must be a contract. - * - calling `target` with `data` must not revert. - * - * _Available since v3.1._ - */ - function functionCall(address target, bytes memory data) internal returns (bytes memory) { - return functionCallWithValue(target, data, 0, "Address: low-level call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with - * `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCall( - address target, - bytes memory data, - string memory errorMessage - ) internal returns (bytes memory) { - return functionCallWithValue(target, data, 0, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but also transferring `value` wei to `target`. - * - * Requirements: - * - * - the calling contract must have an ETH balance of at least `value`. - * - the called Solidity function must be `payable`. - * - * _Available since v3.1._ - */ - function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { - return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); - } - - /** - * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but - * with `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ - function functionCallWithValue( - address target, - bytes memory data, - uint256 value, - string memory errorMessage - ) internal returns (bytes memory) { - require(address(this).balance >= value, "Address: insufficient balance for call"); - (bool success, bytes memory returndata) = target.call{value: value}(data); - return verifyCallResultFromTarget(target, success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { - return functionStaticCall(target, data, "Address: low-level static call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ - function functionStaticCall( - address target, - bytes memory data, - string memory errorMessage - ) internal view returns (bytes memory) { - (bool success, bytes memory returndata) = target.staticcall(data); - return verifyCallResultFromTarget(target, success, returndata, errorMessage); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { - return functionDelegateCall(target, data, "Address: low-level delegate call failed"); - } - - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a delegate call. - * - * _Available since v3.4._ - */ - function functionDelegateCall( - address target, - bytes memory data, - string memory errorMessage - ) internal returns (bytes memory) { - (bool success, bytes memory returndata) = target.delegatecall(data); - return verifyCallResultFromTarget(target, success, returndata, errorMessage); - } - - /** - * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling - * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. - * - * _Available since v4.8._ - */ - function verifyCallResultFromTarget( - address target, - bool success, - bytes memory returndata, - string memory errorMessage - ) internal view returns (bytes memory) { - if (success) { - if (returndata.length == 0) { - // only check isContract if the call was successful and the return data is empty - // otherwise we already know that it was a contract - require(isContract(target), "Address: call to non-contract"); - } - return returndata; - } else { - _revert(returndata, errorMessage); - } - } - - /** - * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the - * revert reason or using the provided one. - * - * _Available since v4.3._ - */ - function verifyCallResult( - bool success, - bytes memory returndata, - string memory errorMessage - ) internal pure returns (bytes memory) { - if (success) { - return returndata; - } else { - _revert(returndata, errorMessage); - } - } - - function _revert(bytes memory returndata, string memory errorMessage) private pure { - // Look for revert reason and bubble it up if present - if (returndata.length > 0) { - // The easiest way to bubble the revert reason is using memory via assembly - /// @solidity memory-safe-assembly - assembly { - let returndata_size := mload(returndata) - revert(add(32, returndata), returndata_size) - } - } else { - revert(errorMessage); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol deleted file mode 100644 index bb2fc486..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ArraysUpgradeable.sol +++ /dev/null @@ -1,105 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Arrays.sol) - -pragma solidity ^0.8.0; - -import "./StorageSlotUpgradeable.sol"; -import "./math/MathUpgradeable.sol"; - -/** - * @dev Collection of functions related to array types. - */ -library ArraysUpgradeable { - using StorageSlotUpgradeable for bytes32; - - /** - * @dev Searches a sorted `array` and returns the first index that contains - * a value greater or equal to `element`. If no such index exists (i.e. all - * values in the array are strictly less than `element`), the array length is - * returned. Time complexity O(log n). - * - * `array` is expected to be sorted in ascending order, and to contain no - * repeated elements. - */ - function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { - if (array.length == 0) { - return 0; - } - - uint256 low = 0; - uint256 high = array.length; - - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - - // Note that mid will always be strictly less than high (i.e. it will be a valid array index) - // because Math.average rounds down (it does integer division with truncation). - if (unsafeAccess(array, mid).value > element) { - high = mid; - } else { - low = mid + 1; - } - } - - // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. - if (low > 0 && unsafeAccess(array, low - 1).value == element) { - return low - 1; - } else { - return low; - } - } - - /** - * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. - * - * WARNING: Only use if you are certain `pos` is lower than the array length. - */ - function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.AddressSlot storage) { - bytes32 slot; - // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` - // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. - - /// @solidity memory-safe-assembly - assembly { - mstore(0, arr.slot) - slot := add(keccak256(0, 0x20), pos) - } - return slot.getAddressSlot(); - } - - /** - * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. - * - * WARNING: Only use if you are certain `pos` is lower than the array length. - */ - function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Bytes32Slot storage) { - bytes32 slot; - // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` - // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. - - /// @solidity memory-safe-assembly - assembly { - mstore(0, arr.slot) - slot := add(keccak256(0, 0x20), pos) - } - return slot.getBytes32Slot(); - } - - /** - * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. - * - * WARNING: Only use if you are certain `pos` is lower than the array length. - */ - function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlotUpgradeable.Uint256Slot storage) { - bytes32 slot; - // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` - // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. - - /// @solidity memory-safe-assembly - assembly { - mstore(0, arr.slot) - slot := add(keccak256(0, 0x20), pos) - } - return slot.getUint256Slot(); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol deleted file mode 100644 index efbda771..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Base64Upgradeable.sol +++ /dev/null @@ -1,101 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.6) (utils/Base64.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Provides a set of functions to operate with Base64 strings. - * - * _Available since v4.5._ - */ -library Base64Upgradeable { - /** - * @dev Base64 Encoding/Decoding Table - */ - string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - /** - * @dev Converts a `bytes` to its Bytes64 `string` representation. - */ - function encode(bytes memory data) internal pure returns (string memory) { - /** - * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence - * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol - */ - if (data.length == 0) return ""; - - // Loads the table into memory - string memory table = _TABLE; - - // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter - // and split into 4 numbers of 6 bits. - // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up - // - `data.length + 2` -> Round up - // - `/ 3` -> Number of 3-bytes chunks - // - `4 *` -> 4 characters for each chunk - string memory result = new string(4 * ((data.length + 2) / 3)); - - /// @solidity memory-safe-assembly - assembly { - // Prepare the lookup table (skip the first "length" byte) - let tablePtr := add(table, 1) - - // Prepare result pointer, jump over length - let resultPtr := add(result, 0x20) - let dataPtr := data - let endPtr := add(data, mload(data)) - - // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and - // set it to zero to make sure no dirty bytes are read in that section. - let afterPtr := add(endPtr, 0x20) - let afterCache := mload(afterPtr) - mstore(afterPtr, 0x00) - - // Run over the input, 3 bytes at a time - for { - - } lt(dataPtr, endPtr) { - - } { - // Advance 3 bytes - dataPtr := add(dataPtr, 3) - let input := mload(dataPtr) - - // To write each character, shift the 3 byte (24 bits) chunk - // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) - // and apply logical AND with 0x3F to bitmask the least significant 6 bits. - // Use this as an index into the lookup table, mload an entire word - // so the desired character is in the least significant byte, and - // mstore8 this least significant byte into the result and continue. - - mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - - mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - - mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - - mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) - resultPtr := add(resultPtr, 1) // Advance - } - - // Reset the value that was cached - mstore(afterPtr, afterCache) - - // When data `bytes` is not exactly 3 bytes long - // it is padded with `=` characters at the end - switch mod(mload(data), 3) - case 1 { - mstore8(sub(resultPtr, 1), 0x3d) - mstore8(sub(resultPtr, 2), 0x3d) - } - case 2 { - mstore8(sub(resultPtr, 1), 0x3d) - } - } - - return result; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol deleted file mode 100644 index 6dc53b51..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CheckpointsUpgradeable.sol +++ /dev/null @@ -1,560 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Checkpoints.sol) -// This file was procedurally generated from scripts/generate/templates/Checkpoints.js. - -pragma solidity ^0.8.0; - -import "./math/MathUpgradeable.sol"; -import "./math/SafeCastUpgradeable.sol"; - -/** - * @dev This library defines the `History` struct, for checkpointing values as they change at different points in - * time, and later looking up past values by block number. See {Votes} as an example. - * - * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new - * checkpoint for the current transaction block using the {push} function. - * - * _Available since v4.5._ - */ -library CheckpointsUpgradeable { - struct History { - Checkpoint[] _checkpoints; - } - - struct Checkpoint { - uint32 _blockNumber; - uint224 _value; - } - - /** - * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one - * before it is returned, or zero otherwise. Because the number returned corresponds to that at the end of the - * block, the requested block number must be in the past, excluding the current block. - */ - function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { - require(blockNumber < block.number, "Checkpoints: block not yet mined"); - uint32 key = SafeCastUpgradeable.toUint32(blockNumber); - - uint256 len = self._checkpoints.length; - uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one - * before it is returned, or zero otherwise. Similar to {upperLookup} but optimized for the case when the searched - * checkpoint is probably "recent", defined as being among the last sqrt(N) checkpoints where N is the number of - * checkpoints. - */ - function getAtProbablyRecentBlock(History storage self, uint256 blockNumber) internal view returns (uint256) { - require(blockNumber < block.number, "Checkpoints: block not yet mined"); - uint32 key = SafeCastUpgradeable.toUint32(blockNumber); - - uint256 len = self._checkpoints.length; - - uint256 low = 0; - uint256 high = len; - - if (len > 5) { - uint256 mid = len - MathUpgradeable.sqrt(len); - if (key < _unsafeAccess(self._checkpoints, mid)._blockNumber) { - high = mid; - } else { - low = mid + 1; - } - } - - uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); - - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block. - * - * Returns previous value and new value. - */ - function push(History storage self, uint256 value) internal returns (uint256, uint256) { - return _insert(self._checkpoints, SafeCastUpgradeable.toUint32(block.number), SafeCastUpgradeable.toUint224(value)); - } - - /** - * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will - * be set to `op(latest, delta)`. - * - * Returns previous value and new value. - */ - function push( - History storage self, - function(uint256, uint256) view returns (uint256) op, - uint256 delta - ) internal returns (uint256, uint256) { - return push(self, op(latest(self), delta)); - } - - /** - * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. - */ - function latest(History storage self) internal view returns (uint224) { - uint256 pos = self._checkpoints.length; - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value - * in the most recent checkpoint. - */ - function latestCheckpoint( - History storage self - ) internal view returns (bool exists, uint32 _blockNumber, uint224 _value) { - uint256 pos = self._checkpoints.length; - if (pos == 0) { - return (false, 0, 0); - } else { - Checkpoint memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); - return (true, ckpt._blockNumber, ckpt._value); - } - } - - /** - * @dev Returns the number of checkpoint. - */ - function length(History storage self) internal view returns (uint256) { - return self._checkpoints.length; - } - - /** - * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, - * or by updating the last one. - */ - function _insert(Checkpoint[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { - uint256 pos = self.length; - - if (pos > 0) { - // Copying to memory is important here. - Checkpoint memory last = _unsafeAccess(self, pos - 1); - - // Checkpoint keys must be non-decreasing. - require(last._blockNumber <= key, "Checkpoint: decreasing keys"); - - // Update or push new checkpoint - if (last._blockNumber == key) { - _unsafeAccess(self, pos - 1)._value = value; - } else { - self.push(Checkpoint({_blockNumber: key, _value: value})); - } - return (last._value, value); - } else { - self.push(Checkpoint({_blockNumber: key, _value: value})); - return (0, value); - } - } - - /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _upperBinaryLookup( - Checkpoint[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - if (_unsafeAccess(self, mid)._blockNumber > key) { - high = mid; - } else { - low = mid + 1; - } - } - return high; - } - - /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _lowerBinaryLookup( - Checkpoint[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - if (_unsafeAccess(self, mid)._blockNumber < key) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess(Checkpoint[] storage self, uint256 pos) private pure returns (Checkpoint storage result) { - assembly { - mstore(0, self.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } - - struct Trace224 { - Checkpoint224[] _checkpoints; - } - - struct Checkpoint224 { - uint32 _key; - uint224 _value; - } - - /** - * @dev Pushes a (`key`, `value`) pair into a Trace224 so that it is stored as the checkpoint. - * - * Returns previous value and new value. - */ - function push(Trace224 storage self, uint32 key, uint224 value) internal returns (uint224, uint224) { - return _insert(self._checkpoints, key, value); - } - - /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. - */ - function lowerLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { - uint256 len = self._checkpoints.length; - uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); - return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - */ - function upperLookup(Trace224 storage self, uint32 key) internal view returns (uint224) { - uint256 len = self._checkpoints.length; - uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). - */ - function upperLookupRecent(Trace224 storage self, uint32 key) internal view returns (uint224) { - uint256 len = self._checkpoints.length; - - uint256 low = 0; - uint256 high = len; - - if (len > 5) { - uint256 mid = len - MathUpgradeable.sqrt(len); - if (key < _unsafeAccess(self._checkpoints, mid)._key) { - high = mid; - } else { - low = mid + 1; - } - } - - uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); - - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. - */ - function latest(Trace224 storage self) internal view returns (uint224) { - uint256 pos = self._checkpoints.length; - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value - * in the most recent checkpoint. - */ - function latestCheckpoint(Trace224 storage self) internal view returns (bool exists, uint32 _key, uint224 _value) { - uint256 pos = self._checkpoints.length; - if (pos == 0) { - return (false, 0, 0); - } else { - Checkpoint224 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); - return (true, ckpt._key, ckpt._value); - } - } - - /** - * @dev Returns the number of checkpoint. - */ - function length(Trace224 storage self) internal view returns (uint256) { - return self._checkpoints.length; - } - - /** - * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, - * or by updating the last one. - */ - function _insert(Checkpoint224[] storage self, uint32 key, uint224 value) private returns (uint224, uint224) { - uint256 pos = self.length; - - if (pos > 0) { - // Copying to memory is important here. - Checkpoint224 memory last = _unsafeAccess(self, pos - 1); - - // Checkpoint keys must be non-decreasing. - require(last._key <= key, "Checkpoint: decreasing keys"); - - // Update or push new checkpoint - if (last._key == key) { - _unsafeAccess(self, pos - 1)._value = value; - } else { - self.push(Checkpoint224({_key: key, _value: value})); - } - return (last._value, value); - } else { - self.push(Checkpoint224({_key: key, _value: value})); - return (0, value); - } - } - - /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _upperBinaryLookup( - Checkpoint224[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - if (_unsafeAccess(self, mid)._key > key) { - high = mid; - } else { - low = mid + 1; - } - } - return high; - } - - /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _lowerBinaryLookup( - Checkpoint224[] storage self, - uint32 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - if (_unsafeAccess(self, mid)._key < key) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess( - Checkpoint224[] storage self, - uint256 pos - ) private pure returns (Checkpoint224 storage result) { - assembly { - mstore(0, self.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } - - struct Trace160 { - Checkpoint160[] _checkpoints; - } - - struct Checkpoint160 { - uint96 _key; - uint160 _value; - } - - /** - * @dev Pushes a (`key`, `value`) pair into a Trace160 so that it is stored as the checkpoint. - * - * Returns previous value and new value. - */ - function push(Trace160 storage self, uint96 key, uint160 value) internal returns (uint160, uint160) { - return _insert(self._checkpoints, key, value); - } - - /** - * @dev Returns the value in the first (oldest) checkpoint with key greater or equal than the search key, or zero if there is none. - */ - function lowerLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { - uint256 len = self._checkpoints.length; - uint256 pos = _lowerBinaryLookup(self._checkpoints, key, 0, len); - return pos == len ? 0 : _unsafeAccess(self._checkpoints, pos)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - */ - function upperLookup(Trace160 storage self, uint96 key) internal view returns (uint160) { - uint256 len = self._checkpoints.length; - uint256 pos = _upperBinaryLookup(self._checkpoints, key, 0, len); - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the last (most recent) checkpoint with key lower or equal than the search key, or zero if there is none. - * - * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys). - */ - function upperLookupRecent(Trace160 storage self, uint96 key) internal view returns (uint160) { - uint256 len = self._checkpoints.length; - - uint256 low = 0; - uint256 high = len; - - if (len > 5) { - uint256 mid = len - MathUpgradeable.sqrt(len); - if (key < _unsafeAccess(self._checkpoints, mid)._key) { - high = mid; - } else { - low = mid + 1; - } - } - - uint256 pos = _upperBinaryLookup(self._checkpoints, key, low, high); - - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns the value in the most recent checkpoint, or zero if there are no checkpoints. - */ - function latest(Trace160 storage self) internal view returns (uint160) { - uint256 pos = self._checkpoints.length; - return pos == 0 ? 0 : _unsafeAccess(self._checkpoints, pos - 1)._value; - } - - /** - * @dev Returns whether there is a checkpoint in the structure (i.e. it is not empty), and if so the key and value - * in the most recent checkpoint. - */ - function latestCheckpoint(Trace160 storage self) internal view returns (bool exists, uint96 _key, uint160 _value) { - uint256 pos = self._checkpoints.length; - if (pos == 0) { - return (false, 0, 0); - } else { - Checkpoint160 memory ckpt = _unsafeAccess(self._checkpoints, pos - 1); - return (true, ckpt._key, ckpt._value); - } - } - - /** - * @dev Returns the number of checkpoint. - */ - function length(Trace160 storage self) internal view returns (uint256) { - return self._checkpoints.length; - } - - /** - * @dev Pushes a (`key`, `value`) pair into an ordered list of checkpoints, either by inserting a new checkpoint, - * or by updating the last one. - */ - function _insert(Checkpoint160[] storage self, uint96 key, uint160 value) private returns (uint160, uint160) { - uint256 pos = self.length; - - if (pos > 0) { - // Copying to memory is important here. - Checkpoint160 memory last = _unsafeAccess(self, pos - 1); - - // Checkpoint keys must be non-decreasing. - require(last._key <= key, "Checkpoint: decreasing keys"); - - // Update or push new checkpoint - if (last._key == key) { - _unsafeAccess(self, pos - 1)._value = value; - } else { - self.push(Checkpoint160({_key: key, _value: value})); - } - return (last._value, value); - } else { - self.push(Checkpoint160({_key: key, _value: value})); - return (0, value); - } - } - - /** - * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _upperBinaryLookup( - Checkpoint160[] storage self, - uint96 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - if (_unsafeAccess(self, mid)._key > key) { - high = mid; - } else { - low = mid + 1; - } - } - return high; - } - - /** - * @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none. - * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`. - * - * WARNING: `high` should not be greater than the array's length. - */ - function _lowerBinaryLookup( - Checkpoint160[] storage self, - uint96 key, - uint256 low, - uint256 high - ) private view returns (uint256) { - while (low < high) { - uint256 mid = MathUpgradeable.average(low, high); - if (_unsafeAccess(self, mid)._key < key) { - low = mid + 1; - } else { - high = mid; - } - } - return high; - } - - /** - * @dev Access an element of the array without performing bounds check. The position is assumed to be within bounds. - */ - function _unsafeAccess( - Checkpoint160[] storage self, - uint256 pos - ) private pure returns (Checkpoint160 storage result) { - assembly { - mstore(0, self.slot) - result.slot := add(keccak256(0, 0x20), pos) - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol deleted file mode 100644 index cfe7e908..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/CountersUpgradeable.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) - -pragma solidity ^0.8.0; - -/** - * @title Counters - * @author Matt Condon (@shrugs) - * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number - * of elements in a mapping, issuing ERC721 ids, or counting request ids. - * - * Include with `using Counters for Counters.Counter;` - */ -library CountersUpgradeable { - struct Counter { - // This variable should never be directly accessed by users of the library: interactions must be restricted to - // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add - // this feature: see https://github.com/ethereum/solidity/issues/4637 - uint256 _value; // default: 0 - } - - function current(Counter storage counter) internal view returns (uint256) { - return counter._value; - } - - function increment(Counter storage counter) internal { - unchecked { - counter._value += 1; - } - } - - function decrement(Counter storage counter) internal { - uint256 value = counter._value; - require(value > 0, "Counter: decrement overflow"); - unchecked { - counter._value = value - 1; - } - } - - function reset(Counter storage counter) internal { - counter._value = 0; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol deleted file mode 100644 index ebc5429c..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/Create2Upgradeable.sol +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Create2.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. - * `CREATE2` can be used to compute in advance the address where a smart - * contract will be deployed, which allows for interesting new mechanisms known - * as 'counterfactual interactions'. - * - * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more - * information. - */ -library Create2Upgradeable { - /** - * @dev Deploys a contract using `CREATE2`. The address where the contract - * will be deployed can be known in advance via {computeAddress}. - * - * The bytecode for a contract can be obtained from Solidity with - * `type(contractName).creationCode`. - * - * Requirements: - * - * - `bytecode` must not be empty. - * - `salt` must have not been used for `bytecode` already. - * - the factory must have a balance of at least `amount`. - * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. - */ - function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { - require(address(this).balance >= amount, "Create2: insufficient balance"); - require(bytecode.length != 0, "Create2: bytecode length is zero"); - /// @solidity memory-safe-assembly - assembly { - addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) - } - require(addr != address(0), "Create2: Failed on deploy"); - } - - /** - * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the - * `bytecodeHash` or `salt` will result in a new destination address. - */ - function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) { - return computeAddress(salt, bytecodeHash, address(this)); - } - - /** - * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at - * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. - */ - function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { - /// @solidity memory-safe-assembly - assembly { - let ptr := mload(0x40) // Get free memory pointer - - // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | - // |-------------------|---------------------------------------------------------------------------| - // | bytecodeHash | CCCCCCCCCCCCC...CC | - // | salt | BBBBBBBBBBBBB...BB | - // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | - // | 0xFF | FF | - // |-------------------|---------------------------------------------------------------------------| - // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | - // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | - - mstore(add(ptr, 0x40), bytecodeHash) - mstore(add(ptr, 0x20), salt) - mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes - let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff - mstore8(start, 0xff) - addr := keccak256(start, 85) - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc deleted file mode 100644 index 5e8af93e..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/README.adoc +++ /dev/null @@ -1,113 +0,0 @@ -= Utilities - -[.readme-notice] -NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/utils - -Miscellaneous contracts and libraries containing utility functions you can use to improve security, work with new data types, or safely use low-level primitives. - -The {Address}, {Arrays}, {Base64} and {Strings} libraries provide more operations related to these native data types, while {SafeCast} adds ways to safely convert between the different signed and unsigned numeric types. -{Multicall} provides a function to batch together multiple calls in a single external call. - -For new data types: - - * {Counters}: a simple way to get a counter that can only be incremented, decremented or reset. Very useful for ID generation, counting contract activity, among others. - * {EnumerableMap}: like Solidity's https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] type, but with key-value _enumeration_: this will let you know how many entries a mapping has, and iterate over them (which is not possible with `mapping`). - * {EnumerableSet}: like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc. - -[NOTE] -==== -Because Solidity does not support generic types, {EnumerableMap} and {EnumerableSet} are specialized to a limited number of key-value types. - -As of v3.0, {EnumerableMap} supports `uint256 -> address` (`UintToAddressMap`), and {EnumerableSet} supports `address` and `uint256` (`AddressSet` and `UintSet`). -==== - -Finally, {Create2} contains all necessary utilities to safely use the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode], without having to deal with low-level assembly. - -== Math - -{{Math}} - -{{SignedMath}} - -{{SafeCast}} - -{{SafeMath}} - -{{SignedSafeMath}} - -== Cryptography - -{{ECDSA}} - -{{SignatureChecker}} - -{{MerkleProof}} - -{{EIP712}} - -== Escrow - -{{ConditionalEscrow}} - -{{Escrow}} - -{{RefundEscrow}} - -== Introspection - -This set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_. - -Ethereum contracts have no native concept of an interface, so applications must usually simply trust they are not making an incorrect call. For trusted setups this is a non-issue, but often unknown and untrusted third-party addresses need to be interacted with. There may even not be any direct calls to them! (e.g. `ERC20` tokens may be sent to a contract that lacks a way to transfer them out of it, locking them forever). In these cases, a contract _declaring_ its interface can be very helpful in preventing errors. - -There are two main ways to approach this. - -* Locally, where a contract implements `IERC165` and declares an interface, and a second one queries it directly via `ERC165Checker`. -* Globally, where a global and unique registry (`IERC1820Registry`) is used to register implementers of a certain interface (`IERC1820Implementer`). It is then the registry that is queried, which allows for more complex setups, like contracts implementing interfaces for externally-owned accounts. - -Note that, in all cases, accounts simply _declare_ their interfaces, but they are not required to actually implement them. This mechanism can therefore be used to both prevent errors and allow for complex interactions (see `ERC777`), but it must not be relied on for security. - -{{IERC165}} - -{{ERC165}} - -{{ERC165Storage}} - -{{ERC165Checker}} - -{{IERC1820Registry}} - -{{IERC1820Implementer}} - -{{ERC1820Implementer}} - -== Data Structures - -{{BitMaps}} - -{{EnumerableMap}} - -{{EnumerableSet}} - -{{DoubleEndedQueue}} - -{{Checkpoints}} - -== Libraries - -{{Create2}} - -{{Address}} - -{{Arrays}} - -{{Base64}} - -{{Counters}} - -{{Strings}} - -{{ShortStrings}} - -{{StorageSlot}} - -{{Multicall}} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol deleted file mode 100644 index 50e3c8bd..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ShortStringsUpgradeable.sol +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) - -pragma solidity ^0.8.8; - -import "./StorageSlotUpgradeable.sol"; - -// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | -// | length | 0x BB | -type ShortString is bytes32; - -/** - * @dev This library provides functions to convert short memory strings - * into a `ShortString` type that can be used as an immutable variable. - * - * Strings of arbitrary length can be optimized using this library if - * they are short enough (up to 31 bytes) by packing them with their - * length (1 byte) in a single EVM word (32 bytes). Additionally, a - * fallback mechanism can be used for every other case. - * - * Usage example: - * - * ```solidity - * contract Named { - * using ShortStrings for *; - * - * ShortString private immutable _name; - * string private _nameFallback; - * - * constructor(string memory contractName) { - * _name = contractName.toShortStringWithFallback(_nameFallback); - * } - * - * function name() external view returns (string memory) { - * return _name.toStringWithFallback(_nameFallback); - * } - * } - * ``` - */ -library ShortStringsUpgradeable { - // Used as an identifier for strings longer than 31 bytes. - bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; - - error StringTooLong(string str); - error InvalidShortString(); - - /** - * @dev Encode a string of at most 31 chars into a `ShortString`. - * - * This will trigger a `StringTooLong` error is the input string is too long. - */ - function toShortString(string memory str) internal pure returns (ShortString) { - bytes memory bstr = bytes(str); - if (bstr.length > 31) { - revert StringTooLong(str); - } - return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); - } - - /** - * @dev Decode a `ShortString` back to a "normal" string. - */ - function toString(ShortString sstr) internal pure returns (string memory) { - uint256 len = byteLength(sstr); - // using `new string(len)` would work locally but is not memory safe. - string memory str = new string(32); - /// @solidity memory-safe-assembly - assembly { - mstore(str, len) - mstore(add(str, 0x20), sstr) - } - return str; - } - - /** - * @dev Return the length of a `ShortString`. - */ - function byteLength(ShortString sstr) internal pure returns (uint256) { - uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; - if (result > 31) { - revert InvalidShortString(); - } - return result; - } - - /** - * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. - */ - function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { - if (bytes(value).length < 32) { - return toShortString(value); - } else { - StorageSlotUpgradeable.getStringSlot(store).value = value; - return ShortString.wrap(_FALLBACK_SENTINEL); - } - } - - /** - * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. - */ - function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { - if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { - return toString(value); - } else { - return store; - } - } - - /** - * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. - * - * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of - * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. - */ - function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { - if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { - return byteLength(value); - } else { - return bytes(store).length; - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol deleted file mode 100644 index 77adc33a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StorageSlotUpgradeable.sol +++ /dev/null @@ -1,138 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) -// This file was procedurally generated from scripts/generate/templates/StorageSlot.js. - -pragma solidity ^0.8.0; - -/** - * @dev Library for reading and writing primitive types to specific storage slots. - * - * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. - * This library helps with reading and writing to such slots without the need for inline assembly. - * - * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. - * - * Example usage to set ERC1967 implementation slot: - * ```solidity - * contract ERC1967 { - * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; - * - * function _getImplementation() internal view returns (address) { - * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; - * } - * - * function _setImplementation(address newImplementation) internal { - * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); - * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; - * } - * } - * ``` - * - * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ - * _Available since v4.9 for `string`, `bytes`._ - */ -library StorageSlotUpgradeable { - struct AddressSlot { - address value; - } - - struct BooleanSlot { - bool value; - } - - struct Bytes32Slot { - bytes32 value; - } - - struct Uint256Slot { - uint256 value; - } - - struct StringSlot { - string value; - } - - struct BytesSlot { - bytes value; - } - - /** - * @dev Returns an `AddressSlot` with member `value` located at `slot`. - */ - function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := slot - } - } - - /** - * @dev Returns an `BooleanSlot` with member `value` located at `slot`. - */ - function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := slot - } - } - - /** - * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. - */ - function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := slot - } - } - - /** - * @dev Returns an `Uint256Slot` with member `value` located at `slot`. - */ - function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := slot - } - } - - /** - * @dev Returns an `StringSlot` with member `value` located at `slot`. - */ - function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := slot - } - } - - /** - * @dev Returns an `StringSlot` representation of the string storage pointer `store`. - */ - function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := store.slot - } - } - - /** - * @dev Returns an `BytesSlot` with member `value` located at `slot`. - */ - function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := slot - } - } - - /** - * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. - */ - function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { - /// @solidity memory-safe-assembly - assembly { - r.slot := store.slot - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol deleted file mode 100644 index f16ae6c5..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/StringsUpgradeable.sol +++ /dev/null @@ -1,85 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) - -pragma solidity ^0.8.0; - -import "./math/MathUpgradeable.sol"; -import "./math/SignedMathUpgradeable.sol"; - -/** - * @dev String operations. - */ -library StringsUpgradeable { - bytes16 private constant _SYMBOLS = "0123456789abcdef"; - uint8 private constant _ADDRESS_LENGTH = 20; - - /** - * @dev Converts a `uint256` to its ASCII `string` decimal representation. - */ - function toString(uint256 value) internal pure returns (string memory) { - unchecked { - uint256 length = MathUpgradeable.log10(value) + 1; - string memory buffer = new string(length); - uint256 ptr; - /// @solidity memory-safe-assembly - assembly { - ptr := add(buffer, add(32, length)) - } - while (true) { - ptr--; - /// @solidity memory-safe-assembly - assembly { - mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) - } - value /= 10; - if (value == 0) break; - } - return buffer; - } - } - - /** - * @dev Converts a `int256` to its ASCII `string` decimal representation. - */ - function toString(int256 value) internal pure returns (string memory) { - return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.abs(value)))); - } - - /** - * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. - */ - function toHexString(uint256 value) internal pure returns (string memory) { - unchecked { - return toHexString(value, MathUpgradeable.log256(value) + 1); - } - } - - /** - * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. - */ - function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { - bytes memory buffer = new bytes(2 * length + 2); - buffer[0] = "0"; - buffer[1] = "x"; - for (uint256 i = 2 * length + 1; i > 1; --i) { - buffer[i] = _SYMBOLS[value & 0xf]; - value >>= 4; - } - require(value == 0, "Strings: hex length insufficient"); - return string(buffer); - } - - /** - * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. - */ - function toHexString(address addr) internal pure returns (string memory) { - return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); - } - - /** - * @dev Returns true if the two strings are equal. - */ - function equal(string memory a, string memory b) internal pure returns (bool) { - return keccak256(bytes(a)) == keccak256(bytes(b)); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol deleted file mode 100644 index db6a7359..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/TimersUpgradeable.sol +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/Timers.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Tooling for timepoints, timers and delays - * - * CAUTION: This file is deprecated as of 4.9 and will be removed in the next major release. - */ -library TimersUpgradeable { - struct Timestamp { - uint64 _deadline; - } - - function getDeadline(Timestamp memory timer) internal pure returns (uint64) { - return timer._deadline; - } - - function setDeadline(Timestamp storage timer, uint64 timestamp) internal { - timer._deadline = timestamp; - } - - function reset(Timestamp storage timer) internal { - timer._deadline = 0; - } - - function isUnset(Timestamp memory timer) internal pure returns (bool) { - return timer._deadline == 0; - } - - function isStarted(Timestamp memory timer) internal pure returns (bool) { - return timer._deadline > 0; - } - - function isPending(Timestamp memory timer) internal view returns (bool) { - return timer._deadline > block.timestamp; - } - - function isExpired(Timestamp memory timer) internal view returns (bool) { - return isStarted(timer) && timer._deadline <= block.timestamp; - } - - struct BlockNumber { - uint64 _deadline; - } - - function getDeadline(BlockNumber memory timer) internal pure returns (uint64) { - return timer._deadline; - } - - function setDeadline(BlockNumber storage timer, uint64 timestamp) internal { - timer._deadline = timestamp; - } - - function reset(BlockNumber storage timer) internal { - timer._deadline = 0; - } - - function isUnset(BlockNumber memory timer) internal pure returns (bool) { - return timer._deadline == 0; - } - - function isStarted(BlockNumber memory timer) internal pure returns (bool) { - return timer._deadline > 0; - } - - function isPending(BlockNumber memory timer) internal view returns (bool) { - return timer._deadline > block.number; - } - - function isExpired(BlockNumber memory timer) internal view returns (bool) { - return isStarted(timer) && timer._deadline <= block.number; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol deleted file mode 100644 index 7aff45e7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/ECDSAUpgradeable.sol +++ /dev/null @@ -1,217 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) - -pragma solidity ^0.8.0; - -import "../StringsUpgradeable.sol"; - -/** - * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. - * - * These functions can be used to verify that a message was signed by the holder - * of the private keys of a given address. - */ -library ECDSAUpgradeable { - enum RecoverError { - NoError, - InvalidSignature, - InvalidSignatureLength, - InvalidSignatureS, - InvalidSignatureV // Deprecated in v4.8 - } - - function _throwError(RecoverError error) private pure { - if (error == RecoverError.NoError) { - return; // no error: do nothing - } else if (error == RecoverError.InvalidSignature) { - revert("ECDSA: invalid signature"); - } else if (error == RecoverError.InvalidSignatureLength) { - revert("ECDSA: invalid signature length"); - } else if (error == RecoverError.InvalidSignatureS) { - revert("ECDSA: invalid signature 's' value"); - } - } - - /** - * @dev Returns the address that signed a hashed message (`hash`) with - * `signature` or error string. This address can then be used for verification purposes. - * - * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: - * this function rejects them by requiring the `s` value to be in the lower - * half order, and the `v` value to be either 27 or 28. - * - * IMPORTANT: `hash` _must_ be the result of a hash operation for the - * verification to be secure: it is possible to craft signatures that - * recover to arbitrary addresses for non-hashed data. A safe way to ensure - * this is by receiving a hash of the original message (which may otherwise - * be too long), and then calling {toEthSignedMessageHash} on it. - * - * Documentation for signature generation: - * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] - * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] - * - * _Available since v4.3._ - */ - function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { - if (signature.length == 65) { - bytes32 r; - bytes32 s; - uint8 v; - // ecrecover takes the signature parameters, and the only way to get them - // currently is to use assembly. - /// @solidity memory-safe-assembly - assembly { - r := mload(add(signature, 0x20)) - s := mload(add(signature, 0x40)) - v := byte(0, mload(add(signature, 0x60))) - } - return tryRecover(hash, v, r, s); - } else { - return (address(0), RecoverError.InvalidSignatureLength); - } - } - - /** - * @dev Returns the address that signed a hashed message (`hash`) with - * `signature`. This address can then be used for verification purposes. - * - * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: - * this function rejects them by requiring the `s` value to be in the lower - * half order, and the `v` value to be either 27 or 28. - * - * IMPORTANT: `hash` _must_ be the result of a hash operation for the - * verification to be secure: it is possible to craft signatures that - * recover to arbitrary addresses for non-hashed data. A safe way to ensure - * this is by receiving a hash of the original message (which may otherwise - * be too long), and then calling {toEthSignedMessageHash} on it. - */ - function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { - (address recovered, RecoverError error) = tryRecover(hash, signature); - _throwError(error); - return recovered; - } - - /** - * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. - * - * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] - * - * _Available since v4.3._ - */ - function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { - bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); - uint8 v = uint8((uint256(vs) >> 255) + 27); - return tryRecover(hash, v, r, s); - } - - /** - * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. - * - * _Available since v4.2._ - */ - function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { - (address recovered, RecoverError error) = tryRecover(hash, r, vs); - _throwError(error); - return recovered; - } - - /** - * @dev Overload of {ECDSA-tryRecover} that receives the `v`, - * `r` and `s` signature fields separately. - * - * _Available since v4.3._ - */ - function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { - // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature - // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines - // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most - // signatures from current libraries generate a unique signature with an s-value in the lower half order. - // - // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value - // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or - // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept - // these malleable signatures as well. - if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { - return (address(0), RecoverError.InvalidSignatureS); - } - - // If the signature is valid (and not malleable), return the signer address - address signer = ecrecover(hash, v, r, s); - if (signer == address(0)) { - return (address(0), RecoverError.InvalidSignature); - } - - return (signer, RecoverError.NoError); - } - - /** - * @dev Overload of {ECDSA-recover} that receives the `v`, - * `r` and `s` signature fields separately. - */ - function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { - (address recovered, RecoverError error) = tryRecover(hash, v, r, s); - _throwError(error); - return recovered; - } - - /** - * @dev Returns an Ethereum Signed Message, created from a `hash`. This - * produces hash corresponding to the one signed with the - * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] - * JSON-RPC method as part of EIP-191. - * - * See {recover}. - */ - function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { - // 32 is the length in bytes of hash, - // enforced by the type signature above - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, "\x19Ethereum Signed Message:\n32") - mstore(0x1c, hash) - message := keccak256(0x00, 0x3c) - } - } - - /** - * @dev Returns an Ethereum Signed Message, created from `s`. This - * produces hash corresponding to the one signed with the - * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] - * JSON-RPC method as part of EIP-191. - * - * See {recover}. - */ - function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { - return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); - } - - /** - * @dev Returns an Ethereum Signed Typed Data, created from a - * `domainSeparator` and a `structHash`. This produces hash corresponding - * to the one signed with the - * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] - * JSON-RPC method as part of EIP-712. - * - * See {recover}. - */ - function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { - /// @solidity memory-safe-assembly - assembly { - let ptr := mload(0x40) - mstore(ptr, "\x19\x01") - mstore(add(ptr, 0x02), domainSeparator) - mstore(add(ptr, 0x22), structHash) - data := keccak256(ptr, 0x42) - } - } - - /** - * @dev Returns an Ethereum Signed Data with intended validator, created from a - * `validator` and `data` according to the version 0 of EIP-191. - * - * See {recover}. - */ - function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { - return keccak256(abi.encodePacked("\x19\x00", validator, data)); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol deleted file mode 100644 index e4f6c37a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/MerkleProofUpgradeable.sol +++ /dev/null @@ -1,227 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) - -pragma solidity ^0.8.0; - -/** - * @dev These functions deal with verification of Merkle Tree proofs. - * - * The tree and the proofs can be generated using our - * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. - * You will find a quickstart guide in the readme. - * - * WARNING: You should avoid using leaf values that are 64 bytes long prior to - * hashing, or use a hash function other than keccak256 for hashing leaves. - * This is because the concatenation of a sorted pair of internal nodes in - * the merkle tree could be reinterpreted as a leaf value. - * OpenZeppelin's JavaScript library generates merkle trees that are safe - * against this attack out of the box. - */ -library MerkleProofUpgradeable { - /** - * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree - * defined by `root`. For this, a `proof` must be provided, containing - * sibling hashes on the branch from the leaf to the root of the tree. Each - * pair of leaves and each pair of pre-images are assumed to be sorted. - */ - function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { - return processProof(proof, leaf) == root; - } - - /** - * @dev Calldata version of {verify} - * - * _Available since v4.7._ - */ - function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { - return processProofCalldata(proof, leaf) == root; - } - - /** - * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up - * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt - * hash matches the root of the tree. When processing the proof, the pairs - * of leafs & pre-images are assumed to be sorted. - * - * _Available since v4.4._ - */ - function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { - bytes32 computedHash = leaf; - for (uint256 i = 0; i < proof.length; i++) { - computedHash = _hashPair(computedHash, proof[i]); - } - return computedHash; - } - - /** - * @dev Calldata version of {processProof} - * - * _Available since v4.7._ - */ - function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { - bytes32 computedHash = leaf; - for (uint256 i = 0; i < proof.length; i++) { - computedHash = _hashPair(computedHash, proof[i]); - } - return computedHash; - } - - /** - * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by - * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. - * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. - * - * _Available since v4.7._ - */ - function multiProofVerify( - bytes32[] memory proof, - bool[] memory proofFlags, - bytes32 root, - bytes32[] memory leaves - ) internal pure returns (bool) { - return processMultiProof(proof, proofFlags, leaves) == root; - } - - /** - * @dev Calldata version of {multiProofVerify} - * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. - * - * _Available since v4.7._ - */ - function multiProofVerifyCalldata( - bytes32[] calldata proof, - bool[] calldata proofFlags, - bytes32 root, - bytes32[] memory leaves - ) internal pure returns (bool) { - return processMultiProofCalldata(proof, proofFlags, leaves) == root; - } - - /** - * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction - * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another - * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false - * respectively. - * - * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree - * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the - * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). - * - * _Available since v4.7._ - */ - function processMultiProof( - bytes32[] memory proof, - bool[] memory proofFlags, - bytes32[] memory leaves - ) internal pure returns (bytes32 merkleRoot) { - // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by - // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the - // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of - // the merkle tree. - uint256 leavesLen = leaves.length; - uint256 proofLen = proof.length; - uint256 totalHashes = proofFlags.length; - - // Check proof validity. - require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); - - // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using - // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". - bytes32[] memory hashes = new bytes32[](totalHashes); - uint256 leafPos = 0; - uint256 hashPos = 0; - uint256 proofPos = 0; - // At each step, we compute the next hash using two values: - // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we - // get the next hash. - // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the - // `proof` array. - for (uint256 i = 0; i < totalHashes; i++) { - bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; - bytes32 b = proofFlags[i] - ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) - : proof[proofPos++]; - hashes[i] = _hashPair(a, b); - } - - if (totalHashes > 0) { - require(proofPos == proofLen, "MerkleProof: invalid multiproof"); - unchecked { - return hashes[totalHashes - 1]; - } - } else if (leavesLen > 0) { - return leaves[0]; - } else { - return proof[0]; - } - } - - /** - * @dev Calldata version of {processMultiProof}. - * - * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. - * - * _Available since v4.7._ - */ - function processMultiProofCalldata( - bytes32[] calldata proof, - bool[] calldata proofFlags, - bytes32[] memory leaves - ) internal pure returns (bytes32 merkleRoot) { - // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by - // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the - // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of - // the merkle tree. - uint256 leavesLen = leaves.length; - uint256 proofLen = proof.length; - uint256 totalHashes = proofFlags.length; - - // Check proof validity. - require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); - - // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using - // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". - bytes32[] memory hashes = new bytes32[](totalHashes); - uint256 leafPos = 0; - uint256 hashPos = 0; - uint256 proofPos = 0; - // At each step, we compute the next hash using two values: - // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we - // get the next hash. - // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the - // `proof` array. - for (uint256 i = 0; i < totalHashes; i++) { - bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; - bytes32 b = proofFlags[i] - ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) - : proof[proofPos++]; - hashes[i] = _hashPair(a, b); - } - - if (totalHashes > 0) { - require(proofPos == proofLen, "MerkleProof: invalid multiproof"); - unchecked { - return hashes[totalHashes - 1]; - } - } else if (leavesLen > 0) { - return leaves[0]; - } else { - return proof[0]; - } - } - - function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { - return a < b ? _efficientHash(a, b) : _efficientHash(b, a); - } - - function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, a) - mstore(0x20, b) - value := keccak256(0x00, 0x40) - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol deleted file mode 100644 index 631bc5fd..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/SignatureCheckerUpgradeable.sol +++ /dev/null @@ -1,50 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) - -pragma solidity ^0.8.0; - -import "./ECDSAUpgradeable.sol"; -import "../../interfaces/IERC1271Upgradeable.sol"; - -/** - * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA - * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like - * Argent and Gnosis Safe. - * - * _Available since v4.1._ - */ -library SignatureCheckerUpgradeable { - /** - * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the - * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. - * - * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus - * change through time. It could return true at block N and false at block N+1 (or the opposite). - */ - function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { - (address recovered, ECDSAUpgradeable.RecoverError error) = ECDSAUpgradeable.tryRecover(hash, signature); - return - (error == ECDSAUpgradeable.RecoverError.NoError && recovered == signer) || - isValidERC1271SignatureNow(signer, hash, signature); - } - - /** - * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated - * against the signer smart contract using ERC1271. - * - * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus - * change through time. It could return true at block N and false at block N+1 (or the opposite). - */ - function isValidERC1271SignatureNow( - address signer, - bytes32 hash, - bytes memory signature - ) internal view returns (bool) { - (bool success, bytes memory result) = signer.staticcall( - abi.encodeWithSelector(IERC1271Upgradeable.isValidSignature.selector, hash, signature) - ); - return (success && - result.length >= 32 && - abi.decode(result, (bytes32)) == bytes32(IERC1271Upgradeable.isValidSignature.selector)); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol deleted file mode 100644 index 001c34ed..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/draft-EIP712Upgradeable.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol) - -pragma solidity ^0.8.0; - -// EIP-712 is Final as of 2022-08-11. This file is deprecated. - -import "./EIP712Upgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol deleted file mode 100644 index 886f6ae6..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/ConditionalEscrowUpgradeable.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/escrow/ConditionalEscrow.sol) - -pragma solidity ^0.8.0; - -import "./EscrowUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @title ConditionalEscrow - * @dev Base abstract escrow to only allow withdrawal if a condition is met. - * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. - */ -abstract contract ConditionalEscrowUpgradeable is Initializable, EscrowUpgradeable { - function __ConditionalEscrow_init() internal onlyInitializing { - __Ownable_init_unchained(); - } - - function __ConditionalEscrow_init_unchained() internal onlyInitializing { - } - /** - * @dev Returns whether an address is allowed to withdraw their funds. To be - * implemented by derived contracts. - * @param payee The destination address of the funds. - */ - function withdrawalAllowed(address payee) public view virtual returns (bool); - - function withdraw(address payable payee) public virtual override { - require(withdrawalAllowed(payee), "ConditionalEscrow: payee is not allowed to withdraw"); - super.withdraw(payee); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol deleted file mode 100644 index bc1aac32..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/EscrowUpgradeable.sol +++ /dev/null @@ -1,84 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (utils/escrow/Escrow.sol) - -pragma solidity ^0.8.0; - -import "../../access/OwnableUpgradeable.sol"; -import "../AddressUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @title Escrow - * @dev Base escrow contract, holds funds designated for a payee until they - * withdraw them. - * - * Intended usage: This contract (and derived escrow contracts) should be a - * standalone contract, that only interacts with the contract that instantiated - * it. That way, it is guaranteed that all Ether will be handled according to - * the `Escrow` rules, and there is no need to check for payable functions or - * transfers in the inheritance tree. The contract that uses the escrow as its - * payment method should be its owner, and provide public methods redirecting - * to the escrow's deposit and withdraw. - */ -contract EscrowUpgradeable is Initializable, OwnableUpgradeable { - using AddressUpgradeable for address payable; - - event Deposited(address indexed payee, uint256 weiAmount); - event Withdrawn(address indexed payee, uint256 weiAmount); - - mapping(address => uint256) private _deposits; - - function __Escrow_init() internal onlyInitializing { - __Ownable_init_unchained(); - } - - function __Escrow_init_unchained() internal onlyInitializing { - } - function initialize() public virtual initializer { - __Escrow_init(); - } - function depositsOf(address payee) public view returns (uint256) { - return _deposits[payee]; - } - - /** - * @dev Stores the sent amount as credit to be withdrawn. - * @param payee The destination address of the funds. - * - * Emits a {Deposited} event. - */ - function deposit(address payee) public payable virtual onlyOwner { - uint256 amount = msg.value; - _deposits[payee] += amount; - emit Deposited(payee, amount); - } - - /** - * @dev Withdraw accumulated balance for a payee, forwarding all gas to the - * recipient. - * - * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities. - * Make sure you trust the recipient, or are either following the - * checks-effects-interactions pattern or using {ReentrancyGuard}. - * - * @param payee The address whose funds will be withdrawn and transferred to. - * - * Emits a {Withdrawn} event. - */ - function withdraw(address payable payee) public virtual onlyOwner { - uint256 payment = _deposits[payee]; - - _deposits[payee] = 0; - - payee.sendValue(payment); - - emit Withdrawn(payee, payment); - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol deleted file mode 100644 index 2e132b54..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/escrow/RefundEscrowUpgradeable.sol +++ /dev/null @@ -1,113 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/escrow/RefundEscrow.sol) - -pragma solidity ^0.8.0; - -import "./ConditionalEscrowUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @title RefundEscrow - * @dev Escrow that holds funds for a beneficiary, deposited from multiple - * parties. - * @dev Intended usage: See {Escrow}. Same usage guidelines apply here. - * @dev The owner account (that is, the contract that instantiates this - * contract) may deposit, close the deposit period, and allow for either - * withdrawal by the beneficiary, or refunds to the depositors. All interactions - * with `RefundEscrow` will be made through the owner contract. - */ -contract RefundEscrowUpgradeable is Initializable, ConditionalEscrowUpgradeable { - using AddressUpgradeable for address payable; - - enum State { - Active, - Refunding, - Closed - } - - event RefundsClosed(); - event RefundsEnabled(); - - State private _state; - address payable private _beneficiary; - - /** - * @dev Constructor. - * @param beneficiary_ The beneficiary of the deposits. - */ - function __RefundEscrow_init(address payable beneficiary_) internal onlyInitializing { - __Ownable_init_unchained(); - __RefundEscrow_init_unchained(beneficiary_); - } - - function __RefundEscrow_init_unchained(address payable beneficiary_) internal onlyInitializing { - require(beneficiary_ != address(0), "RefundEscrow: beneficiary is the zero address"); - _beneficiary = beneficiary_; - _state = State.Active; - } - - /** - * @return The current state of the escrow. - */ - function state() public view virtual returns (State) { - return _state; - } - - /** - * @return The beneficiary of the escrow. - */ - function beneficiary() public view virtual returns (address payable) { - return _beneficiary; - } - - /** - * @dev Stores funds that may later be refunded. - * @param refundee The address funds will be sent to if a refund occurs. - */ - function deposit(address refundee) public payable virtual override { - require(state() == State.Active, "RefundEscrow: can only deposit while active"); - super.deposit(refundee); - } - - /** - * @dev Allows for the beneficiary to withdraw their funds, rejecting - * further deposits. - */ - function close() public virtual onlyOwner { - require(state() == State.Active, "RefundEscrow: can only close while active"); - _state = State.Closed; - emit RefundsClosed(); - } - - /** - * @dev Allows for refunds to take place, rejecting further deposits. - */ - function enableRefunds() public virtual onlyOwner { - require(state() == State.Active, "RefundEscrow: can only enable refunds while active"); - _state = State.Refunding; - emit RefundsEnabled(); - } - - /** - * @dev Withdraws the beneficiary's funds. - */ - function beneficiaryWithdraw() public virtual { - require(state() == State.Closed, "RefundEscrow: beneficiary can only withdraw while closed"); - beneficiary().sendValue(address(this).balance); - } - - /** - * @dev Returns whether refundees can withdraw their deposits (be refunded). The overridden function receives a - * 'payee' argument, but we ignore it here since the condition is global, not per-payee. - */ - function withdrawalAllowed(address) public view override returns (bool) { - return state() == State.Refunding; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol deleted file mode 100644 index 7500d2cc..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165CheckerUpgradeable.sol +++ /dev/null @@ -1,126 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol) - -pragma solidity ^0.8.0; - -import "./IERC165Upgradeable.sol"; - -/** - * @dev Library used to query support of an interface declared via {IERC165}. - * - * Note that these functions return the actual result of the query: they do not - * `revert` if an interface is not supported. It is up to the caller to decide - * what to do in these cases. - */ -library ERC165CheckerUpgradeable { - // As per the EIP-165 spec, no interface should ever match 0xffffffff - bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; - - /** - * @dev Returns true if `account` supports the {IERC165} interface. - */ - function supportsERC165(address account) internal view returns (bool) { - // Any contract that implements ERC165 must explicitly indicate support of - // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid - return - supportsERC165InterfaceUnchecked(account, type(IERC165Upgradeable).interfaceId) && - !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); - } - - /** - * @dev Returns true if `account` supports the interface defined by - * `interfaceId`. Support for {IERC165} itself is queried automatically. - * - * See {IERC165-supportsInterface}. - */ - function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { - // query support of both ERC165 as per the spec and support of _interfaceId - return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); - } - - /** - * @dev Returns a boolean array where each value corresponds to the - * interfaces passed in and whether they're supported or not. This allows - * you to batch check interfaces for a contract where your expectation - * is that some interfaces may not be supported. - * - * See {IERC165-supportsInterface}. - * - * _Available since v3.4._ - */ - function getSupportedInterfaces( - address account, - bytes4[] memory interfaceIds - ) internal view returns (bool[] memory) { - // an array of booleans corresponding to interfaceIds and whether they're supported or not - bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); - - // query support of ERC165 itself - if (supportsERC165(account)) { - // query support of each interface in interfaceIds - for (uint256 i = 0; i < interfaceIds.length; i++) { - interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]); - } - } - - return interfaceIdsSupported; - } - - /** - * @dev Returns true if `account` supports all the interfaces defined in - * `interfaceIds`. Support for {IERC165} itself is queried automatically. - * - * Batch-querying can lead to gas savings by skipping repeated checks for - * {IERC165} support. - * - * See {IERC165-supportsInterface}. - */ - function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { - // query support of ERC165 itself - if (!supportsERC165(account)) { - return false; - } - - // query support of each interface in interfaceIds - for (uint256 i = 0; i < interfaceIds.length; i++) { - if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) { - return false; - } - } - - // all interfaces supported - return true; - } - - /** - * @notice Query if a contract implements an interface, does not check ERC165 support - * @param account The address of the contract to query for support of an interface - * @param interfaceId The interface identifier, as specified in ERC-165 - * @return true if the contract at account indicates support of the interface with - * identifier interfaceId, false otherwise - * @dev Assumes that account contains a contract that supports ERC165, otherwise - * the behavior of this method is undefined. This precondition can be checked - * with {supportsERC165}. - * - * Some precompiled contracts will falsely indicate support for a given interface, so caution - * should be exercised when using this function. - * - * Interface identification is specified in ERC-165. - */ - function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { - // prepare call - bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId); - - // perform static call - bool success; - uint256 returnSize; - uint256 returnValue; - assembly { - success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) - returnSize := returndatasize() - returnValue := mload(0x00) - } - - return success && returnSize >= 0x20 && returnValue > 0; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol deleted file mode 100644 index 66fefad0..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165StorageUpgradeable.sol +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol) - -pragma solidity ^0.8.0; - -import "./ERC165Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Storage based implementation of the {IERC165} interface. - * - * Contracts may inherit from this and call {_registerInterface} to declare - * their support of an interface. - */ -abstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable { - /** - * @dev Mapping of interface ids to whether or not it's supported. - */ - mapping(bytes4 => bool) private _supportedInterfaces; - - function __ERC165Storage_init() internal onlyInitializing { - } - - function __ERC165Storage_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; - } - - /** - * @dev Registers the contract as an implementer of the interface defined by - * `interfaceId`. Support of the actual ERC165 interface is automatic and - * registering its interface id is not required. - * - * See {IERC165-supportsInterface}. - * - * Requirements: - * - * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). - */ - function _registerInterface(bytes4 interfaceId) internal virtual { - require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); - _supportedInterfaces[interfaceId] = true; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol deleted file mode 100644 index 386b74d7..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC165Upgradeable.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) - -pragma solidity ^0.8.0; - -import "./IERC165Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the {IERC165} interface. - * - * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check - * for the additional interface id that will be supported. For example: - * - * ```solidity - * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); - * } - * ``` - * - * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. - */ -abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { - function __ERC165_init() internal onlyInitializing { - } - - function __ERC165_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == type(IERC165Upgradeable).interfaceId; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol deleted file mode 100644 index e3e3d1d0..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/ERC1820ImplementerUpgradeable.sol +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC1820Implementer.sol) - -pragma solidity ^0.8.0; - -import "./IERC1820ImplementerUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; - -/** - * @dev Implementation of the {IERC1820Implementer} interface. - * - * Contracts may inherit from this and call {_registerInterfaceForAddress} to - * declare their willingness to be implementers. - * {IERC1820Registry-setInterfaceImplementer} should then be called for the - * registration to be complete. - * - * CAUTION: This file is deprecated as of v4.9 and will be removed in the next major release. - */ -contract ERC1820ImplementerUpgradeable is Initializable, IERC1820ImplementerUpgradeable { - bytes32 private constant _ERC1820_ACCEPT_MAGIC = keccak256("ERC1820_ACCEPT_MAGIC"); - - mapping(bytes32 => mapping(address => bool)) private _supportedInterfaces; - - function __ERC1820Implementer_init() internal onlyInitializing { - } - - function __ERC1820Implementer_init_unchained() internal onlyInitializing { - } - /** - * @dev See {IERC1820Implementer-canImplementInterfaceForAddress}. - */ - function canImplementInterfaceForAddress( - bytes32 interfaceHash, - address account - ) public view virtual override returns (bytes32) { - return _supportedInterfaces[interfaceHash][account] ? _ERC1820_ACCEPT_MAGIC : bytes32(0x00); - } - - /** - * @dev Declares the contract as willing to be an implementer of - * `interfaceHash` for `account`. - * - * See {IERC1820Registry-setInterfaceImplementer} and - * {IERC1820Registry-interfaceHash}. - */ - function _registerInterfaceForAddress(bytes32 interfaceHash, address account) internal virtual { - _supportedInterfaces[interfaceHash][account] = true; - } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol deleted file mode 100644 index 26fc1d7d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC165Upgradeable.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC165 standard, as defined in the - * https://eips.ethereum.org/EIPS/eip-165[EIP]. - * - * Implementers can declare support of contract interfaces, which can then be - * queried by others ({ERC165Checker}). - * - * For an implementation, see {ERC165}. - */ -interface IERC165Upgradeable { - /** - * @dev Returns true if this contract implements the interface defined by - * `interfaceId`. See the corresponding - * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] - * to learn more about how these ids are created. - * - * This function call must use less than 30 000 gas. - */ - function supportsInterface(bytes4 interfaceId) external view returns (bool); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol deleted file mode 100644 index 7a19d897..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820ImplementerUpgradeable.sol +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Implementer.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface for an ERC1820 implementer, as defined in the - * https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP]. - * Used by contracts that will be registered as implementers in the - * {IERC1820Registry}. - */ -interface IERC1820ImplementerUpgradeable { - /** - * @dev Returns a special value (`ERC1820_ACCEPT_MAGIC`) if this contract - * implements `interfaceHash` for `account`. - * - * See {IERC1820Registry-setInterfaceImplementer}. - */ - function canImplementInterfaceForAddress(bytes32 interfaceHash, address account) external view returns (bytes32); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol deleted file mode 100644 index ce23caa1..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/introspection/IERC1820RegistryUpgradeable.sol +++ /dev/null @@ -1,112 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/IERC1820Registry.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the global ERC1820 Registry, as defined in the - * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register - * implementers for interfaces in this registry, as well as query support. - * - * Implementers may be shared by multiple accounts, and can also implement more - * than a single interface for each account. Contracts can implement interfaces - * for themselves, but externally-owned accounts (EOA) must delegate this to a - * contract. - * - * {IERC165} interfaces can also be queried via the registry. - * - * For an in-depth explanation and source code analysis, see the EIP text. - */ -interface IERC1820RegistryUpgradeable { - event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); - - event ManagerChanged(address indexed account, address indexed newManager); - - /** - * @dev Sets `newManager` as the manager for `account`. A manager of an - * account is able to set interface implementers for it. - * - * By default, each account is its own manager. Passing a value of `0x0` in - * `newManager` will reset the manager to this initial state. - * - * Emits a {ManagerChanged} event. - * - * Requirements: - * - * - the caller must be the current manager for `account`. - */ - function setManager(address account, address newManager) external; - - /** - * @dev Returns the manager for `account`. - * - * See {setManager}. - */ - function getManager(address account) external view returns (address); - - /** - * @dev Sets the `implementer` contract as ``account``'s implementer for - * `interfaceHash`. - * - * `account` being the zero address is an alias for the caller's address. - * The zero address can also be used in `implementer` to remove an old one. - * - * See {interfaceHash} to learn how these are created. - * - * Emits an {InterfaceImplementerSet} event. - * - * Requirements: - * - * - the caller must be the current manager for `account`. - * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not - * end in 28 zeroes). - * - `implementer` must implement {IERC1820Implementer} and return true when - * queried for support, unless `implementer` is the caller. See - * {IERC1820Implementer-canImplementInterfaceForAddress}. - */ - function setInterfaceImplementer(address account, bytes32 _interfaceHash, address implementer) external; - - /** - * @dev Returns the implementer of `interfaceHash` for `account`. If no such - * implementer is registered, returns the zero address. - * - * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 - * zeroes), `account` will be queried for support of it. - * - * `account` being the zero address is an alias for the caller's address. - */ - function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address); - - /** - * @dev Returns the interface hash for an `interfaceName`, as defined in the - * corresponding - * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. - */ - function interfaceHash(string calldata interfaceName) external pure returns (bytes32); - - /** - * @notice Updates the cache with whether the contract implements an ERC165 interface or not. - * @param account Address of the contract for which to update the cache. - * @param interfaceId ERC165 interface for which to update the cache. - */ - function updateERC165Cache(address account, bytes4 interfaceId) external; - - /** - * @notice Checks whether a contract implements an ERC165 interface or not. - * If the result is not cached a direct lookup on the contract address is performed. - * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling - * {updateERC165Cache} with the contract address. - * @param account Address of the contract to check. - * @param interfaceId ERC165 interface to check. - * @return True if `account` implements `interfaceId`, false otherwise. - */ - function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); - - /** - * @notice Checks whether a contract implements an ERC165 interface or not without using or updating the cache. - * @param account Address of the contract to check. - * @param interfaceId ERC165 interface to check. - * @return True if `account` implements `interfaceId`, false otherwise. - */ - function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol deleted file mode 100644 index c6c014ff..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/MathUpgradeable.sol +++ /dev/null @@ -1,339 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Standard math utilities missing in the Solidity language. - */ -library MathUpgradeable { - enum Rounding { - Down, // Toward negative infinity - Up, // Toward infinity - Zero // Toward zero - } - - /** - * @dev Returns the largest of two numbers. - */ - function max(uint256 a, uint256 b) internal pure returns (uint256) { - return a > b ? a : b; - } - - /** - * @dev Returns the smallest of two numbers. - */ - function min(uint256 a, uint256 b) internal pure returns (uint256) { - return a < b ? a : b; - } - - /** - * @dev Returns the average of two numbers. The result is rounded towards - * zero. - */ - function average(uint256 a, uint256 b) internal pure returns (uint256) { - // (a + b) / 2 can overflow. - return (a & b) + (a ^ b) / 2; - } - - /** - * @dev Returns the ceiling of the division of two numbers. - * - * This differs from standard division with `/` in that it rounds up instead - * of rounding down. - */ - function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { - // (a + b - 1) / b can overflow on addition, so we distribute. - return a == 0 ? 0 : (a - 1) / b + 1; - } - - /** - * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 - * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) - * with further edits by Uniswap Labs also under MIT license. - */ - function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { - unchecked { - // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use - // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 - // variables such that product = prod1 * 2^256 + prod0. - uint256 prod0; // Least significant 256 bits of the product - uint256 prod1; // Most significant 256 bits of the product - assembly { - let mm := mulmod(x, y, not(0)) - prod0 := mul(x, y) - prod1 := sub(sub(mm, prod0), lt(mm, prod0)) - } - - // Handle non-overflow cases, 256 by 256 division. - if (prod1 == 0) { - // Solidity will revert if denominator == 0, unlike the div opcode on its own. - // The surrounding unchecked block does not change this fact. - // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. - return prod0 / denominator; - } - - // Make sure the result is less than 2^256. Also prevents denominator == 0. - require(denominator > prod1, "Math: mulDiv overflow"); - - /////////////////////////////////////////////// - // 512 by 256 division. - /////////////////////////////////////////////// - - // Make division exact by subtracting the remainder from [prod1 prod0]. - uint256 remainder; - assembly { - // Compute remainder using mulmod. - remainder := mulmod(x, y, denominator) - - // Subtract 256 bit number from 512 bit number. - prod1 := sub(prod1, gt(remainder, prod0)) - prod0 := sub(prod0, remainder) - } - - // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. - // See https://cs.stackexchange.com/q/138556/92363. - - // Does not overflow because the denominator cannot be zero at this stage in the function. - uint256 twos = denominator & (~denominator + 1); - assembly { - // Divide denominator by twos. - denominator := div(denominator, twos) - - // Divide [prod1 prod0] by twos. - prod0 := div(prod0, twos) - - // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. - twos := add(div(sub(0, twos), twos), 1) - } - - // Shift in bits from prod1 into prod0. - prod0 |= prod1 * twos; - - // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such - // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for - // four bits. That is, denominator * inv = 1 mod 2^4. - uint256 inverse = (3 * denominator) ^ 2; - - // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works - // in modular arithmetic, doubling the correct bits in each step. - inverse *= 2 - denominator * inverse; // inverse mod 2^8 - inverse *= 2 - denominator * inverse; // inverse mod 2^16 - inverse *= 2 - denominator * inverse; // inverse mod 2^32 - inverse *= 2 - denominator * inverse; // inverse mod 2^64 - inverse *= 2 - denominator * inverse; // inverse mod 2^128 - inverse *= 2 - denominator * inverse; // inverse mod 2^256 - - // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. - // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is - // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 - // is no longer required. - result = prod0 * inverse; - return result; - } - } - - /** - * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. - */ - function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { - uint256 result = mulDiv(x, y, denominator); - if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { - result += 1; - } - return result; - } - - /** - * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. - * - * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). - */ - function sqrt(uint256 a) internal pure returns (uint256) { - if (a == 0) { - return 0; - } - - // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. - // - // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have - // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. - // - // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` - // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` - // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` - // - // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. - uint256 result = 1 << (log2(a) >> 1); - - // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, - // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at - // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision - // into the expected uint128 result. - unchecked { - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - result = (result + a / result) >> 1; - return min(result, a / result); - } - } - - /** - * @notice Calculates sqrt(a), following the selected rounding direction. - */ - function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = sqrt(a); - return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); - } - } - - /** - * @dev Return the log in base 2, rounded down, of a positive value. - * Returns 0 if given 0. - */ - function log2(uint256 value) internal pure returns (uint256) { - uint256 result = 0; - unchecked { - if (value >> 128 > 0) { - value >>= 128; - result += 128; - } - if (value >> 64 > 0) { - value >>= 64; - result += 64; - } - if (value >> 32 > 0) { - value >>= 32; - result += 32; - } - if (value >> 16 > 0) { - value >>= 16; - result += 16; - } - if (value >> 8 > 0) { - value >>= 8; - result += 8; - } - if (value >> 4 > 0) { - value >>= 4; - result += 4; - } - if (value >> 2 > 0) { - value >>= 2; - result += 2; - } - if (value >> 1 > 0) { - result += 1; - } - } - return result; - } - - /** - * @dev Return the log in base 2, following the selected rounding direction, of a positive value. - * Returns 0 if given 0. - */ - function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = log2(value); - return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); - } - } - - /** - * @dev Return the log in base 10, rounded down, of a positive value. - * Returns 0 if given 0. - */ - function log10(uint256 value) internal pure returns (uint256) { - uint256 result = 0; - unchecked { - if (value >= 10 ** 64) { - value /= 10 ** 64; - result += 64; - } - if (value >= 10 ** 32) { - value /= 10 ** 32; - result += 32; - } - if (value >= 10 ** 16) { - value /= 10 ** 16; - result += 16; - } - if (value >= 10 ** 8) { - value /= 10 ** 8; - result += 8; - } - if (value >= 10 ** 4) { - value /= 10 ** 4; - result += 4; - } - if (value >= 10 ** 2) { - value /= 10 ** 2; - result += 2; - } - if (value >= 10 ** 1) { - result += 1; - } - } - return result; - } - - /** - * @dev Return the log in base 10, following the selected rounding direction, of a positive value. - * Returns 0 if given 0. - */ - function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = log10(value); - return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); - } - } - - /** - * @dev Return the log in base 256, rounded down, of a positive value. - * Returns 0 if given 0. - * - * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. - */ - function log256(uint256 value) internal pure returns (uint256) { - uint256 result = 0; - unchecked { - if (value >> 128 > 0) { - value >>= 128; - result += 16; - } - if (value >> 64 > 0) { - value >>= 64; - result += 8; - } - if (value >> 32 > 0) { - value >>= 32; - result += 4; - } - if (value >> 16 > 0) { - value >>= 16; - result += 2; - } - if (value >> 8 > 0) { - result += 1; - } - } - return result; - } - - /** - * @dev Return the log in base 256, following the selected rounding direction, of a positive value. - * Returns 0 if given 0. - */ - function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { - unchecked { - uint256 result = log256(value); - return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol deleted file mode 100644 index 9b2db2a8..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeCastUpgradeable.sol +++ /dev/null @@ -1,1136 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) -// This file was procedurally generated from scripts/generate/templates/SafeCast.js. - -pragma solidity ^0.8.0; - -/** - * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow - * checks. - * - * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can - * easily result in undesired exploitation or bugs, since developers usually - * assume that overflows raise errors. `SafeCast` restores this intuition by - * reverting the transaction when such an operation overflows. - * - * Using this library instead of the unchecked operations eliminates an entire - * class of bugs, so it's recommended to use it always. - * - * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing - * all math on `uint256` and `int256` and then downcasting. - */ -library SafeCastUpgradeable { - /** - * @dev Returns the downcasted uint248 from uint256, reverting on - * overflow (when the input is greater than largest uint248). - * - * Counterpart to Solidity's `uint248` operator. - * - * Requirements: - * - * - input must fit into 248 bits - * - * _Available since v4.7._ - */ - function toUint248(uint256 value) internal pure returns (uint248) { - require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits"); - return uint248(value); - } - - /** - * @dev Returns the downcasted uint240 from uint256, reverting on - * overflow (when the input is greater than largest uint240). - * - * Counterpart to Solidity's `uint240` operator. - * - * Requirements: - * - * - input must fit into 240 bits - * - * _Available since v4.7._ - */ - function toUint240(uint256 value) internal pure returns (uint240) { - require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits"); - return uint240(value); - } - - /** - * @dev Returns the downcasted uint232 from uint256, reverting on - * overflow (when the input is greater than largest uint232). - * - * Counterpart to Solidity's `uint232` operator. - * - * Requirements: - * - * - input must fit into 232 bits - * - * _Available since v4.7._ - */ - function toUint232(uint256 value) internal pure returns (uint232) { - require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits"); - return uint232(value); - } - - /** - * @dev Returns the downcasted uint224 from uint256, reverting on - * overflow (when the input is greater than largest uint224). - * - * Counterpart to Solidity's `uint224` operator. - * - * Requirements: - * - * - input must fit into 224 bits - * - * _Available since v4.2._ - */ - function toUint224(uint256 value) internal pure returns (uint224) { - require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); - return uint224(value); - } - - /** - * @dev Returns the downcasted uint216 from uint256, reverting on - * overflow (when the input is greater than largest uint216). - * - * Counterpart to Solidity's `uint216` operator. - * - * Requirements: - * - * - input must fit into 216 bits - * - * _Available since v4.7._ - */ - function toUint216(uint256 value) internal pure returns (uint216) { - require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits"); - return uint216(value); - } - - /** - * @dev Returns the downcasted uint208 from uint256, reverting on - * overflow (when the input is greater than largest uint208). - * - * Counterpart to Solidity's `uint208` operator. - * - * Requirements: - * - * - input must fit into 208 bits - * - * _Available since v4.7._ - */ - function toUint208(uint256 value) internal pure returns (uint208) { - require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits"); - return uint208(value); - } - - /** - * @dev Returns the downcasted uint200 from uint256, reverting on - * overflow (when the input is greater than largest uint200). - * - * Counterpart to Solidity's `uint200` operator. - * - * Requirements: - * - * - input must fit into 200 bits - * - * _Available since v4.7._ - */ - function toUint200(uint256 value) internal pure returns (uint200) { - require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits"); - return uint200(value); - } - - /** - * @dev Returns the downcasted uint192 from uint256, reverting on - * overflow (when the input is greater than largest uint192). - * - * Counterpart to Solidity's `uint192` operator. - * - * Requirements: - * - * - input must fit into 192 bits - * - * _Available since v4.7._ - */ - function toUint192(uint256 value) internal pure returns (uint192) { - require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits"); - return uint192(value); - } - - /** - * @dev Returns the downcasted uint184 from uint256, reverting on - * overflow (when the input is greater than largest uint184). - * - * Counterpart to Solidity's `uint184` operator. - * - * Requirements: - * - * - input must fit into 184 bits - * - * _Available since v4.7._ - */ - function toUint184(uint256 value) internal pure returns (uint184) { - require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits"); - return uint184(value); - } - - /** - * @dev Returns the downcasted uint176 from uint256, reverting on - * overflow (when the input is greater than largest uint176). - * - * Counterpart to Solidity's `uint176` operator. - * - * Requirements: - * - * - input must fit into 176 bits - * - * _Available since v4.7._ - */ - function toUint176(uint256 value) internal pure returns (uint176) { - require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits"); - return uint176(value); - } - - /** - * @dev Returns the downcasted uint168 from uint256, reverting on - * overflow (when the input is greater than largest uint168). - * - * Counterpart to Solidity's `uint168` operator. - * - * Requirements: - * - * - input must fit into 168 bits - * - * _Available since v4.7._ - */ - function toUint168(uint256 value) internal pure returns (uint168) { - require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits"); - return uint168(value); - } - - /** - * @dev Returns the downcasted uint160 from uint256, reverting on - * overflow (when the input is greater than largest uint160). - * - * Counterpart to Solidity's `uint160` operator. - * - * Requirements: - * - * - input must fit into 160 bits - * - * _Available since v4.7._ - */ - function toUint160(uint256 value) internal pure returns (uint160) { - require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits"); - return uint160(value); - } - - /** - * @dev Returns the downcasted uint152 from uint256, reverting on - * overflow (when the input is greater than largest uint152). - * - * Counterpart to Solidity's `uint152` operator. - * - * Requirements: - * - * - input must fit into 152 bits - * - * _Available since v4.7._ - */ - function toUint152(uint256 value) internal pure returns (uint152) { - require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits"); - return uint152(value); - } - - /** - * @dev Returns the downcasted uint144 from uint256, reverting on - * overflow (when the input is greater than largest uint144). - * - * Counterpart to Solidity's `uint144` operator. - * - * Requirements: - * - * - input must fit into 144 bits - * - * _Available since v4.7._ - */ - function toUint144(uint256 value) internal pure returns (uint144) { - require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits"); - return uint144(value); - } - - /** - * @dev Returns the downcasted uint136 from uint256, reverting on - * overflow (when the input is greater than largest uint136). - * - * Counterpart to Solidity's `uint136` operator. - * - * Requirements: - * - * - input must fit into 136 bits - * - * _Available since v4.7._ - */ - function toUint136(uint256 value) internal pure returns (uint136) { - require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits"); - return uint136(value); - } - - /** - * @dev Returns the downcasted uint128 from uint256, reverting on - * overflow (when the input is greater than largest uint128). - * - * Counterpart to Solidity's `uint128` operator. - * - * Requirements: - * - * - input must fit into 128 bits - * - * _Available since v2.5._ - */ - function toUint128(uint256 value) internal pure returns (uint128) { - require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); - return uint128(value); - } - - /** - * @dev Returns the downcasted uint120 from uint256, reverting on - * overflow (when the input is greater than largest uint120). - * - * Counterpart to Solidity's `uint120` operator. - * - * Requirements: - * - * - input must fit into 120 bits - * - * _Available since v4.7._ - */ - function toUint120(uint256 value) internal pure returns (uint120) { - require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits"); - return uint120(value); - } - - /** - * @dev Returns the downcasted uint112 from uint256, reverting on - * overflow (when the input is greater than largest uint112). - * - * Counterpart to Solidity's `uint112` operator. - * - * Requirements: - * - * - input must fit into 112 bits - * - * _Available since v4.7._ - */ - function toUint112(uint256 value) internal pure returns (uint112) { - require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits"); - return uint112(value); - } - - /** - * @dev Returns the downcasted uint104 from uint256, reverting on - * overflow (when the input is greater than largest uint104). - * - * Counterpart to Solidity's `uint104` operator. - * - * Requirements: - * - * - input must fit into 104 bits - * - * _Available since v4.7._ - */ - function toUint104(uint256 value) internal pure returns (uint104) { - require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits"); - return uint104(value); - } - - /** - * @dev Returns the downcasted uint96 from uint256, reverting on - * overflow (when the input is greater than largest uint96). - * - * Counterpart to Solidity's `uint96` operator. - * - * Requirements: - * - * - input must fit into 96 bits - * - * _Available since v4.2._ - */ - function toUint96(uint256 value) internal pure returns (uint96) { - require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); - return uint96(value); - } - - /** - * @dev Returns the downcasted uint88 from uint256, reverting on - * overflow (when the input is greater than largest uint88). - * - * Counterpart to Solidity's `uint88` operator. - * - * Requirements: - * - * - input must fit into 88 bits - * - * _Available since v4.7._ - */ - function toUint88(uint256 value) internal pure returns (uint88) { - require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits"); - return uint88(value); - } - - /** - * @dev Returns the downcasted uint80 from uint256, reverting on - * overflow (when the input is greater than largest uint80). - * - * Counterpart to Solidity's `uint80` operator. - * - * Requirements: - * - * - input must fit into 80 bits - * - * _Available since v4.7._ - */ - function toUint80(uint256 value) internal pure returns (uint80) { - require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits"); - return uint80(value); - } - - /** - * @dev Returns the downcasted uint72 from uint256, reverting on - * overflow (when the input is greater than largest uint72). - * - * Counterpart to Solidity's `uint72` operator. - * - * Requirements: - * - * - input must fit into 72 bits - * - * _Available since v4.7._ - */ - function toUint72(uint256 value) internal pure returns (uint72) { - require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits"); - return uint72(value); - } - - /** - * @dev Returns the downcasted uint64 from uint256, reverting on - * overflow (when the input is greater than largest uint64). - * - * Counterpart to Solidity's `uint64` operator. - * - * Requirements: - * - * - input must fit into 64 bits - * - * _Available since v2.5._ - */ - function toUint64(uint256 value) internal pure returns (uint64) { - require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); - return uint64(value); - } - - /** - * @dev Returns the downcasted uint56 from uint256, reverting on - * overflow (when the input is greater than largest uint56). - * - * Counterpart to Solidity's `uint56` operator. - * - * Requirements: - * - * - input must fit into 56 bits - * - * _Available since v4.7._ - */ - function toUint56(uint256 value) internal pure returns (uint56) { - require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits"); - return uint56(value); - } - - /** - * @dev Returns the downcasted uint48 from uint256, reverting on - * overflow (when the input is greater than largest uint48). - * - * Counterpart to Solidity's `uint48` operator. - * - * Requirements: - * - * - input must fit into 48 bits - * - * _Available since v4.7._ - */ - function toUint48(uint256 value) internal pure returns (uint48) { - require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits"); - return uint48(value); - } - - /** - * @dev Returns the downcasted uint40 from uint256, reverting on - * overflow (when the input is greater than largest uint40). - * - * Counterpart to Solidity's `uint40` operator. - * - * Requirements: - * - * - input must fit into 40 bits - * - * _Available since v4.7._ - */ - function toUint40(uint256 value) internal pure returns (uint40) { - require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits"); - return uint40(value); - } - - /** - * @dev Returns the downcasted uint32 from uint256, reverting on - * overflow (when the input is greater than largest uint32). - * - * Counterpart to Solidity's `uint32` operator. - * - * Requirements: - * - * - input must fit into 32 bits - * - * _Available since v2.5._ - */ - function toUint32(uint256 value) internal pure returns (uint32) { - require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); - return uint32(value); - } - - /** - * @dev Returns the downcasted uint24 from uint256, reverting on - * overflow (when the input is greater than largest uint24). - * - * Counterpart to Solidity's `uint24` operator. - * - * Requirements: - * - * - input must fit into 24 bits - * - * _Available since v4.7._ - */ - function toUint24(uint256 value) internal pure returns (uint24) { - require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits"); - return uint24(value); - } - - /** - * @dev Returns the downcasted uint16 from uint256, reverting on - * overflow (when the input is greater than largest uint16). - * - * Counterpart to Solidity's `uint16` operator. - * - * Requirements: - * - * - input must fit into 16 bits - * - * _Available since v2.5._ - */ - function toUint16(uint256 value) internal pure returns (uint16) { - require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); - return uint16(value); - } - - /** - * @dev Returns the downcasted uint8 from uint256, reverting on - * overflow (when the input is greater than largest uint8). - * - * Counterpart to Solidity's `uint8` operator. - * - * Requirements: - * - * - input must fit into 8 bits - * - * _Available since v2.5._ - */ - function toUint8(uint256 value) internal pure returns (uint8) { - require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); - return uint8(value); - } - - /** - * @dev Converts a signed int256 into an unsigned uint256. - * - * Requirements: - * - * - input must be greater than or equal to 0. - * - * _Available since v3.0._ - */ - function toUint256(int256 value) internal pure returns (uint256) { - require(value >= 0, "SafeCast: value must be positive"); - return uint256(value); - } - - /** - * @dev Returns the downcasted int248 from int256, reverting on - * overflow (when the input is less than smallest int248 or - * greater than largest int248). - * - * Counterpart to Solidity's `int248` operator. - * - * Requirements: - * - * - input must fit into 248 bits - * - * _Available since v4.7._ - */ - function toInt248(int256 value) internal pure returns (int248 downcasted) { - downcasted = int248(value); - require(downcasted == value, "SafeCast: value doesn't fit in 248 bits"); - } - - /** - * @dev Returns the downcasted int240 from int256, reverting on - * overflow (when the input is less than smallest int240 or - * greater than largest int240). - * - * Counterpart to Solidity's `int240` operator. - * - * Requirements: - * - * - input must fit into 240 bits - * - * _Available since v4.7._ - */ - function toInt240(int256 value) internal pure returns (int240 downcasted) { - downcasted = int240(value); - require(downcasted == value, "SafeCast: value doesn't fit in 240 bits"); - } - - /** - * @dev Returns the downcasted int232 from int256, reverting on - * overflow (when the input is less than smallest int232 or - * greater than largest int232). - * - * Counterpart to Solidity's `int232` operator. - * - * Requirements: - * - * - input must fit into 232 bits - * - * _Available since v4.7._ - */ - function toInt232(int256 value) internal pure returns (int232 downcasted) { - downcasted = int232(value); - require(downcasted == value, "SafeCast: value doesn't fit in 232 bits"); - } - - /** - * @dev Returns the downcasted int224 from int256, reverting on - * overflow (when the input is less than smallest int224 or - * greater than largest int224). - * - * Counterpart to Solidity's `int224` operator. - * - * Requirements: - * - * - input must fit into 224 bits - * - * _Available since v4.7._ - */ - function toInt224(int256 value) internal pure returns (int224 downcasted) { - downcasted = int224(value); - require(downcasted == value, "SafeCast: value doesn't fit in 224 bits"); - } - - /** - * @dev Returns the downcasted int216 from int256, reverting on - * overflow (when the input is less than smallest int216 or - * greater than largest int216). - * - * Counterpart to Solidity's `int216` operator. - * - * Requirements: - * - * - input must fit into 216 bits - * - * _Available since v4.7._ - */ - function toInt216(int256 value) internal pure returns (int216 downcasted) { - downcasted = int216(value); - require(downcasted == value, "SafeCast: value doesn't fit in 216 bits"); - } - - /** - * @dev Returns the downcasted int208 from int256, reverting on - * overflow (when the input is less than smallest int208 or - * greater than largest int208). - * - * Counterpart to Solidity's `int208` operator. - * - * Requirements: - * - * - input must fit into 208 bits - * - * _Available since v4.7._ - */ - function toInt208(int256 value) internal pure returns (int208 downcasted) { - downcasted = int208(value); - require(downcasted == value, "SafeCast: value doesn't fit in 208 bits"); - } - - /** - * @dev Returns the downcasted int200 from int256, reverting on - * overflow (when the input is less than smallest int200 or - * greater than largest int200). - * - * Counterpart to Solidity's `int200` operator. - * - * Requirements: - * - * - input must fit into 200 bits - * - * _Available since v4.7._ - */ - function toInt200(int256 value) internal pure returns (int200 downcasted) { - downcasted = int200(value); - require(downcasted == value, "SafeCast: value doesn't fit in 200 bits"); - } - - /** - * @dev Returns the downcasted int192 from int256, reverting on - * overflow (when the input is less than smallest int192 or - * greater than largest int192). - * - * Counterpart to Solidity's `int192` operator. - * - * Requirements: - * - * - input must fit into 192 bits - * - * _Available since v4.7._ - */ - function toInt192(int256 value) internal pure returns (int192 downcasted) { - downcasted = int192(value); - require(downcasted == value, "SafeCast: value doesn't fit in 192 bits"); - } - - /** - * @dev Returns the downcasted int184 from int256, reverting on - * overflow (when the input is less than smallest int184 or - * greater than largest int184). - * - * Counterpart to Solidity's `int184` operator. - * - * Requirements: - * - * - input must fit into 184 bits - * - * _Available since v4.7._ - */ - function toInt184(int256 value) internal pure returns (int184 downcasted) { - downcasted = int184(value); - require(downcasted == value, "SafeCast: value doesn't fit in 184 bits"); - } - - /** - * @dev Returns the downcasted int176 from int256, reverting on - * overflow (when the input is less than smallest int176 or - * greater than largest int176). - * - * Counterpart to Solidity's `int176` operator. - * - * Requirements: - * - * - input must fit into 176 bits - * - * _Available since v4.7._ - */ - function toInt176(int256 value) internal pure returns (int176 downcasted) { - downcasted = int176(value); - require(downcasted == value, "SafeCast: value doesn't fit in 176 bits"); - } - - /** - * @dev Returns the downcasted int168 from int256, reverting on - * overflow (when the input is less than smallest int168 or - * greater than largest int168). - * - * Counterpart to Solidity's `int168` operator. - * - * Requirements: - * - * - input must fit into 168 bits - * - * _Available since v4.7._ - */ - function toInt168(int256 value) internal pure returns (int168 downcasted) { - downcasted = int168(value); - require(downcasted == value, "SafeCast: value doesn't fit in 168 bits"); - } - - /** - * @dev Returns the downcasted int160 from int256, reverting on - * overflow (when the input is less than smallest int160 or - * greater than largest int160). - * - * Counterpart to Solidity's `int160` operator. - * - * Requirements: - * - * - input must fit into 160 bits - * - * _Available since v4.7._ - */ - function toInt160(int256 value) internal pure returns (int160 downcasted) { - downcasted = int160(value); - require(downcasted == value, "SafeCast: value doesn't fit in 160 bits"); - } - - /** - * @dev Returns the downcasted int152 from int256, reverting on - * overflow (when the input is less than smallest int152 or - * greater than largest int152). - * - * Counterpart to Solidity's `int152` operator. - * - * Requirements: - * - * - input must fit into 152 bits - * - * _Available since v4.7._ - */ - function toInt152(int256 value) internal pure returns (int152 downcasted) { - downcasted = int152(value); - require(downcasted == value, "SafeCast: value doesn't fit in 152 bits"); - } - - /** - * @dev Returns the downcasted int144 from int256, reverting on - * overflow (when the input is less than smallest int144 or - * greater than largest int144). - * - * Counterpart to Solidity's `int144` operator. - * - * Requirements: - * - * - input must fit into 144 bits - * - * _Available since v4.7._ - */ - function toInt144(int256 value) internal pure returns (int144 downcasted) { - downcasted = int144(value); - require(downcasted == value, "SafeCast: value doesn't fit in 144 bits"); - } - - /** - * @dev Returns the downcasted int136 from int256, reverting on - * overflow (when the input is less than smallest int136 or - * greater than largest int136). - * - * Counterpart to Solidity's `int136` operator. - * - * Requirements: - * - * - input must fit into 136 bits - * - * _Available since v4.7._ - */ - function toInt136(int256 value) internal pure returns (int136 downcasted) { - downcasted = int136(value); - require(downcasted == value, "SafeCast: value doesn't fit in 136 bits"); - } - - /** - * @dev Returns the downcasted int128 from int256, reverting on - * overflow (when the input is less than smallest int128 or - * greater than largest int128). - * - * Counterpart to Solidity's `int128` operator. - * - * Requirements: - * - * - input must fit into 128 bits - * - * _Available since v3.1._ - */ - function toInt128(int256 value) internal pure returns (int128 downcasted) { - downcasted = int128(value); - require(downcasted == value, "SafeCast: value doesn't fit in 128 bits"); - } - - /** - * @dev Returns the downcasted int120 from int256, reverting on - * overflow (when the input is less than smallest int120 or - * greater than largest int120). - * - * Counterpart to Solidity's `int120` operator. - * - * Requirements: - * - * - input must fit into 120 bits - * - * _Available since v4.7._ - */ - function toInt120(int256 value) internal pure returns (int120 downcasted) { - downcasted = int120(value); - require(downcasted == value, "SafeCast: value doesn't fit in 120 bits"); - } - - /** - * @dev Returns the downcasted int112 from int256, reverting on - * overflow (when the input is less than smallest int112 or - * greater than largest int112). - * - * Counterpart to Solidity's `int112` operator. - * - * Requirements: - * - * - input must fit into 112 bits - * - * _Available since v4.7._ - */ - function toInt112(int256 value) internal pure returns (int112 downcasted) { - downcasted = int112(value); - require(downcasted == value, "SafeCast: value doesn't fit in 112 bits"); - } - - /** - * @dev Returns the downcasted int104 from int256, reverting on - * overflow (when the input is less than smallest int104 or - * greater than largest int104). - * - * Counterpart to Solidity's `int104` operator. - * - * Requirements: - * - * - input must fit into 104 bits - * - * _Available since v4.7._ - */ - function toInt104(int256 value) internal pure returns (int104 downcasted) { - downcasted = int104(value); - require(downcasted == value, "SafeCast: value doesn't fit in 104 bits"); - } - - /** - * @dev Returns the downcasted int96 from int256, reverting on - * overflow (when the input is less than smallest int96 or - * greater than largest int96). - * - * Counterpart to Solidity's `int96` operator. - * - * Requirements: - * - * - input must fit into 96 bits - * - * _Available since v4.7._ - */ - function toInt96(int256 value) internal pure returns (int96 downcasted) { - downcasted = int96(value); - require(downcasted == value, "SafeCast: value doesn't fit in 96 bits"); - } - - /** - * @dev Returns the downcasted int88 from int256, reverting on - * overflow (when the input is less than smallest int88 or - * greater than largest int88). - * - * Counterpart to Solidity's `int88` operator. - * - * Requirements: - * - * - input must fit into 88 bits - * - * _Available since v4.7._ - */ - function toInt88(int256 value) internal pure returns (int88 downcasted) { - downcasted = int88(value); - require(downcasted == value, "SafeCast: value doesn't fit in 88 bits"); - } - - /** - * @dev Returns the downcasted int80 from int256, reverting on - * overflow (when the input is less than smallest int80 or - * greater than largest int80). - * - * Counterpart to Solidity's `int80` operator. - * - * Requirements: - * - * - input must fit into 80 bits - * - * _Available since v4.7._ - */ - function toInt80(int256 value) internal pure returns (int80 downcasted) { - downcasted = int80(value); - require(downcasted == value, "SafeCast: value doesn't fit in 80 bits"); - } - - /** - * @dev Returns the downcasted int72 from int256, reverting on - * overflow (when the input is less than smallest int72 or - * greater than largest int72). - * - * Counterpart to Solidity's `int72` operator. - * - * Requirements: - * - * - input must fit into 72 bits - * - * _Available since v4.7._ - */ - function toInt72(int256 value) internal pure returns (int72 downcasted) { - downcasted = int72(value); - require(downcasted == value, "SafeCast: value doesn't fit in 72 bits"); - } - - /** - * @dev Returns the downcasted int64 from int256, reverting on - * overflow (when the input is less than smallest int64 or - * greater than largest int64). - * - * Counterpart to Solidity's `int64` operator. - * - * Requirements: - * - * - input must fit into 64 bits - * - * _Available since v3.1._ - */ - function toInt64(int256 value) internal pure returns (int64 downcasted) { - downcasted = int64(value); - require(downcasted == value, "SafeCast: value doesn't fit in 64 bits"); - } - - /** - * @dev Returns the downcasted int56 from int256, reverting on - * overflow (when the input is less than smallest int56 or - * greater than largest int56). - * - * Counterpart to Solidity's `int56` operator. - * - * Requirements: - * - * - input must fit into 56 bits - * - * _Available since v4.7._ - */ - function toInt56(int256 value) internal pure returns (int56 downcasted) { - downcasted = int56(value); - require(downcasted == value, "SafeCast: value doesn't fit in 56 bits"); - } - - /** - * @dev Returns the downcasted int48 from int256, reverting on - * overflow (when the input is less than smallest int48 or - * greater than largest int48). - * - * Counterpart to Solidity's `int48` operator. - * - * Requirements: - * - * - input must fit into 48 bits - * - * _Available since v4.7._ - */ - function toInt48(int256 value) internal pure returns (int48 downcasted) { - downcasted = int48(value); - require(downcasted == value, "SafeCast: value doesn't fit in 48 bits"); - } - - /** - * @dev Returns the downcasted int40 from int256, reverting on - * overflow (when the input is less than smallest int40 or - * greater than largest int40). - * - * Counterpart to Solidity's `int40` operator. - * - * Requirements: - * - * - input must fit into 40 bits - * - * _Available since v4.7._ - */ - function toInt40(int256 value) internal pure returns (int40 downcasted) { - downcasted = int40(value); - require(downcasted == value, "SafeCast: value doesn't fit in 40 bits"); - } - - /** - * @dev Returns the downcasted int32 from int256, reverting on - * overflow (when the input is less than smallest int32 or - * greater than largest int32). - * - * Counterpart to Solidity's `int32` operator. - * - * Requirements: - * - * - input must fit into 32 bits - * - * _Available since v3.1._ - */ - function toInt32(int256 value) internal pure returns (int32 downcasted) { - downcasted = int32(value); - require(downcasted == value, "SafeCast: value doesn't fit in 32 bits"); - } - - /** - * @dev Returns the downcasted int24 from int256, reverting on - * overflow (when the input is less than smallest int24 or - * greater than largest int24). - * - * Counterpart to Solidity's `int24` operator. - * - * Requirements: - * - * - input must fit into 24 bits - * - * _Available since v4.7._ - */ - function toInt24(int256 value) internal pure returns (int24 downcasted) { - downcasted = int24(value); - require(downcasted == value, "SafeCast: value doesn't fit in 24 bits"); - } - - /** - * @dev Returns the downcasted int16 from int256, reverting on - * overflow (when the input is less than smallest int16 or - * greater than largest int16). - * - * Counterpart to Solidity's `int16` operator. - * - * Requirements: - * - * - input must fit into 16 bits - * - * _Available since v3.1._ - */ - function toInt16(int256 value) internal pure returns (int16 downcasted) { - downcasted = int16(value); - require(downcasted == value, "SafeCast: value doesn't fit in 16 bits"); - } - - /** - * @dev Returns the downcasted int8 from int256, reverting on - * overflow (when the input is less than smallest int8 or - * greater than largest int8). - * - * Counterpart to Solidity's `int8` operator. - * - * Requirements: - * - * - input must fit into 8 bits - * - * _Available since v3.1._ - */ - function toInt8(int256 value) internal pure returns (int8 downcasted) { - downcasted = int8(value); - require(downcasted == value, "SafeCast: value doesn't fit in 8 bits"); - } - - /** - * @dev Converts an unsigned uint256 into a signed int256. - * - * Requirements: - * - * - input must be less than or equal to maxInt256. - * - * _Available since v3.0._ - */ - function toInt256(uint256 value) internal pure returns (int256) { - // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive - require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); - return int256(value); - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol deleted file mode 100644 index e155a64d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SafeMathUpgradeable.sol +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) - -pragma solidity ^0.8.0; - -// CAUTION -// This version of SafeMath should only be used with Solidity 0.8 or later, -// because it relies on the compiler's built in overflow checks. - -/** - * @dev Wrappers over Solidity's arithmetic operations. - * - * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler - * now has built in overflow checking. - */ -library SafeMathUpgradeable { - /** - * @dev Returns the addition of two unsigned integers, with an overflow flag. - * - * _Available since v3.4._ - */ - function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - uint256 c = a + b; - if (c < a) return (false, 0); - return (true, c); - } - } - - /** - * @dev Returns the subtraction of two unsigned integers, with an overflow flag. - * - * _Available since v3.4._ - */ - function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - if (b > a) return (false, 0); - return (true, a - b); - } - } - - /** - * @dev Returns the multiplication of two unsigned integers, with an overflow flag. - * - * _Available since v3.4._ - */ - function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - // Gas optimization: this is cheaper than requiring 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 - if (a == 0) return (true, 0); - uint256 c = a * b; - if (c / a != b) return (false, 0); - return (true, c); - } - } - - /** - * @dev Returns the division of two unsigned integers, with a division by zero flag. - * - * _Available since v3.4._ - */ - function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - if (b == 0) return (false, 0); - return (true, a / b); - } - } - - /** - * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. - * - * _Available since v3.4._ - */ - function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { - unchecked { - if (b == 0) return (false, 0); - return (true, a % b); - } - } - - /** - * @dev Returns the addition of two unsigned integers, reverting on - * overflow. - * - * Counterpart to Solidity's `+` operator. - * - * Requirements: - * - * - Addition cannot overflow. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256) { - return a + b; - } - - /** - * @dev Returns the subtraction of two unsigned integers, reverting on - * overflow (when the result is negative). - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - * - Subtraction cannot overflow. - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - return a - b; - } - - /** - * @dev Returns the multiplication of two unsigned integers, reverting on - * overflow. - * - * Counterpart to Solidity's `*` operator. - * - * Requirements: - * - * - Multiplication cannot overflow. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256) { - return a * b; - } - - /** - * @dev Returns the integer division of two unsigned integers, reverting on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - return a / b; - } - - /** - * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), - * reverting when dividing by zero. - * - * Counterpart to Solidity's `%` operator. This function uses a `revert` - * opcode (which leaves remaining gas untouched) while Solidity uses an - * invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function mod(uint256 a, uint256 b) internal pure returns (uint256) { - return a % b; - } - - /** - * @dev Returns the subtraction of two unsigned integers, reverting with custom message on - * overflow (when the result is negative). - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {trySub}. - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - * - Subtraction cannot overflow. - */ - function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - unchecked { - require(b <= a, errorMessage); - return a - b; - } - } - - /** - * @dev Returns the integer division of two unsigned integers, reverting with custom message on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. Note: this function uses a - * `revert` opcode (which leaves remaining gas untouched) while Solidity - * uses an invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - unchecked { - require(b > 0, errorMessage); - return a / b; - } - } - - /** - * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), - * reverting with custom message when dividing by zero. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryMod}. - * - * Counterpart to Solidity's `%` operator. This function uses a `revert` - * opcode (which leaves remaining gas untouched) while Solidity uses an - * invalid opcode to revert (consuming all remaining gas). - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - unchecked { - require(b > 0, errorMessage); - return a % b; - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol deleted file mode 100644 index 122fcbc4..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedMathUpgradeable.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Standard signed math utilities missing in the Solidity language. - */ -library SignedMathUpgradeable { - /** - * @dev Returns the largest of two signed numbers. - */ - function max(int256 a, int256 b) internal pure returns (int256) { - return a > b ? a : b; - } - - /** - * @dev Returns the smallest of two signed numbers. - */ - function min(int256 a, int256 b) internal pure returns (int256) { - return a < b ? a : b; - } - - /** - * @dev Returns the average of two signed numbers without overflow. - * The result is rounded towards zero. - */ - function average(int256 a, int256 b) internal pure returns (int256) { - // Formula from the book "Hacker's Delight" - int256 x = (a & b) + ((a ^ b) >> 1); - return x + (int256(uint256(x) >> 255) & (a ^ b)); - } - - /** - * @dev Returns the absolute unsigned value of a signed value. - */ - function abs(int256 n) internal pure returns (uint256) { - unchecked { - // must be unchecked in order to support `n = type(int256).min` - return uint256(n >= 0 ? n : -n); - } - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol deleted file mode 100644 index 4d9ee8b2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/math/SignedSafeMathUpgradeable.sol +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts v4.4.1 (utils/math/SignedSafeMath.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Wrappers over Solidity's arithmetic operations. - * - * NOTE: `SignedSafeMath` is no longer needed starting with Solidity 0.8. The compiler - * now has built in overflow checking. - */ -library SignedSafeMathUpgradeable { - /** - * @dev Returns the multiplication of two signed integers, reverting on - * overflow. - * - * Counterpart to Solidity's `*` operator. - * - * Requirements: - * - * - Multiplication cannot overflow. - */ - function mul(int256 a, int256 b) internal pure returns (int256) { - return a * b; - } - - /** - * @dev Returns the integer division of two signed integers. Reverts on - * division by zero. The result is rounded towards zero. - * - * Counterpart to Solidity's `/` operator. - * - * Requirements: - * - * - The divisor cannot be zero. - */ - function div(int256 a, int256 b) internal pure returns (int256) { - return a / b; - } - - /** - * @dev Returns the subtraction of two signed integers, reverting on - * overflow. - * - * Counterpart to Solidity's `-` operator. - * - * Requirements: - * - * - Subtraction cannot overflow. - */ - function sub(int256 a, int256 b) internal pure returns (int256) { - return a - b; - } - - /** - * @dev Returns the addition of two signed integers, reverting on - * overflow. - * - * Counterpart to Solidity's `+` operator. - * - * Requirements: - * - * - Addition cannot overflow. - */ - function add(int256 a, int256 b) internal pure returns (int256) { - return a + b; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol deleted file mode 100644 index 7d275a5b..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/BitMapsUpgradeable.sol +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/BitMaps.sol) -pragma solidity ^0.8.0; - -/** - * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. - * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. - */ -library BitMapsUpgradeable { - struct BitMap { - mapping(uint256 => uint256) _data; - } - - /** - * @dev Returns whether the bit at `index` is set. - */ - function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { - uint256 bucket = index >> 8; - uint256 mask = 1 << (index & 0xff); - return bitmap._data[bucket] & mask != 0; - } - - /** - * @dev Sets the bit at `index` to the boolean `value`. - */ - function setTo(BitMap storage bitmap, uint256 index, bool value) internal { - if (value) { - set(bitmap, index); - } else { - unset(bitmap, index); - } - } - - /** - * @dev Sets the bit at `index`. - */ - function set(BitMap storage bitmap, uint256 index) internal { - uint256 bucket = index >> 8; - uint256 mask = 1 << (index & 0xff); - bitmap._data[bucket] |= mask; - } - - /** - * @dev Unsets the bit at `index`. - */ - function unset(BitMap storage bitmap, uint256 index) internal { - uint256 bucket = index >> 8; - uint256 mask = 1 << (index & 0xff); - bitmap._data[bucket] &= ~mask; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol deleted file mode 100644 index 16eb272a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/DoubleEndedQueueUpgradeable.sol +++ /dev/null @@ -1,170 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/DoubleEndedQueue.sol) -pragma solidity ^0.8.4; - -import "../math/SafeCastUpgradeable.sol"; - -/** - * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of - * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and - * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that - * the existing queue contents are left in storage. - * - * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be - * used in storage, and not in memory. - * ```solidity - * DoubleEndedQueue.Bytes32Deque queue; - * ``` - * - * _Available since v4.6._ - */ -library DoubleEndedQueueUpgradeable { - /** - * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty. - */ - error Empty(); - - /** - * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds. - */ - error OutOfBounds(); - - /** - * @dev Indices are signed integers because the queue can grow in any direction. They are 128 bits so begin and end - * are packed in a single storage slot for efficient access. Since the items are added one at a time we can safely - * assume that these 128-bit indices will not overflow, and use unchecked arithmetic. - * - * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to - * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and - * lead to unexpected behavior. - * - * Indices are in the range [begin, end) which means the first item is at data[begin] and the last item is at - * data[end - 1]. - */ - struct Bytes32Deque { - int128 _begin; - int128 _end; - mapping(int128 => bytes32) _data; - } - - /** - * @dev Inserts an item at the end of the queue. - */ - function pushBack(Bytes32Deque storage deque, bytes32 value) internal { - int128 backIndex = deque._end; - deque._data[backIndex] = value; - unchecked { - deque._end = backIndex + 1; - } - } - - /** - * @dev Removes the item at the end of the queue and returns it. - * - * Reverts with `Empty` if the queue is empty. - */ - function popBack(Bytes32Deque storage deque) internal returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 backIndex; - unchecked { - backIndex = deque._end - 1; - } - value = deque._data[backIndex]; - delete deque._data[backIndex]; - deque._end = backIndex; - } - - /** - * @dev Inserts an item at the beginning of the queue. - */ - function pushFront(Bytes32Deque storage deque, bytes32 value) internal { - int128 frontIndex; - unchecked { - frontIndex = deque._begin - 1; - } - deque._data[frontIndex] = value; - deque._begin = frontIndex; - } - - /** - * @dev Removes the item at the beginning of the queue and returns it. - * - * Reverts with `Empty` if the queue is empty. - */ - function popFront(Bytes32Deque storage deque) internal returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 frontIndex = deque._begin; - value = deque._data[frontIndex]; - delete deque._data[frontIndex]; - unchecked { - deque._begin = frontIndex + 1; - } - } - - /** - * @dev Returns the item at the beginning of the queue. - * - * Reverts with `Empty` if the queue is empty. - */ - function front(Bytes32Deque storage deque) internal view returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 frontIndex = deque._begin; - return deque._data[frontIndex]; - } - - /** - * @dev Returns the item at the end of the queue. - * - * Reverts with `Empty` if the queue is empty. - */ - function back(Bytes32Deque storage deque) internal view returns (bytes32 value) { - if (empty(deque)) revert Empty(); - int128 backIndex; - unchecked { - backIndex = deque._end - 1; - } - return deque._data[backIndex]; - } - - /** - * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at - * `length(deque) - 1`. - * - * Reverts with `OutOfBounds` if the index is out of bounds. - */ - function at(Bytes32Deque storage deque, uint256 index) internal view returns (bytes32 value) { - // int256(deque._begin) is a safe upcast - int128 idx = SafeCastUpgradeable.toInt128(int256(deque._begin) + SafeCastUpgradeable.toInt256(index)); - if (idx >= deque._end) revert OutOfBounds(); - return deque._data[idx]; - } - - /** - * @dev Resets the queue back to being empty. - * - * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses - * out on potential gas refunds. - */ - function clear(Bytes32Deque storage deque) internal { - deque._begin = 0; - deque._end = 0; - } - - /** - * @dev Returns the number of items in the queue. - */ - function length(Bytes32Deque storage deque) internal view returns (uint256) { - // The interface preserves the invariant that begin <= end so we assume this will not overflow. - // We also assume there are at most int256.max items in the queue. - unchecked { - return uint256(int256(deque._end) - int256(deque._begin)); - } - } - - /** - * @dev Returns true if the queue is empty. - */ - function empty(Bytes32Deque storage deque) internal view returns (bool) { - return deque._end <= deque._begin; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol deleted file mode 100644 index dbf5a158..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableMapUpgradeable.sol +++ /dev/null @@ -1,598 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableMap.sol) -// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js. - -pragma solidity ^0.8.0; - -import "./EnumerableSetUpgradeable.sol"; - -/** - * @dev Library for managing an enumerable variant of Solidity's - * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] - * type. - * - * Maps have the following properties: - * - * - Entries are added, removed, and checked for existence in constant time - * (O(1)). - * - Entries are enumerated in O(n). No guarantees are made on the ordering. - * - * ```solidity - * contract Example { - * // Add the library methods - * using EnumerableMap for EnumerableMap.UintToAddressMap; - * - * // Declare a set state variable - * EnumerableMap.UintToAddressMap private myMap; - * } - * ``` - * - * The following map types are supported: - * - * - `uint256 -> address` (`UintToAddressMap`) since v3.0.0 - * - `address -> uint256` (`AddressToUintMap`) since v4.6.0 - * - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0 - * - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0 - * - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0 - * - * [WARNING] - * ==== - * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure - * unusable. - * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. - * - * In order to clean an EnumerableMap, you can either remove all elements one by one or create a fresh instance using an - * array of EnumerableMap. - * ==== - */ -library EnumerableMapUpgradeable { - using EnumerableSetUpgradeable for EnumerableSetUpgradeable.Bytes32Set; - - // To implement this library for multiple types with as little code - // repetition as possible, we write it in terms of a generic Map type with - // bytes32 keys and values. - // The Map implementation uses private functions, and user-facing - // implementations (such as Uint256ToAddressMap) are just wrappers around - // the underlying Map. - // This means that we can only create new EnumerableMaps for types that fit - // in bytes32. - - struct Bytes32ToBytes32Map { - // Storage of keys - EnumerableSetUpgradeable.Bytes32Set _keys; - mapping(bytes32 => bytes32) _values; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(Bytes32ToBytes32Map storage map, bytes32 key, bytes32 value) internal returns (bool) { - map._values[key] = value; - return map._keys.add(key); - } - - /** - * @dev Removes a key-value pair from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(Bytes32ToBytes32Map storage map, bytes32 key) internal returns (bool) { - delete map._values[key]; - return map._keys.remove(key); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool) { - return map._keys.contains(key); - } - - /** - * @dev Returns the number of key-value pairs in the map. O(1). - */ - function length(Bytes32ToBytes32Map storage map) internal view returns (uint256) { - return map._keys.length(); - } - - /** - * @dev Returns the key-value pair stored at position `index` in the map. O(1). - * - * Note that there are no guarantees on the ordering of entries inside the - * array, and it may change when more entries are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(Bytes32ToBytes32Map storage map, uint256 index) internal view returns (bytes32, bytes32) { - bytes32 key = map._keys.at(index); - return (key, map._values[key]); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) { - bytes32 value = map._values[key]; - if (value == bytes32(0)) { - return (contains(map, key), bytes32(0)); - } else { - return (true, value); - } - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bytes32) { - bytes32 value = map._values[key]; - require(value != 0 || contains(map, key), "EnumerableMap: nonexistent key"); - return value; - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - Bytes32ToBytes32Map storage map, - bytes32 key, - string memory errorMessage - ) internal view returns (bytes32) { - bytes32 value = map._values[key]; - require(value != 0 || contains(map, key), errorMessage); - return value; - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(Bytes32ToBytes32Map storage map) internal view returns (bytes32[] memory) { - return map._keys.values(); - } - - // UintToUintMap - - struct UintToUintMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(UintToUintMap storage map, uint256 key, uint256 value) internal returns (bool) { - return set(map._inner, bytes32(key), bytes32(value)); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(UintToUintMap storage map, uint256 key) internal returns (bool) { - return remove(map._inner, bytes32(key)); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(UintToUintMap storage map, uint256 key) internal view returns (bool) { - return contains(map._inner, bytes32(key)); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(UintToUintMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(UintToUintMap storage map, uint256 index) internal view returns (uint256, uint256) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (uint256(key), uint256(value)); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) { - (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); - return (success, uint256(value)); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(UintToUintMap storage map, uint256 key) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(key))); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get(UintToUintMap storage map, uint256 key, string memory errorMessage) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(key), errorMessage)); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(UintToUintMap storage map) internal view returns (uint256[] memory) { - bytes32[] memory store = keys(map._inner); - uint256[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // UintToAddressMap - - struct UintToAddressMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { - return set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { - return remove(map._inner, bytes32(key)); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { - return contains(map._inner, bytes32(key)); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(UintToAddressMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (uint256(key), address(uint160(uint256(value)))); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { - (bool success, bytes32 value) = tryGet(map._inner, bytes32(key)); - return (success, address(uint160(uint256(value)))); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { - return address(uint160(uint256(get(map._inner, bytes32(key))))); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - UintToAddressMap storage map, - uint256 key, - string memory errorMessage - ) internal view returns (address) { - return address(uint160(uint256(get(map._inner, bytes32(key), errorMessage)))); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(UintToAddressMap storage map) internal view returns (uint256[] memory) { - bytes32[] memory store = keys(map._inner); - uint256[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // AddressToUintMap - - struct AddressToUintMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) { - return set(map._inner, bytes32(uint256(uint160(key))), bytes32(value)); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(AddressToUintMap storage map, address key) internal returns (bool) { - return remove(map._inner, bytes32(uint256(uint160(key)))); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(AddressToUintMap storage map, address key) internal view returns (bool) { - return contains(map._inner, bytes32(uint256(uint160(key)))); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(AddressToUintMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (address(uint160(uint256(key))), uint256(value)); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) { - (bool success, bytes32 value) = tryGet(map._inner, bytes32(uint256(uint160(key)))); - return (success, uint256(value)); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(AddressToUintMap storage map, address key) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(uint256(uint160(key))))); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - AddressToUintMap storage map, - address key, - string memory errorMessage - ) internal view returns (uint256) { - return uint256(get(map._inner, bytes32(uint256(uint160(key))), errorMessage)); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(AddressToUintMap storage map) internal view returns (address[] memory) { - bytes32[] memory store = keys(map._inner); - address[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // Bytes32ToUintMap - - struct Bytes32ToUintMap { - Bytes32ToBytes32Map _inner; - } - - /** - * @dev Adds a key-value pair to a map, or updates the value for an existing - * key. O(1). - * - * Returns true if the key was added to the map, that is if it was not - * already present. - */ - function set(Bytes32ToUintMap storage map, bytes32 key, uint256 value) internal returns (bool) { - return set(map._inner, key, bytes32(value)); - } - - /** - * @dev Removes a value from a map. O(1). - * - * Returns true if the key was removed from the map, that is if it was present. - */ - function remove(Bytes32ToUintMap storage map, bytes32 key) internal returns (bool) { - return remove(map._inner, key); - } - - /** - * @dev Returns true if the key is in the map. O(1). - */ - function contains(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool) { - return contains(map._inner, key); - } - - /** - * @dev Returns the number of elements in the map. O(1). - */ - function length(Bytes32ToUintMap storage map) internal view returns (uint256) { - return length(map._inner); - } - - /** - * @dev Returns the element stored at position `index` in the map. O(1). - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) { - (bytes32 key, bytes32 value) = at(map._inner, index); - return (key, uint256(value)); - } - - /** - * @dev Tries to returns the value associated with `key`. O(1). - * Does not revert if `key` is not in the map. - */ - function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) { - (bool success, bytes32 value) = tryGet(map._inner, key); - return (success, uint256(value)); - } - - /** - * @dev Returns the value associated with `key`. O(1). - * - * Requirements: - * - * - `key` must be in the map. - */ - function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) { - return uint256(get(map._inner, key)); - } - - /** - * @dev Same as {get}, with a custom error message when `key` is not in the map. - * - * CAUTION: This function is deprecated because it requires allocating memory for the error - * message unnecessarily. For custom revert reasons use {tryGet}. - */ - function get( - Bytes32ToUintMap storage map, - bytes32 key, - string memory errorMessage - ) internal view returns (uint256) { - return uint256(get(map._inner, key, errorMessage)); - } - - /** - * @dev Return the an array containing all the keys - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the map grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function keys(Bytes32ToUintMap storage map) internal view returns (bytes32[] memory) { - bytes32[] memory store = keys(map._inner); - bytes32[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol deleted file mode 100644 index 925b79df..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/structs/EnumerableSetUpgradeable.sol +++ /dev/null @@ -1,378 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) -// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. - -pragma solidity ^0.8.0; - -/** - * @dev Library for managing - * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive - * types. - * - * Sets have the following properties: - * - * - Elements are added, removed, and checked for existence in constant time - * (O(1)). - * - Elements are enumerated in O(n). No guarantees are made on the ordering. - * - * ```solidity - * contract Example { - * // Add the library methods - * using EnumerableSet for EnumerableSet.AddressSet; - * - * // Declare a set state variable - * EnumerableSet.AddressSet private mySet; - * } - * ``` - * - * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) - * and `uint256` (`UintSet`) are supported. - * - * [WARNING] - * ==== - * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure - * unusable. - * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. - * - * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an - * array of EnumerableSet. - * ==== - */ -library EnumerableSetUpgradeable { - // To implement this library for multiple types with as little code - // repetition as possible, we write it in terms of a generic Set type with - // bytes32 values. - // The Set implementation uses private functions, and user-facing - // implementations (such as AddressSet) are just wrappers around the - // underlying Set. - // This means that we can only create new EnumerableSets for types that fit - // in bytes32. - - struct Set { - // Storage of set values - bytes32[] _values; - // Position of the value in the `values` array, plus 1 because index 0 - // means a value is not in the set. - mapping(bytes32 => uint256) _indexes; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function _add(Set storage set, bytes32 value) private returns (bool) { - if (!_contains(set, value)) { - set._values.push(value); - // The value is stored at length-1, but we add 1 to all indexes - // and use 0 as a sentinel value - set._indexes[value] = set._values.length; - return true; - } else { - return false; - } - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function _remove(Set storage set, bytes32 value) private returns (bool) { - // We read and store the value's index to prevent multiple reads from the same storage slot - uint256 valueIndex = set._indexes[value]; - - if (valueIndex != 0) { - // Equivalent to contains(set, value) - // To delete an element from the _values array in O(1), we swap the element to delete with the last one in - // the array, and then remove the last element (sometimes called as 'swap and pop'). - // This modifies the order of the array, as noted in {at}. - - uint256 toDeleteIndex = valueIndex - 1; - uint256 lastIndex = set._values.length - 1; - - if (lastIndex != toDeleteIndex) { - bytes32 lastValue = set._values[lastIndex]; - - // Move the last value to the index where the value to delete is - set._values[toDeleteIndex] = lastValue; - // Update the index for the moved value - set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex - } - - // Delete the slot where the moved value was stored - set._values.pop(); - - // Delete the index for the deleted slot - delete set._indexes[value]; - - return true; - } else { - return false; - } - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function _contains(Set storage set, bytes32 value) private view returns (bool) { - return set._indexes[value] != 0; - } - - /** - * @dev Returns the number of values on the set. O(1). - */ - function _length(Set storage set) private view returns (uint256) { - return set._values.length; - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function _at(Set storage set, uint256 index) private view returns (bytes32) { - return set._values[index]; - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function _values(Set storage set) private view returns (bytes32[] memory) { - return set._values; - } - - // Bytes32Set - - struct Bytes32Set { - Set _inner; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { - return _add(set._inner, value); - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { - return _remove(set._inner, value); - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { - return _contains(set._inner, value); - } - - /** - * @dev Returns the number of values in the set. O(1). - */ - function length(Bytes32Set storage set) internal view returns (uint256) { - return _length(set._inner); - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { - return _at(set._inner, index); - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { - bytes32[] memory store = _values(set._inner); - bytes32[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // AddressSet - - struct AddressSet { - Set _inner; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function add(AddressSet storage set, address value) internal returns (bool) { - return _add(set._inner, bytes32(uint256(uint160(value)))); - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function remove(AddressSet storage set, address value) internal returns (bool) { - return _remove(set._inner, bytes32(uint256(uint160(value)))); - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function contains(AddressSet storage set, address value) internal view returns (bool) { - return _contains(set._inner, bytes32(uint256(uint160(value)))); - } - - /** - * @dev Returns the number of values in the set. O(1). - */ - function length(AddressSet storage set) internal view returns (uint256) { - return _length(set._inner); - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(AddressSet storage set, uint256 index) internal view returns (address) { - return address(uint160(uint256(_at(set._inner, index)))); - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function values(AddressSet storage set) internal view returns (address[] memory) { - bytes32[] memory store = _values(set._inner); - address[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } - - // UintSet - - struct UintSet { - Set _inner; - } - - /** - * @dev Add a value to a set. O(1). - * - * Returns true if the value was added to the set, that is if it was not - * already present. - */ - function add(UintSet storage set, uint256 value) internal returns (bool) { - return _add(set._inner, bytes32(value)); - } - - /** - * @dev Removes a value from a set. O(1). - * - * Returns true if the value was removed from the set, that is if it was - * present. - */ - function remove(UintSet storage set, uint256 value) internal returns (bool) { - return _remove(set._inner, bytes32(value)); - } - - /** - * @dev Returns true if the value is in the set. O(1). - */ - function contains(UintSet storage set, uint256 value) internal view returns (bool) { - return _contains(set._inner, bytes32(value)); - } - - /** - * @dev Returns the number of values in the set. O(1). - */ - function length(UintSet storage set) internal view returns (uint256) { - return _length(set._inner); - } - - /** - * @dev Returns the value stored at position `index` in the set. O(1). - * - * Note that there are no guarantees on the ordering of values inside the - * array, and it may change when more values are added or removed. - * - * Requirements: - * - * - `index` must be strictly less than {length}. - */ - function at(UintSet storage set, uint256 index) internal view returns (uint256) { - return uint256(_at(set._inner, index)); - } - - /** - * @dev Return the entire set in an array - * - * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed - * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that - * this function has an unbounded cost, and using it as part of a state-changing function may render the function - * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. - */ - function values(UintSet storage set) internal view returns (uint256[] memory) { - bytes32[] memory store = _values(set._inner); - uint256[] memory result; - - /// @solidity memory-safe-assembly - assembly { - result := store - } - - return result; - } -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol deleted file mode 100644 index 2a534a32..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/amb/IAMBUpgradeable.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/amb/IAMB.sol) -pragma solidity ^0.8.0; - -interface IAMBUpgradeable { - event UserRequestForAffirmation(bytes32 indexed messageId, bytes encodedData); - event UserRequestForSignature(bytes32 indexed messageId, bytes encodedData); - event AffirmationCompleted( - address indexed sender, - address indexed executor, - bytes32 indexed messageId, - bool status - ); - event RelayedMessage(address indexed sender, address indexed executor, bytes32 indexed messageId, bool status); - - function messageSender() external view returns (address); - - function maxGasPerTx() external view returns (uint256); - - function transactionHash() external view returns (bytes32); - - function messageId() external view returns (bytes32); - - function messageSourceChainId() external view returns (bytes32); - - function messageCallStatus(bytes32 _messageId) external view returns (bool); - - function failedMessageDataHash(bytes32 _messageId) external view returns (bytes32); - - function failedMessageReceiver(bytes32 _messageId) external view returns (address); - - function failedMessageSender(bytes32 _messageId) external view returns (address); - - function requireToPassMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); - - function requireToConfirmMessage(address _contract, bytes calldata _data, uint256 _gas) external returns (bytes32); - - function sourceChainId() external view returns (uint256); - - function destinationChainId() external view returns (uint256); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol deleted file mode 100644 index a973c7a3..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IArbSysUpgradeable.sol +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/OffchainLabs/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IArbSys.sol) - -pragma solidity >=0.4.21 <0.9.0; - -/** - * @title System level functionality - * @notice For use by contracts to interact with core L2-specific functionality. - * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. - */ -interface IArbSysUpgradeable { - /** - * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) - * @return block number as int - */ - function arbBlockNumber() external view returns (uint256); - - /** - * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum) - * @return block hash - */ - function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32); - - /** - * @notice Gets the rollup's unique chain identifier - * @return Chain identifier as int - */ - function arbChainID() external view returns (uint256); - - /** - * @notice Get internal version number identifying an ArbOS build - * @return version number as int - */ - function arbOSVersion() external view returns (uint256); - - /** - * @notice Returns 0 since Nitro has no concept of storage gas - * @return uint 0 - */ - function getStorageGasAvailable() external view returns (uint256); - - /** - * @notice (deprecated) check if current call is top level (meaning it was triggered by an EoA or a L1 contract) - * @dev this call has been deprecated and may be removed in a future release - * @return true if current execution frame is not a call by another L2 contract - */ - function isTopLevelCall() external view returns (bool); - - /** - * @notice map L1 sender contract address to its L2 alias - * @param sender sender address - * @param unused argument no longer used - * @return aliased sender address - */ - function mapL1SenderContractAddressToL2Alias(address sender, address unused) external pure returns (address); - - /** - * @notice check if the caller (of this caller of this) is an aliased L1 contract address - * @return true iff the caller's address is an alias for an L1 contract address - */ - function wasMyCallersAddressAliased() external view returns (bool); - - /** - * @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing - * @return address of the caller's caller, without applying L1 contract address aliasing - */ - function myCallersAddressWithoutAliasing() external view returns (address); - - /** - * @notice Send given amount of Eth to dest from sender. - * This is a convenience function, which is equivalent to calling sendTxToL1 with empty data. - * @param destination recipient address on L1 - * @return unique identifier for this L2-to-L1 transaction. - */ - function withdrawEth(address destination) external payable returns (uint256); - - /** - * @notice Send a transaction to L1 - * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data - * to a contract address without any code (as enforced by the Bridge contract). - * @param destination recipient address on L1 - * @param data (optional) calldata for L1 contract call - * @return a unique identifier for this L2-to-L1 transaction. - */ - function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256); - - /** - * @notice Get send Merkle tree state - * @return size number of sends in the history - * @return root root hash of the send history - * @return partials hashes of partial subtrees in the send history tree - */ - function sendMerkleTreeState() external view returns (uint256 size, bytes32 root, bytes32[] memory partials); - - /** - * @notice creates a send txn from L2 to L1 - * @param position = (level << 192) + leaf = (0 << 192) + leaf = leaf - */ - event L2ToL1Tx( - address caller, - address indexed destination, - uint256 indexed hash, - uint256 indexed position, - uint256 arbBlockNum, - uint256 ethBlockNum, - uint256 timestamp, - uint256 callvalue, - bytes data - ); - - /// @dev DEPRECATED in favour of the new L2ToL1Tx event above after the nitro upgrade - event L2ToL1Transaction( - address caller, - address indexed destination, - uint256 indexed uniqueId, - uint256 indexed batchNumber, - uint256 indexInBatch, - uint256 arbBlockNum, - uint256 ethBlockNum, - uint256 timestamp, - uint256 callvalue, - bytes data - ); - - /** - * @notice logs a merkle branch for proof synthesis - * @param reserved an index meant only to align the 4th index with L2ToL1Transaction's 4th event - * @param hash the merkle hash - * @param position = (level << 192) + leaf - */ - event SendMerkleUpdate(uint256 indexed reserved, bytes32 indexed hash, uint256 indexed position); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol deleted file mode 100644 index 1e429192..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IBridgeUpgradeable.sol +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IBridge.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -interface IBridgeUpgradeable { - event MessageDelivered( - uint256 indexed messageIndex, - bytes32 indexed beforeInboxAcc, - address inbox, - uint8 kind, - address sender, - bytes32 messageDataHash, - uint256 baseFeeL1, - uint64 timestamp - ); - - event BridgeCallTriggered(address indexed outbox, address indexed to, uint256 value, bytes data); - - event InboxToggle(address indexed inbox, bool enabled); - - event OutboxToggle(address indexed outbox, bool enabled); - - event SequencerInboxUpdated(address newSequencerInbox); - - function allowedDelayedInboxList(uint256) external returns (address); - - function allowedOutboxList(uint256) external returns (address); - - /// @dev Accumulator for delayed inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. - function delayedInboxAccs(uint256) external view returns (bytes32); - - /// @dev Accumulator for sequencer inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. - function sequencerInboxAccs(uint256) external view returns (bytes32); - - // OpenZeppelin: changed return type from IOwnable - function rollup() external view returns (address); - - function sequencerInbox() external view returns (address); - - function activeOutbox() external view returns (address); - - function allowedDelayedInboxes(address inbox) external view returns (bool); - - function allowedOutboxes(address outbox) external view returns (bool); - - function sequencerReportedSubMessageCount() external view returns (uint256); - - /** - * @dev Enqueue a message in the delayed inbox accumulator. - * These messages are later sequenced in the SequencerInbox, either - * by the sequencer as part of a normal batch, or by force inclusion. - */ - function enqueueDelayedMessage( - uint8 kind, - address sender, - bytes32 messageDataHash - ) external payable returns (uint256); - - function executeCall( - address to, - uint256 value, - bytes calldata data - ) external returns (bool success, bytes memory returnData); - - function delayedMessageCount() external view returns (uint256); - - function sequencerMessageCount() external view returns (uint256); - - // ---------- onlySequencerInbox functions ---------- - - function enqueueSequencerMessage( - bytes32 dataHash, - uint256 afterDelayedMessagesRead, - uint256 prevMessageCount, - uint256 newMessageCount - ) external returns (uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc); - - /** - * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type - * This is done through a separate function entrypoint instead of allowing the sequencer inbox - * to call `enqueueDelayedMessage` to avoid the gas overhead of an extra SLOAD in either - * every delayed inbox or every sequencer inbox call. - */ - function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) external returns (uint256 msgNum); - - // ---------- onlyRollupOrOwner functions ---------- - - function setSequencerInbox(address _sequencerInbox) external; - - function setDelayedInbox(address inbox, bool enabled) external; - - function setOutbox(address inbox, bool enabled) external; - - // ---------- initializer ---------- - - // OpenZeppelin: changed rollup_ type from IOwnable - function initialize(address rollup_) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol deleted file mode 100644 index 0dc69d64..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IDelayedMessageProviderUpgradeable.sol +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IDelayedMessageProvider.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -interface IDelayedMessageProviderUpgradeable { - /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator - event InboxMessageDelivered(uint256 indexed messageNum, bytes data); - - /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator - /// same as InboxMessageDelivered but the batch data is available in tx.input - event InboxMessageDeliveredFromOrigin(uint256 indexed messageNum); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol deleted file mode 100644 index e2c9d229..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IInboxUpgradeable.sol +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.8.0) (vendor/arbitrum/IInbox.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -import "./IBridgeUpgradeable.sol"; -import "./IDelayedMessageProviderUpgradeable.sol"; - -interface IInboxUpgradeable is IDelayedMessageProviderUpgradeable { - function bridge() external view returns (IBridgeUpgradeable); - - // OpenZeppelin: changed return type from ISequencerInbox - function sequencerInbox() external view returns (address); - - /** - * @notice Send a generic L2 message to the chain - * @dev This method is an optimization to avoid having to emit the entirety of the messageData in a log. Instead validators are expected to be able to parse the data from the transaction's input - * @param messageData Data of the message being sent - */ - function sendL2MessageFromOrigin(bytes calldata messageData) external returns (uint256); - - /** - * @notice Send a generic L2 message to the chain - * @dev This method can be used to send any type of message that doesn't require L1 validation - * @param messageData Data of the message being sent - */ - function sendL2Message(bytes calldata messageData) external returns (uint256); - - function sendL1FundedUnsignedTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - uint256 nonce, - address to, - bytes calldata data - ) external payable returns (uint256); - - function sendL1FundedContractTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - address to, - bytes calldata data - ) external payable returns (uint256); - - function sendUnsignedTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - uint256 nonce, - address to, - uint256 value, - bytes calldata data - ) external returns (uint256); - - function sendContractTransaction( - uint256 gasLimit, - uint256 maxFeePerGas, - address to, - uint256 value, - bytes calldata data - ) external returns (uint256); - - /** - * @notice Get the L1 fee for submitting a retryable - * @dev This fee can be paid by funds already in the L2 aliased address or by the current message value - * @dev This formula may change in the future, to future proof your code query this method instead of inlining!! - * @param dataLength The length of the retryable's calldata, in bytes - * @param baseFee The block basefee when the retryable is included in the chain, if 0 current block.basefee will be used - */ - function calculateRetryableSubmissionFee(uint256 dataLength, uint256 baseFee) external view returns (uint256); - - /** - * @notice Deposit eth from L1 to L2 to address of the sender if sender is an EOA, and to its aliased address if the sender is a contract - * @dev This does not trigger the fallback function when receiving in the L2 side. - * Look into retryable tickets if you are interested in this functionality. - * @dev This function should not be called inside contract constructors - */ - function depositEth() external payable returns (uint256); - - /** - * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts - * @dev all msg.value will deposited to callValueRefundAddress on L2 - * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error - * @param to destination L2 contract address - * @param l2CallValue call value for retryable L2 message - * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee - * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance - * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled - * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param data ABI encoded data of L2 message - * @return unique message number of the retryable transaction - */ - function createRetryableTicket( - address to, - uint256 l2CallValue, - uint256 maxSubmissionCost, - address excessFeeRefundAddress, - address callValueRefundAddress, - uint256 gasLimit, - uint256 maxFeePerGas, - bytes calldata data - ) external payable returns (uint256); - - /** - * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts - * @dev Same as createRetryableTicket, but does not guarantee that submission will succeed by requiring the needed funds - * come from the deposit alone, rather than falling back on the user's L2 balance - * @dev Advanced usage only (does not rewrite aliases for excessFeeRefundAddress and callValueRefundAddress). - * createRetryableTicket method is the recommended standard. - * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error - * @param to destination L2 contract address - * @param l2CallValue call value for retryable L2 message - * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee - * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance - * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled - * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) - * @param data ABI encoded data of L2 message - * @return unique message number of the retryable transaction - */ - function unsafeCreateRetryableTicket( - address to, - uint256 l2CallValue, - uint256 maxSubmissionCost, - address excessFeeRefundAddress, - address callValueRefundAddress, - uint256 gasLimit, - uint256 maxFeePerGas, - bytes calldata data - ) external payable returns (uint256); - - // ---------- onlyRollupOrOwner functions ---------- - - /// @notice pauses all inbox functionality - function pause() external; - - /// @notice unpauses all inbox functionality - function unpause() external; - - // ---------- initializer ---------- - - /** - * @dev function to be called one time during the inbox upgrade process - * this is used to fix the storage slots - */ - function postUpgradeInit(IBridgeUpgradeable _bridge) external; - - // OpenZeppelin: changed _sequencerInbox type from ISequencerInbox - function initialize(IBridgeUpgradeable _bridge, address _sequencerInbox) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol deleted file mode 100644 index 17d65d1d..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/arbitrum/IOutboxUpgradeable.sol +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2021-2022, Offchain Labs, Inc. -// For license information, see https://github.com/nitro/blob/master/LICENSE -// SPDX-License-Identifier: BUSL-1.1 -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/arbitrum/IOutbox.sol) - -// solhint-disable-next-line compiler-version -pragma solidity >=0.6.9 <0.9.0; - -import "./IBridgeUpgradeable.sol"; - -interface IOutboxUpgradeable { - event SendRootUpdated(bytes32 indexed blockHash, bytes32 indexed outputRoot); - event OutBoxTransactionExecuted( - address indexed to, - address indexed l2Sender, - uint256 indexed zero, - uint256 transactionIndex - ); - - function rollup() external view returns (address); // the rollup contract - - function bridge() external view returns (IBridgeUpgradeable); // the bridge contract - - function spent(uint256) external view returns (bytes32); // packed spent bitmap - - function roots(bytes32) external view returns (bytes32); // maps root hashes => L2 block hash - - // solhint-disable-next-line func-name-mixedcase - function OUTBOX_VERSION() external view returns (uint128); // the outbox version - - function updateSendRoot(bytes32 sendRoot, bytes32 l2BlockHash) external; - - /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account - /// When the return value is zero, that means this is a system message - /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies - function l2ToL1Sender() external view returns (address); - - /// @return l2Block return L2 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active - function l2ToL1Block() external view returns (uint256); - - /// @return l1Block return L1 block when the L2 tx was initiated or 0 if no L2 to L1 transaction is active - function l2ToL1EthBlock() external view returns (uint256); - - /// @return timestamp return L2 timestamp when the L2 tx was initiated or 0 if no L2 to L1 transaction is active - function l2ToL1Timestamp() external view returns (uint256); - - /// @return outputId returns the unique output identifier of the L2 to L1 tx or 0 if no L2 to L1 transaction is active - function l2ToL1OutputId() external view returns (bytes32); - - /** - * @notice Executes a messages in an Outbox entry. - * @dev Reverts if dispute period hasn't expired, since the outbox entry - * is only created once the rollup confirms the respective assertion. - * @dev it is not possible to execute any L2-to-L1 transaction which contains data - * to a contract address without any code (as enforced by the Bridge contract). - * @param proof Merkle proof of message inclusion in send root - * @param index Merkle path to message - * @param l2Sender sender if original message (i.e., caller of ArbSys.sendTxToL1) - * @param to destination address for L1 contract call - * @param l2Block l2 block number at which sendTxToL1 call was made - * @param l1Block l1 block number at which sendTxToL1 call was made - * @param l2Timestamp l2 Timestamp at which sendTxToL1 call was made - * @param value wei in L1 message - * @param data abi-encoded L1 message data - */ - function executeTransaction( - bytes32[] calldata proof, - uint256 index, - address l2Sender, - address to, - uint256 l2Block, - uint256 l1Block, - uint256 l2Timestamp, - uint256 value, - bytes calldata data - ) external; - - /** - * @dev function used to simulate the result of a particular function call from the outbox - * it is useful for things such as gas estimates. This function includes all costs except for - * proof validation (which can be considered offchain as a somewhat of a fixed cost - it's - * not really a fixed cost, but can be treated as so with a fixed overhead for gas estimation). - * We can't include the cost of proof validation since this is intended to be used to simulate txs - * that are included in yet-to-be confirmed merkle roots. The simulation entrypoint could instead pretend - * to confirm a pending merkle root, but that would be less practical for integrating with tooling. - * It is only possible to trigger it when the msg sender is address zero, which should be impossible - * unless under simulation in an eth_call or eth_estimateGas - */ - function executeTransactionSimulation( - uint256 index, - address l2Sender, - address to, - uint256 l2Block, - uint256 l1Block, - uint256 l2Timestamp, - uint256 value, - bytes calldata data - ) external; - - /** - * @param index Merkle path to message - * @return true if the message has been spent - */ - function isSpent(uint256 index) external view returns (bool); - - function calculateItemHash( - address l2Sender, - address to, - uint256 l2Block, - uint256 l1Block, - uint256 l2Timestamp, - uint256 value, - bytes calldata data - ) external pure returns (bytes32); - - function calculateMerkleRoot(bytes32[] memory proof, uint256 path, bytes32 item) external pure returns (bytes32); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol deleted file mode 100644 index 250b831a..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/ICompoundTimelockUpgradeable.sol +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (vendor/compound/ICompoundTimelock.sol) - -pragma solidity ^0.8.0; - -/** - * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface - */ -interface ICompoundTimelockUpgradeable { - event NewAdmin(address indexed newAdmin); - event NewPendingAdmin(address indexed newPendingAdmin); - event NewDelay(uint256 indexed newDelay); - event CancelTransaction( - bytes32 indexed txHash, - address indexed target, - uint256 value, - string signature, - bytes data, - uint256 eta - ); - event ExecuteTransaction( - bytes32 indexed txHash, - address indexed target, - uint256 value, - string signature, - bytes data, - uint256 eta - ); - event QueueTransaction( - bytes32 indexed txHash, - address indexed target, - uint256 value, - string signature, - bytes data, - uint256 eta - ); - - receive() external payable; - - // solhint-disable-next-line func-name-mixedcase - function GRACE_PERIOD() external view returns (uint256); - - // solhint-disable-next-line func-name-mixedcase - function MINIMUM_DELAY() external view returns (uint256); - - // solhint-disable-next-line func-name-mixedcase - function MAXIMUM_DELAY() external view returns (uint256); - - function admin() external view returns (address); - - function pendingAdmin() external view returns (address); - - function delay() external view returns (uint256); - - function queuedTransactions(bytes32) external view returns (bool); - - function setDelay(uint256) external; - - function acceptAdmin() external; - - function setPendingAdmin(address) external; - - function queueTransaction( - address target, - uint256 value, - string memory signature, - bytes memory data, - uint256 eta - ) external returns (bytes32); - - function cancelTransaction( - address target, - uint256 value, - string memory signature, - bytes memory data, - uint256 eta - ) external; - - function executeTransaction( - address target, - uint256 value, - string memory signature, - bytes memory data, - uint256 eta - ) external payable returns (bytes memory); -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE deleted file mode 100644 index 7da23247..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/compound/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2020 Compound Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol deleted file mode 100644 index 70e35e57..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/ICrossDomainMessengerUpgradeable.sol +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/optimism/ICrossDomainMessenger.sol) -pragma solidity >0.5.0 <0.9.0; - -/** - * @title ICrossDomainMessenger - */ -interface ICrossDomainMessengerUpgradeable { - /********** - * Events * - **********/ - - event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit); - event RelayedMessage(bytes32 indexed msgHash); - event FailedRelayedMessage(bytes32 indexed msgHash); - - /************* - * Variables * - *************/ - - function xDomainMessageSender() external view returns (address); - - /******************** - * Public Functions * - ********************/ - - /** - * Sends a cross domain message to the target messenger. - * @param _target Target contract address. - * @param _message Message to send to the target. - * @param _gasLimit Gas limit for the provided message. - */ - function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE deleted file mode 100644 index 6a7da521..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/optimism/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright 2020-2021 Optimism - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol deleted file mode 100644 index de89e2c2..00000000 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/vendor/polygon/IFxMessageProcessorUpgradeable.sol +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (vendor/polygon/IFxMessageProcessor.sol) -pragma solidity ^0.8.0; - -interface IFxMessageProcessorUpgradeable { - function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external; -} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/README.md b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/README.md similarity index 60% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/README.md rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/README.md index 53130e3c..b01c6e88 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/README.md +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/README.md @@ -1,10 +1,11 @@ # OpenZeppelin +[![Github Release](https://img.shields.io/github/v/tag/OpenZeppelin/openzeppelin-contracts.svg?filter=v*&sort=semver&label=github)](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/latest) [![NPM Package](https://img.shields.io/npm/v/@openzeppelin/contracts.svg)](https://www.npmjs.org/package/@openzeppelin/contracts) [![Coverage Status](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts/graph/badge.svg)](https://codecov.io/gh/OpenZeppelin/openzeppelin-contracts) [![GitPOAPs](https://public-api.gitpoap.io/v1/repo/OpenZeppelin/openzeppelin-contracts/badge)](https://www.gitpoap.io/gh/OpenZeppelin/openzeppelin-contracts) [![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-yellow)](https://docs.openzeppelin.com/contracts) -[![Forum](https://img.shields.io/badge/forum-%F0%9F%92%AC-yellow)](https://docs.openzeppelin.com/contracts) +[![Forum](https://img.shields.io/badge/forum-%F0%9F%92%AC-yellow)](https://forum.openzeppelin.com/) **A library for secure smart contract development.** Build on a solid foundation of community-vetted code. @@ -14,31 +15,60 @@ :mage: **Not sure how to get started?** Check out [Contracts Wizard](https://wizard.openzeppelin.com/) — an interactive smart contract generator. -:building_construction: **Want to scale your decentralized application?** Check out [OpenZeppelin Defender](https://openzeppelin.com/defender) — a secure platform for automating and monitoring your operations. +> [!IMPORTANT] +> OpenZeppelin Contracts uses semantic versioning to communicate backwards compatibility of its API and storage layout. For upgradeable contracts, the storage layout of different major versions should be assumed incompatible, for example, it is unsafe to upgrade from 4.9.3 to 5.0.0. Learn more at [Backwards Compatibility](https://docs.openzeppelin.com/contracts/backwards-compatibility). -> **Note** -> You are looking at the upgradeable variant of OpenZeppelin Contracts. Be sure to review the documentation on [Using OpenZeppelin Contracts with Upgrades](https://docs.openzeppelin.com/contracts/4.x/upgradeable). +> [!NOTE] +> You are looking at the upgradeable variant of OpenZeppelin Contracts. Be sure to review the documentation on [Using OpenZeppelin Contracts with Upgrades](https://docs.openzeppelin.com/contracts/upgradeable). ## Overview +### Release tags + +We use NPM tags to clearly distinguish between audited and non-audited versions of our package: + +| Tag | Purpose | Description | +| :--------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **latest** | ✅ Audited releases | Stable, audited versions of the package. This is the **default** version installed when users run `npm install @openzeppelin/contracts`. | +| **dev** | 🧪 Final but not audited | Versions that are finalized and feature-complete but have **not yet been audited**. This version is fully tested, can be used in production and is covered by the bug bounty. | +| **next** | 🚧 Release candidates | Pre-release versions that are **not final**. Used for testing and validation before the version becomes a final `dev` or `latest` release. | + ### Installation +#### Hardhat (npm) + ``` $ npm install @openzeppelin/contracts-upgradeable ``` +→ Installs the latest audited release (`latest`). + +``` +$ npm install @openzeppelin/contracts-upgradeable@dev +``` +→ Installs the latest unaudited release (`dev`). -OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/contracts/releases-stability#api-stability), which means that your contracts won't break unexpectedly when upgrading to a newer minor version. +#### Foundry (git) -An alternative to npm is to use the GitHub repository (`openzeppelin/openzeppelin-contracts-upgradeable`) to retrieve the contracts. When doing this, make sure to specify the tag for a release such as `v4.5.0`, instead of using the `master` branch. +> [!WARNING] +> When installing via git, it is a common error to use the `master` branch. This is a development branch that should be avoided in favor of tagged releases. The release process involves security measures that the `master` branch does not guarantee. + +> [!WARNING] +> Foundry installs the latest version initially, but subsequent `forge update` commands will use the `master` branch. + +``` +$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable +``` + +Add `@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/` in `remappings.txt`. ### Usage Once installed, you can use the contracts in the library by importing them: ```solidity -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; +import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; contract MyCollectible is ERC721Upgradeable { function initialize() initializer public { @@ -56,12 +86,12 @@ To keep your system secure, you should **always** use the installed code as-is, The guides in the [documentation site](https://docs.openzeppelin.com/contracts) will teach about different concepts, and how to use the related contracts that OpenZeppelin Contracts provides: * [Access Control](https://docs.openzeppelin.com/contracts/access-control): decide who can perform each of the actions on your system. -* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectives, and distribute them via [Crowdsales](https://docs.openzeppelin.com/contracts/crowdsales). +* [Tokens](https://docs.openzeppelin.com/contracts/tokens): create tradeable assets or collectibles for popular ERC standards like ERC-20, ERC-721, ERC-1155, and ERC-6909. * [Utilities](https://docs.openzeppelin.com/contracts/utilities): generic useful tools including non-overflowing math, signature verification, and trustless paying systems. -The [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts's development in the [community forum](https://forum.openzeppelin.com). +The [full API](https://docs.openzeppelin.com/contracts/api/token/ERC20) is also thoroughly documented, and serves as a great reference when developing your smart contract application. You can also ask for help or follow Contracts' development in the [community forum](https://forum.openzeppelin.com). -Finally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/guides), which cover several common use cases and good practices. The following articles provide great background reading, though please note that some of the referenced tools have changed, as the tooling in the ecosystem continues to rapidly evolve. +Finally, you may want to take a look at the [guides on our blog](https://blog.openzeppelin.com/), which cover several common use cases and good practices. The following articles provide great background reading, though please note that some of the referenced tools have changed, as the tooling in the ecosystem continues to rapidly evolve. * [The Hitchhiker’s Guide to Smart Contracts in Ethereum](https://blog.openzeppelin.com/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05) will help you get an overview of the various tools available for smart contract development, and help you set up your environment. * [A Gentle Introduction to Ethereum Programming, Part 1](https://blog.openzeppelin.com/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094) provides very useful information on an introductory level, including many basic concepts from the Ethereum platform. @@ -71,7 +101,9 @@ Finally, you may want to take a look at the [guides on our blog](https://blog.op This project is maintained by [OpenZeppelin](https://openzeppelin.com) with the goal of providing a secure and reliable library of smart contract components for the ecosystem. We address security through risk management in various areas such as engineering and open source best practices, scoping and API design, multi-layered review processes, and incident response preparedness. -The security policy is detailed in [`SECURITY.md`](./SECURITY.md), and specifies how you can report security vulnerabilities, which versions will receive security patches, and how to stay informed about them. We run a [bug bounty program on Immunefi](https://immunefi.com/bounty/openzeppelin) to reward the responsible disclosure of vulnerabilities. +The [OpenZeppelin Contracts Security Center](https://contracts.openzeppelin.com/security) contains more details about the secure development process. + +The security policy is detailed in [`SECURITY.md`](./SECURITY.md) as well, and specifies how you can report security vulnerabilities, which versions will receive security patches, and how to stay informed about them. We run a [bug bounty program on Immunefi](https://immunefi.com/bounty/openzeppelin) to reward the responsible disclosure of vulnerabilities. The engineering guidelines we follow to promote project quality can be found in [`GUIDELINES.md`](./GUIDELINES.md). diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/AccessControlUpgradeable.sol similarity index 57% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/AccessControlUpgradeable.sol index 2ef6bf2b..b9e73993 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/AccessControlUpgradeable.sol @@ -1,13 +1,12 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (access/AccessControl.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./IAccessControlUpgradeable.sol"; -import "../utils/ContextUpgradeable.sol"; -import "../utils/StringsUpgradeable.sol"; -import "../utils/introspection/ERC165Upgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; +import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; +import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; +import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access @@ -48,25 +47,32 @@ import {Initializable} from "../proxy/utils/Initializable.sol"; * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ -abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { +abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable { struct RoleData { - mapping(address => bool) members; + mapping(address account => bool) hasRole; bytes32 adminRole; } - mapping(bytes32 => RoleData) private _roles; - bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; + + /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl + struct AccessControlStorage { + mapping(bytes32 role => RoleData) _roles; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800; + + function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) { + assembly { + $.slot := AccessControlStorageLocation + } + } + /** * @dev Modifier that checks that an account has a specific role. Reverts - * with a standardized message including the required role. - * - * The format of the revert reason is given by the following regular expression: - * - * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ - * - * _Available since v4.1._ + * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); @@ -78,51 +84,34 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, function __AccessControl_init_unchained() internal onlyInitializing { } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc ERC165Upgradeable function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); + return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ - function hasRole(bytes32 role, address account) public view virtual override returns (bool) { - return _roles[role].members[account]; + function hasRole(bytes32 role, address account) public view virtual returns (bool) { + AccessControlStorage storage $ = _getAccessControlStorage(); + return $._roles[role].hasRole[account]; } /** - * @dev Revert with a standard message if `_msgSender()` is missing `role`. - * Overriding this function changes the behavior of the {onlyRole} modifier. - * - * Format of the revert message is described in {_checkRole}. - * - * _Available since v4.6._ + * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` + * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** - * @dev Revert with a standard message if `account` is missing `role`. - * - * The format of the revert reason is given by the following regular expression: - * - * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` + * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { - revert( - string( - abi.encodePacked( - "AccessControl: account ", - StringsUpgradeable.toHexString(account), - " is missing role ", - StringsUpgradeable.toHexString(uint256(role), 32) - ) - ) - ); + revert AccessControlUnauthorizedAccount(account, role); } } @@ -132,8 +121,9 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, * * To change a role's admin, use {_setRoleAdmin}. */ - function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { - return _roles[role].adminRole; + function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { + AccessControlStorage storage $ = _getAccessControlStorage(); + return $._roles[role].adminRole; } /** @@ -148,7 +138,7 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, * * May emit a {RoleGranted} event. */ - function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } @@ -163,7 +153,7 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, * * May emit a {RoleRevoked} event. */ - function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } @@ -179,38 +169,16 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, * * Requirements: * - * - the caller must be `account`. + * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ - function renounceRole(bytes32 role, address account) public virtual override { - require(account == _msgSender(), "AccessControl: can only renounce roles for self"); - - _revokeRole(role, account); - } + function renounceRole(bytes32 role, address callerConfirmation) public virtual { + if (callerConfirmation != _msgSender()) { + revert AccessControlBadConfirmation(); + } - /** - * @dev Grants `role` to `account`. - * - * If `account` had not been already granted `role`, emits a {RoleGranted} - * event. Note that unlike {grantRole}, this function doesn't perform any - * checks on the calling account. - * - * May emit a {RoleGranted} event. - * - * [WARNING] - * ==== - * This function should only be called from the constructor when setting - * up the initial roles for the system. - * - * Using this function in any other way is effectively circumventing the admin - * system imposed by {AccessControl}. - * ==== - * - * NOTE: This function is deprecated in favor of {_grantRole}. - */ - function _setupRole(bytes32 role, address account) internal virtual { - _grantRole(role, account); + _revokeRole(role, callerConfirmation); } /** @@ -219,43 +187,45 @@ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { + AccessControlStorage storage $ = _getAccessControlStorage(); bytes32 previousAdminRole = getRoleAdmin(role); - _roles[role].adminRole = adminRole; + $._roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** - * @dev Grants `role` to `account`. + * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ - function _grantRole(bytes32 role, address account) internal virtual { + function _grantRole(bytes32 role, address account) internal virtual returns (bool) { + AccessControlStorage storage $ = _getAccessControlStorage(); if (!hasRole(role, account)) { - _roles[role].members[account] = true; + $._roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); + return true; + } else { + return false; } } /** - * @dev Revokes `role` from `account`. + * @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ - function _revokeRole(bytes32 role, address account) internal virtual { + function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { + AccessControlStorage storage $ = _getAccessControlStorage(); if (hasRole(role, account)) { - _roles[role].members[account] = false; + $._roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); + return true; + } else { + return false; } } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/Ownable2StepUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/Ownable2StepUpgradeable.sol new file mode 100644 index 00000000..2d27ac88 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/Ownable2StepUpgradeable.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol) + +pragma solidity ^0.8.20; + +import {OwnableUpgradeable} from "./OwnableUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Contract module which provides access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * This extension of the {Ownable} contract includes a two-step mechanism to transfer + * ownership, where the new owner must call {acceptOwnership} in order to replace the + * old one. This can help prevent common mistakes, such as transfers of ownership to + * incorrect accounts, or to contracts that are unable to interact with the + * permission system. + * + * The initial owner is specified at deployment time in the constructor for `Ownable`. This + * can later be changed with {transferOwnership} and {acceptOwnership}. + * + * This module is used through inheritance. It will make available all functions + * from parent (Ownable). + */ +abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step + struct Ownable2StepStorage { + address _pendingOwner; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00; + + function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) { + assembly { + $.slot := Ownable2StepStorageLocation + } + } + + event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); + + function __Ownable2Step_init() internal onlyInitializing { + } + + function __Ownable2Step_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns the address of the pending owner. + */ + function pendingOwner() public view virtual returns (address) { + Ownable2StepStorage storage $ = _getOwnable2StepStorage(); + return $._pendingOwner; + } + + /** + * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. + * Can only be called by the current owner. + * + * Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer. + */ + function transferOwnership(address newOwner) public virtual override onlyOwner { + Ownable2StepStorage storage $ = _getOwnable2StepStorage(); + $._pendingOwner = newOwner; + emit OwnershipTransferStarted(owner(), newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual override { + Ownable2StepStorage storage $ = _getOwnable2StepStorage(); + delete $._pendingOwner; + super._transferOwnership(newOwner); + } + + /** + * @dev The new owner accepts the ownership transfer. + */ + function acceptOwnership() public virtual { + address sender = _msgSender(); + if (pendingOwner() != sender) { + revert OwnableUnauthorizedAccount(sender); + } + _transferOwnership(sender); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/OwnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/OwnableUpgradeable.sol new file mode 100644 index 00000000..1697c76b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/OwnableUpgradeable.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) + +pragma solidity ^0.8.20; + +import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * The initial owner is set to the address provided by the deployer. This can + * later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.Ownable + struct OwnableStorage { + address _owner; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; + + function _getOwnableStorage() private pure returns (OwnableStorage storage $) { + assembly { + $.slot := OwnableStorageLocation + } + } + + /** + * @dev The caller account is not authorized to perform an operation. + */ + error OwnableUnauthorizedAccount(address account); + + /** + * @dev The owner is not a valid owner account. (eg. `address(0)`) + */ + error OwnableInvalidOwner(address owner); + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the address provided by the deployer as the initial owner. + */ + function __Ownable_init(address initialOwner) internal onlyInitializing { + __Ownable_init_unchained(initialOwner); + } + + function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { + if (initialOwner == address(0)) { + revert OwnableInvalidOwner(address(0)); + } + _transferOwnership(initialOwner); + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + _checkOwner(); + _; + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + OwnableStorage storage $ = _getOwnableStorage(); + return $._owner; + } + + /** + * @dev Throws if the sender is not the owner. + */ + function _checkOwner() internal view virtual { + if (owner() != _msgSender()) { + revert OwnableUnauthorizedAccount(_msgSender()); + } + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby disabling any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + _transferOwnership(address(0)); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + if (newOwner == address(0)) { + revert OwnableInvalidOwner(address(0)); + } + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual { + OwnableStorage storage $ = _getOwnableStorage(); + address oldOwner = $._owner; + $._owner = newOwner; + emit OwnershipTransferred(oldOwner, newOwner); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlDefaultAdminRulesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/extensions/AccessControlDefaultAdminRulesUpgradeable.sol similarity index 60% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlDefaultAdminRulesUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/extensions/AccessControlDefaultAdminRulesUpgradeable.sol index fe82ee2d..761ad6d4 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/access/AccessControlDefaultAdminRulesUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/extensions/AccessControlDefaultAdminRulesUpgradeable.sol @@ -1,13 +1,16 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControlDefaultAdminRules.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (access/extensions/AccessControlDefaultAdminRules.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./AccessControlUpgradeable.sol"; -import "./IAccessControlDefaultAdminRulesUpgradeable.sol"; -import "../utils/math/SafeCastUpgradeable.sol"; -import "../interfaces/IERC5313Upgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; +import {IAccessControlDefaultAdminRules} from "@openzeppelin/contracts/access/extensions/IAccessControlDefaultAdminRules.sol"; +import {AccessControlUpgradeable} from "../AccessControlUpgradeable.sol"; +import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {IERC5313} from "@openzeppelin/contracts/interfaces/IERC5313.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows specifying special rules to manage @@ -23,6 +26,7 @@ import {Initializable} from "../proxy/utils/Initializable.sol"; * * Enforces a 2-step process to transfer the `DEFAULT_ADMIN_ROLE` to another account. * * Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted. * * The delay can be changed by scheduling, see {changeDefaultAdminDelay}. + * * Role transfers must wait at least one block after scheduling before it can be accepted. * * It is not possible to use another role to manage the `DEFAULT_ADMIN_ROLE`. * * Example usage: @@ -35,20 +39,30 @@ import {Initializable} from "../proxy/utils/Initializable.sol"; * ) {} * } * ``` - * - * _Available since v4.9._ */ -abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IAccessControlDefaultAdminRulesUpgradeable, IERC5313Upgradeable, AccessControlUpgradeable { - // pending admin pair read/written together frequently - address private _pendingDefaultAdmin; - uint48 private _pendingDefaultAdminSchedule; // 0 == unset +abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IAccessControlDefaultAdminRules, IERC5313, AccessControlUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlDefaultAdminRules + struct AccessControlDefaultAdminRulesStorage { + // pending admin pair read/written together frequently + address _pendingDefaultAdmin; + uint48 _pendingDefaultAdminSchedule; // 0 == unset + + uint48 _currentDelay; + address _currentDefaultAdmin; + + // pending delay pair read/written together frequently + uint48 _pendingDelay; + uint48 _pendingDelaySchedule; // 0 == unset + } - uint48 private _currentDelay; - address private _currentDefaultAdmin; + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlDefaultAdminRules")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant AccessControlDefaultAdminRulesStorageLocation = 0xeef3dac4538c82c8ace4063ab0acd2d15cdb5883aa1dff7c2673abb3d8698400; - // pending delay pair read/written together frequently - uint48 private _pendingDelay; - uint48 private _pendingDelaySchedule; // 0 == unset + function _getAccessControlDefaultAdminRulesStorage() private pure returns (AccessControlDefaultAdminRulesStorage storage $) { + assembly { + $.slot := AccessControlDefaultAdminRulesStorageLocation + } + } /** * @dev Sets the initial values for {defaultAdminDelay} and {defaultAdmin} address. @@ -58,21 +72,20 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA } function __AccessControlDefaultAdminRules_init_unchained(uint48 initialDelay, address initialDefaultAdmin) internal onlyInitializing { - require(initialDefaultAdmin != address(0), "AccessControl: 0 default admin"); - _currentDelay = initialDelay; + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); + if (initialDefaultAdmin == address(0)) { + revert AccessControlInvalidDefaultAdmin(address(0)); + } + $._currentDelay = initialDelay; _grantRole(DEFAULT_ADMIN_ROLE, initialDefaultAdmin); } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == type(IAccessControlDefaultAdminRulesUpgradeable).interfaceId || super.supportsInterface(interfaceId); + return interfaceId == type(IAccessControlDefaultAdminRules).interfaceId || super.supportsInterface(interfaceId); } - /** - * @dev See {IERC5313-owner}. - */ + /// @inheritdoc IERC5313 function owner() public view virtual returns (address) { return defaultAdmin(); } @@ -84,16 +97,20 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA /** * @dev See {AccessControl-grantRole}. Reverts for `DEFAULT_ADMIN_ROLE`. */ - function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { - require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly grant default admin role"); + function grantRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControl) { + if (role == DEFAULT_ADMIN_ROLE) { + revert AccessControlEnforcedDefaultAdminRules(); + } super.grantRole(role, account); } /** * @dev See {AccessControl-revokeRole}. Reverts for `DEFAULT_ADMIN_ROLE`. */ - function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { - require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't directly revoke default admin role"); + function revokeRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControl) { + if (role == DEFAULT_ADMIN_ROLE) { + revert AccessControlEnforcedDefaultAdminRules(); + } super.revokeRole(role, account); } @@ -110,14 +127,14 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA * thereby disabling any functionality that is only available for it, and the possibility of reassigning a * non-administrated role. */ - function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControlUpgradeable) { + function renounceRole(bytes32 role, address account) public virtual override(AccessControlUpgradeable, IAccessControl) { + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { (address newDefaultAdmin, uint48 schedule) = pendingDefaultAdmin(); - require( - newDefaultAdmin == address(0) && _isScheduleSet(schedule) && _hasSchedulePassed(schedule), - "AccessControl: only can renounce in two delayed steps" - ); - delete _pendingDefaultAdminSchedule; + if (newDefaultAdmin != address(0) || !_isScheduleSet(schedule) || !_hasSchedulePassed(schedule)) { + revert AccessControlEnforcedDefaultAdminDelay(schedule); + } + delete $._pendingDefaultAdminSchedule; } super.renounceRole(role, account); } @@ -131,29 +148,33 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA * NOTE: Exposing this function through another mechanism may make the `DEFAULT_ADMIN_ROLE` * assignable again. Make sure to guarantee this is the expected behavior in your implementation. */ - function _grantRole(bytes32 role, address account) internal virtual override { + function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); if (role == DEFAULT_ADMIN_ROLE) { - require(defaultAdmin() == address(0), "AccessControl: default admin already granted"); - _currentDefaultAdmin = account; + if (defaultAdmin() != address(0)) { + revert AccessControlEnforcedDefaultAdminRules(); + } + $._currentDefaultAdmin = account; } - super._grantRole(role, account); + return super._grantRole(role, account); } - /** - * @dev See {AccessControl-_revokeRole}. - */ - function _revokeRole(bytes32 role, address account) internal virtual override { + /// @inheritdoc AccessControlUpgradeable + function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { - delete _currentDefaultAdmin; + delete $._currentDefaultAdmin; } - super._revokeRole(role, account); + return super._revokeRole(role, account); } /** * @dev See {AccessControl-_setRoleAdmin}. Reverts for `DEFAULT_ADMIN_ROLE`. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual override { - require(role != DEFAULT_ADMIN_ROLE, "AccessControl: can't violate default admin rules"); + if (role == DEFAULT_ADMIN_ROLE) { + revert AccessControlEnforcedDefaultAdminRules(); + } super._setRoleAdmin(role, adminRole); } @@ -161,39 +182,33 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA /// AccessControlDefaultAdminRules accessors /// - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdmin() public view virtual returns (address) { - return _currentDefaultAdmin; + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); + return $._currentDefaultAdmin; } - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function pendingDefaultAdmin() public view virtual returns (address newAdmin, uint48 schedule) { - return (_pendingDefaultAdmin, _pendingDefaultAdminSchedule); + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); + return ($._pendingDefaultAdmin, $._pendingDefaultAdminSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdminDelay() public view virtual returns (uint48) { - uint48 schedule = _pendingDelaySchedule; - return (_isScheduleSet(schedule) && _hasSchedulePassed(schedule)) ? _pendingDelay : _currentDelay; + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); + uint48 schedule = $._pendingDelaySchedule; + return (_isScheduleSet(schedule) && _hasSchedulePassed(schedule)) ? $._pendingDelay : $._currentDelay; } - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function pendingDefaultAdminDelay() public view virtual returns (uint48 newDelay, uint48 schedule) { - schedule = _pendingDelaySchedule; - return (_isScheduleSet(schedule) && !_hasSchedulePassed(schedule)) ? (_pendingDelay, schedule) : (0, 0); + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); + schedule = $._pendingDelaySchedule; + return (_isScheduleSet(schedule) && !_hasSchedulePassed(schedule)) ? ($._pendingDelay, schedule) : (0, 0); } - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdminDelayIncreaseWait() public view virtual returns (uint48) { return 5 days; } @@ -202,9 +217,7 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA /// AccessControlDefaultAdminRules public and internal setters for defaultAdmin/pendingDefaultAdmin /// - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function beginDefaultAdminTransfer(address newAdmin) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _beginDefaultAdminTransfer(newAdmin); } @@ -215,14 +228,12 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA * Internal function without access restriction. */ function _beginDefaultAdminTransfer(address newAdmin) internal virtual { - uint48 newSchedule = SafeCastUpgradeable.toUint48(block.timestamp) + defaultAdminDelay(); + uint48 newSchedule = SafeCast.toUint48(block.timestamp) + defaultAdminDelay(); _setPendingDefaultAdmin(newAdmin, newSchedule); emit DefaultAdminTransferScheduled(newAdmin, newSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function cancelDefaultAdminTransfer() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _cancelDefaultAdminTransfer(); } @@ -236,12 +247,13 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA _setPendingDefaultAdmin(address(0), 0); } - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function acceptDefaultAdminTransfer() public virtual { (address newDefaultAdmin, ) = pendingDefaultAdmin(); - require(_msgSender() == newDefaultAdmin, "AccessControl: pending admin must accept"); + if (_msgSender() != newDefaultAdmin) { + // Enforce newDefaultAdmin explicit acceptance. + revert AccessControlInvalidDefaultAdmin(_msgSender()); + } _acceptDefaultAdminTransfer(); } @@ -251,21 +263,22 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA * Internal function without access restriction. */ function _acceptDefaultAdminTransfer() internal virtual { + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); (address newAdmin, uint48 schedule) = pendingDefaultAdmin(); - require(_isScheduleSet(schedule) && _hasSchedulePassed(schedule), "AccessControl: transfer delay not passed"); + if (!_isScheduleSet(schedule) || !_hasSchedulePassed(schedule)) { + revert AccessControlEnforcedDefaultAdminDelay(schedule); + } _revokeRole(DEFAULT_ADMIN_ROLE, defaultAdmin()); _grantRole(DEFAULT_ADMIN_ROLE, newAdmin); - delete _pendingDefaultAdmin; - delete _pendingDefaultAdminSchedule; + delete $._pendingDefaultAdmin; + delete $._pendingDefaultAdminSchedule; } /// /// AccessControlDefaultAdminRules public and internal setters for defaultAdminDelay/pendingDefaultAdminDelay /// - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function changeDefaultAdminDelay(uint48 newDelay) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _changeDefaultAdminDelay(newDelay); } @@ -276,14 +289,12 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA * Internal function without access restriction. */ function _changeDefaultAdminDelay(uint48 newDelay) internal virtual { - uint48 newSchedule = SafeCastUpgradeable.toUint48(block.timestamp) + _delayChangeWait(newDelay); + uint48 newSchedule = SafeCast.toUint48(block.timestamp) + _delayChangeWait(newDelay); _setPendingDelay(newDelay, newSchedule); emit DefaultAdminDelayChangeScheduled(newDelay, newSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRulesUpgradeable - */ + /// @inheritdoc IAccessControlDefaultAdminRules function rollbackDefaultAdminDelay() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _rollbackDefaultAdminDelay(); } @@ -320,7 +331,7 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA // For example, if decreasing from 10 days to 3 days, the new delay will come into effect after 7 days. return newDelay > currentDelay - ? uint48(MathUpgradeable.min(newDelay, defaultAdminDelayIncreaseWait())) // no need to safecast, both inputs are uint48 + ? uint48(Math.min(newDelay, defaultAdminDelayIncreaseWait())) // no need to safecast, both inputs are uint48 : currentDelay - newDelay; } @@ -331,13 +342,14 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA /** * @dev Setter of the tuple for pending admin and its schedule. * - * May emit a DefaultAdminTransferCanceled event. + * May emit a {DefaultAdminTransferCanceled} event. */ function _setPendingDefaultAdmin(address newAdmin, uint48 newSchedule) private { + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); (, uint48 oldSchedule) = pendingDefaultAdmin(); - _pendingDefaultAdmin = newAdmin; - _pendingDefaultAdminSchedule = newSchedule; + $._pendingDefaultAdmin = newAdmin; + $._pendingDefaultAdminSchedule = newSchedule; // An `oldSchedule` from `pendingDefaultAdmin()` is only set if it hasn't been accepted. if (_isScheduleSet(oldSchedule)) { @@ -349,23 +361,24 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA /** * @dev Setter of the tuple for pending delay and its schedule. * - * May emit a DefaultAdminDelayChangeCanceled event. + * May emit a {DefaultAdminDelayChangeCanceled} event. */ function _setPendingDelay(uint48 newDelay, uint48 newSchedule) private { - uint48 oldSchedule = _pendingDelaySchedule; + AccessControlDefaultAdminRulesStorage storage $ = _getAccessControlDefaultAdminRulesStorage(); + uint48 oldSchedule = $._pendingDelaySchedule; if (_isScheduleSet(oldSchedule)) { if (_hasSchedulePassed(oldSchedule)) { // Materialize a virtual delay - _currentDelay = _pendingDelay; + $._currentDelay = $._pendingDelay; } else { // Emit for implicit cancellations when another delay was scheduled. emit DefaultAdminDelayChangeCanceled(); } } - _pendingDelay = newDelay; - _pendingDelaySchedule = newSchedule; + $._pendingDelay = newDelay; + $._pendingDelaySchedule = newSchedule; } /// @@ -373,23 +386,16 @@ abstract contract AccessControlDefaultAdminRulesUpgradeable is Initializable, IA /// /** - * @dev Defines if an `schedule` is considered set. For consistency purposes. + * @dev Defines if a `schedule` is considered set. For consistency purposes. */ function _isScheduleSet(uint48 schedule) private pure returns (bool) { return schedule != 0; } /** - * @dev Defines if an `schedule` is considered passed. For consistency purposes. + * @dev Defines if a `schedule` is considered passed. For consistency purposes. */ function _hasSchedulePassed(uint48 schedule) private view returns (bool) { return schedule < block.timestamp; } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/extensions/AccessControlEnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/extensions/AccessControlEnumerableUpgradeable.sol new file mode 100644 index 00000000..3aa7b0a8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/extensions/AccessControlEnumerableUpgradeable.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (access/extensions/AccessControlEnumerable.sol) + +pragma solidity ^0.8.24; + +import {IAccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol"; +import {AccessControlUpgradeable} from "../AccessControlUpgradeable.sol"; +import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {AccessControl} that allows enumerating the members of each role. + */ +abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerable, AccessControlUpgradeable { + using EnumerableSet for EnumerableSet.AddressSet; + + /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlEnumerable + struct AccessControlEnumerableStorage { + mapping(bytes32 role => EnumerableSet.AddressSet) _roleMembers; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlEnumerable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant AccessControlEnumerableStorageLocation = 0xc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000; + + function _getAccessControlEnumerableStorage() private pure returns (AccessControlEnumerableStorage storage $) { + assembly { + $.slot := AccessControlEnumerableStorageLocation + } + } + + function __AccessControlEnumerable_init() internal onlyInitializing { + } + + function __AccessControlEnumerable_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) { + AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); + return $._roleMembers[role].at(index); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) { + AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); + return $._roleMembers[role].length(); + } + + /** + * @dev Return all accounts that have `role` + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function getRoleMembers(bytes32 role) public view virtual returns (address[] memory) { + AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); + return $._roleMembers[role].values(); + } + + /** + * @dev Overload {AccessControl-_grantRole} to track enumerable memberships + */ + function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { + AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); + bool granted = super._grantRole(role, account); + if (granted) { + $._roleMembers[role].add(account); + } + return granted; + } + + /** + * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships + */ + function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { + AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); + bool revoked = super._revokeRole(role, account); + if (revoked) { + $._roleMembers[role].remove(account); + } + return revoked; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagedUpgradeable.sol new file mode 100644 index 00000000..80678291 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagedUpgradeable.sol @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/AccessManaged.sol) + +pragma solidity ^0.8.20; + +import {AuthorityUtils} from "@openzeppelin/contracts/access/manager/AuthorityUtils.sol"; +import {IAccessManager} from "@openzeppelin/contracts/access/manager/IAccessManager.sol"; +import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol"; +import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be + * permissioned according to an "authority": a contract like {AccessManager} that follows the {IAuthority} interface, + * implementing a policy that allows certain callers to access certain functions. + * + * IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public` + * functions, and ideally only used in `external` functions. See {restricted}. + */ +abstract contract AccessManagedUpgradeable is Initializable, ContextUpgradeable, IAccessManaged { + /// @custom:storage-location erc7201:openzeppelin.storage.AccessManaged + struct AccessManagedStorage { + address _authority; + + bool _consumingSchedule; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessManaged")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant AccessManagedStorageLocation = 0xf3177357ab46d8af007ab3fdb9af81da189e1068fefdc0073dca88a2cab40a00; + + function _getAccessManagedStorage() private pure returns (AccessManagedStorage storage $) { + assembly { + $.slot := AccessManagedStorageLocation + } + } + + /** + * @dev Initializes the contract connected to an initial authority. + */ + function __AccessManaged_init(address initialAuthority) internal onlyInitializing { + __AccessManaged_init_unchained(initialAuthority); + } + + function __AccessManaged_init_unchained(address initialAuthority) internal onlyInitializing { + _setAuthority(initialAuthority); + } + + /** + * @dev Restricts access to a function as defined by the connected Authority for this contract and the + * caller and selector of the function that entered the contract. + * + * [IMPORTANT] + * ==== + * In general, this modifier should only be used on `external` functions. It is okay to use it on `public` + * functions that are used as external entry points and are not called internally. Unless you know what you're + * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security + * implications! This is because the permissions are determined by the function that entered the contract, i.e. the + * function at the bottom of the call stack, and not the function where the modifier is visible in the source code. + * ==== + * + * [WARNING] + * ==== + * Avoid adding this modifier to the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`] + * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These + * functions are the only execution paths where a function selector cannot be unambiguously determined from the calldata + * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()` function + * if no calldata is provided. (See {_checkCanCall}). + * + * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length. + * ==== + */ + modifier restricted() { + _checkCanCall(_msgSender(), _msgData()); + _; + } + + /// @inheritdoc IAccessManaged + function authority() public view virtual returns (address) { + AccessManagedStorage storage $ = _getAccessManagedStorage(); + return $._authority; + } + + /// @inheritdoc IAccessManaged + function setAuthority(address newAuthority) public virtual { + address caller = _msgSender(); + if (caller != authority()) { + revert AccessManagedUnauthorized(caller); + } + if (newAuthority.code.length == 0) { + revert AccessManagedInvalidAuthority(newAuthority); + } + _setAuthority(newAuthority); + } + + /// @inheritdoc IAccessManaged + function isConsumingScheduledOp() public view returns (bytes4) { + AccessManagedStorage storage $ = _getAccessManagedStorage(); + return $._consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0); + } + + /** + * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the + * permissions set by the current authority. + */ + function _setAuthority(address newAuthority) internal virtual { + AccessManagedStorage storage $ = _getAccessManagedStorage(); + $._authority = newAuthority; + emit AuthorityUpdated(newAuthority); + } + + /** + * @dev Reverts if the caller is not allowed to call the function identified by a selector. Panics if the calldata + * is less than 4 bytes long. + */ + function _checkCanCall(address caller, bytes calldata data) internal virtual { + AccessManagedStorage storage $ = _getAccessManagedStorage(); + (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( + authority(), + caller, + address(this), + bytes4(data[0:4]) + ); + if (!immediate) { + if (delay > 0) { + $._consumingSchedule = true; + IAccessManager(authority()).consumeScheduledOp(caller, data); + $._consumingSchedule = false; + } else { + revert AccessManagedUnauthorized(caller); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagerUpgradeable.sol new file mode 100644 index 00000000..9e064a40 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/access/manager/AccessManagerUpgradeable.sol @@ -0,0 +1,784 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (access/manager/AccessManager.sol) + +pragma solidity ^0.8.20; + +import {IAccessManager} from "@openzeppelin/contracts/access/manager/IAccessManager.sol"; +import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; +import {MulticallUpgradeable} from "../../utils/MulticallUpgradeable.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {Time} from "@openzeppelin/contracts/utils/types/Time.sol"; +import {Hashes} from "@openzeppelin/contracts/utils/cryptography/Hashes.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev AccessManager is a central contract to store the permissions of a system. + * + * A smart contract under the control of an AccessManager instance is known as a target, and will inherit from the + * {AccessManaged} contract, be connected to this contract as its manager and implement the {AccessManaged-restricted} + * modifier on a set of functions selected to be permissioned. Note that any function without this setup won't be + * effectively restricted. + * + * The restriction rules for such functions are defined in terms of "roles" identified by an `uint64` and scoped + * by target (`address`) and function selectors (`bytes4`). These roles are stored in this contract and can be + * configured by admins (`ADMIN_ROLE` members) after a delay (see {getTargetAdminDelay}). + * + * For each target contract, admins can configure the following without any delay: + * + * * The target's {AccessManaged-authority} via {updateAuthority}. + * * Close or open a target via {setTargetClosed} keeping the permissions intact. + * * The roles that are allowed (or disallowed) to call a given function (identified by its selector) through {setTargetFunctionRole}. + * + * By default every address is member of the `PUBLIC_ROLE` and every target function is restricted to the `ADMIN_ROLE` until configured otherwise. + * Additionally, each role has the following configuration options restricted to this manager's admins: + * + * * A role's admin role via {setRoleAdmin} who can grant or revoke roles. + * * A role's guardian role via {setRoleGuardian} who's allowed to cancel operations. + * * A delay in which a role takes effect after being granted through {setGrantDelay}. + * * A delay of any target's admin action via {setTargetAdminDelay}. + * * A role label for discoverability purposes with {labelRole}. + * + * Any account can be added and removed into any number of these roles by using the {grantRole} and {revokeRole} functions + * restricted to each role's admin (see {getRoleAdmin}). + * + * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that + * they will be highly secured (e.g., a multisig or a well-configured DAO). + * + * NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it + * doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of + * the return data are a boolean as expected by that interface. + * + * NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an + * {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}. + * Users will be able to interact with these contracts through the {execute} function, following the access rules + * registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions + * will be {AccessManager} itself. + * + * WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very + * mindful of the danger associated with functions such as {Ownable-renounceOwnership} or + * {AccessControl-renounceRole}. + */ +contract AccessManagerUpgradeable is Initializable, ContextUpgradeable, MulticallUpgradeable, IAccessManager { + using Time for *; + + // Structure that stores the details for a target contract. + struct TargetConfig { + mapping(bytes4 selector => uint64 roleId) allowedRoles; + Time.Delay adminDelay; + bool closed; + } + + // Structure that stores the details for a role/account pair. This structure fits into a single slot. + struct Access { + // Timepoint at which the user gets the permission. + // If this is either 0 or in the future, then the role permission is not available. + uint48 since; + // Delay for execution. Only applies to restricted() / execute() calls. + Time.Delay delay; + } + + // Structure that stores the details of a role. + struct Role { + // Members of the role. + mapping(address user => Access access) members; + // Admin who can grant or revoke permissions. + uint64 admin; + // Guardian who can cancel operations targeting functions that need this role. + uint64 guardian; + // Delay in which the role takes effect after being granted. + Time.Delay grantDelay; + } + + // Structure that stores the details for a scheduled operation. This structure fits into a single slot. + struct Schedule { + // Moment at which the operation can be executed. + uint48 timepoint; + // Operation nonce to allow third-party contracts to identify the operation. + uint32 nonce; + } + + /** + * @dev The identifier of the admin role. Required to perform most configuration operations including + * other roles' management and target restrictions. + */ + uint64 public constant ADMIN_ROLE = type(uint64).min; // 0 + + /** + * @dev The identifier of the public role. Automatically granted to all addresses with no delay. + */ + uint64 public constant PUBLIC_ROLE = type(uint64).max; // 2**64-1 + + /// @custom:storage-location erc7201:openzeppelin.storage.AccessManager + struct AccessManagerStorage { + mapping(address target => TargetConfig mode) _targets; + mapping(uint64 roleId => Role) _roles; + mapping(bytes32 operationId => Schedule) _schedules; + + // Used to identify operations that are currently being executed via {execute}. + // This should be transient storage when supported by the EVM. + bytes32 _executionId; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessManager")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant AccessManagerStorageLocation = 0x40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad00; + + function _getAccessManagerStorage() private pure returns (AccessManagerStorage storage $) { + assembly { + $.slot := AccessManagerStorageLocation + } + } + + /** + * @dev Check that the caller is authorized to perform the operation. + * See {AccessManager} description for a detailed breakdown of the authorization logic. + */ + modifier onlyAuthorized() { + _checkAuthorized(); + _; + } + + function initialize(address initialAdmin) public virtual initializer { + __AccessManager_init(initialAdmin); + } + function __AccessManager_init(address initialAdmin) internal onlyInitializing { + __AccessManager_init_unchained(initialAdmin); + } + + function __AccessManager_init_unchained(address initialAdmin) internal onlyInitializing { + if (initialAdmin == address(0)) { + revert AccessManagerInvalidInitialAdmin(address(0)); + } + + // admin is active immediately and without any execution delay. + _grantRole(ADMIN_ROLE, initialAdmin, 0, 0); + } + + // =================================================== GETTERS ==================================================== + /// @inheritdoc IAccessManager + function canCall( + address caller, + address target, + bytes4 selector + ) public view virtual returns (bool immediate, uint32 delay) { + if (isTargetClosed(target)) { + return (false, 0); + } else if (caller == address(this)) { + // Caller is AccessManager, this means the call was sent through {execute} and it already checked + // permissions. We verify that the call "identifier", which is set during {execute}, is correct. + return (_isExecuting(target, selector), 0); + } else { + uint64 roleId = getTargetFunctionRole(target, selector); + (bool isMember, uint32 currentDelay) = hasRole(roleId, caller); + return isMember ? (currentDelay == 0, currentDelay) : (false, 0); + } + } + + /// @inheritdoc IAccessManager + function expiration() public view virtual returns (uint32) { + return 1 weeks; + } + + /// @inheritdoc IAccessManager + function minSetback() public view virtual returns (uint32) { + return 5 days; + } + + /// @inheritdoc IAccessManager + function isTargetClosed(address target) public view virtual returns (bool) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._targets[target].closed; + } + + /// @inheritdoc IAccessManager + function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._targets[target].allowedRoles[selector]; + } + + /// @inheritdoc IAccessManager + function getTargetAdminDelay(address target) public view virtual returns (uint32) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._targets[target].adminDelay.get(); + } + + /// @inheritdoc IAccessManager + function getRoleAdmin(uint64 roleId) public view virtual returns (uint64) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._roles[roleId].admin; + } + + /// @inheritdoc IAccessManager + function getRoleGuardian(uint64 roleId) public view virtual returns (uint64) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._roles[roleId].guardian; + } + + /// @inheritdoc IAccessManager + function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._roles[roleId].grantDelay.get(); + } + + /// @inheritdoc IAccessManager + function getAccess( + uint64 roleId, + address account + ) public view virtual returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + Access storage access = $._roles[roleId].members[account]; + + since = access.since; + (currentDelay, pendingDelay, effect) = access.delay.getFull(); + + return (since, currentDelay, pendingDelay, effect); + } + + /// @inheritdoc IAccessManager + function hasRole( + uint64 roleId, + address account + ) public view virtual returns (bool isMember, uint32 executionDelay) { + if (roleId == PUBLIC_ROLE) { + return (true, 0); + } else { + (uint48 hasRoleSince, uint32 currentDelay, , ) = getAccess(roleId, account); + return (hasRoleSince != 0 && hasRoleSince <= Time.timestamp(), currentDelay); + } + } + + // =============================================== ROLE MANAGEMENT =============================================== + /// @inheritdoc IAccessManager + function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized { + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + emit RoleLabel(roleId, label); + } + + /// @inheritdoc IAccessManager + function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized { + _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay); + } + + /// @inheritdoc IAccessManager + function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized { + _revokeRole(roleId, account); + } + + /// @inheritdoc IAccessManager + function renounceRole(uint64 roleId, address callerConfirmation) public virtual { + if (callerConfirmation != _msgSender()) { + revert AccessManagerBadConfirmation(); + } + _revokeRole(roleId, callerConfirmation); + } + + /// @inheritdoc IAccessManager + function setRoleAdmin(uint64 roleId, uint64 admin) public virtual onlyAuthorized { + _setRoleAdmin(roleId, admin); + } + + /// @inheritdoc IAccessManager + function setRoleGuardian(uint64 roleId, uint64 guardian) public virtual onlyAuthorized { + _setRoleGuardian(roleId, guardian); + } + + /// @inheritdoc IAccessManager + function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized { + _setGrantDelay(roleId, newDelay); + } + + /** + * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted. + * + * Emits a {RoleGranted} event. + */ + function _grantRole( + uint64 roleId, + address account, + uint32 grantDelay, + uint32 executionDelay + ) internal virtual returns (bool) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + bool newMember = $._roles[roleId].members[account].since == 0; + uint48 since; + + if (newMember) { + since = Time.timestamp() + grantDelay; + $._roles[roleId].members[account] = Access({since: since, delay: executionDelay.toDelay()}); + } else { + // No setback here. Value can be reset by doing revoke + grant, effectively allowing the admin to perform + // any change to the execution delay within the duration of the role admin delay. + ($._roles[roleId].members[account].delay, since) = $._roles[roleId].members[account].delay.withUpdate( + executionDelay, + 0 + ); + } + + emit RoleGranted(roleId, account, executionDelay, since, newMember); + return newMember; + } + + /** + * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}. + * Returns true if the role was previously granted. + * + * Emits a {RoleRevoked} event if the account had the role. + */ + function _revokeRole(uint64 roleId, address account) internal virtual returns (bool) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + if ($._roles[roleId].members[account].since == 0) { + return false; + } + + delete $._roles[roleId].members[account]; + + emit RoleRevoked(roleId, account); + return true; + } + + /** + * @dev Internal version of {setRoleAdmin} without access control. + * + * Emits a {RoleAdminChanged} event. + * + * NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow + * anyone to set grant or revoke such role. + */ + function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + $._roles[roleId].admin = admin; + + emit RoleAdminChanged(roleId, admin); + } + + /** + * @dev Internal version of {setRoleGuardian} without access control. + * + * Emits a {RoleGuardianChanged} event. + * + * NOTE: Setting the guardian role as the `PUBLIC_ROLE` is allowed, but it will effectively allow + * anyone to cancel any scheduled operation for such role. + */ + function _setRoleGuardian(uint64 roleId, uint64 guardian) internal virtual { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + $._roles[roleId].guardian = guardian; + + emit RoleGuardianChanged(roleId, guardian); + } + + /** + * @dev Internal version of {setGrantDelay} without access control. + * + * Emits a {RoleGrantDelayChanged} event. + */ + function _setGrantDelay(uint64 roleId, uint32 newDelay) internal virtual { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + if (roleId == PUBLIC_ROLE) { + revert AccessManagerLockedRole(roleId); + } + + uint48 effect; + ($._roles[roleId].grantDelay, effect) = $._roles[roleId].grantDelay.withUpdate(newDelay, minSetback()); + + emit RoleGrantDelayChanged(roleId, newDelay, effect); + } + + // ============================================= FUNCTION MANAGEMENT ============================================== + /// @inheritdoc IAccessManager + function setTargetFunctionRole( + address target, + bytes4[] calldata selectors, + uint64 roleId + ) public virtual onlyAuthorized { + for (uint256 i = 0; i < selectors.length; ++i) { + _setTargetFunctionRole(target, selectors[i], roleId); + } + } + + /** + * @dev Internal version of {setTargetFunctionRole} without access control. + * + * Emits a {TargetFunctionRoleUpdated} event. + */ + function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + $._targets[target].allowedRoles[selector] = roleId; + emit TargetFunctionRoleUpdated(target, selector, roleId); + } + + /// @inheritdoc IAccessManager + function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized { + _setTargetAdminDelay(target, newDelay); + } + + /** + * @dev Internal version of {setTargetAdminDelay} without access control. + * + * Emits a {TargetAdminDelayUpdated} event. + */ + function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + uint48 effect; + ($._targets[target].adminDelay, effect) = $._targets[target].adminDelay.withUpdate(newDelay, minSetback()); + + emit TargetAdminDelayUpdated(target, newDelay, effect); + } + + // =============================================== MODE MANAGEMENT ================================================ + /// @inheritdoc IAccessManager + function setTargetClosed(address target, bool closed) public virtual onlyAuthorized { + _setTargetClosed(target, closed); + } + + /** + * @dev Set the closed flag for a contract. This is an internal setter with no access restrictions. + * + * Emits a {TargetClosed} event. + */ + function _setTargetClosed(address target, bool closed) internal virtual { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + $._targets[target].closed = closed; + emit TargetClosed(target, closed); + } + + // ============================================== DELAYED OPERATIONS ============================================== + /// @inheritdoc IAccessManager + function getSchedule(bytes32 id) public view virtual returns (uint48) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + uint48 timepoint = $._schedules[id].timepoint; + return _isExpired(timepoint) ? 0 : timepoint; + } + + /// @inheritdoc IAccessManager + function getNonce(bytes32 id) public view virtual returns (uint32) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._schedules[id].nonce; + } + + /// @inheritdoc IAccessManager + function schedule( + address target, + bytes calldata data, + uint48 when + ) public virtual returns (bytes32 operationId, uint32 nonce) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + address caller = _msgSender(); + + // Fetch restrictions that apply to the caller on the targeted function + (, uint32 setback) = _canCallExtended(caller, target, data); + + uint48 minWhen = Time.timestamp() + setback; + + // If call with delay is not authorized, or if requested timing is too soon, revert + if (setback == 0 || (when > 0 && when < minWhen)) { + revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); + } + + // Reuse variable due to stack too deep + when = uint48(Math.max(when, minWhen)); // cast is safe: both inputs are uint48 + + // If caller is authorised, schedule operation + operationId = hashOperation(caller, target, data); + + _checkNotScheduled(operationId); + + unchecked { + // It's not feasible to overflow the nonce in less than 1000 years + nonce = $._schedules[operationId].nonce + 1; + } + $._schedules[operationId].timepoint = when; + $._schedules[operationId].nonce = nonce; + emit OperationScheduled(operationId, nonce, when, caller, target, data); + + // Using named return values because otherwise we get stack too deep + } + + /** + * @dev Reverts if the operation is currently scheduled and has not expired. + * + * NOTE: This function was introduced due to stack too deep errors in schedule. + */ + function _checkNotScheduled(bytes32 operationId) private view { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + uint48 prevTimepoint = $._schedules[operationId].timepoint; + if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) { + revert AccessManagerAlreadyScheduled(operationId); + } + } + + /// @inheritdoc IAccessManager + // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally, + // _consumeScheduledOp guarantees a scheduled operation is only executed once. + // slither-disable-next-line reentrancy-no-eth + function execute(address target, bytes calldata data) public payable virtual returns (uint32) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + address caller = _msgSender(); + + // Fetch restrictions that apply to the caller on the targeted function + (bool immediate, uint32 setback) = _canCallExtended(caller, target, data); + + // If call is not authorized, revert + if (!immediate && setback == 0) { + revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data)); + } + + bytes32 operationId = hashOperation(caller, target, data); + uint32 nonce; + + // If caller is authorised, check operation was scheduled early enough + // Consume an available schedule even if there is no currently enforced delay + if (setback != 0 || getSchedule(operationId) != 0) { + nonce = _consumeScheduledOp(operationId); + } + + // Mark the target and selector as authorised + bytes32 executionIdBefore = $._executionId; + $._executionId = _hashExecutionId(target, _checkSelector(data)); + + // Perform call + Address.functionCallWithValue(target, data, msg.value); + + // Reset execute identifier + $._executionId = executionIdBefore; + + return nonce; + } + + /// @inheritdoc IAccessManager + function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + address msgsender = _msgSender(); + bytes4 selector = _checkSelector(data); + + bytes32 operationId = hashOperation(caller, target, data); + if ($._schedules[operationId].timepoint == 0) { + revert AccessManagerNotScheduled(operationId); + } else if (caller != msgsender) { + // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role. + (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender); + (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender); + if (!isAdmin && !isGuardian) { + revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector); + } + } + + delete $._schedules[operationId].timepoint; // reset the timepoint, keep the nonce + uint32 nonce = $._schedules[operationId].nonce; + emit OperationCanceled(operationId, nonce); + + return nonce; + } + + /// @inheritdoc IAccessManager + function consumeScheduledOp(address caller, bytes calldata data) public virtual { + address target = _msgSender(); + if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) { + revert AccessManagerUnauthorizedConsume(target); + } + _consumeScheduledOp(hashOperation(caller, target, data)); + } + + /** + * @dev Internal variant of {consumeScheduledOp} that operates on bytes32 operationId. + * + * Returns the nonce of the scheduled operation that is consumed. + */ + function _consumeScheduledOp(bytes32 operationId) internal virtual returns (uint32) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + uint48 timepoint = $._schedules[operationId].timepoint; + uint32 nonce = $._schedules[operationId].nonce; + + if (timepoint == 0) { + revert AccessManagerNotScheduled(operationId); + } else if (timepoint > Time.timestamp()) { + revert AccessManagerNotReady(operationId); + } else if (_isExpired(timepoint)) { + revert AccessManagerExpired(operationId); + } + + delete $._schedules[operationId].timepoint; // reset the timepoint, keep the nonce + emit OperationExecuted(operationId, nonce); + + return nonce; + } + + /// @inheritdoc IAccessManager + function hashOperation(address caller, address target, bytes calldata data) public view virtual returns (bytes32) { + return keccak256(abi.encode(caller, target, data)); + } + + // ==================================================== OTHERS ==================================================== + /// @inheritdoc IAccessManager + function updateAuthority(address target, address newAuthority) public virtual onlyAuthorized { + IAccessManaged(target).setAuthority(newAuthority); + } + + // ================================================= ADMIN LOGIC ================================================== + /** + * @dev Check if the current call is authorized according to admin and roles logic. + * + * WARNING: Carefully review the considerations of {AccessManaged-restricted} since they apply to this modifier. + */ + function _checkAuthorized() private { + address caller = _msgSender(); + (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData()); + if (!immediate) { + if (delay == 0) { + (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData()); + revert AccessManagerUnauthorizedAccount(caller, requiredRole); + } else { + _consumeScheduledOp(hashOperation(caller, address(this), _msgData())); + } + } + } + + /** + * @dev Get the admin restrictions of a given function call based on the function and arguments involved. + * + * Returns: + * - bool restricted: does this data match a restricted operation + * - uint64: which role is this operation restricted to + * - uint32: minimum delay to enforce for that operation (max between operation's delay and admin's execution delay) + */ + function _getAdminRestrictions( + bytes calldata data + ) private view returns (bool adminRestricted, uint64 roleAdminId, uint32 executionDelay) { + if (data.length < 4) { + return (false, 0, 0); + } + + bytes4 selector = _checkSelector(data); + + // Restricted to ADMIN with no delay beside any execution delay the caller may have + if ( + selector == this.labelRole.selector || + selector == this.setRoleAdmin.selector || + selector == this.setRoleGuardian.selector || + selector == this.setGrantDelay.selector || + selector == this.setTargetAdminDelay.selector + ) { + return (true, ADMIN_ROLE, 0); + } + + // Restricted to ADMIN with the admin delay corresponding to the target + if ( + selector == this.updateAuthority.selector || + selector == this.setTargetClosed.selector || + selector == this.setTargetFunctionRole.selector + ) { + // First argument is a target. + address target = abi.decode(data[0x04:0x24], (address)); + uint32 delay = getTargetAdminDelay(target); + return (true, ADMIN_ROLE, delay); + } + + // Restricted to that role's admin with no delay beside any execution delay the caller may have. + if (selector == this.grantRole.selector || selector == this.revokeRole.selector) { + // First argument is a roleId. + uint64 roleId = abi.decode(data[0x04:0x24], (uint64)); + return (true, getRoleAdmin(roleId), 0); + } + + return (false, getTargetFunctionRole(address(this), selector), 0); + } + + // =================================================== HELPERS ==================================================== + /** + * @dev An extended version of {canCall} for internal usage that checks {_canCallSelf} + * when the target is this contract. + * + * Returns: + * - bool immediate: whether the operation can be executed immediately (with no delay) + * - uint32 delay: the execution delay + */ + function _canCallExtended( + address caller, + address target, + bytes calldata data + ) private view returns (bool immediate, uint32 delay) { + if (target == address(this)) { + return _canCallSelf(caller, data); + } else { + return data.length < 4 ? (false, 0) : canCall(caller, target, _checkSelector(data)); + } + } + + /** + * @dev A version of {canCall} that checks for restrictions in this contract. + */ + function _canCallSelf(address caller, bytes calldata data) private view returns (bool immediate, uint32 delay) { + if (data.length < 4) { + return (false, 0); + } + + if (caller == address(this)) { + // Caller is AccessManager, this means the call was sent through {execute} and it already checked + // permissions. We verify that the call "identifier", which is set during {execute}, is correct. + return (_isExecuting(address(this), _checkSelector(data)), 0); + } + + (bool adminRestricted, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data); + + // isTargetClosed apply to non-admin-restricted function + if (!adminRestricted && isTargetClosed(address(this))) { + return (false, 0); + } + + (bool inRole, uint32 executionDelay) = hasRole(roleId, caller); + if (!inRole) { + return (false, 0); + } + + // downcast is safe because both options are uint32 + delay = uint32(Math.max(operationDelay, executionDelay)); + return (delay == 0, delay); + } + + /** + * @dev Returns true if a call with `target` and `selector` is being executed via {executed}. + */ + function _isExecuting(address target, bytes4 selector) private view returns (bool) { + AccessManagerStorage storage $ = _getAccessManagerStorage(); + return $._executionId == _hashExecutionId(target, selector); + } + + /** + * @dev Returns true if a schedule timepoint is past its expiration deadline. + */ + function _isExpired(uint48 timepoint) private view returns (bool) { + return timepoint + expiration() <= Time.timestamp(); + } + + /** + * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes + */ + function _checkSelector(bytes calldata data) private pure returns (bytes4) { + return bytes4(data[0:4]); + } + + /** + * @dev Hashing function for execute protection + */ + function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) { + return Hashes.efficientKeccak256(bytes32(uint256(uint160(target))), selector); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579HookedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579HookedUpgradeable.sol new file mode 100644 index 00000000..6dad23dc --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579HookedUpgradeable.sol @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/extensions/draft-AccountERC7579Hooked.sol) + +pragma solidity ^0.8.26; + +import {IERC7579Hook, MODULE_TYPE_HOOK} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol"; +import {ERC7579Utils, Mode} from "@openzeppelin/contracts/account/utils/draft-ERC7579Utils.sol"; +import {AccountERC7579Upgradeable} from "./draft-AccountERC7579Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {AccountERC7579} with support for a single hook module (type 4). + * + * If installed, this extension will call the hook module's {IERC7579Hook-preCheck} before executing any operation + * with {_execute} (including {execute} and {executeFromExecutor} by default) and {IERC7579Hook-postCheck} thereafter. + * + * NOTE: Hook modules break the check-effect-interaction pattern. In particular, the {IERC7579Hook-preCheck} hook can + * lead to potentially dangerous reentrancy. Using the `withHook()` modifier is safe if no effect is performed + * before the preHook or after the postHook. That is the case on all functions here, but it may not be the case if + * functions that have this modifier are overridden. Developers should be extremely careful when implementing hook + * modules or further overriding functions that involve hooks. + */ +abstract contract AccountERC7579HookedUpgradeable is Initializable, AccountERC7579Upgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.AccountERC7579Hooked + struct AccountERC7579HookedStorage { + address _hook; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccountERC7579Hooked")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant AccountERC7579HookedStorageLocation = 0x2b49b75317ffc1021ca7da4ca3423bf8403e18b223e63e6bc7abe8f39a5ed700; + + function _getAccountERC7579HookedStorage() private pure returns (AccountERC7579HookedStorage storage $) { + assembly { + $.slot := AccountERC7579HookedStorageLocation + } + } + + /// @dev A hook module is already present. This contract only supports one hook module. + error ERC7579HookModuleAlreadyPresent(address hook); + + /** + * @dev Calls {IERC7579Hook-preCheck} before executing the modified function and {IERC7579Hook-postCheck} + * thereafter. + */ + modifier withHook() { + address hook_ = hook(); + bytes memory hookData; + + // slither-disable-next-line reentrancy-no-eth + if (hook_ != address(0)) hookData = IERC7579Hook(hook_).preCheck(msg.sender, msg.value, msg.data); + _; + if (hook_ != address(0)) IERC7579Hook(hook_).postCheck(hookData); + } + + function __AccountERC7579Hooked_init() internal onlyInitializing { + } + + function __AccountERC7579Hooked_init_unchained() internal onlyInitializing { + } + /// @inheritdoc AccountERC7579Upgradeable + function accountId() public view virtual override returns (string memory) { + // vendorname.accountname.semver + return "@openzeppelin/contracts.AccountERC7579Hooked.v1.0.0"; + } + + /// @dev Returns the hook module address if installed, or `address(0)` otherwise. + function hook() public view virtual returns (address) { + AccountERC7579HookedStorage storage $ = _getAccountERC7579HookedStorage(); + return $._hook; + } + + /// @dev Supports hook modules. See {AccountERC7579-supportsModule} + function supportsModule(uint256 moduleTypeId) public view virtual override returns (bool) { + return moduleTypeId == MODULE_TYPE_HOOK || super.supportsModule(moduleTypeId); + } + + /// @inheritdoc AccountERC7579Upgradeable + function isModuleInstalled( + uint256 moduleTypeId, + address module, + bytes calldata data + ) public view virtual override returns (bool) { + return + (moduleTypeId == MODULE_TYPE_HOOK && module == hook()) || + super.isModuleInstalled(moduleTypeId, module, data); + } + + /// @dev Installs a module with support for hook modules. See {AccountERC7579-_installModule} + function _installModule( + uint256 moduleTypeId, + address module, + bytes memory initData + ) internal virtual override withHook { + AccountERC7579HookedStorage storage $ = _getAccountERC7579HookedStorage(); + if (moduleTypeId == MODULE_TYPE_HOOK) { + require($._hook == address(0), ERC7579HookModuleAlreadyPresent($._hook)); + $._hook = module; + } + super._installModule(moduleTypeId, module, initData); + } + + /// @dev Uninstalls a module with support for hook modules. See {AccountERC7579-_uninstallModule} + function _uninstallModule( + uint256 moduleTypeId, + address module, + bytes memory deInitData + ) internal virtual override withHook { + AccountERC7579HookedStorage storage $ = _getAccountERC7579HookedStorage(); + if (moduleTypeId == MODULE_TYPE_HOOK) { + require($._hook == module, ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module)); + $._hook = address(0); + } + super._uninstallModule(moduleTypeId, module, deInitData); + } + + /// @dev Hooked version of {AccountERC7579-_execute}. + function _execute( + Mode mode, + bytes calldata executionCalldata + ) internal virtual override withHook returns (bytes[] memory) { + return super._execute(mode, executionCalldata); + } + + /// @dev Hooked version of {AccountERC7579-_fallback}. + function _fallback() internal virtual override withHook returns (bytes memory) { + return super._fallback(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579Upgradeable.sol new file mode 100644 index 00000000..151b459c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/account/extensions/draft-AccountERC7579Upgradeable.sol @@ -0,0 +1,433 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (account/extensions/draft-AccountERC7579.sol) + +pragma solidity ^0.8.26; + +import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol"; +import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol"; +import {IERC7579Module, IERC7579Validator, IERC7579Execution, IERC7579AccountConfig, IERC7579ModuleConfig, MODULE_TYPE_VALIDATOR, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK} from "@openzeppelin/contracts/interfaces/draft-IERC7579.sol"; +import {ERC7579Utils, Mode, CallType, ExecType} from "@openzeppelin/contracts/account/utils/draft-ERC7579Utils.sol"; +import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; +import {LowLevelCall} from "@openzeppelin/contracts/utils/LowLevelCall.sol"; +import {Bytes} from "@openzeppelin/contracts/utils/Bytes.sol"; +import {Packing} from "@openzeppelin/contracts/utils/Packing.sol"; +import {Calldata} from "@openzeppelin/contracts/utils/Calldata.sol"; +import {Account} from "@openzeppelin/contracts/account/Account.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Account} that implements support for ERC-7579 modules. + * + * To comply with the ERC-1271 support requirement, this contract defers signature validation to + * installed validator modules by calling {IERC7579Validator-isValidSignatureWithSender}. + * + * This contract does not implement validation logic for user operations since this functionality + * is often delegated to self-contained validation modules. Developers must install a validator module + * upon initialization (or any other mechanism to enable execution from the account): + * + * ```solidity + * contract MyAccountERC7579 is AccountERC7579, Initializable { + * function initializeAccount(address validator, bytes calldata validatorData) public initializer { + * _installModule(MODULE_TYPE_VALIDATOR, validator, validatorData); + * } + * } + * ``` + * + * [NOTE] + * ==== + * * Hook support is not included. See {AccountERC7579Hooked} for a version that hooks to execution. + * * Validator selection, when verifying either ERC-1271 signature or ERC-4337 UserOperation is implemented in + * internal virtual functions {_extractUserOpValidator} and {_extractSignatureValidator}. Both are implemented + * following common practices. However, this part is not standardized in ERC-7579 (or in any follow-up ERC). Some + * accounts may want to override these internal functions. + * * When combined with {ERC7739}, resolution ordering of {isValidSignature} may have an impact ({ERC7739} does not + * call super). Manual resolution might be necessary. + * * Static calls (using callType `0xfe`) are currently NOT supported. + * ==== + * + * WARNING: Removing all validator modules will render the account inoperable, as no user operations can be validated thereafter. + */ +abstract contract AccountERC7579Upgradeable is Initializable, Account, IERC1271, IERC7579Execution, IERC7579AccountConfig, IERC7579ModuleConfig { + using Bytes for *; + using ERC7579Utils for *; + using EnumerableSet for *; + using Packing for bytes32; + + /// @custom:storage-location erc7201:openzeppelin.storage.AccountERC7579 + struct AccountERC7579Storage { + EnumerableSet.AddressSet _validators; + EnumerableSet.AddressSet _executors; + mapping(bytes4 selector => address) _fallbacks; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccountERC7579")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant AccountERC7579StorageLocation = 0x0a47d913d72b2639f4ca1c145cc07ddf7170b73b257c8e0d4fced7cc8e3e3900; + + function _getAccountERC7579Storage() private pure returns (AccountERC7579Storage storage $) { + assembly { + $.slot := AccountERC7579StorageLocation + } + } + + /// @dev The account's {fallback} was called with a selector that doesn't have an installed handler. + error ERC7579MissingFallbackHandler(bytes4 selector); + + /// @dev The provided initData/deInitData for a fallback module is too short to extract a selector. + error ERC7579CannotDecodeFallbackData(); + + /// @dev Modifier that checks if the caller is an installed module of the given type. + modifier onlyModule(uint256 moduleTypeId, bytes calldata additionalContext) { + _checkModule(moduleTypeId, msg.sender, additionalContext); + _; + } + + function __AccountERC7579_init() internal onlyInitializing { + } + + function __AccountERC7579_init_unchained() internal onlyInitializing { + } + /// @dev See {_fallback}. + fallback(bytes calldata) external payable virtual returns (bytes memory) { + return _fallback(); + } + + /// @inheritdoc IERC7579AccountConfig + function accountId() public view virtual returns (string memory) { + // vendorname.accountname.semver + return "@openzeppelin/contracts.AccountERC7579.v1.0.0"; + } + + /** + * @inheritdoc IERC7579AccountConfig + * + * @dev Supported call types: + * * Single (`0x00`): A single transaction execution. + * * Batch (`0x01`): A batch of transactions execution. + * * Delegate (`0xff`): A delegate call execution. + * + * Supported exec types: + * * Default (`0x00`): Default execution type (revert on failure). + * * Try (`0x01`): Try execution type (emits ERC7579TryExecuteFail on failure). + */ + function supportsExecutionMode(bytes32 encodedMode) public view virtual returns (bool) { + (CallType callType, ExecType execType, , ) = Mode.wrap(encodedMode).decodeMode(); + return + (callType == ERC7579Utils.CALLTYPE_SINGLE || + callType == ERC7579Utils.CALLTYPE_BATCH || + callType == ERC7579Utils.CALLTYPE_DELEGATECALL) && + (execType == ERC7579Utils.EXECTYPE_DEFAULT || execType == ERC7579Utils.EXECTYPE_TRY); + } + + /** + * @inheritdoc IERC7579AccountConfig + * + * @dev Supported module types: + * + * * Validator: A module used during the validation phase to determine if a transaction is valid and + * should be executed on the account. + * * Executor: A module that can execute transactions on behalf of the smart account via a callback. + * * Fallback Handler: A module that can extend the fallback functionality of a smart account. + */ + function supportsModule(uint256 moduleTypeId) public view virtual returns (bool) { + return + moduleTypeId == MODULE_TYPE_VALIDATOR || + moduleTypeId == MODULE_TYPE_EXECUTOR || + moduleTypeId == MODULE_TYPE_FALLBACK; + } + + /// @inheritdoc IERC7579ModuleConfig + function installModule( + uint256 moduleTypeId, + address module, + bytes calldata initData + ) public virtual onlyEntryPointOrSelf { + _installModule(moduleTypeId, module, initData); + } + + /// @inheritdoc IERC7579ModuleConfig + function uninstallModule( + uint256 moduleTypeId, + address module, + bytes calldata deInitData + ) public virtual onlyEntryPointOrSelf { + _uninstallModule(moduleTypeId, module, deInitData); + } + + /// @inheritdoc IERC7579ModuleConfig + function isModuleInstalled( + uint256 moduleTypeId, + address module, + bytes calldata additionalContext + ) public view virtual returns (bool) { + AccountERC7579Storage storage $ = _getAccountERC7579Storage(); + if (moduleTypeId == MODULE_TYPE_VALIDATOR) return $._validators.contains(module); + if (moduleTypeId == MODULE_TYPE_EXECUTOR) return $._executors.contains(module); + if (moduleTypeId == MODULE_TYPE_FALLBACK) + // ERC-7579 requires this function to return bool, never revert. Check length to avoid out-of-bounds access. + return additionalContext.length > 3 && $._fallbacks[bytes4(additionalContext[0:4])] == module; + return false; + } + + /// @inheritdoc IERC7579Execution + function execute(bytes32 mode, bytes calldata executionCalldata) public payable virtual onlyEntryPointOrSelf { + _execute(Mode.wrap(mode), executionCalldata); + } + + /// @inheritdoc IERC7579Execution + function executeFromExecutor( + bytes32 mode, + bytes calldata executionCalldata + ) + public + payable + virtual + onlyModule(MODULE_TYPE_EXECUTOR, Calldata.emptyBytes()) + returns (bytes[] memory returnData) + { + return _execute(Mode.wrap(mode), executionCalldata); + } + + /** + * @dev Implement ERC-1271 through IERC7579Validator modules. If module based validation fails, fallback to + * "native" validation by the abstract signer. + * + * NOTE: when combined with {ERC7739}, resolution ordering may have an impact ({ERC7739} does not call super). + * Manual resolution might be necessary. + */ + function isValidSignature(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4) { + // check signature length is enough for extraction + if (signature.length >= 20) { + (address module, bytes calldata innerSignature) = _extractSignatureValidator(signature); + // if module is not installed, skip + if (isModuleInstalled(MODULE_TYPE_VALIDATOR, module, Calldata.emptyBytes())) { + // try validation, skip any revert + try IERC7579Validator(module).isValidSignatureWithSender(msg.sender, hash, innerSignature) returns ( + bytes4 magic + ) { + return magic; + } catch {} + } + } + return bytes4(0xffffffff); + } + + /** + * @dev Validates a user operation with {_signableUserOpHash} and returns the validation data + * if the module specified by the first 20 bytes of the nonce key is installed. Falls back to + * {Account-_validateUserOp} otherwise. + * + * See {_extractUserOpValidator} for the module extraction logic. + */ + function _validateUserOp( + PackedUserOperation calldata userOp, + bytes32 userOpHash, + bytes calldata signature + ) internal virtual override returns (uint256) { + address module = _extractUserOpValidator(userOp); + return + isModuleInstalled(MODULE_TYPE_VALIDATOR, module, Calldata.emptyBytes()) + ? IERC7579Validator(module).validateUserOp(userOp, _signableUserOpHash(userOp, userOpHash)) + : super._validateUserOp(userOp, userOpHash, signature); + } + + /** + * @dev ERC-7579 execution logic. See {supportsExecutionMode} for supported modes. + * + * Reverts if the call type is not supported. + */ + function _execute( + Mode mode, + bytes calldata executionCalldata + ) internal virtual returns (bytes[] memory returnData) { + (CallType callType, ExecType execType, , ) = mode.decodeMode(); + if (callType == ERC7579Utils.CALLTYPE_SINGLE) return executionCalldata.execSingle(execType); + if (callType == ERC7579Utils.CALLTYPE_BATCH) return executionCalldata.execBatch(execType); + if (callType == ERC7579Utils.CALLTYPE_DELEGATECALL) return executionCalldata.execDelegateCall(execType); + revert ERC7579Utils.ERC7579UnsupportedCallType(callType); + } + + /** + * @dev Installs a module of the given type with the given initialization data. + * + * For the fallback module type, the `initData` is expected to be the (packed) concatenation of a 4-byte + * selector and the rest of the data to be sent to the handler when calling {IERC7579Module-onInstall}. + * + * Requirements: + * + * * Module type must be supported. See {supportsModule}. Reverts with {ERC7579Utils-ERC7579UnsupportedModuleType}. + * * Module must be of the given type. Reverts with {ERC7579Utils-ERC7579MismatchedModuleTypeId}. + * * Module must not be already installed. Reverts with {ERC7579Utils-ERC7579AlreadyInstalledModule}. + * + * Emits a {IERC7579ModuleConfig-ModuleInstalled} event. + */ + function _installModule(uint256 moduleTypeId, address module, bytes memory initData) internal virtual { + AccountERC7579Storage storage $ = _getAccountERC7579Storage(); + require(supportsModule(moduleTypeId), ERC7579Utils.ERC7579UnsupportedModuleType(moduleTypeId)); + require( + IERC7579Module(module).isModuleType(moduleTypeId), + ERC7579Utils.ERC7579MismatchedModuleTypeId(moduleTypeId, module) + ); + + if (moduleTypeId == MODULE_TYPE_VALIDATOR) { + require($._validators.add(module), ERC7579Utils.ERC7579AlreadyInstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) { + require($._executors.add(module), ERC7579Utils.ERC7579AlreadyInstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_FALLBACK) { + bytes4 selector; + (selector, initData) = _decodeFallbackData(initData); + require( + $._fallbacks[selector] == address(0), + ERC7579Utils.ERC7579AlreadyInstalledModule(moduleTypeId, module) + ); + $._fallbacks[selector] = module; + } + + IERC7579Module(module).onInstall(initData); + emit ModuleInstalled(moduleTypeId, module); + } + + /** + * @dev Uninstalls a module of the given type with the given de-initialization data. + * + * For the fallback module type, the `deInitData` is expected to be the (packed) concatenation of a 4-byte + * selector and the rest of the data to be sent to the handler when calling {IERC7579Module-onUninstall}. + * + * Requirements: + * + * * Module must be already installed. Reverts with {ERC7579Utils-ERC7579UninstalledModule} otherwise. + */ + function _uninstallModule(uint256 moduleTypeId, address module, bytes memory deInitData) internal virtual { + AccountERC7579Storage storage $ = _getAccountERC7579Storage(); + require(supportsModule(moduleTypeId), ERC7579Utils.ERC7579UnsupportedModuleType(moduleTypeId)); + + if (moduleTypeId == MODULE_TYPE_VALIDATOR) { + require($._validators.remove(module), ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_EXECUTOR) { + require($._executors.remove(module), ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module)); + } else if (moduleTypeId == MODULE_TYPE_FALLBACK) { + bytes4 selector; + (selector, deInitData) = _decodeFallbackData(deInitData); + require( + _fallbackHandler(selector) == module && module != address(0), + ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module) + ); + delete $._fallbacks[selector]; + } + + // Ignores success purposely to avoid modules that revert on uninstall + LowLevelCall.callNoReturn(module, abi.encodeCall(IERC7579Module.onUninstall, (deInitData))); + emit ModuleUninstalled(moduleTypeId, module); + } + + /** + * @dev Fallback function that delegates the call to the installed handler for the given selector. + * + * Reverts with {ERC7579MissingFallbackHandler} if the handler is not installed. + * + * Calls the handler with the original `msg.sender` appended at the end of the calldata following + * the ERC-2771 format. + */ + function _fallback() internal virtual returns (bytes memory) { + address handler = _fallbackHandler(msg.sig); + require(handler != address(0), ERC7579MissingFallbackHandler(msg.sig)); + + // From https://eips.ethereum.org/EIPS/eip-7579#fallback[ERC-7579 specifications]: + // - MUST utilize ERC-2771 to add the original msg.sender to the calldata sent to the fallback handler + // - MUST use call to invoke the fallback handler + if (LowLevelCall.callNoReturn(handler, msg.value, abi.encodePacked(msg.data, msg.sender))) { + return LowLevelCall.returnData(); + } else { + LowLevelCall.bubbleRevert(); + } + } + + /// @dev Returns the fallback handler for the given selector. Returns `address(0)` if not installed. + function _fallbackHandler(bytes4 selector) internal view virtual returns (address) { + AccountERC7579Storage storage $ = _getAccountERC7579Storage(); + return $._fallbacks[selector]; + } + + /// @dev Checks if the module is installed. Reverts if the module is not installed. + function _checkModule( + uint256 moduleTypeId, + address module, + bytes calldata additionalContext + ) internal view virtual { + require( + isModuleInstalled(moduleTypeId, module, additionalContext), + ERC7579Utils.ERC7579UninstalledModule(moduleTypeId, module) + ); + } + + /** + * @dev Extracts the nonce validator from the user operation. + * + * To construct a nonce key, set nonce as follows: + * + * ``` + * | | + * ``` + * NOTE: The default behavior of this function replicates the behavior of + * https://github.com/rhinestonewtf/safe7579/blob/bb29e8b1a66658790c4169e72608e27d220f79be/src/Safe7579.sol#L266[Safe adapter], + * https://github.com/etherspot/etherspot-prime-contracts/blob/cfcdb48c4172cea0d66038324c0bae3288aa8caa/src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol#L227[Etherspot's Prime Account], and + * https://github.com/erc7579/erc7579-implementation/blob/16138d1afd4e9711f6c1425133538837bd7787b5/src/MSAAdvanced.sol#L247[ERC7579 reference implementation]. + * + * This is not standardized in ERC-7579 (or in any follow-up ERC). Some accounts may want to override these internal functions. + * + * For example, https://github.com/bcnmy/nexus/blob/54f4e19baaff96081a8843672977caf712ef19f4/contracts/lib/NonceLib.sol#L17[Biconomy's Nexus] + * uses a similar yet incompatible approach (the validator address is also part of the nonce, but not at the same location) + */ + function _extractUserOpValidator(PackedUserOperation calldata userOp) internal pure virtual returns (address) { + return address(bytes32(userOp.nonce).extract_32_20(0)); + } + + /** + * @dev Extracts the signature validator from the signature. + * + * To construct a signature, set the first 20 bytes as the module address and the remaining bytes as the + * signature data: + * + * ``` + * | + * ``` + * + * NOTE: The default behavior of this function replicates the behavior of + * https://github.com/rhinestonewtf/safe7579/blob/bb29e8b1a66658790c4169e72608e27d220f79be/src/Safe7579.sol#L350[Safe adapter], + * https://github.com/bcnmy/nexus/blob/54f4e19baaff96081a8843672977caf712ef19f4/contracts/Nexus.sol#L239[Biconomy's Nexus], + * https://github.com/etherspot/etherspot-prime-contracts/blob/cfcdb48c4172cea0d66038324c0bae3288aa8caa/src/modular-etherspot-wallet/wallet/ModularEtherspotWallet.sol#L252[Etherspot's Prime Account], and + * https://github.com/erc7579/erc7579-implementation/blob/16138d1afd4e9711f6c1425133538837bd7787b5/src/MSAAdvanced.sol#L296[ERC7579 reference implementation]. + * + * This is not standardized in ERC-7579 (or in any follow-up ERC). Some accounts may want to override these internal functions. + * + * NOTE: This function expects the signature to be at least 20 bytes long. Panics with {Panic-ARRAY_OUT_OF_BOUNDS} (0x32) otherwise. + */ + function _extractSignatureValidator( + bytes calldata signature + ) internal pure virtual returns (address module, bytes calldata innerSignature) { + return (address(bytes20(signature)), signature[20:]); + } + + /** + * @dev Extract the function selector from initData/deInitData for MODULE_TYPE_FALLBACK + * + * NOTE: If we had calldata here, we could use calldata slice which are cheaper to manipulate and don't require + * actual copy. However, this would require `_installModule` to get a calldata bytes object instead of a memory + * bytes object. This would prevent calling `_installModule` from a contract constructor and would force the use + * of external initializers. That may change in the future, as most accounts will probably be deployed as + * clones/proxy/EIP-7702 delegates and therefore rely on initializers anyway. + */ + function _decodeFallbackData( + bytes memory data + ) internal pure virtual returns (bytes4 selector, bytes memory remaining) { + require(data.length > 3, ERC7579CannotDecodeFallbackData()); + return (bytes4(data), data.slice(4)); + } + + /// @dev By default, only use the modules for validation of userOp and signature. Disable raw signatures. + function _rawSignatureValidation( + bytes32 /*hash*/, + bytes calldata /*signature*/ + ) internal view virtual override returns (bool) { + return false; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json similarity index 84% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json index 72080744..6b588bc7 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlDefaultAdminRulesUpgradeable.json @@ -1,8 +1,82 @@ { "_format": "hh-sol-artifact-1", "contractName": "AccessControlDefaultAdminRulesUpgradeable", - "sourceName": "contracts/access/AccessControlDefaultAdminRulesUpgradeable.sol", + "sourceName": "contracts/access/extensions/AccessControlDefaultAdminRulesUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + } + ], + "name": "AccessControlEnforcedDefaultAdminDelay", + "type": "error" + }, + { + "inputs": [], + "name": "AccessControlEnforcedDefaultAdminRules", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "defaultAdmin", + "type": "address" + } + ], + "name": "AccessControlInvalidDefaultAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, { "anonymous": false, "inputs": [], @@ -58,9 +132,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlEnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlEnumerableUpgradeable.json similarity index 82% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlEnumerableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlEnumerableUpgradeable.json index 3d5bd6fa..3931cbb9 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlEnumerableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlEnumerableUpgradeable.json @@ -1,16 +1,47 @@ { "_format": "hh-sol-artifact-1", "contractName": "AccessControlEnumerableUpgradeable", - "sourceName": "contracts/access/AccessControlEnumerableUpgradeable.sol", + "sourceName": "contracts/access/extensions/AccessControlEnumerableUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -166,6 +197,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMembers", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -217,7 +267,7 @@ }, { "internalType": "address", - "name": "account", + "name": "callerConfirmation", "type": "address" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlUpgradeable.json similarity index 87% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlUpgradeable.json index 5249f264..4c7cffd0 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/AccessControlUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessControlUpgradeable.json @@ -3,14 +3,45 @@ "contractName": "AccessControlUpgradeable", "sourceName": "contracts/access/AccessControlUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -174,7 +205,7 @@ }, { "internalType": "address", - "name": "account", + "name": "callerConfirmation", "type": "address" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagedUpgradeable.json similarity index 56% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagedUpgradeable.json index 1a02b6c5..a12cdc30 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ITransparentUpgradeableProxy.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagedUpgradeable.json @@ -1,82 +1,85 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ITransparentUpgradeableProxy", - "sourceName": "contracts/proxy/transparent/TransparentUpgradeableProxy.sol", + "contractName": "AccessManagedUpgradeable", + "sourceName": "contracts/access/manager/AccessManagedUpgradeable.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "authority", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "name": "AccessManagedInvalidAuthority", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "beacon", + "name": "caller", "type": "address" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" } ], - "name": "BeaconUpgraded", - "type": "event" + "name": "AccessManagedRequiredDelay", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "caller", "type": "address" } ], - "name": "Upgraded", - "type": "event" + "name": "AccessManagedUnauthorized", + "type": "error" }, { "inputs": [], - "name": "admin", - "outputs": [ + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "authority", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "AuthorityUpdated", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Initialized", + "type": "event" }, { "inputs": [], - "name": "implementation", + "name": "authority", "outputs": [ { "internalType": "address", @@ -88,34 +91,29 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "isConsumingScheduledOp", + "outputs": [ { - "internalType": "address", + "internalType": "bytes4", "name": "", - "type": "address" + "type": "bytes4" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "newAuthority", "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" } ], - "name": "upgradeToAndCall", + "name": "setAuthority", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagerUpgradeable.json new file mode 100644 index 00000000..0331cbce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccessManagerUpgradeable.json @@ -0,0 +1,1200 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccessManagerUpgradeable", + "sourceName": "contracts/access/manager/AccessManagerUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerAlreadyScheduled", + "type": "error" + }, + { + "inputs": [], + "name": "AccessManagerBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerExpired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialAdmin", + "type": "address" + } + ], + "name": "AccessManagerInvalidInitialAdmin", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "AccessManagerLockedRole", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerNotReady", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + } + ], + "name": "AccessManagerNotScheduled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgsender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "AccessManagerUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "AccessManagerUnauthorizedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgsender", + "type": "address" + }, + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "AccessManagerUnauthorizedCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AccessManagerUnauthorizedConsume", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "OperationCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "name": "OperationExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "schedule", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "OperationScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "admin", + "type": "uint64" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + } + ], + "name": "RoleGrantDelayChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + }, + { + "indexed": false, + "internalType": "bool", + "name": "newMember", + "type": "bool" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "guardian", + "type": "uint64" + } + ], + "name": "RoleGuardianChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "RoleLabel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint48", + "name": "since", + "type": "uint48" + } + ], + "name": "TargetAdminDelayUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "closed", + "type": "bool" + } + ], + "name": "TargetClosed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "TargetFunctionRoleUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PUBLIC_ROLE", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "canCall", + "outputs": [ + { + "internalType": "bool", + "name": "immediate", + "type": "bool" + }, + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "consumeScheduledOp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "expiration", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccess", + "outputs": [ + { + "internalType": "uint48", + "name": "since", + "type": "uint48" + }, + { + "internalType": "uint32", + "name": "currentDelay", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "pendingDelay", + "type": "uint32" + }, + { + "internalType": "uint48", + "name": "effect", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleGrantDelay", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "getRoleGuardian", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getSchedule", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "getTargetAdminDelay", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "getTargetFunctionRole", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32", + "name": "executionDelay", + "type": "uint32" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "isMember", + "type": "bool" + }, + { + "internalType": "uint32", + "name": "executionDelay", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialAdmin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "isTargetClosed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "labelRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "minSetback", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint48", + "name": "when", + "type": "uint48" + } + ], + "name": "schedule", + "outputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "newDelay", + "type": "uint32" + } + ], + "name": "setGrantDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "admin", + "type": "uint64" + } + ], + "name": "setRoleAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "guardian", + "type": "uint64" + } + ], + "name": "setRoleGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint32", + "name": "newDelay", + "type": "uint32" + } + ], + "name": "setTargetAdminDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bool", + "name": "closed", + "type": "bool" + } + ], + "name": "setTargetClosed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + }, + { + "internalType": "uint64", + "name": "roleId", + "type": "uint64" + } + ], + "name": "setTargetFunctionRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "address", + "name": "newAuthority", + "type": "address" + } + ], + "name": "updateAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50612b678061001c5f395ff3fe6080604052600436106101e6575f3560e01c80636d5115bd11610108578063b70096131161009d578063d1f856ee1161006d578063d1f856ee146105e9578063d22b598914610608578063d6bb62c614610627578063f801a69814610646578063fe0776f51461067f575f5ffd5b8063b70096131461055b578063b7d2b16214610596578063c4d66de8146105b5578063cc1b6c81146105d4575f5ffd5b8063a166aa89116100d8578063a166aa89146104b4578063a64d95ce146104e3578063abd9bd2a14610502578063ac9650d81461052f575f5ffd5b80636d5115bd1461044457806375b238fc14610463578063853551b81461047657806394c7d7ee14610495575f5ffd5b806330cae1871161017e5780634665096d1161014e5780634665096d146103d25780634c1da1e2146103e75780635296295214610406578063530dd45614610425575f5ffd5b806330cae187146103445780633adc277a146103635780633ca7c02a146103995780634136a33c146103b3575f5ffd5b806318ff183c116101b957806318ff183c1461029a5780631cff79cd146102b957806325c471a0146102cc5780633078f114146102eb575f5ffd5b806308d6122d146101ea5780630b0a93ba1461020b57806312be872714610247578063167bd3951461027b575b5f5ffd5b3480156101f5575f5ffd5b50610209610204366004612455565b61069e565b005b348015610216575f5ffd5b5061022a6102253660046124b7565b6106f0565b6040516001600160401b0390911681526020015b60405180910390f35b348015610252575f5ffd5b506102666102613660046124b7565b610727565b60405163ffffffff909116815260200161023e565b348015610286575f5ffd5b506102096102953660046124d0565b610771565b3480156102a5575f5ffd5b506102096102b436600461250b565b610787565b6102666102c7366004612574565b6107e9565b3480156102d7575f5ffd5b506102096102e63660046125d7565b61092a565b3480156102f6575f5ffd5b5061030a610305366004612619565b61094c565b60405161023e949392919065ffffffffffff948516815263ffffffff93841660208201529190921660408201529116606082015260800190565b34801561034f575f5ffd5b5061020961035e366004612633565b6109bf565b34801561036e575f5ffd5b5061038261037d366004612664565b6109d1565b60405165ffffffffffff909116815260200161023e565b3480156103a4575f5ffd5b5061022a6001600160401b0381565b3480156103be575f5ffd5b506102666103cd366004612664565b610a13565b3480156103dd575f5ffd5b5062093a80610266565b3480156103f2575f5ffd5b5061026661040136600461267b565b610a3e565b348015610411575f5ffd5b50610209610420366004612633565b610a78565b348015610430575f5ffd5b5061022a61043f3660046124b7565b610a8a565b34801561044f575f5ffd5b5061022a61045e3660046126ab565b610aba565b34801561046e575f5ffd5b5061022a5f81565b348015610481575f5ffd5b506102096104903660046126d7565b610b01565b3480156104a0575f5ffd5b506102096104af366004612574565b610b98565b3480156104bf575f5ffd5b506104d36104ce36600461267b565b610c42565b604051901515815260200161023e565b3480156104ee575f5ffd5b506102096104fd3660046126f2565b610c79565b34801561050d575f5ffd5b5061052161051c36600461271a565b610c8b565b60405190815260200161023e565b34801561053a575f5ffd5b5061054e61054936600461277a565b610cc3565b60405161023e91906127b8565b348015610566575f5ffd5b5061057a61057536600461283c565b610da8565b60408051921515835263ffffffff90911660208301520161023e565b3480156105a1575f5ffd5b506102096105b0366004612619565b610e29565b3480156105c0575f5ffd5b506102096105cf36600461267b565b610e40565b3480156105df575f5ffd5b5062069780610266565b3480156105f4575f5ffd5b5061057a610603366004612619565b610f36565b348015610613575f5ffd5b50610209610622366004612884565b610faf565b348015610632575f5ffd5b5061026661064136600461271a565b610fc1565b348015610651575f5ffd5b506106656106603660046128a0565b611124565b6040805192835263ffffffff90911660208301520161023e565b34801561068a575f5ffd5b50610209610699366004612619565b6112c0565b6106a66112e9565b5f5b828110156106e9576106e1858585848181106106c6576106c661290d565b90506020020160208101906106db9190612921565b84611360565b6001016106a8565b5050505050565b5f5f6106fa6113ec565b6001600160401b039384165f9081526001918201602052604090200154600160401b900490921692915050565b5f5f6107316113ec565b6001600160401b0384165f90815260018281016020526040909120015490915061076a90600160801b90046001600160701b0316611410565b9392505050565b6107796112e9565b610783828261142e565b5050565b61078f6112e9565b604051637a9e5e4b60e01b81526001600160a01b038281166004830152831690637a9e5e4b906024015f604051808303815f87803b1580156107cf575f5ffd5b505af11580156107e1573d5f5f3e3d5ffd5b505050505050565b5f5f6107f36113ec565b9050335f80610804838989896114a0565b915091508115801561081a575063ffffffff8116155b1561086d57828861082b89896114f1565b6040516381c6f24b60e01b81526001600160a01b0393841660048201529290911660248301526001600160e01b03191660448201526064015b60405180910390fd5b5f61087a848a8a8a610c8b565b90505f63ffffffff83161515806108a05750610895826109d1565b65ffffffffffff1615155b156108b1576108ae82611508565b90505b60038601546108c98b6108c48c8c6114f1565b611619565b87600301819055506109128b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525034925061163e915050565b50600390960195909555509293505050509392505050565b6109326112e9565b610946838361094086610727565b8461170a565b50505050565b5f5f5f5f5f6109596113ec565b6001600160401b0388165f90815260018201602090815260408083206001600160a01b038b1684529091529020805465ffffffffffff81169750919250906109b090600160301b90046001600160701b0316611964565b979a9199509750945050505050565b6109c76112e9565b6107838282611985565b5f5f6109db6113ec565b5f84815260028201602052604090205490915065ffffffffffff166109ff81611a35565b610a095780610a0b565b5f5b949350505050565b5f5f610a1d6113ec565b5f93845260020160205250506040902054600160301b900463ffffffff1690565b5f5f610a486113ec565b6001600160a01b0384165f9081526020829052604090206001015490915061076a906001600160701b0316611410565b610a806112e9565b6107838282611a63565b5f5f610a946113ec565b6001600160401b039384165f908152600191820160205260409020015490921692915050565b5f5f610ac46113ec565b6001600160a01b0385165f908152602091825260408082206001600160e01b03198716835290925220546001600160401b03169150505b92915050565b610b096112e9565b6001600160401b0383161580610b2757506001600160401b03838116145b15610b505760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b826001600160401b03167f1256f5b5ecb89caec12db449738f2fbcd1ba5806cf38f35413f4e5c15bf6a4508383604051610b8b929190612964565b60405180910390a2505050565b60408051638fb3603760e01b80825291513392918391638fb36037916004808201926020929091908290030181865afa158015610bd7573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bfb9190612977565b6001600160e01b03191614610c2e57604051630641fee960e31b81526001600160a01b0382166004820152602401610864565b6106e9610c3d85838686610c8b565b611508565b5f5f610c4c6113ec565b6001600160a01b039093165f9081526020939093525050604090206001015460ff600160701b9091041690565b610c816112e9565b6107838282611b21565b5f84848484604051602001610ca39493929190612992565b604051602081830303815290604052805190602001209050949350505050565b604080515f815260208101909152606090826001600160401b03811115610cec57610cec612a03565b604051908082528060200260200182016040528015610d1f57816020015b6060815260200190600190039081610d0a5790505b5091505f5b83811015610da057610d7b30868684818110610d4257610d4261290d565b9050602002810190610d549190612a17565b85604051602001610d6793929190612a59565b604051602081830303815290604052611c4b565b838281518110610d8d57610d8d61290d565b6020908102919091010152600101610d24565b505092915050565b5f5f610db384610c42565b15610dc257505f905080610e21565b306001600160a01b03861603610de657610ddc8484611ccd565b5f91509150610e21565b5f610df18585610aba565b90505f5f610dff8389610f36565b9150915081610e0f575f5f610e19565b63ffffffff811615815b945094505050505b935093915050565b610e316112e9565b610e3b8282611cf1565b505050565b5f610e49611dec565b805490915060ff600160401b82041615906001600160401b03165f81158015610e6f5750825b90505f826001600160401b03166001148015610e8a5750303b155b905081158015610e98575080155b15610eb65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610ee057845460ff60401b1916600160401b1785555b610ee986611e14565b83156107e157845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b5f8067fffffffffffffffe196001600160401b03851601610f5c5750600190505f610fa8565b5f5f610f68868661094c565b5050915091508165ffffffffffff165f14158015610f9d5750610f89611e28565b65ffffffffffff168265ffffffffffff1611155b93509150610fa89050565b9250929050565b610fb76112e9565b6107838282611e37565b5f5f610fcb6113ec565b9050335f610fd986866114f1565b90505f610fe889898989610c8b565b5f81815260028601602052604081205491925065ffffffffffff90911690036110275760405163060a299b60e41b815260048101829052602401610864565b826001600160a01b0316896001600160a01b0316146110c0575f61104b5f85610f36565b5090505f61106561105f6102258c87610aba565b86610f36565b50905081158015611074575080155b156110bd57604051630ff89d4760e21b81526001600160a01b038087166004830152808d1660248301528b1660448201526001600160e01b031985166064820152608401610864565b50505b5f818152600285016020526040808220805465ffffffffffff1916908190559051600160301b90910463ffffffff1691829184917fbd9ac67a6e2f6463b80927326310338bcbb4bdb7936ce1365ea3e01067e7b9f791a39998505050505050505050565b5f5f5f61112f6113ec565b9050335f61113f828a8a8a6114a0565b9150505f8163ffffffff16611152611e28565b61115c9190612a7c565b905063ffffffff8216158061119257505f8765ffffffffffff1611801561119257508065ffffffffffff168765ffffffffffff16105b156111a357828a61082b8b8b6114f1565b6111bd8765ffffffffffff168265ffffffffffff16611eff565b96506111cb838b8b8b610c8b565b95506111d686611f0e565b836002015f8781526020019081526020015f205f0160069054906101000a900463ffffffff16600101945086846002015f8881526020019081526020015f205f015f6101000a81548165ffffffffffff021916908365ffffffffffff16021790555084846002015f8881526020019081526020015f205f0160066101000a81548163ffffffff021916908363ffffffff1602179055508463ffffffff16867f82a2da5dee54ea8021c6545b4444620291e07ee83be6dd57edb175062715f3b489868e8e8e6040516112ab959493929190612a9a565b60405180910390a35050505094509492505050565b6001600160a01b0381163314610e3157604051635f159e6360e01b815260040160405180910390fd5b335f806112f7838236611f68565b9150915081610e3b578063ffffffff165f03611351575f611318813661202b565b5060405163f07e038f60e01b81526001600160a01b03871660048201526001600160401b03821660248201529092506044019050610864565b610946610c3d84305f36610c8b565b5f6113696113ec565b6001600160a01b0385165f818152602083815260408083206001600160e01b0319891680855290835292819020805467ffffffffffffffff19166001600160401b03891690811790915590519283529394507f9ea6790c7dadfd01c9f8b9762b3682607af2c7e79e05a9f9fdf5580dde949151910160405180910390a350505050565b7f40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad0090565b5f5f611424836001600160701b0316611964565b5090949350505050565b5f6114376113ec565b6001600160a01b0384165f81815260208390526040908190206001018054861515600160701b0260ff60701b1990911617905551919250907f90d4e7bb7e5d933792b3562e1741306f8be94837e1348dacef9b6f1df56eb13890610b8b90851515815260200190565b5f80306001600160a01b038616036114c6576114bd868585611f68565b915091506114e8565b600483106114e2576114dd868661057587876114f1565b6114bd565b505f9050805b94509492505050565b5f6114ff60048284866129dc565b61076a91612adf565b5f5f6115126113ec565b5f84815260028201602052604081205491925065ffffffffffff821691600160301b900463ffffffff16908290036115605760405163060a299b60e41b815260048101869052602401610864565b611568611e28565b65ffffffffffff168265ffffffffffff16111561159b57604051630c65b5bd60e11b815260048101869052602401610864565b6115a482611a35565b156115c557604051631e2975b960e21b815260048101869052602401610864565b5f858152600284016020526040808220805465ffffffffffff191690555163ffffffff83169187917f76a2a46953689d4861a5d3f6ed883ad7e6af674a21f8e162707159fc9dde614d9190a3949350505050565b6001600160a01b0382165f9081526001600160e01b031982166020526040812061076a565b60608147101561166a5760405163cf47918160e01b815247600482015260248101839052604401610864565b5f6116768584866121f5565b905080801561169757505f3d118061169757505f856001600160a01b03163b115b156116ac576116a461220a565b91505061076a565b80156116d657604051639996b31560e01b81526001600160a01b0386166004820152602401610864565b3d156116e9576116e4612223565b611702565b60405163d6bda27560e01b815260040160405180910390fd5b509392505050565b5f5f6117146113ec565b905067fffffffffffffffe196001600160401b038716016117535760405163061c6a4360e21b81526001600160401b0387166004820152602401610864565b6001600160401b0386165f90815260018201602090815260408083206001600160a01b038916845290915281205465ffffffffffff1615908115611847578563ffffffff166117a0611e28565b6117aa9190612a7c565b905060405180604001604052808265ffffffffffff1681526020016117d88763ffffffff1663ffffffff1690565b6001600160701b039081169091526001600160401b038a165f90815260018601602090815260408083206001600160a01b038d1684528252909120835181549490920151909216600160301b026001600160a01b031990931665ffffffffffff909116179190911790556118f5565b6001600160401b0388165f90815260018401602090815260408083206001600160a01b038b16845290915281205461189291600160301b9091046001600160701b031690879061222e565b6001600160401b038a165f90815260018601602090815260408083206001600160a01b038d168452909152902080546001600160701b03909316600160301b0273ffffffffffffffffffffffffffff000000000000199093169290921790915590505b6040805163ffffffff8716815265ffffffffffff831660208201528315158183015290516001600160a01b038916916001600160401b038b16917ff98448b987f1428e0e230e1f3c6e2ce15b5693eaf31827fbd0b1ec4b424ae7cf9181900360600190a3509695505050505050565b5f5f5f61197884611973611e28565b6122d4565b9250925092509193909250565b5f61198e6113ec565b90506001600160401b03831615806119ae57506001600160401b03838116145b156119d75760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b6001600160401b038381165f81815260018481016020526040808320909101805467ffffffffffffffff19169487169485179055517f1fd6dd7631312dfac2205b52913f99de03b4d7e381d5d27d3dbfe0713e6e63409190a3505050565b5f611a3e611e28565b65ffffffffffff16611a5362093a8084612a7c565b65ffffffffffff16111592915050565b5f611a6c6113ec565b90506001600160401b0383161580611a8c57506001600160401b03838116145b15611ab55760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b6001600160401b038381165f8181526001848101602052604080832090910180546fffffffffffffffff00000000000000001916600160401b958816958602179055517f7a8059630b897b5de4c08ade69f8b90c3ead1f8596d62d10b6c4d14a0afb4ae29190a3505050565b5f611b2a6113ec565b905067fffffffffffffffe196001600160401b03841601611b695760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b6001600160401b0383165f9081526001828101602052604082200154611ba390600160801b90046001600160701b0316846206978061222e565b6001600160401b0386165f81815260018087016020526040918290200180546001600160701b03909516600160801b026dffffffffffffffffffffffffffff60801b199095169490941790935591519092507ffeb69018ee8b8fd50ea86348f1267d07673379f72cffdeccec63853ee8ce8b4890611c3d908690859063ffffffff92909216825265ffffffffffff16602082015260400190565b60405180910390a250505050565b60605f611c588484612320565b9050808015611c7957505f3d1180611c7957505f846001600160a01b03163b115b15611c8e57611c8661220a565b915050610afb565b8015611cb857604051639996b31560e01b81526001600160a01b0385166004820152602401610864565b3d156116e957611cc6612223565b5092915050565b5f5f611cd76113ec565b9050611ce38484611619565b600390910154149392505050565b5f5f611cfb6113ec565b905067fffffffffffffffe196001600160401b03851601611d3a5760405163061c6a4360e21b81526001600160401b0385166004820152602401610864565b6001600160401b0384165f90815260018201602090815260408083206001600160a01b038716845290915281205465ffffffffffff169003611d7f575f915050610afb565b6001600160401b0384165f81815260018301602090815260408083206001600160a01b038816808552925280832080546001600160a01b0319169055519092917ff229baa593af28c41b1d16b748cd7688f0c83aaf92d4be41c44005defe84c16691a35060019392505050565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610afb565b611e1c612333565b611e258161235a565b50565b5f611e3242612397565b905090565b5f611e406113ec565b90505f611e7683620697806001600160a01b0387165f908152602086905260409020600101546001600160701b0316919061222e565b6001600160a01b0386165f818152602086815260409182902060010180546dffffffffffffffffffffffffffff19166001600160701b039690961695909517909455805163ffffffff8816815265ffffffffffff841694810194909452919350917fa56b76017453f399ec2327ba00375dbfb1fd070ff854341ad6191e6a2e2de19c9101611c3d565b5f82821882841102821861076a565b5f611f176113ec565b5f83815260028201602052604090205490915065ffffffffffff168015801590611f475750611f4581611a35565b155b15610e3b5760405163813e945960e01b815260048101849052602401610864565b5f806004831015611f7d57505f905080610e21565b306001600160a01b03861603611fa057610ddc30611f9b86866114f1565b611ccd565b5f5f5f611fad878761202b565b92509250925082158015611fc55750611fc530610c42565b15611fd8575f5f94509450505050610e21565b5f5f611fe4848b610f36565b9150915081611ffd575f5f965096505050505050610e21565b6120138363ffffffff168263ffffffff16611eff565b63ffffffff8116159b909a5098505050505050505050565b5f8080600484101561204457505f9150819050806121ee565b5f61204f86866114f1565b90506001600160e01b031981166310a6aa3760e31b148061208057506001600160e01b031981166330cae18760e01b145b8061209b57506001600160e01b0319811663294b14a960e11b145b806120b657506001600160e01b03198116635326cae760e11b145b806120d157506001600160e01b0319811663d22b598960e01b145b156120e65760015f5f935093509350506121ee565b6001600160e01b0319811663063fc60f60e21b148061211557506001600160e01b0319811663167bd39560e01b145b8061213057506001600160e01b031981166308d6122d60e01b145b1561216f575f61214460246004888a6129dc565b810190612151919061267b565b90505f61215d82610a3e565b600196505f955093506121ee92505050565b6001600160e01b0319811663012e238d60e51b148061219e57506001600160e01b03198116635be958b160e11b145b156121da575f6121b260246004888a6129dc565b8101906121bf91906124b7565b905060016121cc82610a8a565b5f94509450945050506121ee565b5f6121e53083610aba565b5f935093509350505b9250925092565b5f5f5f83516020850186885af1949350505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f5f5f612243866001600160701b0316611410565b90505f61227e8563ffffffff168763ffffffff168463ffffffff1611612269575f612273565b6122738885612b15565b63ffffffff16611eff565b90508063ffffffff1661228f611e28565b6122999190612a7c565b925063ffffffff8616602083901b67ffffffff0000000016604085901b6dffffffffffff000000000000000016171793505050935093915050565b69ffffffffffffffffffff602083901c166001600160701b03831665ffffffffffff604085901c811690841681111561230f57828282612313565b815f5f5b9250925092509250925092565b5f5f5f835160208501865af49392505050565b61233b6123cd565b61235857604051631afcd79f60e31b815260040160405180910390fd5b565b612362612333565b6001600160a01b03811661238b57604051630409d6d160e11b81525f6004820152602401610864565b6107835f825f5f61170a565b5f65ffffffffffff8211156123c9576040516306dfcc6560e41b81526030600482015260248101839052604401610864565b5090565b5f6123d6611dec565b54600160401b900460ff16919050565b6001600160a01b0381168114611e25575f5ffd5b5f5f83601f84011261240a575f5ffd5b5081356001600160401b03811115612420575f5ffd5b6020830191508360208260051b8501011115610fa8575f5ffd5b80356001600160401b0381168114612450575f5ffd5b919050565b5f5f5f5f60608587031215612468575f5ffd5b8435612473816123e6565b935060208501356001600160401b0381111561248d575f5ffd5b612499878288016123fa565b90945092506124ac90506040860161243a565b905092959194509250565b5f602082840312156124c7575f5ffd5b61076a8261243a565b5f5f604083850312156124e1575f5ffd5b82356124ec816123e6565b915060208301358015158114612500575f5ffd5b809150509250929050565b5f5f6040838503121561251c575f5ffd5b8235612527816123e6565b91506020830135612500816123e6565b5f5f83601f840112612547575f5ffd5b5081356001600160401b0381111561255d575f5ffd5b602083019150836020828501011115610fa8575f5ffd5b5f5f5f60408486031215612586575f5ffd5b8335612591816123e6565b925060208401356001600160401b038111156125ab575f5ffd5b6125b786828701612537565b9497909650939450505050565b803563ffffffff81168114612450575f5ffd5b5f5f5f606084860312156125e9575f5ffd5b6125f28461243a565b92506020840135612602816123e6565b9150612610604085016125c4565b90509250925092565b5f5f6040838503121561262a575f5ffd5b6125278361243a565b5f5f60408385031215612644575f5ffd5b61264d8361243a565b915061265b6020840161243a565b90509250929050565b5f60208284031215612674575f5ffd5b5035919050565b5f6020828403121561268b575f5ffd5b813561076a816123e6565b6001600160e01b031981168114611e25575f5ffd5b5f5f604083850312156126bc575f5ffd5b82356126c7816123e6565b9150602083013561250081612696565b5f5f5f604084860312156126e9575f5ffd5b6125918461243a565b5f5f60408385031215612703575f5ffd5b61270c8361243a565b915061265b602084016125c4565b5f5f5f5f6060858703121561272d575f5ffd5b8435612738816123e6565b93506020850135612748816123e6565b925060408501356001600160401b03811115612762575f5ffd5b61276e87828801612537565b95989497509550505050565b5f5f6020838503121561278b575f5ffd5b82356001600160401b038111156127a0575f5ffd5b6127ac858286016123fa565b90969095509350505050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561283057603f19878603018452815180518087528060208301602089015e5f602082890101526020601f19601f830116880101965050506020820191506020840193506001810190506127de565b50929695505050505050565b5f5f5f6060848603121561284e575f5ffd5b8335612859816123e6565b92506020840135612869816123e6565b9150604084013561287981612696565b809150509250925092565b5f5f60408385031215612895575f5ffd5b823561270c816123e6565b5f5f5f5f606085870312156128b3575f5ffd5b84356128be816123e6565b935060208501356001600160401b038111156128d8575f5ffd5b6128e487828801612537565b909450925050604085013565ffffffffffff81168114612902575f5ffd5b939692955090935050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612931575f5ffd5b813561076a81612696565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610a0b60208301848661293c565b5f60208284031215612987575f5ffd5b815161076a81612696565b6001600160a01b038581168252841660208201526060604082018190525f906129be908301848661293c565b9695505050505050565b634e487b7160e01b5f52601160045260245ffd5b5f5f858511156129ea575f5ffd5b838611156129f6575f5ffd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f5f8335601e19843603018112612a2c575f5ffd5b8301803591506001600160401b03821115612a45575f5ffd5b602001915036819003821315610fa8575f5ffd5b828482375f8382015f815283518060208601835e5f910190815295945050505050565b65ffffffffffff8181168382160190811115610afb57610afb6129c8565b65ffffffffffff861681526001600160a01b038581166020830152841660408201526080606082018190525f90612ad4908301848661293c565b979650505050505050565b80356001600160e01b03198116906004841015611cc6576001600160e01b031960049490940360031b84901b1690921692915050565b63ffffffff8281168282160390811115610afb57610afb6129c856fea2646970667358221220fde1ebeea8ce6b578e82debb1ffb00e13086a10f0cf61739f7931b7e4d52c92864736f6c634300081f0033", + "deployedBytecode": "0x6080604052600436106101e6575f3560e01c80636d5115bd11610108578063b70096131161009d578063d1f856ee1161006d578063d1f856ee146105e9578063d22b598914610608578063d6bb62c614610627578063f801a69814610646578063fe0776f51461067f575f5ffd5b8063b70096131461055b578063b7d2b16214610596578063c4d66de8146105b5578063cc1b6c81146105d4575f5ffd5b8063a166aa89116100d8578063a166aa89146104b4578063a64d95ce146104e3578063abd9bd2a14610502578063ac9650d81461052f575f5ffd5b80636d5115bd1461044457806375b238fc14610463578063853551b81461047657806394c7d7ee14610495575f5ffd5b806330cae1871161017e5780634665096d1161014e5780634665096d146103d25780634c1da1e2146103e75780635296295214610406578063530dd45614610425575f5ffd5b806330cae187146103445780633adc277a146103635780633ca7c02a146103995780634136a33c146103b3575f5ffd5b806318ff183c116101b957806318ff183c1461029a5780631cff79cd146102b957806325c471a0146102cc5780633078f114146102eb575f5ffd5b806308d6122d146101ea5780630b0a93ba1461020b57806312be872714610247578063167bd3951461027b575b5f5ffd5b3480156101f5575f5ffd5b50610209610204366004612455565b61069e565b005b348015610216575f5ffd5b5061022a6102253660046124b7565b6106f0565b6040516001600160401b0390911681526020015b60405180910390f35b348015610252575f5ffd5b506102666102613660046124b7565b610727565b60405163ffffffff909116815260200161023e565b348015610286575f5ffd5b506102096102953660046124d0565b610771565b3480156102a5575f5ffd5b506102096102b436600461250b565b610787565b6102666102c7366004612574565b6107e9565b3480156102d7575f5ffd5b506102096102e63660046125d7565b61092a565b3480156102f6575f5ffd5b5061030a610305366004612619565b61094c565b60405161023e949392919065ffffffffffff948516815263ffffffff93841660208201529190921660408201529116606082015260800190565b34801561034f575f5ffd5b5061020961035e366004612633565b6109bf565b34801561036e575f5ffd5b5061038261037d366004612664565b6109d1565b60405165ffffffffffff909116815260200161023e565b3480156103a4575f5ffd5b5061022a6001600160401b0381565b3480156103be575f5ffd5b506102666103cd366004612664565b610a13565b3480156103dd575f5ffd5b5062093a80610266565b3480156103f2575f5ffd5b5061026661040136600461267b565b610a3e565b348015610411575f5ffd5b50610209610420366004612633565b610a78565b348015610430575f5ffd5b5061022a61043f3660046124b7565b610a8a565b34801561044f575f5ffd5b5061022a61045e3660046126ab565b610aba565b34801561046e575f5ffd5b5061022a5f81565b348015610481575f5ffd5b506102096104903660046126d7565b610b01565b3480156104a0575f5ffd5b506102096104af366004612574565b610b98565b3480156104bf575f5ffd5b506104d36104ce36600461267b565b610c42565b604051901515815260200161023e565b3480156104ee575f5ffd5b506102096104fd3660046126f2565b610c79565b34801561050d575f5ffd5b5061052161051c36600461271a565b610c8b565b60405190815260200161023e565b34801561053a575f5ffd5b5061054e61054936600461277a565b610cc3565b60405161023e91906127b8565b348015610566575f5ffd5b5061057a61057536600461283c565b610da8565b60408051921515835263ffffffff90911660208301520161023e565b3480156105a1575f5ffd5b506102096105b0366004612619565b610e29565b3480156105c0575f5ffd5b506102096105cf36600461267b565b610e40565b3480156105df575f5ffd5b5062069780610266565b3480156105f4575f5ffd5b5061057a610603366004612619565b610f36565b348015610613575f5ffd5b50610209610622366004612884565b610faf565b348015610632575f5ffd5b5061026661064136600461271a565b610fc1565b348015610651575f5ffd5b506106656106603660046128a0565b611124565b6040805192835263ffffffff90911660208301520161023e565b34801561068a575f5ffd5b50610209610699366004612619565b6112c0565b6106a66112e9565b5f5b828110156106e9576106e1858585848181106106c6576106c661290d565b90506020020160208101906106db9190612921565b84611360565b6001016106a8565b5050505050565b5f5f6106fa6113ec565b6001600160401b039384165f9081526001918201602052604090200154600160401b900490921692915050565b5f5f6107316113ec565b6001600160401b0384165f90815260018281016020526040909120015490915061076a90600160801b90046001600160701b0316611410565b9392505050565b6107796112e9565b610783828261142e565b5050565b61078f6112e9565b604051637a9e5e4b60e01b81526001600160a01b038281166004830152831690637a9e5e4b906024015f604051808303815f87803b1580156107cf575f5ffd5b505af11580156107e1573d5f5f3e3d5ffd5b505050505050565b5f5f6107f36113ec565b9050335f80610804838989896114a0565b915091508115801561081a575063ffffffff8116155b1561086d57828861082b89896114f1565b6040516381c6f24b60e01b81526001600160a01b0393841660048201529290911660248301526001600160e01b03191660448201526064015b60405180910390fd5b5f61087a848a8a8a610c8b565b90505f63ffffffff83161515806108a05750610895826109d1565b65ffffffffffff1615155b156108b1576108ae82611508565b90505b60038601546108c98b6108c48c8c6114f1565b611619565b87600301819055506109128b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525034925061163e915050565b50600390960195909555509293505050509392505050565b6109326112e9565b610946838361094086610727565b8461170a565b50505050565b5f5f5f5f5f6109596113ec565b6001600160401b0388165f90815260018201602090815260408083206001600160a01b038b1684529091529020805465ffffffffffff81169750919250906109b090600160301b90046001600160701b0316611964565b979a9199509750945050505050565b6109c76112e9565b6107838282611985565b5f5f6109db6113ec565b5f84815260028201602052604090205490915065ffffffffffff166109ff81611a35565b610a095780610a0b565b5f5b949350505050565b5f5f610a1d6113ec565b5f93845260020160205250506040902054600160301b900463ffffffff1690565b5f5f610a486113ec565b6001600160a01b0384165f9081526020829052604090206001015490915061076a906001600160701b0316611410565b610a806112e9565b6107838282611a63565b5f5f610a946113ec565b6001600160401b039384165f908152600191820160205260409020015490921692915050565b5f5f610ac46113ec565b6001600160a01b0385165f908152602091825260408082206001600160e01b03198716835290925220546001600160401b03169150505b92915050565b610b096112e9565b6001600160401b0383161580610b2757506001600160401b03838116145b15610b505760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b826001600160401b03167f1256f5b5ecb89caec12db449738f2fbcd1ba5806cf38f35413f4e5c15bf6a4508383604051610b8b929190612964565b60405180910390a2505050565b60408051638fb3603760e01b80825291513392918391638fb36037916004808201926020929091908290030181865afa158015610bd7573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bfb9190612977565b6001600160e01b03191614610c2e57604051630641fee960e31b81526001600160a01b0382166004820152602401610864565b6106e9610c3d85838686610c8b565b611508565b5f5f610c4c6113ec565b6001600160a01b039093165f9081526020939093525050604090206001015460ff600160701b9091041690565b610c816112e9565b6107838282611b21565b5f84848484604051602001610ca39493929190612992565b604051602081830303815290604052805190602001209050949350505050565b604080515f815260208101909152606090826001600160401b03811115610cec57610cec612a03565b604051908082528060200260200182016040528015610d1f57816020015b6060815260200190600190039081610d0a5790505b5091505f5b83811015610da057610d7b30868684818110610d4257610d4261290d565b9050602002810190610d549190612a17565b85604051602001610d6793929190612a59565b604051602081830303815290604052611c4b565b838281518110610d8d57610d8d61290d565b6020908102919091010152600101610d24565b505092915050565b5f5f610db384610c42565b15610dc257505f905080610e21565b306001600160a01b03861603610de657610ddc8484611ccd565b5f91509150610e21565b5f610df18585610aba565b90505f5f610dff8389610f36565b9150915081610e0f575f5f610e19565b63ffffffff811615815b945094505050505b935093915050565b610e316112e9565b610e3b8282611cf1565b505050565b5f610e49611dec565b805490915060ff600160401b82041615906001600160401b03165f81158015610e6f5750825b90505f826001600160401b03166001148015610e8a5750303b155b905081158015610e98575080155b15610eb65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610ee057845460ff60401b1916600160401b1785555b610ee986611e14565b83156107e157845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b5f8067fffffffffffffffe196001600160401b03851601610f5c5750600190505f610fa8565b5f5f610f68868661094c565b5050915091508165ffffffffffff165f14158015610f9d5750610f89611e28565b65ffffffffffff168265ffffffffffff1611155b93509150610fa89050565b9250929050565b610fb76112e9565b6107838282611e37565b5f5f610fcb6113ec565b9050335f610fd986866114f1565b90505f610fe889898989610c8b565b5f81815260028601602052604081205491925065ffffffffffff90911690036110275760405163060a299b60e41b815260048101829052602401610864565b826001600160a01b0316896001600160a01b0316146110c0575f61104b5f85610f36565b5090505f61106561105f6102258c87610aba565b86610f36565b50905081158015611074575080155b156110bd57604051630ff89d4760e21b81526001600160a01b038087166004830152808d1660248301528b1660448201526001600160e01b031985166064820152608401610864565b50505b5f818152600285016020526040808220805465ffffffffffff1916908190559051600160301b90910463ffffffff1691829184917fbd9ac67a6e2f6463b80927326310338bcbb4bdb7936ce1365ea3e01067e7b9f791a39998505050505050505050565b5f5f5f61112f6113ec565b9050335f61113f828a8a8a6114a0565b9150505f8163ffffffff16611152611e28565b61115c9190612a7c565b905063ffffffff8216158061119257505f8765ffffffffffff1611801561119257508065ffffffffffff168765ffffffffffff16105b156111a357828a61082b8b8b6114f1565b6111bd8765ffffffffffff168265ffffffffffff16611eff565b96506111cb838b8b8b610c8b565b95506111d686611f0e565b836002015f8781526020019081526020015f205f0160069054906101000a900463ffffffff16600101945086846002015f8881526020019081526020015f205f015f6101000a81548165ffffffffffff021916908365ffffffffffff16021790555084846002015f8881526020019081526020015f205f0160066101000a81548163ffffffff021916908363ffffffff1602179055508463ffffffff16867f82a2da5dee54ea8021c6545b4444620291e07ee83be6dd57edb175062715f3b489868e8e8e6040516112ab959493929190612a9a565b60405180910390a35050505094509492505050565b6001600160a01b0381163314610e3157604051635f159e6360e01b815260040160405180910390fd5b335f806112f7838236611f68565b9150915081610e3b578063ffffffff165f03611351575f611318813661202b565b5060405163f07e038f60e01b81526001600160a01b03871660048201526001600160401b03821660248201529092506044019050610864565b610946610c3d84305f36610c8b565b5f6113696113ec565b6001600160a01b0385165f818152602083815260408083206001600160e01b0319891680855290835292819020805467ffffffffffffffff19166001600160401b03891690811790915590519283529394507f9ea6790c7dadfd01c9f8b9762b3682607af2c7e79e05a9f9fdf5580dde949151910160405180910390a350505050565b7f40c6c8c28789853c7efd823ab20824bbd71718a8a5915e855f6f288c9a26ad0090565b5f5f611424836001600160701b0316611964565b5090949350505050565b5f6114376113ec565b6001600160a01b0384165f81815260208390526040908190206001018054861515600160701b0260ff60701b1990911617905551919250907f90d4e7bb7e5d933792b3562e1741306f8be94837e1348dacef9b6f1df56eb13890610b8b90851515815260200190565b5f80306001600160a01b038616036114c6576114bd868585611f68565b915091506114e8565b600483106114e2576114dd868661057587876114f1565b6114bd565b505f9050805b94509492505050565b5f6114ff60048284866129dc565b61076a91612adf565b5f5f6115126113ec565b5f84815260028201602052604081205491925065ffffffffffff821691600160301b900463ffffffff16908290036115605760405163060a299b60e41b815260048101869052602401610864565b611568611e28565b65ffffffffffff168265ffffffffffff16111561159b57604051630c65b5bd60e11b815260048101869052602401610864565b6115a482611a35565b156115c557604051631e2975b960e21b815260048101869052602401610864565b5f858152600284016020526040808220805465ffffffffffff191690555163ffffffff83169187917f76a2a46953689d4861a5d3f6ed883ad7e6af674a21f8e162707159fc9dde614d9190a3949350505050565b6001600160a01b0382165f9081526001600160e01b031982166020526040812061076a565b60608147101561166a5760405163cf47918160e01b815247600482015260248101839052604401610864565b5f6116768584866121f5565b905080801561169757505f3d118061169757505f856001600160a01b03163b115b156116ac576116a461220a565b91505061076a565b80156116d657604051639996b31560e01b81526001600160a01b0386166004820152602401610864565b3d156116e9576116e4612223565b611702565b60405163d6bda27560e01b815260040160405180910390fd5b509392505050565b5f5f6117146113ec565b905067fffffffffffffffe196001600160401b038716016117535760405163061c6a4360e21b81526001600160401b0387166004820152602401610864565b6001600160401b0386165f90815260018201602090815260408083206001600160a01b038916845290915281205465ffffffffffff1615908115611847578563ffffffff166117a0611e28565b6117aa9190612a7c565b905060405180604001604052808265ffffffffffff1681526020016117d88763ffffffff1663ffffffff1690565b6001600160701b039081169091526001600160401b038a165f90815260018601602090815260408083206001600160a01b038d1684528252909120835181549490920151909216600160301b026001600160a01b031990931665ffffffffffff909116179190911790556118f5565b6001600160401b0388165f90815260018401602090815260408083206001600160a01b038b16845290915281205461189291600160301b9091046001600160701b031690879061222e565b6001600160401b038a165f90815260018601602090815260408083206001600160a01b038d168452909152902080546001600160701b03909316600160301b0273ffffffffffffffffffffffffffff000000000000199093169290921790915590505b6040805163ffffffff8716815265ffffffffffff831660208201528315158183015290516001600160a01b038916916001600160401b038b16917ff98448b987f1428e0e230e1f3c6e2ce15b5693eaf31827fbd0b1ec4b424ae7cf9181900360600190a3509695505050505050565b5f5f5f61197884611973611e28565b6122d4565b9250925092509193909250565b5f61198e6113ec565b90506001600160401b03831615806119ae57506001600160401b03838116145b156119d75760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b6001600160401b038381165f81815260018481016020526040808320909101805467ffffffffffffffff19169487169485179055517f1fd6dd7631312dfac2205b52913f99de03b4d7e381d5d27d3dbfe0713e6e63409190a3505050565b5f611a3e611e28565b65ffffffffffff16611a5362093a8084612a7c565b65ffffffffffff16111592915050565b5f611a6c6113ec565b90506001600160401b0383161580611a8c57506001600160401b03838116145b15611ab55760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b6001600160401b038381165f8181526001848101602052604080832090910180546fffffffffffffffff00000000000000001916600160401b958816958602179055517f7a8059630b897b5de4c08ade69f8b90c3ead1f8596d62d10b6c4d14a0afb4ae29190a3505050565b5f611b2a6113ec565b905067fffffffffffffffe196001600160401b03841601611b695760405163061c6a4360e21b81526001600160401b0384166004820152602401610864565b6001600160401b0383165f9081526001828101602052604082200154611ba390600160801b90046001600160701b0316846206978061222e565b6001600160401b0386165f81815260018087016020526040918290200180546001600160701b03909516600160801b026dffffffffffffffffffffffffffff60801b199095169490941790935591519092507ffeb69018ee8b8fd50ea86348f1267d07673379f72cffdeccec63853ee8ce8b4890611c3d908690859063ffffffff92909216825265ffffffffffff16602082015260400190565b60405180910390a250505050565b60605f611c588484612320565b9050808015611c7957505f3d1180611c7957505f846001600160a01b03163b115b15611c8e57611c8661220a565b915050610afb565b8015611cb857604051639996b31560e01b81526001600160a01b0385166004820152602401610864565b3d156116e957611cc6612223565b5092915050565b5f5f611cd76113ec565b9050611ce38484611619565b600390910154149392505050565b5f5f611cfb6113ec565b905067fffffffffffffffe196001600160401b03851601611d3a5760405163061c6a4360e21b81526001600160401b0385166004820152602401610864565b6001600160401b0384165f90815260018201602090815260408083206001600160a01b038716845290915281205465ffffffffffff169003611d7f575f915050610afb565b6001600160401b0384165f81815260018301602090815260408083206001600160a01b038816808552925280832080546001600160a01b0319169055519092917ff229baa593af28c41b1d16b748cd7688f0c83aaf92d4be41c44005defe84c16691a35060019392505050565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00610afb565b611e1c612333565b611e258161235a565b50565b5f611e3242612397565b905090565b5f611e406113ec565b90505f611e7683620697806001600160a01b0387165f908152602086905260409020600101546001600160701b0316919061222e565b6001600160a01b0386165f818152602086815260409182902060010180546dffffffffffffffffffffffffffff19166001600160701b039690961695909517909455805163ffffffff8816815265ffffffffffff841694810194909452919350917fa56b76017453f399ec2327ba00375dbfb1fd070ff854341ad6191e6a2e2de19c9101611c3d565b5f82821882841102821861076a565b5f611f176113ec565b5f83815260028201602052604090205490915065ffffffffffff168015801590611f475750611f4581611a35565b155b15610e3b5760405163813e945960e01b815260048101849052602401610864565b5f806004831015611f7d57505f905080610e21565b306001600160a01b03861603611fa057610ddc30611f9b86866114f1565b611ccd565b5f5f5f611fad878761202b565b92509250925082158015611fc55750611fc530610c42565b15611fd8575f5f94509450505050610e21565b5f5f611fe4848b610f36565b9150915081611ffd575f5f965096505050505050610e21565b6120138363ffffffff168263ffffffff16611eff565b63ffffffff8116159b909a5098505050505050505050565b5f8080600484101561204457505f9150819050806121ee565b5f61204f86866114f1565b90506001600160e01b031981166310a6aa3760e31b148061208057506001600160e01b031981166330cae18760e01b145b8061209b57506001600160e01b0319811663294b14a960e11b145b806120b657506001600160e01b03198116635326cae760e11b145b806120d157506001600160e01b0319811663d22b598960e01b145b156120e65760015f5f935093509350506121ee565b6001600160e01b0319811663063fc60f60e21b148061211557506001600160e01b0319811663167bd39560e01b145b8061213057506001600160e01b031981166308d6122d60e01b145b1561216f575f61214460246004888a6129dc565b810190612151919061267b565b90505f61215d82610a3e565b600196505f955093506121ee92505050565b6001600160e01b0319811663012e238d60e51b148061219e57506001600160e01b03198116635be958b160e11b145b156121da575f6121b260246004888a6129dc565b8101906121bf91906124b7565b905060016121cc82610a8a565b5f94509450945050506121ee565b5f6121e53083610aba565b5f935093509350505b9250925092565b5f5f5f83516020850186885af1949350505050565b6040513d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f5f5f612243866001600160701b0316611410565b90505f61227e8563ffffffff168763ffffffff168463ffffffff1611612269575f612273565b6122738885612b15565b63ffffffff16611eff565b90508063ffffffff1661228f611e28565b6122999190612a7c565b925063ffffffff8616602083901b67ffffffff0000000016604085901b6dffffffffffff000000000000000016171793505050935093915050565b69ffffffffffffffffffff602083901c166001600160701b03831665ffffffffffff604085901c811690841681111561230f57828282612313565b815f5f5b9250925092509250925092565b5f5f5f835160208501865af49392505050565b61233b6123cd565b61235857604051631afcd79f60e31b815260040160405180910390fd5b565b612362612333565b6001600160a01b03811661238b57604051630409d6d160e11b81525f6004820152602401610864565b6107835f825f5f61170a565b5f65ffffffffffff8211156123c9576040516306dfcc6560e41b81526030600482015260248101839052604401610864565b5090565b5f6123d6611dec565b54600160401b900460ff16919050565b6001600160a01b0381168114611e25575f5ffd5b5f5f83601f84011261240a575f5ffd5b5081356001600160401b03811115612420575f5ffd5b6020830191508360208260051b8501011115610fa8575f5ffd5b80356001600160401b0381168114612450575f5ffd5b919050565b5f5f5f5f60608587031215612468575f5ffd5b8435612473816123e6565b935060208501356001600160401b0381111561248d575f5ffd5b612499878288016123fa565b90945092506124ac90506040860161243a565b905092959194509250565b5f602082840312156124c7575f5ffd5b61076a8261243a565b5f5f604083850312156124e1575f5ffd5b82356124ec816123e6565b915060208301358015158114612500575f5ffd5b809150509250929050565b5f5f6040838503121561251c575f5ffd5b8235612527816123e6565b91506020830135612500816123e6565b5f5f83601f840112612547575f5ffd5b5081356001600160401b0381111561255d575f5ffd5b602083019150836020828501011115610fa8575f5ffd5b5f5f5f60408486031215612586575f5ffd5b8335612591816123e6565b925060208401356001600160401b038111156125ab575f5ffd5b6125b786828701612537565b9497909650939450505050565b803563ffffffff81168114612450575f5ffd5b5f5f5f606084860312156125e9575f5ffd5b6125f28461243a565b92506020840135612602816123e6565b9150612610604085016125c4565b90509250925092565b5f5f6040838503121561262a575f5ffd5b6125278361243a565b5f5f60408385031215612644575f5ffd5b61264d8361243a565b915061265b6020840161243a565b90509250929050565b5f60208284031215612674575f5ffd5b5035919050565b5f6020828403121561268b575f5ffd5b813561076a816123e6565b6001600160e01b031981168114611e25575f5ffd5b5f5f604083850312156126bc575f5ffd5b82356126c7816123e6565b9150602083013561250081612696565b5f5f5f604084860312156126e9575f5ffd5b6125918461243a565b5f5f60408385031215612703575f5ffd5b61270c8361243a565b915061265b602084016125c4565b5f5f5f5f6060858703121561272d575f5ffd5b8435612738816123e6565b93506020850135612748816123e6565b925060408501356001600160401b03811115612762575f5ffd5b61276e87828801612537565b95989497509550505050565b5f5f6020838503121561278b575f5ffd5b82356001600160401b038111156127a0575f5ffd5b6127ac858286016123fa565b90969095509350505050565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b8281101561283057603f19878603018452815180518087528060208301602089015e5f602082890101526020601f19601f830116880101965050506020820191506020840193506001810190506127de565b50929695505050505050565b5f5f5f6060848603121561284e575f5ffd5b8335612859816123e6565b92506020840135612869816123e6565b9150604084013561287981612696565b809150509250925092565b5f5f60408385031215612895575f5ffd5b823561270c816123e6565b5f5f5f5f606085870312156128b3575f5ffd5b84356128be816123e6565b935060208501356001600160401b038111156128d8575f5ffd5b6128e487828801612537565b909450925050604085013565ffffffffffff81168114612902575f5ffd5b939692955090935050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215612931575f5ffd5b813561076a81612696565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f610a0b60208301848661293c565b5f60208284031215612987575f5ffd5b815161076a81612696565b6001600160a01b038581168252841660208201526060604082018190525f906129be908301848661293c565b9695505050505050565b634e487b7160e01b5f52601160045260245ffd5b5f5f858511156129ea575f5ffd5b838611156129f6575f5ffd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f5f8335601e19843603018112612a2c575f5ffd5b8301803591506001600160401b03821115612a45575f5ffd5b602001915036819003821315610fa8575f5ffd5b828482375f8382015f815283518060208601835e5f910190815295945050505050565b65ffffffffffff8181168382160190811115610afb57610afb6129c8565b65ffffffffffff861681526001600160a01b038581166020830152841660408201526080606082018190525f90612ad4908301848661293c565b979650505050505050565b80356001600160e01b03198116906004841015611cc6576001600160e01b031960049490940360031b84901b1690921692915050565b63ffffffff8281168282160390811115610afb57610afb6129c856fea2646970667358221220fde1ebeea8ce6b578e82debb1ffb00e13086a10f0cf61739f7931b7e4d52c92864736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579HookedUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579HookedUpgradeable.json new file mode 100644 index 00000000..0e9cf398 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579HookedUpgradeable.json @@ -0,0 +1,559 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccountERC7579HookedUpgradeable", + "sourceName": "contracts/account/extensions/draft-AccountERC7579HookedUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "AccountUnauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579AlreadyInstalledModule", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579CannotDecodeFallbackData", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579DecodingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "hook", + "type": "address" + } + ], + "name": "ERC7579HookModuleAlreadyPresent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579MismatchedModuleTypeId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "ERC7579MissingFallbackHandler", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579UninstalledModule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "CallType", + "name": "callType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedCallType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ExecType", + "name": "execType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedExecType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "ERC7579UnsupportedModuleType", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfRangeAccess", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "batchExecutionIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "ERC7579TryExecuteFail", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleInstalled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleUninstalled", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "accountId", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "entryPoint", + "outputs": [ + { + "internalType": "contract IEntryPoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "executeFromExecutor", + "outputs": [ + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hook", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "isModuleInstalled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "encodedMode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "supportsModule", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "deInitData", + "type": "bytes" + } + ], + "name": "uninstallModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579Upgradeable.json new file mode 100644 index 00000000..683f93bf --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/AccountERC7579Upgradeable.json @@ -0,0 +1,535 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "AccountERC7579Upgradeable", + "sourceName": "contracts/account/extensions/draft-AccountERC7579Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "AccountUnauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579AlreadyInstalledModule", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579CannotDecodeFallbackData", + "type": "error" + }, + { + "inputs": [], + "name": "ERC7579DecodingError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579MismatchedModuleTypeId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "ERC7579MissingFallbackHandler", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ERC7579UninstalledModule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "CallType", + "name": "callType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedCallType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "ExecType", + "name": "execType", + "type": "bytes1" + } + ], + "name": "ERC7579UnsupportedExecType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "ERC7579UnsupportedModuleType", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [], + "name": "OutOfRangeAccess", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "batchExecutionIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "ERC7579TryExecuteFail", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleInstalled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "ModuleUninstalled", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "accountId", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "entryPoint", + "outputs": [ + { + "internalType": "contract IEntryPoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "mode", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } + ], + "name": "executeFromExecutor", + "outputs": [ + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "additionalContext", + "type": "bytes" + } + ], + "name": "isModuleInstalled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "encodedMode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + } + ], + "name": "supportsModule", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "deInitData", + "type": "bytes" + } + ], + "name": "uninstallModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC20Upgradeable.json new file mode 100644 index 00000000..13608fa5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC20Upgradeable.json @@ -0,0 +1,275 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BridgeERC20Upgradeable", + "sourceName": "contracts/crosschain/bridges/BridgeERC20Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "from", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "name": "LinkRegistered", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "crosschainTransfer", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "getLink", + "outputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC7802Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC7802Upgradeable.json new file mode 100644 index 00000000..fbc89a67 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeERC7802Upgradeable.json @@ -0,0 +1,264 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BridgeERC7802Upgradeable", + "sourceName": "contracts/crosschain/bridges/BridgeERC7802Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "from", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "name": "LinkRegistered", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "crosschainTransfer", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "getLink", + "outputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC7802", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeFungibleUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeFungibleUpgradeable.json new file mode 100644 index 00000000..e25af394 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/BridgeFungibleUpgradeable.json @@ -0,0 +1,251 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "BridgeFungibleUpgradeable", + "sourceName": "contracts/crosschain/bridges/abstract/BridgeFungibleUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "from", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "name": "LinkRegistered", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "crosschainTransfer", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "getLink", + "outputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ContextUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ContextUpgradeable.json similarity index 64% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ContextUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ContextUpgradeable.json index 01657c10..5ece81a1 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ContextUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ContextUpgradeable.json @@ -3,14 +3,24 @@ "contractName": "ContextUpgradeable", "sourceName": "contracts/utils/ContextUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/CrosschainLinkedUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/CrosschainLinkedUpgradeable.json new file mode 100644 index 00000000..d2b164d6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/CrosschainLinkedUpgradeable.json @@ -0,0 +1,165 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "CrosschainLinkedUpgradeable", + "sourceName": "contracts/crosschain/CrosschainLinkedUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + } + ], + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "name": "LinkRegistered", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "getLink", + "outputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "receiveMessage", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EIP712Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/EIP712Upgradeable.json similarity index 86% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EIP712Upgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/EIP712Upgradeable.json index ab9fe936..a55bc70e 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/EIP712Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/EIP712Upgradeable.json @@ -3,6 +3,16 @@ "contractName": "EIP712Upgradeable", "sourceName": "contracts/utils/cryptography/EIP712Upgradeable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [], @@ -14,9 +24,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155BurnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155BurnableUpgradeable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155BurnableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155BurnableUpgradeable.json index 72d16849..97a860f6 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155BurnableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155BurnableUpgradeable.json @@ -3,6 +3,118 @@ "contractName": "ERC1155BurnableUpgradeable", "sourceName": "contracts/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -33,9 +145,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -271,7 +383,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -304,7 +416,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155PausableUpgradeable.json similarity index 75% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PausableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155PausableUpgradeable.json index 46398baf..f35f2958 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155PausableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155PausableUpgradeable.json @@ -3,6 +3,128 @@ "contractName": "ERC1155PausableUpgradeable", "sourceName": "contracts/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -33,9 +155,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -264,7 +386,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -297,7 +419,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155SupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155SupplyUpgradeable.json new file mode 100644 index 00000000..092002b0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155SupplyUpgradeable.json @@ -0,0 +1,499 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC1155SupplyUpgradeable", + "sourceName": "contracts/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "exists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155URIStorageUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155URIStorageUpgradeable.json similarity index 74% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155URIStorageUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155URIStorageUpgradeable.json index 64ea2640..fd7ec177 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC1155URIStorageUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155URIStorageUpgradeable.json @@ -3,6 +3,118 @@ "contractName": "ERC1155URIStorageUpgradeable", "sourceName": "contracts/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -33,9 +145,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -225,7 +337,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -258,7 +370,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155Upgradeable.json similarity index 71% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155Upgradeable.json index c6e73da9..aa58e056 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC1155MetadataURIUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1155Upgradeable.json @@ -1,8 +1,120 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC1155MetadataURIUpgradeable", - "sourceName": "contracts/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol", + "contractName": "ERC1155Upgradeable", + "sourceName": "contracts/token/ERC1155/ERC1155Upgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -28,6 +140,19 @@ "name": "ApprovalForAll", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -212,7 +337,7 @@ }, { "internalType": "uint256[]", - "name": "amounts", + "name": "values", "type": "uint256[]" }, { @@ -245,7 +370,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" }, { @@ -300,7 +425,7 @@ "inputs": [ { "internalType": "uint256", - "name": "id", + "name": "", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1363Upgradeable.json similarity index 68% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1363Upgradeable.json index 21ad0870..41d9bf2f 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC4626Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC1363Upgradeable.json @@ -1,294 +1,260 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC4626Upgradeable", - "sourceName": "contracts/interfaces/IERC4626Upgradeable.sol", + "contractName": "ERC1363Upgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC1363Upgradeable.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { - "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "ERC1363ApproveFailed", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", + "name": "receiver", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" } ], - "name": "Deposit", - "type": "event" + "name": "ERC1363InvalidReceiver", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "from", + "name": "spender", "type": "address" - }, + } + ], + "name": "ERC1363InvalidSpender", + "type": "error" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "to", + "name": "receiver", "type": "address" }, { - "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "ERC1363TransferFailed", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { - "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "shares", + "name": "value", "type": "uint256" } ], - "name": "Withdraw", - "type": "event" + "name": "ERC1363TransferFromFailed", + "type": "error" }, { "inputs": [ { "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" }, { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, { "internalType": "uint256", - "name": "", + "name": "needed", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "ERC20InsufficientAllowance", + "type": "error" }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "sender", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "balance", "type": "uint256" - } - ], - "name": "approve", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "needed", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "ERC20InsufficientBalance", + "type": "error" }, { - "inputs": [], - "name": "asset", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "assetTokenAddress", + "name": "approver", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "ERC20InvalidApprover", + "type": "error" }, { "inputs": [ { "internalType": "address", - "name": "account", + "name": "receiver", "type": "address" } ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "ERC20InvalidReceiver", + "type": "error" }, { "inputs": [ { - "internalType": "uint256", - "name": "shares", - "type": "uint256" + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "convertToAssets", - "outputs": [ + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "assets", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "convertToShares", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "shares", + "name": "value", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Approval", + "type": "event" }, { - "inputs": [], - "name": "decimals", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" } ], - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "assets", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "receiver", + "name": "to", "type": "address" - } - ], - "name": "deposit", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "shares", + "name": "value", "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", "type": "address" } ], - "name": "maxDeposit", + "name": "allowance", "outputs": [ { "internalType": "uint256", - "name": "maxAssets", + "name": "", "type": "uint256" } ], @@ -299,110 +265,119 @@ "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "maxMint", + "name": "approve", "outputs": [ { - "internalType": "uint256", - "name": "maxShares", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "maxRedeem", + "name": "approveAndCall", "outputs": [ { - "internalType": "uint256", - "name": "maxShares", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "maxWithdraw", + "name": "approveAndCall", "outputs": [ { - "internalType": "uint256", - "name": "maxAssets", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, { "internalType": "address", - "name": "receiver", + "name": "account", "type": "address" } ], - "name": "mint", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", - "name": "assets", + "name": "", "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "name", + "name": "decimals", "outputs": [ { - "internalType": "string", + "internalType": "uint8", "name": "", - "type": "string" + "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "previewDeposit", + "inputs": [], + "name": "name", "outputs": [ { - "internalType": "uint256", - "name": "shares", - "type": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], "stateMutability": "view", @@ -411,35 +386,42 @@ { "inputs": [ { - "internalType": "uint256", - "name": "shares", - "type": "uint256" + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" } ], - "name": "previewMint", + "name": "supportsInterface", "outputs": [ { - "internalType": "uint256", - "name": "assets", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "symbol", + "outputs": [ { - "internalType": "uint256", - "name": "shares", - "type": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "previewRedeem", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", "outputs": [ { "internalType": "uint256", - "name": "assets", + "name": "", "type": "uint256" } ], @@ -448,93 +430,88 @@ }, { "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, { "internalType": "uint256", - "name": "assets", + "name": "value", "type": "uint256" } ], - "name": "previewWithdraw", + "name": "transfer", "outputs": [ { - "internalType": "uint256", - "name": "shares", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, { "internalType": "address", - "name": "receiver", + "name": "to", "type": "address" }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "redeem", - "outputs": [ { "internalType": "uint256", - "name": "assets", + "name": "value", "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", + "name": "transferAndCall", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "totalAssets", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, { "internalType": "uint256", - "name": "totalManagedAssets", + "name": "value", "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", + "name": "transferAndCall", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, { "internalType": "address", "name": "to", @@ -542,11 +519,11 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], - "name": "transfer", + "name": "transferFrom", "outputs": [ { "internalType": "bool", @@ -571,11 +548,16 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "transferFrom", + "name": "transferFromAndCall", "outputs": [ { "internalType": "bool", @@ -588,28 +570,28 @@ }, { "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - }, { "internalType": "address", - "name": "receiver", + "name": "from", "type": "address" }, { "internalType": "address", - "name": "owner", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "withdraw", + "name": "transferFromAndCall", "outputs": [ { - "internalType": "uint256", - "name": "shares", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC165Upgradeable.json similarity index 77% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165Upgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC165Upgradeable.json index 61d191dc..35861083 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC165Upgradeable.json @@ -3,14 +3,24 @@ "contractName": "ERC165Upgradeable", "sourceName": "contracts/utils/introspection/ERC165Upgradeable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20BridgeableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20BridgeableUpgradeable.json new file mode 100644 index 00000000..bdcfe54f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20BridgeableUpgradeable.json @@ -0,0 +1,447 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20BridgeableUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "CrosschainBurn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "CrosschainMint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "crosschainBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "crosschainMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20BurnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20BurnableUpgradeable.json similarity index 79% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20BurnableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20BurnableUpgradeable.json index 46f9eeb8..50dbcd71 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20BurnableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20BurnableUpgradeable.json @@ -3,6 +3,102 @@ "contractName": "ERC20BurnableUpgradeable", "sourceName": "contracts/token/ERC20/extensions/ERC20BurnableUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -33,9 +129,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -99,7 +195,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -137,7 +233,7 @@ "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -155,7 +251,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -177,54 +273,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -273,7 +321,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -302,7 +350,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CappedUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CappedUpgradeable.json new file mode 100644 index 00000000..3563c3ce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CappedUpgradeable.json @@ -0,0 +1,382 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20CappedUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20CappedUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "increasedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "ERC20ExceededCap", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "ERC20InvalidCap", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CrosschainUpgradeable.json similarity index 65% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CrosschainUpgradeable.json index 33e5e9c9..c8352238 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/IBridge.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20CrosschainUpgradeable.json @@ -1,38 +1,162 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IBridge", - "sourceName": "contracts/vendor/arbitrum/IBridge.sol", + "contractName": "ERC20CrosschainUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20CrosschainUpgradeable.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "outbox", + "name": "spender", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "to", + "name": "sender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "balance", "type": "uint256" }, { - "indexed": false, + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "gateway", + "type": "address" + }, + { "internalType": "bytes", - "name": "data", + "name": "sender", "type": "bytes" } ], - "name": "BridgeCallTriggered", - "type": "event" + "name": "ERC7786RecipientUnauthorizedGateway", + "type": "error" + }, + { + "inputs": [], + "name": "InteroperableAddressEmptyReferenceAndAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "InteroperableAddressParsingError", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "chain", + "type": "bytes" + } + ], + "name": "LinkAlreadyRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" }, { "anonymous": false, @@ -40,152 +164,163 @@ { "indexed": true, "internalType": "address", - "name": "inbox", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "enabled", - "type": "bool" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "InboxToggle", + "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "messageIndex", - "type": "uint256" - }, { "indexed": true, "internalType": "bytes32", - "name": "beforeInboxAcc", + "name": "receiveId", "type": "bytes32" }, { "indexed": false, + "internalType": "bytes", + "name": "from", + "type": "bytes" + }, + { + "indexed": true, "internalType": "address", - "name": "inbox", + "name": "to", "type": "address" }, { "indexed": false, - "internalType": "uint8", - "name": "kind", - "type": "uint8" + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CrosschainFungibleTransferReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "sendId", + "type": "bytes32" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "sender", + "name": "from", "type": "address" }, { "indexed": false, - "internalType": "bytes32", - "name": "messageDataHash", - "type": "bytes32" + "internalType": "bytes", + "name": "to", + "type": "bytes" }, { "indexed": false, "internalType": "uint256", - "name": "baseFeeL1", + "name": "amount", "type": "uint256" - }, + } + ], + "name": "CrosschainFungibleTransferSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": false, "internalType": "uint64", - "name": "timestamp", + "name": "version", "type": "uint64" } ], - "name": "MessageDelivered", + "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "outbox", + "name": "gateway", "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "enabled", - "type": "bool" + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], - "name": "OutboxToggle", + "name": "LinkRegistered", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newSequencerInbox", + "name": "from", "type": "address" - } - ], - "name": "SequencerInboxUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "activeOutbox", - "outputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "to", "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "name": "allowedDelayedInboxList", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { "inputs": [ { "internalType": "address", - "name": "inbox", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", "type": "address" } ], - "name": "allowedDelayedInboxes", + "name": "allowance", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -193,18 +328,23 @@ }, { "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "name": "allowedOutboxList", + "name": "approve", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "nonpayable", @@ -214,16 +354,16 @@ "inputs": [ { "internalType": "address", - "name": "outbox", + "name": "account", "type": "address" } ], - "name": "allowedOutboxes", + "name": "balanceOf", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -231,13 +371,18 @@ }, { "inputs": [ + { + "internalType": "bytes", + "name": "to", + "type": "bytes" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "name": "delayedInboxAccs", + "name": "crosschainTransfer", "outputs": [ { "internalType": "bytes32", @@ -245,94 +390,32 @@ "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delayedMessageCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "uint8", - "name": "kind", - "type": "uint8" - }, { "internalType": "address", - "name": "sender", + "name": "from", "type": "address" }, { - "internalType": "bytes32", - "name": "messageDataHash", - "type": "bytes32" - } - ], - "name": "enqueueDelayedMessage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "dataHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "afterDelayedMessagesRead", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "prevMessageCount", - "type": "uint256" + "internalType": "bytes", + "name": "to", + "type": "bytes" }, { "internalType": "uint256", - "name": "newMessageCount", + "name": "amount", "type": "uint256" } ], - "name": "enqueueSequencerMessage", + "name": "crosschainTransferFrom", "outputs": [ - { - "internalType": "uint256", - "name": "seqMessageIndex", - "type": "uint256" - }, { "internalType": "bytes32", - "name": "beforeAcc", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "delayedAcc", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "acc", + "name": "", "type": "bytes32" } ], @@ -340,60 +423,37 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "executeCall", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "returnData", - "type": "bytes" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "rollup_", - "type": "address" + "internalType": "bytes", + "name": "chain", + "type": "bytes" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rollup", + "name": "getLink", "outputs": [ { "internalType": "address", - "name": "", + "name": "gateway", "type": "address" + }, + { + "internalType": "bytes", + "name": "counterpart", + "type": "bytes" } ], "stateMutability": "view", @@ -401,12 +461,12 @@ }, { "inputs": [], - "name": "sequencerInbox", + "name": "name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", @@ -415,30 +475,40 @@ { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes32", + "name": "receiveId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sender", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" } ], - "name": "sequencerInboxAccs", + "name": "receiveMessage", "outputs": [ { - "internalType": "bytes32", + "internalType": "bytes4", "name": "", - "type": "bytes32" + "type": "bytes4" } ], - "stateMutability": "view", + "stateMutability": "payable", "type": "function" }, { "inputs": [], - "name": "sequencerMessageCount", + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "stateMutability": "view", @@ -446,7 +516,7 @@ }, { "inputs": [], - "name": "sequencerReportedSubMessageCount", + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -461,35 +531,23 @@ "inputs": [ { "internalType": "address", - "name": "inbox", + "name": "to", "type": "address" }, { - "internalType": "bool", - "name": "enabled", - "type": "bool" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "setDelayedInbox", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "inbox", - "type": "address" - }, + "name": "transfer", + "outputs": [ { "internalType": "bool", - "name": "enabled", + "name": "", "type": "bool" } ], - "name": "setOutbox", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -497,34 +555,26 @@ "inputs": [ { "internalType": "address", - "name": "_sequencerInbox", + "name": "from", "type": "address" - } - ], - "name": "setSequencerInbox", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "address", - "name": "batchPoster", + "name": "to", "type": "address" }, { - "internalType": "bytes32", - "name": "dataHash", - "type": "bytes32" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "submitBatchSpendingReport", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", - "name": "msgNum", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20FlashMintUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20FlashMintUpgradeable.json new file mode 100644 index 00000000..0d5bdb0a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20FlashMintUpgradeable.json @@ -0,0 +1,452 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20FlashMintUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxLoan", + "type": "uint256" + } + ], + "name": "ERC3156ExceededMaxLoan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC3156InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "ERC3156UnsupportedToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "flashFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC3156FlashBorrower", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flashLoan", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "maxFlashLoan", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20PausableUpgradeable.json similarity index 78% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PausableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20PausableUpgradeable.json index 67d2f746..1d3c1a02 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20PausableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20PausableUpgradeable.json @@ -3,6 +3,112 @@ "contractName": "ERC20PausableUpgradeable", "sourceName": "contracts/token/ERC20/extensions/ERC20PausableUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -33,9 +139,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -125,7 +231,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -172,54 +278,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -281,7 +339,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -310,7 +368,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20PermitUpgradeable.json similarity index 62% rename from dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20PermitUpgradeable.json index e45cebab..ffde74e1 100644 --- a/dependencies/@openzeppelin-contracts-4.9.6/build/contracts/ERC20VotesComp.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20PermitUpgradeable.json @@ -1,97 +1,197 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC20VotesComp", - "sourceName": "contracts/token/ERC20/extensions/ERC20VotesComp.sol", + "contractName": "ERC20PermitUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/ERC20PermitUpgradeable.sol", "abi": [ { "inputs": [], - "name": "InvalidShortString", + "name": "ECDSAInvalidSignature", "type": "error" }, { "inputs": [ { - "internalType": "string", - "name": "str", - "type": "string" + "internalType": "uint256", + "name": "length", + "type": "uint256" } ], - "name": "StringTooLong", + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "spender", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "spender", + "name": "sender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "ERC20InsufficientBalance", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "delegator", + "name": "approver", "type": "address" - }, + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "fromDelegate", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "ERC2612ExpiredSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "toDelegate", + "name": "owner", "type": "address" } ], - "name": "DelegateChanged", - "type": "event" + "name": "ERC2612InvalidSigner", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "delegate", + "name": "account", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "currentNonce", "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "value", "type": "uint256" } ], - "name": "DelegateVotesChanged", + "name": "Approval", "type": "event" }, { @@ -100,6 +200,19 @@ "name": "EIP712DomainChanged", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -125,19 +238,6 @@ "name": "Transfer", "type": "event" }, - { - "inputs": [], - "name": "CLOCK_MODE", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "DOMAIN_SEPARATOR", @@ -184,7 +284,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -218,55 +318,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint32", - "name": "pos", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint224", - "name": "votes", - "type": "uint224" - } - ], - "internalType": "struct ERC20Votes.Checkpoint", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "clock", - "outputs": [ - { - "internalType": "uint48", - "name": "", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "decimals", @@ -280,100 +331,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "eip712Domain", @@ -417,135 +374,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastTotalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "getPastVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -578,25 +406,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -675,7 +484,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -704,7 +513,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20TemporaryApprovalUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20TemporaryApprovalUpgradeable.json new file mode 100644 index 00000000..b309b485 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20TemporaryApprovalUpgradeable.json @@ -0,0 +1,366 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20TemporaryApprovalUpgradeable", + "sourceName": "contracts/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "temporaryApprove", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20Upgradeable.json new file mode 100644 index 00000000..cef448da --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20Upgradeable.json @@ -0,0 +1,342 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC20Upgradeable", + "sourceName": "contracts/token/ERC20/ERC20Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20VotesUpgradeable.json similarity index 78% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20VotesUpgradeable.json index 41efd62d..68d4819b 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20VotesUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20VotesUpgradeable.json @@ -3,6 +3,214 @@ "contractName": "ERC20VotesUpgradeable", "sourceName": "contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "increasedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "ERC20ExceededSafeSupply", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "clock", + "type": "uint48" + } + ], + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -65,13 +273,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], @@ -89,9 +297,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -135,19 +343,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -181,7 +376,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -233,17 +428,17 @@ { "components": [ { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" + "internalType": "uint48", + "name": "_key", + "type": "uint48" }, { - "internalType": "uint224", - "name": "votes", - "type": "uint224" + "internalType": "uint208", + "name": "_value", + "type": "uint208" } ], - "internalType": "struct ERC20VotesUpgradeable.Checkpoint", + "internalType": "struct Checkpoints.Checkpoint208", "name": "", "type": "tuple" } @@ -277,30 +472,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -476,30 +647,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -551,49 +698,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "symbol", @@ -629,7 +733,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -658,7 +762,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20WrapperUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20WrapperUpgradeable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20WrapperUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20WrapperUpgradeable.json index 955e473d..c94c3085 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC20WrapperUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC20WrapperUpgradeable.json @@ -3,6 +3,124 @@ "contractName": "ERC20WrapperUpgradeable", "sourceName": "contracts/token/ERC20/extensions/ERC20WrapperUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "ERC20InvalidUnderlying", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -33,9 +151,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -99,7 +217,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -146,30 +264,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -179,7 +273,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -194,30 +288,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "name", @@ -266,7 +336,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -295,7 +365,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -315,7 +385,7 @@ "name": "underlying", "outputs": [ { - "internalType": "contract IERC20Upgradeable", + "internalType": "contract IERC20", "name": "", "type": "address" } @@ -332,7 +402,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2771ContextUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2771ContextUpgradeable.json similarity index 62% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2771ContextUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2771ContextUpgradeable.json index 7a9c6c86..3eacb2de 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC2771ContextUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2771ContextUpgradeable.json @@ -3,14 +3,24 @@ "contractName": "ERC2771ContextUpgradeable", "sourceName": "contracts/metatx/ERC2771ContextUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -34,6 +44,19 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2771ForwarderUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2771ForwarderUpgradeable.json new file mode 100644 index 00000000..eba6d81d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2771ForwarderUpgradeable.json @@ -0,0 +1,397 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2771ForwarderUpgradeable", + "sourceName": "contracts/metatx/ERC2771ForwarderUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + } + ], + "name": "ERC2771ForwarderExpiredRequest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + } + ], + "name": "ERC2771ForwarderInvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "msgValue", + "type": "uint256" + } + ], + "name": "ERC2771ForwarderMismatchedValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "ERC2771UntrustfulTarget", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "signer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "name": "ExecutedForwardRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct ERC2771ForwarderUpgradeable.ForwardRequestData", + "name": "request", + "type": "tuple" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct ERC2771ForwarderUpgradeable.ForwardRequestData[]", + "name": "requests", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "refundReceiver", + "type": "address" + } + ], + "name": "executeBatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "deadline", + "type": "uint48" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct ERC2771ForwarderUpgradeable.ForwardRequestData", + "name": "request", + "type": "tuple" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b5061121e8061001c5f395ff3fe608060405260043610610054575f3560e01c806319d8d38c146100585780637ecebe001461008c57806384b0196e146100ed578063ccf96b4a14610114578063df905caf14610129578063f62d18881461013c575b5f5ffd5b348015610063575f5ffd5b50610077610072366004610d07565b61015b565b60405190151581526020015b60405180910390f35b348015610097575f5ffd5b506100df6100a6366004610d59565b6001600160a01b03165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00602052604090205490565b604051908152602001610083565b3480156100f8575f5ffd5b5061010161018b565b6040516100839796959493929190610da2565b610127610122366004610e38565b6101cd565b005b610127610137366004610d07565b6102d2565b348015610147575f5ffd5b50610127610156366004610ece565b61032d565b5f5f5f5f61016885610425565b509250925092508280156101795750815b80156101825750805b95945050505050565b5f6060805f5f5f606061019c6104a7565b6101a461057a565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6001600160a01b038116155f80805b8581101561028b578686828181106101f6576101f6610f81565b90506020028101906102089190610f95565b610216906040013584610fb3565b92505f61024688888481811061022e5761022e610f81565b90506020028101906102409190610f95565b866105cb565b9050806102825787878381811061025f5761025f610f81565b90506020028101906102719190610f95565b61027f906040013584610fb3565b92505b506001016101dc565b503482146102ba576040516370647f7960e01b8152600481018390523460248201526044015b60405180910390fd5b80156102ca576102ca84826107c5565b505050505050565b8060400135341461030257604080516370647f7960e01b81529082013560048201523460248201526044016102b1565b61030d8160016105cb565b61032a5760405163d6bda27560e01b815260040160405180910390fd5b50565b5f61033661083c565b805490915060ff600160401b820416159067ffffffffffffffff165f8115801561035d5750825b90505f8267ffffffffffffffff1660011480156103795750303b155b905081158015610387575080155b156103a55760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156103cf57845460ff60401b1916600160401b1785555b6103d886610866565b83156102ca57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b5f5f5f5f5f5f61043487610891565b909250905061045161044c6040890160208a01610d59565b6109d3565b4261046260a08a0160808b01610fd2565b65ffffffffffff161015838015610496575061048160208a018a610d59565b6001600160a01b0316836001600160a01b0316145b919750955093509150509193509193565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100916104f890610ff7565b80601f016020809104026020016040519081016040528092919081815260200182805461052490610ff7565b801561056f5780601f106105465761010080835404028352916020019161056f565b820191905f5260205f20905b81548152906001019060200180831161055257829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100916104f890610ff7565b5f5f5f5f5f6105d987610425565b9350935093509350851561069f5783610627576105fc6040880160208901610d59565b60405163d2650cd160e01b81526001600160a01b0390911660048201523060248201526044016102b1565b826106605761063c60a0880160808901610fd2565b604051634a777ac560e11b815265ffffffffffff90911660048201526024016102b1565b8161069f57806106736020890189610d59565b604051636422d02b60e11b81526001600160a01b039283166004820152911660248201526044016102b1565b8380156106a95750815b80156106b25750825b156107bb576001600160a01b0381165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0060205260408120805460018101909155905060608801355f61070e60408b0160208c01610d59565b905060408a01355f61072360a08d018d61102f565b61073060208f018f610d59565b60405160200161074293929190611079565b60405160208183030381529060405290505f5f5f83516020850186888af19a505a905061076f818e610a4c565b604080518781528c151560208201526001600160a01b038916917f842fb24a83793558587a3dab2be7674da4a51d09c5542d6dd354e5d0ea70813c910160405180910390a25050505050505b5050505092915050565b804710156107ef5760405163cf47918160e01b8152476004820152602481018290526044016102b1565b610808828260405180602001604052805f815250610a64565b15610811575050565b3d156108235761081f610a79565b5050565b60405163d6bda27560e01b815260040160405180910390fd5b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005b92915050565b61086e610a84565b61032a81604051806040016040528060018152602001603160f81b815250610aab565b5f8080806109ae6108a560c087018761102f565b6109a77f7f96328b83274ebc7c1cf4f7a3abda602b51a78b7fa1d86a2ce353d75e587cac6108d660208b018b610d59565b6108e660408c0160208d01610d59565b8b604001358c606001356109058e5f0160208101906100a69190610d59565b8e60800160208101906109189190610fd2565b8f8060a00190610928919061102f565b60405161093692919061109f565b6040805191829003822060208301999099526001600160a01b0397881690820152959094166060860152608085019290925260a084015260c083015265ffffffffffff1660e08201526101008101919091526101200160405160208183030381529060405280519060200120610b14565b9190610b40565b5090925090505f8160038111156109c7576109c76110ae565b14959194509092505050565b6040513060248201525f90819060440160408051601f19818403018152919052602080820180516001600160e01b031663572b6c0560e01b17815282519293505f928392839290918391895afa92503d91505f519050828015610a37575060208210155b8015610a4257505f81115b9695505050505050565b610a5b603f60608301356110c2565b82101561081f57fe5b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b610a8c610b87565b610aa957604051631afcd79f60e31b815260040160405180910390fd5b565b610ab3610a84565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102610aff848261112d565b5060038101610b0e838261112d565b50505050565b5f610860610b20610ba0565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80806041849003610b74578435602086013560408701355f1a610b6689828585610bae565b955095509550505050610b7e565b505f915060029050825b93509350939050565b5f610b9061083c565b54600160401b900460ff16919050565b5f610ba9610c76565b905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610be757505f91506003905082610c6c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610c38573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610c6357505f925060019150829050610c6c565b92505f91508190505b9450945094915050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f610ca0610ce9565b610ca8610cfe565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f610cf26104a7565b80519060200120905090565b5f610cf261057a565b5f60208284031215610d17575f5ffd5b813567ffffffffffffffff811115610d2d575f5ffd5b820160e08185031215610d3e575f5ffd5b9392505050565b6001600160a01b038116811461032a575f5ffd5b5f60208284031215610d69575f5ffd5b8135610d3e81610d45565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f610dc060e0830189610d74565b8281036040840152610dd28189610d74565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015610e27578351835260209384019390920191600101610e09565b50909b9a5050505050505050505050565b5f5f5f60408486031215610e4a575f5ffd5b833567ffffffffffffffff811115610e60575f5ffd5b8401601f81018613610e70575f5ffd5b803567ffffffffffffffff811115610e86575f5ffd5b8660208260051b8401011115610e9a575f5ffd5b602091820194509250840135610eaf81610d45565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b5f60208284031215610ede575f5ffd5b813567ffffffffffffffff811115610ef4575f5ffd5b8201601f81018413610f04575f5ffd5b803567ffffffffffffffff811115610f1e57610f1e610eba565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610f4d57610f4d610eba565b604052818152828201602001861015610f64575f5ffd5b816020840160208301375f91810160200191909152949350505050565b634e487b7160e01b5f52603260045260245ffd5b5f823560de19833603018112610fa9575f5ffd5b9190910192915050565b8082018082111561086057634e487b7160e01b5f52601160045260245ffd5b5f60208284031215610fe2575f5ffd5b813565ffffffffffff81168114610d3e575f5ffd5b600181811c9082168061100b57607f821691505b60208210810361102957634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f8335601e19843603018112611044575f5ffd5b83018035915067ffffffffffffffff82111561105e575f5ffd5b602001915036819003821315611072575f5ffd5b9250929050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b818382375f9101908152919050565b634e487b7160e01b5f52602160045260245ffd5b5f826110dc57634e487b7160e01b5f52601260045260245ffd5b500490565b601f82111561112857805f5260205f20601f840160051c810160208510156111065750805b601f840160051c820191505b81811015611125575f8155600101611112565b50505b505050565b815167ffffffffffffffff81111561114757611147610eba565b61115b816111558454610ff7565b846110e1565b6020601f82116001811461118d575f83156111765750848201515b5f19600385901b1c1916600184901b178455611125565b5f84815260208120601f198516915b828110156111bc578785015182556020948501946001909201910161119c565b50848210156111d957868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fea2646970667358221220e1b2c7ce0a9d7e438b68454649bf002accd6e259585218dc9edfa5341f78042664736f6c634300081f0033", + "deployedBytecode": "0x608060405260043610610054575f3560e01c806319d8d38c146100585780637ecebe001461008c57806384b0196e146100ed578063ccf96b4a14610114578063df905caf14610129578063f62d18881461013c575b5f5ffd5b348015610063575f5ffd5b50610077610072366004610d07565b61015b565b60405190151581526020015b60405180910390f35b348015610097575f5ffd5b506100df6100a6366004610d59565b6001600160a01b03165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00602052604090205490565b604051908152602001610083565b3480156100f8575f5ffd5b5061010161018b565b6040516100839796959493929190610da2565b610127610122366004610e38565b6101cd565b005b610127610137366004610d07565b6102d2565b348015610147575f5ffd5b50610127610156366004610ece565b61032d565b5f5f5f5f61016885610425565b509250925092508280156101795750815b80156101825750805b95945050505050565b5f6060805f5f5f606061019c6104a7565b6101a461057a565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6001600160a01b038116155f80805b8581101561028b578686828181106101f6576101f6610f81565b90506020028101906102089190610f95565b610216906040013584610fb3565b92505f61024688888481811061022e5761022e610f81565b90506020028101906102409190610f95565b866105cb565b9050806102825787878381811061025f5761025f610f81565b90506020028101906102719190610f95565b61027f906040013584610fb3565b92505b506001016101dc565b503482146102ba576040516370647f7960e01b8152600481018390523460248201526044015b60405180910390fd5b80156102ca576102ca84826107c5565b505050505050565b8060400135341461030257604080516370647f7960e01b81529082013560048201523460248201526044016102b1565b61030d8160016105cb565b61032a5760405163d6bda27560e01b815260040160405180910390fd5b50565b5f61033661083c565b805490915060ff600160401b820416159067ffffffffffffffff165f8115801561035d5750825b90505f8267ffffffffffffffff1660011480156103795750303b155b905081158015610387575080155b156103a55760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156103cf57845460ff60401b1916600160401b1785555b6103d886610866565b83156102ca57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050565b5f5f5f5f5f5f61043487610891565b909250905061045161044c6040890160208a01610d59565b6109d3565b4261046260a08a0160808b01610fd2565b65ffffffffffff161015838015610496575061048160208a018a610d59565b6001600160a01b0316836001600160a01b0316145b919750955093509150509193509193565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10280546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100916104f890610ff7565b80601f016020809104026020016040519081016040528092919081815260200182805461052490610ff7565b801561056f5780601f106105465761010080835404028352916020019161056f565b820191905f5260205f20905b81548152906001019060200180831161055257829003601f168201915b505050505091505090565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d10380546060917fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100916104f890610ff7565b5f5f5f5f5f6105d987610425565b9350935093509350851561069f5783610627576105fc6040880160208901610d59565b60405163d2650cd160e01b81526001600160a01b0390911660048201523060248201526044016102b1565b826106605761063c60a0880160808901610fd2565b604051634a777ac560e11b815265ffffffffffff90911660048201526024016102b1565b8161069f57806106736020890189610d59565b604051636422d02b60e11b81526001600160a01b039283166004820152911660248201526044016102b1565b8380156106a95750815b80156106b25750825b156107bb576001600160a01b0381165f9081527f5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb0060205260408120805460018101909155905060608801355f61070e60408b0160208c01610d59565b905060408a01355f61072360a08d018d61102f565b61073060208f018f610d59565b60405160200161074293929190611079565b60405160208183030381529060405290505f5f5f83516020850186888af19a505a905061076f818e610a4c565b604080518781528c151560208201526001600160a01b038916917f842fb24a83793558587a3dab2be7674da4a51d09c5542d6dd354e5d0ea70813c910160405180910390a25050505050505b5050505092915050565b804710156107ef5760405163cf47918160e01b8152476004820152602481018290526044016102b1565b610808828260405180602001604052805f815250610a64565b15610811575050565b3d156108235761081f610a79565b5050565b60405163d6bda27560e01b815260040160405180910390fd5b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005b92915050565b61086e610a84565b61032a81604051806040016040528060018152602001603160f81b815250610aab565b5f8080806109ae6108a560c087018761102f565b6109a77f7f96328b83274ebc7c1cf4f7a3abda602b51a78b7fa1d86a2ce353d75e587cac6108d660208b018b610d59565b6108e660408c0160208d01610d59565b8b604001358c606001356109058e5f0160208101906100a69190610d59565b8e60800160208101906109189190610fd2565b8f8060a00190610928919061102f565b60405161093692919061109f565b6040805191829003822060208301999099526001600160a01b0397881690820152959094166060860152608085019290925260a084015260c083015265ffffffffffff1660e08201526101008101919091526101200160405160208183030381529060405280519060200120610b14565b9190610b40565b5090925090505f8160038111156109c7576109c76110ae565b14959194509092505050565b6040513060248201525f90819060440160408051601f19818403018152919052602080820180516001600160e01b031663572b6c0560e01b17815282519293505f928392839290918391895afa92503d91505f519050828015610a37575060208210155b8015610a4257505f81115b9695505050505050565b610a5b603f60608301356110c2565b82101561081f57fe5b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b610a8c610b87565b610aa957604051631afcd79f60e31b815260040160405180910390fd5b565b610ab3610a84565b7fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d1007fa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d102610aff848261112d565b5060038101610b0e838261112d565b50505050565b5f610860610b20610ba0565b8360405161190160f01b8152600281019290925260228201526042902090565b5f80806041849003610b74578435602086013560408701355f1a610b6689828585610bae565b955095509550505050610b7e565b505f915060029050825b93509350939050565b5f610b9061083c565b54600160401b900460ff16919050565b5f610ba9610c76565b905090565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610be757505f91506003905082610c6c565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610c38573d5f5f3e3d5ffd5b5050604051601f1901519150506001600160a01b038116610c6357505f925060019150829050610c6c565b92505f91508190505b9450945094915050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f610ca0610ce9565b610ca8610cfe565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f610cf26104a7565b80519060200120905090565b5f610cf261057a565b5f60208284031215610d17575f5ffd5b813567ffffffffffffffff811115610d2d575f5ffd5b820160e08185031215610d3e575f5ffd5b9392505050565b6001600160a01b038116811461032a575f5ffd5b5f60208284031215610d69575f5ffd5b8135610d3e81610d45565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b60ff60f81b8816815260e060208201525f610dc060e0830189610d74565b8281036040840152610dd28189610d74565b606084018890526001600160a01b038716608085015260a0840186905283810360c0850152845180825260208087019350909101905f5b81811015610e27578351835260209384019390920191600101610e09565b50909b9a5050505050505050505050565b5f5f5f60408486031215610e4a575f5ffd5b833567ffffffffffffffff811115610e60575f5ffd5b8401601f81018613610e70575f5ffd5b803567ffffffffffffffff811115610e86575f5ffd5b8660208260051b8401011115610e9a575f5ffd5b602091820194509250840135610eaf81610d45565b809150509250925092565b634e487b7160e01b5f52604160045260245ffd5b5f60208284031215610ede575f5ffd5b813567ffffffffffffffff811115610ef4575f5ffd5b8201601f81018413610f04575f5ffd5b803567ffffffffffffffff811115610f1e57610f1e610eba565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610f4d57610f4d610eba565b604052818152828201602001861015610f64575f5ffd5b816020840160208301375f91810160200191909152949350505050565b634e487b7160e01b5f52603260045260245ffd5b5f823560de19833603018112610fa9575f5ffd5b9190910192915050565b8082018082111561086057634e487b7160e01b5f52601160045260245ffd5b5f60208284031215610fe2575f5ffd5b813565ffffffffffff81168114610d3e575f5ffd5b600181811c9082168061100b57607f821691505b60208210810361102957634e487b7160e01b5f52602260045260245ffd5b50919050565b5f5f8335601e19843603018112611044575f5ffd5b83018035915067ffffffffffffffff82111561105e575f5ffd5b602001915036819003821315611072575f5ffd5b9250929050565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b818382375f9101908152919050565b634e487b7160e01b5f52602160045260245ffd5b5f826110dc57634e487b7160e01b5f52601260045260245ffd5b500490565b601f82111561112857805f5260205f20601f840160051c810160208510156111065750805b601f840160051c820191505b81811015611125575f8155600101611112565b50505b505050565b815167ffffffffffffffff81111561114757611147610eba565b61115b816111558454610ff7565b846110e1565b6020601f82116001811461118d575f83156111765750848201515b5f19600385901b1c1916600184901b178455611125565b5f84815260208120601f198516915b828110156111bc578785015182556020948501946001909201910161119c565b50848210156111d957868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fea2646970667358221220e1b2c7ce0a9d7e438b68454649bf002accd6e259585218dc9edfa5341f78042664736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2981Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2981Upgradeable.json new file mode 100644 index 00000000..0c0001be --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC2981Upgradeable.json @@ -0,0 +1,146 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC2981Upgradeable", + "sourceName": "contracts/token/common/ERC2981Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidDefaultRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidDefaultRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidTokenRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidTokenRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC4626Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC4626Upgradeable.json similarity index 79% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC4626Upgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC4626Upgradeable.json index 13580e84..1798d453 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC4626Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC4626Upgradeable.json @@ -3,6 +3,197 @@ "contractName": "ERC4626Upgradeable", "sourceName": "contracts/token/ERC20/extensions/ERC4626Upgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxRedeem", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -64,9 +255,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -167,7 +358,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -265,30 +456,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -313,30 +480,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -603,7 +746,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], @@ -632,7 +775,7 @@ }, { "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909ContentURIUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909ContentURIUpgradeable.json new file mode 100644 index 00000000..15fb0632 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909ContentURIUpgradeable.json @@ -0,0 +1,492 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909ContentURIUpgradeable", + "sourceName": "contracts/token/ERC6909/extensions/ERC6909ContentURIUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ContractURIUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "contractURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610b2b8061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061009a575f3560e01c8063598af9e711610063578063598af9e714610120578063b6363cf214610133578063c87b56dd14610146578063e8a3d48514610166578063fe99049a1461016e575f5ffd5b8062fdd58e1461009e57806301ffc9a7146100c4578063095bcdb6146100e7578063426a8493146100fa578063558a72971461010d575b5f5ffd5b6100b16100ac3660046108c9565b610181565b6040519081526020015b60405180910390f35b6100d76100d23660046108f1565b6101b7565b60405190151581526020016100bb565b6100d76100f536600461091f565b6101db565b6100d761010836600461091f565b6101f2565b6100d761011b36600461094f565b6101ff565b6100b161012e366004610988565b610214565b6100d76101413660046109c2565b610264565b6101596101543660046109f3565b6102b0565b6040516100bb9190610a0a565b610159610390565b6100d761017c366004610a3f565b610444565b6001600160a01b0382165f9081525f516020610ad65f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663041b104b60e31b14806101b157506101b18261048f565b5f6101e8338585856104c3565b5060019392505050565b5f6101e83385858561052c565b5f61020b3384846105fc565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f8181527f2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e5016020526040902080546060917f2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e5009161030c90610a7e565b80601f016020809104026020016040519081016040528092919081815260200182805461033890610a7e565b80156103835780601f1061035a57610100808354040283529160200191610383565b820191905f5260205f20905b81548152906001019060200180831161036657829003601f168201915b5050505050915050919050565b7f2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e50080546060919081906103c290610a7e565b80601f01602080910402602001604051908101604052809291908181526020018280546103ee90610a7e565b80156104395780601f1061041057610100808354040283529160200191610439565b820191905f5260205f20905b81548152906001019060200180831161041c57829003601f168201915b505050505091505090565b5f336001600160a01b038616811480159061046657506104648682610264565b155b1561047757610477868286866106cb565b610483868686866104c3565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101b157506301ffc9a760e01b6001600160e01b03198316146101b1565b6001600160a01b0384166104f1576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661051a57604051630b8bbd6160e41b81525f60048201526024016104e8565b6105268484848461076d565b50505050565b5f516020610ad65f395f51905f526001600160a01b0385166105635760405163198ecd5360e31b81525f60048201526024016104e8565b6001600160a01b03841661058c57604051636f65f46560e01b81525f60048201526024016104e8565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f516020610ad65f395f51905f526001600160a01b0384166106335760405163198ecd5360e31b81525f60048201526024016104e8565b6001600160a01b03831661065c57604051636f65f46560e01b81525f60048201526024016104e8565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f516020610ad65f395f51905f525f6106e5868686610214565b90505f19811015610765578281101561073157604051632c51fead60e11b81526001600160a01b03861660048201526024810182905260448101849052606481018590526084016104e8565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b5f516020610ad65f395f51905f52336001600160a01b03861615610814576001600160a01b0386165f90815260208381526040808320878452909152902054838110156107ed576040516302c6d3fb60e61b81526001600160a01b03881660048201526024810182905260448101859052606481018690526084016104e8565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610859576001600160a01b0385165f9081526020838152604080832087845290915281208054859290610853908490610ab6565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b80356001600160a01b03811681146108c4575f5ffd5b919050565b5f5f604083850312156108da575f5ffd5b6108e3836108ae565b946020939093013593505050565b5f60208284031215610901575f5ffd5b81356001600160e01b031981168114610918575f5ffd5b9392505050565b5f5f5f60608486031215610931575f5ffd5b61093a846108ae565b95602085013595506040909401359392505050565b5f5f60408385031215610960575f5ffd5b610969836108ae565b91506020830135801515811461097d575f5ffd5b809150509250929050565b5f5f5f6060848603121561099a575f5ffd5b6109a3846108ae565b92506109b1602085016108ae565b929592945050506040919091013590565b5f5f604083850312156109d3575f5ffd5b6109dc836108ae565b91506109ea602084016108ae565b90509250929050565b5f60208284031215610a03575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f5f60808587031215610a52575f5ffd5b610a5b856108ae565b9350610a69602086016108ae565b93969395505050506040820135916060013590565b600181811c90821680610a9257607f821691505b602082108103610ab057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156101b157634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a2646970667358221220e6fa60d0b74a65cdcdd030a7a455557074781207021925bf6c50a14a5f37efd764736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b506004361061009a575f3560e01c8063598af9e711610063578063598af9e714610120578063b6363cf214610133578063c87b56dd14610146578063e8a3d48514610166578063fe99049a1461016e575f5ffd5b8062fdd58e1461009e57806301ffc9a7146100c4578063095bcdb6146100e7578063426a8493146100fa578063558a72971461010d575b5f5ffd5b6100b16100ac3660046108c9565b610181565b6040519081526020015b60405180910390f35b6100d76100d23660046108f1565b6101b7565b60405190151581526020016100bb565b6100d76100f536600461091f565b6101db565b6100d761010836600461091f565b6101f2565b6100d761011b36600461094f565b6101ff565b6100b161012e366004610988565b610214565b6100d76101413660046109c2565b610264565b6101596101543660046109f3565b6102b0565b6040516100bb9190610a0a565b610159610390565b6100d761017c366004610a3f565b610444565b6001600160a01b0382165f9081525f516020610ad65f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663041b104b60e31b14806101b157506101b18261048f565b5f6101e8338585856104c3565b5060019392505050565b5f6101e83385858561052c565b5f61020b3384846105fc565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f8181527f2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e5016020526040902080546060917f2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e5009161030c90610a7e565b80601f016020809104026020016040519081016040528092919081815260200182805461033890610a7e565b80156103835780601f1061035a57610100808354040283529160200191610383565b820191905f5260205f20905b81548152906001019060200180831161036657829003601f168201915b5050505050915050919050565b7f2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e50080546060919081906103c290610a7e565b80601f01602080910402602001604051908101604052809291908181526020018280546103ee90610a7e565b80156104395780601f1061041057610100808354040283529160200191610439565b820191905f5260205f20905b81548152906001019060200180831161041c57829003601f168201915b505050505091505090565b5f336001600160a01b038616811480159061046657506104648682610264565b155b1561047757610477868286866106cb565b610483868686866104c3565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101b157506301ffc9a760e01b6001600160e01b03198316146101b1565b6001600160a01b0384166104f1576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661051a57604051630b8bbd6160e41b81525f60048201526024016104e8565b6105268484848461076d565b50505050565b5f516020610ad65f395f51905f526001600160a01b0385166105635760405163198ecd5360e31b81525f60048201526024016104e8565b6001600160a01b03841661058c57604051636f65f46560e01b81525f60048201526024016104e8565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f516020610ad65f395f51905f526001600160a01b0384166106335760405163198ecd5360e31b81525f60048201526024016104e8565b6001600160a01b03831661065c57604051636f65f46560e01b81525f60048201526024016104e8565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f516020610ad65f395f51905f525f6106e5868686610214565b90505f19811015610765578281101561073157604051632c51fead60e11b81526001600160a01b03861660048201526024810182905260448101849052606481018590526084016104e8565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b5f516020610ad65f395f51905f52336001600160a01b03861615610814576001600160a01b0386165f90815260208381526040808320878452909152902054838110156107ed576040516302c6d3fb60e61b81526001600160a01b03881660048201526024810182905260448101859052606481018690526084016104e8565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610859576001600160a01b0385165f9081526020838152604080832087845290915281208054859290610853908490610ab6565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b80356001600160a01b03811681146108c4575f5ffd5b919050565b5f5f604083850312156108da575f5ffd5b6108e3836108ae565b946020939093013593505050565b5f60208284031215610901575f5ffd5b81356001600160e01b031981168114610918575f5ffd5b9392505050565b5f5f5f60608486031215610931575f5ffd5b61093a846108ae565b95602085013595506040909401359392505050565b5f5f60408385031215610960575f5ffd5b610969836108ae565b91506020830135801515811461097d575f5ffd5b809150509250929050565b5f5f5f6060848603121561099a575f5ffd5b6109a3846108ae565b92506109b1602085016108ae565b929592945050506040919091013590565b5f5f604083850312156109d3575f5ffd5b6109dc836108ae565b91506109ea602084016108ae565b90509250929050565b5f60208284031215610a03575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b5f5f5f5f60808587031215610a52575f5ffd5b610a5b856108ae565b9350610a69602086016108ae565b93969395505050506040820135916060013590565b600181811c90821680610a9257607f821691505b602082108103610ab057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156101b157634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a2646970667358221220e6fa60d0b74a65cdcdd030a7a455557074781207021925bf6c50a14a5f37efd764736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909MetadataUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909MetadataUpgradeable.json new file mode 100644 index 00000000..90b1e0f0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909MetadataUpgradeable.json @@ -0,0 +1,549 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909MetadataUpgradeable", + "sourceName": "contracts/token/ERC6909/extensions/ERC6909MetadataUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "newDecimals", + "type": "uint8" + } + ], + "name": "ERC6909DecimalsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "newName", + "type": "string" + } + ], + "name": "ERC6909NameUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "newSymbol", + "type": "string" + } + ], + "name": "ERC6909SymbolUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610b0b8061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100a4575f3560e01c8063426a84931161006e578063426a84931461017e5780634e41a1fb14610191578063558a7297146101a4578063598af9e7146101b7578063b6363cf2146101ca578063fe99049a146101dd575f5ffd5b8062ad800c146100a8578062fdd58e146100d157806301ffc9a7146100f2578063095bcdb6146101155780633f47e66214610128575b5f5ffd5b6100bb6100b636600461088e565b6101f0565b6040516100c891906108a5565b60405180910390f35b6100e46100df3660046108f5565b6102b3565b6040519081526020016100c8565b61010561010036600461091d565b6102e9565b60405190151581526020016100c8565b61010561012336600461094b565b61030d565b61016c61013636600461088e565b5f9081527fa0651e3d105d335a33d7d04897e080112be09c416f44637d6543e5b47885f800602052604090206002015460ff1690565b60405160ff90911681526020016100c8565b61010561018c36600461094b565b610324565b6100bb61019f36600461088e565b610331565b6101056101b236600461097b565b610373565b6100e46101c53660046109b4565b610388565b6101056101d83660046109ee565b6103d8565b6101056101eb366004610a1f565b610424565b5f8181527fa0651e3d105d335a33d7d04897e080112be09c416f44637d6543e5b47885f800602081905260409091208054606092919061022f90610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461025b90610a5e565b80156102a65780601f1061027d576101008083540402835291602001916102a6565b820191905f5260205f20905b81548152906001019060200180831161028957829003601f168201915b5050505050915050919050565b6001600160a01b0382165f9081525f516020610ab65f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b031982166371abc79560e01b14806102e357506102e38261046f565b5f61031a338585856104a3565b5060019392505050565b5f61031a3385858561050c565b5f8181527fa0651e3d105d335a33d7d04897e080112be09c416f44637d6543e5b47885f800602081905260409091206001018054606092919061022f90610a5e565b5f61037f3384846105dc565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f336001600160a01b0386168114801590610446575061044486826103d8565b155b1561045757610457868286866106ab565b610463868686866104a3565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806102e357506301ffc9a760e01b6001600160e01b03198316146102e3565b6001600160a01b0384166104d1576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b0383166104fa57604051630b8bbd6160e41b81525f60048201526024016104c8565b6105068484848461074d565b50505050565b5f516020610ab65f395f51905f526001600160a01b0385166105435760405163198ecd5360e31b81525f60048201526024016104c8565b6001600160a01b03841661056c57604051636f65f46560e01b81525f60048201526024016104c8565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f516020610ab65f395f51905f526001600160a01b0384166106135760405163198ecd5360e31b81525f60048201526024016104c8565b6001600160a01b03831661063c57604051636f65f46560e01b81525f60048201526024016104c8565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f516020610ab65f395f51905f525f6106c5868686610388565b90505f19811015610745578281101561071157604051632c51fead60e11b81526001600160a01b03861660048201526024810182905260448101849052606481018590526084016104c8565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b5f516020610ab65f395f51905f52336001600160a01b038616156107f4576001600160a01b0386165f90815260208381526040808320878452909152902054838110156107cd576040516302c6d3fb60e61b81526001600160a01b03881660048201526024810182905260448101859052606481018690526084016104c8565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610839576001600160a01b0385165f9081526020838152604080832087845290915281208054859290610833908490610a96565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b5f6020828403121561089e575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146108f0575f5ffd5b919050565b5f5f60408385031215610906575f5ffd5b61090f836108da565b946020939093013593505050565b5f6020828403121561092d575f5ffd5b81356001600160e01b031981168114610944575f5ffd5b9392505050565b5f5f5f6060848603121561095d575f5ffd5b610966846108da565b95602085013595506040909401359392505050565b5f5f6040838503121561098c575f5ffd5b610995836108da565b9150602083013580151581146109a9575f5ffd5b809150509250929050565b5f5f5f606084860312156109c6575f5ffd5b6109cf846108da565b92506109dd602085016108da565b929592945050506040919091013590565b5f5f604083850312156109ff575f5ffd5b610a08836108da565b9150610a16602084016108da565b90509250929050565b5f5f5f5f60808587031215610a32575f5ffd5b610a3b856108da565b9350610a49602086016108da565b93969395505050506040820135916060013590565b600181811c90821680610a7257607f821691505b602082108103610a9057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156102e357634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a26469706673582212200607f8db706b390a57c53d0e83253d3fae59645d89702ddcceeaec5c8059481364736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100a4575f3560e01c8063426a84931161006e578063426a84931461017e5780634e41a1fb14610191578063558a7297146101a4578063598af9e7146101b7578063b6363cf2146101ca578063fe99049a146101dd575f5ffd5b8062ad800c146100a8578062fdd58e146100d157806301ffc9a7146100f2578063095bcdb6146101155780633f47e66214610128575b5f5ffd5b6100bb6100b636600461088e565b6101f0565b6040516100c891906108a5565b60405180910390f35b6100e46100df3660046108f5565b6102b3565b6040519081526020016100c8565b61010561010036600461091d565b6102e9565b60405190151581526020016100c8565b61010561012336600461094b565b61030d565b61016c61013636600461088e565b5f9081527fa0651e3d105d335a33d7d04897e080112be09c416f44637d6543e5b47885f800602052604090206002015460ff1690565b60405160ff90911681526020016100c8565b61010561018c36600461094b565b610324565b6100bb61019f36600461088e565b610331565b6101056101b236600461097b565b610373565b6100e46101c53660046109b4565b610388565b6101056101d83660046109ee565b6103d8565b6101056101eb366004610a1f565b610424565b5f8181527fa0651e3d105d335a33d7d04897e080112be09c416f44637d6543e5b47885f800602081905260409091208054606092919061022f90610a5e565b80601f016020809104026020016040519081016040528092919081815260200182805461025b90610a5e565b80156102a65780601f1061027d576101008083540402835291602001916102a6565b820191905f5260205f20905b81548152906001019060200180831161028957829003601f168201915b5050505050915050919050565b6001600160a01b0382165f9081525f516020610ab65f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b031982166371abc79560e01b14806102e357506102e38261046f565b5f61031a338585856104a3565b5060019392505050565b5f61031a3385858561050c565b5f8181527fa0651e3d105d335a33d7d04897e080112be09c416f44637d6543e5b47885f800602081905260409091206001018054606092919061022f90610a5e565b5f61037f3384846105dc565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f336001600160a01b0386168114801590610446575061044486826103d8565b155b1561045757610457868286866106ab565b610463868686866104a3565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806102e357506301ffc9a760e01b6001600160e01b03198316146102e3565b6001600160a01b0384166104d1576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b0383166104fa57604051630b8bbd6160e41b81525f60048201526024016104c8565b6105068484848461074d565b50505050565b5f516020610ab65f395f51905f526001600160a01b0385166105435760405163198ecd5360e31b81525f60048201526024016104c8565b6001600160a01b03841661056c57604051636f65f46560e01b81525f60048201526024016104c8565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f516020610ab65f395f51905f526001600160a01b0384166106135760405163198ecd5360e31b81525f60048201526024016104c8565b6001600160a01b03831661063c57604051636f65f46560e01b81525f60048201526024016104c8565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f516020610ab65f395f51905f525f6106c5868686610388565b90505f19811015610745578281101561071157604051632c51fead60e11b81526001600160a01b03861660048201526024810182905260448101849052606481018590526084016104c8565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b5f516020610ab65f395f51905f52336001600160a01b038616156107f4576001600160a01b0386165f90815260208381526040808320878452909152902054838110156107cd576040516302c6d3fb60e61b81526001600160a01b03881660048201526024810182905260448101859052606481018690526084016104c8565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610839576001600160a01b0385165f9081526020838152604080832087845290915281208054859290610833908490610a96565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b5f6020828403121561089e575f5ffd5b5035919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b03811681146108f0575f5ffd5b919050565b5f5f60408385031215610906575f5ffd5b61090f836108da565b946020939093013593505050565b5f6020828403121561092d575f5ffd5b81356001600160e01b031981168114610944575f5ffd5b9392505050565b5f5f5f6060848603121561095d575f5ffd5b610966846108da565b95602085013595506040909401359392505050565b5f5f6040838503121561098c575f5ffd5b610995836108da565b9150602083013580151581146109a9575f5ffd5b809150509250929050565b5f5f5f606084860312156109c6575f5ffd5b6109cf846108da565b92506109dd602085016108da565b929592945050506040919091013590565b5f5f604083850312156109ff575f5ffd5b610a08836108da565b9150610a16602084016108da565b90509250929050565b5f5f5f5f60808587031215610a32575f5ffd5b610a3b856108da565b9350610a49602086016108da565b93969395505050506040820135916060013590565b600181811c90821680610a7257607f821691505b602082108103610a9057634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156102e357634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a26469706673582212200607f8db706b390a57c53d0e83253d3fae59645d89702ddcceeaec5c8059481364736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909TokenSupplyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909TokenSupplyUpgradeable.json new file mode 100644 index 00000000..a3f1296e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909TokenSupplyUpgradeable.json @@ -0,0 +1,454 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909TokenSupplyUpgradeable", + "sourceName": "contracts/token/ERC6909/extensions/ERC6909TokenSupplyUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b506109bd8061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061008f575f3560e01c8063558a729711610063578063558a729714610102578063598af9e714610115578063b6363cf214610128578063bd85b0391461013b578063fe99049a14610179575f5ffd5b8062fdd58e1461009357806301ffc9a7146100b9578063095bcdb6146100dc578063426a8493146100ef575b5f5ffd5b6100a66100a13660046107c8565b61018c565b6040519081526020015b60405180910390f35b6100cc6100c73660046107f0565b6101c2565b60405190151581526020016100b0565b6100cc6100ea36600461081e565b6101e6565b6100cc6100fd36600461081e565b6101fd565b6100cc61011036600461084e565b61020a565b6100a6610123366004610887565b61021f565b6100cc6101363660046108c1565b61026f565b6100a66101493660046108f2565b5f9081527f9cc5ac148333cfaf4365d2d67a9c6e8fab8e8f4df7b569f769d68102db719600602052604090205490565b6100cc610187366004610909565b6102bb565b6001600160a01b0382165f9081525f5160206109685f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663bd85b03960e01b14806101bc57506101bc82610306565b5f6101f33385858561033a565b5060019392505050565b5f6101f3338585856103a3565b5f610216338484610473565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f336001600160a01b03861681148015906102dd57506102db868261026f565b155b156102ee576102ee86828686610542565b6102fa8686868661033a565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101bc57506301ffc9a760e01b6001600160e01b03198316146101bc565b6001600160a01b038416610368576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661039157604051630b8bbd6160e41b81525f600482015260240161035f565b61039d848484846105e4565b50505050565b5f5160206109685f395f51905f526001600160a01b0385166103da5760405163198ecd5360e31b81525f600482015260240161035f565b6001600160a01b03841661040357604051636f65f46560e01b81525f600482015260240161035f565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f5160206109685f395f51905f526001600160a01b0384166104aa5760405163198ecd5360e31b81525f600482015260240161035f565b6001600160a01b0383166104d357604051636f65f46560e01b81525f600482015260240161035f565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f5160206109685f395f51905f525f61055c86868661021f565b90505f198110156105dc57828110156105a857604051632c51fead60e11b81526001600160a01b038616600482015260248101829052604481018490526064810185905260840161035f565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b7f9cc5ac148333cfaf4365d2d67a9c6e8fab8e8f4df7b569f769d68102db7196006106118585858561066c565b6001600160a01b038516610642575f838152602082905260408120805484929061063c908490610948565b90915550505b6001600160a01b038416610665575f838152602082905260409020805483900390555b5050505050565b5f5160206109685f395f51905f52336001600160a01b03861615610713576001600160a01b0386165f90815260208381526040808320878452909152902054838110156106ec576040516302c6d3fb60e61b81526001600160a01b038816600482015260248101829052604481018590526064810186905260840161035f565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610758576001600160a01b0385165f9081526020838152604080832087845290915281208054859290610752908490610948565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b80356001600160a01b03811681146107c3575f5ffd5b919050565b5f5f604083850312156107d9575f5ffd5b6107e2836107ad565b946020939093013593505050565b5f60208284031215610800575f5ffd5b81356001600160e01b031981168114610817575f5ffd5b9392505050565b5f5f5f60608486031215610830575f5ffd5b610839846107ad565b95602085013595506040909401359392505050565b5f5f6040838503121561085f575f5ffd5b610868836107ad565b91506020830135801515811461087c575f5ffd5b809150509250929050565b5f5f5f60608486031215610899575f5ffd5b6108a2846107ad565b92506108b0602085016107ad565b929592945050506040919091013590565b5f5f604083850312156108d2575f5ffd5b6108db836107ad565b91506108e9602084016107ad565b90509250929050565b5f60208284031215610902575f5ffd5b5035919050565b5f5f5f5f6080858703121561091c575f5ffd5b610925856107ad565b9350610933602086016107ad565b93969395505050506040820135916060013590565b808201808211156101bc57634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a2646970667358221220ac658756f88029ac899646c4ef322a01389a89fdfe39f387ddf13464d385795e64736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b506004361061008f575f3560e01c8063558a729711610063578063558a729714610102578063598af9e714610115578063b6363cf214610128578063bd85b0391461013b578063fe99049a14610179575f5ffd5b8062fdd58e1461009357806301ffc9a7146100b9578063095bcdb6146100dc578063426a8493146100ef575b5f5ffd5b6100a66100a13660046107c8565b61018c565b6040519081526020015b60405180910390f35b6100cc6100c73660046107f0565b6101c2565b60405190151581526020016100b0565b6100cc6100ea36600461081e565b6101e6565b6100cc6100fd36600461081e565b6101fd565b6100cc61011036600461084e565b61020a565b6100a6610123366004610887565b61021f565b6100cc6101363660046108c1565b61026f565b6100a66101493660046108f2565b5f9081527f9cc5ac148333cfaf4365d2d67a9c6e8fab8e8f4df7b569f769d68102db719600602052604090205490565b6100cc610187366004610909565b6102bb565b6001600160a01b0382165f9081525f5160206109685f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b0319821663bd85b03960e01b14806101bc57506101bc82610306565b5f6101f33385858561033a565b5060019392505050565b5f6101f3338585856103a3565b5f610216338484610473565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f336001600160a01b03861681148015906102dd57506102db868261026f565b155b156102ee576102ee86828686610542565b6102fa8686868661033a565b50600195945050505050565b5f6001600160e01b03198216630f632fb360e01b14806101bc57506301ffc9a760e01b6001600160e01b03198316146101bc565b6001600160a01b038416610368576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661039157604051630b8bbd6160e41b81525f600482015260240161035f565b61039d848484846105e4565b50505050565b5f5160206109685f395f51905f526001600160a01b0385166103da5760405163198ecd5360e31b81525f600482015260240161035f565b6001600160a01b03841661040357604051636f65f46560e01b81525f600482015260240161035f565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f5160206109685f395f51905f526001600160a01b0384166104aa5760405163198ecd5360e31b81525f600482015260240161035f565b6001600160a01b0383166104d357604051636f65f46560e01b81525f600482015260240161035f565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f5160206109685f395f51905f525f61055c86868661021f565b90505f198110156105dc57828110156105a857604051632c51fead60e11b81526001600160a01b038616600482015260248101829052604481018490526064810185905260840161035f565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b7f9cc5ac148333cfaf4365d2d67a9c6e8fab8e8f4df7b569f769d68102db7196006106118585858561066c565b6001600160a01b038516610642575f838152602082905260408120805484929061063c908490610948565b90915550505b6001600160a01b038416610665575f838152602082905260409020805483900390555b5050505050565b5f5160206109685f395f51905f52336001600160a01b03861615610713576001600160a01b0386165f90815260208381526040808320878452909152902054838110156106ec576040516302c6d3fb60e61b81526001600160a01b038816600482015260248101829052604481018590526064810186905260840161035f565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610758576001600160a01b0385165f9081526020838152604080832087845290915281208054859290610752908490610948565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b80356001600160a01b03811681146107c3575f5ffd5b919050565b5f5f604083850312156107d9575f5ffd5b6107e2836107ad565b946020939093013593505050565b5f60208284031215610800575f5ffd5b81356001600160e01b031981168114610817575f5ffd5b9392505050565b5f5f5f60608486031215610830575f5ffd5b610839846107ad565b95602085013595506040909401359392505050565b5f5f6040838503121561085f575f5ffd5b610868836107ad565b91506020830135801515811461087c575f5ffd5b809150509250929050565b5f5f5f60608486031215610899575f5ffd5b6108a2846107ad565b92506108b0602085016107ad565b929592945050506040919091013590565b5f5f604083850312156108d2575f5ffd5b6108db836107ad565b91506108e9602084016107ad565b90509250929050565b5f60208284031215610902575f5ffd5b5035919050565b5f5f5f5f6080858703121561091c575f5ffd5b610925856107ad565b9350610933602086016107ad565b93969395505050506040820135916060013590565b808201808211156101bc57634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a2646970667358221220ac658756f88029ac899646c4ef322a01389a89fdfe39f387ddf13464d385795e64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909Upgradeable.json new file mode 100644 index 00000000..0c3b3cc3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC6909Upgradeable.json @@ -0,0 +1,435 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC6909Upgradeable", + "sourceName": "contracts/token/ERC6909/ERC6909Upgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ERC6909InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC6909InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC6909InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC6909InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC6909InvalidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b506108b18061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610084575f3560e01c8063558a729711610058578063558a7297146100f7578063598af9e71461010a578063b6363cf21461011d578063fe99049a14610130575f5ffd5b8062fdd58e1461008857806301ffc9a7146100ae578063095bcdb6146100d1578063426a8493146100e4575b5f5ffd5b61009b6100963660046106d3565b610143565b6040519081526020015b60405180910390f35b6100c16100bc3660046106fb565b610179565b60405190151581526020016100a5565b6100c16100df366004610729565b6101ad565b6100c16100f2366004610729565b6101c4565b6100c1610105366004610759565b6101d1565b61009b610118366004610792565b6101e6565b6100c161012b3660046107cc565b610236565b6100c161013e3660046107fd565b610282565b6001600160a01b0382165f9081525f51602061085c5f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b03198216630f632fb360e01b148061017357506301ffc9a760e01b6001600160e01b0319831614610173565b5f6101ba338585856102cd565b5060019392505050565b5f6101ba33858585610336565b5f6101dd338484610406565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f336001600160a01b03861681148015906102a457506102a28682610236565b155b156102b5576102b5868286866104d5565b6102c1868686866102cd565b50600195945050505050565b6001600160a01b0384166102fb576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661032457604051630b8bbd6160e41b81525f60048201526024016102f2565b61033084848484610577565b50505050565b5f51602061085c5f395f51905f526001600160a01b03851661036d5760405163198ecd5360e31b81525f60048201526024016102f2565b6001600160a01b03841661039657604051636f65f46560e01b81525f60048201526024016102f2565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f51602061085c5f395f51905f526001600160a01b03841661043d5760405163198ecd5360e31b81525f60048201526024016102f2565b6001600160a01b03831661046657604051636f65f46560e01b81525f60048201526024016102f2565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f51602061085c5f395f51905f525f6104ef8686866101e6565b90505f1981101561056f578281101561053b57604051632c51fead60e11b81526001600160a01b03861660048201526024810182905260448101849052606481018590526084016102f2565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b5f51602061085c5f395f51905f52336001600160a01b0386161561061e576001600160a01b0386165f90815260208381526040808320878452909152902054838110156105f7576040516302c6d3fb60e61b81526001600160a01b03881660048201526024810182905260448101859052606481018690526084016102f2565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610663576001600160a01b0385165f908152602083815260408083208784529091528120805485929061065d90849061083c565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b80356001600160a01b03811681146106ce575f5ffd5b919050565b5f5f604083850312156106e4575f5ffd5b6106ed836106b8565b946020939093013593505050565b5f6020828403121561070b575f5ffd5b81356001600160e01b031981168114610722575f5ffd5b9392505050565b5f5f5f6060848603121561073b575f5ffd5b610744846106b8565b95602085013595506040909401359392505050565b5f5f6040838503121561076a575f5ffd5b610773836106b8565b915060208301358015158114610787575f5ffd5b809150509250929050565b5f5f5f606084860312156107a4575f5ffd5b6107ad846106b8565b92506107bb602085016106b8565b929592945050506040919091013590565b5f5f604083850312156107dd575f5ffd5b6107e6836106b8565b91506107f4602084016106b8565b90509250929050565b5f5f5f5f60808587031215610810575f5ffd5b610819856106b8565b9350610827602086016106b8565b93969395505050506040820135916060013590565b8082018082111561017357634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a26469706673582212205859bfafe70af6cca4a6d62b18b4935760f1bf2905c05d030eb539f782e5886c64736f6c634300081f0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610084575f3560e01c8063558a729711610058578063558a7297146100f7578063598af9e71461010a578063b6363cf21461011d578063fe99049a14610130575f5ffd5b8062fdd58e1461008857806301ffc9a7146100ae578063095bcdb6146100d1578063426a8493146100e4575b5f5ffd5b61009b6100963660046106d3565b610143565b6040519081526020015b60405180910390f35b6100c16100bc3660046106fb565b610179565b60405190151581526020016100a5565b6100c16100df366004610729565b6101ad565b6100c16100f2366004610729565b6101c4565b6100c1610105366004610759565b6101d1565b61009b610118366004610792565b6101e6565b6100c161012b3660046107cc565b610236565b6100c161013e3660046107fd565b610282565b6001600160a01b0382165f9081525f51602061085c5f395f51905f52602090815260408083208484529091529020545b92915050565b5f6001600160e01b03198216630f632fb360e01b148061017357506301ffc9a760e01b6001600160e01b0319831614610173565b5f6101ba338585856102cd565b5060019392505050565b5f6101ba33858585610336565b5f6101dd338484610406565b50600192915050565b6001600160a01b039283165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf902602090815260408083209490951682529283528381209181529152205490565b6001600160a01b039182165f9081527f9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf9016020908152604080832093909416825291909152205460ff1690565b5f336001600160a01b03861681148015906102a457506102a28682610236565b155b156102b5576102b5868286866104d5565b6102c1868686866102cd565b50600195945050505050565b6001600160a01b0384166102fb576040516301486a4160e71b81525f60048201526024015b60405180910390fd5b6001600160a01b03831661032457604051630b8bbd6160e41b81525f60048201526024016102f2565b61033084848484610577565b50505050565b5f51602061085c5f395f51905f526001600160a01b03851661036d5760405163198ecd5360e31b81525f60048201526024016102f2565b6001600160a01b03841661039657604051636f65f46560e01b81525f60048201526024016102f2565b6001600160a01b038581165f81815260028401602090815260408083209489168084529482528083208884528252918290208690559051858152869392917fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a7910160405180910390a45050505050565b5f51602061085c5f395f51905f526001600160a01b03841661043d5760405163198ecd5360e31b81525f60048201526024016102f2565b6001600160a01b03831661046657604051636f65f46560e01b81525f60048201526024016102f2565b6001600160a01b038481165f818152600184016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527fceb576d9f15e4e200fdb5096d64d5dfd667e16def20c1eefd14256d8e3faa267910160405180910390a350505050565b5f51602061085c5f395f51905f525f6104ef8686866101e6565b90505f1981101561056f578281101561053b57604051632c51fead60e11b81526001600160a01b03861660048201526024810182905260448101849052606481018590526084016102f2565b6001600160a01b038087165f9081526002840160209081526040808320938916835292815282822087835290522083820390555b505050505050565b5f51602061085c5f395f51905f52336001600160a01b0386161561061e576001600160a01b0386165f90815260208381526040808320878452909152902054838110156105f7576040516302c6d3fb60e61b81526001600160a01b03881660048201526024810182905260448101859052606481018690526084016102f2565b6001600160a01b0387165f9081526020848152604080832088845290915290209084900390555b6001600160a01b03851615610663576001600160a01b0385165f908152602083815260408083208784529091528120805485929061065d90849061083c565b90915550505b604080516001600160a01b03838116825260208201869052869281891692918a16917f1b3d7edb2e9c0b0e7c525b20aaaef0f5940d2ed71663c7d39266ecafac728859910160405180910390a4505050505050565b80356001600160a01b03811681146106ce575f5ffd5b919050565b5f5f604083850312156106e4575f5ffd5b6106ed836106b8565b946020939093013593505050565b5f6020828403121561070b575f5ffd5b81356001600160e01b031981168114610722575f5ffd5b9392505050565b5f5f5f6060848603121561073b575f5ffd5b610744846106b8565b95602085013595506040909401359392505050565b5f5f6040838503121561076a575f5ffd5b610773836106b8565b915060208301358015158114610787575f5ffd5b809150509250929050565b5f5f5f606084860312156107a4575f5ffd5b6107ad846106b8565b92506107bb602085016106b8565b929592945050506040919091013590565b5f5f604083850312156107dd575f5ffd5b6107e6836106b8565b91506107f4602084016106b8565b90509250929050565b5f5f5f5f60808587031215610810575f5ffd5b610819856106b8565b9350610827602086016106b8565b93969395505050506040820135916060013590565b8082018082111561017357634e487b7160e01b5f52601160045260245ffdfe9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900a26469706673582212205859bfafe70af6cca4a6d62b18b4935760f1bf2905c05d030eb539f782e5886c64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721BurnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721BurnableUpgradeable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721BurnableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721BurnableUpgradeable.json index 9164d680..a1b1f6b3 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721BurnableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721BurnableUpgradeable.json @@ -3,6 +3,119 @@ "contractName": "ERC721BurnableUpgradeable", "sourceName": "contracts/token/ERC721/extensions/ERC721BurnableUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -58,9 +171,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721ConsecutiveUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721ConsecutiveUpgradeable.json new file mode 100644 index 00000000..6ee2a640 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721ConsecutiveUpgradeable.json @@ -0,0 +1,529 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721ConsecutiveUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "batchSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxBatch", + "type": "uint256" + } + ], + "name": "ERC721ExceededMaxBatchMint", + "type": "error" + }, + { + "inputs": [], + "name": "ERC721ForbiddenBatchBurn", + "type": "error" + }, + { + "inputs": [], + "name": "ERC721ForbiddenBatchMint", + "type": "error" + }, + { + "inputs": [], + "name": "ERC721ForbiddenMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "fromTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "toTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toAddress", + "type": "address" + } + ], + "name": "ConsecutiveTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721EnumerableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721EnumerableUpgradeable.json similarity index 75% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721EnumerableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721EnumerableUpgradeable.json index 83e59a53..4ecabc91 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721EnumerableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721EnumerableUpgradeable.json @@ -3,6 +3,140 @@ "contractName": "ERC721EnumerableUpgradeable", "sourceName": "contracts/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "ERC721EnumerableForbiddenBatchMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "ERC721OutOfBoundsIndex", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -58,9 +192,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721PausableUpgradeable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PausableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721PausableUpgradeable.json index e890f95f..95bdc330 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721PausableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721PausableUpgradeable.json @@ -3,6 +3,129 @@ "contractName": "ERC721PausableUpgradeable", "sourceName": "contracts/token/ERC721/extensions/ERC721PausableUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -58,9 +181,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721RoyaltyUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721RoyaltyUpgradeable.json new file mode 100644 index 00000000..cb1d14c3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721RoyaltyUpgradeable.json @@ -0,0 +1,560 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC721RoyaltyUpgradeable", + "sourceName": "contracts/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidDefaultRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidDefaultRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidTokenRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidTokenRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721URIStorageUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721URIStorageUpgradeable.json similarity index 77% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721URIStorageUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721URIStorageUpgradeable.json index 74b88d62..cdef7469 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721URIStorageUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721URIStorageUpgradeable.json @@ -3,6 +3,119 @@ "contractName": "ERC721URIStorageUpgradeable", "sourceName": "contracts/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -77,9 +190,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721Upgradeable.json similarity index 78% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721Upgradeable.json index f72afdf7..eb58473f 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721ConsecutiveUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721Upgradeable.json @@ -1,87 +1,169 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC721ConsecutiveUpgradeable", - "sourceName": "contracts/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol", + "contractName": "ERC721Upgradeable", + "sourceName": "contracts/token/ERC721/ERC721Upgradeable.sol", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "sender", "type": "address" }, { - "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { "internalType": "address", - "name": "approved", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", "type": "address" }, { - "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "ERC721InsufficientApproval", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "approver", "type": "address" - }, + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", "name": "operator", "type": "address" - }, + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" + "internalType": "address", + "name": "owner", + "type": "address" } ], - "name": "ApprovalForAll", - "type": "event" + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "uint256", - "name": "fromTokenId", + "name": "tokenId", "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" }, { - "indexed": false, + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, "internalType": "uint256", - "name": "toTokenId", + "name": "tokenId", "type": "uint256" - }, + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "fromAddress", + "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "toAddress", + "name": "operator", "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "ConsecutiveTransfer", + "name": "ApprovalForAll", "type": "event" }, { @@ -89,9 +171,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721VotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721VotesUpgradeable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721VotesUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721VotesUpgradeable.json index 0d79e7b4..26973f93 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721VotesUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721VotesUpgradeable.json @@ -3,6 +3,215 @@ "contractName": "ERC721VotesUpgradeable", "sourceName": "contracts/token/ERC721/extensions/ERC721VotesUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "clock", + "type": "uint48" + } + ], + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -90,13 +299,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], @@ -114,9 +323,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -160,19 +369,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721WrapperUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721WrapperUpgradeable.json similarity index 78% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721WrapperUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721WrapperUpgradeable.json index 8e4b4f07..cf71a10c 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC721WrapperUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC721WrapperUpgradeable.json @@ -3,6 +3,130 @@ "contractName": "ERC721WrapperUpgradeable", "sourceName": "contracts/token/ERC721/extensions/ERC721WrapperUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "ERC721UnsupportedToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -58,9 +182,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -409,7 +533,7 @@ "name": "underlying", "outputs": [ { - "internalType": "contract IERC721Upgradeable", + "internalType": "contract IERC721", "name": "", "type": "address" } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC7739Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC7739Upgradeable.json new file mode 100644 index 00000000..8fc141fa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/ERC7739Upgradeable.json @@ -0,0 +1,107 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ERC7739Upgradeable", + "sourceName": "contracts/utils/cryptography/signers/draft-ERC7739Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "result", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingFractionalUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingFractionalUpgradeable.json new file mode 100644 index 00000000..6fe41206 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingFractionalUpgradeable.json @@ -0,0 +1,1453 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingFractionalUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorCountingFractionalUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "usedVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "remainingWeight", + "type": "uint256" + } + ], + "name": "GovernorExceedRemainingWeight", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "usedVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingOverridableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingOverridableUpgradeable.json new file mode 100644 index 00000000..1a0a3ab9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingOverridableUpgradeable.json @@ -0,0 +1,1605 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingOverridableUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorCountingOverridableUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorAlreadyOverriddenVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "OverrideVoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "name": "VoteReduced", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OVERRIDE_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castOverrideVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castOverrideVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVotedOverride", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingSimpleUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingSimpleUpgradeable.json new file mode 100644 index 00000000..e70b7c54 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorCountingSimpleUpgradeable.json @@ -0,0 +1,1408 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorCountingSimpleUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorNoncesKeyedUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorNoncesKeyedUpgradeable.json new file mode 100644 index 00000000..9930de81 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorNoncesKeyedUpgradeable.json @@ -0,0 +1,1403 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorNoncesKeyedUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorNoncesKeyedUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorPreventLateQuorumUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorPreventLateQuorumUpgradeable.json similarity index 73% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorPreventLateQuorumUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorPreventLateQuorumUpgradeable.json index 9558a4ec..07c8acc3 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorPreventLateQuorumUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorPreventLateQuorumUpgradeable.json @@ -5,7 +5,236 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", "type": "error" }, { @@ -19,9 +248,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -152,6 +381,25 @@ "name": "ProposalExtended", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -355,19 +603,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -456,6 +699,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -467,19 +715,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -583,6 +821,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -699,9 +971,9 @@ "name": "lateQuorumVoteExtension", "outputs": [ { - "internalType": "uint64", + "internalType": "uint48", "name": "", - "type": "uint64" + "type": "uint48" } ], "stateMutability": "view", @@ -720,6 +992,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -851,6 +1142,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -936,6 +1265,40 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -981,9 +1344,9 @@ { "inputs": [ { - "internalType": "uint64", + "internalType": "uint48", "name": "newVoteExtension", - "type": "uint64" + "type": "uint48" } ], "name": "setLateQuorumVoteExtension", @@ -1002,7 +1365,7 @@ "name": "state", "outputs": [ { - "internalType": "enum IGovernorUpgradeable.ProposalState", + "internalType": "enum IGovernor.ProposalState", "name": "", "type": "uint8" } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorProposalGuardianUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorProposalGuardianUpgradeable.json new file mode 100644 index 00000000..32328513 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorProposalGuardianUpgradeable.json @@ -0,0 +1,1424 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorProposalGuardianUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorProposalGuardianUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldProposalGuardian", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newProposalGuardian", + "type": "address" + } + ], + "name": "ProposalGuardianSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newProposalGuardian", + "type": "address" + } + ], + "name": "setProposalGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSequentialProposalIdUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSequentialProposalIdUpgradeable.json new file mode 100644 index 00000000..61ff49d9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSequentialProposalIdUpgradeable.json @@ -0,0 +1,1397 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorSequentialProposalIdUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorSequentialProposalIdUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorAlreadyInitializedLatestProposalId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "latestProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorSettingsUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSettingsUpgradeable.json similarity index 74% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorSettingsUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSettingsUpgradeable.json index 75e77f71..d16df9b6 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorSettingsUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSettingsUpgradeable.json @@ -5,7 +5,236 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", "type": "error" }, { @@ -19,9 +248,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -114,6 +343,25 @@ "name": "ProposalExecuted", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -374,19 +622,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -475,6 +718,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -486,19 +734,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -602,6 +840,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -726,6 +998,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -857,6 +1148,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -942,6 +1271,40 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1000,9 +1363,9 @@ { "inputs": [ { - "internalType": "uint256", + "internalType": "uint48", "name": "newVotingDelay", - "type": "uint256" + "type": "uint48" } ], "name": "setVotingDelay", @@ -1013,9 +1376,9 @@ { "inputs": [ { - "internalType": "uint256", + "internalType": "uint32", "name": "newVotingPeriod", - "type": "uint256" + "type": "uint32" } ], "name": "setVotingPeriod", @@ -1034,7 +1397,7 @@ "name": "state", "outputs": [ { - "internalType": "enum IGovernorUpgradeable.ProposalState", + "internalType": "enum IGovernor.ProposalState", "name": "", "type": "uint8" } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorStorageUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorStorageUpgradeable.json new file mode 100644 index 00000000..9317b03e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorStorageUpgradeable.json @@ -0,0 +1,1504 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorStorageUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorStorageUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proposalCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDetails", + "outputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "proposalDetailsAt", + "outputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "queue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSuperQuorumUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSuperQuorumUpgradeable.json new file mode 100644 index 00000000..ec518736 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorSuperQuorumUpgradeable.json @@ -0,0 +1,1427 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorSuperQuorumUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorSuperQuorumUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "superQuorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockAccessUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockAccessUpgradeable.json new file mode 100644 index 00000000..4024c2d3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockAccessUpgradeable.json @@ -0,0 +1,1580 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorTimelockAccessUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorTimelockAccessUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorLockedIgnore", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actualNonce", + "type": "uint256" + } + ], + "name": "GovernorMismatchedNonce", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "neededTimestamp", + "type": "uint256" + } + ], + "name": "GovernorUnmetDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + }, + { + "indexed": false, + "internalType": "bool", + "name": "ignored", + "type": "bool" + } + ], + "name": "AccessManagerIgnoredSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "oldBaseDelaySeconds", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "newBaseDelaySeconds", + "type": "uint32" + } + ], + "name": "BaseDelaySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accessManager", + "outputs": [ + { + "internalType": "contract IAccessManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseDelaySeconds", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "isAccessManagerIgnored", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalExecutionPlan", + "outputs": [ + { + "internalType": "uint32", + "name": "delay", + "type": "uint32" + }, + { + "internalType": "bool[]", + "name": "indirect", + "type": "bool[]" + }, + { + "internalType": "bool[]", + "name": "withDelay", + "type": "bool[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + }, + { + "internalType": "bool", + "name": "ignored", + "type": "bool" + } + ], + "name": "setAccessManagerIgnored", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "newBaseDelay", + "type": "uint32" + } + ], + "name": "setBaseDelaySeconds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockCompoundUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockCompoundUpgradeable.json similarity index 77% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockCompoundUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockCompoundUpgradeable.json index 14768326..005f9887 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockCompoundUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockCompoundUpgradeable.json @@ -5,7 +5,252 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", "type": "error" }, { @@ -19,9 +264,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -126,7 +371,7 @@ { "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "etaSeconds", "type": "uint256" } ], @@ -362,19 +607,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -463,6 +703,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -474,19 +719,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -590,6 +825,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -714,6 +983,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -864,6 +1152,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1036,7 +1343,7 @@ "name": "state", "outputs": [ { - "internalType": "enum IGovernorUpgradeable.ProposalState", + "internalType": "enum IGovernor.ProposalState", "name": "", "type": "uint8" } @@ -1079,7 +1386,7 @@ { "inputs": [ { - "internalType": "contract ICompoundTimelockUpgradeable", + "internalType": "contract ICompoundTimelock", "name": "newTimelock", "type": "address" } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockControlUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockControlUpgradeable.json similarity index 78% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockControlUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockControlUpgradeable.json index 7e53a1ed..3946aeaf 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorTimelockControlUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorTimelockControlUpgradeable.json @@ -5,7 +5,236 @@ "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", "type": "error" }, { @@ -19,9 +248,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -126,7 +355,7 @@ { "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "etaSeconds", "type": "uint256" } ], @@ -355,19 +584,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -456,6 +680,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -467,19 +696,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -583,6 +802,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -707,6 +960,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -857,6 +1129,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1029,7 +1320,7 @@ "name": "state", "outputs": [ { - "internalType": "enum IGovernorUpgradeable.ProposalState", + "internalType": "enum IGovernor.ProposalState", "name": "", "type": "uint8" } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorUpgradeable.json similarity index 87% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorUpgradeable.json index 0258276b..7fc7fdba 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorCompatibilityBravoUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorUpgradeable.json @@ -1,11 +1,240 @@ { "_format": "hh-sol-artifact-1", - "contractName": "GovernorCompatibilityBravoUpgradeable", - "sourceName": "contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol", + "contractName": "GovernorUpgradeable", + "sourceName": "contracts/governance/GovernorUpgradeable.sol", "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", "type": "error" }, { @@ -19,9 +248,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -126,7 +355,7 @@ { "indexed": false, "internalType": "uint256", - "name": "eta", + "name": "etaSeconds", "type": "uint256" } ], @@ -249,7 +478,7 @@ "type": "string" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { @@ -265,19 +494,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "cancel", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -349,19 +565,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -450,6 +661,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -461,19 +677,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -579,27 +785,6 @@ }, { "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "name": "getActions", - "outputs": [ { "internalType": "address[]", "name": "targets", @@ -610,56 +795,23 @@ "name": "values", "type": "uint256[]" }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, { "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", - "type": "uint256" }, { - "internalType": "address", - "name": "voter", - "type": "address" + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" } ], - "name": "getReceipt", + "name": "getProposalId", "outputs": [ { - "components": [ - { - "internalType": "bool", - "name": "hasVoted", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "support", - "type": "uint8" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "internalType": "struct IGovernorCompatibilityBravoUpgradeable.Receipt", + "internalType": "uint256", "name": "", - "type": "tuple" + "type": "uint256" } ], "stateMutability": "view", @@ -789,6 +941,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -943,16 +1114,16 @@ "inputs": [ { "internalType": "uint256", - "name": "proposalId", + "name": "", "type": "uint256" } ], - "name": "proposalProposer", + "name": "proposalNeedsQueuing", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", @@ -966,25 +1137,12 @@ "type": "uint256" } ], - "name": "proposalSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposalThreshold", + "name": "proposalProposer", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -998,86 +1156,20 @@ "type": "uint256" } ], - "name": "proposals", + "name": "proposalSnapshot", "outputs": [ { "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "proposer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "eta", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "forVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "againstVotes", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "abstainVotes", + "name": "", "type": "uint256" - }, - { - "internalType": "bool", - "name": "canceled", - "type": "bool" - }, - { - "internalType": "bool", - "name": "executed", - "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "bytes[]", - "name": "calldatas", - "type": "bytes[]" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - } - ], - "name": "propose", + "inputs": [], + "name": "proposalThreshold", "outputs": [ { "internalType": "uint256", @@ -1085,7 +1177,7 @@ "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -1100,11 +1192,6 @@ "name": "values", "type": "uint256[]" }, - { - "internalType": "string[]", - "name": "signatures", - "type": "string[]" - }, { "internalType": "bytes[]", "name": "calldatas", @@ -1154,23 +1241,10 @@ "outputs": [ { "internalType": "uint256", - "name": "proposalId", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "proposalId", + "name": "", "type": "uint256" } ], - "name": "queue", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -1193,19 +1267,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "quorumVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -1240,7 +1301,7 @@ "name": "state", "outputs": [ { - "internalType": "enum IGovernorUpgradeable.ProposalState", + "internalType": "enum IGovernor.ProposalState", "name": "", "type": "uint8" } @@ -1267,19 +1328,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "timelock", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "version", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesQuorumFractionUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesQuorumFractionUpgradeable.json new file mode 100644 index 00000000..9208ce4e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesQuorumFractionUpgradeable.json @@ -0,0 +1,1490 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesQuorumFractionUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quorumDenominator", + "type": "uint256" + } + ], + "name": "GovernorInvalidQuorumFraction", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumDenominator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesSuperQuorumFractionUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesSuperQuorumFractionUpgradeable.json new file mode 100644 index 00000000..307b5d71 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesSuperQuorumFractionUpgradeable.json @@ -0,0 +1,1650 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "GovernorVotesSuperQuorumFractionUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorVotesSuperQuorumFractionUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quorumDenominator", + "type": "uint256" + } + ], + "name": "GovernorInvalidQuorumFraction", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "superQuorumNumerator", + "type": "uint256" + } + ], + "name": "GovernorInvalidQuorumTooLarge", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "superQuorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "GovernorInvalidSuperQuorumFraction", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "superQuorumNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quorumNumerator", + "type": "uint256" + } + ], + "name": "GovernorInvalidSuperQuorumTooSmall", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "string[]", + "name": "signatures", + "type": "string[]" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteStart", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "voteEnd", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "ProposalCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "ProposalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "etaSeconds", + "type": "uint256" + } + ], + "name": "ProposalQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "QuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldSuperQuorumNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSuperQuorumNumerator", + "type": "uint256" + } + ], + "name": "SuperQuorumNumeratorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "VoteCast", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "VoteCastWithParams", + "type": "event" + }, + { + "inputs": [], + "name": "BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "COUNTING_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXTENDED_BALLOT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + } + ], + "name": "castVote", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "castVoteWithReason", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "support", + "type": "uint8" + }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "castVoteWithReasonAndParamsBySig", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "params", + "type": "bytes" + } + ], + "name": "getVotesWithParams", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasVoted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "hashProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalDeadline", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalProposer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proposalThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "againstVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "forVotes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "abstainVotes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "name": "propose", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "queue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumDenominator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "relay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "state", + "outputs": [ + { + "internalType": "enum IGovernor.ProposalState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "superQuorum", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "superQuorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "superQuorumNumerator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC5805", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSuperQuorumNumerator", + "type": "uint256" + } + ], + "name": "updateSuperQuorumNumerator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "votingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesUpgradeable.json similarity index 76% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesUpgradeable.json index 57cdafcc..44e1fff6 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/GovernorVotesQuorumFractionUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/GovernorVotesUpgradeable.json @@ -1,11 +1,240 @@ { "_format": "hh-sol-artifact-1", - "contractName": "GovernorVotesQuorumFractionUpgradeable", - "sourceName": "contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol", + "contractName": "GovernorVotesUpgradeable", + "sourceName": "contracts/governance/extensions/GovernorVotesUpgradeable.sol", "abi": [ { "inputs": [], - "name": "Empty", + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorAlreadyCastVote", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorAlreadyQueuedProposal", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorDisabledDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + } + ], + "name": "GovernorInsufficientProposerVotes", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "calldatas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "GovernorInvalidProposalLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "GovernorInvalidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteParams", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorInvalidVoteType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "votingPeriod", + "type": "uint256" + } + ], + "name": "GovernorInvalidVotingPeriod", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNonexistentProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "GovernorNotQueuedProposal", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorOnlyExecutor", + "type": "error" + }, + { + "inputs": [], + "name": "GovernorQueueNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "proposer", + "type": "address" + } + ], + "name": "GovernorRestrictedProposer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "GovernorUnableToCancel", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + }, + { + "internalType": "enum IGovernor.ProposalState", + "name": "current", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "GovernorUnexpectedProposalState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", "type": "error" }, { @@ -19,9 +248,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -120,17 +349,17 @@ { "indexed": false, "internalType": "uint256", - "name": "oldQuorumNumerator", + "name": "proposalId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newQuorumNumerator", + "name": "etaSeconds", "type": "uint256" } ], - "name": "QuorumNumeratorUpdated", + "name": "ProposalQueued", "type": "event" }, { @@ -336,19 +565,14 @@ "type": "uint8" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" + "internalType": "address", + "name": "voter", + "type": "address" }, { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteBySig", @@ -437,6 +661,11 @@ "name": "support", "type": "uint8" }, + { + "internalType": "address", + "name": "voter", + "type": "address" + }, { "internalType": "string", "name": "reason", @@ -448,19 +677,9 @@ "type": "bytes" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bytes", + "name": "signature", + "type": "bytes" } ], "name": "castVoteWithReasonAndParamsBySig", @@ -564,6 +783,40 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" + } + ], + "name": "getProposalId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -688,6 +941,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -819,6 +1091,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" + } + ], + "name": "proposalEta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposalNeedsQueuing", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -907,25 +1217,27 @@ { "inputs": [ { - "internalType": "uint256", - "name": "timepoint", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "calldatas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "descriptionHash", + "type": "bytes32" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quorumDenominator", + "name": "queue", "outputs": [ { "internalType": "uint256", @@ -933,7 +1245,7 @@ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -944,20 +1256,7 @@ "type": "uint256" } ], - "name": "quorumNumerator", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quorumNumerator", + "name": "quorum", "outputs": [ { "internalType": "uint256", @@ -1002,7 +1301,7 @@ "name": "state", "outputs": [ { - "internalType": "enum IGovernorUpgradeable.ProposalState", + "internalType": "enum IGovernor.ProposalState", "name": "", "type": "uint8" } @@ -1034,7 +1333,7 @@ "name": "token", "outputs": [ { - "internalType": "contract IERC5805Upgradeable", + "internalType": "contract IERC5805", "name": "", "type": "address" } @@ -1042,19 +1341,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newQuorumNumerator", - "type": "uint256" - } - ], - "name": "updateQuorumNumerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "version", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913Upgradeable.json new file mode 100644 index 00000000..8ee984d9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913Upgradeable.json @@ -0,0 +1,196 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MultiSignerERC7913Upgradeable", + "sourceName": "contracts/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913AlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913NonexistentSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "signers", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "MultiSignerERC7913UnreachableThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "MultiSignerERC7913ZeroThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "ERC7913ThresholdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "getSignerCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "start", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "end", + "type": "uint64" + } + ], + "name": "getSigners", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "isSigner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913WeightedUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913WeightedUpgradeable.json new file mode 100644 index 00000000..f0eb1cb2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MultiSignerERC7913WeightedUpgradeable.json @@ -0,0 +1,284 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MultiSignerERC7913WeightedUpgradeable", + "sourceName": "contracts/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913AlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913InvalidSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "MultiSignerERC7913NonexistentSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "signers", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "MultiSignerERC7913UnreachableThreshold", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "weight", + "type": "uint64" + } + ], + "name": "MultiSignerERC7913WeightedInvalidWeight", + "type": "error" + }, + { + "inputs": [], + "name": "MultiSignerERC7913WeightedMismatchedLength", + "type": "error" + }, + { + "inputs": [], + "name": "MultiSignerERC7913ZeroThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signers", + "type": "bytes" + } + ], + "name": "ERC7913SignerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes", + "name": "signer", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "weight", + "type": "uint64" + } + ], + "name": "ERC7913SignerWeightChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "ERC7913ThresholdSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "getSignerCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "start", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "end", + "type": "uint64" + } + ], + "name": "getSigners", + "outputs": [ + { + "internalType": "bytes[]", + "name": "", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "isSigner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "signer", + "type": "bytes" + } + ], + "name": "signerWeight", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalWeight", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MulticallUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MulticallUpgradeable.json similarity index 60% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MulticallUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MulticallUpgradeable.json index e9c13b32..30a886f9 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/MulticallUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/MulticallUpgradeable.json @@ -3,14 +3,40 @@ "contractName": "MulticallUpgradeable", "sourceName": "contracts/utils/MulticallUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesKeyedUpgradeable.json similarity index 58% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesKeyedUpgradeable.json index 65de162e..04726199 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/IERC2612Upgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesKeyedUpgradeable.json @@ -1,20 +1,46 @@ { "_format": "hh-sol-artifact-1", - "contractName": "IERC2612Upgradeable", - "sourceName": "contracts/interfaces/IERC2612Upgradeable.sol", + "contractName": "NoncesKeyedUpgradeable", + "sourceName": "contracts/utils/NoncesKeyedUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, { "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" } ], - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { "inputs": [ @@ -43,39 +69,20 @@ "type": "address" }, { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, + "internalType": "uint192", + "name": "key", + "type": "uint192" + } + ], + "name": "nonces", + "outputs": [ { "internalType": "uint256", - "name": "deadline", + "name": "", "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" } ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" } ], diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesUpgradeable.json similarity index 54% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesUpgradeable.json index 4322c93c..ce57d8ac 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PullPaymentUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/NoncesUpgradeable.json @@ -1,16 +1,42 @@ { "_format": "hh-sol-artifact-1", - "contractName": "PullPaymentUpgradeable", - "sourceName": "contracts/security/PullPaymentUpgradeable.sol", + "contractName": "NoncesUpgradeable", + "sourceName": "contracts/utils/NoncesUpgradeable.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -20,11 +46,11 @@ "inputs": [ { "internalType": "address", - "name": "dest", + "name": "owner", "type": "address" } ], - "name": "payments", + "name": "nonces", "outputs": [ { "internalType": "uint256", @@ -34,19 +60,6 @@ ], "stateMutability": "view", "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "payee", - "type": "address" - } - ], - "name": "withdrawPayments", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" } ], "bytecode": "0x", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Ownable2StepUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/Ownable2StepUpgradeable.json similarity index 77% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Ownable2StepUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/Ownable2StepUpgradeable.json index 42546486..074253ec 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/Ownable2StepUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/Ownable2StepUpgradeable.json @@ -3,14 +3,46 @@ "contractName": "Ownable2StepUpgradeable", "sourceName": "contracts/access/Ownable2StepUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/OwnableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/OwnableUpgradeable.json similarity index 69% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/OwnableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/OwnableUpgradeable.json index 4b602ae1..24a23895 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/OwnableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/OwnableUpgradeable.json @@ -3,14 +3,46 @@ "contractName": "OwnableUpgradeable", "sourceName": "contracts/access/OwnableUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PausableUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/PausableUpgradeable.json similarity index 70% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PausableUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/PausableUpgradeable.json index 5ed571ec..65b19fb9 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/PausableUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/PausableUpgradeable.json @@ -1,16 +1,36 @@ { "_format": "hh-sol-artifact-1", "contractName": "PausableUpgradeable", - "sourceName": "contracts/security/PausableUpgradeable.sol", + "sourceName": "contracts/utils/PausableUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerECDSAUpgradeable.json similarity index 50% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerECDSAUpgradeable.json index f0d3d16d..87359133 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/ERC165StorageUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerECDSAUpgradeable.json @@ -1,35 +1,39 @@ { "_format": "hh-sol-artifact-1", - "contractName": "ERC165StorageUpgradeable", - "sourceName": "contracts/utils/introspection/ERC165StorageUpgradeable.sol", + "contractName": "SignerECDSAUpgradeable", + "sourceName": "contracts/utils/cryptography/signers/SignerECDSAUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", "type": "event" }, { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", + "inputs": [], + "name": "signer", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerERC7913Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerERC7913Upgradeable.json new file mode 100644 index 00000000..1dc92faa --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerERC7913Upgradeable.json @@ -0,0 +1,47 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignerERC7913Upgradeable", + "sourceName": "contracts/utils/cryptography/signers/SignerERC7913Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "signer", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerP256Upgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerP256Upgradeable.json new file mode 100644 index 00000000..be16c5e4 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerP256Upgradeable.json @@ -0,0 +1,68 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignerP256Upgradeable", + "sourceName": "contracts/utils/cryptography/signers/SignerP256Upgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "qx", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "qy", + "type": "bytes32" + } + ], + "name": "SignerP256InvalidPublicKey", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "signer", + "outputs": [ + { + "internalType": "bytes32", + "name": "qx", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "qy", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerRSAUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerRSAUpgradeable.json new file mode 100644 index 00000000..052dc77f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerRSAUpgradeable.json @@ -0,0 +1,52 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignerRSAUpgradeable", + "sourceName": "contracts/utils/cryptography/signers/SignerRSAUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "signer", + "outputs": [ + { + "internalType": "bytes", + "name": "e", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "n", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerWebAuthnUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerWebAuthnUpgradeable.json new file mode 100644 index 00000000..5aa066d5 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/SignerWebAuthnUpgradeable.json @@ -0,0 +1,68 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "SignerWebAuthnUpgradeable", + "sourceName": "contracts/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "qx", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "qy", + "type": "bytes32" + } + ], + "name": "SignerP256InvalidPublicKey", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "signer", + "outputs": [ + { + "internalType": "bytes32", + "name": "qx", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "qy", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/TimelockControllerUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/TimelockControllerUpgradeable.json new file mode 100644 index 00000000..6fb61342 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/TimelockControllerUpgradeable.json @@ -0,0 +1,1032 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TimelockControllerUpgradeable", + "sourceName": "contracts/governance/TimelockControllerUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minDelay", + "type": "uint256" + } + ], + "name": "TimelockInsufficientDelay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "targets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payloads", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "values", + "type": "uint256" + } + ], + "name": "TimelockInvalidOperationLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "TimelockUnauthorizedCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "predecessorId", + "type": "bytes32" + } + ], + "name": "TimelockUnexecutedPredecessor", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "operationId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "expectedStates", + "type": "bytes32" + } + ], + "name": "TimelockUnexpectedOperationState", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "CallExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "CallSalt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "CallScheduled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "Cancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldDuration", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newDuration", + "type": "uint256" + } + ], + "name": "MinDelayChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "CANCELLER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EXECUTOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PROPOSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "cancel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "executeBatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getMinDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getOperationState", + "outputs": [ + { + "internalType": "enum TimelockControllerUpgradeable.OperationState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "getTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperation", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "hashOperationBatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minDelay", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "proposers", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "executors", + "type": "address[]" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationDone", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationPending", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "isOperationReady", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "schedule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "targets", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + }, + { + "internalType": "bytes[]", + "name": "payloads", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "predecessor", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "name": "scheduleBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newDelay", + "type": "uint256" + } + ], + "name": "updateDelay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50611e108061001c5f395ff3fe6080604052600436106101bd575f3560e01c80638065657f116100f2578063bc197c8111610092578063d547741f11610062578063d547741f14610547578063e38335e514610566578063f23a6e6114610579578063f27a0c92146105a4575f5ffd5b8063bc197c81146104a7578063c4c4c7b3146104d2578063c4d252f5146104f1578063d45c443514610510575f5ffd5b806391d14854116100cd57806391d1485414610423578063a217fddf14610442578063b08e51c014610455578063b1c5f42714610488575f5ffd5b80638065657f146103c55780638f2a0bb0146103e45780638f61f4f514610403575f5ffd5b80632ab0f5291161015d57806336568abe1161013857806336568abe1461033c578063584b153e1461035b57806364d623531461037a5780637958004c14610399575f5ffd5b80632ab0f529146102df5780632f2ff15d146102fe57806331d507501461031d575f5ffd5b8063134008d311610198578063134008d31461024b57806313bc9f201461025e578063150b7a021461027d578063248a9ca3146102c0575f5ffd5b806301d5062a146101c857806301ffc9a7146101e957806307bd02651461021d575f5ffd5b366101c457005b5f5ffd5b3480156101d3575f5ffd5b506101e76101e2366004611468565b6105d7565b005b3480156101f4575f5ffd5b506102086102033660046114d6565b610698565b60405190151581526020015b60405180910390f35b348015610228575f5ffd5b5061023d5f516020611dbb5f395f51905f5281565b604051908152602001610214565b6101e76102593660046114fd565b6106a8565b348015610269575f5ffd5b50610208610278366004611563565b610747565b348015610288575f5ffd5b506102a7610297366004611629565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610214565b3480156102cb575f5ffd5b5061023d6102da366004611563565b61076c565b3480156102ea575f5ffd5b506102086102f9366004611563565b61078c565b348015610309575f5ffd5b506101e761031836600461168c565b610794565b348015610328575f5ffd5b50610208610337366004611563565b6107b6565b348015610347575f5ffd5b506101e761035636600461168c565b6107da565b348015610366575f5ffd5b50610208610375366004611563565b610812565b348015610385575f5ffd5b506101e7610394366004611563565b610857565b3480156103a4575f5ffd5b506103b86103b3366004611563565b6108db565b60405161021491906116ca565b3480156103d0575f5ffd5b5061023d6103df3660046114fd565b61092f565b3480156103ef575f5ffd5b506101e76103fe366004611730565b61096d565b34801561040e575f5ffd5b5061023d5f516020611d9b5f395f51905f5281565b34801561042e575f5ffd5b5061020861043d36600461168c565b610ae6565b34801561044d575f5ffd5b5061023d5f81565b348015610460575f5ffd5b5061023d7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b348015610493575f5ffd5b5061023d6104a23660046117e2565b610b1c565b3480156104b2575f5ffd5b506102a76104c1366004611918565b63bc197c8160e01b95945050505050565b3480156104dd575f5ffd5b506101e76104ec366004611a26565b610b60565b3480156104fc575f5ffd5b506101e761050b366004611563565b610c5c565b34801561051b575f5ffd5b5061023d61052a366004611563565b5f9081525f516020611d5b5f395f51905f52602052604090205490565b348015610552575f5ffd5b506101e761056136600461168c565b610d15565b6101e76105743660046117e2565b610d31565b348015610584575f5ffd5b506102a7610593366004611aa2565b63f23a6e6160e01b95945050505050565b3480156105af575f5ffd5b507f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb36015461023d565b5f516020611d9b5f395f51905f526105ee81610e9f565b5f6105fd89898989898961092f565b90506106098184610eac565b5f817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161064496959493929190611b1d565b60405180910390a3831561068d57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161068491815260200190565b60405180910390a25b505050505050505050565b5f6106a282610f6b565b92915050565b5f516020611dbb5f395f51905f526106c0815f610ae6565b6106ce576106ce8133610f9f565b5f6106dd88888888888861092f565b90506106e98185610fdc565b6106f58888888861102a565b5f817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161072c9493929190611b59565b60405180910390a361073d8161109e565b5050505050505050565b5f60025b610754836108db565b6003811115610765576107656116b6565b1492915050565b5f9081525f516020611d7b5f395f51905f52602052604090206001015490565b5f600361074b565b61079d8261076c565b6107a681610e9f565b6107b083836110d5565b50505050565b5f806107c1836108db565b60038111156107d2576107d26116b6565b141592915050565b6001600160a01b03811633146108035760405163334bd91960e11b815260040160405180910390fd5b61080d8282611176565b505050565b5f5f61081d836108db565b90506001816003811115610833576108336116b6565b14806108505750600281600381111561084e5761084e6116b6565b145b9392505050565b5f516020611d5b5f395f51905f52333081146108965760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b600182015460408051918252602082018590527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15060010155565b5f8181525f516020611d5b5f395f51905f526020526040812054805f0361090457505f92915050565b600181036109155750600392915050565b428111156109265750600192915050565b50600292915050565b5f86868686868660405160200161094b96959493929190611b1d565b6040516020818303038152906040528051906020012090509695505050505050565b5f516020611d9b5f395f51905f5261098481610e9f565b88871415806109935750888514155b156109c5576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161088d565b5f6109d68b8b8b8b8b8b8b8b610b1c565b90506109e28184610eac565b5f5b8a811015610a975780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a2157610a21611b8a565b9050602002016020810190610a369190611b9e565b8d8d86818110610a4857610a48611b8a565b905060200201358c8c87818110610a6157610a61611b8a565b9050602002810190610a739190611bb7565b8c8b604051610a8796959493929190611b1d565b60405180910390a36001016109e4565b508315610ad957807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610ad091815260200190565b60405180910390a25b5050505050505050505050565b5f9182525f516020611d7b5f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8888888888888888604051602001610b3c989796959493929190611c8d565b60405160208183030381529060405280519060200120905098975050505050505050565b5f610b696111ef565b805490915060ff600160401b82041615906001600160401b03165f81158015610b8f5750825b90505f826001600160401b03166001148015610baa5750303b155b905081158015610bb8575080155b15610bd65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610c0057845460ff60401b1916600160401b1785555b610c0c89898989611217565b831561068d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610c8681610e9f565b5f516020611d5b5f395f51905f52610c9d83610812565b610cd95782610cac600261122b565b610cb6600161122b565b604051635ead8eb560e01b8152600481019390935217602482015260440161088d565b5f838152602082905260408082208290555184917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a2505050565b610d1e8261076c565b610d2781610e9f565b6107b08383611176565b5f516020611dbb5f395f51905f52610d49815f610ae6565b610d5757610d578133610f9f565b8786141580610d665750878414155b15610d98576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161088d565b5f610da98a8a8a8a8a8a8a8a610b1c565b9050610db58185610fdc565b5f5b89811015610e89575f8b8b83818110610dd257610dd2611b8a565b9050602002016020810190610de79190611b9e565b90505f8a8a84818110610dfc57610dfc611b8a565b905060200201359050365f8a8a86818110610e1957610e19611b8a565b9050602002810190610e2b9190611bb7565b91509150610e3b8484848461102a565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610e729493929190611b59565b60405180910390a350505050806001019050610db7565b50610e938161109e565b50505050505050505050565b610ea98133610f9f565b50565b5f516020611d5b5f395f51905f52610ec3836107b6565b15610ef45782610ed25f61122b565b604051635ead8eb560e01b81526004810192909252602482015260440161088d565b5f610f1d7f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb36015490565b905080831015610f4a57604051635433660960e01b8152600481018490526024810182905260440161088d565b610f548342611d2c565b5f9485526020929092525060409092209190915550565b5f6001600160e01b03198216630271189760e51b14806106a257506301ffc9a760e01b6001600160e01b03198316146106a2565b610fa98282610ae6565b610fd85760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161088d565b5050565b610fe582610747565b610ff45781610ed2600261122b565b801580159061100957506110078161078c565b155b15610fd85760405163121534c360e31b81526004810182905260240161088d565b5f5f856001600160a01b0316858585604051611047929190611d4b565b5f6040518083038185875af1925050503d805f8114611081576040519150601f19603f3d011682016040523d82523d5f602084013e611086565b606091505b5091509150611095828261124d565b50505050505050565b5f516020611d5b5f395f51905f526110b582610747565b6110c45781610ed2600261122b565b5f9182526020526040902060019055565b5f5f516020611d7b5f395f51905f526110ee8484610ae6565b61116d575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556111233390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106a2565b5f9150506106a2565b5f5f516020611d7b5f395f51905f5261118f8484610ae6565b1561116d575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106a2565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006106a2565b61121f61128a565b6107b0848484846112b1565b5f81600381111561123e5761123e6116b6565b600160ff919091161b92915050565b6060821561125c5750806106a2565b8151156112715761126c826113e8565b6106a2565b60405163d6bda27560e01b815260040160405180910390fd5b6112926113f0565b6112af57604051631afcd79f60e31b815260040160405180910390fd5b565b6112b961128a565b5f516020611d5b5f395f51905f526112d15f306110d5565b506001600160a01b038216156112ed576112eb5f836110d5565b505b5f5b8451811015611368576113285f516020611d9b5f395f51905f5286838151811061131b5761131b611b8a565b60200260200101516110d5565b5061135f7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78386838151811061131b5761131b611b8a565b506001016112ef565b505f5b83518110156113a0576113975f516020611dbb5f395f51905f5285838151811061131b5761131b611b8a565b5060010161136b565b5060018101859055604080515f8152602081018790527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15050505050565b805160208201fd5b5f6113f96111ef565b54600160401b900460ff16919050565b80356001600160a01b038116811461141f575f5ffd5b919050565b5f5f83601f840112611434575f5ffd5b5081356001600160401b0381111561144a575f5ffd5b602083019150836020828501011115611461575f5ffd5b9250929050565b5f5f5f5f5f5f5f60c0888a03121561147e575f5ffd5b61148788611409565b96506020880135955060408801356001600160401b038111156114a8575f5ffd5b6114b48a828b01611424565b989b979a50986060810135976080820135975060a09091013595509350505050565b5f602082840312156114e6575f5ffd5b81356001600160e01b031981168114610850575f5ffd5b5f5f5f5f5f5f60a08789031215611512575f5ffd5b61151b87611409565b95506020870135945060408701356001600160401b0381111561153c575f5ffd5b61154889828a01611424565b979a9699509760608101359660809091013595509350505050565b5f60208284031215611573575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156115b6576115b661157a565b604052919050565b5f82601f8301126115cd575f5ffd5b81356001600160401b038111156115e6576115e661157a565b6115f9601f8201601f191660200161158e565b81815284602083860101111561160d575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f6080858703121561163c575f5ffd5b61164585611409565b935061165360208601611409565b92506040850135915060608501356001600160401b03811115611674575f5ffd5b611680878288016115be565b91505092959194509250565b5f5f6040838503121561169d575f5ffd5b823591506116ad60208401611409565b90509250929050565b634e487b7160e01b5f52602160045260245ffd5b60208101600483106116ea57634e487b7160e01b5f52602160045260245ffd5b91905290565b5f5f83601f840112611700575f5ffd5b5081356001600160401b03811115611716575f5ffd5b6020830191508360208260051b8501011115611461575f5ffd5b5f5f5f5f5f5f5f5f5f60c08a8c031215611748575f5ffd5b89356001600160401b0381111561175d575f5ffd5b6117698c828d016116f0565b909a5098505060208a01356001600160401b03811115611787575f5ffd5b6117938c828d016116f0565b90985096505060408a01356001600160401b038111156117b1575f5ffd5b6117bd8c828d016116f0565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b5f5f5f5f5f5f5f5f60a0898b0312156117f9575f5ffd5b88356001600160401b0381111561180e575f5ffd5b61181a8b828c016116f0565b90995097505060208901356001600160401b03811115611838575f5ffd5b6118448b828c016116f0565b90975095505060408901356001600160401b03811115611862575f5ffd5b61186e8b828c016116f0565b999c989b509699959896976060870135966080013595509350505050565b5f6001600160401b038211156118a4576118a461157a565b5060051b60200190565b5f82601f8301126118bd575f5ffd5b81356118d06118cb8261188c565b61158e565b8082825260208201915060208360051b8601019250858311156118f1575f5ffd5b602085015b8381101561190e5780358352602092830192016118f6565b5095945050505050565b5f5f5f5f5f60a0868803121561192c575f5ffd5b61193586611409565b945061194360208701611409565b935060408601356001600160401b0381111561195d575f5ffd5b611969888289016118ae565b93505060608601356001600160401b03811115611984575f5ffd5b611990888289016118ae565b92505060808601356001600160401b038111156119ab575f5ffd5b6119b7888289016115be565b9150509295509295909350565b5f82601f8301126119d3575f5ffd5b81356119e16118cb8261188c565b8082825260208201915060208360051b860101925085831115611a02575f5ffd5b602085015b8381101561190e57611a1881611409565b835260209283019201611a07565b5f5f5f5f60808587031215611a39575f5ffd5b8435935060208501356001600160401b03811115611a55575f5ffd5b611a61878288016119c4565b93505060408501356001600160401b03811115611a7c575f5ffd5b611a88878288016119c4565b925050611a9760608601611409565b905092959194509250565b5f5f5f5f5f60a08688031215611ab6575f5ffd5b611abf86611409565b9450611acd60208701611409565b9350604086013592506060860135915060808601356001600160401b038111156119ab575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201525f611b4460a083018688611af5565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201525f611b80606083018486611af5565b9695505050505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611bae575f5ffd5b61085082611409565b5f5f8335601e19843603018112611bcc575f5ffd5b8301803591506001600160401b03821115611be5575f5ffd5b602001915036819003821315611461575f5ffd5b5f8383855260208501945060208460051b820101835f5b86811015611c8157838303601f19018852813536879003601e19018112611c35575f5ffd5b86016020810190356001600160401b03811115611c50575f5ffd5b803603821315611c5e575f5ffd5b611c69858284611af5565b60209a8b019a90955093909301925050600101611c10565b50909695505050505050565b60a080825281018890525f8960c08301825b8b811015611ccd576001600160a01b03611cb884611409565b16825260209283019290910190600101611c9f565b5083810360208501528881526001600160fb1b03891115611cec575f5ffd5b8860051b9150818a60208301370182810360209081016040850152611d149082018789611bf9565b60608401959095525050608001529695505050505050565b808201808211156106a257634e487b7160e01b5f52601160045260245ffd5b818382375f910190815291905056fe9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb360002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63a264697066735822122029338e94b39d2df468baa3981ad2691473593f70d7c2e29f0c57958dd1f8a27564736f6c634300081f0033", + "deployedBytecode": "0x6080604052600436106101bd575f3560e01c80638065657f116100f2578063bc197c8111610092578063d547741f11610062578063d547741f14610547578063e38335e514610566578063f23a6e6114610579578063f27a0c92146105a4575f5ffd5b8063bc197c81146104a7578063c4c4c7b3146104d2578063c4d252f5146104f1578063d45c443514610510575f5ffd5b806391d14854116100cd57806391d1485414610423578063a217fddf14610442578063b08e51c014610455578063b1c5f42714610488575f5ffd5b80638065657f146103c55780638f2a0bb0146103e45780638f61f4f514610403575f5ffd5b80632ab0f5291161015d57806336568abe1161013857806336568abe1461033c578063584b153e1461035b57806364d623531461037a5780637958004c14610399575f5ffd5b80632ab0f529146102df5780632f2ff15d146102fe57806331d507501461031d575f5ffd5b8063134008d311610198578063134008d31461024b57806313bc9f201461025e578063150b7a021461027d578063248a9ca3146102c0575f5ffd5b806301d5062a146101c857806301ffc9a7146101e957806307bd02651461021d575f5ffd5b366101c457005b5f5ffd5b3480156101d3575f5ffd5b506101e76101e2366004611468565b6105d7565b005b3480156101f4575f5ffd5b506102086102033660046114d6565b610698565b60405190151581526020015b60405180910390f35b348015610228575f5ffd5b5061023d5f516020611dbb5f395f51905f5281565b604051908152602001610214565b6101e76102593660046114fd565b6106a8565b348015610269575f5ffd5b50610208610278366004611563565b610747565b348015610288575f5ffd5b506102a7610297366004611629565b630a85bd0160e11b949350505050565b6040516001600160e01b03199091168152602001610214565b3480156102cb575f5ffd5b5061023d6102da366004611563565b61076c565b3480156102ea575f5ffd5b506102086102f9366004611563565b61078c565b348015610309575f5ffd5b506101e761031836600461168c565b610794565b348015610328575f5ffd5b50610208610337366004611563565b6107b6565b348015610347575f5ffd5b506101e761035636600461168c565b6107da565b348015610366575f5ffd5b50610208610375366004611563565b610812565b348015610385575f5ffd5b506101e7610394366004611563565b610857565b3480156103a4575f5ffd5b506103b86103b3366004611563565b6108db565b60405161021491906116ca565b3480156103d0575f5ffd5b5061023d6103df3660046114fd565b61092f565b3480156103ef575f5ffd5b506101e76103fe366004611730565b61096d565b34801561040e575f5ffd5b5061023d5f516020611d9b5f395f51905f5281565b34801561042e575f5ffd5b5061020861043d36600461168c565b610ae6565b34801561044d575f5ffd5b5061023d5f81565b348015610460575f5ffd5b5061023d7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b348015610493575f5ffd5b5061023d6104a23660046117e2565b610b1c565b3480156104b2575f5ffd5b506102a76104c1366004611918565b63bc197c8160e01b95945050505050565b3480156104dd575f5ffd5b506101e76104ec366004611a26565b610b60565b3480156104fc575f5ffd5b506101e761050b366004611563565b610c5c565b34801561051b575f5ffd5b5061023d61052a366004611563565b5f9081525f516020611d5b5f395f51905f52602052604090205490565b348015610552575f5ffd5b506101e761056136600461168c565b610d15565b6101e76105743660046117e2565b610d31565b348015610584575f5ffd5b506102a7610593366004611aa2565b63f23a6e6160e01b95945050505050565b3480156105af575f5ffd5b507f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb36015461023d565b5f516020611d9b5f395f51905f526105ee81610e9f565b5f6105fd89898989898961092f565b90506106098184610eac565b5f817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161064496959493929190611b1d565b60405180910390a3831561068d57807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161068491815260200190565b60405180910390a25b505050505050505050565b5f6106a282610f6b565b92915050565b5f516020611dbb5f395f51905f526106c0815f610ae6565b6106ce576106ce8133610f9f565b5f6106dd88888888888861092f565b90506106e98185610fdc565b6106f58888888861102a565b5f817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161072c9493929190611b59565b60405180910390a361073d8161109e565b5050505050505050565b5f60025b610754836108db565b6003811115610765576107656116b6565b1492915050565b5f9081525f516020611d7b5f395f51905f52602052604090206001015490565b5f600361074b565b61079d8261076c565b6107a681610e9f565b6107b083836110d5565b50505050565b5f806107c1836108db565b60038111156107d2576107d26116b6565b141592915050565b6001600160a01b03811633146108035760405163334bd91960e11b815260040160405180910390fd5b61080d8282611176565b505050565b5f5f61081d836108db565b90506001816003811115610833576108336116b6565b14806108505750600281600381111561084e5761084e6116b6565b145b9392505050565b5f516020611d5b5f395f51905f52333081146108965760405163e2850c5960e01b81526001600160a01b03821660048201526024015b60405180910390fd5b600182015460408051918252602082018590527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15060010155565b5f8181525f516020611d5b5f395f51905f526020526040812054805f0361090457505f92915050565b600181036109155750600392915050565b428111156109265750600192915050565b50600292915050565b5f86868686868660405160200161094b96959493929190611b1d565b6040516020818303038152906040528051906020012090509695505050505050565b5f516020611d9b5f395f51905f5261098481610e9f565b88871415806109935750888514155b156109c5576040516001624fcdef60e01b03198152600481018a9052602481018690526044810188905260640161088d565b5f6109d68b8b8b8b8b8b8b8b610b1c565b90506109e28184610eac565b5f5b8a811015610a975780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e85818110610a2157610a21611b8a565b9050602002016020810190610a369190611b9e565b8d8d86818110610a4857610a48611b8a565b905060200201358c8c87818110610a6157610a61611b8a565b9050602002810190610a739190611bb7565b8c8b604051610a8796959493929190611b1d565b60405180910390a36001016109e4565b508315610ad957807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610ad091815260200190565b60405180910390a25b5050505050505050505050565b5f9182525f516020611d7b5f395f51905f52602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8888888888888888604051602001610b3c989796959493929190611c8d565b60405160208183030381529060405280519060200120905098975050505050505050565b5f610b696111ef565b805490915060ff600160401b82041615906001600160401b03165f81158015610b8f5750825b90505f826001600160401b03166001148015610baa5750303b155b905081158015610bb8575080155b15610bd65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610c0057845460ff60401b1916600160401b1785555b610c0c89898989611217565b831561068d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783610c8681610e9f565b5f516020611d5b5f395f51905f52610c9d83610812565b610cd95782610cac600261122b565b610cb6600161122b565b604051635ead8eb560e01b8152600481019390935217602482015260440161088d565b5f838152602082905260408082208290555184917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a2505050565b610d1e8261076c565b610d2781610e9f565b6107b08383611176565b5f516020611dbb5f395f51905f52610d49815f610ae6565b610d5757610d578133610f9f565b8786141580610d665750878414155b15610d98576040516001624fcdef60e01b0319815260048101899052602481018590526044810187905260640161088d565b5f610da98a8a8a8a8a8a8a8a610b1c565b9050610db58185610fdc565b5f5b89811015610e89575f8b8b83818110610dd257610dd2611b8a565b9050602002016020810190610de79190611b9e565b90505f8a8a84818110610dfc57610dfc611b8a565b905060200201359050365f8a8a86818110610e1957610e19611b8a565b9050602002810190610e2b9190611bb7565b91509150610e3b8484848461102a565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610e729493929190611b59565b60405180910390a350505050806001019050610db7565b50610e938161109e565b50505050505050505050565b610ea98133610f9f565b50565b5f516020611d5b5f395f51905f52610ec3836107b6565b15610ef45782610ed25f61122b565b604051635ead8eb560e01b81526004810192909252602482015260440161088d565b5f610f1d7f9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb36015490565b905080831015610f4a57604051635433660960e01b8152600481018490526024810182905260440161088d565b610f548342611d2c565b5f9485526020929092525060409092209190915550565b5f6001600160e01b03198216630271189760e51b14806106a257506301ffc9a760e01b6001600160e01b03198316146106a2565b610fa98282610ae6565b610fd85760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161088d565b5050565b610fe582610747565b610ff45781610ed2600261122b565b801580159061100957506110078161078c565b155b15610fd85760405163121534c360e31b81526004810182905260240161088d565b5f5f856001600160a01b0316858585604051611047929190611d4b565b5f6040518083038185875af1925050503d805f8114611081576040519150601f19603f3d011682016040523d82523d5f602084013e611086565b606091505b5091509150611095828261124d565b50505050505050565b5f516020611d5b5f395f51905f526110b582610747565b6110c45781610ed2600261122b565b5f9182526020526040902060019055565b5f5f516020611d7b5f395f51905f526110ee8484610ae6565b61116d575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556111233390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506106a2565b5f9150506106a2565b5f5f516020611d7b5f395f51905f5261118f8484610ae6565b1561116d575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506106a2565b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006106a2565b61121f61128a565b6107b0848484846112b1565b5f81600381111561123e5761123e6116b6565b600160ff919091161b92915050565b6060821561125c5750806106a2565b8151156112715761126c826113e8565b6106a2565b60405163d6bda27560e01b815260040160405180910390fd5b6112926113f0565b6112af57604051631afcd79f60e31b815260040160405180910390fd5b565b6112b961128a565b5f516020611d5b5f395f51905f526112d15f306110d5565b506001600160a01b038216156112ed576112eb5f836110d5565b505b5f5b8451811015611368576113285f516020611d9b5f395f51905f5286838151811061131b5761131b611b8a565b60200260200101516110d5565b5061135f7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78386838151811061131b5761131b611b8a565b506001016112ef565b505f5b83518110156113a0576113975f516020611dbb5f395f51905f5285838151811061131b5761131b611b8a565b5060010161136b565b5060018101859055604080515f8152602081018790527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a15050505050565b805160208201fd5b5f6113f96111ef565b54600160401b900460ff16919050565b80356001600160a01b038116811461141f575f5ffd5b919050565b5f5f83601f840112611434575f5ffd5b5081356001600160401b0381111561144a575f5ffd5b602083019150836020828501011115611461575f5ffd5b9250929050565b5f5f5f5f5f5f5f60c0888a03121561147e575f5ffd5b61148788611409565b96506020880135955060408801356001600160401b038111156114a8575f5ffd5b6114b48a828b01611424565b989b979a50986060810135976080820135975060a09091013595509350505050565b5f602082840312156114e6575f5ffd5b81356001600160e01b031981168114610850575f5ffd5b5f5f5f5f5f5f60a08789031215611512575f5ffd5b61151b87611409565b95506020870135945060408701356001600160401b0381111561153c575f5ffd5b61154889828a01611424565b979a9699509760608101359660809091013595509350505050565b5f60208284031215611573575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156115b6576115b661157a565b604052919050565b5f82601f8301126115cd575f5ffd5b81356001600160401b038111156115e6576115e661157a565b6115f9601f8201601f191660200161158e565b81815284602083860101111561160d575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f6080858703121561163c575f5ffd5b61164585611409565b935061165360208601611409565b92506040850135915060608501356001600160401b03811115611674575f5ffd5b611680878288016115be565b91505092959194509250565b5f5f6040838503121561169d575f5ffd5b823591506116ad60208401611409565b90509250929050565b634e487b7160e01b5f52602160045260245ffd5b60208101600483106116ea57634e487b7160e01b5f52602160045260245ffd5b91905290565b5f5f83601f840112611700575f5ffd5b5081356001600160401b03811115611716575f5ffd5b6020830191508360208260051b8501011115611461575f5ffd5b5f5f5f5f5f5f5f5f5f60c08a8c031215611748575f5ffd5b89356001600160401b0381111561175d575f5ffd5b6117698c828d016116f0565b909a5098505060208a01356001600160401b03811115611787575f5ffd5b6117938c828d016116f0565b90985096505060408a01356001600160401b038111156117b1575f5ffd5b6117bd8c828d016116f0565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b5f5f5f5f5f5f5f5f60a0898b0312156117f9575f5ffd5b88356001600160401b0381111561180e575f5ffd5b61181a8b828c016116f0565b90995097505060208901356001600160401b03811115611838575f5ffd5b6118448b828c016116f0565b90975095505060408901356001600160401b03811115611862575f5ffd5b61186e8b828c016116f0565b999c989b509699959896976060870135966080013595509350505050565b5f6001600160401b038211156118a4576118a461157a565b5060051b60200190565b5f82601f8301126118bd575f5ffd5b81356118d06118cb8261188c565b61158e565b8082825260208201915060208360051b8601019250858311156118f1575f5ffd5b602085015b8381101561190e5780358352602092830192016118f6565b5095945050505050565b5f5f5f5f5f60a0868803121561192c575f5ffd5b61193586611409565b945061194360208701611409565b935060408601356001600160401b0381111561195d575f5ffd5b611969888289016118ae565b93505060608601356001600160401b03811115611984575f5ffd5b611990888289016118ae565b92505060808601356001600160401b038111156119ab575f5ffd5b6119b7888289016115be565b9150509295509295909350565b5f82601f8301126119d3575f5ffd5b81356119e16118cb8261188c565b8082825260208201915060208360051b860101925085831115611a02575f5ffd5b602085015b8381101561190e57611a1881611409565b835260209283019201611a07565b5f5f5f5f60808587031215611a39575f5ffd5b8435935060208501356001600160401b03811115611a55575f5ffd5b611a61878288016119c4565b93505060408501356001600160401b03811115611a7c575f5ffd5b611a88878288016119c4565b925050611a9760608601611409565b905092959194509250565b5f5f5f5f5f60a08688031215611ab6575f5ffd5b611abf86611409565b9450611acd60208701611409565b9350604086013592506060860135915060808601356001600160401b038111156119ab575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201525f611b4460a083018688611af5565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201525f611b80606083018486611af5565b9695505050505050565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611bae575f5ffd5b61085082611409565b5f5f8335601e19843603018112611bcc575f5ffd5b8301803591506001600160401b03821115611be5575f5ffd5b602001915036819003821315611461575f5ffd5b5f8383855260208501945060208460051b820101835f5b86811015611c8157838303601f19018852813536879003601e19018112611c35575f5ffd5b86016020810190356001600160401b03811115611c50575f5ffd5b803603821315611c5e575f5ffd5b611c69858284611af5565b60209a8b019a90955093909301925050600101611c10565b50909695505050505050565b60a080825281018890525f8960c08301825b8b811015611ccd576001600160a01b03611cb884611409565b16825260209283019290910190600101611c9f565b5083810360208501528881526001600160fb1b03891115611cec575f5ffd5b8860051b9150818a60208301370182810360209081016040850152611d149082018789611bf9565b60608401959095525050608001529695505050505050565b808201808211156106a257634e487b7160e01b5f52601160045260245ffd5b818382375f910190815291905056fe9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb360002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63a264697066735822122029338e94b39d2df468baa3981ad2691473593f70d7c2e29f0c57958dd1f8a27564736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletCliffUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletCliffUpgradeable.json new file mode 100644 index 00000000..47b34096 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletCliffUpgradeable.json @@ -0,0 +1,394 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VestingWalletCliffUpgradeable", + "sourceName": "contracts/finance/VestingWalletCliffUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "cliffSeconds", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "durationSeconds", + "type": "uint64" + } + ], + "name": "InvalidCliffDuration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20Released", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EtherReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "cliff", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "end", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "uint64", + "name": "startTimestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "durationSeconds", + "type": "uint64" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletUpgradeable.json new file mode 100644 index 00000000..6d09016a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VestingWalletUpgradeable.json @@ -0,0 +1,365 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VestingWalletUpgradeable", + "sourceName": "contracts/finance/VestingWalletUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "FailedCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ERC20Released", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EtherReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "duration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "end", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "uint64", + "name": "startTimestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "durationSeconds", + "type": "uint64" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "releasable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "release", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "released", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "start", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + } + ], + "name": "vestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610bdb8061001c5f395ff3fe6080604052600436106100e7575f3560e01c80639613252111610087578063be9a655511610057578063be9a655514610249578063efbe1c1c1461025d578063f2fde38b14610271578063fbccedae14610290575f5ffd5b806396132521146101cc5780639852595c146101ec578063989a83661461020b578063a3f8eace1461022a575f5ffd5b8063715018a6116100c2578063715018a614610159578063810ec23b1461016d57806386d1a69f1461018c5780638da5cb5b146101a0575f5ffd5b80630a17b06b146100f25780630fb5a6b4146101245780631916558714610138575f5ffd5b366100ee57005b5f5ffd5b3480156100fd575f5ffd5b5061011161010c366004610a45565b6102a4565b6040519081526020015b60405180910390f35b34801561012f575f5ffd5b506101116102d3565b348015610143575f5ffd5b50610157610152366004610a74565b610309565b005b348015610164575f5ffd5b506101576103a9565b348015610178575f5ffd5b50610111610187366004610a8d565b6103bc565b348015610197575f5ffd5b50610157610440565b3480156101ab575f5ffd5b506101b46104b8565b6040516001600160a01b03909116815260200161011b565b3480156101d7575f5ffd5b505f516020610b865f395f51905f5254610111565b3480156101f7575f5ffd5b50610111610206366004610a74565b6104e6565b348015610216575f5ffd5b50610157610225366004610abe565b61051f565b348015610235575f5ffd5b50610111610244366004610a74565b61061c565b348015610254575f5ffd5b5061011161063a565b348015610268575f5ffd5b50610111610669565b34801561027c575f5ffd5b5061015761028b366004610a74565b610689565b34801561029b575f5ffd5b506101116106cb565b5f6102cd6102bd5f516020610b865f395f51905f525490565b6102c79047610b12565b836106f4565b92915050565b7fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa390254600160401b900467ffffffffffffffff1690565b5f516020610b865f395f51905f525f6103218361061c565b6001600160a01b0384165f90815260018401602052604081208054929350839290919061034f908490610b12565b90915550506040518181526001600160a01b038416907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a26103a48361039e6104b8565b83610773565b505050565b6103b16107a8565b6103ba5f6107da565b565b5f6104396103c9846104e6565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561040b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061042f9190610b25565b6102c79190610b12565b9392505050565b5f516020610b865f395f51905f525f6104576106cb565b905080825f015f82825461046b9190610b12565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a16104b46104ae6104b8565b8261084a565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03165f9081527fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa3901602052604090205490565b5f6105286108bd565b805490915060ff600160401b820416159067ffffffffffffffff165f8115801561054f5750825b90505f8267ffffffffffffffff16600114801561056b5750303b155b905081158015610579575080155b156105975760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156105c157845460ff60401b1916600160401b1785555b6105cc8888886108e5565b831561061257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b5f610626826104e6565b61063083426103bc565b6102cd9190610b3c565b7fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa39025467ffffffffffffffff1690565b5f6106726102d3565b61067a61063a565b6106849190610b12565b905090565b6106916107a8565b6001600160a01b0381166106bf57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6106c8816107da565b50565b5f6106e15f516020610b865f395f51905f525490565b6106ea426102a4565b6106849190610b3c565b5f6106fd61063a565b8267ffffffffffffffff16101561071557505f6102cd565b61071d610669565b8267ffffffffffffffff16106107345750816102cd565b61073c6102d3565b61074461063a565b6107589067ffffffffffffffff8516610b3c565b6107629085610b4f565b61076c9190610b66565b90506102cd565b6107808383836001610901565b6103a457604051635274afe760e01b81526001600160a01b03841660048201526024016106b6565b336107b16104b8565b6001600160a01b0316146103ba5760405163118cdaa760e01b81523360048201526024016106b6565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b804710156108745760405163cf47918160e01b8152476004820152602481018290526044016106b6565b61088d828260405180602001604052805f815250610963565b15610896575050565b3d156108a4576104b4610978565b60405163d6bda27560e01b815260040160405180910390fd5b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006102cd565b6108ed610983565b6108f6836109a8565b6103a48383836109b0565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f5114831661095757838315161561094b573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b61098b610a10565b6103ba57604051631afcd79f60e31b815260040160405180910390fd5b610691610983565b6109b8610983565b7fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa3902805467ffffffffffffffff928316600160401b026fffffffffffffffffffffffffffffffff19909116939092169290921717905550565b5f610a196108bd565b54600160401b900460ff16919050565b803567ffffffffffffffff81168114610a40575f5ffd5b919050565b5f60208284031215610a55575f5ffd5b61043982610a29565b80356001600160a01b0381168114610a40575f5ffd5b5f60208284031215610a84575f5ffd5b61043982610a5e565b5f5f60408385031215610a9e575f5ffd5b610aa783610a5e565b9150610ab560208401610a29565b90509250929050565b5f5f5f60608486031215610ad0575f5ffd5b610ad984610a5e565b9250610ae760208501610a29565b9150610af560408501610a29565b90509250925092565b634e487b7160e01b5f52601160045260245ffd5b808201808211156102cd576102cd610afe565b5f60208284031215610b35575f5ffd5b5051919050565b818103818111156102cd576102cd610afe565b80820281158282048414176102cd576102cd610afe565b5f82610b8057634e487b7160e01b5f52601260045260245ffd5b50049056fea1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa3900a26469706673582212207a5d87a31b9cfed557e712c37ae6060652e37b39ada2265b86bc118569de6abe64736f6c634300081f0033", + "deployedBytecode": "0x6080604052600436106100e7575f3560e01c80639613252111610087578063be9a655511610057578063be9a655514610249578063efbe1c1c1461025d578063f2fde38b14610271578063fbccedae14610290575f5ffd5b806396132521146101cc5780639852595c146101ec578063989a83661461020b578063a3f8eace1461022a575f5ffd5b8063715018a6116100c2578063715018a614610159578063810ec23b1461016d57806386d1a69f1461018c5780638da5cb5b146101a0575f5ffd5b80630a17b06b146100f25780630fb5a6b4146101245780631916558714610138575f5ffd5b366100ee57005b5f5ffd5b3480156100fd575f5ffd5b5061011161010c366004610a45565b6102a4565b6040519081526020015b60405180910390f35b34801561012f575f5ffd5b506101116102d3565b348015610143575f5ffd5b50610157610152366004610a74565b610309565b005b348015610164575f5ffd5b506101576103a9565b348015610178575f5ffd5b50610111610187366004610a8d565b6103bc565b348015610197575f5ffd5b50610157610440565b3480156101ab575f5ffd5b506101b46104b8565b6040516001600160a01b03909116815260200161011b565b3480156101d7575f5ffd5b505f516020610b865f395f51905f5254610111565b3480156101f7575f5ffd5b50610111610206366004610a74565b6104e6565b348015610216575f5ffd5b50610157610225366004610abe565b61051f565b348015610235575f5ffd5b50610111610244366004610a74565b61061c565b348015610254575f5ffd5b5061011161063a565b348015610268575f5ffd5b50610111610669565b34801561027c575f5ffd5b5061015761028b366004610a74565b610689565b34801561029b575f5ffd5b506101116106cb565b5f6102cd6102bd5f516020610b865f395f51905f525490565b6102c79047610b12565b836106f4565b92915050565b7fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa390254600160401b900467ffffffffffffffff1690565b5f516020610b865f395f51905f525f6103218361061c565b6001600160a01b0384165f90815260018401602052604081208054929350839290919061034f908490610b12565b90915550506040518181526001600160a01b038416907fc0e523490dd523c33b1878c9eb14ff46991e3f5b2cd33710918618f2a39cba1b9060200160405180910390a26103a48361039e6104b8565b83610773565b505050565b6103b16107a8565b6103ba5f6107da565b565b5f6104396103c9846104e6565b6040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561040b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061042f9190610b25565b6102c79190610b12565b9392505050565b5f516020610b865f395f51905f525f6104576106cb565b905080825f015f82825461046b9190610b12565b90915550506040518181527fda9d4e5f101b8b9b1c5b76d0c5a9f7923571acfc02376aa076b75a8c080c956b9060200160405180910390a16104b46104ae6104b8565b8261084a565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03165f9081527fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa3901602052604090205490565b5f6105286108bd565b805490915060ff600160401b820416159067ffffffffffffffff165f8115801561054f5750825b90505f8267ffffffffffffffff16600114801561056b5750303b155b905081158015610579575080155b156105975760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156105c157845460ff60401b1916600160401b1785555b6105cc8888886108e5565b831561061257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b5f610626826104e6565b61063083426103bc565b6102cd9190610b3c565b7fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa39025467ffffffffffffffff1690565b5f6106726102d3565b61067a61063a565b6106849190610b12565b905090565b6106916107a8565b6001600160a01b0381166106bf57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6106c8816107da565b50565b5f6106e15f516020610b865f395f51905f525490565b6106ea426102a4565b6106849190610b3c565b5f6106fd61063a565b8267ffffffffffffffff16101561071557505f6102cd565b61071d610669565b8267ffffffffffffffff16106107345750816102cd565b61073c6102d3565b61074461063a565b6107589067ffffffffffffffff8516610b3c565b6107629085610b4f565b61076c9190610b66565b90506102cd565b6107808383836001610901565b6103a457604051635274afe760e01b81526001600160a01b03841660048201526024016106b6565b336107b16104b8565b6001600160a01b0316146103ba5760405163118cdaa760e01b81523360048201526024016106b6565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b804710156108745760405163cf47918160e01b8152476004820152602481018290526044016106b6565b61088d828260405180602001604052805f815250610963565b15610896575050565b3d156108a4576104b4610978565b60405163d6bda27560e01b815260040160405180910390fd5b5f807ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a006102cd565b6108ed610983565b6108f6836109a8565b6103a48383836109b0565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f5114831661095757838315161561094b573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b5f5f5f83516020850186885af1949350505050565b6040513d5f823e3d81fd5b61098b610a10565b6103ba57604051631afcd79f60e31b815260040160405180910390fd5b610691610983565b6109b8610983565b7fa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa3902805467ffffffffffffffff928316600160401b026fffffffffffffffffffffffffffffffff19909116939092169290921717905550565b5f610a196108bd565b54600160401b900460ff16919050565b803567ffffffffffffffff81168114610a40575f5ffd5b919050565b5f60208284031215610a55575f5ffd5b61043982610a29565b80356001600160a01b0381168114610a40575f5ffd5b5f60208284031215610a84575f5ffd5b61043982610a5e565b5f5f60408385031215610a9e575f5ffd5b610aa783610a5e565b9150610ab560208401610a29565b90509250929050565b5f5f5f60608486031215610ad0575f5ffd5b610ad984610a5e565b9250610ae760208501610a29565b9150610af560408501610a29565b90509250925092565b634e487b7160e01b5f52601160045260245ffd5b808201808211156102cd576102cd610afe565b5f60208284031215610b35575f5ffd5b5051919050565b818103818111156102cd576102cd610afe565b80820281158282048414176102cd576102cd610afe565b5f82610b8057634e487b7160e01b5f52601260045260245ffd5b50049056fea1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa3900a26469706673582212207a5d87a31b9cfed557e712c37ae6060652e37b39ada2265b86bc118569de6abe64736f6c634300081f0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VotesExtendedUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VotesExtendedUpgradeable.json new file mode 100644 index 00000000..7a56d144 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VotesExtendedUpgradeable.json @@ -0,0 +1,454 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "VotesExtendedUpgradeable", + "sourceName": "contracts/governance/utils/VotesExtendedUpgradeable.sol", + "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "clock", + "type": "uint48" + } + ], + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousVotes", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newVotes", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "CLOCK_MODE", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "clock", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastDelegate", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VotesUpgradeable.json b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VotesUpgradeable.json similarity index 75% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VotesUpgradeable.json rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VotesUpgradeable.json index 0b24a88d..76b91b28 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/build/contracts/VotesUpgradeable.json +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/build/contracts/VotesUpgradeable.json @@ -3,6 +3,112 @@ "contractName": "VotesUpgradeable", "sourceName": "contracts/governance/utils/VotesUpgradeable.sol", "abi": [ + { + "inputs": [], + "name": "CheckpointUnorderedInsertion", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timepoint", + "type": "uint256" + }, + { + "internalType": "uint48", + "name": "clock", + "type": "uint48" + } + ], + "name": "ERC5805FutureLookup", + "type": "error" + }, + { + "inputs": [], + "name": "ERC6372InconsistentClock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentNonce", + "type": "uint256" + } + ], + "name": "InvalidAccountNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "bits", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "SafeCastOverflowedUintDowncast", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + } + ], + "name": "VotesExpiredSignature", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -40,13 +146,13 @@ { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "previousVotes", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newVotes", "type": "uint256" } ], @@ -64,9 +170,9 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", + "internalType": "uint64", "name": "version", - "type": "uint8" + "type": "uint64" } ], "name": "Initialized", @@ -85,19 +191,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "clock", diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/CrosschainLinkedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/CrosschainLinkedUpgradeable.sol new file mode 100644 index 00000000..725f62da --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/CrosschainLinkedUpgradeable.sol @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/CrosschainLinked.sol) + +pragma solidity ^0.8.26; + +import {IERC7786GatewaySource} from "@openzeppelin/contracts/interfaces/draft-IERC7786.sol"; +import {InteroperableAddress} from "@openzeppelin/contracts/utils/draft-InteroperableAddress.sol"; +import {Bytes} from "@openzeppelin/contracts/utils/Bytes.sol"; +import {ERC7786Recipient} from "@openzeppelin/contracts/crosschain/ERC7786Recipient.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Core bridging mechanism. + * + * This contract contains the logic to register and send messages to counterparts on remote chains using ERC-7786 + * gateways. It ensure received messages originate from a counterpart. This is the base of token bridges such as + * {BridgeFungible}. + * + * Contracts that inherit from this contract can use the internal {_sendMessageToCounterpart} to send messages to their + * counterpart on a foreign chain. They must override the {_processMessage} function to handle messages that have + * been verified. + */ +abstract contract CrosschainLinkedUpgradeable is Initializable, ERC7786Recipient { + using Bytes for bytes; + using InteroperableAddress for bytes; + + struct Link { + address gateway; + bytes counterpart; // Full InteroperableAddress (chain ref + address) + } + /// @custom:storage-location erc7201:openzeppelin.storage.CrosschainLinked + struct CrosschainLinkedStorage { + mapping(bytes chain => Link) _links; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.CrosschainLinked")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant CrosschainLinkedStorageLocation = 0xb1919b8acb826911820798909343454eff798c0ea16342cfea7647f1c8b2df00; + + function _getCrosschainLinkedStorage() private pure returns (CrosschainLinkedStorage storage $) { + assembly { + $.slot := CrosschainLinkedStorageLocation + } + } + + /** + * @dev Emitted when a new link is registered. + * + * Note: the `counterpart` argument is a full InteroperableAddress (chain ref + address). + */ + event LinkRegistered(address gateway, bytes counterpart); + + /** + * @dev Reverted when trying to register a link for a chain that is already registered. + * + * Note: the `chain` argument is a "chain-only" InteroperableAddress (empty address). + */ + error LinkAlreadyRegistered(bytes chain); + + function __CrosschainLinked_init(Link[] memory links) internal onlyInitializing { + __CrosschainLinked_init_unchained(links); + } + + function __CrosschainLinked_init_unchained(Link[] memory links) internal onlyInitializing { + for (uint256 i = 0; i < links.length; ++i) { + _setLink(links[i].gateway, links[i].counterpart, false); + } + } + + /** + * @dev Returns the ERC-7786 gateway used for sending and receiving cross-chain messages to a given chain. + * + * Note: The `chain` parameter is a "chain-only" InteroperableAddress (empty address) and the `counterpart` returns + * the full InteroperableAddress (chain ref + address) that is on `chain`. + */ + function getLink(bytes memory chain) public view virtual returns (address gateway, bytes memory counterpart) { + CrosschainLinkedStorage storage $ = _getCrosschainLinkedStorage(); + Link storage self = $._links[chain]; + return (self.gateway, self.counterpart); + } + + /** + * @dev Internal setter to change the ERC-7786 gateway and counterpart for a given chain. Called at construction. + * + * Note: The `counterpart` parameter is the full InteroperableAddress (chain ref + address). + */ + function _setLink(address gateway, bytes memory counterpart, bool allowOverride) internal virtual { + CrosschainLinkedStorage storage $ = _getCrosschainLinkedStorage(); + // Sanity check, this should revert if gateway is not an ERC-7786 implementation. Note that since + // supportsAttribute returns data, an EOA would fail that test (nothing returned). + IERC7786GatewaySource(gateway).supportsAttribute(bytes4(0)); + + bytes memory chain = _extractChain(counterpart); + if (allowOverride || $._links[chain].gateway == address(0)) { + $._links[chain] = Link(gateway, counterpart); + emit LinkRegistered(gateway, counterpart); + } else { + revert LinkAlreadyRegistered(chain); + } + } + + /** + * @dev Internal messaging function + * + * Note: The `chain` parameter is a "chain-only" InteroperableAddress (empty address). + */ + function _sendMessageToCounterpart( + bytes memory chain, + bytes memory payload, + bytes[] memory attributes + ) internal virtual returns (bytes32) { + (address gateway, bytes memory counterpart) = getLink(chain); + return IERC7786GatewaySource(gateway).sendMessage(counterpart, payload, attributes); + } + + /// @inheritdoc ERC7786Recipient + function _isAuthorizedGateway( + address instance, + bytes calldata sender + ) internal view virtual override returns (bool) { + (address gateway, bytes memory router) = getLink(_extractChain(sender)); + return instance == gateway && sender.equal(router); + } + + function _extractChain(bytes memory self) private pure returns (bytes memory) { + (bytes2 chainType, bytes memory chainReference, ) = self.parseV1(); + return InteroperableAddress.formatV1(chainType, chainReference, hex""); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC20Upgradeable.sol new file mode 100644 index 00000000..62bd7b6e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC20Upgradeable.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/BridgeERC20.sol) + +pragma solidity ^0.8.26; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {BridgeFungibleUpgradeable} from "./abstract/BridgeFungibleUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev This is a variant of {BridgeFungible} that implements the bridge logic for ERC-20 tokens that do not expose a + * crosschain mint and burn mechanism. Instead, it takes custody of bridged assets. + */ +// slither-disable-next-line locked-ether +abstract contract BridgeERC20Upgradeable is Initializable, BridgeFungibleUpgradeable { + using SafeERC20 for IERC20; + + /// @custom:storage-location erc7201:openzeppelin.storage.BridgeERC20 + struct BridgeERC20Storage { + IERC20 _token; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.BridgeERC20")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant BridgeERC20StorageLocation = 0x244b01c12a07f59148f0f6492b0cb67864481add66b2bb58fc6fb6ea2a07f700; + + function _getBridgeERC20Storage() private pure returns (BridgeERC20Storage storage $) { + assembly { + $.slot := BridgeERC20StorageLocation + } + } + + function __BridgeERC20_init(IERC20 token_) internal onlyInitializing { + __BridgeERC20_init_unchained(token_); + } + + function __BridgeERC20_init_unchained(IERC20 token_) internal onlyInitializing { + BridgeERC20Storage storage $ = _getBridgeERC20Storage(); + $._token = token_; + } + + /// @dev Return the address of the ERC20 token this bridge operates on. + function token() public view virtual returns (IERC20) { + BridgeERC20Storage storage $ = _getBridgeERC20Storage(); + return $._token; + } + + /// @dev "Locking" tokens is done by taking custody + function _onSend(address from, uint256 amount) internal virtual override { + token().safeTransferFrom(from, address(this), amount); + } + + /// @dev "Unlocking" tokens is done by releasing custody + function _onReceive(address to, uint256 amount) internal virtual override { + token().safeTransfer(to, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC7802Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC7802Upgradeable.sol new file mode 100644 index 00000000..0678685f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/BridgeERC7802Upgradeable.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/BridgeERC7802.sol) + +pragma solidity ^0.8.26; + +import {IERC7802} from "@openzeppelin/contracts/interfaces/draft-IERC7802.sol"; +import {BridgeFungibleUpgradeable} from "./abstract/BridgeFungibleUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev This is a variant of {BridgeFungible} that implements the bridge logic for ERC-7802 compliant tokens. + */ +// slither-disable-next-line locked-ether +abstract contract BridgeERC7802Upgradeable is Initializable, BridgeFungibleUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.BridgeERC7802 + struct BridgeERC7802Storage { + IERC7802 _token; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.BridgeERC7802")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant BridgeERC7802StorageLocation = 0xaa74a536d5c1ef957e103c5cd74a2d097ce13b7e0a555173bee99ce500fd4300; + + function _getBridgeERC7802Storage() private pure returns (BridgeERC7802Storage storage $) { + assembly { + $.slot := BridgeERC7802StorageLocation + } + } + + function __BridgeERC7802_init(IERC7802 token_) internal onlyInitializing { + __BridgeERC7802_init_unchained(token_); + } + + function __BridgeERC7802_init_unchained(IERC7802 token_) internal onlyInitializing { + BridgeERC7802Storage storage $ = _getBridgeERC7802Storage(); + $._token = token_; + } + + /// @dev Return the address of the ERC20 token this bridge operates on. + function token() public view virtual returns (IERC7802) { + BridgeERC7802Storage storage $ = _getBridgeERC7802Storage(); + return $._token; + } + + /// @dev "Locking" tokens using an ERC-7802 crosschain burn + function _onSend(address from, uint256 amount) internal virtual override { + token().crosschainBurn(from, amount); + } + + /// @dev "Unlocking" tokens using an ERC-7802 crosschain mint + function _onReceive(address to, uint256 amount) internal virtual override { + token().crosschainMint(to, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/abstract/BridgeFungibleUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/abstract/BridgeFungibleUpgradeable.sol new file mode 100644 index 00000000..25c8f6a9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/crosschain/bridges/abstract/BridgeFungibleUpgradeable.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/abstract/BridgeFungible.sol) + +pragma solidity ^0.8.26; + +import {InteroperableAddress} from "@openzeppelin/contracts/utils/draft-InteroperableAddress.sol"; +import {ContextUpgradeable} from "../../../utils/ContextUpgradeable.sol"; +import {ERC7786Recipient} from "@openzeppelin/contracts/crosschain/ERC7786Recipient.sol"; +import {CrosschainLinkedUpgradeable} from "../../CrosschainLinkedUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Base contract for bridging ERC-20 between chains using an ERC-7786 gateway. + * + * In order to use this contract, two functions must be implemented to link it to the token: + * * {_onSend}: called when a crosschain transfer is going out. Must take the sender tokens or revert. + * * {_onReceive}: called when a crosschain transfer is coming in. Must give tokens to the receiver. + * + * This base contract is used by the {BridgeERC20}, which interfaces with legacy ERC-20 tokens, and {BridgeERC7802}, + * which interface with ERC-7802 to provide an approve-free user experience. It is also used by the {ERC20Crosschain} + * extension, which embeds the bridge logic directly in the token contract. + */ +abstract contract BridgeFungibleUpgradeable is Initializable, ContextUpgradeable, CrosschainLinkedUpgradeable { + using InteroperableAddress for bytes; + + event CrosschainFungibleTransferSent(bytes32 indexed sendId, address indexed from, bytes to, uint256 amount); + event CrosschainFungibleTransferReceived(bytes32 indexed receiveId, bytes from, address indexed to, uint256 amount); + + function __BridgeFungible_init() internal onlyInitializing { + } + + function __BridgeFungible_init_unchained() internal onlyInitializing { + } + /** + * @dev Transfer `amount` tokens to a crosschain receiver. + * + * Note: The `to` parameter is the full InteroperableAddress (chain ref + address). + */ + function crosschainTransfer(bytes memory to, uint256 amount) public virtual returns (bytes32) { + return _crosschainTransfer(_msgSender(), to, amount); + } + + /** + * @dev Internal crosschain transfer function. + * + * Note: The `to` parameter is the full InteroperableAddress (chain ref + address). + */ + function _crosschainTransfer(address from, bytes memory to, uint256 amount) internal virtual returns (bytes32) { + _onSend(from, amount); + + (bytes2 chainType, bytes memory chainReference, bytes memory addr) = to.parseV1(); + bytes memory chain = InteroperableAddress.formatV1(chainType, chainReference, hex""); + + bytes32 sendId = _sendMessageToCounterpart( + chain, + abi.encode(InteroperableAddress.formatEvmV1(block.chainid, from), addr, amount), + new bytes[](0) + ); + + emit CrosschainFungibleTransferSent(sendId, from, to, amount); + + return sendId; + } + + /// @inheritdoc ERC7786Recipient + function _processMessage( + address /*gateway*/, + bytes32 receiveId, + bytes calldata /*sender*/, + bytes calldata payload + ) internal virtual override { + // split payload + (bytes memory from, bytes memory toBinary, uint256 amount) = abi.decode(payload, (bytes, bytes, uint256)); + address to = address(bytes20(toBinary)); + + _onReceive(to, amount); + + emit CrosschainFungibleTransferReceived(receiveId, from, to, amount); + } + + /// @dev Virtual function: implementation is required to handle token being burnt or locked on the source chain. + function _onSend(address from, uint256 amount) internal virtual; + + /// @dev Virtual function: implementation is required to handle token being minted or unlocked on the destination chain. + function _onReceive(address to, uint256 amount) internal virtual; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletCliffUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletCliffUpgradeable.sol new file mode 100644 index 00000000..b989619f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletCliffUpgradeable.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (finance/VestingWalletCliff.sol) + +pragma solidity ^0.8.20; + +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {VestingWalletUpgradeable} from "./VestingWalletUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {VestingWallet} that adds a cliff to the vesting schedule. + * + * _Available since v5.1._ + */ +abstract contract VestingWalletCliffUpgradeable is Initializable, VestingWalletUpgradeable { + using SafeCast for *; + + /// @custom:storage-location erc7201:openzeppelin.storage.VestingWalletCliff + struct VestingWalletCliffStorage { + uint64 _cliff; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.VestingWalletCliff")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant VestingWalletCliffStorageLocation = 0x0a0ceb66c7c9aef32c0bfc43d3108868a39e95e96162520745e462557492f100; + + function _getVestingWalletCliffStorage() private pure returns (VestingWalletCliffStorage storage $) { + assembly { + $.slot := VestingWalletCliffStorageLocation + } + } + + /// @dev The specified cliff duration is larger than the vesting duration. + error InvalidCliffDuration(uint64 cliffSeconds, uint64 durationSeconds); + + /** + * @dev Set the duration of the cliff, in seconds. The cliff starts vesting schedule (see {VestingWallet}'s + * constructor) and ends `cliffSeconds` later. + */ + function __VestingWalletCliff_init(uint64 cliffSeconds) internal onlyInitializing { + __VestingWalletCliff_init_unchained(cliffSeconds); + } + + function __VestingWalletCliff_init_unchained(uint64 cliffSeconds) internal onlyInitializing { + VestingWalletCliffStorage storage $ = _getVestingWalletCliffStorage(); + if (cliffSeconds > duration()) { + revert InvalidCliffDuration(cliffSeconds, duration().toUint64()); + } + $._cliff = start().toUint64() + cliffSeconds; + } + + /** + * @dev Getter for the cliff timestamp. + */ + function cliff() public view virtual returns (uint256) { + VestingWalletCliffStorage storage $ = _getVestingWalletCliffStorage(); + return $._cliff; + } + + /** + * @dev Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for + * an asset given its total historical allocation. Returns 0 if the {cliff} timestamp is not met. + * + * IMPORTANT: The cliff not only makes the schedule return 0, but it also ignores every possible side + * effect from calling the inherited implementation (i.e. `super._vestingSchedule`). Carefully consider + * this caveat if the overridden implementation of this function has any (e.g. writing to memory or reverting). + */ + function _vestingSchedule( + uint256 totalAllocation, + uint64 timestamp + ) internal view virtual override returns (uint256) { + return timestamp < cliff() ? 0 : super._vestingSchedule(totalAllocation, timestamp); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletUpgradeable.sol new file mode 100644 index 00000000..6e9ce866 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/finance/VestingWalletUpgradeable.sol @@ -0,0 +1,188 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (finance/VestingWallet.sol) + +pragma solidity ^0.8.20; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; +import {OwnableUpgradeable} from "../access/OwnableUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev A vesting wallet is an ownable contract that can receive native currency and ERC-20 tokens, and release these + * assets to the wallet owner, also referred to as "beneficiary", according to a vesting schedule. + * + * Any assets transferred to this contract will follow the vesting schedule as if they were locked from the beginning. + * Consequently, if the vesting has already started, any amount of tokens sent to this contract will (at least partly) + * be immediately releasable. + * + * By setting the duration to 0, one can configure this contract to behave like an asset timelock that holds tokens for + * a beneficiary until a specified time. + * + * NOTE: Since the wallet is {Ownable}, and ownership can be transferred, it is possible to sell unvested tokens. + * Preventing this in a smart contract is difficult, considering that: 1) a beneficiary address could be a + * counterfactually deployed contract, 2) there is likely to be a migration path for EOAs to become contracts in the + * near future. + * + * NOTE: When using this contract with any token whose balance is adjusted automatically (i.e. a rebase token), make + * sure to account the supply/balance adjustment in the vesting schedule to ensure the vested amount is as intended. + * + * NOTE: Chains with support for native ERC20s may allow the vesting wallet to withdraw the underlying asset as both an + * ERC20 and as native currency. For example, if chain C supports token A and the wallet gets deposited 100 A, then + * at 50% of the vesting period, the beneficiary can withdraw 50 A as ERC20 and 25 A as native currency (totaling 75 A). + * Consider disabling one of the withdrawal methods. + */ +contract VestingWalletUpgradeable is Initializable, ContextUpgradeable, OwnableUpgradeable { + event EtherReleased(uint256 amount); + event ERC20Released(address indexed token, uint256 amount); + + /// @custom:storage-location erc7201:openzeppelin.storage.VestingWallet + struct VestingWalletStorage { + uint256 _released; + mapping(address token => uint256) _erc20Released; + uint64 _start; + uint64 _duration; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.VestingWallet")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant VestingWalletStorageLocation = 0xa1eac494560f7591e4da38ed031587f09556afdfc4399dd2e205b935fdfa3900; + + function _getVestingWalletStorage() private pure returns (VestingWalletStorage storage $) { + assembly { + $.slot := VestingWalletStorageLocation + } + } + + function initialize(address beneficiary, uint64 startTimestamp, uint64 durationSeconds) public virtual initializer { + __VestingWallet_init(beneficiary, startTimestamp, durationSeconds); + } + /** + * @dev Sets the beneficiary (owner), the start timestamp and the vesting duration (in seconds) of the vesting + * wallet. + */ + function __VestingWallet_init(address beneficiary, uint64 startTimestamp, uint64 durationSeconds) internal onlyInitializing { + __Ownable_init_unchained(beneficiary); + __VestingWallet_init_unchained(beneficiary, startTimestamp, durationSeconds); + } + + function __VestingWallet_init_unchained(address, uint64 startTimestamp, uint64 durationSeconds) internal onlyInitializing { + VestingWalletStorage storage $ = _getVestingWalletStorage(); + $._start = startTimestamp; + $._duration = durationSeconds; + } + + /** + * @dev The contract should be able to receive Eth. + */ + receive() external payable virtual {} + + /** + * @dev Getter for the start timestamp. + */ + function start() public view virtual returns (uint256) { + VestingWalletStorage storage $ = _getVestingWalletStorage(); + return $._start; + } + + /** + * @dev Getter for the vesting duration. + */ + function duration() public view virtual returns (uint256) { + VestingWalletStorage storage $ = _getVestingWalletStorage(); + return $._duration; + } + + /** + * @dev Getter for the end timestamp. + */ + function end() public view virtual returns (uint256) { + return start() + duration(); + } + + /** + * @dev Amount of eth already released + */ + function released() public view virtual returns (uint256) { + VestingWalletStorage storage $ = _getVestingWalletStorage(); + return $._released; + } + + /** + * @dev Amount of token already released + */ + function released(address token) public view virtual returns (uint256) { + VestingWalletStorage storage $ = _getVestingWalletStorage(); + return $._erc20Released[token]; + } + + /** + * @dev Getter for the amount of releasable eth. + */ + function releasable() public view virtual returns (uint256) { + return vestedAmount(uint64(block.timestamp)) - released(); + } + + /** + * @dev Getter for the amount of releasable `token` tokens. `token` should be the address of an + * {IERC20} contract. + */ + function releasable(address token) public view virtual returns (uint256) { + return vestedAmount(token, uint64(block.timestamp)) - released(token); + } + + /** + * @dev Release the native tokens (ether) that have already vested. + * + * Emits a {EtherReleased} event. + */ + function release() public virtual { + VestingWalletStorage storage $ = _getVestingWalletStorage(); + uint256 amount = releasable(); + $._released += amount; + emit EtherReleased(amount); + Address.sendValue(payable(owner()), amount); + } + + /** + * @dev Release the tokens that have already vested. + * + * Emits a {ERC20Released} event. + */ + function release(address token) public virtual { + VestingWalletStorage storage $ = _getVestingWalletStorage(); + uint256 amount = releasable(token); + $._erc20Released[token] += amount; + emit ERC20Released(token, amount); + SafeERC20.safeTransfer(IERC20(token), owner(), amount); + } + + /** + * @dev Calculates the amount of ether that has already vested. Default implementation is a linear vesting curve. + */ + function vestedAmount(uint64 timestamp) public view virtual returns (uint256) { + return _vestingSchedule(address(this).balance + released(), timestamp); + } + + /** + * @dev Calculates the amount of tokens that has already vested. Default implementation is a linear vesting curve. + */ + function vestedAmount(address token, uint64 timestamp) public view virtual returns (uint256) { + return _vestingSchedule(IERC20(token).balanceOf(address(this)) + released(token), timestamp); + } + + /** + * @dev Virtual implementation of the vesting formula. This returns the amount vested, as a function of time, for + * an asset given its total historical allocation. + */ + function _vestingSchedule(uint256 totalAllocation, uint64 timestamp) internal view virtual returns (uint256) { + if (timestamp < start()) { + return 0; + } else if (timestamp >= end()) { + return totalAllocation; + } else { + return (totalAllocation * (timestamp - start())) / duration(); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/GovernorUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/GovernorUpgradeable.sol new file mode 100644 index 00000000..784068e6 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/GovernorUpgradeable.sol @@ -0,0 +1,851 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (governance/Governor.sol) + +pragma solidity ^0.8.24; + +import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; +import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; +import {EIP712Upgradeable} from "../utils/cryptography/EIP712Upgradeable.sol"; +import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {DoubleEndedQueue} from "@openzeppelin/contracts/utils/structs/DoubleEndedQueue.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; +import {NoncesUpgradeable} from "../utils/NoncesUpgradeable.sol"; +import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {IERC6372} from "@openzeppelin/contracts/interfaces/IERC6372.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Core of the governance system, designed to be extended through various modules. + * + * This contract is abstract and requires several functions to be implemented in various modules: + * + * - A counting module must implement {_quorumReached}, {_voteSucceeded} and {_countVote} + * - A voting module must implement {_getVotes} + * - Additionally, {votingPeriod}, {votingDelay}, and {quorum} must also be implemented + */ +abstract contract GovernorUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, EIP712Upgradeable, NoncesUpgradeable, IGovernor, IERC721Receiver, IERC1155Receiver { + using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque; + + bytes32 public constant BALLOT_TYPEHASH = + keccak256("Ballot(uint256 proposalId,uint8 support,address voter,uint256 nonce)"); + bytes32 public constant EXTENDED_BALLOT_TYPEHASH = + keccak256( + "ExtendedBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason,bytes params)" + ); + + struct ProposalCore { + address proposer; + uint48 voteStart; + uint32 voteDuration; + bool executed; + bool canceled; + uint48 etaSeconds; + } + + bytes32 private constant ALL_PROPOSAL_STATES_BITMAP = bytes32((2 ** (uint8(type(ProposalState).max) + 1)) - 1); + /// @custom:storage-location erc7201:openzeppelin.storage.Governor + struct GovernorStorage { + string _name; + + mapping(uint256 proposalId => ProposalCore) _proposals; + + // This queue keeps track of the governor operating on itself. Calls to functions protected by the {onlyGovernance} + // modifier needs to be whitelisted in this queue. Whitelisting is set in {execute}, consumed by the + // {onlyGovernance} modifier and eventually reset after {_executeOperations} completes. This ensures that the + // execution of {onlyGovernance} protected calls can only be achieved through successful proposals. + DoubleEndedQueue.Bytes32Deque _governanceCall; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Governor")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorStorageLocation = 0x7c712897014dbe49c045ef1299aa2d5f9e67e48eea4403efa21f1e0f3ac0cb00; + + function _getGovernorStorage() private pure returns (GovernorStorage storage $) { + assembly { + $.slot := GovernorStorageLocation + } + } + + /** + * @dev Restricts a function so it can only be executed through governance proposals. For example, governance + * parameter setters in {GovernorSettings} are protected using this modifier. + * + * The governance executing address may be different from the Governor's own address, for example it could be a + * timelock. This can be customized by modules by overriding {_executor}. The executor is only able to invoke these + * functions during the execution of the governor's {execute} function, and not under any other circumstances. Thus, + * for example, additional timelock proposers are not able to change governance parameters without going through the + * governance protocol (since v4.6). + */ + modifier onlyGovernance() { + _checkGovernance(); + _; + } + + /** + * @dev Sets the value for {name} and {version} + */ + function __Governor_init(string memory name_) internal onlyInitializing { + __EIP712_init_unchained(name_, version()); + __Governor_init_unchained(name_); + } + + function __Governor_init_unchained(string memory name_) internal onlyInitializing { + GovernorStorage storage $ = _getGovernorStorage(); + $._name = name_; + } + + /** + * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) + */ + receive() external payable virtual { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165Upgradeable) returns (bool) { + return + interfaceId == type(IGovernor).interfaceId || + interfaceId == type(IGovernor).interfaceId ^ IGovernor.getProposalId.selector || + interfaceId == type(IERC1155Receiver).interfaceId || + super.supportsInterface(interfaceId); + } + + /// @inheritdoc IGovernor + function name() public view virtual returns (string memory) { + GovernorStorage storage $ = _getGovernorStorage(); + return $._name; + } + + /// @inheritdoc IGovernor + function version() public view virtual returns (string memory) { + return "1"; + } + + /** + * @dev See {IGovernor-hashProposal}. + * + * The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array + * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id + * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in + * advance, before the proposal is submitted. + * + * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the + * same proposal (with same operation and same description) will have the same id if submitted on multiple governors + * across multiple networks. This also means that in order to execute the same operation twice (on the same + * governor) the proposer will have to change the description in order to avoid proposal id conflicts. + */ + function hashProposal( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public pure virtual returns (uint256) { + return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); + } + + /// @inheritdoc IGovernor + function getProposalId( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public view virtual returns (uint256) { + return hashProposal(targets, values, calldatas, descriptionHash); + } + + /// @inheritdoc IGovernor + function state(uint256 proposalId) public view virtual returns (ProposalState) { + GovernorStorage storage $ = _getGovernorStorage(); + // We read the struct fields into the stack at once so Solidity emits a single SLOAD + ProposalCore storage proposal = $._proposals[proposalId]; + bool proposalExecuted = proposal.executed; + bool proposalCanceled = proposal.canceled; + + if (proposalExecuted) { + return ProposalState.Executed; + } + + if (proposalCanceled) { + return ProposalState.Canceled; + } + + uint256 snapshot = proposalSnapshot(proposalId); + + if (snapshot == 0) { + revert GovernorNonexistentProposal(proposalId); + } + + uint256 currentTimepoint = clock(); + + if (snapshot >= currentTimepoint) { + return ProposalState.Pending; + } + + uint256 deadline = proposalDeadline(proposalId); + + if (deadline >= currentTimepoint) { + return ProposalState.Active; + } else if (!_quorumReached(proposalId) || !_voteSucceeded(proposalId)) { + return ProposalState.Defeated; + } else if (proposalEta(proposalId) == 0) { + return ProposalState.Succeeded; + } else { + return ProposalState.Queued; + } + } + + /// @inheritdoc IGovernor + function proposalThreshold() public view virtual returns (uint256) { + return 0; + } + + /// @inheritdoc IGovernor + function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256) { + GovernorStorage storage $ = _getGovernorStorage(); + return $._proposals[proposalId].voteStart; + } + + /// @inheritdoc IGovernor + function proposalDeadline(uint256 proposalId) public view virtual returns (uint256) { + GovernorStorage storage $ = _getGovernorStorage(); + return $._proposals[proposalId].voteStart + $._proposals[proposalId].voteDuration; + } + + /// @inheritdoc IGovernor + function proposalProposer(uint256 proposalId) public view virtual returns (address) { + GovernorStorage storage $ = _getGovernorStorage(); + return $._proposals[proposalId].proposer; + } + + /// @inheritdoc IGovernor + function proposalEta(uint256 proposalId) public view virtual returns (uint256) { + GovernorStorage storage $ = _getGovernorStorage(); + return $._proposals[proposalId].etaSeconds; + } + + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256) public view virtual returns (bool) { + return false; + } + + /** + * @dev Reverts if the `msg.sender` is not the executor. In case the executor is not this contract + * itself, the function reverts if `msg.data` is not whitelisted as a result of an {execute} + * operation. See {onlyGovernance}. + */ + function _checkGovernance() internal virtual { + GovernorStorage storage $ = _getGovernorStorage(); + if (_executor() != _msgSender()) { + revert GovernorOnlyExecutor(_msgSender()); + } + if (_executor() != address(this)) { + bytes32 msgDataHash = keccak256(_msgData()); + // loop until popping the expected operation - throw if deque is empty (operation not authorized) + while ($._governanceCall.popFront() != msgDataHash) {} + } + } + + /** + * @dev Amount of votes already cast passes the threshold limit. + */ + function _quorumReached(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Is the proposal successful or not. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); + + /** + * @dev Get the voting weight of `account` at a specific `timepoint`, for a vote as described by `params`. + */ + function _getVotes(address account, uint256 timepoint, bytes memory params) internal view virtual returns (uint256); + + /** + * @dev Register a vote for `proposalId` by `account` with a given `support`, voting `weight` and voting `params`. + * + * Note: Support is generic and can represent various things depending on the voting system used. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 totalWeight, + bytes memory params + ) internal virtual returns (uint256); + + /** + * @dev Hook that should be called every time the tally for a proposal is updated. + * + * Note: This function must run successfully. Reverts will result in the bricking of governance + */ + function _tallyUpdated(uint256 proposalId) internal virtual {} + + /** + * @dev Default additional encoded parameters used by castVote methods that don't include them + * + * Note: Should be overridden by specific implementations to use an appropriate value, the + * meaning of the additional params, in the context of that implementation + */ + function _defaultParams() internal view virtual returns (bytes memory) { + return ""; + } + + /** + * @dev See {IGovernor-propose}. This function has opt-in frontrunning protection, described in {_isValidDescriptionForProposer}. + */ + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual returns (uint256) { + address proposer = _msgSender(); + + // check description restriction + if (!_isValidDescriptionForProposer(proposer, description)) { + revert GovernorRestrictedProposer(proposer); + } + + // check proposal threshold + uint256 votesThreshold = proposalThreshold(); + if (votesThreshold > 0) { + uint256 proposerVotes = getVotes(proposer, clock() - 1); + if (proposerVotes < votesThreshold) { + revert GovernorInsufficientProposerVotes(proposer, proposerVotes, votesThreshold); + } + } + + return _propose(targets, values, calldatas, description, proposer); + } + + /** + * @dev Internal propose mechanism. Can be overridden to add more logic on proposal creation. + * + * Emits a {IGovernor-ProposalCreated} event. + */ + function _propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description, + address proposer + ) internal virtual returns (uint256 proposalId) { + GovernorStorage storage $ = _getGovernorStorage(); + proposalId = getProposalId(targets, values, calldatas, keccak256(bytes(description))); + + if (targets.length != values.length || targets.length != calldatas.length || targets.length == 0) { + revert GovernorInvalidProposalLength(targets.length, calldatas.length, values.length); + } + if ($._proposals[proposalId].voteStart != 0) { + revert GovernorUnexpectedProposalState(proposalId, state(proposalId), bytes32(0)); + } + + uint256 snapshot = clock() + votingDelay(); + uint256 duration = votingPeriod(); + + ProposalCore storage proposal = $._proposals[proposalId]; + proposal.proposer = proposer; + proposal.voteStart = SafeCast.toUint48(snapshot); + proposal.voteDuration = SafeCast.toUint32(duration); + + emit ProposalCreated( + proposalId, + proposer, + targets, + values, + new string[](targets.length), + calldatas, + snapshot, + snapshot + duration, + description + ); + + // Using a named return variable to avoid stack too deep errors + } + + /// @inheritdoc IGovernor + function queue( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256) { + GovernorStorage storage $ = _getGovernorStorage(); + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Succeeded)); + + uint48 etaSeconds = _queueOperations(proposalId, targets, values, calldatas, descriptionHash); + + if (etaSeconds != 0) { + $._proposals[proposalId].etaSeconds = etaSeconds; + emit ProposalQueued(proposalId, etaSeconds); + } else { + revert GovernorQueueNotImplemented(); + } + + return proposalId; + } + + /** + * @dev Internal queuing mechanism. Can be overridden (without a super call) to modify the way queuing is + * performed (for example adding a vault/timelock). + * + * This is empty by default, and must be overridden to implement queuing. + * + * This function returns a timestamp that describes the expected ETA for execution. If the returned value is 0 + * (which is the default value), the core will consider queueing did not succeed, and the public {queue} function + * will revert. + * + * NOTE: Calling this function directly will NOT check the current state of the proposal, or emit the + * `ProposalQueued` event. Queuing a proposal should be done using {queue}. + */ + function _queueOperations( + uint256 /*proposalId*/, + address[] memory /*targets*/, + uint256[] memory /*values*/, + bytes[] memory /*calldatas*/, + bytes32 /*descriptionHash*/ + ) internal virtual returns (uint48) { + return 0; + } + + /// @inheritdoc IGovernor + function execute( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public payable virtual returns (uint256) { + GovernorStorage storage $ = _getGovernorStorage(); + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + _validateStateBitmap( + proposalId, + _encodeStateBitmap(ProposalState.Succeeded) | _encodeStateBitmap(ProposalState.Queued) + ); + + // mark as executed before calls to avoid reentrancy + $._proposals[proposalId].executed = true; + + // before execute: register governance call in queue. + if (_executor() != address(this)) { + for (uint256 i = 0; i < targets.length; ++i) { + if (targets[i] == address(this)) { + $._governanceCall.pushBack(keccak256(calldatas[i])); + } + } + } + + _executeOperations(proposalId, targets, values, calldatas, descriptionHash); + + // after execute: cleanup governance call queue. + if (_executor() != address(this) && !$._governanceCall.empty()) { + $._governanceCall.clear(); + } + + emit ProposalExecuted(proposalId); + + return proposalId; + } + + /** + * @dev Internal execution mechanism. Can be overridden (without a super call) to modify the way execution is + * performed (for example adding a vault/timelock). + * + * NOTE: Calling this function directly will NOT check the current state of the proposal, set the executed flag to + * true or emit the `ProposalExecuted` event. Executing a proposal should be done using {execute}. + */ + function _executeOperations( + uint256 /* proposalId */, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual { + for (uint256 i = 0; i < targets.length; ++i) { + (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); + Address.verifyCallResult(success, returndata); + } + } + + /// @inheritdoc IGovernor + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public virtual returns (uint256) { + // The proposalId will be recomputed in the `_cancel` call further down. However we need the value before we + // do the internal call, because we need to check the proposal state BEFORE the internal `_cancel` call + // changes it. The `getProposalId` duplication has a cost that is limited, and that we accept. + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + address caller = _msgSender(); + if (!_validateCancel(proposalId, caller)) revert GovernorUnableToCancel(proposalId, caller); + + return _cancel(targets, values, calldatas, descriptionHash); + } + + /** + * @dev Internal cancel mechanism with minimal restrictions. A proposal can be cancelled in any state other than + * Canceled, Expired, or Executed. Once cancelled a proposal can't be re-submitted. + * + * Emits a {IGovernor-ProposalCanceled} event. + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual returns (uint256) { + GovernorStorage storage $ = _getGovernorStorage(); + uint256 proposalId = getProposalId(targets, values, calldatas, descriptionHash); + + _validateStateBitmap( + proposalId, + ALL_PROPOSAL_STATES_BITMAP ^ + _encodeStateBitmap(ProposalState.Canceled) ^ + _encodeStateBitmap(ProposalState.Expired) ^ + _encodeStateBitmap(ProposalState.Executed) + ); + + $._proposals[proposalId].canceled = true; + emit ProposalCanceled(proposalId); + + return proposalId; + } + + /// @inheritdoc IGovernor + function getVotes(address account, uint256 timepoint) public view virtual returns (uint256) { + return _getVotes(account, timepoint, _defaultParams()); + } + + /// @inheritdoc IGovernor + function getVotesWithParams( + address account, + uint256 timepoint, + bytes memory params + ) public view virtual returns (uint256) { + return _getVotes(account, timepoint, params); + } + + /// @inheritdoc IGovernor + function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, ""); + } + + /// @inheritdoc IGovernor + function castVoteWithReason( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason); + } + + /// @inheritdoc IGovernor + function castVoteWithReasonAndParams( + uint256 proposalId, + uint8 support, + string calldata reason, + bytes memory params + ) public virtual returns (uint256) { + address voter = _msgSender(); + return _castVote(proposalId, voter, support, reason, params); + } + + /// @inheritdoc IGovernor + function castVoteBySig( + uint256 proposalId, + uint8 support, + address voter, + bytes memory signature + ) public virtual returns (uint256) { + if (!_validateVoteSig(proposalId, support, voter, signature)) { + revert GovernorInvalidSignature(voter); + } + return _castVote(proposalId, voter, support, ""); + } + + /// @inheritdoc IGovernor + function castVoteWithReasonAndParamsBySig( + uint256 proposalId, + uint8 support, + address voter, + string calldata reason, + bytes memory params, + bytes memory signature + ) public virtual returns (uint256) { + if (!_validateExtendedVoteSig(proposalId, support, voter, reason, params, signature)) { + revert GovernorInvalidSignature(voter); + } + return _castVote(proposalId, voter, support, reason, params); + } + + /// @dev Validate the `signature` used in {castVoteBySig} function. + function _validateVoteSig( + uint256 proposalId, + uint8 support, + address voter, + bytes memory signature + ) internal virtual returns (bool) { + return + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support, voter, _useNonce(voter)))), + signature + ); + } + + /// @dev Validate the `signature` used in {castVoteWithReasonAndParamsBySig} function. + function _validateExtendedVoteSig( + uint256 proposalId, + uint8 support, + address voter, + string memory reason, + bytes memory params, + bytes memory signature + ) internal virtual returns (bool) { + return + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode( + EXTENDED_BALLOT_TYPEHASH, + proposalId, + support, + voter, + _useNonce(voter), + keccak256(bytes(reason)), + keccak256(params) + ) + ) + ), + signature + ); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. Uses the _defaultParams(). + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason + ) internal virtual returns (uint256) { + return _castVote(proposalId, account, support, reason, _defaultParams()); + } + + /** + * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve + * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. + * + * Emits a {IGovernor-VoteCast} event. + */ + function _castVote( + uint256 proposalId, + address account, + uint8 support, + string memory reason, + bytes memory params + ) internal virtual returns (uint256) { + _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Active)); + + uint256 totalWeight = _getVotes(account, proposalSnapshot(proposalId), params); + uint256 votedWeight = _countVote(proposalId, account, support, totalWeight, params); + + if (params.length == 0) { + emit VoteCast(account, proposalId, support, votedWeight, reason); + } else { + emit VoteCastWithParams(account, proposalId, support, votedWeight, reason, params); + } + + _tallyUpdated(proposalId); + + return votedWeight; + } + + /** + * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor + * is some contract other than the governor itself, like when using a timelock, this function can be invoked + * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. + * Note that if the executor is simply the governor itself, use of `relay` is redundant. + */ + function relay(address target, uint256 value, bytes calldata data) public payable virtual onlyGovernance { + (bool success, bytes memory returndata) = target.call{value: value}(data); + Address.verifyCallResult(success, returndata); + } + + /** + * @dev Address through which the governor executes action. Will be overloaded by module that executes actions + * through another contract such as a timelock. + */ + function _executor() internal view virtual returns (address) { + return address(this); + } + + /** + * @dev See {IERC721Receiver-onERC721Received}. + * Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock). + */ + function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + return this.onERC721Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155Received}. + * Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock). + */ + function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual returns (bytes4) { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + return this.onERC1155Received.selector; + } + + /** + * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + * Receiving tokens is disabled if the governance executor is other than the governor itself (eg. when using with a timelock). + */ + function onERC1155BatchReceived( + address, + address, + uint256[] memory, + uint256[] memory, + bytes memory + ) public virtual returns (bytes4) { + if (_executor() != address(this)) { + revert GovernorDisabledDeposit(); + } + return this.onERC1155BatchReceived.selector; + } + + /** + * @dev Encodes a `ProposalState` into a `bytes32` representation where each bit enabled corresponds to + * the underlying position in the `ProposalState` enum. For example: + * + * 0x000...10000 + * ^^^^^^------ ... + * ^----- Succeeded + * ^---- Defeated + * ^--- Canceled + * ^-- Active + * ^- Pending + */ + function _encodeStateBitmap(ProposalState proposalState) internal pure returns (bytes32) { + return bytes32(1 << uint8(proposalState)); + } + + /** + * @dev Check that the current state of a proposal matches the requirements described by the `allowedStates` bitmap. + * This bitmap should be built using `_encodeStateBitmap`. + * + * If requirements are not met, reverts with a {GovernorUnexpectedProposalState} error. + */ + function _validateStateBitmap(uint256 proposalId, bytes32 allowedStates) internal view returns (ProposalState) { + ProposalState currentState = state(proposalId); + if (_encodeStateBitmap(currentState) & allowedStates == bytes32(0)) { + revert GovernorUnexpectedProposalState(proposalId, currentState, allowedStates); + } + return currentState; + } + + /** + * @dev Check if the proposer is authorized to submit a proposal with the given description. + * + * If the proposal description ends with `#proposer=0x???`, where `0x???` is an address written as a hex string + * (case insensitive), then the submission of this proposal will only be authorized to said address. + * + * This is used for frontrunning protection. By adding this pattern at the end of their proposal, one can ensure + * that no other address can submit the same proposal. An attacker would have to either remove or change that part, + * which would result in a different proposal id. + * + * If the description does not match this pattern, it is unrestricted and anyone can submit it. This includes: + * + * - If the `0x???` part is not a valid hex string. + * - If the `0x???` part is a valid hex string, but does not contain exactly 40 hex digits. + * - If it ends with the expected suffix followed by newlines or other whitespace. + * - If it ends with some other similar suffix, e.g. `#other=abc`. + * - If it does not end with any such suffix. + */ + function _isValidDescriptionForProposer( + address proposer, + string memory description + ) internal view virtual returns (bool) { + unchecked { + uint256 length = bytes(description).length; + + // Length is too short to contain a valid proposer suffix + if (length < 52) { + return true; + } + + // Extract what would be the `#proposer=` marker beginning the suffix + bytes10 marker = bytes10(_unsafeReadBytesOffset(bytes(description), length - 52)); + + // If the marker is not found, there is no proposer suffix to check + if (marker != bytes10("#proposer=")) { + return true; + } + + // Check that the last 42 characters (after the marker) are a properly formatted address. + (bool success, address recovered) = Strings.tryParseAddress(description, length - 42, length); + return !success || recovered == proposer; + } + } + + /** + * @dev Check if the `caller` can cancel the proposal with the given `proposalId`. + * + * The default implementation allows the proposal proposer to cancel the proposal during the pending state. + */ + function _validateCancel(uint256 proposalId, address caller) internal view virtual returns (bool) { + return (state(proposalId) == ProposalState.Pending) && caller == proposalProposer(proposalId); + } + + /// @inheritdoc IERC6372 + function clock() public view virtual returns (uint48); + + /// @inheritdoc IERC6372 + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual returns (string memory); + + /// @inheritdoc IGovernor + function votingDelay() public view virtual returns (uint256); + + /// @inheritdoc IGovernor + function votingPeriod() public view virtual returns (uint256); + + /// @inheritdoc IGovernor + function quorum(uint256 timepoint) public view virtual returns (uint256); + + /** + * @dev Reads a bytes32 from a bytes array without bounds checking. + * + * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the + * assembly block as such would prevent some optimizations. + */ + function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) { + // This is not memory safe in the general case, but all calls to this private function are within bounds. + assembly ("memory-safe") { + value := mload(add(add(buffer, 0x20), offset)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/TimelockControllerUpgradeable.sol similarity index 58% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/TimelockControllerUpgradeable.sol index de4abf21..67a15bfa 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/TimelockControllerUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/TimelockControllerUpgradeable.sol @@ -1,12 +1,13 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/TimelockController.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (governance/TimelockController.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../access/AccessControlUpgradeable.sol"; -import "../token/ERC721/IERC721ReceiverUpgradeable.sol"; -import "../token/ERC1155/IERC1155ReceiverUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; +import {AccessControlUpgradeable} from "../access/AccessControlUpgradeable.sol"; +import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; +import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Contract module which acts as a timelocked controller. When set as the @@ -20,18 +21,63 @@ import {Initializable} from "../proxy/utils/Initializable.sol"; * is in charge of proposing (resp executing) operations. A common use case is * to position this {TimelockController} as the owner of a smart contract, with * a multisig or a DAO as the sole proposer. - * - * _Available since v3.3._ */ -contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeable, IERC721ReceiverUpgradeable, IERC1155ReceiverUpgradeable { - bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); +contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeable, ERC721Holder, ERC1155Holder { bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); bytes32 public constant CANCELLER_ROLE = keccak256("CANCELLER_ROLE"); - uint256 internal constant _DONE_TIMESTAMP = uint256(1); + uint256 internal constant DONE_TIMESTAMP = uint256(1); + + /// @custom:storage-location erc7201:openzeppelin.storage.TimelockController + struct TimelockControllerStorage { + mapping(bytes32 id => uint256) _timestamps; + uint256 _minDelay; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.TimelockController")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant TimelockControllerStorageLocation = 0x9a37c2aa9d186a0969ff8a8267bf4e07e864c2f2768f5040949e28a624fb3600; + + function _getTimelockControllerStorage() private pure returns (TimelockControllerStorage storage $) { + assembly { + $.slot := TimelockControllerStorageLocation + } + } + + enum OperationState { + Unset, + Waiting, + Ready, + Done + } + + /** + * @dev Mismatch between the parameters length for an operation call. + */ + error TimelockInvalidOperationLength(uint256 targets, uint256 payloads, uint256 values); + + /** + * @dev The schedule operation doesn't meet the minimum delay. + */ + error TimelockInsufficientDelay(uint256 delay, uint256 minDelay); + + /** + * @dev The current state of an operation is not as required. + * The `expectedStates` is a bitmap with the bits enabled for each OperationState enum position + * counting from right to left. + * + * See {_encodeStateBitmap}. + */ + error TimelockUnexpectedOperationState(bytes32 operationId, bytes32 expectedStates); + + /** + * @dev The predecessor to an operation not yet done. + */ + error TimelockUnexecutedPredecessor(bytes32 predecessorId); - mapping(bytes32 => uint256) private _timestamps; - uint256 private _minDelay; + /** + * @dev The caller account is not authorized. + */ + error TimelockUnauthorizedCaller(address caller); /** * @dev Emitted when a call is scheduled as part of operation `id`. @@ -66,10 +112,13 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl */ event MinDelayChange(uint256 oldDuration, uint256 newDuration); + function initialize(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) public virtual initializer { + __TimelockController_init(minDelay, proposers, executors, admin); + } /** * @dev Initializes the contract with the following parameters: * - * - `minDelay`: initial minimum delay for operations + * - `minDelay`: initial minimum delay in seconds for operations * - `proposers`: accounts to be granted proposer and canceller roles * - `executors`: accounts to be granted executor role * - `admin`: optional account to be granted admin role; disable with zero address @@ -84,31 +133,27 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl } function __TimelockController_init_unchained(uint256 minDelay, address[] memory proposers, address[] memory executors, address admin) internal onlyInitializing { - _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE); - _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE); - _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE); - _setRoleAdmin(CANCELLER_ROLE, TIMELOCK_ADMIN_ROLE); - + TimelockControllerStorage storage $ = _getTimelockControllerStorage(); // self administration - _setupRole(TIMELOCK_ADMIN_ROLE, address(this)); + _grantRole(DEFAULT_ADMIN_ROLE, address(this)); // optional admin if (admin != address(0)) { - _setupRole(TIMELOCK_ADMIN_ROLE, admin); + _grantRole(DEFAULT_ADMIN_ROLE, admin); } // register proposers and cancellers for (uint256 i = 0; i < proposers.length; ++i) { - _setupRole(PROPOSER_ROLE, proposers[i]); - _setupRole(CANCELLER_ROLE, proposers[i]); + _grantRole(PROPOSER_ROLE, proposers[i]); + _grantRole(CANCELLER_ROLE, proposers[i]); } // register executors for (uint256 i = 0; i < executors.length; ++i) { - _setupRole(EXECUTOR_ROLE, executors[i]); + _grantRole(EXECUTOR_ROLE, executors[i]); } - _minDelay = minDelay; + $._minDelay = minDelay; emit MinDelayChange(0, minDelay); } @@ -128,43 +173,43 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl /** * @dev Contract might receive/hold ETH as part of the maintenance process. */ - receive() external payable {} + receive() external payable virtual {} - /** - * @dev See {IERC165-supportsInterface}. - */ - function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, AccessControlUpgradeable) returns (bool) { - return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId); + /// @inheritdoc AccessControlUpgradeable + function supportsInterface( + bytes4 interfaceId + ) public view virtual override(AccessControlUpgradeable, ERC1155Holder) returns (bool) { + return super.supportsInterface(interfaceId); } /** - * @dev Returns whether an id correspond to a registered operation. This - * includes both Pending, Ready and Done operations. + * @dev Returns whether an id corresponds to a registered operation. This + * includes both Waiting, Ready, and Done operations. */ - function isOperation(bytes32 id) public view virtual returns (bool) { - return getTimestamp(id) > 0; + function isOperation(bytes32 id) public view returns (bool) { + return getOperationState(id) != OperationState.Unset; } /** * @dev Returns whether an operation is pending or not. Note that a "pending" operation may also be "ready". */ - function isOperationPending(bytes32 id) public view virtual returns (bool) { - return getTimestamp(id) > _DONE_TIMESTAMP; + function isOperationPending(bytes32 id) public view returns (bool) { + OperationState state = getOperationState(id); + return state == OperationState.Waiting || state == OperationState.Ready; } /** * @dev Returns whether an operation is ready for execution. Note that a "ready" operation is also "pending". */ - function isOperationReady(bytes32 id) public view virtual returns (bool) { - uint256 timestamp = getTimestamp(id); - return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp; + function isOperationReady(bytes32 id) public view returns (bool) { + return getOperationState(id) == OperationState.Ready; } /** * @dev Returns whether an operation is done or not. */ - function isOperationDone(bytes32 id) public view virtual returns (bool) { - return getTimestamp(id) == _DONE_TIMESTAMP; + function isOperationDone(bytes32 id) public view returns (bool) { + return getOperationState(id) == OperationState.Done; } /** @@ -172,16 +217,34 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl * unset operations, 1 for done operations). */ function getTimestamp(bytes32 id) public view virtual returns (uint256) { - return _timestamps[id]; + TimelockControllerStorage storage $ = _getTimelockControllerStorage(); + return $._timestamps[id]; + } + + /** + * @dev Returns operation state. + */ + function getOperationState(bytes32 id) public view virtual returns (OperationState) { + uint256 timestamp = getTimestamp(id); + if (timestamp == 0) { + return OperationState.Unset; + } else if (timestamp == DONE_TIMESTAMP) { + return OperationState.Done; + } else if (timestamp > block.timestamp) { + return OperationState.Waiting; + } else { + return OperationState.Ready; + } } /** - * @dev Returns the minimum delay for an operation to become valid. + * @dev Returns the minimum delay in seconds for an operation to become valid. * * This value can be changed by executing an operation that calls `updateDelay`. */ function getMinDelay() public view virtual returns (uint256) { - return _minDelay; + TimelockControllerStorage storage $ = _getTimelockControllerStorage(); + return $._minDelay; } /** @@ -254,8 +317,9 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { - require(targets.length == values.length, "TimelockController: length mismatch"); - require(targets.length == payloads.length, "TimelockController: length mismatch"); + if (targets.length != values.length || targets.length != payloads.length) { + revert TimelockInvalidOperationLength(targets.length, payloads.length, values.length); + } bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); _schedule(id, delay); @@ -271,9 +335,15 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl * @dev Schedule an operation that is to become valid after a given delay. */ function _schedule(bytes32 id, uint256 delay) private { - require(!isOperation(id), "TimelockController: operation already scheduled"); - require(delay >= getMinDelay(), "TimelockController: insufficient delay"); - _timestamps[id] = block.timestamp + delay; + TimelockControllerStorage storage $ = _getTimelockControllerStorage(); + if (isOperation(id)) { + revert TimelockUnexpectedOperationState(id, _encodeStateBitmap(OperationState.Unset)); + } + uint256 minDelay = getMinDelay(); + if (delay < minDelay) { + revert TimelockInsufficientDelay(delay, minDelay); + } + $._timestamps[id] = block.timestamp + delay; } /** @@ -284,14 +354,20 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl * - the caller must have the 'canceller' role. */ function cancel(bytes32 id) public virtual onlyRole(CANCELLER_ROLE) { - require(isOperationPending(id), "TimelockController: operation cannot be cancelled"); - delete _timestamps[id]; + TimelockControllerStorage storage $ = _getTimelockControllerStorage(); + if (!isOperationPending(id)) { + revert TimelockUnexpectedOperationState( + id, + _encodeStateBitmap(OperationState.Waiting) | _encodeStateBitmap(OperationState.Ready) + ); + } + delete $._timestamps[id]; emit Cancelled(id); } /** - * @dev Execute an (ready) operation containing a single transaction. + * @dev Execute a ready operation containing a single transaction. * * Emits a {CallExecuted} event. * @@ -318,7 +394,7 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl } /** - * @dev Execute an (ready) operation containing a batch of transactions. + * @dev Execute a ready operation containing a batch of transactions. * * Emits one {CallExecuted} event per transaction in the batch. * @@ -336,8 +412,9 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { - require(targets.length == values.length, "TimelockController: length mismatch"); - require(targets.length == payloads.length, "TimelockController: length mismatch"); + if (targets.length != values.length || targets.length != payloads.length) { + revert TimelockInvalidOperationLength(targets.length, payloads.length, values.length); + } bytes32 id = hashOperationBatch(targets, values, payloads, predecessor, salt); @@ -356,24 +433,31 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl * @dev Execute an operation's call. */ function _execute(address target, uint256 value, bytes calldata data) internal virtual { - (bool success, ) = target.call{value: value}(data); - require(success, "TimelockController: underlying transaction reverted"); + (bool success, bytes memory returndata) = target.call{value: value}(data); + Address.verifyCallResult(success, returndata); } /** * @dev Checks before execution of an operation's calls. */ function _beforeCall(bytes32 id, bytes32 predecessor) private view { - require(isOperationReady(id), "TimelockController: operation is not ready"); - require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency"); + if (!isOperationReady(id)) { + revert TimelockUnexpectedOperationState(id, _encodeStateBitmap(OperationState.Ready)); + } + if (predecessor != bytes32(0) && !isOperationDone(predecessor)) { + revert TimelockUnexecutedPredecessor(predecessor); + } } /** * @dev Checks after execution of an operation's calls. */ function _afterCall(bytes32 id) private { - require(isOperationReady(id), "TimelockController: operation is not ready"); - _timestamps[id] = _DONE_TIMESTAMP; + TimelockControllerStorage storage $ = _getTimelockControllerStorage(); + if (!isOperationReady(id)) { + revert TimelockUnexpectedOperationState(id, _encodeStateBitmap(OperationState.Ready)); + } + $._timestamps[id] = DONE_TIMESTAMP; } /** @@ -386,49 +470,28 @@ contract TimelockControllerUpgradeable is Initializable, AccessControlUpgradeabl * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing * an operation where the timelock is the target and the data is the ABI-encoded call to this function. */ - function updateDelay(uint256 newDelay) external virtual { - require(msg.sender == address(this), "TimelockController: caller must be timelock"); - emit MinDelayChange(_minDelay, newDelay); - _minDelay = newDelay; - } - - /** - * @dev See {IERC721Receiver-onERC721Received}. - */ - function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4) { - return this.onERC721Received.selector; - } - - /** - * @dev See {IERC1155Receiver-onERC1155Received}. - */ - function onERC1155Received( - address, - address, - uint256, - uint256, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155Received.selector; + function updateDelay(uint256 newDelay) public virtual { + TimelockControllerStorage storage $ = _getTimelockControllerStorage(); + address sender = _msgSender(); + if (sender != address(this)) { + revert TimelockUnauthorizedCaller(sender); + } + emit MinDelayChange($._minDelay, newDelay); + $._minDelay = newDelay; } /** - * @dev See {IERC1155Receiver-onERC1155BatchReceived}. + * @dev Encodes a `OperationState` into a `bytes32` representation where each bit enabled corresponds to + * the underlying position in the `OperationState` enum. For example: + * + * 0x000...1000 + * ^^^^^^----- ... + * ^---- Done + * ^--- Ready + * ^-- Waiting + * ^- Unset */ - function onERC1155BatchReceived( - address, - address, - uint256[] memory, - uint256[] memory, - bytes memory - ) public virtual override returns (bytes4) { - return this.onERC1155BatchReceived.selector; + function _encodeStateBitmap(OperationState operationState) internal pure returns (bytes32) { + return bytes32(1 << uint8(operationState)); } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingFractionalUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingFractionalUpgradeable.sol new file mode 100644 index 00000000..03cb5280 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingFractionalUpgradeable.sol @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorCountingFractional.sol) + +pragma solidity ^0.8.24; + +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {GovernorCountingSimpleUpgradeable} from "./GovernorCountingSimpleUpgradeable.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for fractional voting. + * + * Similar to {GovernorCountingSimple}, this contract is a votes counting module for {Governor} that supports 3 options: + * Against, For, Abstain. Additionally, it includes a fourth option: Fractional, which allows voters to split their voting + * power amongst the other 3 options. + * + * Votes cast with the Fractional support must be accompanied by a `params` argument that is three packed `uint128` values + * representing the weight the delegate assigns to Against, For, and Abstain respectively. For those votes cast for the other + * 3 options, the `params` argument must be empty. + * + * This is mostly useful when the delegate is a contract that implements its own rules for voting. These delegate-contracts + * can cast fractional votes according to the preferences of multiple entities delegating their voting power. + * + * Some example use cases include: + * + * * Voting from tokens that are held by a DeFi pool + * * Voting from an L2 with tokens held by a bridge + * * Voting privately from a shielded pool using zero knowledge proofs. + * + * Based on ScopeLift's https://github.com/ScopeLift/flexible-voting/blob/e5de2efd1368387b840931f19f3c184c85842761/src/GovernorCountingFractional.sol[`GovernorCountingFractional`] + * + * _Available since v5.1._ + */ +abstract contract GovernorCountingFractionalUpgradeable is Initializable, GovernorUpgradeable { + using Math for *; + + uint8 internal constant VOTE_TYPE_FRACTIONAL = 255; + + struct ProposalVote { + uint256 againstVotes; + uint256 forVotes; + uint256 abstainVotes; + mapping(address voter => uint256) usedVotes; + } + + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorCountingFractional + struct GovernorCountingFractionalStorage { + /** + * @dev Mapping from proposal ID to vote tallies for that proposal. + */ + mapping(uint256 proposalId => ProposalVote) _proposalVotes; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorCountingFractional")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorCountingFractionalStorageLocation = 0xd073797d8f9d07d835a3fc13195afeafd2f137da609f97a44f7a3aa434170800; + + function _getGovernorCountingFractionalStorage() private pure returns (GovernorCountingFractionalStorage storage $) { + assembly { + $.slot := GovernorCountingFractionalStorageLocation + } + } + + /** + * @dev A fractional vote params uses more votes than are available for that user. + */ + error GovernorExceedRemainingWeight(address voter, uint256 usedVotes, uint256 remainingWeight); + + function __GovernorCountingFractional_init() internal onlyInitializing { + } + + function __GovernorCountingFractional_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IGovernor + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo,fractional&quorum=for,abstain¶ms=fractional"; + } + + /// @inheritdoc IGovernor + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + return usedVotes(proposalId, account) > 0; + } + + /** + * @dev Get the number of votes already cast by `account` for a proposal with `proposalId`. Useful for + * integrations that allow delegates to cast rolling, partial votes. + */ + function usedVotes(uint256 proposalId, address account) public view virtual returns (uint256) { + GovernorCountingFractionalStorage storage $ = _getGovernorCountingFractionalStorage(); + return $._proposalVotes[proposalId].usedVotes[account]; + } + + /** + * @dev Get current distribution of votes for a given proposal. + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { + GovernorCountingFractionalStorage storage $ = _getGovernorCountingFractionalStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); + } + + /// @inheritdoc GovernorUpgradeable + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + GovernorCountingFractionalStorage storage $ = _getGovernorCountingFractionalStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, forVotes must be > againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + GovernorCountingFractionalStorage storage $ = _getGovernorCountingFractionalStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + return proposalVote.forVotes > proposalVote.againstVotes; + } + + /** + * @dev See {Governor-_countVote}. Function that records the delegate's votes. + * + * Executing this function consumes (part of) the delegate's weight on the proposal. This weight can be + * distributed amongst the 3 options (Against, For, Abstain) by specifying a fractional `support`. + * + * This counting module supports two vote casting modes: nominal and fractional. + * + * - Nominal: A nominal vote is cast by setting `support` to one of the 3 bravo options (Against, For, Abstain). + * - Fractional: A fractional vote is cast by setting `support` to `type(uint8).max` (255). + * + * Casting a nominal vote requires `params` to be empty and consumes the delegate's full remaining weight on the + * proposal for the specified `support` option. This is similar to the {GovernorCountingSimple} module and follows + * the `VoteType` enum from Governor Bravo. As a consequence, no vote weight remains unspent so no further voting + * is possible (for this `proposalId` and this `account`). + * + * Casting a fractional vote consumes a fraction of the delegate's remaining weight on the proposal according to the + * weights the delegate assigns to each support option (Against, For, Abstain respectively). The sum total of the + * three decoded vote weights _must_ be less than or equal to the delegate's remaining weight on the proposal (i.e. + * their checkpointed total weight minus votes already cast on the proposal). This format can be produced using: + * + * `abi.encodePacked(uint128(againstVotes), uint128(forVotes), uint128(abstainVotes))` + * + * NOTE: Consider that fractional voting restricts the number of casted votes (in each category) to 128 bits. + * Depending on how many decimals the underlying token has, a single voter may require to split their vote into + * multiple vote operations. For precision higher than ~30 decimals, large token holders may require a + * potentially large number of calls to cast all their votes. The voter has the possibility to cast all the + * remaining votes in a single operation using the traditional "bravo" vote. + */ + // slither-disable-next-line cyclomatic-complexity + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 totalWeight, + bytes memory params + ) internal virtual override returns (uint256) { + GovernorCountingFractionalStorage storage $ = _getGovernorCountingFractionalStorage(); + // Compute number of remaining votes. Returns 0 on overflow. + (, uint256 remainingWeight) = totalWeight.trySub(usedVotes(proposalId, account)); + if (remainingWeight == 0) { + revert GovernorAlreadyCastVote(account); + } + + uint256 againstVotes = 0; + uint256 forVotes = 0; + uint256 abstainVotes = 0; + uint256 usedWeight = 0; + + // For clarity of event indexing, fractional voting must be clearly advertised in the "support" field. + // + // Supported `support` value must be: + // - "Full" voting: `support = 0` (Against), `1` (For) or `2` (Abstain), with empty params. + // - "Fractional" voting: `support = 255`, with 48 bytes params. + if (support == uint8(GovernorCountingSimpleUpgradeable.VoteType.Against)) { + if (params.length != 0) revert GovernorInvalidVoteParams(); + usedWeight = againstVotes = remainingWeight; + } else if (support == uint8(GovernorCountingSimpleUpgradeable.VoteType.For)) { + if (params.length != 0) revert GovernorInvalidVoteParams(); + usedWeight = forVotes = remainingWeight; + } else if (support == uint8(GovernorCountingSimpleUpgradeable.VoteType.Abstain)) { + if (params.length != 0) revert GovernorInvalidVoteParams(); + usedWeight = abstainVotes = remainingWeight; + } else if (support == VOTE_TYPE_FRACTIONAL) { + // The `params` argument is expected to be three packed `uint128`: + // `abi.encodePacked(uint128(againstVotes), uint128(forVotes), uint128(abstainVotes))` + if (params.length != 0x30) revert GovernorInvalidVoteParams(); + + assembly ("memory-safe") { + againstVotes := shr(128, mload(add(params, 0x20))) + forVotes := shr(128, mload(add(params, 0x30))) + abstainVotes := shr(128, mload(add(params, 0x40))) + usedWeight := add(add(againstVotes, forVotes), abstainVotes) // inputs are uint128: cannot overflow + } + + // check parsed arguments are valid + if (usedWeight > remainingWeight) { + revert GovernorExceedRemainingWeight(account, usedWeight, remainingWeight); + } + } else { + revert GovernorInvalidVoteType(); + } + + // update votes tracking + ProposalVote storage details = $._proposalVotes[proposalId]; + if (againstVotes > 0) details.againstVotes += againstVotes; + if (forVotes > 0) details.forVotes += forVotes; + if (abstainVotes > 0) details.abstainVotes += abstainVotes; + details.usedVotes[account] += usedWeight; + + return usedWeight; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingOverridableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingOverridableUpgradeable.sol new file mode 100644 index 00000000..6412351a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingOverridableUpgradeable.sol @@ -0,0 +1,248 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorCountingOverridable.sol) + +pragma solidity ^0.8.24; + +import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {VotesExtendedUpgradeable} from "../utils/VotesExtendedUpgradeable.sol"; +import {GovernorVotesUpgradeable} from "./GovernorVotesUpgradeable.sol"; +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} which enables delegators to override the vote of their delegates. This module requires a + * token that inherits {VotesExtended}. + */ +abstract contract GovernorCountingOverridableUpgradeable is Initializable, GovernorVotesUpgradeable { + bytes32 public constant OVERRIDE_BALLOT_TYPEHASH = + keccak256("OverrideBallot(uint256 proposalId,uint8 support,address voter,uint256 nonce,string reason)"); + + /** + * @dev Supported vote types. Matches Governor Bravo ordering. + */ + enum VoteType { + Against, + For, + Abstain + } + + struct VoteReceipt { + uint8 casted; // 0 if vote was not casted. Otherwise: support + 1 + bool hasOverridden; + uint208 overriddenWeight; + } + + struct ProposalVote { + uint256[3] votes; + mapping(address voter => VoteReceipt) voteReceipt; + } + + /// @dev The votes casted by `delegate` were reduced by `weight` after an override vote was casted by the original token holder + event VoteReduced(address indexed delegate, uint256 proposalId, uint8 support, uint256 weight); + + /// @dev A delegated vote on `proposalId` was overridden by `weight` + event OverrideVoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); + + error GovernorAlreadyOverriddenVote(address account); + + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorCountingOverridable + struct GovernorCountingOverridableStorage { + mapping(uint256 proposalId => ProposalVote) _proposalVotes; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorCountingOverridable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorCountingOverridableStorageLocation = 0xbffde6e7ca736efb3d8171f99b09abc076e81f804bf1703dc71fb0b1f7715100; + + function _getGovernorCountingOverridableStorage() private pure returns (GovernorCountingOverridableStorage storage $) { + assembly { + $.slot := GovernorCountingOverridableStorageLocation + } + } + + function __GovernorCountingOverridable_init() internal onlyInitializing { + } + + function __GovernorCountingOverridable_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IGovernor + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo,override&quorum=for,abstain&overridable=true"; + } + + /** + * @dev See {IGovernor-hasVoted}. + * + * NOTE: Calling {castVote} (or similar) casts a vote using the voting power that is delegated to the voter. + * Conversely, calling {castOverrideVote} (or similar) uses the voting power of the account itself, from its asset + * balances. Casting an "override vote" does not count as voting and won't be reflected by this getter. Consider + * using {hasVotedOverride} to check if an account has casted an "override vote" for a given proposal id. + */ + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage(); + return $._proposalVotes[proposalId].voteReceipt[account].casted != 0; + } + + /** + * @dev Check if an `account` has overridden their delegate for a proposal. + */ + function hasVotedOverride(uint256 proposalId, address account) public view virtual returns (bool) { + GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage(); + return $._proposalVotes[proposalId].voteReceipt[account].hasOverridden; + } + + /** + * @dev Accessor to the internal vote counts. + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { + GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage(); + uint256[3] storage votes = $._proposalVotes[proposalId].votes; + return (votes[uint8(VoteType.Against)], votes[uint8(VoteType.For)], votes[uint8(VoteType.Abstain)]); + } + + /// @inheritdoc GovernorUpgradeable + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage(); + uint256[3] storage votes = $._proposalVotes[proposalId].votes; + return quorum(proposalSnapshot(proposalId)) <= votes[uint8(VoteType.For)] + votes[uint8(VoteType.Abstain)]; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage(); + uint256[3] storage votes = $._proposalVotes[proposalId].votes; + return votes[uint8(VoteType.For)] > votes[uint8(VoteType.Against)]; + } + + /** + * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo). + * + * NOTE: called by {Governor-_castVote} which emits the {IGovernor-VoteCast} (or {IGovernor-VoteCastWithParams}) + * event. + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 totalWeight, + bytes memory /*params*/ + ) internal virtual override returns (uint256) { + GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + + if (support > uint8(VoteType.Abstain)) { + revert GovernorInvalidVoteType(); + } + + if (proposalVote.voteReceipt[account].casted != 0) { + revert GovernorAlreadyCastVote(account); + } + + totalWeight -= proposalVote.voteReceipt[account].overriddenWeight; + proposalVote.votes[support] += totalWeight; + proposalVote.voteReceipt[account].casted = support + 1; + + return totalWeight; + } + + /** + * @dev Variant of {Governor-_countVote} that deals with vote overrides. + * + * NOTE: See {hasVoted} for more details about the difference between {castVote} and {castOverrideVote}. + */ + function _countOverride(uint256 proposalId, address account, uint8 support) internal virtual returns (uint256) { + GovernorCountingOverridableStorage storage $ = _getGovernorCountingOverridableStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + + if (support > uint8(VoteType.Abstain)) { + revert GovernorInvalidVoteType(); + } + + if (proposalVote.voteReceipt[account].hasOverridden) { + revert GovernorAlreadyOverriddenVote(account); + } + + uint256 snapshot = proposalSnapshot(proposalId); + uint256 overriddenWeight = VotesExtendedUpgradeable(address(token())).getPastBalanceOf(account, snapshot); + address delegate = VotesExtendedUpgradeable(address(token())).getPastDelegate(account, snapshot); + uint8 delegateCasted = proposalVote.voteReceipt[delegate].casted; + + proposalVote.voteReceipt[account].hasOverridden = true; + proposalVote.votes[support] += overriddenWeight; + if (delegateCasted == 0) { + proposalVote.voteReceipt[delegate].overriddenWeight += SafeCast.toUint208(overriddenWeight); + } else { + uint8 delegateSupport = delegateCasted - 1; + proposalVote.votes[delegateSupport] -= overriddenWeight; + emit VoteReduced(delegate, proposalId, delegateSupport, overriddenWeight); + } + + return overriddenWeight; + } + + /// @dev Variant of {Governor-_castVote} that deals with vote overrides. Returns the overridden weight. + function _castOverride( + uint256 proposalId, + address account, + uint8 support, + string calldata reason + ) internal virtual returns (uint256) { + _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Active)); + + uint256 overriddenWeight = _countOverride(proposalId, account, support); + + emit OverrideVoteCast(account, proposalId, support, overriddenWeight, reason); + + _tallyUpdated(proposalId); + + return overriddenWeight; + } + + /// @dev Public function for casting an override vote. Returns the overridden weight. + function castOverrideVote( + uint256 proposalId, + uint8 support, + string calldata reason + ) public virtual returns (uint256) { + address voter = _msgSender(); + return _castOverride(proposalId, voter, support, reason); + } + + /// @dev Public function for casting an override vote using a voter's signature. Returns the overridden weight. + function castOverrideVoteBySig( + uint256 proposalId, + uint8 support, + address voter, + string calldata reason, + bytes calldata signature + ) public virtual returns (uint256) { + bool valid = SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode( + OVERRIDE_BALLOT_TYPEHASH, + proposalId, + support, + voter, + _useNonce(voter), + keccak256(bytes(reason)) + ) + ) + ), + signature + ); + + if (!valid) { + revert GovernorInvalidSignature(voter); + } + + return _castOverride(proposalId, voter, support, reason); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingSimpleUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingSimpleUpgradeable.sol new file mode 100644 index 00000000..ebf0a773 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorCountingSimpleUpgradeable.sol @@ -0,0 +1,120 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorCountingSimple.sol) + +pragma solidity ^0.8.24; + +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for simple, 3 options, vote counting. + */ +abstract contract GovernorCountingSimpleUpgradeable is Initializable, GovernorUpgradeable { + /** + * @dev Supported vote types. Matches Governor Bravo ordering. + */ + enum VoteType { + Against, + For, + Abstain + } + + struct ProposalVote { + uint256 againstVotes; + uint256 forVotes; + uint256 abstainVotes; + mapping(address voter => bool) hasVoted; + } + + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorCountingSimple + struct GovernorCountingSimpleStorage { + mapping(uint256 proposalId => ProposalVote) _proposalVotes; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorCountingSimple")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorCountingSimpleStorageLocation = 0xa1cefa0f43667ef127a258e673c94202a79b656e62899531c4376d87a7f39800; + + function _getGovernorCountingSimpleStorage() private pure returns (GovernorCountingSimpleStorage storage $) { + assembly { + $.slot := GovernorCountingSimpleStorageLocation + } + } + + function __GovernorCountingSimple_init() internal onlyInitializing { + } + + function __GovernorCountingSimple_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IGovernor + // solhint-disable-next-line func-name-mixedcase + function COUNTING_MODE() public pure virtual override returns (string memory) { + return "support=bravo&quorum=for,abstain"; + } + + /// @inheritdoc IGovernor + function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { + GovernorCountingSimpleStorage storage $ = _getGovernorCountingSimpleStorage(); + return $._proposalVotes[proposalId].hasVoted[account]; + } + + /** + * @dev Accessor to the internal vote counts. + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes) { + GovernorCountingSimpleStorage storage $ = _getGovernorCountingSimpleStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); + } + + /// @inheritdoc GovernorUpgradeable + function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { + GovernorCountingSimpleStorage storage $ = _getGovernorCountingSimpleStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + + return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes; + } + + /** + * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. + */ + function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { + GovernorCountingSimpleStorage storage $ = _getGovernorCountingSimpleStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + + return proposalVote.forVotes > proposalVote.againstVotes; + } + + /** + * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo). + */ + function _countVote( + uint256 proposalId, + address account, + uint8 support, + uint256 totalWeight, + bytes memory // params + ) internal virtual override returns (uint256) { + GovernorCountingSimpleStorage storage $ = _getGovernorCountingSimpleStorage(); + ProposalVote storage proposalVote = $._proposalVotes[proposalId]; + + if (proposalVote.hasVoted[account]) { + revert GovernorAlreadyCastVote(account); + } + proposalVote.hasVoted[account] = true; + + if (support == uint8(VoteType.Against)) { + proposalVote.againstVotes += totalWeight; + } else if (support == uint8(VoteType.For)) { + proposalVote.forVotes += totalWeight; + } else if (support == uint8(VoteType.Abstain)) { + proposalVote.abstainVotes += totalWeight; + } else { + revert GovernorInvalidVoteType(); + } + + return totalWeight; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorNoncesKeyedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorNoncesKeyedUpgradeable.sol new file mode 100644 index 00000000..348deb69 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorNoncesKeyedUpgradeable.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorNoncesKeyed.sol) + +pragma solidity ^0.8.24; + +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {NoncesUpgradeable} from "../../utils/NoncesUpgradeable.sol"; +import {NoncesKeyedUpgradeable} from "../../utils/NoncesKeyedUpgradeable.sol"; +import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev An extension of {Governor} that extends existing nonce management to use {NoncesKeyed}, where the key is the low-order 192 bits of the `proposalId`. + * This is useful for voting by signature while maintaining separate sequences of nonces for each proposal. + * + * NOTE: Traditional (un-keyed) nonces are still supported and can continue to be used as if this extension was not present. + */ +abstract contract GovernorNoncesKeyedUpgradeable is Initializable, GovernorUpgradeable, NoncesKeyedUpgradeable { + function __GovernorNoncesKeyed_init() internal onlyInitializing { + } + + function __GovernorNoncesKeyed_init_unchained() internal onlyInitializing { + } + function _useCheckedNonce(address owner, uint256 nonce) internal virtual override(NoncesUpgradeable, NoncesKeyedUpgradeable) { + super._useCheckedNonce(owner, nonce); + } + + /** + * @dev Check the signature against keyed nonce and falls back to the traditional nonce. + * + * NOTE: This function won't call `super._validateVoteSig` if the keyed nonce is valid. + * Side effects may be skipped depending on the linearization of the function. + */ + function _validateVoteSig( + uint256 proposalId, + uint8 support, + address voter, + bytes memory signature + ) internal virtual override returns (bool) { + if ( + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode(BALLOT_TYPEHASH, proposalId, support, voter, nonces(voter, uint192(proposalId))) + ) + ), + signature + ) + ) { + _useNonce(voter, uint192(proposalId)); + return true; + } else { + return super._validateVoteSig(proposalId, support, voter, signature); + } + } + + /** + * @dev Check the signature against keyed nonce and falls back to the traditional nonce. + * + * NOTE: This function won't call `super._validateExtendedVoteSig` if the keyed nonce is valid. + * Side effects may be skipped depending on the linearization of the function. + */ + function _validateExtendedVoteSig( + uint256 proposalId, + uint8 support, + address voter, + string memory reason, + bytes memory params, + bytes memory signature + ) internal virtual override returns (bool) { + if ( + SignatureChecker.isValidSignatureNow( + voter, + _hashTypedDataV4( + keccak256( + abi.encode( + EXTENDED_BALLOT_TYPEHASH, + proposalId, + support, + voter, + nonces(voter, uint192(proposalId)), + keccak256(bytes(reason)), + keccak256(params) + ) + ) + ), + signature + ) + ) { + _useNonce(voter, uint192(proposalId)); + return true; + } else { + return super._validateExtendedVoteSig(proposalId, support, voter, reason, params, signature); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol similarity index 52% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol index 493ffea3..d337d302 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/extensions/GovernorPreventLateQuorum.sol) +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorPreventLateQuorum.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.24; -import "../GovernorUpgradeable.sol"; -import "../../utils/math/MathUpgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev A module that ensures there is a minimum voting period after quorum is reached. This prevents a large voter from @@ -15,14 +15,23 @@ import {Initializable} from "../../proxy/utils/Initializable.sol"; * If a vote causes quorum to be reached, the proposal's voting period may be extended so that it does not end before at * least a specified time has passed (the "vote extension" parameter). This parameter can be set through a governance * proposal. - * - * _Available since v4.5._ */ abstract contract GovernorPreventLateQuorumUpgradeable is Initializable, GovernorUpgradeable { - uint64 private _voteExtension; + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorPreventLateQuorum + struct GovernorPreventLateQuorumStorage { + uint48 _voteExtension; + + mapping(uint256 proposalId => uint48) _extendedDeadlines; + } - /// @custom:oz-retyped-from mapping(uint256 => Timers.BlockNumber) - mapping(uint256 => uint64) private _extendedDeadlines; + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorPreventLateQuorum")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorPreventLateQuorumStorageLocation = 0x042f525fd47e44d02e065dd7bb464f47b4f926fbd05b5e087891ebd756adf100; + + function _getGovernorPreventLateQuorumStorage() private pure returns (GovernorPreventLateQuorumStorage storage $) { + assembly { + $.slot := GovernorPreventLateQuorumStorageLocation + } + } /// @dev Emitted when a proposal deadline is pushed back due to reaching quorum late in its voting period. event ProposalExtended(uint256 indexed proposalId, uint64 extendedDeadline); @@ -31,15 +40,15 @@ abstract contract GovernorPreventLateQuorumUpgradeable is Initializable, Governo event LateQuorumVoteExtensionSet(uint64 oldVoteExtension, uint64 newVoteExtension); /** - * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the governor - * clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period ends. If - * necessary the voting period will be extended beyond the one set during proposal creation. + * @dev Initializes the vote extension parameter: the time in either number of blocks or seconds (depending on the + * governor clock mode) that is required to pass since the moment a proposal reaches quorum until its voting period + * ends. If necessary the voting period will be extended beyond the one set during proposal creation. */ - function __GovernorPreventLateQuorum_init(uint64 initialVoteExtension) internal onlyInitializing { + function __GovernorPreventLateQuorum_init(uint48 initialVoteExtension) internal onlyInitializing { __GovernorPreventLateQuorum_init_unchained(initialVoteExtension); } - function __GovernorPreventLateQuorum_init_unchained(uint64 initialVoteExtension) internal onlyInitializing { + function __GovernorPreventLateQuorum_init_unchained(uint48 initialVoteExtension) internal onlyInitializing { _setLateQuorumVoteExtension(initialVoteExtension); } @@ -48,43 +57,36 @@ abstract contract GovernorPreventLateQuorumUpgradeable is Initializable, Governo * proposal reached quorum late in the voting period. See {Governor-proposalDeadline}. */ function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { - return MathUpgradeable.max(super.proposalDeadline(proposalId), _extendedDeadlines[proposalId]); + GovernorPreventLateQuorumStorage storage $ = _getGovernorPreventLateQuorumStorage(); + return Math.max(super.proposalDeadline(proposalId), $._extendedDeadlines[proposalId]); } /** - * @dev Casts a vote and detects if it caused quorum to be reached, potentially extending the voting period. See - * {Governor-_castVote}. + * @dev Vote tally updated and detects if it caused quorum to be reached, potentially extending the voting period. * * May emit a {ProposalExtended} event. */ - function _castVote( - uint256 proposalId, - address account, - uint8 support, - string memory reason, - bytes memory params - ) internal virtual override returns (uint256) { - uint256 result = super._castVote(proposalId, account, support, reason, params); - - if (_extendedDeadlines[proposalId] == 0 && _quorumReached(proposalId)) { - uint64 extendedDeadline = clock() + lateQuorumVoteExtension(); + function _tallyUpdated(uint256 proposalId) internal virtual override { + GovernorPreventLateQuorumStorage storage $ = _getGovernorPreventLateQuorumStorage(); + super._tallyUpdated(proposalId); + if ($._extendedDeadlines[proposalId] == 0 && _quorumReached(proposalId)) { + uint48 extendedDeadline = clock() + lateQuorumVoteExtension(); if (extendedDeadline > proposalDeadline(proposalId)) { emit ProposalExtended(proposalId, extendedDeadline); } - _extendedDeadlines[proposalId] = extendedDeadline; + $._extendedDeadlines[proposalId] = extendedDeadline; } - - return result; } /** * @dev Returns the current value of the vote extension parameter: the number of blocks that are required to pass * from the time a proposal reaches quorum until its voting period ends. */ - function lateQuorumVoteExtension() public view virtual returns (uint64) { - return _voteExtension; + function lateQuorumVoteExtension() public view virtual returns (uint48) { + GovernorPreventLateQuorumStorage storage $ = _getGovernorPreventLateQuorumStorage(); + return $._voteExtension; } /** @@ -93,7 +95,7 @@ abstract contract GovernorPreventLateQuorumUpgradeable is Initializable, Governo * * Emits a {LateQuorumVoteExtensionSet} event. */ - function setLateQuorumVoteExtension(uint64 newVoteExtension) public virtual onlyGovernance { + function setLateQuorumVoteExtension(uint48 newVoteExtension) public virtual onlyGovernance { _setLateQuorumVoteExtension(newVoteExtension); } @@ -103,15 +105,9 @@ abstract contract GovernorPreventLateQuorumUpgradeable is Initializable, Governo * * Emits a {LateQuorumVoteExtensionSet} event. */ - function _setLateQuorumVoteExtension(uint64 newVoteExtension) internal virtual { - emit LateQuorumVoteExtensionSet(_voteExtension, newVoteExtension); - _voteExtension = newVoteExtension; + function _setLateQuorumVoteExtension(uint48 newVoteExtension) internal virtual { + GovernorPreventLateQuorumStorage storage $ = _getGovernorPreventLateQuorumStorage(); + emit LateQuorumVoteExtensionSet($._voteExtension, newVoteExtension); + $._voteExtension = newVoteExtension; } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorProposalGuardianUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorProposalGuardianUpgradeable.sol new file mode 100644 index 00000000..9ac6abac --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorProposalGuardianUpgradeable.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorProposalGuardian.sol) + +pragma solidity ^0.8.24; + +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} which adds a proposal guardian that can cancel proposals at any stage in the proposal's lifecycle. + * + * NOTE: if the proposal guardian is not configured, then proposers take this role for their proposals. + */ +abstract contract GovernorProposalGuardianUpgradeable is Initializable, GovernorUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorProposalGuardian + struct GovernorProposalGuardianStorage { + address _proposalGuardian; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorProposalGuardian")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorProposalGuardianStorageLocation = 0x2953e0c334ced07e397f02d0e9b450dbfd92be015e93a9c249855132826e0300; + + function _getGovernorProposalGuardianStorage() private pure returns (GovernorProposalGuardianStorage storage $) { + assembly { + $.slot := GovernorProposalGuardianStorageLocation + } + } + + event ProposalGuardianSet(address oldProposalGuardian, address newProposalGuardian); + + function __GovernorProposalGuardian_init() internal onlyInitializing { + } + + function __GovernorProposalGuardian_init_unchained() internal onlyInitializing { + } + /** + * @dev Getter that returns the address of the proposal guardian. + */ + function proposalGuardian() public view virtual returns (address) { + GovernorProposalGuardianStorage storage $ = _getGovernorProposalGuardianStorage(); + return $._proposalGuardian; + } + + /** + * @dev Update the proposal guardian's address. This operation can only be performed through a governance proposal. + * + * Emits a {ProposalGuardianSet} event. + */ + function setProposalGuardian(address newProposalGuardian) public virtual onlyGovernance { + _setProposalGuardian(newProposalGuardian); + } + + /** + * @dev Internal setter for the proposal guardian. + * + * Emits a {ProposalGuardianSet} event. + */ + function _setProposalGuardian(address newProposalGuardian) internal virtual { + GovernorProposalGuardianStorage storage $ = _getGovernorProposalGuardianStorage(); + emit ProposalGuardianSet($._proposalGuardian, newProposalGuardian); + $._proposalGuardian = newProposalGuardian; + } + + /** + * @dev Override {Governor-_validateCancel} to implement the extended cancellation logic. + * + * * The {proposalGuardian} can cancel any proposal at any point. + * * If no proposal guardian is set, the {IGovernor-proposalProposer} can cancel their proposals at any point. + * * In any case, permissions defined in {Governor-_validateCancel} (or another override) remains valid. + */ + function _validateCancel(uint256 proposalId, address caller) internal view virtual override returns (bool) { + address guardian = proposalGuardian(); + + return + guardian == caller || + (guardian == address(0) && caller == proposalProposer(proposalId)) || + super._validateCancel(proposalId, caller); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSequentialProposalIdUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSequentialProposalIdUpgradeable.sol new file mode 100644 index 00000000..180fab7b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSequentialProposalIdUpgradeable.sol @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorSequentialProposalId.sol) + +pragma solidity ^0.8.24; + +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} that changes the numbering of proposal ids from the default hash-based approach to + * sequential ids. + */ +abstract contract GovernorSequentialProposalIdUpgradeable is Initializable, GovernorUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorSequentialProposalId + struct GovernorSequentialProposalIdStorage { + uint256 _latestProposalId; + mapping(uint256 proposalHash => uint256 proposalId) _proposalIds; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorSequentialProposalId")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorSequentialProposalIdStorageLocation = 0x4b8c47b641115bbb755a0530712d89d8042b41728d36570a6119c90ae1b76800; + + function _getGovernorSequentialProposalIdStorage() private pure returns (GovernorSequentialProposalIdStorage storage $) { + assembly { + $.slot := GovernorSequentialProposalIdStorageLocation + } + } + + /** + * @dev The {latestProposalId} may only be initialized if it hasn't been set yet + * (through initialization or the creation of a proposal). + */ + error GovernorAlreadyInitializedLatestProposalId(); + + function __GovernorSequentialProposalId_init() internal onlyInitializing { + } + + function __GovernorSequentialProposalId_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IGovernor + function getProposalId( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public view virtual override returns (uint256) { + GovernorSequentialProposalIdStorage storage $ = _getGovernorSequentialProposalIdStorage(); + uint256 proposalHash = hashProposal(targets, values, calldatas, descriptionHash); + uint256 storedProposalId = $._proposalIds[proposalHash]; + if (storedProposalId == 0) { + revert GovernorNonexistentProposal(0); + } + return storedProposalId; + } + + /** + * @dev Returns the latest proposal id. A return value of 0 means no proposals have been created yet. + */ + function latestProposalId() public view virtual returns (uint256) { + GovernorSequentialProposalIdStorage storage $ = _getGovernorSequentialProposalIdStorage(); + return $._latestProposalId; + } + + /** + * @dev See {IGovernor-_propose}. + * Hook into the proposing mechanism to increment proposal count. + */ + function _propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description, + address proposer + ) internal virtual override returns (uint256) { + GovernorSequentialProposalIdStorage storage $ = _getGovernorSequentialProposalIdStorage(); + uint256 proposalHash = hashProposal(targets, values, calldatas, keccak256(bytes(description))); + uint256 storedProposalId = $._proposalIds[proposalHash]; + if (storedProposalId == 0) { + $._proposalIds[proposalHash] = ++$._latestProposalId; + } + return super._propose(targets, values, calldatas, description, proposer); + } + + /** + * @dev Internal function to set the {latestProposalId}. This function is helpful when transitioning + * from another governance system. The next proposal id will be `newLatestProposalId` + 1. + * + * May only call this function if the current value of {latestProposalId} is 0. + */ + function _initializeLatestProposalId(uint256 newLatestProposalId) internal virtual { + GovernorSequentialProposalIdStorage storage $ = _getGovernorSequentialProposalIdStorage(); + if ($._latestProposalId != 0) { + revert GovernorAlreadyInitializedLatestProposalId(); + } + $._latestProposalId = newLatestProposalId; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSettingsUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSettingsUpgradeable.sol new file mode 100644 index 00000000..06bfac82 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSettingsUpgradeable.sol @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorSettings.sol) + +pragma solidity ^0.8.24; + +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for settings updatable through governance. + */ +abstract contract GovernorSettingsUpgradeable is Initializable, GovernorUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorSettings + struct GovernorSettingsStorage { + // amount of token + uint256 _proposalThreshold; + // timepoint: limited to uint48 in core (same as clock() type) + uint48 _votingDelay; + // duration: limited to uint32 in core + uint32 _votingPeriod; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorSettings")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorSettingsStorageLocation = 0x00d7616c8fe29c6c2fbe1d0c5bc8f2faa4c35b43746e70b24b4d532752affd00; + + function _getGovernorSettingsStorage() private pure returns (GovernorSettingsStorage storage $) { + assembly { + $.slot := GovernorSettingsStorageLocation + } + } + + event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay); + event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod); + event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold); + + /** + * @dev Initialize the governance parameters. + */ + function __GovernorSettings_init(uint48 initialVotingDelay, uint32 initialVotingPeriod, uint256 initialProposalThreshold) internal onlyInitializing { + __GovernorSettings_init_unchained(initialVotingDelay, initialVotingPeriod, initialProposalThreshold); + } + + function __GovernorSettings_init_unchained(uint48 initialVotingDelay, uint32 initialVotingPeriod, uint256 initialProposalThreshold) internal onlyInitializing { + _setVotingDelay(initialVotingDelay); + _setVotingPeriod(initialVotingPeriod); + _setProposalThreshold(initialProposalThreshold); + } + + /// @inheritdoc IGovernor + function votingDelay() public view virtual override returns (uint256) { + GovernorSettingsStorage storage $ = _getGovernorSettingsStorage(); + return $._votingDelay; + } + + /// @inheritdoc IGovernor + function votingPeriod() public view virtual override returns (uint256) { + GovernorSettingsStorage storage $ = _getGovernorSettingsStorage(); + return $._votingPeriod; + } + + /// @inheritdoc GovernorUpgradeable + function proposalThreshold() public view virtual override returns (uint256) { + GovernorSettingsStorage storage $ = _getGovernorSettingsStorage(); + return $._proposalThreshold; + } + + /** + * @dev Update the voting delay. This operation can only be performed through a governance proposal. + * + * Emits a {VotingDelaySet} event. + */ + function setVotingDelay(uint48 newVotingDelay) public virtual onlyGovernance { + _setVotingDelay(newVotingDelay); + } + + /** + * @dev Update the voting period. This operation can only be performed through a governance proposal. + * + * Emits a {VotingPeriodSet} event. + */ + function setVotingPeriod(uint32 newVotingPeriod) public virtual onlyGovernance { + _setVotingPeriod(newVotingPeriod); + } + + /** + * @dev Update the proposal threshold. This operation can only be performed through a governance proposal. + * + * Emits a {ProposalThresholdSet} event. + */ + function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance { + _setProposalThreshold(newProposalThreshold); + } + + /** + * @dev Internal setter for the voting delay. + * + * Emits a {VotingDelaySet} event. + */ + function _setVotingDelay(uint48 newVotingDelay) internal virtual { + GovernorSettingsStorage storage $ = _getGovernorSettingsStorage(); + emit VotingDelaySet($._votingDelay, newVotingDelay); + $._votingDelay = newVotingDelay; + } + + /** + * @dev Internal setter for the voting period. + * + * Emits a {VotingPeriodSet} event. + */ + function _setVotingPeriod(uint32 newVotingPeriod) internal virtual { + GovernorSettingsStorage storage $ = _getGovernorSettingsStorage(); + if (newVotingPeriod == 0) { + revert GovernorInvalidVotingPeriod(0); + } + emit VotingPeriodSet($._votingPeriod, newVotingPeriod); + $._votingPeriod = newVotingPeriod; + } + + /** + * @dev Internal setter for the proposal threshold. + * + * Emits a {ProposalThresholdSet} event. + */ + function _setProposalThreshold(uint256 newProposalThreshold) internal virtual { + GovernorSettingsStorage storage $ = _getGovernorSettingsStorage(); + emit ProposalThresholdSet($._proposalThreshold, newProposalThreshold); + $._proposalThreshold = newProposalThreshold; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorStorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorStorageUpgradeable.sol new file mode 100644 index 00000000..79218dce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorStorageUpgradeable.sol @@ -0,0 +1,159 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (governance/extensions/GovernorStorage.sol) + +pragma solidity ^0.8.24; + +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} that implements storage of proposal details. This module also provides primitives for + * the enumerability of proposals. + * + * Use cases for this module include: + * - UIs that explore the proposal state without relying on event indexing. + * - Using only the proposalId as an argument in the {Governor-queue} and {Governor-execute} functions for L2 chains + * where storage is cheap compared to calldata. + */ +abstract contract GovernorStorageUpgradeable is Initializable, GovernorUpgradeable { + struct ProposalDetails { + address[] targets; + uint256[] values; + bytes[] calldatas; + bytes32 descriptionHash; + } + + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorStorage + struct GovernorStorageStorage { + uint256[] _proposalIds; + mapping(uint256 proposalId => ProposalDetails) _proposalDetails; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorStorage")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorStorageStorageLocation = 0x7fd223d3380145bd26132714391e777c488a0df7ac2dd4b66419d8549fb3a600; + + function _getGovernorStorageStorage() private pure returns (GovernorStorageStorage storage $) { + assembly { + $.slot := GovernorStorageStorageLocation + } + } + + function __GovernorStorage_init() internal onlyInitializing { + } + + function __GovernorStorage_init_unchained() internal onlyInitializing { + } + /** + * @dev Hook into the proposing mechanism + */ + function _propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description, + address proposer + ) internal virtual override returns (uint256) { + GovernorStorageStorage storage $ = _getGovernorStorageStorage(); + uint256 proposalId = super._propose(targets, values, calldatas, description, proposer); + + // store + $._proposalIds.push(proposalId); + $._proposalDetails[proposalId] = ProposalDetails({ + targets: targets, + values: values, + calldatas: calldatas, + descriptionHash: keccak256(bytes(description)) + }); + + return proposalId; + } + + /** + * @dev Version of {IGovernor-queue} with only `proposalId` as an argument. + */ + function queue(uint256 proposalId) public virtual { + GovernorStorageStorage storage $ = _getGovernorStorageStorage(); + // here, using storage is more efficient than memory + ProposalDetails storage details = $._proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + queue(details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev Version of {IGovernor-execute} with only `proposalId` as an argument. + */ + function execute(uint256 proposalId) public payable virtual { + GovernorStorageStorage storage $ = _getGovernorStorageStorage(); + // here, using storage is more efficient than memory + ProposalDetails storage details = $._proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + execute(details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev ProposalId version of {IGovernor-cancel}. + */ + function cancel(uint256 proposalId) public virtual { + GovernorStorageStorage storage $ = _getGovernorStorageStorage(); + // here, using storage is more efficient than memory + ProposalDetails storage details = $._proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + cancel(details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev Returns the number of stored proposals. + */ + function proposalCount() public view virtual returns (uint256) { + GovernorStorageStorage storage $ = _getGovernorStorageStorage(); + return $._proposalIds.length; + } + + /** + * @dev Returns the details of a proposalId. Reverts if `proposalId` is not a known proposal. + */ + function proposalDetails( + uint256 proposalId + ) + public + view + virtual + returns (address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash) + { + GovernorStorageStorage storage $ = _getGovernorStorageStorage(); + // here, using memory is more efficient than storage + ProposalDetails memory details = $._proposalDetails[proposalId]; + if (details.descriptionHash == 0) { + revert GovernorNonexistentProposal(proposalId); + } + return (details.targets, details.values, details.calldatas, details.descriptionHash); + } + + /** + * @dev Returns the details (including the proposalId) of a proposal given its sequential index. + */ + function proposalDetailsAt( + uint256 index + ) + public + view + virtual + returns ( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) + { + GovernorStorageStorage storage $ = _getGovernorStorageStorage(); + proposalId = $._proposalIds[index]; + (targets, values, calldatas, descriptionHash) = proposalDetails(proposalId); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSuperQuorumUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSuperQuorumUpgradeable.sol new file mode 100644 index 00000000..15b7ab3e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorSuperQuorumUpgradeable.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorSuperQuorum.sol) + +pragma solidity ^0.8.24; + +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} with a super quorum. Proposals that meet the super quorum (and have a majority of for + * votes) advance to the `Succeeded` state before the proposal deadline. Counting modules that want to use this + * extension must implement {proposalVotes}. + */ +abstract contract GovernorSuperQuorumUpgradeable is Initializable, GovernorUpgradeable { + function __GovernorSuperQuorum_init() internal onlyInitializing { + } + + function __GovernorSuperQuorum_init_unchained() internal onlyInitializing { + } + /** + * @dev Minimum number of cast votes required for a proposal to reach super quorum. Only FOR votes are counted + * towards the super quorum. Once the super quorum is reached, an active proposal can proceed to the next state + * without waiting for the proposal deadline. + * + * NOTE: The `timepoint` parameter corresponds to the snapshot used for counting the vote. This enables scaling of the + * quorum depending on values such as the `totalSupply` of a token at this timepoint (see {ERC20Votes}). + * + * NOTE: Make sure the value specified for the super quorum is greater than {quorum}, otherwise, it may be + * possible to pass a proposal with less votes than the default quorum. + */ + function superQuorum(uint256 timepoint) public view virtual returns (uint256); + + /** + * @dev Accessor to the internal vote counts. This must be implemented by the counting module. Counting modules + * that don't implement this function are incompatible with this module + */ + function proposalVotes( + uint256 proposalId + ) public view virtual returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes); + + /** + * @dev Overridden version of the {Governor-state} function that checks if the proposal has reached the super + * quorum. + * + * NOTE: If the proposal reaches super quorum but {_voteSucceeded} returns false, eg, assuming the super quorum + * has been set low enough that both FOR and AGAINST votes have exceeded it and AGAINST votes exceed FOR votes, + * the proposal continues to be active until {_voteSucceeded} returns true or the proposal deadline is reached. + * This means that with a low super quorum it is also possible that a vote can succeed prematurely before enough + * AGAINST voters have a chance to vote. Hence, it is recommended to set a high enough super quorum to avoid these + * types of scenarios. + */ + function state(uint256 proposalId) public view virtual override returns (ProposalState) { + ProposalState currentState = super.state(proposalId); + if (currentState != ProposalState.Active) return currentState; + + (, uint256 forVotes, ) = proposalVotes(proposalId); + if (forVotes < superQuorum(proposalSnapshot(proposalId)) || !_voteSucceeded(proposalId)) { + return ProposalState.Active; + } else if (proposalEta(proposalId) == 0) { + return ProposalState.Succeeded; + } else { + return ProposalState.Queued; + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockAccessUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockAccessUpgradeable.sol new file mode 100644 index 00000000..71c5777a --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockAccessUpgradeable.sol @@ -0,0 +1,376 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorTimelockAccess.sol) + +pragma solidity ^0.8.24; + +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {AuthorityUtils} from "@openzeppelin/contracts/access/manager/AuthorityUtils.sol"; +import {IAccessManager} from "@openzeppelin/contracts/access/manager/IAccessManager.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {Time} from "@openzeppelin/contracts/utils/types/Time.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev This module connects a {Governor} instance to an {AccessManager} instance, allowing the governor to make calls + * that are delay-restricted by the manager using the normal {queue} workflow. An optional base delay is applied to + * operations that are not delayed externally by the manager. Execution of a proposal will be delayed as much as + * necessary to meet the required delays of all of its operations. + * + * This extension allows the governor to hold and use its own assets and permissions, unlike {GovernorTimelockControl} + * and {GovernorTimelockCompound}, where the timelock is a separate contract that must be the one to hold assets and + * permissions. Operations that are delay-restricted by the manager, however, will be executed through the + * {AccessManager-execute} function. + * + * ==== Security Considerations + * + * Some operations may be cancelable in the `AccessManager` by the admin or a set of guardians, depending on the + * restricted function being invoked. Since proposals are atomic, the cancellation by a guardian of a single operation + * in a proposal will cause all of the proposal to become unable to execute. Consider proposing cancellable operations + * separately. + * + * By default, function calls will be routed through the associated `AccessManager` whenever it claims the target + * function to be restricted by it. However, admins may configure the manager to make that claim for functions that a + * governor would want to call directly (e.g., token transfers) in an attempt to deny it access to those functions. To + * mitigate this attack vector, the governor is able to ignore the restrictions claimed by the `AccessManager` using + * {setAccessManagerIgnored}. While permanent denial of service is mitigated, temporary DoS may still be technically + * possible. All of the governor's own functions (e.g., {setBaseDelaySeconds}) ignore the `AccessManager` by default. + * + * NOTE: `AccessManager` does not support scheduling more than one operation with the same target and calldata at + * the same time. See {AccessManager-schedule} for a workaround. + */ +abstract contract GovernorTimelockAccessUpgradeable is Initializable, GovernorUpgradeable { + // An execution plan is produced at the moment a proposal is created, in order to fix at that point the exact + // execution semantics of the proposal, namely whether a call will go through {AccessManager-execute}. + struct ExecutionPlan { + uint16 length; + uint32 delay; + // We use mappings instead of arrays because it allows us to pack values in storage more tightly without + // storing the length redundantly. + // We pack 8 operations' data in each bucket. Each uint32 value is set to 1 upon proposal creation if it has + // to be scheduled and executed through the manager. Upon queuing, the value is set to nonce + 2, where the + // nonce is received from the manager when scheduling the operation. + mapping(uint256 operationBucket => uint32[8]) managerData; + } + + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorTimelockAccess + struct GovernorTimelockAccessStorage { + // The meaning of the "toggle" set to true depends on the target contract. + // If target == address(this), the manager is ignored by default, and a true toggle means it won't be ignored. + // For all other target contracts, the manager is used by default, and a true toggle means it will be ignored. + mapping(address target => mapping(bytes4 selector => bool)) _ignoreToggle; + + mapping(uint256 proposalId => ExecutionPlan) _executionPlan; + + uint32 _baseDelay; + + IAccessManager _manager; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorTimelockAccess")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorTimelockAccessStorageLocation = 0xb26e23d38df572f5669f6310d407229c15b4fb320cb19bf5e8c38856d28d0800; + + function _getGovernorTimelockAccessStorage() private pure returns (GovernorTimelockAccessStorage storage $) { + assembly { + $.slot := GovernorTimelockAccessStorageLocation + } + } + + error GovernorUnmetDelay(uint256 proposalId, uint256 neededTimestamp); + error GovernorMismatchedNonce(uint256 proposalId, uint256 expectedNonce, uint256 actualNonce); + error GovernorLockedIgnore(); + + event BaseDelaySet(uint32 oldBaseDelaySeconds, uint32 newBaseDelaySeconds); + event AccessManagerIgnoredSet(address target, bytes4 selector, bool ignored); + + /** + * @dev Initialize the governor with an {AccessManager} and initial base delay. + */ + function __GovernorTimelockAccess_init(address manager, uint32 initialBaseDelay) internal onlyInitializing { + __GovernorTimelockAccess_init_unchained(manager, initialBaseDelay); + } + + function __GovernorTimelockAccess_init_unchained(address manager, uint32 initialBaseDelay) internal onlyInitializing { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + $._manager = IAccessManager(manager); + _setBaseDelaySeconds(initialBaseDelay); + } + + /** + * @dev Returns the {AccessManager} instance associated to this governor. + */ + function accessManager() public view virtual returns (IAccessManager) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + return $._manager; + } + + /** + * @dev Base delay that will be applied to all function calls. Some may be further delayed by their associated + * `AccessManager` authority; in this case the final delay will be the maximum of the base delay and the one + * demanded by the authority. + * + * NOTE: Execution delays are processed by the `AccessManager` contracts, and according to that contract are + * expressed in seconds. Therefore, the base delay is also in seconds, regardless of the governor's clock mode. + */ + function baseDelaySeconds() public view virtual returns (uint32) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + return $._baseDelay; + } + + /** + * @dev Change the value of {baseDelaySeconds}. This operation can only be invoked through a governance proposal. + */ + function setBaseDelaySeconds(uint32 newBaseDelay) public virtual onlyGovernance { + _setBaseDelaySeconds(newBaseDelay); + } + + /** + * @dev Change the value of {baseDelaySeconds}. Internal function without access control. + */ + function _setBaseDelaySeconds(uint32 newBaseDelay) internal virtual { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + emit BaseDelaySet($._baseDelay, newBaseDelay); + $._baseDelay = newBaseDelay; + } + + /** + * @dev Check if restrictions from the associated {AccessManager} are ignored for a target function. Returns true + * when the target function will be invoked directly regardless of `AccessManager` settings for the function. + * See {setAccessManagerIgnored} and Security Considerations above. + */ + function isAccessManagerIgnored(address target, bytes4 selector) public view virtual returns (bool) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + bool isGovernor = target == address(this); + return $._ignoreToggle[target][selector] != isGovernor; // equivalent to: isGovernor ? !toggle : toggle + } + + /** + * @dev Configure whether restrictions from the associated {AccessManager} are ignored for a target function. + * See Security Considerations above. + */ + function setAccessManagerIgnored( + address target, + bytes4[] calldata selectors, + bool ignored + ) public virtual onlyGovernance { + for (uint256 i = 0; i < selectors.length; ++i) { + _setAccessManagerIgnored(target, selectors[i], ignored); + } + } + + /** + * @dev Internal version of {setAccessManagerIgnored} without access restriction. + */ + function _setAccessManagerIgnored(address target, bytes4 selector, bool ignored) internal virtual { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + bool isGovernor = target == address(this); + if (isGovernor && selector == this.setAccessManagerIgnored.selector) { + revert GovernorLockedIgnore(); + } + $._ignoreToggle[target][selector] = ignored != isGovernor; // equivalent to: isGovernor ? !ignored : ignored + emit AccessManagerIgnoredSet(target, selector, ignored); + } + + /** + * @dev Public accessor to check the execution plan, including the number of seconds that the proposal will be + * delayed since queuing, an array indicating which of the proposal actions will be executed indirectly through + * the associated {AccessManager}, and another indicating which will be scheduled in {queue}. Note that + * those that must be scheduled are cancellable by `AccessManager` guardians. + */ + function proposalExecutionPlan( + uint256 proposalId + ) public view returns (uint32 delay, bool[] memory indirect, bool[] memory withDelay) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + ExecutionPlan storage plan = $._executionPlan[proposalId]; + + uint32 length = plan.length; + delay = plan.delay; + indirect = new bool[](length); + withDelay = new bool[](length); + for (uint256 i = 0; i < length; ++i) { + (indirect[i], withDelay[i], ) = _getManagerData(plan, i); + } + + return (delay, indirect, withDelay); + } + + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256 proposalId) public view virtual override returns (bool) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + return $._executionPlan[proposalId].delay > 0; + } + + /// @inheritdoc IGovernor + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override returns (uint256) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + uint256 proposalId = super.propose(targets, values, calldatas, description); + + uint32 neededDelay = baseDelaySeconds(); + + ExecutionPlan storage plan = $._executionPlan[proposalId]; + plan.length = SafeCast.toUint16(targets.length); + + for (uint256 i = 0; i < targets.length; ++i) { + if (calldatas[i].length < 4) { + continue; + } + address target = targets[i]; + bytes4 selector = bytes4(calldatas[i]); + (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay( + address($._manager), + address(this), + target, + selector + ); + if ((immediate || delay > 0) && !isAccessManagerIgnored(target, selector)) { + _setManagerData(plan, i, !immediate, 0); + // downcast is safe because both arguments are uint32 + neededDelay = uint32(Math.max(delay, neededDelay)); + } + } + + plan.delay = neededDelay; + + return proposalId; + } + + /** + * @dev Mechanism to queue a proposal, potentially scheduling some of its operations in the AccessManager. + * + * NOTE: The execution delay is chosen based on the delay information retrieved in {propose}. This value may be + * off if the delay was updated since proposal creation. In this case, the proposal needs to be recreated. + */ + function _queueOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory /* values */, + bytes[] memory calldatas, + bytes32 /* descriptionHash */ + ) internal virtual override returns (uint48) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + ExecutionPlan storage plan = $._executionPlan[proposalId]; + uint48 etaSeconds = Time.timestamp() + plan.delay; + + for (uint256 i = 0; i < targets.length; ++i) { + (, bool withDelay, ) = _getManagerData(plan, i); + if (withDelay) { + // This function can reenter when calling `_manager.schedule` before performing state updates in `_setManagerData`. + // However, the `manager` is a trusted contract in the current context's security model (e.g. an `AccessManager`). + // slither-disable-next-line reentrancy-no-eth + (, uint32 nonce) = $._manager.schedule(targets[i], calldatas[i], etaSeconds); + _setManagerData(plan, i, true, nonce); + } + } + + return etaSeconds; + } + + /** + * @dev Mechanism to execute a proposal, potentially going through {AccessManager-execute} for delayed operations. + */ + function _executeOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /* descriptionHash */ + ) internal virtual override { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + uint48 etaSeconds = SafeCast.toUint48(proposalEta(proposalId)); + if (block.timestamp < etaSeconds) { + revert GovernorUnmetDelay(proposalId, etaSeconds); + } + + ExecutionPlan storage plan = $._executionPlan[proposalId]; + + for (uint256 i = 0; i < targets.length; ++i) { + (bool controlled, bool withDelay, uint32 nonce) = _getManagerData(plan, i); + if (controlled) { + uint32 executedNonce = $._manager.execute{value: values[i]}(targets[i], calldatas[i]); + if (withDelay && executedNonce != nonce) { + revert GovernorMismatchedNonce(proposalId, nonce, executedNonce); + } + } else { + (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); + Address.verifyCallResult(success, returndata); + } + } + } + + /// @inheritdoc GovernorUpgradeable + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + GovernorTimelockAccessStorage storage $ = _getGovernorTimelockAccessStorage(); + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + uint48 etaSeconds = SafeCast.toUint48(proposalEta(proposalId)); + + ExecutionPlan storage plan = $._executionPlan[proposalId]; + + // If the proposal has been scheduled it will have an ETA and we may have to externally cancel + if (etaSeconds != 0) { + for (uint256 i = 0; i < targets.length; ++i) { + (, bool withDelay, uint32 nonce) = _getManagerData(plan, i); + // Only attempt to cancel if the execution plan included a delay + if (withDelay) { + bytes32 operationId = $._manager.hashOperation(address(this), targets[i], calldatas[i]); + // Check first if the current operation nonce is the one that we observed previously. It could + // already have been cancelled and rescheduled. We don't want to cancel unless it is exactly the + // instance that we previously scheduled. + if (nonce == $._manager.getNonce(operationId)) { + // It is important that all calls have an opportunity to be cancelled. We chose to ignore + // potential failures of some of the cancel operations to give the other operations a chance to + // be properly cancelled. In particular cancel might fail if the operation was already cancelled + // by guardians previously. We don't match on the revert reason to avoid encoding assumptions + // about specific errors. + try $._manager.cancel(address(this), targets[i], calldatas[i]) {} catch {} + } + } + } + } + + return proposalId; + } + + /** + * @dev Returns whether the operation at an index is delayed by the manager, and its scheduling nonce once queued. + */ + function _getManagerData( + ExecutionPlan storage plan, + uint256 index + ) private view returns (bool controlled, bool withDelay, uint32 nonce) { + (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); + uint32 value = plan.managerData[bucket][subindex]; + unchecked { + return (value > 0, value > 1, value > 1 ? value - 2 : 0); + } + } + + /** + * @dev Marks an operation at an index as permissioned by the manager, potentially delayed, and + * when delayed sets its scheduling nonce. + */ + function _setManagerData(ExecutionPlan storage plan, uint256 index, bool withDelay, uint32 nonce) private { + (uint256 bucket, uint256 subindex) = _getManagerDataIndices(index); + plan.managerData[bucket][subindex] = withDelay ? nonce + 2 : 1; + } + + /** + * @dev Returns bucket and subindex for reading manager data from the packed array mapping. + */ + function _getManagerDataIndices(uint256 index) private pure returns (uint256 bucket, uint256 subindex) { + bucket = index >> 3; // index / 8 + subindex = index & 7; // index % 8 + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockCompoundUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockCompoundUpgradeable.sol new file mode 100644 index 00000000..c553334d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockCompoundUpgradeable.sol @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorTimelockCompound.sol) + +pragma solidity ^0.8.24; + +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {ICompoundTimelock} from "@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by + * the external timelock to all successful proposals (in addition to the voting duration). The {Governor} needs to be + * the admin of the timelock for any operation to be performed. A public, unrestricted, + * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock. + * + * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, + * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be + * inaccessible from a proposal, unless executed via {Governor-relay}. + */ +abstract contract GovernorTimelockCompoundUpgradeable is Initializable, GovernorUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorTimelockCompound + struct GovernorTimelockCompoundStorage { + ICompoundTimelock _timelock; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorTimelockCompound")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorTimelockCompoundStorageLocation = 0x7d1501d734d0ca30b8d26751a7fae89646767b24afe11265192d56e5fe515b00; + + function _getGovernorTimelockCompoundStorage() private pure returns (GovernorTimelockCompoundStorage storage $) { + assembly { + $.slot := GovernorTimelockCompoundStorageLocation + } + } + + /** + * @dev Emitted when the timelock controller used for proposal execution is modified. + */ + event TimelockChange(address oldTimelock, address newTimelock); + + /** + * @dev Set the timelock. + */ + function __GovernorTimelockCompound_init(ICompoundTimelock timelockAddress) internal onlyInitializing { + __GovernorTimelockCompound_init_unchained(timelockAddress); + } + + function __GovernorTimelockCompound_init_unchained(ICompoundTimelock timelockAddress) internal onlyInitializing { + _updateTimelock(timelockAddress); + } + + /** + * @dev Overridden version of the {Governor-state} function with added support for the `Expired` state. + */ + function state(uint256 proposalId) public view virtual override returns (ProposalState) { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + ProposalState currentState = super.state(proposalId); + + return + (currentState == ProposalState.Queued && + block.timestamp >= proposalEta(proposalId) + $._timelock.GRACE_PERIOD()) + ? ProposalState.Expired + : currentState; + } + + /** + * @dev Public accessor to check the address of the timelock + */ + function timelock() public view virtual returns (address) { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + return address($._timelock); + } + + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { + return true; + } + + /** + * @dev Function to queue a proposal to the timelock. + */ + function _queueOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual override returns (uint48) { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + uint48 etaSeconds = SafeCast.toUint48(block.timestamp + $._timelock.delay()); + + for (uint256 i = 0; i < targets.length; ++i) { + if ( + $._timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], etaSeconds))) + ) { + revert GovernorAlreadyQueuedProposal(proposalId); + } + $._timelock.queueTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); + } + + return etaSeconds; + } + + /** + * @dev Overridden version of the {Governor-_executeOperations} function that run the already queued proposal + * through the timelock. + */ + function _executeOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 /*descriptionHash*/ + ) internal virtual override { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + uint256 etaSeconds = proposalEta(proposalId); + if (etaSeconds == 0) { + revert GovernorNotQueuedProposal(proposalId); + } + Address.sendValue(payable($._timelock), msg.value); + for (uint256 i = 0; i < targets.length; ++i) { + $._timelock.executeTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); + } + } + + /** + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it has already + * been queued. + */ + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + uint256 etaSeconds = proposalEta(proposalId); + if (etaSeconds > 0) { + // do external call later + for (uint256 i = 0; i < targets.length; ++i) { + $._timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], etaSeconds); + } + } + + return proposalId; + } + + /** + * @dev Address through which the governor executes action. In this case, the timelock. + */ + function _executor() internal view virtual override returns (address) { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + return address($._timelock); + } + + /** + * @dev Accept admin right over the timelock. + */ + // solhint-disable-next-line openzeppelin/leading-underscore + function __acceptAdmin() public { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + $._timelock.acceptAdmin(); + } + + /** + * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates + * must be proposed, scheduled, and executed through governance proposals. + * + * For security reasons, the timelock must be handed over to another admin before setting up a new one. The two + * operations (hand over the timelock) and do the update can be batched in a single proposal. + * + * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the + * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of + * governance. + + * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. + */ + function updateTimelock(ICompoundTimelock newTimelock) public virtual onlyGovernance { + _updateTimelock(newTimelock); + } + + function _updateTimelock(ICompoundTimelock newTimelock) private { + GovernorTimelockCompoundStorage storage $ = _getGovernorTimelockCompoundStorage(); + emit TimelockChange(address($._timelock), address(newTimelock)); + $._timelock = newTimelock; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockControlUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockControlUpgradeable.sol new file mode 100644 index 00000000..aff9fa76 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorTimelockControlUpgradeable.sol @@ -0,0 +1,192 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorTimelockControl.sol) + +pragma solidity ^0.8.24; + +import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol"; +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {TimelockControllerUpgradeable} from "../TimelockControllerUpgradeable.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a + * delay, enforced by the {TimelockController} to all successful proposals (in addition to the voting duration). The + * {Governor} needs the proposer (and ideally the executor and canceller) roles for the {Governor} to work properly. + * + * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, + * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be + * inaccessible from a proposal, unless executed via {Governor-relay}. + * + * WARNING: Setting up the TimelockController to have additional proposers or cancelers besides the governor is very + * risky, as it grants them the ability to: 1) execute operations as the timelock, and thus possibly performing + * operations or accessing funds that are expected to only be accessible through a vote, and 2) block governance + * proposals that have been approved by the voters, effectively executing a Denial of Service attack. + */ +abstract contract GovernorTimelockControlUpgradeable is Initializable, GovernorUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorTimelockControl + struct GovernorTimelockControlStorage { + TimelockControllerUpgradeable _timelock; + mapping(uint256 proposalId => bytes32) _timelockIds; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorTimelockControl")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorTimelockControlStorageLocation = 0x0d5829787b8befdbc6044ef7457d8a95c2a04bc99235349f1a212c063e59d400; + + function _getGovernorTimelockControlStorage() private pure returns (GovernorTimelockControlStorage storage $) { + assembly { + $.slot := GovernorTimelockControlStorageLocation + } + } + + /** + * @dev Emitted when the timelock controller used for proposal execution is modified. + */ + event TimelockChange(address oldTimelock, address newTimelock); + + /** + * @dev Set the timelock. + */ + function __GovernorTimelockControl_init(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing { + __GovernorTimelockControl_init_unchained(timelockAddress); + } + + function __GovernorTimelockControl_init_unchained(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing { + _updateTimelock(timelockAddress); + } + + /** + * @dev Overridden version of the {Governor-state} function that considers the status reported by the timelock. + */ + function state(uint256 proposalId) public view virtual override returns (ProposalState) { + GovernorTimelockControlStorage storage $ = _getGovernorTimelockControlStorage(); + ProposalState currentState = super.state(proposalId); + + if (currentState != ProposalState.Queued) { + return currentState; + } + + bytes32 queueId = $._timelockIds[proposalId]; + if ($._timelock.isOperationPending(queueId)) { + return ProposalState.Queued; + } else if ($._timelock.isOperationDone(queueId)) { + // This can happen if the proposal is executed directly on the timelock. + return ProposalState.Executed; + } else { + // This can happen if the proposal is canceled directly on the timelock. + return ProposalState.Canceled; + } + } + + /** + * @dev Public accessor to check the address of the timelock + */ + function timelock() public view virtual returns (address) { + GovernorTimelockControlStorage storage $ = _getGovernorTimelockControlStorage(); + return address($._timelock); + } + + /// @inheritdoc IGovernor + function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { + return true; + } + + /** + * @dev Function to queue a proposal to the timelock. + */ + function _queueOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint48) { + GovernorTimelockControlStorage storage $ = _getGovernorTimelockControlStorage(); + uint256 delay = $._timelock.getMinDelay(); + + bytes32 salt = _timelockSalt(descriptionHash); + $._timelockIds[proposalId] = $._timelock.hashOperationBatch(targets, values, calldatas, 0, salt); + $._timelock.scheduleBatch(targets, values, calldatas, 0, salt, delay); + + return SafeCast.toUint48(block.timestamp + delay); + } + + /** + * @dev Overridden version of the {Governor-_executeOperations} function that runs the already queued proposal + * through the timelock. + */ + function _executeOperations( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override { + GovernorTimelockControlStorage storage $ = _getGovernorTimelockControlStorage(); + // execute + $._timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, _timelockSalt(descriptionHash)); + // cleanup for refund + delete $._timelockIds[proposalId]; + } + + /** + * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it has already + * been queued. + */ + // This function can reenter through the external call to the timelock, but we assume the timelock is trusted and + // well behaved (according to TimelockController) and this will not happen. + // slither-disable-next-line reentrancy-no-eth + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override returns (uint256) { + GovernorTimelockControlStorage storage $ = _getGovernorTimelockControlStorage(); + uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); + + bytes32 timelockId = $._timelockIds[proposalId]; + if (timelockId != 0) { + // cancel + $._timelock.cancel(timelockId); + // cleanup + delete $._timelockIds[proposalId]; + } + + return proposalId; + } + + /** + * @dev Address through which the governor executes action. In this case, the timelock. + */ + function _executor() internal view virtual override returns (address) { + GovernorTimelockControlStorage storage $ = _getGovernorTimelockControlStorage(); + return address($._timelock); + } + + /** + * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates + * must be proposed, scheduled, and executed through governance proposals. + * + * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. + */ + function updateTimelock(TimelockControllerUpgradeable newTimelock) public virtual onlyGovernance { + _updateTimelock(newTimelock); + } + + function _updateTimelock(TimelockControllerUpgradeable newTimelock) private { + GovernorTimelockControlStorage storage $ = _getGovernorTimelockControlStorage(); + emit TimelockChange(address($._timelock), address(newTimelock)); + $._timelock = newTimelock; + } + + /** + * @dev Computes the {TimelockController} operation salt. + * + * It is computed with the governor address itself to avoid collisions across governor instances using the + * same timelock. + */ + function _timelockSalt(bytes32 descriptionHash) private view returns (bytes32) { + return bytes20(address(this)) ^ descriptionHash; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol new file mode 100644 index 00000000..f4574564 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesQuorumFraction.sol) + +pragma solidity ^0.8.24; + +import {GovernorVotesUpgradeable} from "./GovernorVotesUpgradeable.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a + * fraction of the total supply. + */ +abstract contract GovernorVotesQuorumFractionUpgradeable is Initializable, GovernorVotesUpgradeable { + using Checkpoints for Checkpoints.Trace208; + + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorVotesQuorumFraction + struct GovernorVotesQuorumFractionStorage { + Checkpoints.Trace208 _quorumNumeratorHistory; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorVotesQuorumFraction")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorVotesQuorumFractionStorageLocation = 0xe770710421fd2cad75ad828c61aa98f2d77d423a440b67872d0f65554148e000; + + function _getGovernorVotesQuorumFractionStorage() private pure returns (GovernorVotesQuorumFractionStorage storage $) { + assembly { + $.slot := GovernorVotesQuorumFractionStorageLocation + } + } + + event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator); + + /** + * @dev The quorum set is not a valid fraction. + */ + error GovernorInvalidQuorumFraction(uint256 quorumNumerator, uint256 quorumDenominator); + + /** + * @dev Initialize quorum as a fraction of the token's total supply. + * + * The fraction is specified as `numerator / denominator`. By default the denominator is 100, so quorum is + * specified as a percent: a numerator of 10 corresponds to quorum being 10% of total supply. The denominator can be + * customized by overriding {quorumDenominator}. + */ + function __GovernorVotesQuorumFraction_init(uint256 quorumNumeratorValue) internal onlyInitializing { + __GovernorVotesQuorumFraction_init_unchained(quorumNumeratorValue); + } + + function __GovernorVotesQuorumFraction_init_unchained(uint256 quorumNumeratorValue) internal onlyInitializing { + _updateQuorumNumerator(quorumNumeratorValue); + } + + /** + * @dev Returns the current quorum numerator. See {quorumDenominator}. + */ + function quorumNumerator() public view virtual returns (uint256) { + GovernorVotesQuorumFractionStorage storage $ = _getGovernorVotesQuorumFractionStorage(); + return $._quorumNumeratorHistory.latest(); + } + + /** + * @dev Returns the quorum numerator at a specific timepoint. See {quorumDenominator}. + */ + function quorumNumerator(uint256 timepoint) public view virtual returns (uint256) { + GovernorVotesQuorumFractionStorage storage $ = _getGovernorVotesQuorumFractionStorage(); + return _optimisticUpperLookupRecent($._quorumNumeratorHistory, timepoint); + } + + /** + * @dev Returns the quorum denominator. Defaults to 100, but may be overridden. + */ + function quorumDenominator() public view virtual returns (uint256) { + return 100; + } + + /** + * @dev Returns the quorum for a timepoint, in terms of number of votes: `supply * numerator / denominator`. + */ + function quorum(uint256 timepoint) public view virtual override returns (uint256) { + return Math.mulDiv(token().getPastTotalSupply(timepoint), quorumNumerator(timepoint), quorumDenominator()); + } + + /** + * @dev Changes the quorum numerator. + * + * Emits a {QuorumNumeratorUpdated} event. + * + * Requirements: + * + * - Must be called through a governance proposal. + * - New numerator must be smaller or equal to the denominator. + */ + function updateQuorumNumerator(uint256 newQuorumNumerator) public virtual onlyGovernance { + _updateQuorumNumerator(newQuorumNumerator); + } + + /** + * @dev Changes the quorum numerator. + * + * Emits a {QuorumNumeratorUpdated} event. + * + * Requirements: + * + * - New numerator must be smaller or equal to the denominator. + */ + function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual { + GovernorVotesQuorumFractionStorage storage $ = _getGovernorVotesQuorumFractionStorage(); + uint256 denominator = quorumDenominator(); + if (newQuorumNumerator > denominator) { + revert GovernorInvalidQuorumFraction(newQuorumNumerator, denominator); + } + + uint256 oldQuorumNumerator = quorumNumerator(); + $._quorumNumeratorHistory.push(clock(), SafeCast.toUint208(newQuorumNumerator)); + + emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator); + } + + /** + * @dev Returns the numerator at a specific timepoint. + */ + function _optimisticUpperLookupRecent( + Checkpoints.Trace208 storage ckpts, + uint256 timepoint + ) internal view returns (uint256) { + // If trace is empty, key and value are both equal to 0. + // In that case `key <= timepoint` is true, and it is ok to return 0. + (, uint48 key, uint208 value) = ckpts.latestCheckpoint(); + return key <= timepoint ? value : ckpts.upperLookupRecent(SafeCast.toUint48(timepoint)); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesSuperQuorumFractionUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesSuperQuorumFractionUpgradeable.sol new file mode 100644 index 00000000..71a1a85f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesSuperQuorumFractionUpgradeable.sol @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (governance/extensions/GovernorVotesSuperQuorumFraction.sol) + +pragma solidity ^0.8.24; + +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {GovernorSuperQuorumUpgradeable} from "./GovernorSuperQuorumUpgradeable.sol"; +import {GovernorVotesQuorumFractionUpgradeable} from "./GovernorVotesQuorumFractionUpgradeable.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {GovernorVotesQuorumFraction} with a super quorum expressed as a + * fraction of the total supply. Proposals that meet the super quorum (and have a majority of for votes) advance to + * the `Succeeded` state before the proposal deadline. + */ +abstract contract GovernorVotesSuperQuorumFractionUpgradeable is Initializable, GovernorVotesQuorumFractionUpgradeable, GovernorSuperQuorumUpgradeable { + using Checkpoints for Checkpoints.Trace208; + + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorVotesSuperQuorumFraction + struct GovernorVotesSuperQuorumFractionStorage { + Checkpoints.Trace208 _superQuorumNumeratorHistory; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorVotesSuperQuorumFraction")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorVotesSuperQuorumFractionStorageLocation = 0x31eabc8444b313223279a7cb4d22bce9201d463789f695e0a51f91d19ec31000; + + function _getGovernorVotesSuperQuorumFractionStorage() private pure returns (GovernorVotesSuperQuorumFractionStorage storage $) { + assembly { + $.slot := GovernorVotesSuperQuorumFractionStorageLocation + } + } + + event SuperQuorumNumeratorUpdated(uint256 oldSuperQuorumNumerator, uint256 newSuperQuorumNumerator); + + /** + * @dev The super quorum set is not valid as it exceeds the quorum denominator. + */ + error GovernorInvalidSuperQuorumFraction(uint256 superQuorumNumerator, uint256 denominator); + + /** + * @dev The super quorum set is not valid as it is smaller or equal to the quorum. + */ + error GovernorInvalidSuperQuorumTooSmall(uint256 superQuorumNumerator, uint256 quorumNumerator); + + /** + * @dev The quorum set is not valid as it exceeds the super quorum. + */ + error GovernorInvalidQuorumTooLarge(uint256 quorumNumerator, uint256 superQuorumNumerator); + + /** + * @dev Initialize super quorum as a fraction of the token's total supply. + * + * The super quorum is specified as a fraction of the token's total supply and has to + * be greater than the quorum. + */ + function __GovernorVotesSuperQuorumFraction_init(uint256 superQuorumNumeratorValue) internal onlyInitializing { + __GovernorVotesSuperQuorumFraction_init_unchained(superQuorumNumeratorValue); + } + + function __GovernorVotesSuperQuorumFraction_init_unchained(uint256 superQuorumNumeratorValue) internal onlyInitializing { + _updateSuperQuorumNumerator(superQuorumNumeratorValue); + } + + /** + * @dev Returns the current super quorum numerator. + */ + function superQuorumNumerator() public view virtual returns (uint256) { + GovernorVotesSuperQuorumFractionStorage storage $ = _getGovernorVotesSuperQuorumFractionStorage(); + return $._superQuorumNumeratorHistory.latest(); + } + + /** + * @dev Returns the super quorum numerator at a specific `timepoint`. + */ + function superQuorumNumerator(uint256 timepoint) public view virtual returns (uint256) { + GovernorVotesSuperQuorumFractionStorage storage $ = _getGovernorVotesSuperQuorumFractionStorage(); + return _optimisticUpperLookupRecent($._superQuorumNumeratorHistory, timepoint); + } + + /** + * @dev Returns the super quorum for a `timepoint`, in terms of number of votes: `supply * numerator / denominator`. + * See {GovernorSuperQuorum-superQuorum} for more details. + */ + function superQuorum(uint256 timepoint) public view virtual override returns (uint256) { + return Math.mulDiv(token().getPastTotalSupply(timepoint), superQuorumNumerator(timepoint), quorumDenominator()); + } + + /** + * @dev Changes the super quorum numerator. + * + * Emits a {SuperQuorumNumeratorUpdated} event. + * + * Requirements: + * + * - Must be called through a governance proposal. + * - New super quorum numerator must be smaller or equal to the denominator. + * - New super quorum numerator must be greater than or equal to the quorum numerator. + */ + function updateSuperQuorumNumerator(uint256 newSuperQuorumNumerator) public virtual onlyGovernance { + _updateSuperQuorumNumerator(newSuperQuorumNumerator); + } + + /** + * @dev Changes the super quorum numerator. + * + * Emits a {SuperQuorumNumeratorUpdated} event. + * + * Requirements: + * + * - New super quorum numerator must be smaller or equal to the denominator. + * - New super quorum numerator must be greater than or equal to the quorum numerator. + */ + function _updateSuperQuorumNumerator(uint256 newSuperQuorumNumerator) internal virtual { + GovernorVotesSuperQuorumFractionStorage storage $ = _getGovernorVotesSuperQuorumFractionStorage(); + uint256 denominator = quorumDenominator(); + if (newSuperQuorumNumerator > denominator) { + revert GovernorInvalidSuperQuorumFraction(newSuperQuorumNumerator, denominator); + } + + uint256 quorumNumerator = quorumNumerator(); + if (newSuperQuorumNumerator < quorumNumerator) { + revert GovernorInvalidSuperQuorumTooSmall(newSuperQuorumNumerator, quorumNumerator); + } + + uint256 oldSuperQuorumNumerator = $._superQuorumNumeratorHistory.latest(); + $._superQuorumNumeratorHistory.push(clock(), SafeCast.toUint208(newSuperQuorumNumerator)); + + emit SuperQuorumNumeratorUpdated(oldSuperQuorumNumerator, newSuperQuorumNumerator); + } + + /** + * @dev Overrides {GovernorVotesQuorumFraction-_updateQuorumNumerator} to ensure the super + * quorum numerator is greater than or equal to the quorum numerator. + */ + function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual override { + GovernorVotesSuperQuorumFractionStorage storage $ = _getGovernorVotesSuperQuorumFractionStorage(); + // Ignoring check when the superQuorum was never set (construction sets quorum before superQuorum) + if ($._superQuorumNumeratorHistory.length() > 0) { + uint256 superQuorumNumerator_ = superQuorumNumerator(); + if (newQuorumNumerator > superQuorumNumerator_) { + revert GovernorInvalidQuorumTooLarge(newQuorumNumerator, superQuorumNumerator_); + } + } + super._updateQuorumNumerator(newQuorumNumerator); + } + + /// @inheritdoc GovernorSuperQuorumUpgradeable + function state( + uint256 proposalId + ) public view virtual override(GovernorUpgradeable, GovernorSuperQuorumUpgradeable) returns (ProposalState) { + return super.state(proposalId); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesUpgradeable.sol new file mode 100644 index 00000000..340cc296 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/extensions/GovernorVotesUpgradeable.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (governance/extensions/GovernorVotes.sol) + +pragma solidity ^0.8.24; + +import {GovernorUpgradeable} from "../GovernorUpgradeable.sol"; +import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol"; +import {IERC5805} from "@openzeppelin/contracts/interfaces/IERC5805.sol"; +import {Time} from "@openzeppelin/contracts/utils/types/Time.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} + * token. + */ +abstract contract GovernorVotesUpgradeable is Initializable, GovernorUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.GovernorVotes + struct GovernorVotesStorage { + IERC5805 _token; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.GovernorVotes")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant GovernorVotesStorageLocation = 0x3ba4977254e415696610a40ebf2258dbfa0ec6a2ff64e84bfe715ff16977cc00; + + function _getGovernorVotesStorage() private pure returns (GovernorVotesStorage storage $) { + assembly { + $.slot := GovernorVotesStorageLocation + } + } + + function __GovernorVotes_init(IVotes tokenAddress) internal onlyInitializing { + __GovernorVotes_init_unchained(tokenAddress); + } + + function __GovernorVotes_init_unchained(IVotes tokenAddress) internal onlyInitializing { + GovernorVotesStorage storage $ = _getGovernorVotesStorage(); + $._token = IERC5805(address(tokenAddress)); + } + + /** + * @dev The token that voting power is sourced from. + */ + function token() public view virtual returns (IERC5805) { + GovernorVotesStorage storage $ = _getGovernorVotesStorage(); + return $._token; + } + + /** + * @dev Clock (as specified in ERC-6372) is set to match the token's clock. Fallback to block numbers if the token + * does not implement ERC-6372. + */ + function clock() public view virtual override returns (uint48) { + try token().clock() returns (uint48 timepoint) { + return timepoint; + } catch { + return Time.blockNumber(); + } + } + + /** + * @dev Machine-readable description of the clock as specified in ERC-6372. + */ + // solhint-disable-next-line func-name-mixedcase + function CLOCK_MODE() public view virtual override returns (string memory) { + try token().CLOCK_MODE() returns (string memory clockmode) { + return clockmode; + } catch { + return "mode=blocknumber&from=default"; + } + } + + /** + * Read the voting weight from the token's built in snapshot mechanism (see {Governor-_getVotes}). + */ + function _getVotes( + address account, + uint256 timepoint, + bytes memory /*params*/ + ) internal view virtual override returns (uint256) { + return token().getPastVotes(account, timepoint); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/utils/VotesExtendedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/utils/VotesExtendedUpgradeable.sol new file mode 100644 index 00000000..6c7a57f0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/utils/VotesExtendedUpgradeable.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (governance/utils/VotesExtended.sol) + +pragma solidity ^0.8.24; + +import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; +import {VotesUpgradeable} from "./VotesUpgradeable.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {Votes} that adds checkpoints for delegations and balances. + * + * WARNING: While this contract extends {Votes}, valid uses of {Votes} may not be compatible with + * {VotesExtended} without additional considerations. This implementation of {_transferVotingUnits} must + * run AFTER the voting weight movement is registered, such that it is reflected on {_getVotingUnits}. + * + * Said differently, {VotesExtended} MUST be integrated in a way that calls {_transferVotingUnits} AFTER the + * asset transfer is registered and balances are updated: + * + * ```solidity + * contract VotingToken is Token, VotesExtended { + * function transfer(address from, address to, uint256 tokenId) public override { + * super.transfer(from, to, tokenId); // <- Perform the transfer first ... + * _transferVotingUnits(from, to, 1); // <- ... then call _transferVotingUnits. + * } + * + * function _getVotingUnits(address account) internal view override returns (uint256) { + * return balanceOf(account); + * } + * } + * ``` + * + * {ERC20Votes} and {ERC721Votes} follow this pattern and are thus safe to use with {VotesExtended}. + */ +abstract contract VotesExtendedUpgradeable is Initializable, VotesUpgradeable { + using Checkpoints for Checkpoints.Trace160; + using Checkpoints for Checkpoints.Trace208; + + /// @custom:storage-location erc7201:openzeppelin.storage.VotesExtended + struct VotesExtendedStorage { + mapping(address delegator => Checkpoints.Trace160) _userDelegationCheckpoints; + mapping(address account => Checkpoints.Trace208) _userVotingUnitsCheckpoints; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.VotesExtended")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant VotesExtendedStorageLocation = 0x4a7bc7aabb540021543c1f28dd259f8776612c96fd248bdcc6fdf56c7778d900; + + function _getVotesExtendedStorage() private pure returns (VotesExtendedStorage storage $) { + assembly { + $.slot := VotesExtendedStorageLocation + } + } + + function __VotesExtended_init() internal onlyInitializing { + } + + function __VotesExtended_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns the delegate of an `account` at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastDelegate(address account, uint256 timepoint) public view virtual returns (address) { + VotesExtendedStorage storage $ = _getVotesExtendedStorage(); + return address($._userDelegationCheckpoints[account].upperLookupRecent(_validateTimepoint(timepoint))); + } + + /** + * @dev Returns the `balanceOf` of an `account` at a specific moment in the past. If the `clock()` is + * configured to use block numbers, this will return the value at the end of the corresponding block. + * + * Requirements: + * + * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. + */ + function getPastBalanceOf(address account, uint256 timepoint) public view virtual returns (uint256) { + VotesExtendedStorage storage $ = _getVotesExtendedStorage(); + return $._userVotingUnitsCheckpoints[account].upperLookupRecent(_validateTimepoint(timepoint)); + } + + /// @inheritdoc VotesUpgradeable + function _delegate(address account, address delegatee) internal virtual override { + VotesExtendedStorage storage $ = _getVotesExtendedStorage(); + super._delegate(account, delegatee); + + $._userDelegationCheckpoints[account].push(clock(), uint160(delegatee)); + } + + /// @inheritdoc VotesUpgradeable + function _transferVotingUnits(address from, address to, uint256 amount) internal virtual override { + VotesExtendedStorage storage $ = _getVotesExtendedStorage(); + super._transferVotingUnits(from, to, amount); + if (from != to) { + if (from != address(0)) { + $._userVotingUnitsCheckpoints[from].push(clock(), SafeCast.toUint208(_getVotingUnits(from))); + } + if (to != address(0)) { + $._userVotingUnitsCheckpoints[to].push(clock(), SafeCast.toUint208(_getVotingUnits(to))); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/utils/VotesUpgradeable.sol similarity index 53% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/VotesUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/utils/VotesUpgradeable.sol index fcc47b04..34f0e0e8 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/governance/utils/VotesUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/governance/utils/VotesUpgradeable.sol @@ -1,13 +1,17 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (governance/utils/Votes.sol) -pragma solidity ^0.8.0; +// OpenZeppelin Contracts (last updated v5.6.0) (governance/utils/Votes.sol) -import "../../interfaces/IERC5805Upgradeable.sol"; -import "../../utils/ContextUpgradeable.sol"; -import "../../utils/CountersUpgradeable.sol"; -import "../../utils/CheckpointsUpgradeable.sol"; -import "../../utils/cryptography/EIP712Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; +pragma solidity ^0.8.24; + +import {IERC5805} from "@openzeppelin/contracts/interfaces/IERC5805.sol"; +import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; +import {NoncesUpgradeable} from "../../utils/NoncesUpgradeable.sol"; +import {EIP712Upgradeable} from "../../utils/cryptography/EIP712Upgradeable.sol"; +import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import {Time} from "@openzeppelin/contracts/utils/types/Time.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be @@ -25,26 +29,41 @@ import {Initializable} from "../../proxy/utils/Initializable.sol"; * * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the - * previous example, it would be included in {ERC721-_beforeTokenTransfer}). - * - * _Available since v4.5._ + * previous example, it would be included in {ERC721-_update}). */ -abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712Upgradeable, IERC5805Upgradeable { - using CheckpointsUpgradeable for CheckpointsUpgradeable.Trace224; - using CountersUpgradeable for CountersUpgradeable.Counter; +abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712Upgradeable, NoncesUpgradeable, IERC5805 { + using Checkpoints for Checkpoints.Trace208; - bytes32 private constant _DELEGATION_TYPEHASH = + bytes32 private constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); - mapping(address => address) private _delegation; + /// @custom:storage-location erc7201:openzeppelin.storage.Votes + struct VotesStorage { + mapping(address account => address) _delegatee; + + mapping(address delegatee => Checkpoints.Trace208) _delegateCheckpoints; - /// @custom:oz-retyped-from mapping(address => Checkpoints.History) - mapping(address => CheckpointsUpgradeable.Trace224) private _delegateCheckpoints; + Checkpoints.Trace208 _totalCheckpoints; + } - /// @custom:oz-retyped-from Checkpoints.History - CheckpointsUpgradeable.Trace224 private _totalCheckpoints; + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Votes")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant VotesStorageLocation = 0xe8b26c30fad74198956032a3533d903385d56dd795af560196f9c78d4af40d00; - mapping(address => CountersUpgradeable.Counter) private _nonces; + function _getVotesStorage() private pure returns (VotesStorage storage $) { + assembly { + $.slot := VotesStorageLocation + } + } + + /** + * @dev The clock was incorrectly modified. + */ + error ERC6372InconsistentClock(); + + /** + * @dev Lookup to future votes is not available. + */ + error ERC5805FutureLookup(uint256 timepoint, uint48 clock); function __Votes_init() internal onlyInitializing { } @@ -55,25 +74,37 @@ abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712U * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based * checkpoints (and voting), in which case {CLOCK_MODE} should be overridden as well to match. */ - function clock() public view virtual override returns (uint48) { - return SafeCastUpgradeable.toUint48(block.number); + function clock() public view virtual returns (uint48) { + return Time.blockNumber(); } /** - * @dev Machine-readable description of the clock as specified in EIP-6372. + * @dev Machine-readable description of the clock as specified in ERC-6372. */ // solhint-disable-next-line func-name-mixedcase - function CLOCK_MODE() public view virtual override returns (string memory) { + function CLOCK_MODE() public view virtual returns (string memory) { // Check that the clock was not modified - require(clock() == block.number, "Votes: broken clock mode"); + if (clock() != Time.blockNumber()) { + revert ERC6372InconsistentClock(); + } return "mode=blocknumber&from=default"; } + /** + * @dev Validate that a timepoint is in the past, and return it as a uint48. + */ + function _validateTimepoint(uint256 timepoint) internal view returns (uint48) { + uint48 currentTimepoint = clock(); + if (timepoint >= currentTimepoint) revert ERC5805FutureLookup(timepoint, currentTimepoint); + return SafeCast.toUint48(timepoint); + } + /** * @dev Returns the current amount of votes that `account` has. */ - function getVotes(address account) public view virtual override returns (uint256) { - return _delegateCheckpoints[account].latest(); + function getVotes(address account) public view virtual returns (uint256) { + VotesStorage storage $ = _getVotesStorage(); + return $._delegateCheckpoints[account].latest(); } /** @@ -84,9 +115,9 @@ abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712U * * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. */ - function getPastVotes(address account, uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "Votes: future lookup"); - return _delegateCheckpoints[account].upperLookupRecent(SafeCastUpgradeable.toUint32(timepoint)); + function getPastVotes(address account, uint256 timepoint) public view virtual returns (uint256) { + VotesStorage storage $ = _getVotesStorage(); + return $._delegateCheckpoints[account].upperLookupRecent(_validateTimepoint(timepoint)); } /** @@ -101,29 +132,31 @@ abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712U * * - `timepoint` must be in the past. If operating using block numbers, the block must be already mined. */ - function getPastTotalSupply(uint256 timepoint) public view virtual override returns (uint256) { - require(timepoint < clock(), "Votes: future lookup"); - return _totalCheckpoints.upperLookupRecent(SafeCastUpgradeable.toUint32(timepoint)); + function getPastTotalSupply(uint256 timepoint) public view virtual returns (uint256) { + VotesStorage storage $ = _getVotesStorage(); + return $._totalCheckpoints.upperLookupRecent(_validateTimepoint(timepoint)); } /** * @dev Returns the current total supply of votes. */ function _getTotalSupply() internal view virtual returns (uint256) { - return _totalCheckpoints.latest(); + VotesStorage storage $ = _getVotesStorage(); + return $._totalCheckpoints.latest(); } /** * @dev Returns the delegate that `account` has chosen. */ - function delegates(address account) public view virtual override returns (address) { - return _delegation[account]; + function delegates(address account) public view virtual returns (address) { + VotesStorage storage $ = _getVotesStorage(); + return $._delegatee[account]; } /** * @dev Delegates votes from the sender to `delegatee`. */ - function delegate(address delegatee) public virtual override { + function delegate(address delegatee) public virtual { address account = _msgSender(); _delegate(account, delegatee); } @@ -138,15 +171,17 @@ abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712U uint8 v, bytes32 r, bytes32 s - ) public virtual override { - require(block.timestamp <= expiry, "Votes: signature expired"); - address signer = ECDSAUpgradeable.recover( - _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), + ) public virtual { + if (block.timestamp > expiry) { + revert VotesExpiredSignature(expiry); + } + address signer = ECDSA.recover( + _hashTypedDataV4(keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry))), v, r, s ); - require(nonce == _useNonce(signer), "Votes: invalid nonce"); + _useCheckedNonce(signer, nonce); _delegate(signer, delegatee); } @@ -156,8 +191,9 @@ abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712U * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. */ function _delegate(address account, address delegatee) internal virtual { + VotesStorage storage $ = _getVotesStorage(); address oldDelegate = delegates(account); - _delegation[account] = delegatee; + $._delegatee[account] = delegatee; emit DelegateChanged(account, oldDelegate, delegatee); _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account)); @@ -168,11 +204,12 @@ abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712U * should be zero. Total supply of voting units will be adjusted with mints and burns. */ function _transferVotingUnits(address from, address to, uint256 amount) internal virtual { + VotesStorage storage $ = _getVotesStorage(); if (from == address(0)) { - _push(_totalCheckpoints, _add, SafeCastUpgradeable.toUint224(amount)); + _push($._totalCheckpoints, _add, SafeCast.toUint208(amount)); } if (to == address(0)) { - _push(_totalCheckpoints, _subtract, SafeCastUpgradeable.toUint224(amount)); + _push($._totalCheckpoints, _subtract, SafeCast.toUint208(amount)); } _moveDelegateVotes(delegates(from), delegates(to), amount); } @@ -180,78 +217,65 @@ abstract contract VotesUpgradeable is Initializable, ContextUpgradeable, EIP712U /** * @dev Moves delegated votes from one delegate to another. */ - function _moveDelegateVotes(address from, address to, uint256 amount) private { + function _moveDelegateVotes(address from, address to, uint256 amount) internal virtual { + VotesStorage storage $ = _getVotesStorage(); if (from != to && amount > 0) { if (from != address(0)) { (uint256 oldValue, uint256 newValue) = _push( - _delegateCheckpoints[from], + $._delegateCheckpoints[from], _subtract, - SafeCastUpgradeable.toUint224(amount) + SafeCast.toUint208(amount) ); emit DelegateVotesChanged(from, oldValue, newValue); } if (to != address(0)) { (uint256 oldValue, uint256 newValue) = _push( - _delegateCheckpoints[to], + $._delegateCheckpoints[to], _add, - SafeCastUpgradeable.toUint224(amount) + SafeCast.toUint208(amount) ); emit DelegateVotesChanged(to, oldValue, newValue); } } } - function _push( - CheckpointsUpgradeable.Trace224 storage store, - function(uint224, uint224) view returns (uint224) op, - uint224 delta - ) private returns (uint224, uint224) { - return store.push(SafeCastUpgradeable.toUint32(clock()), op(store.latest(), delta)); - } - - function _add(uint224 a, uint224 b) private pure returns (uint224) { - return a + b; - } - - function _subtract(uint224 a, uint224 b) private pure returns (uint224) { - return a - b; - } - /** - * @dev Consumes a nonce. - * - * Returns the current value and increments nonce. + * @dev Get number of checkpoints for `account`. */ - function _useNonce(address owner) internal virtual returns (uint256 current) { - CountersUpgradeable.Counter storage nonce = _nonces[owner]; - current = nonce.current(); - nonce.increment(); + function _numCheckpoints(address account) internal view virtual returns (uint32) { + VotesStorage storage $ = _getVotesStorage(); + return SafeCast.toUint32($._delegateCheckpoints[account].length()); } /** - * @dev Returns an address nonce. + * @dev Get the `pos`-th checkpoint for `account`. */ - function nonces(address owner) public view virtual returns (uint256) { - return _nonces[owner].current(); + function _checkpoints( + address account, + uint32 pos + ) internal view virtual returns (Checkpoints.Checkpoint208 memory) { + VotesStorage storage $ = _getVotesStorage(); + return $._delegateCheckpoints[account].at(pos); } - /** - * @dev Returns the contract's {EIP712} domain separator. - */ - // solhint-disable-next-line func-name-mixedcase - function DOMAIN_SEPARATOR() external view returns (bytes32) { - return _domainSeparatorV4(); + function _push( + Checkpoints.Trace208 storage store, + function(uint208, uint208) view returns (uint208) op, + uint208 delta + ) private returns (uint208 oldValue, uint208 newValue) { + return store.push(clock(), op(store.latest(), delta)); + } + + function _add(uint208 a, uint208 b) private pure returns (uint208) { + return a + b; + } + + function _subtract(uint208 a, uint208 b) private pure returns (uint208) { + return a - b; } /** * @dev Must return the voting units held by an account. */ function _getVotingUnits(address) internal view virtual returns (uint256); - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[46] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ContextUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ContextUpgradeable.sol new file mode 100644 index 00000000..5fbedb97 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ContextUpgradeable.sol @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (metatx/ERC2771Context.sol) + +pragma solidity ^0.8.20; + +import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Context variant with ERC-2771 support. See {_msgSender} for the calldata format. + * + * WARNING: Avoid using this pattern in contracts that rely on a specific calldata length as they'll + * be affected by any forwarder whose `msg.data` is suffixed with the `from` address according to the ERC-2771 + * specification adding the address size in bytes (20) to the calldata size. An example of an unexpected + * behavior could be an unintended fallback (or another function) invocation while trying to invoke the `receive` + * function only accessible if `msg.data.length == 0`. + * + * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption. + * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender} + * recovery. + */ +abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable { + /// @custom:oz-upgrades-unsafe-allow state-variable-immutable + address private immutable _trustedForwarder; + + /** + * @dev Initializes the contract with a trusted forwarder, which will be able to + * invoke functions on this contract on behalf of other accounts. + * + * NOTE: The trusted forwarder can be replaced by overriding {trustedForwarder}. + */ + /// @custom:oz-upgrades-unsafe-allow constructor + constructor(address trustedForwarder_) { + _trustedForwarder = trustedForwarder_; + } + + /** + * @dev Returns the address of the trusted forwarder. + */ + function trustedForwarder() public view virtual returns (address) { + return _trustedForwarder; + } + + /** + * @dev Indicates whether any particular address is the trusted forwarder. + */ + function isTrustedForwarder(address forwarder) public view virtual returns (bool) { + return forwarder == trustedForwarder(); + } + + /** + * @dev Override for `msg.sender`. Defaults to the original `msg.sender` whenever + * a call is not performed by the trusted forwarder or the calldata length is less than + * 20 bytes (an address length). + */ + function _msgSender() internal view virtual override returns (address) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (calldataLength >= contextSuffixLength && isTrustedForwarder(msg.sender)) { + unchecked { + return address(bytes20(msg.data[calldataLength - contextSuffixLength:])); + } + } else { + return super._msgSender(); + } + } + + /** + * @dev Override for `msg.data`. Defaults to the original `msg.data` whenever + * a call is not performed by the trusted forwarder or the calldata length is less than + * 20 bytes (an address length). + */ + function _msgData() internal view virtual override returns (bytes calldata) { + uint256 calldataLength = msg.data.length; + uint256 contextSuffixLength = _contextSuffixLength(); + if (calldataLength >= contextSuffixLength && isTrustedForwarder(msg.sender)) { + unchecked { + return msg.data[:calldataLength - contextSuffixLength]; + } + } else { + return super._msgData(); + } + } + + /** + * @dev ERC-2771 specifies the context as being a single address (20 bytes). + */ + function _contextSuffixLength() internal view virtual override returns (uint256) { + return 20; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ForwarderUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ForwarderUpgradeable.sol new file mode 100644 index 00000000..eb36d44d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/metatx/ERC2771ForwarderUpgradeable.sol @@ -0,0 +1,380 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (metatx/ERC2771Forwarder.sol) + +pragma solidity ^0.8.24; + +import {ERC2771ContextUpgradeable} from "./ERC2771ContextUpgradeable.sol"; +import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import {EIP712Upgradeable} from "../utils/cryptography/EIP712Upgradeable.sol"; +import {NoncesUpgradeable} from "../utils/NoncesUpgradeable.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {Errors} from "@openzeppelin/contracts/utils/Errors.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev A forwarder compatible with ERC-2771 contracts. See {ERC2771Context}. + * + * This forwarder operates on forward requests that include: + * + * * `from`: An address to operate on behalf of. It is required to be equal to the request signer. + * * `to`: The address that should be called. + * * `value`: The amount of native token to attach with the requested call. + * * `gas`: The amount of gas limit that will be forwarded with the requested call. + * * `nonce` (implicit): Taken from {Nonces} for `from` and included in the signed typed data. + * * `deadline`: A timestamp after which the request is not executable anymore. + * * `data`: Encoded `msg.data` to send with the requested call. + * + * Relayers are able to submit batches if they are processing a high volume of requests. With high + * throughput, relayers may run into limitations of the chain such as limits on the number of + * transactions in the mempool. In these cases the recommendation is to distribute the load among + * multiple accounts. + * + * NOTE: Batching requests includes an optional refund for unused `msg.value` that is achieved by + * performing a call with empty calldata. While this is within the bounds of ERC-2771 compliance, + * if the refund receiver happens to consider the forwarder a trusted forwarder, it MUST properly + * handle `msg.data.length == 0`. `ERC2771Context` in OpenZeppelin Contracts versions prior to 4.9.3 + * do not handle this properly. + * + * ==== Security Considerations + * + * If a relayer submits a forward request, it should be willing to pay up to 100% of the gas amount + * specified in the request. This contract does not implement any kind of retribution for this gas, + * and it is assumed that there is an out of band incentive for relayers to pay for execution on + * behalf of signers. Often, the relayer is operated by a project that will consider it a user + * acquisition cost. + * + * By offering to pay for gas, relayers are at risk of having that gas used by an attacker toward + * some other purpose that is not aligned with the expected out of band incentives. If you operate a + * relayer, consider whitelisting target contracts and function selectors. When relaying ERC-721 or + * ERC-1155 transfers specifically, consider rejecting the use of the `data` field, since it can be + * used to execute arbitrary code. + */ +contract ERC2771ForwarderUpgradeable is Initializable, EIP712Upgradeable, NoncesUpgradeable { + using ECDSA for bytes32; + + struct ForwardRequestData { + address from; + address to; + uint256 value; + uint256 gas; + uint48 deadline; + bytes data; + bytes signature; + } + + bytes32 internal constant FORWARD_REQUEST_TYPEHASH = + keccak256( + "ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,uint48 deadline,bytes data)" + ); + + /** + * @dev Emitted when a `ForwardRequest` is executed. + * + * NOTE: An unsuccessful forward request could be due to an invalid signature, an expired deadline, + * or simply a revert in the requested call. The contract guarantees that the relayer is not able to force + * the requested call to run out of gas. + */ + event ExecutedForwardRequest(address indexed signer, uint256 nonce, bool success); + + /** + * @dev The request `from` doesn't match with the recovered `signer`. + */ + error ERC2771ForwarderInvalidSigner(address signer, address from); + + /** + * @dev The `requestedValue` doesn't match with the available `msgValue`. + */ + error ERC2771ForwarderMismatchedValue(uint256 requestedValue, uint256 msgValue); + + /** + * @dev The request `deadline` has expired. + */ + error ERC2771ForwarderExpiredRequest(uint48 deadline); + + /** + * @dev The request target doesn't trust the `forwarder`. + */ + error ERC2771UntrustfulTarget(address target, address forwarder); + + function initialize(string memory name) public virtual initializer { + __ERC2771Forwarder_init(name); + } + /** + * @dev See {EIP712-constructor}. + */ + function __ERC2771Forwarder_init(string memory name) internal onlyInitializing { + __EIP712_init_unchained(name, "1"); + } + + function __ERC2771Forwarder_init_unchained(string memory) internal onlyInitializing {} + + /** + * @dev Returns `true` if a request is valid for a provided `signature` at the current block timestamp. + * + * A transaction is considered valid when the target trusts this forwarder, the request hasn't expired + * (deadline is not met), and the signer matches the `from` parameter of the signed request. + * + * NOTE: A request may return false here but it won't cause {executeBatch} to revert if a refund + * receiver is provided. + */ + function verify(ForwardRequestData calldata request) public view virtual returns (bool) { + (bool isTrustedForwarder, bool active, bool signerMatch, ) = _validate(request); + return isTrustedForwarder && active && signerMatch; + } + + /** + * @dev Executes a `request` on behalf of `signature`'s signer using the ERC-2771 protocol. The gas + * provided to the requested call may not be exactly the amount requested, but the call will not run + * out of gas. Will revert if the request is invalid or the call reverts, in this case the nonce is not consumed. + * + * Requirements: + * + * - The request value should be equal to the provided `msg.value`. + * - The request should be valid according to {verify}. + */ + function execute(ForwardRequestData calldata request) public payable virtual { + // We make sure that msg.value and request.value match exactly. + // If the request is invalid or the call reverts, this whole function + // will revert, ensuring value isn't stuck. + if (msg.value != request.value) { + revert ERC2771ForwarderMismatchedValue(request.value, msg.value); + } + + if (!_execute(request, true)) { + revert Errors.FailedCall(); + } + } + + /** + * @dev Batch version of {execute} with optional refunding and atomic execution. + * + * In case a batch contains at least one invalid request (see {verify}), the + * request will be skipped and the `refundReceiver` parameter will receive back the + * unused requested value at the end of the execution. This is done to prevent reverting + * the entire batch when a request is invalid or has already been submitted. + * + * If the `refundReceiver` is the `address(0)`, this function will revert when at least + * one of the requests was not valid instead of skipping it. This could be useful if + * a batch is required to get executed atomically (at least at the top-level). For example, + * refunding (and thus atomicity) can be opt-out if the relayer is using a service that avoids + * including reverted transactions. + * + * Requirements: + * + * - The sum of the requests' values should be equal to the provided `msg.value`. + * - All of the requests should be valid (see {verify}) when `refundReceiver` is the zero address. + * + * NOTE: Setting a zero `refundReceiver` guarantees an all-or-nothing requests execution only for + * the first-level forwarded calls. In case a forwarded request calls to a contract with another + * subcall, the second-level call may revert without the top-level call reverting. + */ + function executeBatch( + ForwardRequestData[] calldata requests, + address payable refundReceiver + ) public payable virtual { + bool atomic = refundReceiver == address(0); + + uint256 requestsValue; + uint256 refundValue; + + for (uint256 i; i < requests.length; ++i) { + requestsValue += requests[i].value; + bool success = _execute(requests[i], atomic); + if (!success) { + refundValue += requests[i].value; + } + } + + // The batch should revert if there's a mismatched msg.value provided + // to avoid request value tampering + if (requestsValue != msg.value) { + revert ERC2771ForwarderMismatchedValue(requestsValue, msg.value); + } + + // Some requests with value were invalid (possibly due to frontrunning). + // To avoid leaving ETH in the contract this value is refunded. + if (refundValue != 0) { + // We know refundReceiver != address(0) && requestsValue == msg.value + // meaning we can ensure refundValue is not taken from the original contract's balance + // and refundReceiver is a known account. + Address.sendValue(refundReceiver, refundValue); + } + } + + /** + * @dev Validates if the provided request can be executed at current block timestamp with + * the given `request.signature` on behalf of `request.from`. + */ + function _validate( + ForwardRequestData calldata request + ) internal view virtual returns (bool isTrustedForwarder, bool active, bool signerMatch, address signer) { + (bool isValid, address recovered) = _recoverForwardRequestSigner(request); + + return ( + _isTrustedByTarget(request.to), + request.deadline >= block.timestamp, + isValid && recovered == request.from, + recovered + ); + } + + /** + * @dev Returns a tuple with the recovered the signer of an EIP712 forward request message hash + * and a boolean indicating if the signature is valid. + * + * NOTE: The signature is considered valid if {ECDSA-tryRecoverCalldata} indicates no recover error for it. + */ + function _recoverForwardRequestSigner( + ForwardRequestData calldata request + ) internal view virtual returns (bool isValid, address signer) { + (address recovered, ECDSA.RecoverError err, ) = _hashTypedDataV4( + keccak256( + abi.encode( + FORWARD_REQUEST_TYPEHASH, + request.from, + request.to, + request.value, + request.gas, + nonces(request.from), + request.deadline, + keccak256(request.data) + ) + ) + ).tryRecoverCalldata(request.signature); + + return (err == ECDSA.RecoverError.NoError, recovered); + } + + /** + * @dev Validates and executes a signed request returning the request call `success` value. + * + * Internal function without msg.value validation. + * + * Requirements: + * + * - The caller must have provided enough gas to forward with the call. + * - The request must be valid (see {verify}) if the `requireValidRequest` is true. + * + * Emits an {ExecutedForwardRequest} event. + * + * IMPORTANT: Using this function doesn't check that all the `msg.value` was sent, potentially + * leaving value stuck in the contract. + */ + function _execute( + ForwardRequestData calldata request, + bool requireValidRequest + ) internal virtual returns (bool success) { + (bool isTrustedForwarder, bool active, bool signerMatch, address signer) = _validate(request); + + // Need to explicitly specify if a revert is required since non-reverting is default for + // batches and reversion is opt-in since it could be useful in some scenarios + if (requireValidRequest) { + if (!isTrustedForwarder) { + revert ERC2771UntrustfulTarget(request.to, address(this)); + } + + if (!active) { + revert ERC2771ForwarderExpiredRequest(request.deadline); + } + + if (!signerMatch) { + revert ERC2771ForwarderInvalidSigner(signer, request.from); + } + } + + // Ignore an invalid request because requireValidRequest = false + if (isTrustedForwarder && signerMatch && active) { + // Nonce should be used before the call to prevent reusing by reentrancy + uint256 currentNonce = _useNonce(signer); + + uint256 reqGas = request.gas; + address to = request.to; + uint256 value = request.value; + bytes memory data = abi.encodePacked(request.data, request.from); + + uint256 gasLeft; + + assembly ("memory-safe") { + success := call(reqGas, to, value, add(data, 0x20), mload(data), 0x00, 0x00) + gasLeft := gas() + } + + _checkForwardedGas(gasLeft, request); + + emit ExecutedForwardRequest(signer, currentNonce, success); + } + } + + /** + * @dev Returns whether the target trusts this forwarder. + * + * This function performs a static call to the target contract calling the + * {ERC2771Context-isTrustedForwarder} function. + * + * NOTE: Consider the execution of this forwarder is permissionless. Without this check, anyone may transfer assets + * that are owned by, or are approved to this forwarder. + */ + function _isTrustedByTarget(address target) internal view virtual returns (bool) { + bytes memory encodedParams = abi.encodeCall(ERC2771ContextUpgradeable.isTrustedForwarder, (address(this))); + + bool success; + uint256 returnSize; + uint256 returnValue; + assembly ("memory-safe") { + // Perform the staticcall and save the result in the scratch space. + // | Location | Content | Content (Hex) | + // |-----------|----------|--------------------------------------------------------------------| + // | | | result ↓ | + // | 0x00:0x1F | selector | 0x0000000000000000000000000000000000000000000000000000000000000001 | + success := staticcall(gas(), target, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) + returnSize := returndatasize() + returnValue := mload(0x00) + } + + return success && returnSize >= 0x20 && returnValue > 0; + } + + /** + * @dev Checks if the requested gas was correctly forwarded to the callee. + * + * As a consequence of https://eips.ethereum.org/EIPS/eip-150[EIP-150]: + * - At most `gasleft() - floor(gasleft() / 64)` is forwarded to the callee. + * - At least `floor(gasleft() / 64)` is kept in the caller. + * + * It reverts consuming all the available gas if the forwarded gas is not the requested gas. + * + * IMPORTANT: The `gasLeft` parameter should be measured exactly at the end of the forwarded call. + * Any gas consumed in between will make room for bypassing this check. + */ + function _checkForwardedGas(uint256 gasLeft, ForwardRequestData calldata request) private pure { + // To avoid insufficient gas griefing attacks, as referenced in https://ronan.eth.limo/blog/ethereum-gas-dangers/ + // + // A malicious relayer can attempt to shrink the gas forwarded so that the underlying call reverts out-of-gas + // but the forwarding itself still succeeds. In order to make sure that the subcall received sufficient gas, + // we will inspect gasleft() after the forwarding. + // + // Let X be the gas available before the subcall, such that the subcall gets at most X * 63 / 64. + // We can't know X after CALL dynamic costs, but we want it to be such that X * 63 / 64 >= req.gas. + // Let Y be the gas used in the subcall. gasleft() measured immediately after the subcall will be gasleft() = X - Y. + // If the subcall ran out of gas, then Y = X * 63 / 64 and gasleft() = X - Y = X / 64. + // Under this assumption req.gas / 63 > gasleft() is true if and only if + // req.gas / 63 > X / 64, or equivalently req.gas > X * 63 / 64. + // This means that if the subcall runs out of gas we are able to detect that insufficient gas was passed. + // + // We will now also see that req.gas / 63 > gasleft() implies that req.gas >= X * 63 / 64. + // The contract guarantees Y <= req.gas, thus gasleft() = X - Y >= X - req.gas. + // - req.gas / 63 > gasleft() + // - req.gas / 63 >= X - req.gas + // - req.gas >= X * 63 / 64 + // In other words if req.gas < X * 63 / 64 then req.gas / 63 <= gasleft(), thus if the relayer behaves honestly + // the forwarding does not revert. + if (gasLeft < request.gas / 63) { + // We explicitly trigger invalid opcode to consume all gas and bubble-up the effects, since + // neither revert or assert consume all gas since Solidity 0.8.20 + // https://docs.soliditylang.org/en/v0.8.20/control-structures.html#panic-via-assert-and-error-via-require + assembly ("memory-safe") { + invalid() + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/Initializable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/Initializable.sol new file mode 100644 index 00000000..b5f26b5e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/Initializable.sol @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/UUPSUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/UUPSUpgradeable.sol new file mode 100644 index 00000000..e869ba6b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/proxy/utils/UUPSUpgradeable.sol @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.22; + +import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/ERC1155Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/ERC1155Upgradeable.sol new file mode 100644 index 00000000..291856c9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/ERC1155Upgradeable.sol @@ -0,0 +1,441 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/ERC1155.sol) + +pragma solidity ^0.8.24; + +import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; +import {IERC1155MetadataURI} from "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; +import {ERC1155Utils} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Utils.sol"; +import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol"; +import {Arrays} from "@openzeppelin/contracts/utils/Arrays.sol"; +import {IERC1155Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the basic standard multi-token. + * See https://eips.ethereum.org/EIPS/eip-1155 + * Originally based on code by Enjin: https://github.com/enjin/erc-1155 + */ +abstract contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155, IERC1155MetadataURI, IERC1155Errors { + using Arrays for uint256[]; + using Arrays for address[]; + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC1155 + struct ERC1155Storage { + mapping(uint256 id => mapping(address account => uint256)) _balances; + + mapping(address account => mapping(address operator => bool)) _operatorApprovals; + + // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json + string _uri; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC1155")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC1155StorageLocation = 0x88be536d5240c274a3b1d3a1be54482fd9caa294f08c62a7cde569f49a3c4500; + + function _getERC1155Storage() private pure returns (ERC1155Storage storage $) { + assembly { + $.slot := ERC1155StorageLocation + } + } + + /** + * @dev See {_setURI}. + */ + function __ERC1155_init(string memory uri_) internal onlyInitializing { + __ERC1155_init_unchained(uri_); + } + + function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { + _setURI(uri_); + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) { + return + interfaceId == type(IERC1155).interfaceId || + interfaceId == type(IERC1155MetadataURI).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC1155MetadataURI-uri}. + * + * This implementation returns the same URI for *all* token types. It relies + * on the token type ID substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the ERC]. + * + * Clients calling this function must replace the `\{id\}` substring with the + * actual token type ID. + */ + function uri(uint256 /* id */) public view virtual returns (string memory) { + ERC1155Storage storage $ = _getERC1155Storage(); + return $._uri; + } + + /// @inheritdoc IERC1155 + function balanceOf(address account, uint256 id) public view virtual returns (uint256) { + ERC1155Storage storage $ = _getERC1155Storage(); + return $._balances[id][account]; + } + + /** + * @dev See {IERC1155-balanceOfBatch}. + * + * Requirements: + * + * - `accounts` and `ids` must have the same length. + */ + function balanceOfBatch( + address[] memory accounts, + uint256[] memory ids + ) public view virtual returns (uint256[] memory) { + if (accounts.length != ids.length) { + revert ERC1155InvalidArrayLength(ids.length, accounts.length); + } + + uint256[] memory batchBalances = new uint256[](accounts.length); + + for (uint256 i = 0; i < accounts.length; ++i) { + batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i)); + } + + return batchBalances; + } + + /// @inheritdoc IERC1155 + function setApprovalForAll(address operator, bool approved) public virtual { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /// @inheritdoc IERC1155 + function isApprovedForAll(address account, address operator) public view virtual returns (bool) { + ERC1155Storage storage $ = _getERC1155Storage(); + return $._operatorApprovals[account][operator]; + } + + /// @inheritdoc IERC1155 + function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { + _checkAuthorized(_msgSender(), from); + _safeTransferFrom(from, to, id, value, data); + } + + /// @inheritdoc IERC1155 + function safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data + ) public virtual { + _checkAuthorized(_msgSender(), from); + _safeBatchTransferFrom(from, to, ids, values, data); + } + + /// @dev Checks if `operator` is authorized to transfer tokens owned by `owner`. Reverts with {ERC1155MissingApprovalForAll} if not. + function _checkAuthorized(address operator, address owner) internal view virtual { + if (owner != operator && !isApprovedForAll(owner, operator)) { + revert ERC1155MissingApprovalForAll(operator, owner); + } + } + + /** + * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` + * (or `to`) is the zero address. + * + * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} + * or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. + * - `ids` and `values` must have the same length. + * + * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead. + */ + function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual { + ERC1155Storage storage $ = _getERC1155Storage(); + if (ids.length != values.length) { + revert ERC1155InvalidArrayLength(ids.length, values.length); + } + + address operator = _msgSender(); + + for (uint256 i = 0; i < ids.length; ++i) { + uint256 id = ids.unsafeMemoryAccess(i); + uint256 value = values.unsafeMemoryAccess(i); + + if (from != address(0)) { + uint256 fromBalance = $._balances[id][from]; + if (fromBalance < value) { + revert ERC1155InsufficientBalance(from, fromBalance, value, id); + } + unchecked { + // Overflow not possible: value <= fromBalance + $._balances[id][from] = fromBalance - value; + } + } + + if (to != address(0)) { + $._balances[id][to] += value; + } + } + + if (ids.length == 1) { + uint256 id = ids.unsafeMemoryAccess(0); + uint256 value = values.unsafeMemoryAccess(0); + emit TransferSingle(operator, from, to, id, value); + } else { + emit TransferBatch(operator, from, to, ids, values); + } + } + + /** + * @dev Version of {_update} that performs the token acceptance check by calling + * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it + * contains code (eg. is a smart contract at the moment of execution). + * + * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any + * update to the contract state after this function would break the check-effect-interaction pattern. Consider + * overriding {_update} instead. + * + * NOTE: This version is kept for backward compatibility. We recommend calling the alternative version with a boolean + * flag in order to achieve better control over which hook to call. + */ + function _updateWithAcceptanceCheck( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data + ) internal virtual { + _updateWithAcceptanceCheck(from, to, ids, values, data, ids.length != 1); + } + + /** + * @dev Version of {_update} that performs the token acceptance check by calling + * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it + * contains code (eg. is a smart contract at the moment of execution). + * + * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any + * update to the contract state after this function would break the check-effect-interaction pattern. Consider + * overriding {_update} instead. + */ + function _updateWithAcceptanceCheck( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data, + bool batch + ) internal virtual { + _update(from, to, ids, values); + if (to != address(0)) { + address operator = _msgSender(); + if (batch) { + ERC1155Utils.checkOnERC1155BatchReceived(operator, from, to, ids, values, data); + } else { + uint256 id = ids.unsafeMemoryAccess(0); + uint256 value = values.unsafeMemoryAccess(0); + ERC1155Utils.checkOnERC1155Received(operator, from, to, id, value, data); + } + } + } + + /** + * @dev Transfers a `value` tokens of token type `id` from `from` to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `from` must have a balance of tokens of type `id` of at least `value` amount. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); + _updateWithAcceptanceCheck(from, to, ids, values, data, false); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + * - `ids` and `values` must have the same length. + */ + function _safeBatchTransferFrom( + address from, + address to, + uint256[] memory ids, + uint256[] memory values, + bytes memory data + ) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + _updateWithAcceptanceCheck(from, to, ids, values, data, true); + } + + /** + * @dev Sets a new URI for all token types, by relying on the token type ID + * substitution mechanism + * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the ERC]. + * + * By this mechanism, any occurrence of the `\{id\}` substring in either the + * URI or any of the values in the JSON file at said URI will be replaced by + * clients with the token type ID. + * + * For example, the `https://token-cdn-domain/\{id\}.json` URI would be + * interpreted by clients as + * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` + * for token type ID 0x4cce0. + * + * See {uri}. + * + * Because these URIs cannot be meaningfully represented by the {URI} event, + * this function emits no events. + */ + function _setURI(string memory newuri) internal virtual { + ERC1155Storage storage $ = _getERC1155Storage(); + $._uri = newuri; + } + + /** + * @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`. + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the + * acceptance magic value. + */ + function _mint(address to, uint256 id, uint256 value, bytes memory data) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); + _updateWithAcceptanceCheck(address(0), to, ids, values, data, false); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `ids` and `values` must have the same length. + * - `to` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the + * acceptance magic value. + */ + function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal { + if (to == address(0)) { + revert ERC1155InvalidReceiver(address(0)); + } + _updateWithAcceptanceCheck(address(0), to, ids, values, data, true); + } + + /** + * @dev Destroys a `value` amount of tokens of type `id` from `from` + * + * Emits a {TransferSingle} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `from` must have at least `value` amount of tokens of type `id`. + */ + function _burn(address from, uint256 id, uint256 value) internal { + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); + _updateWithAcceptanceCheck(from, address(0), ids, values, "", false); + } + + /** + * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. + * + * Emits a {TransferBatch} event. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `from` must have at least `value` amount of tokens of type `id`. + * - `ids` and `values` must have the same length. + */ + function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal { + if (from == address(0)) { + revert ERC1155InvalidSender(address(0)); + } + _updateWithAcceptanceCheck(from, address(0), ids, values, "", true); + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Emits an {ApprovalForAll} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `operator` cannot be the zero address. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + ERC1155Storage storage $ = _getERC1155Storage(); + if (owner == address(0)) { + revert ERC1155InvalidApprover(address(0)); + } + if (operator == address(0)) { + revert ERC1155InvalidOperator(address(0)); + } + $._operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Creates an array in memory with only one value for each of the elements provided. + */ + function _asSingletonArrays( + uint256 element1, + uint256 element2 + ) private pure returns (uint256[] memory array1, uint256[] memory array2) { + assembly ("memory-safe") { + // Load the free memory pointer + array1 := mload(0x40) + // Set array length to 1 + mstore(array1, 1) + // Store the single element at the next word after the length (where content starts) + mstore(add(array1, 0x20), element1) + + // Repeat for next array locating it right after the first array + array2 := add(array1, 0x40) + mstore(array2, 1) + mstore(add(array2, 0x20), element2) + + // Update the free memory pointer by pointing after the second array + mstore(0x40, add(array2, 0x40)) + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol new file mode 100644 index 00000000..70c2eb47 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC1155/extensions/ERC1155Burnable.sol) + +pragma solidity ^0.8.24; + +import {ERC1155Upgradeable} from "../ERC1155Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC1155} that allows token holders to destroy both their + * own tokens and those that they have been approved to use. + */ +abstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable { + function __ERC1155Burnable_init() internal onlyInitializing { + } + + function __ERC1155Burnable_init_unchained() internal onlyInitializing { + } + function burn(address account, uint256 id, uint256 value) public virtual { + if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) { + revert ERC1155MissingApprovalForAll(_msgSender(), account); + } + + _burn(account, id, value); + } + + function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { + if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) { + revert ERC1155MissingApprovalForAll(_msgSender(), account); + } + + _burnBatch(account, ids, values); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol new file mode 100644 index 00000000..66581a8c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC1155/extensions/ERC1155Pausable.sol) + +pragma solidity ^0.8.24; + +import {ERC1155Upgradeable} from "../ERC1155Upgradeable.sol"; +import {PausableUpgradeable} from "../../../utils/PausableUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev ERC-1155 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract pause mechanism of the contract unreachable, and thus unusable. + */ +abstract contract ERC1155PausableUpgradeable is Initializable, ERC1155Upgradeable, PausableUpgradeable { + function __ERC1155Pausable_init() internal onlyInitializing { + } + + function __ERC1155Pausable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC1155-_update}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _update( + address from, + address to, + uint256[] memory ids, + uint256[] memory values + ) internal virtual override whenNotPaused { + super._update(from, to, ids, values); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol new file mode 100644 index 00000000..7b6a1110 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) + +pragma solidity ^0.8.24; + +import {ERC1155Upgradeable} from "../ERC1155Upgradeable.sol"; +import {Arrays} from "@openzeppelin/contracts/utils/Arrays.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC-1155 that adds tracking of total supply per id. + * + * Useful for scenarios where Fungible and Non-fungible tokens have to be + * clearly identified. Note: While a `totalSupply` of 1 may mean the + * corresponding token is an NFT, there are no inherent guarantees that + * no more tokens with the same id will be minted in future. + * + * NOTE: This contract implies a global limit of 2**256 - 1 to the number of tokens + * that can be minted. + * + * CAUTION: This extension should not be added in an upgrade to an already deployed contract. + */ +abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { + using Arrays for uint256[]; + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC1155Supply + struct ERC1155SupplyStorage { + mapping(uint256 id => uint256) _totalSupply; + uint256 _totalSupplyAll; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC1155Supply")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC1155SupplyStorageLocation = 0x4a593662ee04d27b6a00ebb31be7fe0c102c2ade82a7c5d764f2df05dc4e2800; + + function _getERC1155SupplyStorage() private pure returns (ERC1155SupplyStorage storage $) { + assembly { + $.slot := ERC1155SupplyStorageLocation + } + } + + function __ERC1155Supply_init() internal onlyInitializing { + } + + function __ERC1155Supply_init_unchained() internal onlyInitializing { + } + /** + * @dev Total value of tokens with a given id. + */ + function totalSupply(uint256 id) public view virtual returns (uint256) { + ERC1155SupplyStorage storage $ = _getERC1155SupplyStorage(); + return $._totalSupply[id]; + } + + /** + * @dev Total value of tokens. + */ + function totalSupply() public view virtual returns (uint256) { + ERC1155SupplyStorage storage $ = _getERC1155SupplyStorage(); + return $._totalSupplyAll; + } + + /** + * @dev Indicates whether any tokens exist with a given id, or not. + */ + function exists(uint256 id) public view virtual returns (bool) { + return totalSupply(id) > 0; + } + + /// @inheritdoc ERC1155Upgradeable + function _update( + address from, + address to, + uint256[] memory ids, + uint256[] memory values + ) internal virtual override { + ERC1155SupplyStorage storage $ = _getERC1155SupplyStorage(); + super._update(from, to, ids, values); + + if (from == address(0)) { + uint256 totalMintValue = 0; + for (uint256 i = 0; i < ids.length; ++i) { + uint256 value = values.unsafeMemoryAccess(i); + // Overflow check required: The rest of the code assumes that totalSupply never overflows + $._totalSupply[ids.unsafeMemoryAccess(i)] += value; + totalMintValue += value; + } + // Overflow check required: The rest of the code assumes that totalSupplyAll never overflows + $._totalSupplyAll += totalMintValue; + } + + if (to == address(0)) { + uint256 totalBurnValue = 0; + for (uint256 i = 0; i < ids.length; ++i) { + uint256 value = values.unsafeMemoryAccess(i); + + unchecked { + // Overflow not possible: values[i] <= balanceOf(from, ids[i]) <= totalSupply(ids[i]) + $._totalSupply[ids.unsafeMemoryAccess(i)] -= value; + // Overflow not possible: sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll + totalBurnValue += value; + } + } + unchecked { + // Overflow not possible: totalBurnValue = sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll + $._totalSupplyAll -= totalBurnValue; + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol new file mode 100644 index 00000000..a4c9978f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) + +pragma solidity ^0.8.24; + +import {ERC1155Upgradeable} from "../ERC1155Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev ERC-1155 token with storage based token URI management. + * Inspired by the {ERC721URIStorage} extension + */ +abstract contract ERC1155URIStorageUpgradeable is Initializable, ERC1155Upgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC1155URIStorage + struct ERC1155URIStorageStorage { + // Optional base URI + string _baseURI; + + // Optional mapping for token URIs + mapping(uint256 tokenId => string) _tokenURIs; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC1155URIStorage")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC1155URIStorageStorageLocation = 0x89fc852226e759c7c636cf34d732f0198fc56a54876b2374a52beb7b0c558600; + + function _getERC1155URIStorageStorage() private pure returns (ERC1155URIStorageStorage storage $) { + assembly { + $.slot := ERC1155URIStorageStorageLocation + } + } + + function __ERC1155URIStorage_init() internal onlyInitializing { + __ERC1155URIStorage_init_unchained(); + } + + function __ERC1155URIStorage_init_unchained() internal onlyInitializing { + ERC1155URIStorageStorage storage $ = _getERC1155URIStorageStorage(); + $._baseURI = ""; + } + /** + * @dev See {IERC1155MetadataURI-uri}. + * + * This implementation returns the concatenation of the `_baseURI` + * and the token-specific uri if the latter is set + * + * This enables the following behaviors: + * + * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation + * of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` + * is empty per default); + * + * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` + * which in most cases will contain `ERC1155._uri`; + * + * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a + * uri value set, then the result is empty. + */ + function uri(uint256 tokenId) public view virtual override returns (string memory) { + ERC1155URIStorageStorage storage $ = _getERC1155URIStorageStorage(); + string memory tokenURI = $._tokenURIs[tokenId]; + + // If token URI is set, concatenate base URI and tokenURI (via string.concat). + return bytes(tokenURI).length > 0 ? string.concat($._baseURI, tokenURI) : super.uri(tokenId); + } + + /** + * @dev Sets `tokenURI` as the tokenURI of `tokenId`. + */ + function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { + ERC1155URIStorageStorage storage $ = _getERC1155URIStorageStorage(); + $._tokenURIs[tokenId] = tokenURI; + emit URI(uri(tokenId), tokenId); + } + + /** + * @dev Sets `baseURI` as the `_baseURI` for all tokens + */ + function _setBaseURI(string memory baseURI) internal virtual { + ERC1155URIStorageStorage storage $ = _getERC1155URIStorageStorage(); + $._baseURI = baseURI; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/ERC20Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/ERC20Upgradeable.sol new file mode 100644 index 00000000..35fa5a92 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/ERC20Upgradeable.sol @@ -0,0 +1,330 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/ERC20.sol) + +pragma solidity ^0.8.20; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; +import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * + * TIP: For a detailed writeup see our guide + * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * The default value of {decimals} is 18. To change this, you should override + * this function so it returns a different value. + * + * We have followed general OpenZeppelin Contracts guidelines: functions revert + * instead returning `false` on failure. This behavior is nonetheless + * conventional and does not conflict with the expectations of ERC-20 + * applications. + */ +abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC20 + struct ERC20Storage { + mapping(address account => uint256) _balances; + + mapping(address account => mapping(address spender => uint256)) _allowances; + + uint256 _totalSupply; + + string _name; + string _symbol; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00; + + function _getERC20Storage() private pure returns (ERC20Storage storage $) { + assembly { + $.slot := ERC20StorageLocation + } + } + + /** + * @dev Sets the values for {name} and {symbol}. + * + * Both values are immutable: they can only be set once during construction. + */ + function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { + __ERC20_init_unchained(name_, symbol_); + } + + function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { + ERC20Storage storage $ = _getERC20Storage(); + $._name = name_; + $._symbol = symbol_; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view virtual returns (string memory) { + ERC20Storage storage $ = _getERC20Storage(); + return $._name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view virtual returns (string memory) { + ERC20Storage storage $ = _getERC20Storage(); + return $._symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5.05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the default value returned by this function, unless + * it's overridden. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view virtual returns (uint8) { + return 18; + } + + /// @inheritdoc IERC20 + function totalSupply() public view virtual returns (uint256) { + ERC20Storage storage $ = _getERC20Storage(); + return $._totalSupply; + } + + /// @inheritdoc IERC20 + function balanceOf(address account) public view virtual returns (uint256) { + ERC20Storage storage $ = _getERC20Storage(); + return $._balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - the caller must have a balance of at least `value`. + */ + function transfer(address to, uint256 value) public virtual returns (bool) { + address owner = _msgSender(); + _transfer(owner, to, value); + return true; + } + + /// @inheritdoc IERC20 + function allowance(address owner, address spender) public view virtual returns (uint256) { + ERC20Storage storage $ = _getERC20Storage(); + return $._allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on + * `transferFrom`. This is semantically equivalent to an infinite approval. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 value) public virtual returns (bool) { + address owner = _msgSender(); + _approve(owner, spender, value); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Skips emitting an {Approval} event indicating an allowance update. This is not + * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. + * + * NOTE: Does not update the allowance if the current allowance + * is the maximum `uint256`. + * + * Requirements: + * + * - `from` and `to` cannot be the zero address. + * - `from` must have a balance of at least `value`. + * - the caller must have allowance for ``from``'s tokens of at least + * `value`. + */ + function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { + address spender = _msgSender(); + _spendAllowance(from, spender, value); + _transfer(from, to, value); + return true; + } + + /** + * @dev Moves a `value` amount of tokens from `from` to `to`. + * + * This internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _transfer(address from, address to, uint256 value) internal { + if (from == address(0)) { + revert ERC20InvalidSender(address(0)); + } + if (to == address(0)) { + revert ERC20InvalidReceiver(address(0)); + } + _update(from, to, value); + } + + /** + * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` + * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding + * this function. + * + * Emits a {Transfer} event. + */ + function _update(address from, address to, uint256 value) internal virtual { + ERC20Storage storage $ = _getERC20Storage(); + if (from == address(0)) { + // Overflow check required: The rest of the code assumes that totalSupply never overflows + $._totalSupply += value; + } else { + uint256 fromBalance = $._balances[from]; + if (fromBalance < value) { + revert ERC20InsufficientBalance(from, fromBalance, value); + } + unchecked { + // Overflow not possible: value <= fromBalance <= totalSupply. + $._balances[from] = fromBalance - value; + } + } + + if (to == address(0)) { + unchecked { + // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. + $._totalSupply -= value; + } + } else { + unchecked { + // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. + $._balances[to] += value; + } + } + + emit Transfer(from, to, value); + } + + /** + * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). + * Relies on the `_update` mechanism + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _mint(address account, uint256 value) internal { + if (account == address(0)) { + revert ERC20InvalidReceiver(address(0)); + } + _update(address(0), account, value); + } + + /** + * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead + */ + function _burn(address account, uint256 value) internal { + if (account == address(0)) { + revert ERC20InvalidSender(address(0)); + } + _update(account, address(0), value); + } + + /** + * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens. + * + * This internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + * + * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. + */ + function _approve(address owner, address spender, uint256 value) internal { + _approve(owner, spender, value, true); + } + + /** + * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. + * + * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by + * `_spendAllowance` during the `transferFrom` operation sets the flag to false. This saves gas by not emitting any + * `Approval` event during `transferFrom` operations. + * + * Anyone who wishes to continue emitting `Approval` events on the `transferFrom` operation can force the flag to + * true using the following override: + * + * ```solidity + * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { + * super._approve(owner, spender, value, true); + * } + * ``` + * + * Requirements are the same as {_approve}. + */ + function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { + ERC20Storage storage $ = _getERC20Storage(); + if (owner == address(0)) { + revert ERC20InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC20InvalidSpender(address(0)); + } + $._allowances[owner][spender] = value; + if (emitEvent) { + emit Approval(owner, spender, value); + } + } + + /** + * @dev Updates `owner`'s allowance for `spender` based on spent `value`. + * + * Does not update the allowance value in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Does not emit an {Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 value) internal virtual { + uint256 currentAllowance = allowance(owner, spender); + if (currentAllowance < type(uint256).max) { + if (currentAllowance < value) { + revert ERC20InsufficientAllowance(spender, currentAllowance, value); + } + unchecked { + _approve(owner, spender, currentAllowance - value, false); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC1363Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC1363Upgradeable.sol new file mode 100644 index 00000000..f5b01cdb --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC1363Upgradeable.sol @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC1363.sol) + +pragma solidity ^0.8.20; + +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {ERC165Upgradeable} from "../../../utils/introspection/ERC165Upgradeable.sol"; +import {IERC1363} from "@openzeppelin/contracts/interfaces/IERC1363.sol"; +import {ERC1363Utils} from "@openzeppelin/contracts/token/ERC20/utils/ERC1363Utils.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @title ERC1363 + * @dev Extension of {ERC20} tokens that adds support for code execution after transfers and approvals + * on recipient contracts. Calls after transfers are enabled through the {ERC1363-transferAndCall} and + * {ERC1363-transferFromAndCall} methods while calls after approvals can be made with {ERC1363-approveAndCall} + * + * _Available since v5.1._ + */ +abstract contract ERC1363Upgradeable is Initializable, ERC20Upgradeable, ERC165Upgradeable, IERC1363 { + /** + * @dev Indicates a failure within the {transfer} part of a transferAndCall operation. + * @param receiver Address to which tokens are being transferred. + * @param value Amount of tokens to be transferred. + */ + error ERC1363TransferFailed(address receiver, uint256 value); + + /** + * @dev Indicates a failure within the {transferFrom} part of a transferFromAndCall operation. + * @param sender Address from which to send tokens. + * @param receiver Address to which tokens are being transferred. + * @param value Amount of tokens to be transferred. + */ + error ERC1363TransferFromFailed(address sender, address receiver, uint256 value); + + /** + * @dev Indicates a failure within the {approve} part of a approveAndCall operation. + * @param spender Address which will spend the funds. + * @param value Amount of tokens to be spent. + */ + error ERC1363ApproveFailed(address spender, uint256 value); + + function __ERC1363_init() internal onlyInitializing { + } + + function __ERC1363_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC1363).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Moves a `value` amount of tokens from the caller's account to `to` + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. Returns a flag that indicates + * if the call succeeded. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `to` must implement the {IERC1363Receiver} interface. + * - The target must return the {IERC1363Receiver-onTransferReceived} selector to accept the transfer. + * - The internal {transfer} must succeed (returned `true`). + */ + function transferAndCall(address to, uint256 value) public returns (bool) { + return transferAndCall(to, value, ""); + } + + /** + * @dev Variant of {transferAndCall} that accepts an additional `data` parameter with + * no specified format. + */ + function transferAndCall(address to, uint256 value, bytes memory data) public virtual returns (bool) { + if (!transfer(to, value)) { + revert ERC1363TransferFailed(to, value); + } + ERC1363Utils.checkOnERC1363TransferReceived(_msgSender(), _msgSender(), to, value, data); + return true; + } + + /** + * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism + * and then calls {IERC1363Receiver-onTransferReceived} on `to`. Returns a flag that indicates + * if the call succeeded. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `to` must implement the {IERC1363Receiver} interface. + * - The target must return the {IERC1363Receiver-onTransferReceived} selector to accept the transfer. + * - The internal {transferFrom} must succeed (returned `true`). + */ + function transferFromAndCall(address from, address to, uint256 value) public returns (bool) { + return transferFromAndCall(from, to, value, ""); + } + + /** + * @dev Variant of {transferFromAndCall} that accepts an additional `data` parameter with + * no specified format. + */ + function transferFromAndCall( + address from, + address to, + uint256 value, + bytes memory data + ) public virtual returns (bool) { + if (!transferFrom(from, to, value)) { + revert ERC1363TransferFromFailed(from, to, value); + } + ERC1363Utils.checkOnERC1363TransferReceived(_msgSender(), from, to, value, data); + return true; + } + + /** + * @dev Sets a `value` amount of tokens as the allowance of `spender` over the + * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. + * Returns a flag that indicates if the call succeeded. + * + * Requirements: + * + * - The target has code (i.e. is a contract). + * - The target `spender` must implement the {IERC1363Spender} interface. + * - The target must return the {IERC1363Spender-onApprovalReceived} selector to accept the approval. + * - The internal {approve} must succeed (returned `true`). + */ + function approveAndCall(address spender, uint256 value) public returns (bool) { + return approveAndCall(spender, value, ""); + } + + /** + * @dev Variant of {approveAndCall} that accepts an additional `data` parameter with + * no specified format. + */ + function approveAndCall(address spender, uint256 value, bytes memory data) public virtual returns (bool) { + if (!approve(spender, value)) { + revert ERC1363ApproveFailed(spender, value); + } + ERC1363Utils.checkOnERC1363ApprovalReceived(_msgSender(), spender, value, data); + return true; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20BurnableUpgradeable.sol new file mode 100644 index 00000000..afb5bd23 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20BurnableUpgradeable.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) + +pragma solidity ^0.8.20; + +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {ContextUpgradeable} from "../../../utils/ContextUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC20} that allows token holders to destroy both their own + * tokens and those that they have an allowance for, in a way that can be + * recognized off-chain (via event analysis). + */ +abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable { + function __ERC20Burnable_init() internal onlyInitializing { + } + + function __ERC20Burnable_init_unchained() internal onlyInitializing { + } + /** + * @dev Destroys a `value` amount of tokens from the caller. + * + * See {ERC20-_burn}. + */ + function burn(uint256 value) public virtual { + _burn(_msgSender(), value); + } + + /** + * @dev Destroys a `value` amount of tokens from `account`, deducting from + * the caller's allowance. + * + * See {ERC20-_burn} and {ERC20-allowance}. + * + * Requirements: + * + * - the caller must have allowance for ``accounts``'s tokens of at least + * `value`. + */ + function burnFrom(address account, uint256 value) public virtual { + _spendAllowance(account, _msgSender(), value); + _burn(account, value); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CappedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CappedUpgradeable.sol new file mode 100644 index 00000000..cddb8d9b --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CappedUpgradeable.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC20Capped.sol) + +pragma solidity ^0.8.20; + +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC20} that adds a cap to the supply of tokens. + */ +abstract contract ERC20CappedUpgradeable is Initializable, ERC20Upgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC20Capped + struct ERC20CappedStorage { + uint256 _cap; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20Capped")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC20CappedStorageLocation = 0x0f070392f17d5f958cc1ac31867dabecfc5c9758b4a419a200803226d7155d00; + + function _getERC20CappedStorage() private pure returns (ERC20CappedStorage storage $) { + assembly { + $.slot := ERC20CappedStorageLocation + } + } + + /** + * @dev Total supply cap has been exceeded. + */ + error ERC20ExceededCap(uint256 increasedSupply, uint256 cap); + + /** + * @dev The supplied cap is not a valid cap. + */ + error ERC20InvalidCap(uint256 cap); + + /** + * @dev Sets the value of the `cap`. This value is immutable, it can only be + * set once during construction. + */ + function __ERC20Capped_init(uint256 cap_) internal onlyInitializing { + __ERC20Capped_init_unchained(cap_); + } + + function __ERC20Capped_init_unchained(uint256 cap_) internal onlyInitializing { + ERC20CappedStorage storage $ = _getERC20CappedStorage(); + if (cap_ == 0) { + revert ERC20InvalidCap(0); + } + $._cap = cap_; + } + + /** + * @dev Returns the cap on the token's total supply. + */ + function cap() public view virtual returns (uint256) { + ERC20CappedStorage storage $ = _getERC20CappedStorage(); + return $._cap; + } + + /// @inheritdoc ERC20Upgradeable + function _update(address from, address to, uint256 value) internal virtual override { + super._update(from, to, value); + + if (from == address(0)) { + uint256 maxSupply = cap(); + uint256 supply = totalSupply(); + if (supply > maxSupply) { + revert ERC20ExceededCap(supply, maxSupply); + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CrosschainUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CrosschainUpgradeable.sol new file mode 100644 index 00000000..eb878fa2 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20CrosschainUpgradeable.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20Crosschain.sol) + +pragma solidity ^0.8.26; + +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {BridgeFungibleUpgradeable} from "../../../crosschain/bridges/abstract/BridgeFungibleUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC20} that makes it natively cross-chain using the ERC-7786 based {BridgeFungible}. + * + * This extension makes the token compatible with counterparts on other chains, which can be: + * * {ERC20Crosschain} instances, + * * {ERC20} instances that are bridged using {BridgeERC20}, + * * {ERC20Bridgeable} instances that are bridged using {BridgeERC7802}. + * + * It is mostly equivalent to inheriting from both {ERC20Bridgeable} and {BridgeERC7802}, and configuring them such + * that: + * * `token` (on the {BridgeERC7802} side) is `address(this)`, + * * `_checkTokenBridge` (on the {ERC20Bridgeable} side) is implemented such that it only accepts self-calls. + */ +// slither-disable-next-line locked-ether +abstract contract ERC20CrosschainUpgradeable is Initializable, ERC20Upgradeable, BridgeFungibleUpgradeable { + function __ERC20Crosschain_init() internal onlyInitializing { + } + + function __ERC20Crosschain_init_unchained() internal onlyInitializing { + } + /// @dev Variant of {crosschainTransfer} that allows an authorized account (using ERC20 allowance) to operate on `from`'s assets. + function crosschainTransferFrom(address from, bytes memory to, uint256 amount) public virtual returns (bytes32) { + _spendAllowance(from, _msgSender(), amount); + return _crosschainTransfer(from, to, amount); + } + + /// @dev "Locking" tokens is achieved through burning + function _onSend(address from, uint256 amount) internal virtual override { + _burn(from, amount); + } + + /// @dev "Unlocking" tokens is achieved through minting + function _onReceive(address to, uint256 amount) internal virtual override { + _mint(to, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol similarity index 51% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol index 9e030996..aafbc837 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol @@ -1,24 +1,41 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/ERC20FlashMint.sol) +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20FlashMint.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../../../interfaces/IERC3156FlashBorrowerUpgradeable.sol"; -import "../../../interfaces/IERC3156FlashLenderUpgradeable.sol"; -import "../ERC20Upgradeable.sol"; -import {Initializable} from "../../../proxy/utils/Initializable.sol"; +import {IERC3156FlashBorrower} from "@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol"; +import {IERC3156FlashLender} from "@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol"; +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** - * @dev Implementation of the ERC3156 Flash loans extension, as defined in + * @dev Implementation of the ERC-3156 Flash loans extension, as defined in * https://eips.ethereum.org/EIPS/eip-3156[ERC-3156]. * * Adds the {flashLoan} method, which provides flash loan support at the token * level. By default there is no fee, but this can be changed by overriding {flashFee}. * - * _Available since v4.1._ + * NOTE: When this extension is used along with the {ERC20Capped} or {ERC20Votes} extensions, + * {maxFlashLoan} will not correctly reflect the maximum that can be flash minted. We recommend + * overriding {maxFlashLoan} so that it correctly reflects the supply cap. */ -abstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, IERC3156FlashLenderUpgradeable { - bytes32 private constant _RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); +abstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, IERC3156FlashLender { + bytes32 private constant RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan"); + + /** + * @dev The loan token is not valid. + */ + error ERC3156UnsupportedToken(address token); + + /** + * @dev The requested loan exceeds the max loan value for `token`. + */ + error ERC3156ExceededMaxLoan(uint256 maxLoan); + + /** + * @dev The receiver of a flashloan is not a valid {IERC3156FlashBorrower-onFlashLoan} implementer. + */ + error ERC3156InvalidReceiver(address receiver); function __ERC20FlashMint_init() internal onlyInitializing { } @@ -27,11 +44,16 @@ abstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, } /** * @dev Returns the maximum amount of tokens available for loan. + * + * NOTE: This function will not automatically detect any supply cap + * added by other extensions, such as {ERC20Capped}. If necessary, + * override this function to take a supply cap into account. + * * @param token The address of the token that is requested. * @return The amount of token that can be loaned. */ - function maxFlashLoan(address token) public view virtual override returns (uint256) { - return token == address(this) ? type(uint256).max - ERC20Upgradeable.totalSupply() : 0; + function maxFlashLoan(address token) public view virtual returns (uint256) { + return token == address(this) ? type(uint256).max - totalSupply() : 0; } /** @@ -39,26 +61,23 @@ abstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, * the {_flashFee} function which returns the fee applied when doing flash * loans. * @param token The token to be flash loaned. - * @param amount The amount of tokens to be loaned. + * @param value The amount of tokens to be loaned. * @return The fees applied to the corresponding flash loan. */ - function flashFee(address token, uint256 amount) public view virtual override returns (uint256) { - require(token == address(this), "ERC20FlashMint: wrong token"); - return _flashFee(token, amount); + function flashFee(address token, uint256 value) public view virtual returns (uint256) { + if (token != address(this)) { + revert ERC3156UnsupportedToken(token); + } + return _flashFee(token, value); } /** * @dev Returns the fee applied when doing flash loans. By default this * implementation has 0 fees. This function can be overloaded to make * the flash loan mechanism deflationary. - * @param token The token to be flash loaned. - * @param amount The amount of tokens to be loaned. * @return The fees applied to the corresponding flash loan. */ - function _flashFee(address token, uint256 amount) internal view virtual returns (uint256) { - // silence warning about unused variable without the addition of bytecode. - token; - amount; + function _flashFee(address /*token*/, uint256 /*value*/) internal view virtual returns (uint256) { return 0; } @@ -76,13 +95,13 @@ abstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, * @dev Performs a flash loan. New tokens are minted and sent to the * `receiver`, who is required to implement the {IERC3156FlashBorrower} * interface. By the end of the flash loan, the receiver is expected to own - * amount + fee tokens and have them approved back to the token contract itself so + * value + fee tokens and have them approved back to the token contract itself so * they can be burned. * @param receiver The receiver of the flash loan. Should implement the * {IERC3156FlashBorrower-onFlashLoan} interface. * @param token The token to be flash loaned. Only `address(this)` is * supported. - * @param amount The amount of tokens to be loaned. + * @param value The amount of tokens to be loaned. * @param data An arbitrary datafield that is passed to the receiver. * @return `true` if the flash loan was successful. */ @@ -90,33 +109,28 @@ abstract contract ERC20FlashMintUpgradeable is Initializable, ERC20Upgradeable, // minted at the beginning is always recovered and burned at the end, or else the entire function will revert. // slither-disable-next-line reentrancy-no-eth function flashLoan( - IERC3156FlashBorrowerUpgradeable receiver, + IERC3156FlashBorrower receiver, address token, - uint256 amount, + uint256 value, bytes calldata data - ) public virtual override returns (bool) { - require(amount <= maxFlashLoan(token), "ERC20FlashMint: amount exceeds maxFlashLoan"); - uint256 fee = flashFee(token, amount); - _mint(address(receiver), amount); - require( - receiver.onFlashLoan(msg.sender, token, amount, fee, data) == _RETURN_VALUE, - "ERC20FlashMint: invalid return value" - ); + ) public virtual returns (bool) { + uint256 maxLoan = maxFlashLoan(token); + if (value > maxLoan) { + revert ERC3156ExceededMaxLoan(maxLoan); + } + uint256 fee = flashFee(token, value); + _mint(address(receiver), value); + if (receiver.onFlashLoan(_msgSender(), token, value, fee, data) != RETURN_VALUE) { + revert ERC3156InvalidReceiver(address(receiver)); + } address flashFeeReceiver = _flashFeeReceiver(); - _spendAllowance(address(receiver), address(this), amount + fee); + _spendAllowance(address(receiver), address(this), value + fee); if (fee == 0 || flashFeeReceiver == address(0)) { - _burn(address(receiver), amount + fee); + _burn(address(receiver), value + fee); } else { - _burn(address(receiver), amount); + _burn(address(receiver), value); _transfer(address(receiver), flashFeeReceiver, fee); } return true; } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PausableUpgradeable.sol new file mode 100644 index 00000000..e455d57c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PausableUpgradeable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC20Pausable.sol) + +pragma solidity ^0.8.20; + +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {PausableUpgradeable} from "../../../utils/PausableUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev ERC-20 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract pause mechanism of the contract unreachable, and thus unusable. + */ +abstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable { + function __ERC20Pausable_init() internal onlyInitializing { + } + + function __ERC20Pausable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC20-_update}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _update(address from, address to, uint256 value) internal virtual override whenNotPaused { + super._update(from, to, value); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PermitUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PermitUpgradeable.sol new file mode 100644 index 00000000..0e856060 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20PermitUpgradeable.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Permit.sol) + +pragma solidity ^0.8.24; + +import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import {EIP712Upgradeable} from "../../../utils/cryptography/EIP712Upgradeable.sol"; +import {NoncesUpgradeable} from "../../../utils/NoncesUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. + * + * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by + * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't + * need to send a transaction, and thus is not required to hold Ether at all. + */ +abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20Permit, EIP712Upgradeable, NoncesUpgradeable { + bytes32 private constant PERMIT_TYPEHASH = + keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); + + /** + * @dev Permit deadline has expired. + */ + error ERC2612ExpiredSignature(uint256 deadline); + + /** + * @dev Mismatched signature. + */ + error ERC2612InvalidSigner(address signer, address owner); + + /** + * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. + * + * It's a good idea to use the same `name` that is defined as the ERC-20 token name. + */ + function __ERC20Permit_init(string memory name) internal onlyInitializing { + __EIP712_init_unchained(name, "1"); + } + + function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {} + + /// @inheritdoc IERC20Permit + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) public virtual { + if (block.timestamp > deadline) { + revert ERC2612ExpiredSignature(deadline); + } + + bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); + + bytes32 hash = _hashTypedDataV4(structHash); + + address signer = ECDSA.recover(hash, v, r, s); + if (signer != owner) { + revert ERC2612InvalidSigner(signer, owner); + } + + _approve(owner, spender, value); + } + + /// @inheritdoc IERC20Permit + function nonces(address owner) public view virtual override(IERC20Permit, NoncesUpgradeable) returns (uint256) { + return super.nonces(owner); + } + + /// @inheritdoc IERC20Permit + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view returns (bytes32) { + return _domainSeparatorV4(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20VotesUpgradeable.sol new file mode 100644 index 00000000..4857555c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20VotesUpgradeable.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/ERC20Votes.sol) + +pragma solidity ^0.8.24; + +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {VotesUpgradeable} from "../../../governance/utils/VotesUpgradeable.sol"; +import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC-20 to support Compound-like voting and delegation. This version is more generic than Compound's, + * and supports token supply up to 2^208^ - 1, while COMP is limited to 2^96^ - 1. + * + * NOTE: This contract does not provide interface compatibility with Compound's COMP token. + * + * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either + * by calling the {Votes-delegate} function directly, or by providing a signature to be used with {Votes-delegateBySig}. Voting + * power can be queried through the public accessors {Votes-getVotes} and {Votes-getPastVotes}. + * + * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it + * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. + */ +abstract contract ERC20VotesUpgradeable is Initializable, ERC20Upgradeable, VotesUpgradeable { + /** + * @dev Total supply cap has been exceeded, introducing a risk of votes overflowing. + */ + error ERC20ExceededSafeSupply(uint256 increasedSupply, uint256 cap); + + function __ERC20Votes_init() internal onlyInitializing { + } + + function __ERC20Votes_init_unchained() internal onlyInitializing { + } + /** + * @dev Maximum token supply. Defaults to `type(uint208).max` (2^208^ - 1). + * + * This maximum is enforced in {_update}. It limits the total supply of the token, which is otherwise a uint256, + * so that checkpoints can be stored in the Trace208 structure used by {Votes}. Increasing this value will not + * remove the underlying limitation, and will cause {_update} to fail because of a math overflow in + * {Votes-_transferVotingUnits}. An override could be used to further restrict the total supply (to a lower value) if + * additional logic requires it. When resolving override conflicts on this function, the minimum should be + * returned. + */ + function _maxSupply() internal view virtual returns (uint256) { + return type(uint208).max; + } + + /** + * @dev Move voting power when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _update(address from, address to, uint256 value) internal virtual override { + super._update(from, to, value); + if (from == address(0)) { + uint256 supply = totalSupply(); + uint256 cap = _maxSupply(); + if (supply > cap) { + revert ERC20ExceededSafeSupply(supply, cap); + } + } + _transferVotingUnits(from, to, value); + } + + /** + * @dev Returns the voting units of an `account`. + * + * WARNING: Overriding this function may compromise the internal vote accounting. + * `ERC20Votes` assumes tokens map to voting units 1:1 and this is not easy to change. + */ + function _getVotingUnits(address account) internal view virtual override returns (uint256) { + return balanceOf(account); + } + + /** + * @dev Get number of checkpoints for `account`. + */ + function numCheckpoints(address account) public view virtual returns (uint32) { + return _numCheckpoints(account); + } + + /** + * @dev Get the `pos`-th checkpoint for `account`. + */ + function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoints.Checkpoint208 memory) { + return _checkpoints(account, pos); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20WrapperUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20WrapperUpgradeable.sol new file mode 100644 index 00000000..734aa0ce --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC20WrapperUpgradeable.sol @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC20Wrapper.sol) + +pragma solidity ^0.8.20; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of the ERC-20 token contract to support token wrapping. + * + * Users can deposit and withdraw "underlying tokens" and receive a matching number of "wrapped tokens". This is useful + * in conjunction with other modules. For example, combining this wrapping mechanism with {ERC20Votes} will allow the + * wrapping of an existing "basic" ERC-20 into a governance token. + * + * WARNING: Any mechanism in which the underlying token changes the {balanceOf} of an account without an explicit transfer + * may desynchronize this contract's supply and its underlying balance. Please exercise caution when wrapping tokens that + * may undercollateralize the wrapper (i.e. wrapper's total supply is higher than its underlying balance). See {_recover} + * for recovering value accrued to the wrapper. + */ +abstract contract ERC20WrapperUpgradeable is Initializable, ERC20Upgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC20Wrapper + struct ERC20WrapperStorage { + IERC20 _underlying; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20Wrapper")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC20WrapperStorageLocation = 0x3b5a617e0d4c238430871a64fe18212794b0c8d05a4eac064a8c9039fb5e0700; + + function _getERC20WrapperStorage() private pure returns (ERC20WrapperStorage storage $) { + assembly { + $.slot := ERC20WrapperStorageLocation + } + } + + /** + * @dev The underlying token couldn't be wrapped. + */ + error ERC20InvalidUnderlying(address token); + + function __ERC20Wrapper_init(IERC20 underlyingToken) internal onlyInitializing { + __ERC20Wrapper_init_unchained(underlyingToken); + } + + function __ERC20Wrapper_init_unchained(IERC20 underlyingToken) internal onlyInitializing { + ERC20WrapperStorage storage $ = _getERC20WrapperStorage(); + if (address(underlyingToken) == address(this)) { + revert ERC20InvalidUnderlying(address(this)); + } + $._underlying = underlyingToken; + } + + /// @inheritdoc IERC20Metadata + function decimals() public view virtual override returns (uint8) { + ERC20WrapperStorage storage $ = _getERC20WrapperStorage(); + try IERC20Metadata(address($._underlying)).decimals() returns (uint8 value) { + return value; + } catch { + return super.decimals(); + } + } + + /** + * @dev Returns the address of the underlying ERC-20 token that is being wrapped. + */ + function underlying() public view returns (IERC20) { + ERC20WrapperStorage storage $ = _getERC20WrapperStorage(); + return $._underlying; + } + + /** + * @dev Allow a user to deposit underlying tokens and mint the corresponding number of wrapped tokens. + */ + function depositFor(address account, uint256 value) public virtual returns (bool) { + ERC20WrapperStorage storage $ = _getERC20WrapperStorage(); + address sender = _msgSender(); + if (sender == address(this)) { + revert ERC20InvalidSender(address(this)); + } + if (account == address(this)) { + revert ERC20InvalidReceiver(account); + } + SafeERC20.safeTransferFrom($._underlying, sender, address(this), value); + _mint(account, value); + return true; + } + + /** + * @dev Allow a user to burn a number of wrapped tokens and withdraw the corresponding number of underlying tokens. + */ + function withdrawTo(address account, uint256 value) public virtual returns (bool) { + ERC20WrapperStorage storage $ = _getERC20WrapperStorage(); + if (account == address(this)) { + revert ERC20InvalidReceiver(account); + } + _burn(_msgSender(), value); + SafeERC20.safeTransfer($._underlying, account, value); + return true; + } + + /** + * @dev Mint wrapped token to cover any underlyingTokens that would have been transferred by mistake or acquired from + * rebasing mechanisms. Internal function that can be exposed with access control if desired. + */ + function _recover(address account) internal virtual returns (uint256) { + ERC20WrapperStorage storage $ = _getERC20WrapperStorage(); + uint256 value = $._underlying.balanceOf(address(this)) - totalSupply(); + _mint(account, value); + return value; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC4626Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC4626Upgradeable.sol new file mode 100644 index 00000000..948da3a8 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/ERC4626Upgradeable.sol @@ -0,0 +1,337 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC20/extensions/ERC4626.sol) + +pragma solidity ^0.8.24; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol"; +import {LowLevelCall} from "@openzeppelin/contracts/utils/LowLevelCall.sol"; +import {Memory} from "@openzeppelin/contracts/utils/Memory.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the ERC-4626 "Tokenized Vault Standard" as defined in + * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. + * + * This extension allows the minting and burning of "shares" (represented using the ERC-20 inheritance) in exchange for + * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends + * the ERC-20 standard. Any additional extensions included along it would affect the "shares" token represented by this + * contract and not the "assets" token which is an independent contract. + * + * [CAUTION] + * ==== + * In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning + * with a "donation" to the vault that inflates the price of a share. This is variously known as a donation or inflation + * attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial + * deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may + * similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by + * verifying the amount received is as expected, using a wrapper that performs these checks such as + * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. + * + * Since v4.9, this implementation introduces configurable virtual assets and shares to help developers mitigate that risk. + * The `_decimalsOffset()` corresponds to an offset in the decimal representation between the underlying asset's decimals + * and the vault decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which + * itself determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default + * offset (0) makes it non-profitable even if an attacker is able to capture value from multiple user deposits, as a result + * of the value being captured by the virtual shares (out of the attacker's donation) matching the attacker's expected gains. + * With a larger offset, the attack becomes orders of magnitude more expensive than it is profitable. More details about the + * underlying math can be found xref:ROOT:erc4626.adoc#inflation-attack[here]. + * + * The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued + * to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets + * will cause the first user to exit to experience reduced losses in detriment to the last users that will experience + * bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the + * `_convertToShares` and `_convertToAssets` functions. + * + * To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide]. + * ==== + * + * [NOTE] + * ==== + * When overriding this contract, some elements must be considered: + * + * * When overriding the behavior of the deposit or withdraw mechanisms, it is recommended to override the internal + * functions. Overriding {_deposit} automatically affects both {deposit} and {mint}. Similarly, overriding {_withdraw} + * automatically affects both {withdraw} and {redeem}. Overall it is not recommended to override the public facing + * functions since that could lead to inconsistent behaviors between the {deposit} and {mint} or between {withdraw} and + * {redeem}, which is documented to have led to loss of funds. + * + * * Overrides to the deposit or withdraw mechanism must be reflected in the preview functions as well. + * + * * {maxWithdraw} depends on {maxRedeem}. Therefore, overriding {maxRedeem} only is enough. On the other hand, + * overriding {maxWithdraw} only would have no effect on {maxRedeem}, and could create an inconsistency between the two + * functions. + * + * * If {previewRedeem} is overridden to revert, {maxWithdraw} must be overridden as necessary to ensure it + * always return successfully. + * ==== + */ +abstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC4626 { + using Math for uint256; + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC4626 + struct ERC4626Storage { + IERC20 _asset; + uint8 _underlyingDecimals; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC4626")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC4626StorageLocation = 0x0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00; + + function _getERC4626Storage() private pure returns (ERC4626Storage storage $) { + assembly { + $.slot := ERC4626StorageLocation + } + } + + /** + * @dev Attempted to deposit more assets than the max amount for `receiver`. + */ + error ERC4626ExceededMaxDeposit(address receiver, uint256 assets, uint256 max); + + /** + * @dev Attempted to mint more shares than the max amount for `receiver`. + */ + error ERC4626ExceededMaxMint(address receiver, uint256 shares, uint256 max); + + /** + * @dev Attempted to withdraw more assets than the max amount for `owner`. + */ + error ERC4626ExceededMaxWithdraw(address owner, uint256 assets, uint256 max); + + /** + * @dev Attempted to redeem more shares than the max amount for `owner`. + */ + error ERC4626ExceededMaxRedeem(address owner, uint256 shares, uint256 max); + + /** + * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC-20 or ERC-777). + */ + function __ERC4626_init(IERC20 asset_) internal onlyInitializing { + __ERC4626_init_unchained(asset_); + } + + function __ERC4626_init_unchained(IERC20 asset_) internal onlyInitializing { + ERC4626Storage storage $ = _getERC4626Storage(); + (bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_); + $._underlyingDecimals = success ? assetDecimals : 18; + $._asset = asset_; + } + + /** + * @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way. + */ + function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool ok, uint8 assetDecimals) { + Memory.Pointer ptr = Memory.getFreeMemoryPointer(); + (bool success, bytes32 returnedDecimals, ) = LowLevelCall.staticcallReturn64Bytes( + address(asset_), + abi.encodeCall(IERC20Metadata.decimals, ()) + ); + Memory.unsafeSetFreeMemoryPointer(ptr); + + return + (success && LowLevelCall.returnDataSize() >= 32 && uint256(returnedDecimals) <= type(uint8).max) + ? (true, uint8(uint256(returnedDecimals))) + : (false, 0); + } + + /** + * @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This + * "original" value is cached during construction of the vault contract. If this read operation fails (e.g., the + * asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals. + * + * See {IERC20Metadata-decimals}. + */ + function decimals() public view virtual override(IERC20Metadata, ERC20Upgradeable) returns (uint8) { + ERC4626Storage storage $ = _getERC4626Storage(); + return $._underlyingDecimals + _decimalsOffset(); + } + + /// @inheritdoc IERC4626 + function asset() public view virtual returns (address) { + ERC4626Storage storage $ = _getERC4626Storage(); + return address($._asset); + } + + /// @inheritdoc IERC4626 + function totalAssets() public view virtual returns (uint256) { + return IERC20(asset()).balanceOf(address(this)); + } + + /// @inheritdoc IERC4626 + function convertToShares(uint256 assets) public view virtual returns (uint256) { + return _convertToShares(assets, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function convertToAssets(uint256 shares) public view virtual returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function maxDeposit(address) public view virtual returns (uint256) { + return type(uint256).max; + } + + /// @inheritdoc IERC4626 + function maxMint(address) public view virtual returns (uint256) { + return type(uint256).max; + } + + /// @inheritdoc IERC4626 + function maxWithdraw(address owner) public view virtual returns (uint256) { + return previewRedeem(maxRedeem(owner)); + } + + /// @inheritdoc IERC4626 + function maxRedeem(address owner) public view virtual returns (uint256) { + return balanceOf(owner); + } + + /// @inheritdoc IERC4626 + function previewDeposit(uint256 assets) public view virtual returns (uint256) { + return _convertToShares(assets, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function previewMint(uint256 shares) public view virtual returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Ceil); + } + + /// @inheritdoc IERC4626 + function previewWithdraw(uint256 assets) public view virtual returns (uint256) { + return _convertToShares(assets, Math.Rounding.Ceil); + } + + /// @inheritdoc IERC4626 + function previewRedeem(uint256 shares) public view virtual returns (uint256) { + return _convertToAssets(shares, Math.Rounding.Floor); + } + + /// @inheritdoc IERC4626 + function deposit(uint256 assets, address receiver) public virtual returns (uint256) { + uint256 maxAssets = maxDeposit(receiver); + if (assets > maxAssets) { + revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets); + } + + uint256 shares = previewDeposit(assets); + _deposit(_msgSender(), receiver, assets, shares); + + return shares; + } + + /// @inheritdoc IERC4626 + function mint(uint256 shares, address receiver) public virtual returns (uint256) { + uint256 maxShares = maxMint(receiver); + if (shares > maxShares) { + revert ERC4626ExceededMaxMint(receiver, shares, maxShares); + } + + uint256 assets = previewMint(shares); + _deposit(_msgSender(), receiver, assets, shares); + + return assets; + } + + /// @inheritdoc IERC4626 + function withdraw(uint256 assets, address receiver, address owner) public virtual returns (uint256) { + uint256 maxAssets = maxWithdraw(owner); + if (assets > maxAssets) { + revert ERC4626ExceededMaxWithdraw(owner, assets, maxAssets); + } + + uint256 shares = previewWithdraw(assets); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return shares; + } + + /// @inheritdoc IERC4626 + function redeem(uint256 shares, address receiver, address owner) public virtual returns (uint256) { + uint256 maxShares = maxRedeem(owner); + if (shares > maxShares) { + revert ERC4626ExceededMaxRedeem(owner, shares, maxShares); + } + + uint256 assets = previewRedeem(shares); + _withdraw(_msgSender(), receiver, owner, assets, shares); + + return assets; + } + + /** + * @dev Internal conversion function (from assets to shares) with support for rounding direction. + */ + function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) { + return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding); + } + + /** + * @dev Internal conversion function (from shares to assets) with support for rounding direction. + */ + function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) { + return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding); + } + + /** + * @dev Deposit/mint common workflow. + */ + function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual { + // If asset() is ERC-777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the + // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the + // assets are transferred and before the shares are minted, which is a valid state. + // slither-disable-next-line reentrancy-no-eth + _transferIn(caller, assets); + _mint(receiver, shares); + + emit Deposit(caller, receiver, assets, shares); + } + + /** + * @dev Withdraw/redeem common workflow. + */ + function _withdraw( + address caller, + address receiver, + address owner, + uint256 assets, + uint256 shares + ) internal virtual { + if (caller != owner) { + _spendAllowance(owner, caller, shares); + } + + // If asset() is ERC-777, `transfer` can trigger a reentrancy AFTER the transfer happens through the + // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, + // calls the vault, which is assumed not malicious. + // + // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the + // shares are burned and after the assets are transferred, which is a valid state. + _burn(owner, shares); + _transferOut(receiver, assets); + + emit Withdraw(caller, receiver, owner, assets, shares); + } + + /// @dev Performs a transfer in of underlying assets. The default implementation uses `SafeERC20`. Used by {_deposit}. + function _transferIn(address from, uint256 assets) internal virtual { + SafeERC20.safeTransferFrom(IERC20(asset()), from, address(this), assets); + } + + /// @dev Performs a transfer out of underlying assets. The default implementation uses `SafeERC20`. Used by {_withdraw}. + function _transferOut(address to, uint256 assets) internal virtual { + SafeERC20.safeTransfer(IERC20(asset()), to, assets); + } + + function _decimalsOffset() internal view virtual returns (uint8) { + return 0; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol new file mode 100644 index 00000000..99aea490 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/draft-ERC20Bridgeable.sol) + +pragma solidity ^0.8.20; + +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {ERC165Upgradeable} from "../../../utils/introspection/ERC165Upgradeable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {IERC7802} from "@openzeppelin/contracts/interfaces/draft-IERC7802.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev ERC20 extension that implements the standard token interface according to + * https://eips.ethereum.org/EIPS/eip-7802[ERC-7802]. + */ +abstract contract ERC20BridgeableUpgradeable is Initializable, ERC20Upgradeable, ERC165Upgradeable, IERC7802 { + /// @dev Modifier to restrict access to the token bridge. + modifier onlyTokenBridge() { + // Token bridge should never be impersonated using a relayer/forwarder. Using msg.sender is preferable to + // _msgSender() for security reasons. + _checkTokenBridge(msg.sender); + _; + } + + function __ERC20Bridgeable_init() internal onlyInitializing { + } + + function __ERC20Bridgeable_init_unchained() internal onlyInitializing { + } + /// @inheritdoc ERC165Upgradeable + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC7802).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC7802-crosschainMint}. Emits a {IERC7802-CrosschainMint} event. + */ + function crosschainMint(address to, uint256 value) public virtual override onlyTokenBridge { + _mint(to, value); + emit CrosschainMint(to, value, _msgSender()); + } + + /** + * @dev See {IERC7802-crosschainBurn}. Emits a {IERC7802-CrosschainBurn} event. + */ + function crosschainBurn(address from, uint256 value) public virtual override onlyTokenBridge { + _burn(from, value); + emit CrosschainBurn(from, value, _msgSender()); + } + + /** + * @dev Checks if the caller is a trusted token bridge. MUST revert otherwise. + * + * Developers should implement this function using an access control mechanism that allows + * customizing the list of allowed senders. Consider using {AccessControl} or {AccessManaged}. + */ + function _checkTokenBridge(address caller) internal virtual; +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol new file mode 100644 index 00000000..b7a9e721 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC20/extensions/draft-ERC20TemporaryApprovalUpgradeable.sol @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/extensions/draft-ERC20TemporaryApproval.sol) + +pragma solidity ^0.8.24; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {ERC20Upgradeable} from "../ERC20Upgradeable.sol"; +import {IERC7674} from "@openzeppelin/contracts/interfaces/draft-IERC7674.sol"; +import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; +import {SlotDerivation} from "@openzeppelin/contracts/utils/SlotDerivation.sol"; +import {TransientSlot} from "@openzeppelin/contracts/utils/TransientSlot.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {ERC20} that adds support for temporary allowances following ERC-7674. + * + * WARNING: This is a draft contract. The corresponding ERC is still subject to changes. + * + * _Available since v5.1._ + */ +abstract contract ERC20TemporaryApprovalUpgradeable is Initializable, ERC20Upgradeable, IERC7674 { + using SlotDerivation for bytes32; + using TransientSlot for bytes32; + using TransientSlot for TransientSlot.Uint256Slot; + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20_TEMPORARY_APPROVAL_STORAGE")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC20_TEMPORARY_APPROVAL_STORAGE = + 0xea2d0e77a01400d0111492b1321103eed560d8fe44b9a7c2410407714583c400; + + function __ERC20TemporaryApproval_init() internal onlyInitializing { + } + + function __ERC20TemporaryApproval_init_unchained() internal onlyInitializing { + } + /** + * @dev {allowance} override that includes the temporary allowance when looking up the current allowance. If + * adding up the persistent and the temporary allowances result in an overflow, type(uint256).max is returned. + */ + function allowance(address owner, address spender) public view virtual override(IERC20, ERC20Upgradeable) returns (uint256) { + (bool success, uint256 amount) = Math.tryAdd( + super.allowance(owner, spender), + _temporaryAllowance(owner, spender) + ); + return success ? amount : type(uint256).max; + } + + /** + * @dev Internal getter for the current temporary allowance that `spender` has over `owner` tokens. + */ + function _temporaryAllowance(address owner, address spender) internal view virtual returns (uint256) { + return _temporaryAllowanceSlot(owner, spender).tload(); + } + + /** + * @dev Alternative to {approve} that sets a `value` amount of tokens as the temporary allowance of `spender` over + * the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Requirements: + * - `spender` cannot be the zero address. + * + * Does NOT emit an {Approval} event. + */ + function temporaryApprove(address spender, uint256 value) public virtual returns (bool) { + _temporaryApprove(_msgSender(), spender, value); + return true; + } + + /** + * @dev Sets `value` as the temporary allowance of `spender` over the `owner`'s tokens. + * + * This internal function is equivalent to `temporaryApprove`, and can be used to e.g. set automatic allowances + * for certain subsystems, etc. + * + * Requirements: + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + * + * Does NOT emit an {Approval} event. + */ + function _temporaryApprove(address owner, address spender, uint256 value) internal virtual { + if (owner == address(0)) { + revert ERC20InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC20InvalidSpender(address(0)); + } + _temporaryAllowanceSlot(owner, spender).tstore(value); + } + + /** + * @dev {_spendAllowance} override that consumes the temporary allowance (if any) before eventually falling back + * to consuming the persistent allowance. + * NOTE: This function skips calling `super._spendAllowance` if the temporary allowance + * is enough to cover the spending. + */ + function _spendAllowance(address owner, address spender, uint256 value) internal virtual override { + // load transient allowance + uint256 currentTemporaryAllowance = _temporaryAllowance(owner, spender); + + // Check and update (if needed) the temporary allowance + set remaining value + if (currentTemporaryAllowance > 0) { + // All value is covered by the infinite allowance. nothing left to spend, we can return early + if (currentTemporaryAllowance == type(uint256).max) { + return; + } + // check how much of the value is covered by the transient allowance + uint256 spendTemporaryAllowance = Math.min(currentTemporaryAllowance, value); + unchecked { + // decrease transient allowance accordingly + _temporaryApprove(owner, spender, currentTemporaryAllowance - spendTemporaryAllowance); + // update value necessary + value -= spendTemporaryAllowance; + } + } + // reduce any remaining value from the persistent allowance + if (value > 0) { + super._spendAllowance(owner, spender, value); + } + } + + function _temporaryAllowanceSlot(address owner, address spender) private pure returns (TransientSlot.Uint256Slot) { + return ERC20_TEMPORARY_APPROVAL_STORAGE.deriveMapping(owner).deriveMapping(spender).asUint256(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/ERC6909Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/ERC6909Upgradeable.sol new file mode 100644 index 00000000..8897d71e --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/ERC6909Upgradeable.sol @@ -0,0 +1,250 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC6909/ERC6909.sol) + +pragma solidity ^0.8.20; + +import {IERC6909} from "@openzeppelin/contracts/interfaces/IERC6909.sol"; +import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of ERC-6909. + * See https://eips.ethereum.org/EIPS/eip-6909 + */ +contract ERC6909Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC6909 { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC6909 + struct ERC6909Storage { + mapping(address owner => mapping(uint256 id => uint256)) _balances; + + mapping(address owner => mapping(address operator => bool)) _operatorApprovals; + + mapping(address owner => mapping(address spender => mapping(uint256 id => uint256))) _allowances; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC6909")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC6909StorageLocation = 0x9e75074fe7582401cc58901f6bda367c4d687c51437956963a7c06ef5cfaf900; + + function _getERC6909Storage() private pure returns (ERC6909Storage storage $) { + assembly { + $.slot := ERC6909StorageLocation + } + } + + error ERC6909InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 id); + error ERC6909InsufficientAllowance(address spender, uint256 allowance, uint256 needed, uint256 id); + error ERC6909InvalidApprover(address approver); + error ERC6909InvalidReceiver(address receiver); + error ERC6909InvalidSender(address sender); + error ERC6909InvalidSpender(address spender); + + function __ERC6909_init() internal onlyInitializing { + } + + function __ERC6909_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC6909).interfaceId || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC6909 + function balanceOf(address owner, uint256 id) public view virtual override returns (uint256) { + ERC6909Storage storage $ = _getERC6909Storage(); + return $._balances[owner][id]; + } + + /// @inheritdoc IERC6909 + function allowance(address owner, address spender, uint256 id) public view virtual override returns (uint256) { + ERC6909Storage storage $ = _getERC6909Storage(); + return $._allowances[owner][spender][id]; + } + + /// @inheritdoc IERC6909 + function isOperator(address owner, address spender) public view virtual override returns (bool) { + ERC6909Storage storage $ = _getERC6909Storage(); + return $._operatorApprovals[owner][spender]; + } + + /// @inheritdoc IERC6909 + function approve(address spender, uint256 id, uint256 amount) public virtual override returns (bool) { + _approve(_msgSender(), spender, id, amount); + return true; + } + + /// @inheritdoc IERC6909 + function setOperator(address spender, bool approved) public virtual override returns (bool) { + _setOperator(_msgSender(), spender, approved); + return true; + } + + /// @inheritdoc IERC6909 + function transfer(address receiver, uint256 id, uint256 amount) public virtual override returns (bool) { + _transfer(_msgSender(), receiver, id, amount); + return true; + } + + /// @inheritdoc IERC6909 + function transferFrom( + address sender, + address receiver, + uint256 id, + uint256 amount + ) public virtual override returns (bool) { + address caller = _msgSender(); + if (sender != caller && !isOperator(sender, caller)) { + _spendAllowance(sender, caller, id, amount); + } + _transfer(sender, receiver, id, amount); + return true; + } + + /** + * @dev Creates `amount` of token `id` and assigns them to `account`, by transferring it from address(0). + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _mint(address to, uint256 id, uint256 amount) internal { + if (to == address(0)) { + revert ERC6909InvalidReceiver(address(0)); + } + _update(address(0), to, id, amount); + } + + /** + * @dev Moves `amount` of token `id` from `from` to `to` without checking for approvals. This function verifies + * that neither the sender nor the receiver are address(0), which means it cannot mint or burn tokens. + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event. + * + * NOTE: This function is not virtual, {_update} should be overridden instead. + */ + function _transfer(address from, address to, uint256 id, uint256 amount) internal { + if (from == address(0)) { + revert ERC6909InvalidSender(address(0)); + } + if (to == address(0)) { + revert ERC6909InvalidReceiver(address(0)); + } + _update(from, to, id, amount); + } + + /** + * @dev Destroys a `amount` of token `id` from `account`. + * Relies on the `_update` mechanism. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * NOTE: This function is not virtual, {_update} should be overridden instead + */ + function _burn(address from, uint256 id, uint256 amount) internal { + if (from == address(0)) { + revert ERC6909InvalidSender(address(0)); + } + _update(from, address(0), id, amount); + } + + /** + * @dev Transfers `amount` of token `id` from `from` to `to`, or alternatively mints (or burns) if `from` + * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding + * this function. + * + * Emits a {Transfer} event. + */ + function _update(address from, address to, uint256 id, uint256 amount) internal virtual { + ERC6909Storage storage $ = _getERC6909Storage(); + address caller = _msgSender(); + + if (from != address(0)) { + uint256 fromBalance = $._balances[from][id]; + if (fromBalance < amount) { + revert ERC6909InsufficientBalance(from, fromBalance, amount, id); + } + unchecked { + // Overflow not possible: amount <= fromBalance. + $._balances[from][id] = fromBalance - amount; + } + } + if (to != address(0)) { + $._balances[to][id] += amount; + } + + emit Transfer(caller, from, to, id, amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`'s `id` tokens. + * + * This internal function is equivalent to `approve`, and can be used to e.g. set automatic allowances for certain + * subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 id, uint256 amount) internal virtual { + ERC6909Storage storage $ = _getERC6909Storage(); + if (owner == address(0)) { + revert ERC6909InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC6909InvalidSpender(address(0)); + } + $._allowances[owner][spender][id] = amount; + emit Approval(owner, spender, id, amount); + } + + /** + * @dev Approve `spender` to operate on all of `owner`'s tokens + * + * This internal function is equivalent to `setOperator`, and can be used to e.g. set automatic allowances for + * certain subsystems, etc. + * + * Emits an {OperatorSet} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _setOperator(address owner, address spender, bool approved) internal virtual { + ERC6909Storage storage $ = _getERC6909Storage(); + if (owner == address(0)) { + revert ERC6909InvalidApprover(address(0)); + } + if (spender == address(0)) { + revert ERC6909InvalidSpender(address(0)); + } + $._operatorApprovals[owner][spender] = approved; + emit OperatorSet(owner, spender, approved); + } + + /** + * @dev Updates `owner`'s allowance for `spender` based on spent `amount`. + * + * Does not update the allowance value in case of infinite allowance. + * Revert if not enough allowance is available. + * + * Does not emit an {Approval} event. + */ + function _spendAllowance(address owner, address spender, uint256 id, uint256 amount) internal virtual { + ERC6909Storage storage $ = _getERC6909Storage(); + uint256 currentAllowance = allowance(owner, spender, id); + if (currentAllowance < type(uint256).max) { + if (currentAllowance < amount) { + revert ERC6909InsufficientAllowance(spender, currentAllowance, amount, id); + } + unchecked { + $._allowances[owner][spender][id] = currentAllowance - amount; + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909ContentURIUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909ContentURIUpgradeable.sol new file mode 100644 index 00000000..eefbddbd --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909ContentURIUpgradeable.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909ContentURI.sol) + +pragma solidity ^0.8.20; + +import {ERC6909Upgradeable} from "../ERC6909Upgradeable.sol"; +import {IERC6909ContentURI} from "@openzeppelin/contracts/interfaces/IERC6909.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the Content URI extension defined in ERC6909. + */ +contract ERC6909ContentURIUpgradeable is Initializable, ERC6909Upgradeable, IERC6909ContentURI { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC6909ContentURI + struct ERC6909ContentURIStorage { + string _contractURI; + mapping(uint256 id => string) _tokenURIs; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC6909ContentURI")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC6909ContentURIStorageLocation = 0x2ada2772a8c4d40c4be8741992e423a9f97d5f4ef76852e5c17a40aa7fb9e500; + + function _getERC6909ContentURIStorage() private pure returns (ERC6909ContentURIStorage storage $) { + assembly { + $.slot := ERC6909ContentURIStorageLocation + } + } + + /// @dev Event emitted when the contract URI is changed. See https://eips.ethereum.org/EIPS/eip-7572[ERC-7572] for details. + event ContractURIUpdated(); + + /// @dev See {IERC1155-URI} + event URI(string value, uint256 indexed id); + + function __ERC6909ContentURI_init() internal onlyInitializing { + } + + function __ERC6909ContentURI_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909Upgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC6909ContentURI).interfaceId || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC6909ContentURI + function contractURI() public view virtual override returns (string memory) { + ERC6909ContentURIStorage storage $ = _getERC6909ContentURIStorage(); + return $._contractURI; + } + + /// @inheritdoc IERC6909ContentURI + function tokenURI(uint256 id) public view virtual override returns (string memory) { + ERC6909ContentURIStorage storage $ = _getERC6909ContentURIStorage(); + return $._tokenURIs[id]; + } + + /** + * @dev Sets the {contractURI} for the contract. + * + * Emits a {ContractURIUpdated} event. + */ + function _setContractURI(string memory newContractURI) internal virtual { + ERC6909ContentURIStorage storage $ = _getERC6909ContentURIStorage(); + $._contractURI = newContractURI; + + emit ContractURIUpdated(); + } + + /** + * @dev Sets the {tokenURI} for a given token of type `id`. + * + * Emits a {URI} event. + */ + function _setTokenURI(uint256 id, string memory newTokenURI) internal virtual { + ERC6909ContentURIStorage storage $ = _getERC6909ContentURIStorage(); + $._tokenURIs[id] = newTokenURI; + + emit URI(newTokenURI, id); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909MetadataUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909MetadataUpgradeable.sol new file mode 100644 index 00000000..8016ba27 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909MetadataUpgradeable.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909Metadata.sol) + +pragma solidity ^0.8.20; + +import {ERC6909Upgradeable} from "../ERC6909Upgradeable.sol"; +import {IERC6909Metadata} from "@openzeppelin/contracts/interfaces/IERC6909.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the Metadata extension defined in ERC6909. Exposes the name, symbol, and decimals of each token id. + */ +contract ERC6909MetadataUpgradeable is Initializable, ERC6909Upgradeable, IERC6909Metadata { + struct TokenMetadata { + string name; + string symbol; + uint8 decimals; + } + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC6909Metadata + struct ERC6909MetadataStorage { + mapping(uint256 id => TokenMetadata) _tokenMetadata; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC6909Metadata")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC6909MetadataStorageLocation = 0xa0651e3d105d335a33d7d04897e080112be09c416f44637d6543e5b47885f800; + + function _getERC6909MetadataStorage() private pure returns (ERC6909MetadataStorage storage $) { + assembly { + $.slot := ERC6909MetadataStorageLocation + } + } + + /// @dev The name of the token of type `id` was updated to `newName`. + event ERC6909NameUpdated(uint256 indexed id, string newName); + + /// @dev The symbol for the token of type `id` was updated to `newSymbol`. + event ERC6909SymbolUpdated(uint256 indexed id, string newSymbol); + + /// @dev The decimals value for token of type `id` was updated to `newDecimals`. + event ERC6909DecimalsUpdated(uint256 indexed id, uint8 newDecimals); + + function __ERC6909Metadata_init() internal onlyInitializing { + } + + function __ERC6909Metadata_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC6909Metadata + function name(uint256 id) public view virtual override returns (string memory) { + ERC6909MetadataStorage storage $ = _getERC6909MetadataStorage(); + return $._tokenMetadata[id].name; + } + + /// @inheritdoc IERC6909Metadata + function symbol(uint256 id) public view virtual override returns (string memory) { + ERC6909MetadataStorage storage $ = _getERC6909MetadataStorage(); + return $._tokenMetadata[id].symbol; + } + + /// @inheritdoc IERC6909Metadata + function decimals(uint256 id) public view virtual override returns (uint8) { + ERC6909MetadataStorage storage $ = _getERC6909MetadataStorage(); + return $._tokenMetadata[id].decimals; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909Upgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC6909Metadata).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Sets the `name` for a given token of type `id`. + * + * Emits an {ERC6909NameUpdated} event. + */ + function _setName(uint256 id, string memory newName) internal virtual { + ERC6909MetadataStorage storage $ = _getERC6909MetadataStorage(); + $._tokenMetadata[id].name = newName; + + emit ERC6909NameUpdated(id, newName); + } + + /** + * @dev Sets the `symbol` for a given token of type `id`. + * + * Emits an {ERC6909SymbolUpdated} event. + */ + function _setSymbol(uint256 id, string memory newSymbol) internal virtual { + ERC6909MetadataStorage storage $ = _getERC6909MetadataStorage(); + $._tokenMetadata[id].symbol = newSymbol; + + emit ERC6909SymbolUpdated(id, newSymbol); + } + + /** + * @dev Sets the `decimals` for a given token of type `id`. + * + * Emits an {ERC6909DecimalsUpdated} event. + */ + function _setDecimals(uint256 id, uint8 newDecimals) internal virtual { + ERC6909MetadataStorage storage $ = _getERC6909MetadataStorage(); + $._tokenMetadata[id].decimals = newDecimals; + + emit ERC6909DecimalsUpdated(id, newDecimals); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909TokenSupplyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909TokenSupplyUpgradeable.sol new file mode 100644 index 00000000..c5d92759 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC6909/extensions/ERC6909TokenSupplyUpgradeable.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC6909/extensions/ERC6909TokenSupply.sol) + +pragma solidity ^0.8.20; + +import {ERC6909Upgradeable} from "../ERC6909Upgradeable.sol"; +import {IERC6909TokenSupply} from "@openzeppelin/contracts/interfaces/IERC6909.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the Token Supply extension defined in ERC6909. + * Tracks the total supply of each token id individually. + */ +contract ERC6909TokenSupplyUpgradeable is Initializable, ERC6909Upgradeable, IERC6909TokenSupply { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC6909TokenSupply + struct ERC6909TokenSupplyStorage { + mapping(uint256 id => uint256) _totalSupplies; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC6909TokenSupply")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC6909TokenSupplyStorageLocation = 0x9cc5ac148333cfaf4365d2d67a9c6e8fab8e8f4df7b569f769d68102db719600; + + function _getERC6909TokenSupplyStorage() private pure returns (ERC6909TokenSupplyStorage storage $) { + assembly { + $.slot := ERC6909TokenSupplyStorageLocation + } + } + + function __ERC6909TokenSupply_init() internal onlyInitializing { + } + + function __ERC6909TokenSupply_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC6909TokenSupply + function totalSupply(uint256 id) public view virtual override returns (uint256) { + ERC6909TokenSupplyStorage storage $ = _getERC6909TokenSupplyStorage(); + return $._totalSupplies[id]; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC6909Upgradeable, IERC165) returns (bool) { + return interfaceId == type(IERC6909TokenSupply).interfaceId || super.supportsInterface(interfaceId); + } + + /// @dev Override the `_update` function to update the total supply of each token id as necessary. + function _update(address from, address to, uint256 id, uint256 amount) internal virtual override { + ERC6909TokenSupplyStorage storage $ = _getERC6909TokenSupplyStorage(); + super._update(from, to, id, amount); + + if (from == address(0)) { + $._totalSupplies[id] += amount; + } + if (to == address(0)) { + unchecked { + // amount <= _balances[from][id] <= _totalSupplies[id] + $._totalSupplies[id] -= amount; + } + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/ERC721Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/ERC721Upgradeable.sol new file mode 100644 index 00000000..76c3aff9 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/ERC721Upgradeable.sol @@ -0,0 +1,462 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/ERC721.sol) + +pragma solidity ^0.8.24; + +import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; +import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; +import {ERC721Utils} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol"; +import {ContextUpgradeable} from "../../utils/ContextUpgradeable.sol"; +import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol"; +import {IERC721Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC-721] Non-Fungible Token Standard, including + * the Metadata extension, but not including the Enumerable extension, which is available separately as + * {ERC721Enumerable}. + */ +abstract contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721, IERC721Metadata, IERC721Errors { + using Strings for uint256; + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC721 + struct ERC721Storage { + // Token name + string _name; + + // Token symbol + string _symbol; + + mapping(uint256 tokenId => address) _owners; + + mapping(address owner => uint256) _balances; + + mapping(uint256 tokenId => address) _tokenApprovals; + + mapping(address owner => mapping(address operator => bool)) _operatorApprovals; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC721")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC721StorageLocation = 0x80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300; + + function _getERC721Storage() private pure returns (ERC721Storage storage $) { + assembly { + $.slot := ERC721StorageLocation + } + } + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { + __ERC721_init_unchained(name_, symbol_); + } + + function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { + ERC721Storage storage $ = _getERC721Storage(); + $._name = name_; + $._symbol = symbol_; + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) { + return + interfaceId == type(IERC721).interfaceId || + interfaceId == type(IERC721Metadata).interfaceId || + super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC721 + function balanceOf(address owner) public view virtual returns (uint256) { + ERC721Storage storage $ = _getERC721Storage(); + if (owner == address(0)) { + revert ERC721InvalidOwner(address(0)); + } + return $._balances[owner]; + } + + /// @inheritdoc IERC721 + function ownerOf(uint256 tokenId) public view virtual returns (address) { + return _requireOwned(tokenId); + } + + /// @inheritdoc IERC721Metadata + function name() public view virtual returns (string memory) { + ERC721Storage storage $ = _getERC721Storage(); + return $._name; + } + + /// @inheritdoc IERC721Metadata + function symbol() public view virtual returns (string memory) { + ERC721Storage storage $ = _getERC721Storage(); + return $._symbol; + } + + /// @inheritdoc IERC721Metadata + function tokenURI(uint256 tokenId) public view virtual returns (string memory) { + _requireOwned(tokenId); + + string memory baseURI = _baseURI(); + return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; + } + + /** + * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each + * token will be the concatenation of the `baseURI` and the `tokenId`. Empty + * by default, can be overridden in child contracts. + */ + function _baseURI() internal view virtual returns (string memory) { + return ""; + } + + /// @inheritdoc IERC721 + function approve(address to, uint256 tokenId) public virtual { + _approve(to, tokenId, _msgSender()); + } + + /// @inheritdoc IERC721 + function getApproved(uint256 tokenId) public view virtual returns (address) { + _requireOwned(tokenId); + + return _getApproved(tokenId); + } + + /// @inheritdoc IERC721 + function setApprovalForAll(address operator, bool approved) public virtual { + _setApprovalForAll(_msgSender(), operator, approved); + } + + /// @inheritdoc IERC721 + function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { + ERC721Storage storage $ = _getERC721Storage(); + return $._operatorApprovals[owner][operator]; + } + + /// @inheritdoc IERC721 + function transferFrom(address from, address to, uint256 tokenId) public virtual { + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists + // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. + address previousOwner = _update(to, tokenId, _msgSender()); + if (previousOwner != from) { + revert ERC721IncorrectOwner(from, tokenId, previousOwner); + } + } + + /// @inheritdoc IERC721 + function safeTransferFrom(address from, address to, uint256 tokenId) public { + safeTransferFrom(from, to, tokenId, ""); + } + + /// @inheritdoc IERC721 + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { + transferFrom(from, to, tokenId); + ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); + } + + /** + * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist + * + * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the + * core ERC-721 logic MUST be matched with the use of {_increaseBalance} to keep balances + * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by + * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. + */ + function _ownerOf(uint256 tokenId) internal view virtual returns (address) { + ERC721Storage storage $ = _getERC721Storage(); + return $._owners[tokenId]; + } + + /** + * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. + */ + function _getApproved(uint256 tokenId) internal view virtual returns (address) { + ERC721Storage storage $ = _getERC721Storage(); + return $._tokenApprovals[tokenId]; + } + + /** + * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in + * particular (ignoring whether it is owned by `owner`). + * + * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this + * assumption. + */ + function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { + return + spender != address(0) && + (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); + } + + /** + * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. + * Reverts if: + * - `spender` does not have approval from `owner` for `tokenId`. + * - `spender` does not have approval to manage all of `owner`'s assets. + * + * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this + * assumption. + */ + function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { + if (!_isAuthorized(owner, spender, tokenId)) { + if (owner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } else { + revert ERC721InsufficientApproval(spender, tokenId); + } + } + } + + /** + * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. + * + * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that + * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. + * + * WARNING: Increasing an account's balance using this function tends to be paired with an override of the + * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership + * remain consistent with one another. + */ + function _increaseBalance(address account, uint128 value) internal virtual { + ERC721Storage storage $ = _getERC721Storage(); + unchecked { + $._balances[account] += value; + } + } + + /** + * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner + * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. + * + * The `auth` argument is optional. If the value passed is non 0, then this function will check that + * `auth` is either the owner of the token, or approved to operate on the token (by the owner). + * + * Emits a {Transfer} event. + * + * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. + */ + function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { + ERC721Storage storage $ = _getERC721Storage(); + address from = _ownerOf(tokenId); + + // Perform (optional) operator check + if (auth != address(0)) { + _checkAuthorized(from, auth, tokenId); + } + + // Execute the update + if (from != address(0)) { + // Clear approval. No need to re-authorize or emit the Approval event + _approve(address(0), tokenId, address(0), false); + + unchecked { + $._balances[from] -= 1; + } + } + + if (to != address(0)) { + unchecked { + $._balances[to] += 1; + } + } + + $._owners[tokenId] = to; + + emit Transfer(from, to, tokenId); + + return from; + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal { + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + address previousOwner = _update(to, tokenId, address(0)); + if (previousOwner != address(0)) { + revert ERC721InvalidSender(address(0)); + } + } + + /** + * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. + * + * Requirements: + * + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { + _mint(to, tokenId); + ERC721Utils.checkOnERC721Received(_msgSender(), address(0), to, tokenId, data); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * This is an internal function that does not check if the sender is authorized to operate on the token. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal { + address previousOwner = _update(address(0), tokenId, address(0)); + if (previousOwner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal { + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + address previousOwner = _update(to, tokenId, address(0)); + if (previousOwner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } else if (previousOwner != from) { + revert ERC721IncorrectOwner(from, tokenId, previousOwner); + } + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients + * are aware of the ERC-721 standard to prevent tokens from being forever locked. + * + * `data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is like {safeTransferFrom} in the sense that it invokes + * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `tokenId` token must exist and be owned by `from`. + * - `to` cannot be the zero address. + * - `from` cannot be the zero address. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId) internal { + _safeTransfer(from, to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { + _transfer(from, to, tokenId); + ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is + * either the owner of the token, or approved to operate on all tokens held by this owner. + * + * Emits an {Approval} event. + * + * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. + */ + function _approve(address to, uint256 tokenId, address auth) internal { + _approve(to, tokenId, auth, true); + } + + /** + * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not + * emitted in the context of transfers. + */ + function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { + ERC721Storage storage $ = _getERC721Storage(); + // Avoid reading the owner unless necessary + if (emitEvent || auth != address(0)) { + address owner = _requireOwned(tokenId); + + // We do not use _isAuthorized because single-token approvals should not be able to call approve + if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { + revert ERC721InvalidApprover(auth); + } + + if (emitEvent) { + emit Approval(owner, to, tokenId); + } + } + + $._tokenApprovals[tokenId] = to; + } + + /** + * @dev Approve `operator` to operate on all of `owner` tokens + * + * Requirements: + * - operator can't be the address zero. + * + * Emits an {ApprovalForAll} event. + */ + function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { + ERC721Storage storage $ = _getERC721Storage(); + if (owner == address(0)) { + revert ERC721InvalidApprover(address(0)); + } + if (operator == address(0)) { + revert ERC721InvalidOperator(operator); + } + $._operatorApprovals[owner][operator] = approved; + emit ApprovalForAll(owner, operator, approved); + } + + /** + * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). + * Returns the owner. + * + * Overrides to ownership logic should be done to {_ownerOf}. + */ + function _requireOwned(uint256 tokenId) internal view returns (address) { + address owner = _ownerOf(tokenId); + if (owner == address(0)) { + revert ERC721NonexistentToken(tokenId); + } + return owner; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721BurnableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721BurnableUpgradeable.sol new file mode 100644 index 00000000..0b1de20f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721BurnableUpgradeable.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Burnable.sol) + +pragma solidity ^0.8.24; + +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {ContextUpgradeable} from "../../../utils/ContextUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @title ERC-721 Burnable Token + * @dev ERC-721 Token that can be burned (destroyed). + */ +abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { + function __ERC721Burnable_init() internal onlyInitializing { + } + + function __ERC721Burnable_init_unchained() internal onlyInitializing { + } + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists + // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. + _update(address(0), tokenId, _msgSender()); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol new file mode 100644 index 00000000..c6ec6789 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721ConsecutiveUpgradeable.sol @@ -0,0 +1,198 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Consecutive.sol) + +pragma solidity ^0.8.24; + +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {IERC2309} from "@openzeppelin/contracts/interfaces/IERC2309.sol"; +import {BitMaps} from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; +import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the ERC-2309 "Consecutive Transfer Extension" as defined in + * https://eips.ethereum.org/EIPS/eip-2309[ERC-2309]. + * + * This extension allows the minting of large batches of tokens, during contract construction only. For upgradeable + * contracts this implies that batch minting is only available during proxy deployment, and not in subsequent upgrades. + * These batches are limited to 5000 tokens at a time by default to accommodate off-chain indexers. + * + * Using this extension removes the ability to mint single tokens during contract construction. This ability is + * regained after construction. During construction, only batch minting is allowed. + * + * IMPORTANT: This extension does not call the {_update} function for tokens minted in batch. Any logic added to this + * function through overrides will not be triggered when tokens are minted in batch. You may want to also override + * {_increaseBalance} or {_mintConsecutive} to account for these mints. + * + * IMPORTANT: When overriding {_mintConsecutive}, be careful about call ordering. {ownerOf} may return invalid + * values during the {_mintConsecutive} execution if the super call is not called first. To be safe, execute the + * super call before your custom logic. + */ +abstract contract ERC721ConsecutiveUpgradeable is Initializable, IERC2309, ERC721Upgradeable { + using BitMaps for BitMaps.BitMap; + using Checkpoints for Checkpoints.Trace160; + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC721Consecutive + struct ERC721ConsecutiveStorage { + Checkpoints.Trace160 _sequentialOwnership; + BitMaps.BitMap _sequentialBurn; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC721Consecutive")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC721ConsecutiveStorageLocation = 0x24de1071a22e1e6f709b09cc0dadb696f919b85b456665cd36195df4bc89ff00; + + function _getERC721ConsecutiveStorage() private pure returns (ERC721ConsecutiveStorage storage $) { + assembly { + $.slot := ERC721ConsecutiveStorageLocation + } + } + + /** + * @dev Batch mint is restricted to the constructor. + * Any batch mint not emitting the {IERC721-Transfer} event outside of the constructor + * is non ERC-721 compliant. + */ + error ERC721ForbiddenBatchMint(); + + /** + * @dev Exceeds the max amount of mints per batch. + */ + error ERC721ExceededMaxBatchMint(uint256 batchSize, uint256 maxBatch); + + /** + * @dev Individual minting is not allowed. + */ + error ERC721ForbiddenMint(); + + /** + * @dev Batch burn is not supported. + */ + error ERC721ForbiddenBatchBurn(); + + function __ERC721Consecutive_init() internal onlyInitializing { + } + + function __ERC721Consecutive_init_unchained() internal onlyInitializing { + } + /** + * @dev Maximum size of a batch of consecutive tokens. This is designed to limit stress on off-chain indexing + * services that have to record one entry per token, and have protections against "unreasonably large" batches of + * tokens. + * + * NOTE: Overriding the default value of 5000 will not cause on-chain issues, but may result in the asset not being + * correctly supported by off-chain indexing services (including marketplaces). + */ + function _maxBatchSize() internal view virtual returns (uint96) { + return 5000; + } + + /** + * @dev See {ERC721-_ownerOf}. Override that checks the sequential ownership structure for tokens that have + * been minted as part of a batch, and not yet transferred. + */ + function _ownerOf(uint256 tokenId) internal view virtual override returns (address) { + ERC721ConsecutiveStorage storage $ = _getERC721ConsecutiveStorage(); + address owner = super._ownerOf(tokenId); + + // If token is owned by the core, or beyond consecutive range, return base value + if (owner != address(0) || tokenId > type(uint96).max || tokenId < _firstConsecutiveId()) { + return owner; + } + + // Otherwise, check the token was not burned, and fetch ownership from the anchors + // Note: no need for safe cast, we know that tokenId <= type(uint96).max + return $._sequentialBurn.get(tokenId) ? address(0) : address($._sequentialOwnership.lowerLookup(uint96(tokenId))); + } + + /** + * @dev Mint a batch of tokens of length `batchSize` for `to`. Returns the token id of the first token minted in the + * batch; if `batchSize` is 0, returns the number of consecutive ids minted so far. + * + * Requirements: + * + * - `batchSize` must not be greater than {_maxBatchSize}. + * - The function is called in the constructor of the contract (directly or indirectly). + * + * CAUTION: Does not emit a `Transfer` event. This is ERC-721 compliant as long as it is done inside of the + * constructor, which is enforced by this function. + * + * CAUTION: Does not invoke `onERC721Received` on the receiver. + * + * Emits a {IERC2309-ConsecutiveTransfer} event. + */ + function _mintConsecutive(address to, uint96 batchSize) internal virtual returns (uint96) { + ERC721ConsecutiveStorage storage $ = _getERC721ConsecutiveStorage(); + uint96 next = _nextConsecutiveId(); + + // minting a batch of size 0 is a no-op + if (batchSize > 0) { + if (address(this).code.length > 0) { + revert ERC721ForbiddenBatchMint(); + } + if (to == address(0)) { + revert ERC721InvalidReceiver(address(0)); + } + + uint256 maxBatchSize = _maxBatchSize(); + if (batchSize > maxBatchSize) { + revert ERC721ExceededMaxBatchMint(batchSize, maxBatchSize); + } + + // push an ownership checkpoint & emit event + uint96 last = next + batchSize - 1; + $._sequentialOwnership.push(last, uint160(to)); + + // The invariant required by this function is preserved because the new sequentialOwnership checkpoint + // is attributing ownership of `batchSize` new tokens to account `to`. + _increaseBalance(to, batchSize); + + emit ConsecutiveTransfer(next, last, address(0), to); + } + + return next; + } + + /** + * @dev See {ERC721-_update}. Override version that restricts normal minting to after construction. + * + * WARNING: Using {ERC721Consecutive} prevents minting during construction in favor of {_mintConsecutive}. + * After construction, {_mintConsecutive} is no longer available and minting through {_update} becomes available. + */ + function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { + ERC721ConsecutiveStorage storage $ = _getERC721ConsecutiveStorage(); + address previousOwner = super._update(to, tokenId, auth); + + // only mint after construction + if (previousOwner == address(0) && address(this).code.length == 0) { + revert ERC721ForbiddenMint(); + } + + // record burn + if ( + to == address(0) && // if we burn + tokenId < _nextConsecutiveId() && // and the tokenId was minted in a batch + !$._sequentialBurn.get(tokenId) // and the token was never marked as burnt + ) { + $._sequentialBurn.set(tokenId); + } + + return previousOwner; + } + + /** + * @dev Used to offset the first token id in `_nextConsecutiveId` + */ + function _firstConsecutiveId() internal view virtual returns (uint96) { + return 0; + } + + /** + * @dev Returns the next tokenId to mint using {_mintConsecutive}. It will return {_firstConsecutiveId} + * if no consecutive tokenId has been minted before. + */ + function _nextConsecutiveId() private view returns (uint96) { + ERC721ConsecutiveStorage storage $ = _getERC721ConsecutiveStorage(); + (bool exists, uint96 latestId, ) = $._sequentialOwnership.latestCheckpoint(); + return exists ? latestId + 1 : _firstConsecutiveId(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol new file mode 100644 index 00000000..51a015da --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/extensions/ERC721Enumerable.sol) + +pragma solidity ^0.8.24; + +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {IERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev This implements an optional extension of {ERC721} defined in the ERC that adds enumerability + * of all the token ids in the contract as well as all token ids owned by each account. + * + * CAUTION: {ERC721} extensions that implement custom `balanceOf` logic, such as {ERC721Consecutive}, + * interfere with enumerability and should not be used together with {ERC721Enumerable}. + */ +abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721Enumerable { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC721Enumerable + struct ERC721EnumerableStorage { + mapping(address owner => mapping(uint256 index => uint256)) _ownedTokens; + mapping(uint256 tokenId => uint256) _ownedTokensIndex; + + uint256[] _allTokens; + mapping(uint256 tokenId => uint256) _allTokensIndex; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC721Enumerable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC721EnumerableStorageLocation = 0x645e039705490088daad89bae25049a34f4a9072d398537b1ab2425f24cbed00; + + function _getERC721EnumerableStorage() private pure returns (ERC721EnumerableStorage storage $) { + assembly { + $.slot := ERC721EnumerableStorageLocation + } + } + + /** + * @dev An `owner`'s token query was out of bounds for `index`. + * + * NOTE: The owner being `address(0)` indicates a global out of bounds index. + */ + error ERC721OutOfBoundsIndex(address owner, uint256 index); + + /** + * @dev Batch mint is not allowed. + */ + error ERC721EnumerableForbiddenBatchMint(); + + function __ERC721Enumerable_init() internal onlyInitializing { + } + + function __ERC721Enumerable_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721Upgradeable) returns (bool) { + return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC721Enumerable + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256) { + ERC721EnumerableStorage storage $ = _getERC721EnumerableStorage(); + if (index >= balanceOf(owner)) { + revert ERC721OutOfBoundsIndex(owner, index); + } + return $._ownedTokens[owner][index]; + } + + /// @inheritdoc IERC721Enumerable + function totalSupply() public view virtual returns (uint256) { + ERC721EnumerableStorage storage $ = _getERC721EnumerableStorage(); + return $._allTokens.length; + } + + /// @inheritdoc IERC721Enumerable + function tokenByIndex(uint256 index) public view virtual returns (uint256) { + ERC721EnumerableStorage storage $ = _getERC721EnumerableStorage(); + if (index >= totalSupply()) { + revert ERC721OutOfBoundsIndex(address(0), index); + } + return $._allTokens[index]; + } + + /// @inheritdoc ERC721Upgradeable + function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { + address previousOwner = super._update(to, tokenId, auth); + + if (previousOwner == address(0)) { + _addTokenToAllTokensEnumeration(tokenId); + } else if (previousOwner != to) { + _removeTokenFromOwnerEnumeration(previousOwner, tokenId); + } + if (to == address(0)) { + _removeTokenFromAllTokensEnumeration(tokenId); + } else if (previousOwner != to) { + _addTokenToOwnerEnumeration(to, tokenId); + } + + return previousOwner; + } + + /** + * @dev Private function to add a token to this extension's ownership-tracking data structures. + * @param to address representing the new owner of the given token ID + * @param tokenId uint256 ID of the token to be added to the tokens list of the given address + */ + function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { + ERC721EnumerableStorage storage $ = _getERC721EnumerableStorage(); + uint256 length = balanceOf(to) - 1; + $._ownedTokens[to][length] = tokenId; + $._ownedTokensIndex[tokenId] = length; + } + + /** + * @dev Private function to add a token to this extension's token tracking data structures. + * @param tokenId uint256 ID of the token to be added to the tokens list + */ + function _addTokenToAllTokensEnumeration(uint256 tokenId) private { + ERC721EnumerableStorage storage $ = _getERC721EnumerableStorage(); + $._allTokensIndex[tokenId] = $._allTokens.length; + $._allTokens.push(tokenId); + } + + /** + * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that + * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for + * gas optimizations e.g. when performing a transfer operation (avoiding double writes). + * This has O(1) time complexity, but alters the order of the _ownedTokens array. + * @param from address representing the previous owner of the given token ID + * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address + */ + function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { + ERC721EnumerableStorage storage $ = _getERC721EnumerableStorage(); + // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = balanceOf(from); + uint256 tokenIndex = $._ownedTokensIndex[tokenId]; + + mapping(uint256 index => uint256) storage _ownedTokensByOwner = $._ownedTokens[from]; + + // When the token to delete is the last token, the swap operation is unnecessary + if (tokenIndex != lastTokenIndex) { + uint256 lastTokenId = _ownedTokensByOwner[lastTokenIndex]; + + _ownedTokensByOwner[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + $._ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + } + + // This also deletes the contents at the last position of the array + delete $._ownedTokensIndex[tokenId]; + delete _ownedTokensByOwner[lastTokenIndex]; + } + + /** + * @dev Private function to remove a token from this extension's token tracking data structures. + * This has O(1) time complexity, but alters the order of the _allTokens array. + * @param tokenId uint256 ID of the token to be removed from the tokens list + */ + function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { + ERC721EnumerableStorage storage $ = _getERC721EnumerableStorage(); + // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = $._allTokens.length - 1; + uint256 tokenIndex = $._allTokensIndex[tokenId]; + + // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so + // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding + // an 'if' statement (like in _removeTokenFromOwnerEnumeration) + uint256 lastTokenId = $._allTokens[lastTokenIndex]; + + $._allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + $._allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + + // This also deletes the contents at the last position of the array + delete $._allTokensIndex[tokenId]; + $._allTokens.pop(); + } + + /** + * See {ERC721-_increaseBalance}. We need to forbid batch minting because the enumeration + * extension does not support it. + */ + function _increaseBalance(address account, uint128 amount) internal virtual override { + if (amount > 0) { + revert ERC721EnumerableForbiddenBatchMint(); + } + super._increaseBalance(account, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721PausableUpgradeable.sol new file mode 100644 index 00000000..72981fe0 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721PausableUpgradeable.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Pausable.sol) + +pragma solidity ^0.8.24; + +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {PausableUpgradeable} from "../../../utils/PausableUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev ERC-721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + * + * IMPORTANT: This contract does not include public pause and unpause functions. In + * addition to inheriting this contract, you must define both functions, invoking the + * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate + * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will + * make the contract pause mechanism of the contract unreachable, and thus unusable. + */ +abstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable { + function __ERC721Pausable_init() internal onlyInitializing { + } + + function __ERC721Pausable_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC721-_update}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _update( + address to, + uint256 tokenId, + address auth + ) internal virtual override whenNotPaused returns (address) { + return super._update(to, tokenId, auth); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol new file mode 100644 index 00000000..7c0d9d1c --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Royalty.sol) + +pragma solidity ^0.8.24; + +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {ERC2981Upgradeable} from "../../common/ERC2981Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC-721 with the ERC-2981 NFT Royalty Standard, a standardized way to retrieve royalty payment + * information. + * + * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually + * for specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. + * + * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to + * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. + */ +abstract contract ERC721RoyaltyUpgradeable is Initializable, ERC2981Upgradeable, ERC721Upgradeable { + function __ERC721Royalty_init() internal onlyInitializing { + } + + function __ERC721Royalty_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, ERC2981Upgradeable) returns (bool) { + return super.supportsInterface(interfaceId); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol new file mode 100644 index 00000000..21bacf19 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (token/ERC721/extensions/ERC721URIStorage.sol) + +pragma solidity ^0.8.24; + +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; +import {IERC4906} from "@openzeppelin/contracts/interfaces/IERC4906.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev ERC-721 token with storage based token URI management. + */ +abstract contract ERC721URIStorageUpgradeable is Initializable, IERC4906, ERC721Upgradeable { + // Interface ID as defined in ERC-4906. This does not correspond to a traditional interface ID as ERC-4906 only + // defines events and does not include any external function. + bytes4 private constant ERC4906_INTERFACE_ID = bytes4(0x49064906); + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC721URIStorage + struct ERC721URIStorageStorage { + // Optional mapping for token URIs + mapping(uint256 tokenId => string) _tokenURIs; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC721URIStorage")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC721URIStorageStorageLocation = 0x0542a41881ee128a365a727b282c86fa859579490b9bb45aab8503648c8e7900; + + function _getERC721URIStorageStorage() private pure returns (ERC721URIStorageStorage storage $) { + assembly { + $.slot := ERC721URIStorageStorageLocation + } + } + + function __ERC721URIStorage_init() internal onlyInitializing { + } + + function __ERC721URIStorage_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, IERC165) returns (bool) { + return interfaceId == ERC4906_INTERFACE_ID || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC721Metadata + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + _requireOwned(tokenId); + + string memory base = _baseURI(); + string memory suffix = _suffixURI(tokenId); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return suffix; + } + // If both are set, concatenate the baseURI and tokenURI (via string.concat). + if (bytes(suffix).length > 0) { + return string.concat(base, suffix); + } + + return super.tokenURI(tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Emits {IERC4906-MetadataUpdate}. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + ERC721URIStorageStorage storage $ = _getERC721URIStorageStorage(); + $._tokenURIs[tokenId] = _tokenURI; + emit MetadataUpdate(tokenId); + } + + /** + * @dev Returns the suffix part of the tokenURI for `tokenId`. + */ + function _suffixURI(uint256 tokenId) internal view virtual returns (string memory) { + ERC721URIStorageStorage storage $ = _getERC721URIStorageStorage(); + return $._tokenURIs[tokenId]; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721VotesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721VotesUpgradeable.sol new file mode 100644 index 00000000..862f238f --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721VotesUpgradeable.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Votes.sol) + +pragma solidity ^0.8.24; + +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {VotesUpgradeable} from "../../../governance/utils/VotesUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of ERC-721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts + * as 1 vote unit. + * + * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost + * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of + * the votes in governance decisions, or they can delegate to themselves to be their own representative. + */ +abstract contract ERC721VotesUpgradeable is Initializable, ERC721Upgradeable, VotesUpgradeable { + function __ERC721Votes_init() internal onlyInitializing { + } + + function __ERC721Votes_init_unchained() internal onlyInitializing { + } + /** + * @dev See {ERC721-_update}. Adjusts votes when tokens are transferred. + * + * Emits a {IVotes-DelegateVotesChanged} event. + */ + function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { + address previousOwner = super._update(to, tokenId, auth); + + _transferVotingUnits(previousOwner, to, 1); + + return previousOwner; + } + + /** + * @dev Returns the balance of `account`. + * + * WARNING: Overriding this function will likely result in incorrect vote tracking. + */ + function _getVotingUnits(address account) internal view virtual override returns (uint256) { + return balanceOf(account); + } + + /** + * @dev See {ERC721-_increaseBalance}. We need that to account tokens that were minted in batch. + */ + function _increaseBalance(address account, uint128 amount) internal virtual override { + super._increaseBalance(account, amount); + _transferVotingUnits(address(0), account, amount); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721WrapperUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721WrapperUpgradeable.sol new file mode 100644 index 00000000..50697ca1 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/ERC721/extensions/ERC721WrapperUpgradeable.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC721/extensions/ERC721Wrapper.sol) + +pragma solidity ^0.8.24; + +import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; +import {ERC721Upgradeable} from "../ERC721Upgradeable.sol"; +import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of the ERC-721 token contract to support token wrapping. + * + * Users can deposit and withdraw an "underlying token" and receive a "wrapped token" with a matching tokenId. This is + * useful in conjunction with other modules. For example, combining this wrapping mechanism with {ERC721Votes} will allow + * the wrapping of an existing "basic" ERC-721 into a governance token. + */ +abstract contract ERC721WrapperUpgradeable is Initializable, ERC721Upgradeable, IERC721Receiver { + /// @custom:storage-location erc7201:openzeppelin.storage.ERC721Wrapper + struct ERC721WrapperStorage { + IERC721 _underlying; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC721Wrapper")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC721WrapperStorageLocation = 0xa27ade666fc2e768f0cfbad659dfd6a7039cae52f9274d2ab808f70dce364400; + + function _getERC721WrapperStorage() private pure returns (ERC721WrapperStorage storage $) { + assembly { + $.slot := ERC721WrapperStorageLocation + } + } + + /** + * @dev The received ERC-721 token couldn't be wrapped. + */ + error ERC721UnsupportedToken(address token); + + function __ERC721Wrapper_init(IERC721 underlyingToken) internal onlyInitializing { + __ERC721Wrapper_init_unchained(underlyingToken); + } + + function __ERC721Wrapper_init_unchained(IERC721 underlyingToken) internal onlyInitializing { + ERC721WrapperStorage storage $ = _getERC721WrapperStorage(); + $._underlying = underlyingToken; + } + + /** + * @dev Allow a user to deposit underlying tokens and mint the corresponding tokenIds. + */ + function depositFor(address account, uint256[] memory tokenIds) public virtual returns (bool) { + uint256 length = tokenIds.length; + for (uint256 i = 0; i < length; ++i) { + uint256 tokenId = tokenIds[i]; + + // This is an "unsafe" transfer that doesn't call any hook on the receiver. With underlying() being trusted + // (by design of this contract) and no other contracts expected to be called from there, we are safe. + // slither-disable-next-line reentrancy-no-eth + underlying().transferFrom(_msgSender(), address(this), tokenId); // forge-lint: disable-line(erc20-unchecked-transfer) + _safeMint(account, tokenId); + } + + return true; + } + + /** + * @dev Allow a user to burn wrapped tokens and withdraw the corresponding tokenIds of the underlying tokens. + */ + function withdrawTo(address account, uint256[] memory tokenIds) public virtual returns (bool) { + uint256 length = tokenIds.length; + for (uint256 i = 0; i < length; ++i) { + uint256 tokenId = tokenIds[i]; + // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists + // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. + _update(address(0), tokenId, _msgSender()); + // Checks were already performed at this point, and there's no way to retake ownership or approval from + // the wrapped tokenId after this point, so it's safe to remove the reentrancy check for the next line. + // slither-disable-next-line reentrancy-no-eth + underlying().safeTransferFrom(address(this), account, tokenId); + } + + return true; + } + + /** + * @dev Overrides {IERC721Receiver-onERC721Received} to allow minting on direct ERC-721 transfers to + * this contract. + * + * In case there's data attached, it validates that the operator is this contract, so only trusted data + * is accepted from {depositFor}. + * + * WARNING: Doesn't work with unsafe transfers (eg. {IERC721-transferFrom}). Use {ERC721Wrapper-_recover} + * for recovering in that scenario. + */ + function onERC721Received(address, address from, uint256 tokenId, bytes memory) public virtual returns (bytes4) { + if (address(underlying()) != _msgSender()) { + revert ERC721UnsupportedToken(_msgSender()); + } + _safeMint(from, tokenId); + return IERC721Receiver.onERC721Received.selector; + } + + /** + * @dev Mint a wrapped token to cover any underlyingToken that would have been transferred by mistake. Internal + * function that can be exposed with access control if desired. + */ + function _recover(address account, uint256 tokenId) internal virtual returns (uint256) { + address owner = underlying().ownerOf(tokenId); + if (owner != address(this)) { + revert ERC721IncorrectOwner(address(this), tokenId, owner); + } + _safeMint(account, tokenId); + return tokenId; + } + + /** + * @dev Returns the underlying token. + */ + function underlying() public view virtual returns (IERC721) { + ERC721WrapperStorage storage $ = _getERC721WrapperStorage(); + return $._underlying; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/common/ERC2981Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/common/ERC2981Upgradeable.sol new file mode 100644 index 00000000..f3aed898 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/token/common/ERC2981Upgradeable.sol @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (token/common/ERC2981.sol) + +pragma solidity ^0.8.20; + +import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. + * + * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for + * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. + * + * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the + * fee is specified in basis points by default. + * + * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See + * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to + * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. + */ +abstract contract ERC2981Upgradeable is Initializable, IERC2981, ERC165Upgradeable { + struct RoyaltyInfo { + address receiver; + uint96 royaltyFraction; + } + + /// @custom:storage-location erc7201:openzeppelin.storage.ERC2981 + struct ERC2981Storage { + RoyaltyInfo _defaultRoyaltyInfo; + mapping(uint256 tokenId => RoyaltyInfo) _tokenRoyaltyInfo; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC2981")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant ERC2981StorageLocation = 0xdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00; + + function _getERC2981Storage() private pure returns (ERC2981Storage storage $) { + assembly { + $.slot := ERC2981StorageLocation + } + } + + /** + * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1). + */ + error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator); + + /** + * @dev The default royalty receiver is invalid. + */ + error ERC2981InvalidDefaultRoyaltyReceiver(address receiver); + + /** + * @dev The royalty set for a specific `tokenId` is invalid (eg. (numerator / denominator) >= 1). + */ + error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator); + + /** + * @dev The royalty receiver for `tokenId` is invalid. + */ + error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver); + + function __ERC2981_init() internal onlyInitializing { + } + + function __ERC2981_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165Upgradeable) returns (bool) { + return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); + } + + /// @inheritdoc IERC2981 + function royaltyInfo( + uint256 tokenId, + uint256 salePrice + ) public view virtual returns (address receiver, uint256 amount) { + ERC2981Storage storage $ = _getERC2981Storage(); + RoyaltyInfo storage _royaltyInfo = $._tokenRoyaltyInfo[tokenId]; + address royaltyReceiver = _royaltyInfo.receiver; + uint96 royaltyFraction = _royaltyInfo.royaltyFraction; + + if (royaltyReceiver == address(0)) { + royaltyReceiver = $._defaultRoyaltyInfo.receiver; + royaltyFraction = $._defaultRoyaltyInfo.royaltyFraction; + } + + uint256 royaltyAmount = (salePrice * royaltyFraction) / _feeDenominator(); + + return (royaltyReceiver, royaltyAmount); + } + + /** + * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a + * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an + * override. + */ + function _feeDenominator() internal pure virtual returns (uint96) { + return 10000; + } + + /** + * @dev Sets the royalty information that all ids in this contract will default to. + * + * Requirements: + * + * - `receiver` cannot be the zero address. + * - `feeNumerator` cannot be greater than the fee denominator. + */ + function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { + ERC2981Storage storage $ = _getERC2981Storage(); + uint256 denominator = _feeDenominator(); + if (feeNumerator > denominator) { + // Royalty fee will exceed the sale price + revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator); + } + if (receiver == address(0)) { + revert ERC2981InvalidDefaultRoyaltyReceiver(address(0)); + } + + $._defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); + } + + /** + * @dev Removes default royalty information. + */ + function _deleteDefaultRoyalty() internal virtual { + ERC2981Storage storage $ = _getERC2981Storage(); + delete $._defaultRoyaltyInfo; + } + + /** + * @dev Sets the royalty information for a specific token id, overriding the global default. + * + * Requirements: + * + * - `receiver` cannot be the zero address. + * - `feeNumerator` cannot be greater than the fee denominator. + */ + function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { + ERC2981Storage storage $ = _getERC2981Storage(); + uint256 denominator = _feeDenominator(); + if (feeNumerator > denominator) { + // Royalty fee will exceed the sale price + revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator); + } + if (receiver == address(0)) { + revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0)); + } + + $._tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); + } + + /** + * @dev Resets royalty information for the token id back to the global default. + */ + function _resetTokenRoyalty(uint256 tokenId) internal virtual { + ERC2981Storage storage $ = _getERC2981Storage(); + delete $._tokenRoyaltyInfo[tokenId]; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ContextUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/ContextUpgradeable.sol similarity index 70% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ContextUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/ContextUpgradeable.sol index 91ea6fb1..d6a4a1f4 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/ContextUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/ContextUpgradeable.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) +// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) -pragma solidity ^0.8.0; -import {Initializable} from "../proxy/utils/Initializable.sol"; +pragma solidity ^0.8.20; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the @@ -31,11 +31,4 @@ abstract contract ContextUpgradeable is Initializable { function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/MulticallUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/MulticallUpgradeable.sol similarity index 62% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/MulticallUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/MulticallUpgradeable.sol index 0f69f3b5..dbdf3fb3 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/MulticallUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/MulticallUpgradeable.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.5) (utils/Multicall.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (utils/Multicall.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "./AddressUpgradeable.sol"; -import "./ContextUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; +import {Address} from "@openzeppelin/contracts/utils/Address.sol"; +import {ContextUpgradeable} from "./ContextUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. @@ -14,12 +14,10 @@ import {Initializable} from "../proxy/utils/Initializable.sol"; * careful about sending transactions invoking {multicall}. For example, a relay address that filters function * selectors won't filter calls nested within a {multicall} operation. * - * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {_msgSender}). + * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {Context-_msgSender}). * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data` * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of - * {_msgSender} are not propagated to subcalls. - * - * _Available since v4.1._ + * {Context-_msgSender} are not propagated to subcalls. */ abstract contract MulticallUpgradeable is Initializable, ContextUpgradeable { function __Multicall_init() internal onlyInitializing { @@ -31,22 +29,15 @@ abstract contract MulticallUpgradeable is Initializable, ContextUpgradeable { * @dev Receives and executes a batch of function calls on this contract. * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ - function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) { + function multicall(bytes[] calldata data) public virtual returns (bytes[] memory results) { bytes memory context = msg.sender == _msgSender() ? new bytes(0) : msg.data[msg.data.length - _contextSuffixLength():]; results = new bytes[](data.length); for (uint256 i = 0; i < data.length; i++) { - results[i] = AddressUpgradeable.functionDelegateCall(address(this), bytes.concat(data[i], context)); + results[i] = Address.functionDelegateCall(address(this), bytes.concat(data[i], context)); } return results; } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[50] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesKeyedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesKeyedUpgradeable.sol new file mode 100644 index 00000000..6181c0b3 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesKeyedUpgradeable.sol @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.2.0) (utils/NoncesKeyed.sol) +pragma solidity ^0.8.20; + +import {NoncesUpgradeable} from "./NoncesUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Alternative to {Nonces}, that supports key-ed nonces. + * + * Follows the https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support[ERC-4337's semi-abstracted nonce system]. + * + * NOTE: This contract inherits from {Nonces} and reuses its storage for the first nonce key (i.e. `0`). This + * makes upgrading from {Nonces} to {NoncesKeyed} safe when using their upgradeable versions (e.g. `NoncesKeyedUpgradeable`). + * Doing so will NOT reset the current state of nonces, avoiding replay attacks where a nonce is reused after the upgrade. + */ +abstract contract NoncesKeyedUpgradeable is Initializable, NoncesUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.NoncesKeyed + struct NoncesKeyedStorage { + mapping(address owner => mapping(uint192 key => uint64)) _nonces; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.NoncesKeyed")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant NoncesKeyedStorageLocation = 0x06e302b11020b9cca26edb75da0d4c952e2c49f7ac00d8954230e81bd5769c00; + + function _getNoncesKeyedStorage() private pure returns (NoncesKeyedStorage storage $) { + assembly { + $.slot := NoncesKeyedStorageLocation + } + } + + function __NoncesKeyed_init() internal onlyInitializing { + } + + function __NoncesKeyed_init_unchained() internal onlyInitializing { + } + /// @dev Returns the next unused nonce for an address and key. Result contains the key prefix. + function nonces(address owner, uint192 key) public view virtual returns (uint256) { + NoncesKeyedStorage storage $ = _getNoncesKeyedStorage(); + return key == 0 ? nonces(owner) : _pack(key, $._nonces[owner][key]); + } + + /** + * @dev Consumes the next unused nonce for an address and key. + * + * Returns the current value without the key prefix. Consumed nonce is increased, so calling this function twice + * with the same arguments will return different (sequential) results. + */ + function _useNonce(address owner, uint192 key) internal virtual returns (uint256) { + NoncesKeyedStorage storage $ = _getNoncesKeyedStorage(); + // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be + // decremented or reset. This guarantees that the nonce never overflows. + unchecked { + // It is important to do x++ and not ++x here. + return key == 0 ? _useNonce(owner) : _pack(key, $._nonces[owner][key]++); + } + } + + /** + * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. + * + * This version takes the key and the nonce in a single uint256 parameter: + * - use the first 24 bytes for the key + * - use the last 8 bytes for the nonce + */ + function _useCheckedNonce(address owner, uint256 keyNonce) internal virtual override { + (uint192 key, ) = _unpack(keyNonce); + if (key == 0) { + super._useCheckedNonce(owner, keyNonce); + } else { + uint256 current = _useNonce(owner, key); + if (keyNonce != current) revert InvalidAccountNonce(owner, current); + } + } + + /** + * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. + * + * This version takes the key and the nonce as two different parameters. + */ + function _useCheckedNonce(address owner, uint192 key, uint64 nonce) internal virtual { + _useCheckedNonce(owner, _pack(key, nonce)); + } + + /// @dev Pack key and nonce into a keyNonce + function _pack(uint192 key, uint64 nonce) private pure returns (uint256) { + return (uint256(key) << 64) | nonce; + } + + /// @dev Unpack a keyNonce into its key and nonce components + function _unpack(uint256 keyNonce) private pure returns (uint192 key, uint64 nonce) { + return (uint192(keyNonce >> 64), uint64(keyNonce)); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesUpgradeable.sol new file mode 100644 index 00000000..a2924a66 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/NoncesUpgradeable.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol) +pragma solidity ^0.8.20; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Provides tracking nonces for addresses. Nonces will only increment. + */ +abstract contract NoncesUpgradeable is Initializable { + /** + * @dev The nonce used for an `account` is not the expected current nonce. + */ + error InvalidAccountNonce(address account, uint256 currentNonce); + + /// @custom:storage-location erc7201:openzeppelin.storage.Nonces + struct NoncesStorage { + mapping(address account => uint256) _nonces; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Nonces")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant NoncesStorageLocation = 0x5ab42ced628888259c08ac98db1eb0cf702fc1501344311d8b100cd1bfe4bb00; + + function _getNoncesStorage() private pure returns (NoncesStorage storage $) { + assembly { + $.slot := NoncesStorageLocation + } + } + + function __Nonces_init() internal onlyInitializing { + } + + function __Nonces_init_unchained() internal onlyInitializing { + } + /** + * @dev Returns the next unused nonce for an address. + */ + function nonces(address owner) public view virtual returns (uint256) { + NoncesStorage storage $ = _getNoncesStorage(); + return $._nonces[owner]; + } + + /** + * @dev Consumes a nonce. + * + * Returns the current value and increments nonce. + */ + function _useNonce(address owner) internal virtual returns (uint256) { + NoncesStorage storage $ = _getNoncesStorage(); + // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be + // decremented or reset. This guarantees that the nonce never overflows. + unchecked { + // It is important to do x++ and not ++x here. + return $._nonces[owner]++; + } + } + + /** + * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. + */ + function _useCheckedNonce(address owner, uint256 nonce) internal virtual { + uint256 current = _useNonce(owner); + if (nonce != current) { + revert InvalidAccountNonce(owner, current); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PausableUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/PausableUpgradeable.sol similarity index 62% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PausableUpgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/PausableUpgradeable.sol index ed6e2c01..f3d904bf 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/security/PausableUpgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/PausableUpgradeable.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) +// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol) -pragma solidity ^0.8.0; +pragma solidity ^0.8.20; -import "../utils/ContextUpgradeable.sol"; -import {Initializable} from "../proxy/utils/Initializable.sol"; +import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop @@ -16,6 +16,20 @@ import {Initializable} from "../proxy/utils/Initializable.sol"; * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { + /// @custom:storage-location erc7201:openzeppelin.storage.Pausable + struct PausableStorage { + bool _paused; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300; + + function _getPausableStorage() private pure returns (PausableStorage storage $) { + assembly { + $.slot := PausableStorageLocation + } + } + /** * @dev Emitted when the pause is triggered by `account`. */ @@ -26,18 +40,15 @@ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { */ event Unpaused(address account); - bool private _paused; - /** - * @dev Initializes the contract in unpaused state. + * @dev The operation failed because the contract is paused. */ - function __Pausable_init() internal onlyInitializing { - __Pausable_init_unchained(); - } + error EnforcedPause(); - function __Pausable_init_unchained() internal onlyInitializing { - _paused = false; - } + /** + * @dev The operation failed because the contract is not paused. + */ + error ExpectedPause(); /** * @dev Modifier to make a function callable only when the contract is not paused. @@ -63,25 +74,35 @@ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { _; } + function __Pausable_init() internal onlyInitializing { + } + + function __Pausable_init_unchained() internal onlyInitializing { + } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { - return _paused; + PausableStorage storage $ = _getPausableStorage(); + return $._paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { - require(!paused(), "Pausable: paused"); + if (paused()) { + revert EnforcedPause(); + } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { - require(paused(), "Pausable: not paused"); + if (!paused()) { + revert ExpectedPause(); + } } /** @@ -92,7 +113,8 @@ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { - _paused = true; + PausableStorage storage $ = _getPausableStorage(); + $._paused = true; emit Paused(_msgSender()); } @@ -104,14 +126,8 @@ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { * - The contract must be paused. */ function _unpause() internal virtual whenPaused { - _paused = false; + PausableStorage storage $ = _getPausableStorage(); + $._paused = false; emit Unpaused(_msgSender()); } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[49] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/EIP712Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/EIP712Upgradeable.sol similarity index 53% rename from dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/EIP712Upgradeable.sol rename to dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/EIP712Upgradeable.sol index f36b38ee..1ce5aecb 100644 --- a/dependencies/@openzeppelin-contracts-upgradeable-4.9.6/utils/cryptography/EIP712Upgradeable.sol +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/EIP712Upgradeable.sol @@ -1,20 +1,21 @@ // SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) +// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/EIP712.sol) -pragma solidity ^0.8.8; +pragma solidity ^0.8.24; -import "./ECDSAUpgradeable.sol"; -import "../../interfaces/IERC5267Upgradeable.sol"; -import {Initializable} from "../../proxy/utils/Initializable.sol"; +import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; +import {IERC5267} from "@openzeppelin/contracts/interfaces/IERC5267.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; /** - * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. + * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data. * - * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, - * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding - * they need in their contracts using a combination of `abi.encode` and `keccak256`. + * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose + * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract + * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to + * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * - * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding + * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * @@ -24,31 +25,36 @@ import {Initializable} from "../../proxy/utils/Initializable.sol"; * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * - * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain - * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the - * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. - * - * _Available since v3.4._ - * - * @custom:storage-size 52 + * NOTE: The upgradeable version of this contract does not use an immutable cache and recomputes the domain separator + * each time {_domainSeparatorV4} is called. This is cheaper than accessing a cached version in cold storage. */ -abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { - bytes32 private constant _TYPE_HASH = +abstract contract EIP712Upgradeable is Initializable, IERC5267 { + bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); - /// @custom:oz-renamed-from _HASHED_NAME - bytes32 private _hashedName; - /// @custom:oz-renamed-from _HASHED_VERSION - bytes32 private _hashedVersion; + /// @custom:storage-location erc7201:openzeppelin.storage.EIP712 + struct EIP712Storage { + bytes32 _hashedName; + bytes32 _hashedVersion; - string private _name; - string private _version; + string _name; + string _version; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.EIP712")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant EIP712StorageLocation = 0xa16a46d94261c7517cc8ff89f61c0ce93598e3c849801011dee649a6a557d100; + + function _getEIP712Storage() private pure returns (EIP712Storage storage $) { + assembly { + $.slot := EIP712StorageLocation + } + } /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in - * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: + * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. @@ -61,12 +67,9 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { } function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { - _name = name; - _version = version; - - // Reset prior values in storage if upgrading - _hashedName = 0; - _hashedVersion = 0; + EIP712Storage storage $ = _getEIP712Storage(); + $._name = name; + $._version = version; } /** @@ -77,7 +80,7 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { } function _buildDomainSeparator() private view returns (bytes32) { - return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); + return keccak256(abi.encode(TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this))); } /** @@ -96,19 +99,14 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { - return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash); + return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } - /** - * @dev See {EIP-5267}. - * - * _Available since v4.9._ - */ + /// @inheritdoc IERC5267 function eip712Domain() public view virtual - override returns ( bytes1 fields, string memory name, @@ -119,10 +117,6 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { uint256[] memory extensions ) { - // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized - // and the EIP712 domain is not reliable, as it will be missing name and version. - require(_hashedName == 0 && _hashedVersion == 0, "EIP712: Uninitialized"); - return ( hex"0f", // 01111 _EIP712Name(), @@ -140,8 +134,9 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ - function _EIP712Name() internal virtual view returns (string memory) { - return _name; + function _EIP712Name() internal view virtual returns (string memory) { + EIP712Storage storage $ = _getEIP712Storage(); + return $._name; } /** @@ -150,8 +145,9 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ - function _EIP712Version() internal virtual view returns (string memory) { - return _version; + function _EIP712Version() internal view virtual returns (string memory) { + EIP712Storage storage $ = _getEIP712Storage(); + return $._version; } /** @@ -160,19 +156,7 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead. */ function _EIP712NameHash() internal view returns (bytes32) { - string memory name = _EIP712Name(); - if (bytes(name).length > 0) { - return keccak256(bytes(name)); - } else { - // If the name is empty, the contract may have been upgraded without initializing the new storage. - // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design. - bytes32 hashedName = _hashedName; - if (hashedName != 0) { - return hashedName; - } else { - return keccak256(""); - } - } + return keccak256(bytes(_EIP712Name())); } /** @@ -181,25 +165,6 @@ abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable { * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead. */ function _EIP712VersionHash() internal view returns (bytes32) { - string memory version = _EIP712Version(); - if (bytes(version).length > 0) { - return keccak256(bytes(version)); - } else { - // If the version is empty, the contract may have been upgraded without initializing the new storage. - // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design. - bytes32 hashedVersion = _hashedVersion; - if (hashedVersion != 0) { - return hashedVersion; - } else { - return keccak256(""); - } - } + return keccak256(bytes(_EIP712Version())); } - - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ - uint256[48] private __gap; } diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol new file mode 100644 index 00000000..42be3398 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol @@ -0,0 +1,284 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/signers/MultiSignerERC7913.sol) + +pragma solidity ^0.8.26; + +import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol"; +import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; +import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of {AbstractSigner} using multiple ERC-7913 signers with a threshold-based + * signature verification system. + * + * This contract allows managing a set of authorized signers and requires a minimum number of + * signatures (threshold) to approve operations. It uses ERC-7913 formatted signers, which + * makes it natively compatible with ECDSA and ERC-1271 signers. + * + * Example of usage: + * + * ```solidity + * contract MyMultiSignerAccount is Account, MultiSignerERC7913, Initializable { + * function initialize(bytes[] memory signers, uint64 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(uint64 threshold) public onlyEntryPointOrSelf { + * _setThreshold(threshold); + * } + * } + * ``` + * + * IMPORTANT: Failing to properly initialize the signers and threshold either during construction + * (if used standalone) or during initialization (if used as a clone) may leave the contract + * either front-runnable or unusable. + */ +abstract contract MultiSignerERC7913Upgradeable is Initializable, AbstractSigner { + using EnumerableSet for EnumerableSet.BytesSet; + using SignatureChecker for *; + + /// @custom:storage-location erc7201:openzeppelin.storage.MultiSignerERC7913 + struct MultiSignerERC7913Storage { + EnumerableSet.BytesSet _signers; + uint64 _threshold; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.MultiSignerERC7913")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant MultiSignerERC7913StorageLocation = 0xdfe169305a533e288e0557da8d289146d3cc75fa6e04c87599b048a60a4e5600; + + function _getMultiSignerERC7913Storage() private pure returns (MultiSignerERC7913Storage storage $) { + assembly { + $.slot := MultiSignerERC7913StorageLocation + } + } + + /// @dev Emitted when a signer is added. + event ERC7913SignerAdded(bytes indexed signers); + + /// @dev Emitted when a signers is removed. + event ERC7913SignerRemoved(bytes indexed signers); + + /// @dev Emitted when the threshold is updated. + event ERC7913ThresholdSet(uint64 threshold); + + /// @dev The `signer` already exists. + error MultiSignerERC7913AlreadyExists(bytes signer); + + /// @dev The `signer` does not exist. + error MultiSignerERC7913NonexistentSigner(bytes signer); + + /// @dev The `signer` is less than 20 bytes long. + error MultiSignerERC7913InvalidSigner(bytes signer); + + /// @dev The `threshold` is zero. + error MultiSignerERC7913ZeroThreshold(); + + /// @dev The `threshold` is unreachable given the number of `signers`. + error MultiSignerERC7913UnreachableThreshold(uint64 signers, uint64 threshold); + + function __MultiSignerERC7913_init(bytes[] memory signers_, uint64 threshold_) internal onlyInitializing { + __MultiSignerERC7913_init_unchained(signers_, threshold_); + } + + function __MultiSignerERC7913_init_unchained(bytes[] memory signers_, uint64 threshold_) internal onlyInitializing { + _addSigners(signers_); + _setThreshold(threshold_); + } + + /** + * @dev Returns a slice of the set of authorized signers. + * + * Using `start = 0` and `end = type(uint64).max` will return the entire set of signers. + * + * WARNING: Depending on the `start` and `end`, this operation can copy a large amount of data to memory, which + * can be expensive. This is designed for view accessors queried without gas fees. Using it in state-changing + * functions may become uncallable if the slice grows too large. + */ + function getSigners(uint64 start, uint64 end) public view virtual returns (bytes[] memory) { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + return $._signers.values(start, end); + } + + /// @dev Returns the number of authorized signers + function getSignerCount() public view virtual returns (uint256) { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + return $._signers.length(); + } + + /// @dev Returns whether the `signer` is an authorized signer. + function isSigner(bytes memory signer) public view virtual returns (bool) { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + return $._signers.contains(signer); + } + + /// @dev Returns the minimum number of signers required to approve a multisignature operation. + function threshold() public view virtual returns (uint64) { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + return $._threshold; + } + + /** + * @dev Adds the `newSigners` to those allowed to sign on behalf of this contract. + * Internal version without access control. + * + * Requirements: + * + * * Each of `newSigners` must be at least 20 bytes long. Reverts with {MultiSignerERC7913InvalidSigner} if not. + * * Each of `newSigners` must not be authorized. See {isSigner}. Reverts with {MultiSignerERC7913AlreadyExists} if so. + * + * NOTE: This function does not validate that signers are controlled or represent appropriate entities. Integrators + * must ensure signers are properly validated before adding them. Problematic signers can compromise + * the multisig's security or functionality. Examples include uncontrolled addresses (e.g., `address(0)`), + * the account's own address (which may cause recursive validation loops), or contracts that may unintentionally + * allow arbitrary validation (e.g. using the identity precompile at `address(0x04)`, which would return the + * ERC-1271 magic value for any `isValidSignature` call). + */ + function _addSigners(bytes[] memory newSigners) internal virtual { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + for (uint256 i = 0; i < newSigners.length; ++i) { + bytes memory signer = newSigners[i]; + require(signer.length >= 20, MultiSignerERC7913InvalidSigner(signer)); + require($._signers.add(signer), MultiSignerERC7913AlreadyExists(signer)); + emit ERC7913SignerAdded(signer); + } + } + + /** + * @dev Removes the `oldSigners` from the authorized signers. Internal version without access control. + * + * Requirements: + * + * * Each of `oldSigners` must be authorized. See {isSigner}. Otherwise {MultiSignerERC7913NonexistentSigner} is thrown. + * * See {_validateReachableThreshold} for the threshold validation. + */ + function _removeSigners(bytes[] memory oldSigners) internal virtual { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + for (uint256 i = 0; i < oldSigners.length; ++i) { + bytes memory signer = oldSigners[i]; + require($._signers.remove(signer), MultiSignerERC7913NonexistentSigner(signer)); + emit ERC7913SignerRemoved(signer); + } + _validateReachableThreshold(); + } + + /** + * @dev Sets the signatures `threshold` required to approve a multisignature operation. + * Internal version without access control. + * + * Requirements: + * + * * See {_validateReachableThreshold} for the threshold validation. + */ + function _setThreshold(uint64 newThreshold) internal virtual { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + require(newThreshold > 0, MultiSignerERC7913ZeroThreshold()); + $._threshold = newThreshold; + _validateReachableThreshold(); + emit ERC7913ThresholdSet(newThreshold); + } + + /** + * @dev Validates the current threshold is reachable. + * + * Requirements: + * + * * The {getSignerCount} must be greater or equal than to the {threshold}. Throws + * {MultiSignerERC7913UnreachableThreshold} if not. + */ + function _validateReachableThreshold() internal view virtual { + MultiSignerERC7913Storage storage $ = _getMultiSignerERC7913Storage(); + uint256 signersLength = $._signers.length(); + uint64 currentThreshold = threshold(); + require( + signersLength >= currentThreshold, + MultiSignerERC7913UnreachableThreshold( + uint64(signersLength), // Safe cast. Economically impossible to overflow. + currentThreshold + ) + ); + } + + /** + * @dev Decodes, validates the signature and checks the signers are authorized. + * See {_validateSignatures} and {_validateThreshold} for more details. + * + * Example of signature encoding: + * + * ```solidity + * // Encode signers (verifier || key) + * bytes memory signer1 = abi.encodePacked(verifier1, key1); + * bytes memory signer2 = abi.encodePacked(verifier2, key2); + * + * // Order signers by their id + * if (keccak256(signer1) > keccak256(signer2)) { + * (signer1, signer2) = (signer2, signer1); + * (signature1, signature2) = (signature2, signature1); + * } + * + * // Assign ordered signers and signatures + * bytes[] memory signers = new bytes[](2); + * bytes[] memory signatures = new bytes[](2); + * signers[0] = signer1; + * signatures[0] = signature1; + * signers[1] = signer2; + * signatures[1] = signature2; + * + * // Encode the multi signature + * bytes memory signature = abi.encode(signers, signatures); + * ``` + * + * Requirements: + * + * * The `signature` must be encoded as `abi.encode(signers, signatures)`. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + if (signature.length == 0) return false; // For ERC-7739 compatibility + (bytes[] memory signers, bytes[] memory signatures) = abi.decode(signature, (bytes[], bytes[])); + return _validateThreshold(signers) && _validateSignatures(hash, signers, signatures); + } + + /** + * @dev Validates the signatures using the signers and their corresponding signatures. + * Returns whether the signers are authorized and the signatures are valid for the given hash. + * + * IMPORTANT: Sorting the signers by their `keccak256` hash will improve the gas efficiency of this function. + * See {SignatureChecker-areValidSignaturesNow-bytes32-bytes[]-bytes[]} for more details. + * + * Requirements: + * + * * The `signatures` and `signers` arrays must be equal in length. Returns false otherwise. + */ + function _validateSignatures( + bytes32 hash, + bytes[] memory signers, + bytes[] memory signatures + ) internal view virtual returns (bool valid) { + for (uint256 i = 0; i < signers.length; ++i) { + if (!isSigner(signers[i])) { + return false; + } + } + return hash.areValidSignaturesNow(signers, signatures); + } + + /** + * @dev Validates that the number of signers meets the {threshold} requirement. + * Assumes the signers were already validated. See {_validateSignatures} for more details. + */ + function _validateThreshold(bytes[] memory validatingSigners) internal view virtual returns (bool) { + return validatingSigners.length >= threshold(); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol new file mode 100644 index 00000000..a5053275 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol @@ -0,0 +1,230 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/MultiSignerERC7913Weighted.sol) + +pragma solidity ^0.8.26; + +import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import {MultiSignerERC7913Upgradeable} from "./MultiSignerERC7913Upgradeable.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Extension of {MultiSignerERC7913} that supports weighted signatures. + * + * This contract allows assigning different weights to each signer, enabling more + * flexible governance schemes. For example, some signers could have higher weight + * than others, allowing for weighted voting or prioritized authorization. + * + * Example of usage: + * + * ```solidity + * contract MyWeightedMultiSignerAccount is Account, MultiSignerERC7913Weighted, Initializable { + * function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold) public initializer { + * _addSigners(signers); + * _setSignerWeights(signers, weights); + * _setThreshold(threshold); + * } + * + * function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf { + * _addSigners(signers); + * } + * + * function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf { + * _removeSigners(signers); + * } + * + * function setThreshold(uint64 threshold) public onlyEntryPointOrSelf { + * _setThreshold(threshold); + * } + * + * function setSignerWeights(bytes[] memory signers, uint64[] memory weights) public onlyEntryPointOrSelf { + * _setSignerWeights(signers, weights); + * } + * } + * ``` + * + * IMPORTANT: When setting a threshold value, ensure it matches the scale used for signer weights. + * For example, if signers have weights like 1, 2, or 3, then a threshold of 4 would require at + * least two signers (e.g., one with weight 1 and one with weight 3). See {signerWeight}. + */ +abstract contract MultiSignerERC7913WeightedUpgradeable is Initializable, MultiSignerERC7913Upgradeable { + using SafeCast for *; + + /// @custom:storage-location erc7201:openzeppelin.storage.MultiSignerERC7913Weighted + struct MultiSignerERC7913WeightedStorage { + // Sum of all the extra weights of all signers. Storage packed with `MultiSignerERC7913._threshold` + uint64 _totalExtraWeight; + + // Mapping from signer to extraWeight (in addition to all authorized signers having weight 1) + mapping(bytes signer => uint64) _extraWeights; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.MultiSignerERC7913Weighted")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant MultiSignerERC7913WeightedStorageLocation = 0x5ec62f110612a7ff5e720b9a2f4970583e308ad11d9cde77cb7db3ea251b1f00; + + function _getMultiSignerERC7913WeightedStorage() private pure returns (MultiSignerERC7913WeightedStorage storage $) { + assembly { + $.slot := MultiSignerERC7913WeightedStorageLocation + } + } + + /** + * @dev Emitted when a signer's weight is changed. + * + * NOTE: Not emitted in {_addSigners} or {_removeSigners}. Indexers must rely on {ERC7913SignerAdded} + * and {ERC7913SignerRemoved} to index a default weight of 1. See {signerWeight}. + */ + event ERC7913SignerWeightChanged(bytes indexed signer, uint64 weight); + + /// @dev Thrown when a signer's weight is invalid. + error MultiSignerERC7913WeightedInvalidWeight(bytes signer, uint64 weight); + + /// @dev Thrown when the arrays lengths don't match. See {_setSignerWeights}. + error MultiSignerERC7913WeightedMismatchedLength(); + + function __MultiSignerERC7913Weighted_init(bytes[] memory signers_, uint64[] memory weights_, uint64 threshold_) internal onlyInitializing { + __MultiSignerERC7913_init_unchained(signers_, 1); + __MultiSignerERC7913Weighted_init_unchained(signers_, weights_, threshold_); + } + + function __MultiSignerERC7913Weighted_init_unchained(bytes[] memory signers_, uint64[] memory weights_, uint64 threshold_) internal onlyInitializing { + _setSignerWeights(signers_, weights_); + _setThreshold(threshold_); + } + + /// @dev Gets the weight of a signer. Returns 0 if the signer is not authorized. + function signerWeight(bytes memory signer) public view virtual returns (uint64) { + MultiSignerERC7913WeightedStorage storage $ = _getMultiSignerERC7913WeightedStorage(); + unchecked { + // Safe cast, _setSignerWeights guarantees 1+_extraWeights is a uint64 + return uint64(isSigner(signer).toUint() * (1 + $._extraWeights[signer])); + } + } + + /// @dev Gets the total weight of all signers. + function totalWeight() public view virtual returns (uint64) { + MultiSignerERC7913WeightedStorage storage $ = _getMultiSignerERC7913WeightedStorage(); + return (getSignerCount() + $._totalExtraWeight).toUint64(); + } + + /** + * @dev Sets weights for multiple signers at once. Internal version without access control. + * + * Requirements: + * + * * `signers` and `weights` arrays must have the same length. Reverts with {MultiSignerERC7913WeightedMismatchedLength} on mismatch. + * * Each signer must exist in the set of authorized signers. Otherwise reverts with {MultiSignerERC7913NonexistentSigner} + * * Each weight must be greater than 0. Otherwise reverts with {MultiSignerERC7913WeightedInvalidWeight} + * * See {_validateReachableThreshold} for the threshold validation. + * + * Emits {ERC7913SignerWeightChanged} for each signer. + */ + function _setSignerWeights(bytes[] memory signers, uint64[] memory weights) internal virtual { + MultiSignerERC7913WeightedStorage storage $ = _getMultiSignerERC7913WeightedStorage(); + require(signers.length == weights.length, MultiSignerERC7913WeightedMismatchedLength()); + + uint256 extraWeightAdded = 0; + uint256 extraWeightRemoved = 0; + for (uint256 i = 0; i < signers.length; ++i) { + bytes memory signer = signers[i]; + require(isSigner(signer), MultiSignerERC7913NonexistentSigner(signer)); + + uint64 weight = weights[i]; + require(weight > 0, MultiSignerERC7913WeightedInvalidWeight(signer, weight)); + + unchecked { + uint64 oldExtraWeight = $._extraWeights[signer]; + uint64 newExtraWeight = weight - 1; + + if (oldExtraWeight != newExtraWeight) { + // Overflow impossible: weight values are bounded by uint64 and economic constraints + extraWeightRemoved += oldExtraWeight; + extraWeightAdded += $._extraWeights[signer] = newExtraWeight; + emit ERC7913SignerWeightChanged(signer, weight); + } + } + } + unchecked { + // Safe from underflow: `extraWeightRemoved` is bounded by `_totalExtraWeight` by construction + // and weight values are bounded by uint64 and economic constraints + $._totalExtraWeight = (uint256($._totalExtraWeight) + extraWeightAdded - extraWeightRemoved).toUint64(); + } + _validateReachableThreshold(); + } + + /** + * @dev See {MultiSignerERC7913-_addSigners}. + * + * In cases where {totalWeight} is almost `type(uint64).max` (due to a large `_totalExtraWeight`), adding new + * signers could cause the {totalWeight} computation to overflow. Adding a {totalWeight} calls after the new + * signers are added ensures no such overflow happens. + */ + function _addSigners(bytes[] memory newSigners) internal virtual override { + super._addSigners(newSigners); + + // This will revert if the new signers cause an overflow + _validateReachableThreshold(); + } + + /** + * @dev See {MultiSignerERC7913-_removeSigners}. + * + * Just like {_addSigners}, this function does not emit {ERC7913SignerWeightChanged} events. The + * {ERC7913SignerRemoved} event emitted by {MultiSignerERC7913-_removeSigners} is enough to track weights here. + */ + function _removeSigners(bytes[] memory signers) internal virtual override { + MultiSignerERC7913WeightedStorage storage $ = _getMultiSignerERC7913WeightedStorage(); + // Clean up weights for removed signers + // + // The `extraWeightRemoved` is bounded by `_totalExtraWeight`. The `super._removeSigners` function will revert + // if the signers array contains any duplicates, ensuring each signer's weight is only counted once. Since + // `_totalExtraWeight` is stored as a `uint64`, the final subtraction operation is also safe. + unchecked { + uint64 extraWeightRemoved = 0; + for (uint256 i = 0; i < signers.length; ++i) { + bytes memory signer = signers[i]; + + extraWeightRemoved += $._extraWeights[signer]; + delete $._extraWeights[signer]; + } + $._totalExtraWeight -= extraWeightRemoved; + } + super._removeSigners(signers); + } + + /** + * @dev Sets the threshold for the multisignature operation. Internal version without access control. + * + * Requirements: + * + * * The {totalWeight} must be `>=` the {threshold}. Otherwise reverts with {MultiSignerERC7913UnreachableThreshold} + * + * NOTE: This function intentionally does not call `super._validateReachableThreshold` because the base implementation + * assumes each signer has a weight of 1, which is a subset of this weighted implementation. Consider that multiple + * implementations of this function may exist in the contract, so important side effects may be missed + * depending on the linearization order. + */ + function _validateReachableThreshold() internal view virtual override { + uint64 weight = totalWeight(); + uint64 currentThreshold = threshold(); + require(weight >= currentThreshold, MultiSignerERC7913UnreachableThreshold(weight, currentThreshold)); + } + + /** + * @dev Validates that the total weight of signers meets the threshold requirement. + * + * NOTE: This function intentionally does not call `super._validateThreshold` because the base implementation + * assumes each signer has a weight of 1, which is a subset of this weighted implementation. Consider that multiple + * implementations of this function may exist in the contract, so important side effects may be missed + * depending on the linearization order. + */ + function _validateThreshold(bytes[] memory signers) internal view virtual override returns (bool) { + unchecked { + uint64 weight = 0; + for (uint256 i = 0; i < signers.length; ++i) { + // Overflow impossible: weight values are bounded by uint64 and economic constraints + weight += signerWeight(signers[i]); + } + return weight >= threshold(); + } + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerECDSAUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerECDSAUpgradeable.sol new file mode 100644 index 00000000..dd8a625d --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerECDSAUpgradeable.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/signers/SignerECDSA.sol) + +pragma solidity ^0.8.20; + +import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol"; +import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of {AbstractSigner} using xref:api:utils/cryptography#ECDSA[ECDSA] signatures. + * + * For {Account} usage, a {_setSigner} function is provided to set the {signer} address. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * Example of usage: + * + * ```solidity + * contract MyAccountECDSA is Account, SignerECDSA, Initializable { + * function initialize(address signerAddr) public initializer { + * _setSigner(signerAddr); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerECDSAUpgradeable is Initializable, AbstractSigner { + /// @custom:storage-location erc7201:openzeppelin.storage.SignerECDSA + struct SignerECDSAStorage { + address _signer; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.SignerECDSA")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant SignerECDSAStorageLocation = 0x21a2a8bb424898f7a6033d112ec6057811f27c903c45eccf7ad7cefcbbc0d200; + + function _getSignerECDSAStorage() private pure returns (SignerECDSAStorage storage $) { + assembly { + $.slot := SignerECDSAStorageLocation + } + } + + function __SignerECDSA_init(address signerAddr) internal onlyInitializing { + __SignerECDSA_init_unchained(signerAddr); + } + + function __SignerECDSA_init_unchained(address signerAddr) internal onlyInitializing { + _setSigner(signerAddr); + } + + /** + * @dev Sets the signer with the address of the native signer. This function should be called during construction + * or through an initializer. + */ + function _setSigner(address signerAddr) internal { + SignerECDSAStorage storage $ = _getSignerECDSAStorage(); + $._signer = signerAddr; + } + + /// @dev Return the signer's address. + function signer() public view virtual returns (address) { + SignerECDSAStorage storage $ = _getSignerECDSAStorage(); + return $._signer; + } + + /// @inheritdoc AbstractSigner + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + (address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecoverCalldata(hash, signature); + return signer() == recovered && err == ECDSA.RecoverError.NoError; + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerERC7913Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerERC7913Upgradeable.sol new file mode 100644 index 00000000..d5ec0725 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerERC7913Upgradeable.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerERC7913.sol) + +pragma solidity ^0.8.24; + +import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol"; +import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of {AbstractSigner} using + * https://eips.ethereum.org/EIPS/eip-7913[ERC-7913] signature verification. + * + * For {Account} usage, a {_setSigner} function is provided to set the ERC-7913 formatted {signer}. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * The signer is a `bytes` object that concatenates a verifier address and a key: `verifier || key`. + * + * Example of usage: + * + * ```solidity + * contract MyAccountERC7913 is Account, SignerERC7913, Initializable { + * function initialize(bytes memory signer_) public initializer { + * _setSigner(signer_); + * } + * + * function setSigner(bytes memory signer_) public onlyEntryPointOrSelf { + * _setSigner(signer_); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ + +abstract contract SignerERC7913Upgradeable is Initializable, AbstractSigner { + /// @custom:storage-location erc7201:openzeppelin.storage.SignerERC7913 + struct SignerERC7913Storage { + bytes _signer; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.SignerERC7913")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant SignerERC7913StorageLocation = 0x170786af7cf7b78916dca5a937f25e3b9b70ae3faee6f0db68cda91b7e818e00; + + function _getSignerERC7913Storage() private pure returns (SignerERC7913Storage storage $) { + assembly { + $.slot := SignerERC7913StorageLocation + } + } + + function __SignerERC7913_init(bytes memory signer_) internal onlyInitializing { + __SignerERC7913_init_unchained(signer_); + } + + function __SignerERC7913_init_unchained(bytes memory signer_) internal onlyInitializing { + _setSigner(signer_); + } + + /// @dev Return the ERC-7913 signer (i.e. `verifier || key`). + function signer() public view virtual returns (bytes memory) { + SignerERC7913Storage storage $ = _getSignerERC7913Storage(); + return $._signer; + } + + /// @dev Sets the signer (i.e. `verifier || key`) with an ERC-7913 formatted signer. + function _setSigner(bytes memory signer_) internal { + SignerERC7913Storage storage $ = _getSignerERC7913Storage(); + $._signer = signer_; + } + + /** + * @dev Verifies a signature using {SignatureChecker-isValidSignatureNow-bytes-bytes32-bytes-} + * with {signer}, `hash` and `signature`. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + return SignatureChecker.isValidSignatureNow(signer(), hash, signature); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerP256Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerP256Upgradeable.sol new file mode 100644 index 00000000..72638836 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerP256Upgradeable.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerP256.sol) + +pragma solidity ^0.8.20; + +import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol"; +import {P256} from "@openzeppelin/contracts/utils/cryptography/P256.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of {AbstractSigner} using xref:api:utils/cryptography#P256[P256] signatures. + * + * For {Account} usage, a {_setSigner} function is provided to set the {signer} public key. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * Example of usage: + * + * ```solidity + * contract MyAccountP256 is Account, SignerP256, Initializable { + * function initialize(bytes32 qx, bytes32 qy) public initializer { + * _setSigner(qx, qy); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerP256Upgradeable is Initializable, AbstractSigner { + /// @custom:storage-location erc7201:openzeppelin.storage.SignerP256 + struct SignerP256Storage { + bytes32 _qx; + bytes32 _qy; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.SignerP256")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant SignerP256StorageLocation = 0x6c6e681eb9c9937bb0e9a845af882a34f03801b1b670c4e5431f8b41c16a2700; + + function _getSignerP256Storage() private pure returns (SignerP256Storage storage $) { + assembly { + $.slot := SignerP256StorageLocation + } + } + + error SignerP256InvalidPublicKey(bytes32 qx, bytes32 qy); + + function __SignerP256_init(bytes32 qx, bytes32 qy) internal onlyInitializing { + __SignerP256_init_unchained(qx, qy); + } + + function __SignerP256_init_unchained(bytes32 qx, bytes32 qy) internal onlyInitializing { + _setSigner(qx, qy); + } + + /** + * @dev Sets the signer with a P256 public key. This function should be called during construction + * or through an initializer. + */ + function _setSigner(bytes32 qx, bytes32 qy) internal { + SignerP256Storage storage $ = _getSignerP256Storage(); + if (!P256.isValidPublicKey(qx, qy)) revert SignerP256InvalidPublicKey(qx, qy); + $._qx = qx; + $._qy = qy; + } + + /// @dev Return the signer's P256 public key. + function signer() public view virtual returns (bytes32 qx, bytes32 qy) { + SignerP256Storage storage $ = _getSignerP256Storage(); + return ($._qx, $._qy); + } + + /// @inheritdoc AbstractSigner + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + if (signature.length < 0x40) return false; + bytes32 r = bytes32(signature[0x00:0x20]); + bytes32 s = bytes32(signature[0x20:0x40]); + (bytes32 qx, bytes32 qy) = signer(); + return P256.verify(hash, r, s, qx, qy); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerRSAUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerRSAUpgradeable.sol new file mode 100644 index 00000000..a52a0234 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerRSAUpgradeable.sol @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/cryptography/signers/SignerRSA.sol) + +pragma solidity ^0.8.20; + +import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol"; +import {RSA} from "@openzeppelin/contracts/utils/cryptography/RSA.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of {AbstractSigner} using xref:api:utils/cryptography#RSA[RSA] signatures. + * + * For {Account} usage, a {_setSigner} function is provided to set the {signer} public key. + * Doing so is easier for a factory, who is likely to use initializable clones of this contract. + * + * Example of usage: + * + * ```solidity + * contract MyAccountRSA is Account, SignerRSA, Initializable { + * function initialize(bytes memory e, bytes memory n) public initializer { + * _setSigner(e, n); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerRSAUpgradeable is Initializable, AbstractSigner { + /// @custom:storage-location erc7201:openzeppelin.storage.SignerRSA + struct SignerRSAStorage { + bytes _e; + bytes _n; + } + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.SignerRSA")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant SignerRSAStorageLocation = 0x8bf15870295cd9a811d81afc339672ef68c88b80db19b9fcfad708cc10d31600; + + function _getSignerRSAStorage() private pure returns (SignerRSAStorage storage $) { + assembly { + $.slot := SignerRSAStorageLocation + } + } + + function __SignerRSA_init(bytes memory e, bytes memory n) internal onlyInitializing { + __SignerRSA_init_unchained(e, n); + } + + function __SignerRSA_init_unchained(bytes memory e, bytes memory n) internal onlyInitializing { + _setSigner(e, n); + } + + /** + * @dev Sets the signer with a RSA public key. This function should be called during construction + * or through an initializer. + */ + function _setSigner(bytes memory e, bytes memory n) internal { + SignerRSAStorage storage $ = _getSignerRSAStorage(); + $._e = e; + $._n = n; + } + + /// @dev Return the signer's RSA public key. + function signer() public view virtual returns (bytes memory e, bytes memory n) { + SignerRSAStorage storage $ = _getSignerRSAStorage(); + return ($._e, $._n); + } + + /** + * @dev See {AbstractSigner-_rawSignatureValidation}. Verifies a PKCSv1.5 signature by calling + * xref:api:utils/cryptography.adoc#RSA-pkcs1Sha256-bytes-bytes-bytes-bytes-[RSA.pkcs1Sha256]. + * + * IMPORTANT: Following the RSASSA-PKCS1-V1_5-VERIFY procedure outlined in RFC8017 (section 8.2.2), the + * provided `hash` is used as the `M` (message) and rehashed using SHA256 according to EMSA-PKCS1-v1_5 + * encoding as per section 9.2 (step 1) of the RFC. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + (bytes memory e, bytes memory n) = signer(); + return RSA.pkcs1Sha256(abi.encodePacked(hash), signature, e, n); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol new file mode 100644 index 00000000..03acedea --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/signers/SignerWebAuthn.sol) + +pragma solidity ^0.8.24; + +import {SignerP256Upgradeable} from "./SignerP256Upgradeable.sol"; +import {WebAuthn} from "@openzeppelin/contracts/utils/cryptography/WebAuthn.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of {SignerP256} that supports WebAuthn authentication assertions. + * + * This contract enables signature validation using WebAuthn authentication assertions, + * leveraging the P256 public key stored in the contract. It allows for both WebAuthn + * and raw P256 signature validation, providing compatibility with both signature types. + * + * The signature is expected to be an abi-encoded {WebAuthn-WebAuthnAuth} struct. + * + * Example usage: + * + * ```solidity + * contract MyAccountWebAuthn is Account, SignerWebAuthn, Initializable { + * function initialize(bytes32 qx, bytes32 qy) public initializer { + * _setSigner(qx, qy); + * } + * } + * ``` + * + * IMPORTANT: Failing to call {_setSigner} either during construction (if used standalone) + * or during initialization (if used as a clone) may leave the signer either front-runnable or unusable. + */ +abstract contract SignerWebAuthnUpgradeable is Initializable, SignerP256Upgradeable { + function __SignerWebAuthn_init() internal onlyInitializing { + } + + function __SignerWebAuthn_init_unchained() internal onlyInitializing { + } + /** + * @dev Validates a raw signature using the WebAuthn authentication assertion. + * + * Returns `false` if the signature is not a valid WebAuthn authentication assertion. + */ + function _rawSignatureValidation( + bytes32 hash, + bytes calldata signature + ) internal view virtual override returns (bool) { + (bool decodeSuccess, WebAuthn.WebAuthnAuth calldata auth) = WebAuthn.tryDecodeAuth(signature); + if (!decodeSuccess) return false; + (bytes32 qx, bytes32 qy) = signer(); + return WebAuthn.verify(abi.encodePacked(hash), auth, qx, qy); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/draft-ERC7739Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/draft-ERC7739Upgradeable.sol new file mode 100644 index 00000000..7f6a1a42 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/cryptography/signers/draft-ERC7739Upgradeable.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.5.0) (utils/cryptography/signers/draft-ERC7739.sol) + +pragma solidity ^0.8.24; + +import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol"; +import {EIP712Upgradeable} from "../EIP712Upgradeable.sol"; +import {ERC7739Utils} from "@openzeppelin/contracts/utils/cryptography/draft-ERC7739Utils.sol"; +import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol"; +import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Validates signatures wrapping the message hash in a nested EIP712 type. See {ERC7739Utils}. + * + * Linking the signature to the EIP-712 domain separator is a security measure to prevent signature replay across different + * EIP-712 domains (e.g. a single offchain owner of multiple contracts). + * + * This contract requires implementing the {_rawSignatureValidation} function, which passes the wrapped message hash, + * which may be either an typed data or a personal sign nested type. + * + * NOTE: xref:api:utils/cryptography#EIP712[EIP-712] uses xref:api:utils/cryptography#ShortStrings[ShortStrings] to + * optimize gas costs for short strings (up to 31 characters). Consider that strings longer than that will use storage, + * which may limit the ability of the signer to be used within the ERC-4337 validation phase (due to + * https://eips.ethereum.org/EIPS/eip-7562#storage-rules[ERC-7562 storage access rules]). + */ +abstract contract ERC7739Upgradeable is Initializable, AbstractSigner, EIP712Upgradeable, IERC1271 { + using ERC7739Utils for *; + using MessageHashUtils for bytes32; + + function __ERC7739_init() internal onlyInitializing { + } + + function __ERC7739_init_unchained() internal onlyInitializing { + } + /** + * @dev Attempts validating the signature in a nested EIP-712 type. + * + * A nested EIP-712 type might be presented in 2 different ways: + * + * - As a nested EIP-712 typed data + * - As a _personal_ signature (an EIP-712 mimic of the `eth_personalSign` for a smart contract) + */ + function isValidSignature(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4 result) { + // For the hash `0x7739773977397739773977397739773977397739773977397739773977397739` and an empty signature, + // we return the magic value `0x77390001` as it's assumed impossible to find a preimage for it that can be used + // maliciously. Useful for simulation purposes and to validate whether the contract supports ERC-7739. + return + (_isValidNestedTypedDataSignature(hash, signature) || _isValidNestedPersonalSignSignature(hash, signature)) + ? IERC1271.isValidSignature.selector + : (hash == 0x7739773977397739773977397739773977397739773977397739773977397739 && signature.length == 0) + ? bytes4(0x77390001) + : bytes4(0xffffffff); + } + + /** + * @dev Nested personal signature verification. + */ + function _isValidNestedPersonalSignSignature(bytes32 hash, bytes calldata signature) private view returns (bool) { + return _rawSignatureValidation(_domainSeparatorV4().toTypedDataHash(hash.personalSignStructHash()), signature); + } + + /** + * @dev Nested EIP-712 typed data verification. + */ + function _isValidNestedTypedDataSignature( + bytes32 hash, + bytes calldata encodedSignature + ) private view returns (bool) { + // decode signature + ( + bytes calldata signature, + bytes32 appSeparator, + bytes32 contentsHash, + string calldata contentsDescr + ) = encodedSignature.decodeTypedDataSig(); + + ( + , + string memory name, + string memory version, + uint256 chainId, + address verifyingContract, + bytes32 salt, + + ) = eip712Domain(); + + // Check that contentHash and separator are correct + // Rebuild nested hash + return + hash == appSeparator.toTypedDataHash(contentsHash) && + bytes(contentsDescr).length != 0 && + _rawSignatureValidation( + appSeparator.toTypedDataHash( + ERC7739Utils.typedDataSignStructHash( + contentsDescr, + contentsHash, + abi.encode(keccak256(bytes(name)), keccak256(bytes(version)), chainId, verifyingContract, salt) + ) + ), + signature + ); + } +} diff --git a/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/introspection/ERC165Upgradeable.sol b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/introspection/ERC165Upgradeable.sol new file mode 100644 index 00000000..6906fb32 --- /dev/null +++ b/dependencies/@openzeppelin-contracts-upgradeable-5.6.1/utils/introspection/ERC165Upgradeable.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/ERC165.sol) + +pragma solidity ^0.8.20; + +import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; +import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check + * for the additional interface id that will be supported. For example: + * + * ```solidity + * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); + * } + * ``` + */ +abstract contract ERC165Upgradeable is Initializable, IERC165 { + function __ERC165_init() internal onlyInitializing { + } + + function __ERC165_init_unchained() internal onlyInitializing { + } + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { + return interfaceId == type(IERC165).interfaceId; + } +} diff --git a/dependencies/rain-lib-hash-0.1.0/LICENSE b/dependencies/rain-lib-hash-0.1.0/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-lib-hash-0.1.0/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-lib-hash-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-lib-hash-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-lib-hash-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-lib-hash-0.1.0/README.md b/dependencies/rain-lib-hash-0.1.0/README.md new file mode 100644 index 00000000..d44ea48f --- /dev/null +++ b/dependencies/rain-lib-hash-0.1.0/README.md @@ -0,0 +1,517 @@ +# rain.lib.hash + +Docs at https://rainprotocol.github.io/rain.lib.hash + +## Problem + +When producing hashes of just about anything that isn't already `bytes` the +common suggestions look something like `keccak256(abi.encode(...))` or +`keccak256(abi.encodePacked(...))`. This appears reasonable as Solidity itself +does not provide an "any type" `keccak256` function but does provide one (almost) +for abi encoding. + +When I say "common suggestion" I mean literally the compiler itself gives outputs +like this for any type other than `bytes`. + +``` +➜ keccak256(address(0)) +Compiler errors: +error[7556]: TypeError: Invalid type for argument in function call. Invalid implicit conversion from address to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. + --> ReplContract.sol:14:19: + | +14 | keccak256(address(0)); +``` + +This approach raises two questions for me: + +- Why are we relying on interface encodings to satisfy cryptographic properties? +- Encoding requires complex recursive/nested data processing, memory expansion, + and making more than a full copy of the data to include headers, is that + significant gas cost strictly necessary? + +### Non goals + +For the purpose of this document we are NOT attempting any specific compatibility +with external systems or standards, etc. + +The basic use case is that we are writing contracts that need to convince +themselves that they should authorize some state change. + +Often we find ourselves with a lot of state that informs the authorization +verification logic. Too much to store, sign, etc. so first we want to +"hash the data" and just store, compare, sign the hash. + +It doesn't really matter in this case what the hashing algorithm is, as long as +it gives us the security guarantees that the contract needs. If the hash is +needed to be known offchain, e.g. so it can be passed back to a future call on +the contract, then the contract can emit the hash into the logs etc. + +We are even fine with changing the patterns described in this document over time. +There's no requirement that a hash produced by one contract is compatible with +the hash produced by another. Our goal is that contracts implementing these +patterns can securely accept arbitrary inputs, NOT that the basic approach +ossifies due to unrelated contracts doing different things to each other. + +**That is to say, there's no "upgradeable contract" support.** + +Further, while we do want to be able to support "any" data type in our pattern, +we do NOT need to support "every" data type in our implementations. It may be +relatively onerous to implement and maintain the required assembly logic to +safely hash some structure, relative to just slapping an abi encoding on the +problem and walking away. The intention is that this work would only be needed +for maybe 1 or 2 structs within a codebase, because there wouldn't be a large +variety of security sensitive hashing to be done for some given contract/context. + +It's also assumed that, because these structs are used on the critical security +path, there would be good reasons to design them for stability and simplicity +already. In this case, the maintainability concerns that always arise when +handling structs in assembly (adding/removing/reordering fields!) are naturally +less of a concern due to their context/usage. + +### Encoding and cryptography + +An earlier version of the EIP712 spec outlined the difficulty in relying on +encoding formats to provide cryptographic guarantees. + +> A good hashing algorithm should satisfy security properties such as +> determinism, second pre-image resistance and collision resistance. The +> keccak256 function satisfies the above criteria when applied to bytestrings. If +> we want to apply it to other sets we first need to map this set to bytestrings. +> It is critically important that this encoding function is deterministic and +> injective. If it is not deterministic then the hash might differ from the +> moment of signing to the moment of verifying, causing the signature to +> incorrectly be rejected. If it is not injective then there are two different +> elements in our input set that hash to the same value, causing a signature to +> be valid for a different unrelated message. +> +> An illustrative example of the above breakage can be found in Ethereum. +> Ethereum has two kinds of messages, transactions 𝕋 and bytestrings 𝔹⁸ⁿ. These +> are signed using eth_sendTransaction and eth_sign respectively. Originally the +> encoding function encode : 𝕋 ∪ 𝔹⁸ⁿ → 𝔹⁸ⁿ was defined as follows: +> +> - encode(t : 𝕋) = RLP_encode(t) +> - encode(b : 𝔹⁸ⁿ) = b +> +> encode(b : 𝔹⁸ⁿ) = "\x19Ethereum Signed Message:\n" ‖ len(b) ‖ b where len(b) is +> the ascii-decimal encoding of the number of bytes in b. +> +> This solves the collision between the legs since RLP_encode(t : 𝕋) never starts +> with \x19. There is still the risk of the new encoding function not being +> deterministic or injective. It is instructive to consider those in detail. +> +> As is, the definition above is not deterministic. For a 4-byte string b both +> encodings with len(b) = "4" and len(b) = "004" are valid. This can be solved by +> further requiring that the decimal encoding of the length has no leading zeros +> and len("") = "0". +> +> The above definition is not obviously collision free. Does a bytestring +> starting with "\x19Ethereum Signed Message:\n42a…" mean a 42-byte string +> starting with a or a 4-byte string starting with 2a?. This was pointed out in +> Geth issue #14794 and motivated Trezor to not implement the standard as-is. +> Fortunately this does not lead to actual collisions as the total length of the +> encoded bytestring provides sufficient information to disambiguate the cases. +> +> Both determinism and injectiveness would be trivially true if len(b) was left +> out entirely. The point is, it is difficult to map arbitrary sets to +> bytestrings without introducing security issues in the encoding function. Yet +> the current design of eth_sign still takes a bytestring as input and expects +> implementors to come up with an encoding. + +This is good context that has sadly been removed from current versions of the +EIP. + +The key takeaways are: + +- We need something determinstic and injective, which can probably be summarised + in a single word as "unambiguous" +- Hashing bytes is secure by default and any encoding scheme's security can only + be less than or equal to the security of the hash of the raw data before it is + encoded +- It is difficult to assess the cryptographic qualities of an encoding scheme and + high profile mistakes can be found in the wild, including formal standards + +#### Collisions with ABI encoding + +Perhaps unsurprisingly we can find one of these issues in `abi.encodePacked` as +this encoding scheme simply concatenates bytes together. + +This means that `"abc" + "def"` and `"ab" + "cdef"` will pack to the same final +bytestring, `"abcdef"`. + +We can suggest potential workarounds like "only use packed encoding for fixed +length input data", but it's clear that packed encoding is situationally useful +at best, and dangerous at worst. + +The suggested fix is usually to use `abi.encode`, which adds additional +information to the raw data as part of the encoding. Something like +`3"abc" + 3"def"` with length prefixes and `2"ab" + 4"cdef"`, and then additional +head/tail structures that encode the offsets of the dynamic length data in an +overall prefix to the encoded data. + +https://docs.soliditylang.org/en/develop/abi-spec.html#formal-specification-of-the-encoding + +Importantly, in light of the discussion in EIP712, the lengths are fixed length +themselves, always represented as a `uint256`, so the full `abi.encode` encoding +of the underlying data is probably safe. + +So `abi.encode` doesn't have the problems of `abi.encodePacked` nor early geth +implementations, but is that a strong proof that it doesn't introduce new +problems? + +#### Gas cost of encoding + +If `abi.encode` was an efficient function, we could probably be happy that it has +sufficient adoption and time without exploit to use it. Even if there was some +issue, "nobody ever got fired for using `abi.encode`", right? + +Doing the same thing as everyone else, and as the security researchers recommend +in audits, is usually a good idea. + +The issue here is that `abi.encode` is not particularly gas efficient. This is a +fundamental issue and not at all the "fault" of Solidity. To encode anything with +any algorithm and not cause the original data to be corrupted/unsafe to use, the +EVM must allocate a new region of memory to house the encoded data. If we allow +for dynamic length data types, the UNAVOIDABLE runtime overhead of ANY +schemaless/uncompressed encoding algorithm is: + +- Calculate the size of memory to allocate for the encoded output by recursively + traversing the input data +- Allocate the memory and pay nonlinear gas for expansion costs +- Make a complete copy of the input data +- Write additional data for the encoding itself, e.g. type/length prefixes, + headers, magic numbers, etc. + +The Solidity type system can definitely make a lot of this more efficient, +especially the traversal bit, by generating the traversal process at compile time +but it can't hand wave away the need for allocating and copying. + +**Typically, my experience has shown that if some algorithm `f(x)` is implemented +in a functionally equivalent way, where one implementation internally encodes `x` +and another avoids it, the no-encode solution often costs 40-80%+ less gas.** +This saving is of course most noticeable when the algorithm is relatively +efficient, or involves a tight internal loop over encoding, such that the +encoding then starts to dominate the profile. Even in cases where that is not +true, such as comparing the reference SSTORE2 implementation to +[LibDataContract](https://github.com/rainprotocol/sol.lib.datacontract/blob/main/src/LibDataContract.sol) we still can see 1k+ gas savings per-write for common usage patterns, with +identical outcomes. + +It really just seems to come down to the fact that memory expansion and bulk +copying nested/dynamic is not a cheap thing to do. It's typically not millions of +gas, but it can easily be 1-10k+ gas for what is often unneccessary work. + +Note however that `keccak256` itself is non destructive, it can happily produce +a hash on the stack without modifying or allocating any memory at all. Even in +the case that some data is NOT in memory yet and we want to hash it +(e.g. on the stack), there is a dedicated region of memory from `0-0x40` called +"scratch space for hashing methods". We can put any two words in the scratch +space and hash them together without interacting with the allocator at all. + +What perhaps is the "fault" of Solidity is that they don't implement `keecak256` +for any type other than `bytes` so we are forced to go all the way to Yul and +write assembly the moment we want to do anything other than `abi.encode`. + +## Solution + +- Define a pattern to hash any Solidity data structure without allocation and + minimal memory reads/writes, and is generally efficient +- Convince ourselves the pattern is unambiguous/secure, being both deterministic + and injective +- Provide a reference implementation of the pattern that can be fuzzed against + to show inline implementations of the pattern provide valid outputs + +### The pattern + +The memory layout of data in Solidity is very regular across all data types. + +https://docs.soliditylang.org/en/v0.8.19/internals/layout_in_memory.html + +It is optimised so that the allocator always has the free memory pointer at a +multiple of 32. + +Note that the memory layout is completely different to e.g. the storage layout. +Everything discussed here is specific to data in memory and does not generalise +at all. + +All non-struct types end up in one of 3 buckets: + +- 1 or more 32 byte words, of `length` defined by the type +- A 32 byte `length` followed by `length` 32 byte words (most dynamic types) +- A 32 byte `length` followed by `length` bytes (`bytes` and `string` only) + +Note that in the last case, the allocator will still move the free memory pointer +to a multiple of 32 bytes even if that points past the end of the data structure. + +The variables and structs that reference these things are pointers to them, or +even nested pointers in the case of structs. The pointers can be either on the +stack or in memory, depending on context. + +Consider the struct + +```solidity +struct Foo { + uint256 a; + address b; + uint256[] c; + bytes d; +} +``` + +If we had some `foo_` such that `Foo memory foo_ = Foo(...);` then `foo_` will +be a pointer, either on the stack or in memory, depending on compiler +optimisations. + +The thing it points to falls into the first bucket, a 4-word region of memory +defined by its type. This may not be intuitive but all of `uint256`, `address`, +`uint256[]` and `bytes`, and all other types, are all a full singular word in +the struct. + +Any types that are smaller than 1 word are padded with 0's such that they retain +the same `uint256` equivalent value. + +Any types that are larger, or potentially larger than 1 word are pointers to that +data, from the perspective of the struct. + +This logic is applied recursively. + +This means that structs are NOT dynamic length, regardless of how nested or how +many dynamic types appear in their definition, or the definitions of types within +their fields. For example, a `Foo` is ALWAYS 4 words, i.e. 0x80 bytes long. + +Given the above, we can + +- Define a pattern for hashing each of the 3 possible memory layouts +- Explain how to handle pointers across non-contigous regions of memory +- Discuss the security of the composition +- Provide a guide for implementation, maintenance and quality assurance + +#### Hashing contigious words + +In all cases where the size of the data is a known number of words at compile +time we are free to simply hash the known memory region. + +For example, we could hash a `foo_` as above like so + +```solidity +assembly ("memory-safe") { + let hash_ := keccak256(foo_, add(foo_, 0x80)) +} +``` + +Ignore for now that `c` and `d` are pointers, as that will be discussed later in +this document. + +The basic point is that the code example shows that Yul handles what we need +for known memory regions very naturally. + +Other than implementation bugs, there's no potential for + +- Collisions +- Including data what we did not intend to in the hash input +- Failing to include some part of the struct + +Because the size of the data never changes, we can just hardcode it per-type. + +#### Hashing dynamic length list of words + +Most dynamic length types in Solidity are a list of 32 byte words. This includes +lists of pointers like `Foo[]`, single byte values `bytes1[]`, etc. + +The ONLY exceptions to the rule are `bytes` and `string` types. + +Again, ignoring pointers for now, we can hash any dynamic length word list as + +```solidity +assembly ("memory-safe") { + // Assume bar_ is some dynamic length list of words + let hash_ := keccak256( + // Skip the length prefix + add(bar_, 0x20), + // Read the length prefix and multiply by 0x20 to know how many _words_ + // to hash + mul(mload(bar_), 0x20) + ) +} +``` + +Note that here we DO NOT include the length prefix in the bytes that we hash. + +This gives us the same behaviour as the case of hashing static length data, but +with lengths known only at runtime. + +When it comes to composition we do not want to rely on length prefixes for safety +guarantees, as they are not always available. As EIP712 explained, length +prefixes can introduce ambiguity as easily as they can resolve them as in the +case of packed encoding. Ideally we can show security without the need for any +additional metadata about our words. + +#### Hashing dynamic length byte strings + +The two byte length types `bytes` and `string` are the only types in Solidity +that may not have whole-world lengths. Even though the allocator retains a +multiple of 0x20 on the free memory pointer, we MUST respect the true length of +`bytes` and `string` in bytes, otherwise we introduce ambiguity. + +If we did not respect the length then `hex"01"` and `hex"0100"` would hash to +the same value, as they both have 0x20 bytes _allocated_ to them in memory, even +though the first is 1 byte and the second is 2 bytes in _length_. + +The assembly for this is actually simpler than dealing with words as we do not +need to convert between length/bytes. It is the same for `string` and `bytes`. + +```solidity +assembly ("memory-safe") { + // Assume baz_ is some bytes/string + let hash_ := keccak256( + // Skip the length prefix + add(baz_, 0x20), + // Read the length prefix to know how many _bytes_ to hash + mload(baz_) + ) +} +``` + +Note that pointers never appear in `bytes` nor `string`, or if they do, they are +not going to be dereferenced by our hashing logic. This assembly above is all +that is needed to hash `bytes` and `string` types. + +#### Handling pointers + +It would be pointless to hash pointers (no pun intended). A pointer is merely an +offset in memory, which has very little to do with the data on the other side of +it, and is not even deterministic. + +We find pointers in Solidity wherever something that is potentially larger than +1 word needs to fit in a single word slot. For example, any time a struct or +dynamic type is an item or field in another struct or dynamic type. + +Solidity does not allow mixed type lists so all pointers are at least found in +predictable positions. We always know at compile time whether something is a +pointer or not, either because it's a field at a known offset, or we are dealing +with an individual or list or pointers directly. + +To reliably handle pointers without allocations: + +- Compute the hash of all data up to the pointer +- Compute the hash of all data referenced by the pointer +- Hash these two hashes together + +Using our `Foo` struct from above as an example this would look like: + +- Hash the first two words as a contigious memory region of known size as `A` +- Hash the dynamic word list `foo_.c` as `B` +- Write `A` and `B` to scratch space at `0` and `0x20` respectively +- Hash the scratch space to produce `C` +- Hash the bytes `foo_.d` as `D` +- Write `C` and `D` to scratch space as above +- Hash the scratch space to produce `E`, which is our final hash of `Foo` + +As assembly it would look like + +```solidity +assembly ("memory-safe") { + // hash foo_.a and foo_.b together to produce hash A + // store A in scratch + mstore(0, keccak256(foo_, add(foo_, 0x40))) + + // Follow the pointer to hash foo_.c into B + let deref_ := mload(add(foo_, 0x60)) + // Store B in scratch + mstore(0x20, keccak256(add(deref_, 0x20), mul(mload(deref_), 0x20))) + + // Hash A and B to produce C which can be stored direct in scratch + mstore(0, keccak256(0, 0x40)) + + // Follow the pointer to hash foo_.d + deref_ := mload(add(foo_, 0x80)) + // Store D in scratch + mstore(0x20, keccak256(add(deref_, 0x20), mload(deref_))) + + // Write C and D to scratch to produce the final hash E + let E := keccak256(0, 0x40) +} +``` + +If we had a list of pointers, such as a `Foo[]` then this would be modelled as +a simple fold/reduce style accumulator where each item is hashed as above +individually then hashed into the accumulator. I.e. Hash `foos_[0]` to hash A, +then hash `foos_[1]` to hash B, then write both to scratch and hash to produce C, +then hash `foos_[2]` to hash D, and hash C and D to produce E, etc. + +This process of iterating and accumulating a hash incrementally seems to be about +40% cheaper in gas terms than ABI encoding then hashing, based on some simple +testing with Foundry. + +##### Nil hash prefix + +If we are handling a pointer and have no hash, e.g. we're directly hashing an +array of pointers, we start with the hash of nil bytes, i.e. `keccak256(0, 0)`. + +If the array is 0 length then the hash will be the nil hash, regardless of the +type behind the pointers. + +#### Security of composition + +Assume that we're comfortable with concepts like blockchains and merkle trees, +that rely on hashes of hashes to iteratively build a single hash out of a system +of hashes. + +We need to convince ourselves that the hashing process above is unambiguous for +all permutations. + +This relies on us accepting that `hash(hash(a) + hash(b))` will not collide with +`hash(hash(c) + hash(d))` for all values of `a`, `b`, `c`, `d` except the trivial +case where `a` = `c` and `b` = `d`. + +As long as `hash(x)` and `hash(x) + hash(y)` don't produce collisions then this +is true. This guarantee seems to come down to the strength of `keccak256` itself. + +As `keccak256` always produces hashes exactly 32 bytes long for all inputs, we avoid +all the issues seen with both including and excluding length prefixes, such as +those seen in `abi.encodePacked`. + +I'm not sure this constitutes a formal mathematical proof, but I'm not sure if +one exists for `abi.encode` either :) + +## Dev stuff + +### Local environment & CI + +Uses nixos. + +Install `nix develop` - https://nixos.org/download.html. + +Run `nix develop` in this repo to drop into the shell. Please ONLY use the nix +version of `foundry` for development, to ensure versions are all compatible. + +Read the `flake.nix` file to find some additional commands included for dev and +CI usage. + +## Legal stuff + +Everything is under DecentraLicense 1.0 (DCL-1.0) which can be found in `LICENSES/`. + +This is basically `CAL-1.0` which is an open source license +https://opensource.org/license/cal-1-0 + +The non-legal summary of DCL-1.0 is that the source is open, as expected, but +also user data in the systems that this code runs on must also be made available +to those users as relevant, and that private keys remain private. + +Roughly it's "not your keys, not your coins" aware, as close as we could get in +legalese. + +This is the default situation on permissionless blockchains, so shouldn't require +any additional effort by dev-users to adhere to the license terms. + +This repo is REUSE 3.2 compliant https://reuse.software/spec-3.2/ and compatible +with `reuse` tooling (also available in the nix shell here). + +``` +nix develop -c rainix-sol-legal +``` + +## Contributions + +Contributions are welcome **under the same license** as above. + +Contributors agree and warrant that their contributions are compliant. \ No newline at end of file diff --git a/dependencies/rain-lib-hash-0.1.0/src/LibHashNoAlloc.sol b/dependencies/rain-lib-hash-0.1.0/src/LibHashNoAlloc.sol new file mode 100644 index 00000000..262fa773 --- /dev/null +++ b/dependencies/rain-lib-hash-0.1.0/src/LibHashNoAlloc.sol @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @dev The keccak256 hash of the empty byte string, i.e. hash of no data. +bytes32 constant HASH_NIL = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; + +/// @title LibHashNoAlloc +/// @notice When producing hashes of just about anything that isn't already bytes +/// the common suggestions look something like `keccak256(abi.encode(...))` or +/// `keccak256(abi.encodePacked(...))` with the main differentiation being +/// whether dynamic data types are being hashed. If they are then there is a hash +/// collision risk in the packed case as `"abc" + "def"` and `"ab" + "cdef"` will +/// pack and therefore hash to the same values, the suggested fix commonly being +/// to use abi.encode, which includes the lengths disambiguating dynamic data. +/// Something like `3"abc" + 3"def"` with the length prefixes won't collide with +/// `2"ab" + 4"cdef"` but note that ABI provides neither a strong guarantee to +/// be collision resitant on inputs (as far as I know, it's a coincidence that +/// this works), nor an efficient solution. +/// +/// - Abi encoding is a complex algorithm that is easily 1k+ gas for simple +/// structs with just one or two dynamic typed fields. +/// - Abi encoding requires allocating and copying all the data plus a header to +/// a new region of memory, which gives it non-linearly increasing costs due to +/// memory expansion. +/// - Abi encoding can't easily be reproduced offchain without specialised tools, +/// it's not simply a matter of length prefixing some byte string and hashing +/// with keccak256, the heads and tails all need to be produced recursively +/// https://docs.soliditylang.org/en/develop/abi-spec.html#formal-specification-of-the-encoding +/// +/// Consider that `hash(hash("abc") + hash("def"))` won't collide with +/// `hash(hash("ab") + hash("cdef"))`. It should be easier to convince ourselves +/// this is true for all possible pairs of byte strings than it is to convince +/// ourselves that the ABI serialization is never ambigious. Inductively we can +/// scale this to all possible data structures that are ordered compositions of +/// byte strings. Even better, the native behaviour of `keccak256` in the EVM +/// requires no additional allocation of memory. Worst case scenario is that we +/// want to hash several hashes together like `hash(hash0, hash1, ...)`, in which +/// case we can write the words after the free memory pointer, hash them, but +/// leave the pointer. This way we pay for memory expansion but can re-use that +/// region of memory for subsequent logic, which may effectively make the +/// expansion free as we would have needed to pay for it anyway. Given that hash +/// checks often occur early in real world logic due to +/// checks-effects-interactions, this is not an unreasonable assumption to call +/// this kind of expansion "no alloc". +/// +/// One problem is that the gas saving for trivial abi encoding, +/// e.g. ~1-3 uint256 values, can be lost by the overhead of jumps and stack +/// manipulation due to function calls. +/// +/// ``` +/// struct Foo { +/// uint256 a; +/// address b; +/// uint32 c; +/// } +/// ``` +/// The simplest way to hash `Foo` is to just hash it (crazy, i know!). +/// +/// ``` +/// assembly ("memory-safe") { +/// hash_ := keccak256(foo_, 0x60) +/// } +/// ``` +/// Every struct field is 0x20 bytes in memory so 3 fields = 0x60 bytes to hash +/// always, with the exception of dynamic types. This costs about 70 gas vs. +/// about 350 gas for an abi encoding based approach. +library LibHashNoAlloc { + /// Hash bytes without allocating memory. + /// @param data The bytes to hash. + /// @return hash The keccak256 hash of the bytes. + function hashBytes(bytes memory data) internal pure returns (bytes32 hash) { + assembly ("memory-safe") { + hash := keccak256(add(data, 0x20), mload(data)) + } + } + + /// Hash an array of bytes32 words without allocating memory. + /// @param words The words to hash. + /// @return hash The keccak256 hash of the words. + function hashWords(bytes32[] memory words) internal pure returns (bytes32 hash) { + assembly ("memory-safe") { + hash := keccak256(add(words, 0x20), mul(mload(words), 0x20)) + } + } + + /// Hash an array of uint256 words without allocating memory. + /// @param words The words to hash. + /// @return hash The keccak256 hash of the words. + function hashWords(uint256[] memory words) internal pure returns (bytes32 hash) { + assembly ("memory-safe") { + hash := keccak256(add(words, 0x20), mul(mload(words), 0x20)) + } + } + + /// Combine two hashes into one by hashing their concatenation. + /// @param a The first hash. + /// @param b The second hash. + /// @return hash The combined hash. + function combineHashes(bytes32 a, bytes32 b) internal pure returns (bytes32 hash) { + assembly ("memory-safe") { + mstore(0, a) + mstore(0x20, b) + hash := keccak256(0, 0x40) + } + } +} diff --git a/dependencies/rain-lib-hash-0.1.0/test/LibHashNoAlloc.t.sol b/dependencies/rain-lib-hash-0.1.0/test/LibHashNoAlloc.t.sol new file mode 100644 index 00000000..9a8439ec --- /dev/null +++ b/dependencies/rain-lib-hash-0.1.0/test/LibHashNoAlloc.t.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibHashNoAlloc, HASH_NIL} from "../src/LibHashNoAlloc.sol"; +import {LibHashSlow} from "./LibHashSlow.sol"; + +contract LibHashNoAllocTest is Test { + function testHashNil() public pure { + bytes32 hashNil; + assembly ("memory-safe") { + hashNil := keccak256(0, 0) + } + assertEq(HASH_NIL, hashNil); + assertEq(HASH_NIL, keccak256("")); + } + + function testHashBytes(bytes memory bs) public pure { + assertEq(LibHashNoAlloc.hashBytes(bs), LibHashSlow.hashBytesSlow(bs)); + } + + function testHashBytesEmpty() public pure { + assertEq(LibHashNoAlloc.hashBytes(""), HASH_NIL); + } + + function testHashBytesGas0() public pure { + LibHashNoAlloc.hashBytes(""); + } + + function testHashBytesGasSlow0() public pure { + LibHashSlow.hashBytesSlow(""); + } + + function testHashBytesGas1() public pure { + LibHashNoAlloc.hashBytes(new bytes(0x200)); + } + + function testHashBytesGasSlow1() public pure { + LibHashSlow.hashBytesSlow(new bytes(0x200)); + } + + function testHashWords(bytes32[] memory words) public pure { + assertEq(LibHashNoAlloc.hashWords(words), LibHashSlow.hashWordsSlow(words)); + } + + function testHashWordsUint256(uint256[] memory words) public pure { + assertEq(LibHashNoAlloc.hashWords(words), LibHashSlow.hashWordsSlow(words)); + } + + function testHashWordsEmpty() public pure { + assertEq(LibHashNoAlloc.hashWords(new bytes32[](0)), HASH_NIL); + } + + function testHashWordsGas0() public pure { + LibHashNoAlloc.hashWords(new bytes32[](0)); + } + + function testHashWordsGasSlow0() public pure { + LibHashSlow.hashWordsSlow(new bytes32[](0)); + } + + function testHashWordsGas1() public pure { + LibHashNoAlloc.hashWords(new bytes32[](20)); + } + + function testHashWordsGasSlow1() public pure { + LibHashSlow.hashWordsSlow(new bytes32[](20)); + } + + function testCombineHashes(bytes32 a, bytes32 b) public pure { + assertEq(LibHashNoAlloc.combineHashes(a, b), LibHashSlow.combineHashesSlow(a, b)); + } + + function testCombineHashesGas0() public pure { + LibHashNoAlloc.combineHashes(bytes32(uint256(1)), bytes32(uint256(2))); + } + + function testCombineHashesGasSlow0() public pure { + LibHashSlow.combineHashesSlow(bytes32(uint256(1)), bytes32(uint256(2))); + } +} diff --git a/dependencies/rain-lib-hash-0.1.0/test/LibHashSlow.sol b/dependencies/rain-lib-hash-0.1.0/test/LibHashSlow.sol new file mode 100644 index 00000000..225f9221 --- /dev/null +++ b/dependencies/rain-lib-hash-0.1.0/test/LibHashSlow.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +library LibHashSlow { + function hashBytesSlow(bytes memory data) internal pure returns (bytes32) { + return keccak256(data); + } + + function hashWordsSlow(bytes32[] memory words) internal pure returns (bytes32) { + return keccak256(abi.encodePacked(words)); + } + + function hashWordsSlow(uint256[] memory words) internal pure returns (bytes32) { + return keccak256(abi.encodePacked(words)); + } + + function combineHashesSlow(bytes32 a, bytes32 b) internal pure returns (bytes32) { + return keccak256(abi.encodePacked(a, b)); + } +} diff --git a/dependencies/rain-lib-typecast-0.1.0/LICENSE b/dependencies/rain-lib-typecast-0.1.0/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-lib-typecast-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-lib-typecast-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-lib-typecast-0.1.0/README.md b/dependencies/rain-lib-typecast-0.1.0/README.md new file mode 100644 index 00000000..521fcef4 --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/README.md @@ -0,0 +1,14 @@ +# rain.lib.typecast + +Common casts and conversions between Solidity types that aren't natively possible +due to the Solidity compiler enforcing constraints or them being ambiguous and/or +unsafe generally. + +In this context a cast moves between Solidity types without changing the binary +data, it merely forces the type system to treat some type as another. For example +we have functions here to convert `uint256[]` to `bytes32[]` without changing any +of the internal values of the arrays. + +Conversions involve mutations to the binary data in the process of moving between +types. For example, moving from `uint256[]` to `bytes` involves mutating the +length of the collection even if the binary data values are unchanged. diff --git a/dependencies/rain-lib-typecast-0.1.0/src/LibCast.sol b/dependencies/rain-lib-typecast-0.1.0/src/LibCast.sol new file mode 100644 index 00000000..2e3485ff --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/src/LibCast.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @title LibCast +/// @notice Additional type casting logic that the Solidity compiler doesn't +/// give us by default. A type cast (vs. conversion) is considered one where the +/// structure is unchanged by the cast. The cast does NOT (can't) check that the +/// input is a valid output, for example any integer MAY be cast to a function +/// pointer but almost all integers are NOT valid function pointers. It is the +/// calling context that MUST ensure the validity of the data, the cast will +/// merely retype the data in place, generally without additional checks. +/// As most structures in solidity have the same memory structure as a `uint256` +/// or fixed/dynamic array of `uint256` there are many conversions that can be +/// done with near zero or minimal overhead. +library LibCast { + /// Retype an array of `uint256[]` to `address[]`. + /// @param us The array of integers to cast to addresses. + /// @return addresses The array of addresses cast from each integer. + function asAddressesArray(uint256[] memory us) internal pure returns (address[] memory addresses) { + assembly ("memory-safe") { + addresses := us + } + } + + /// Retype an array of `address[]` to `uint256[]`. + /// @param addresses The array of addresses to cast to integers. + /// @return us The array of integers cast from each address. + function asUint256Array(address[] memory addresses) internal pure returns (uint256[] memory us) { + assembly ("memory-safe") { + us := addresses + } + } + + /// Retype an array of `uint256[]` to `bytes32[]`. + /// @param us The array of integers to cast to 32 byte words. + /// @return b32s The array of 32 byte words. + function asBytes32Array(uint256[] memory us) internal pure returns (bytes32[] memory b32s) { + assembly ("memory-safe") { + b32s := us + } + } + + /// Retype an array of `bytes32[]` to `uint256[]`. + /// @param b32s The array of 32 byte words to cast to integers. + /// @return us The array of integers. + function asUint256Array(bytes32[] memory b32s) internal pure returns (uint256[] memory us) { + assembly ("memory-safe") { + us := b32s + } + } +} diff --git a/dependencies/rain-lib-typecast-0.1.0/src/LibConvert.sol b/dependencies/rain-lib-typecast-0.1.0/src/LibConvert.sol new file mode 100644 index 00000000..e24d5144 --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/src/LibConvert.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @title LibConvert +/// @notice Type conversions that require additional structural changes to +/// complete safely. These are NOT mere type casts and involve additional +/// reads and writes to complete, such as recalculating the length of an array. +/// The convention "toX" is adopted from Rust to imply the additional costs and +/// consumption of the source to produce the target. +library LibConvert { + /// Convert an array of integers to `bytes` data. This requires modifying + /// the length in situ as the integer array length is measured in 32 byte + /// increments while the length of `bytes` is the literal number of bytes. + /// + /// It is unsafe for the caller to use `us` after it has been converted to + /// bytes because there is now two pointers to the same mutable data + /// structure AND the length prefix for the `uint256[]` version is corrupt. + /// + /// @param us The integer array to convert to `bytes`. + /// @return bs The integer array converted to `bytes` data. + function unsafeToBytes(uint256[] memory us) internal pure returns (bytes memory bs) { + assembly ("memory-safe") { + bs := us + // Length in bytes is 32x the length in uint256 + mstore(bs, mul(0x20, mload(bs))) + } + } + + /// Truncate `uint256[]` values down to `uint16[]` then pack this to `bytes` + /// without padding or length prefix. Unsafe because the starting `uint256` + /// values are not checked for overflow due to the truncation. The caller + /// MUST ensure that all values fit in `type(uint16).max` or that silent + /// overflow is safe. + /// @param us The `uint256[]` to truncate and concatenate to 16 bit `bytes`. + /// @return The concatenated 2-byte chunks. + function unsafeTo16BitBytes(uint256[] memory us) internal pure returns (bytes memory) { + unchecked { + // We will keep 2 bytes (16 bits) from each integer. + bytes memory bs = new bytes(us.length * 2); + assembly ("memory-safe") { + let replaceMask := 0xFFFF + let preserveMask := not(replaceMask) + for { + let cursor := add(us, 0x20) + let end := add(cursor, mul(mload(us), 0x20)) + let bytesCursor := add(bs, 0x02) + } lt(cursor, end) { + cursor := add(cursor, 0x20) + bytesCursor := add(bytesCursor, 0x02) + } { + let data := mload(bytesCursor) + mstore(bytesCursor, or(and(preserveMask, data), and(replaceMask, mload(cursor)))) + } + } + return bs; + } + } +} diff --git a/dependencies/rain-lib-typecast-0.1.0/test/LibCast.t.sol b/dependencies/rain-lib-typecast-0.1.0/test/LibCast.t.sol new file mode 100644 index 00000000..89896b0a --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/test/LibCast.t.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibCast} from "../src/LibCast.sol"; + +contract LibCastTest is Test { + function testAddressesArrayRound0(uint256[] memory us) public pure { + assertEq(us, LibCast.asUint256Array(LibCast.asAddressesArray(us))); + } + + function testAddressesArrayRound1(address[] memory addresses) public pure { + assertEq(addresses, LibCast.asAddressesArray(LibCast.asUint256Array(addresses))); + } + + function testBytes32ArrayRound0(uint256[] memory us) public pure { + assertEq(us, LibCast.asUint256Array(LibCast.asBytes32Array(us))); + } + + function testBytes32ArrayRound1(bytes32[] memory b32s) public pure { + bytes32[] memory round_ = LibCast.asBytes32Array(LibCast.asUint256Array(b32s)); + + for (uint256 i = 0; i < b32s.length; i++) { + assertEq(b32s[i], round_[i]); + } + } +} diff --git a/dependencies/rain-lib-typecast-0.1.0/test/LibConvert.t.sol b/dependencies/rain-lib-typecast-0.1.0/test/LibConvert.t.sol new file mode 100644 index 00000000..1553fdb8 --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/test/LibConvert.t.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibConvert} from "../src/LibConvert.sol"; +import {LibConvertSlow} from "./LibConvertSlow.sol"; + +contract LibConvertTest is Test { + function testUnsafeToBytesReferenceImplementation(uint256[] memory us) public pure { + assertEq( + // Note the order of these calls is important because the unsafe call + // is unsafe, i.e. the `us` can no longer be used. + LibConvertSlow.toBytesSlow(us), + LibConvert.unsafeToBytes(us) + ); + } + + function testUnsafeTo16BitBytesReferenceImplementation(uint256[] memory us) public pure { + assertEq( + // Note the order of these calls is important because the unsafe call + // is unsafe, i.e. the `us` can no longer be used. + LibConvertSlow.to16BitBytesSlow(us), + LibConvert.unsafeTo16BitBytes(us) + ); + } +} diff --git a/dependencies/rain-lib-typecast-0.1.0/test/LibConvertSlow.sol b/dependencies/rain-lib-typecast-0.1.0/test/LibConvertSlow.sol new file mode 100644 index 00000000..777a6a38 --- /dev/null +++ b/dependencies/rain-lib-typecast-0.1.0/test/LibConvertSlow.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +library LibConvertSlow { + function toBytesSlow(uint256[] memory us) internal pure returns (bytes memory) { + return abi.encodePacked(us); + } + + function to16BitBytesSlow(uint256[] memory us) internal pure returns (bytes memory) { + bytes memory ret = new bytes(0); + for (uint256 i = 0; i < us.length; i++) { + ret = bytes.concat(ret, bytes2(uint16(us[i]))); + } + return ret; + } +} diff --git a/dependencies/rain-math-float-0.1.1/Cargo.lock b/dependencies/rain-math-float-0.1.1/Cargo.lock new file mode 100644 index 00000000..ec0df6b2 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/Cargo.lock @@ -0,0 +1,4953 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addchain" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" +dependencies = [ + "num-bigint 0.3.3", + "num-integer", + "num-traits", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alloy" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0093d23bf026b580c1f66ed3a053d8209c104a446c5264d3ad99587f6edef24e" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-json-rpc", + "alloy-network", + "alloy-provider", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", +] + +[[package]] +name = "alloy-chains" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9cc9d81ace3da457883b0bdf76776e55f1b84219a9e9d55c27ad308548d3f" +dependencies = [ + "alloy-primitives", + "num_enum", + "strum", +] + +[[package]] +name = "alloy-consensus" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad451f9a70c341d951bca4e811d74dbe1e193897acd17e9dbac1353698cc430b" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-trie", + "arbitrary", + "auto_impl", + "c-kzg", + "derive_more", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "secp256k1", + "serde", + "serde_with", + "thiserror", +] + +[[package]] +name = "alloy-consensus-any" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142daffb15d5be1a2b20d2cd540edbcef03037b55d4ff69dc06beb4d06286dba" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "arbitrary", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf25443920ecb9728cb087fe4dc04a0b290bd6ac85638c58fe94aba70f1a44e" +dependencies = [ + "alloy-consensus", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror", +] + +[[package]] +name = "alloy-core" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5968f48d7a62587cd874bd84034831da4f7f577ce5de984828e376766efc0f32" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9135eb501feccf7f4cb8a183afd406a65483fdad7bbd7332d0470e5d725c92f" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "arbitrary", + "derive_arbitrary", + "itoa", + "proptest", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-eip2124" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "crc", + "rand 0.8.5", + "serde", + "thiserror", +] + +[[package]] +name = "alloy-eip2930" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b82752a889170df67bbb36d42ca63c531eb16274f0d7299ae2a680facba17bd" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d4769c6ffddca380b0070d71c8b7f30bed375543fe76bb2f74ec0acf4b7cd16" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "k256", + "rand 0.8.5", + "serde", + "thiserror", +] + +[[package]] +name = "alloy-eips" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3056872f6da48046913e76edb5ddced272861f6032f09461aea1a2497be5ae5d" +dependencies = [ + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "arbitrary", + "auto_impl", + "c-kzg", + "derive_more", + "either", + "serde", + "sha2 0.10.9", +] + +[[package]] +name = "alloy-genesis" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c98fb40f07997529235cc474de814cd7bd9de561e101716289095696c0e4639d" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "alloy-trie", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b26fdd571915bafe857fccba4ee1a4f352965800e46a53e4a5f50187b7776fa" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc08b31ebf9273839bd9a01f9333cbb7a3abb4e820c312ade349dd18bdc79581" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed117b08f0cc190312bf0c38c34cf4f0dabfb4ea8f330071c587cd7160a88cb2" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "derive_more", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-network-primitives" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7162ff7be8649c0c391f4e248d1273e85c62076703a1f3ec7daf76b283d886d" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a326d47106039f38b811057215a92139f46eef7983a4b77b10930a0ea5685b1e" +dependencies = [ + "alloy-rlp", + "arbitrary", + "bytes", + "cfg-if", + "const-hex", + "derive_arbitrary", + "derive_more", + "foldhash", + "hashbrown 0.15.4", + "indexmap 2.9.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "proptest-derive", + "rand 0.9.1", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84eba1fd8b6fe8b02f2acd5dd7033d0f179e304bd722d11e817db570d1fa6c4" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-signer", + "alloy-sol-types", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "either", + "futures", + "futures-utils-wasm", + "lru", + "parking_lot", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "alloy-rpc-client" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518a699422a3eab800f3dac2130d8f2edba8e4fff267b27a9c7dc6a2b0d313ee" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "tracing-futures", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c000cab4ec26a4b3e29d144e999e1c539c2fa0abed871bf90311eb3466187ca8" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-engine", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "508b2fbe66d952089aa694e53802327798806498cd29ff88c75135770ecaabfc" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-engine" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab52691970553d84879d777419fa7b6a2e92e9fe8641f9324cc071008c2f656" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "arbitrary", + "derive_more", + "rand 0.8.5", + "serde", + "strum", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf7dff0fdd756a714d58014f4f8354a1706ebf9fa2cf73431e0aeec3c9431e" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "arbitrary", + "itertools 0.14.0", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "alloy-serde" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "730e8f2edf2fc224cabd1c25d090e1655fa6137b2e409f92e5eec735903f1507" +dependencies = [ + "alloy-primitives", + "arbitrary", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0d2428445ec13edc711909e023d7779618504c4800be055a5b940025dbafe3" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "either", + "elliptic-curve", + "k256", + "thiserror", +] + +[[package]] +name = "alloy-signer-local" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14fe6fedb7fe6e0dfae47fe020684f1d8e063274ef14bca387ddb7a6efa8ec1" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4be1ce1274ddd7fdfac86e5ece1b225e9bba1f2327e20fbb30ee6b9cc1423fe" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e92f3708ea4e0d9139001c86c051c538af0146944a2a9c7181753bd944bf57" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap 2.9.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.103", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afe1bd348a41f8c9b4b54dfb314886786d6201235b0b3f47198b9d910c86bb2" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck", + "macro-string", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.103", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6195df2acd42df92a380a8db6205a5c7b41282d0ce3f4c665ecf7911ac292f1" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6185e98a79cf19010722f48a74b5a65d153631d2f038cabd250f4b9e9813b8ad" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a712bdfeff42401a7dd9518f72f617574c36226a9b5414537fedc34350b73bf9" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "base64", + "derive_more", + "futures", + "futures-utils-wasm", + "parking_lot", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ea5a76d7f2572174a382aedf36875bedf60bcc41116c9f031cf08040703a2dc" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-trie" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arbitrary", + "arrayvec", + "derive_arbitrary", + "derive_more", + "nybbles", + "proptest", + "proptest-derive", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "ark-bls12-381" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df4dcc01ff89867cd86b0da835f23c3f02738353aaee7dde7495af71363b8d5" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-bn254" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-r1cs-std", + "ark-std 0.5.0", +] + +[[package]] +name = "ark-ec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-poly", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", + "itertools 0.13.0", + "num-bigint 0.4.6", + "num-integer", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint 0.4.6", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" +dependencies = [ + "ark-ff-asm 0.5.0", + "ark-ff-macros 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "educe", + "itertools 0.13.0", + "num-bigint 0.4.6", + "num-traits", + "paste", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" +dependencies = [ + "quote", + "syn 2.0.103", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "ark-poly" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" +dependencies = [ + "ahash", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "ark-std 0.5.0", + "educe", + "fnv", + "hashbrown 0.15.4", +] + +[[package]] +name = "ark-r1cs-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941551ef1df4c7a401de7068758db6503598e6f01850bdb2cfdb614a1f9dbea1" +dependencies = [ + "ark-ec", + "ark-ff 0.5.0", + "ark-relations", + "ark-std 0.5.0", + "educe", + "num-bigint 0.4.6", + "num-integer", + "num-traits", + "tracing", +] + +[[package]] +name = "ark-relations" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec46ddc93e7af44bcab5230937635b06fb5744464dd6a7e7b083e80ebd274384" +dependencies = [ + "ark-ff 0.5.0", + "ark-std 0.5.0", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-serialize" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" +dependencies = [ + "ark-serialize-derive", + "ark-std 0.5.0", + "arrayvec", + "digest 0.10.7", + "num-bigint 0.4.6", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "aurora-engine-modexp" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518bc5745a6264b5fd7b09dffb9667e400ee9e2bbe18555fac75e1fe9afa0df9" +dependencies = [ + "hex", + "num", +] + +[[package]] +name = "auto_impl" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "serde", + "tap", + "wyz", +] + +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blst" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd49896f12ac9b6dcd7a5998466b9b58263a695a3dd1ecc1aaca2e12a90b080" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7318cfa722931cb5fe0838b98d3ce5621e75f6a6408abc21721d80de9223f2e4" +dependencies = [ + "arbitrary", + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "cc" +version = "1.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "chrono" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + +[[package]] +name = "const-hex" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.103", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive-where" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73f2692d4bd3cac41dca28934a39894200c9fabf49586d77d0e5954af1d7902" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] + +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "byteorder", + "ff_derive", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "ff_derive" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f10d12652036b0e99197587c6ba87a8fc3031986499973c030d8b44fcc151b60" +dependencies = [ + "addchain", + "num-bigint 0.3.3", + "num-integer", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "gcd" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +dependencies = [ + "arbitrary", + "equivalent", + "hashbrown 0.15.4", + "serde", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2 0.10.9", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "kzg-rs" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9201effeea3fcc93b587904ae2df9ce97e433184b9d6d299e9ebc9830a546636" +dependencies = [ + "ff", + "hex", + "serde_arrays", + "sha2 0.10.9", + "sp1_bls12_381", + "spin", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.172" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libsecp256k1" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139" +dependencies = [ + "arrayref", + "base64", + "digest 0.9.0", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde", + "sha2 0.9.9", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.4", +] + +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint 0.4.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint 0.4.6", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "nybbles" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" +dependencies = [ + "alloy-rlp", + "arbitrary", + "const-hex", + "proptest", + "serde", + "smallvec", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.9", +] + +[[package]] +name = "p3-baby-bear" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7521838ecab2ddf4f7bc4ceebad06ec02414729598485c1ada516c39900820e8" +dependencies = [ + "num-bigint 0.4.6", + "p3-field", + "p3-mds", + "p3-poseidon2", + "p3-symmetric", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "p3-dft" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46414daedd796f1eefcdc1811c0484e4bced5729486b6eaba9521c572c76761a" +dependencies = [ + "p3-field", + "p3-matrix", + "p3-maybe-rayon", + "p3-util", + "tracing", +] + +[[package]] +name = "p3-field" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48948a0516b349e9d1cdb95e7236a6ee010c44e68c5cc78b4b92bf1c4022a0d9" +dependencies = [ + "itertools 0.12.1", + "num-bigint 0.4.6", + "num-traits", + "p3-util", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "p3-matrix" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e4de3f373589477cb735ea58e125898ed20935e03664b4614c7fac258b3c42f" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "p3-maybe-rayon", + "p3-util", + "rand 0.8.5", + "serde", + "tracing", +] + +[[package]] +name = "p3-maybe-rayon" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3968ad1160310296eb04f91a5f4edfa38fe1d6b2b8cd6b5c64e6f9b7370979e" + +[[package]] +name = "p3-mds" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2356b1ed0add6d5dfbf7a338ce534a6fde827374394a52cec16a0840af6e97c9" +dependencies = [ + "itertools 0.12.1", + "p3-dft", + "p3-field", + "p3-matrix", + "p3-symmetric", + "p3-util", + "rand 0.8.5", +] + +[[package]] +name = "p3-poseidon2" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da1eec7e1b6900581bedd95e76e1ef4975608dd55be9872c9d257a8a9651c3a" +dependencies = [ + "gcd", + "p3-field", + "p3-mds", + "p3-symmetric", + "rand 0.8.5", + "serde", +] + +[[package]] +name = "p3-symmetric" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edb439bea1d822623b41ff4b51e3309e80d13cadf8b86d16ffd5e6efb9fdc360" +dependencies = [ + "itertools 0.12.1", + "p3-field", + "serde", +] + +[[package]] +name = "p3-util" +version = "0.2.3-succinct" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c2c2010678b9332b563eaa38364915b585c1a94b5ca61e2c7541c087ddda5c" +dependencies = [ + "serde", +] + +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group", +] + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "lazy_static", + "num-traits", + "rand 0.9.1", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "proptest-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rain-math-float" +version = "0.1.1-alpha.2" +dependencies = [ + "alloy", + "anyhow", + "getrandom 0.2.16", + "proptest", + "revm", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen-utils", +] + +[[package]] +name = "rain-math-float-wasm" +version = "0.1.0" +dependencies = [ + "rain-math-float", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", + "serde", +] + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.3", +] + +[[package]] +name = "redox_syscall" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.12.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabf4c97d9130e2bf606614eb937e86edac8292eaa6f422f995d7e8de1eb1813" +dependencies = [ + "base64", + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "revm" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08fd78df29217546ddfd587fe313aff2bf86e57cfe0f18d16cb326d9f50ba54d" +dependencies = [ + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database", + "revm-database-interface", + "revm-handler", + "revm-inspector", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "revm-state", +] + +[[package]] +name = "revm-bytecode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "942fe4724cf552fd28db6b0a2ca5b79e884d40dd8288a4027ed1e9090e0c6f49" +dependencies = [ + "bitvec", + "once_cell", + "phf", + "revm-primitives", + "serde", +] + +[[package]] +name = "revm-context" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190f211f04c8030f5393cfcfa1569b88d5649f0f266bf4291981ba879fa6c5d1" +dependencies = [ + "cfg-if", + "derive-where", + "revm-bytecode", + "revm-context-interface", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-context-interface" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42b7e7ff1154e6460cec025fe20dfe45f3325bbb905718643b6d053ec49da6e8" +dependencies = [ + "alloy-eip2930", + "alloy-eip7702", + "auto_impl", + "either", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9456d5cb165fef91c8b538d0115de50059d1cf352d160a1396894eac017a2a34" +dependencies = [ + "alloy-eips", + "revm-bytecode", + "revm-database-interface", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-database-interface" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaeb608de31bfd0e64bf9b5b18ee70ac70094c8c045b28ae8ae8701608d17d34" +dependencies = [ + "auto_impl", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-handler" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfeaecd909e6be655c36d21032ca932b347e60ec5849ee29e670d63aa97b6adb" +dependencies = [ + "auto_impl", + "revm-bytecode", + "revm-context", + "revm-context-interface", + "revm-database-interface", + "revm-interpreter", + "revm-precompile", + "revm-primitives", + "revm-state", + "serde", +] + +[[package]] +name = "revm-inspector" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de1c6cddc7d62364dc9fa2f405c2c4637c933c5591addf09977ec8a156e4b23" +dependencies = [ + "auto_impl", + "revm-context", + "revm-database-interface", + "revm-handler", + "revm-interpreter", + "revm-primitives", + "revm-state", + "serde", + "serde_json", +] + +[[package]] +name = "revm-interpreter" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c3ca670eee335d9268a9100932ec1e09638bdd9b31eac9e22dec4de00f2cba" +dependencies = [ + "revm-bytecode", + "revm-context-interface", + "revm-primitives", + "serde", +] + +[[package]] +name = "revm-precompile" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4330c6982a2ef1d318cb10ce7e726a64e11e44fe1eac29d055de849a5e1e080e" +dependencies = [ + "ark-bls12-381", + "ark-bn254", + "ark-ec", + "ark-ff 0.5.0", + "ark-serialize 0.5.0", + "aurora-engine-modexp", + "blst", + "c-kzg", + "cfg-if", + "k256", + "kzg-rs", + "libsecp256k1", + "once_cell", + "p256", + "revm-primitives", + "ripemd", + "secp256k1", + "sha2 0.10.9", +] + +[[package]] +name = "revm-primitives" +version = "19.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c1588093530ec4442461163be49c433c07a3235d1ca6f6799fef338dacc50d3" +dependencies = [ + "alloy-primitives", + "num_enum", + "serde", +] + +[[package]] +name = "revm-state" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44320ccf53067136a83cdbc54f4b7529e8f61497666f31d6f5cfd9035a1cc08f" +dependencies = [ + "bitflags", + "revm-bytecode", + "revm-primitives", + "serde", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "ruint" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" +dependencies = [ + "alloy-rlp", + "arbitrary", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint 0.4.6", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rand 0.9.1", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rustc-demangle" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.26", +] + +[[package]] +name = "rustix" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[package]] +name = "semver-parser" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_arrays" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94a16b99c5ea4fe3daccd14853ad260ec00ea043b2708d1fd1da3106dcd8d9df" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "serde_derive_internals" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e578a843d40b4189a4d66bba51d7684f57da5bd7c304c64e14bd63efbef49509" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "indexmap 2.9.0", + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.9.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "arbitrary", + "serde", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "sp1-lib" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03046db52868c1b60e8acffa0777ef6dc11ec1bbbb10b9eb612a871f69c8d3f6" +dependencies = [ + "bincode", + "serde", + "sp1-primitives", +] + +[[package]] +name = "sp1-primitives" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6939d6b2f63e54e5fbd208a0293027608f22511741b62fe32b6f67f6c144e0c0" +dependencies = [ + "bincode", + "blake3", + "cfg-if", + "hex", + "lazy_static", + "num-bigint 0.4.6", + "p3-baby-bear", + "p3-field", + "p3-poseidon2", + "p3-symmetric", + "serde", + "sha2 0.10.9", +] + +[[package]] +name = "sp1_bls12_381" +version = "0.8.0-sp1-5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac255e1704ebcdeec5e02f6a0ebc4d2e9e6b802161938330b6810c13a610c583" +dependencies = [ + "cfg-if", + "ff", + "group", + "pairing", + "rand_core 0.6.4", + "sp1-lib", + "subtle", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.103", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c8c8f496c33dc6343dac05b4be8d9e0bca180a4caa81d7b8416b10cc2273cd" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.9.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1ffbcf9c6f6b99d386e7444eb608ba646ae452a36b39737deb9663b610f662" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "tracing-core", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tsify" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b26cf145f2f3b9ff84e182c448eaf05468e247f148cf3d2a7d67d78ff023a0" +dependencies = [ + "serde", + "serde-wasm-bindgen 0.5.0", + "tsify-macros", + "wasm-bindgen", +] + +[[package]] +name = "tsify-macros" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a94b0f0954b3e59bfc2c246b4c8574390d94a4ad4ad246aaf2fb07d7dfd3b47" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.103", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.103", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-bindgen-utils" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbbd367f4921f4e3291bc0e789de16303a2dcfcf8b3b11e0c21f4ed4cefba93" +dependencies = [ + "js-sys", + "paste", + "serde", + "serde-wasm-bindgen 0.6.5", + "tsify", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-utils-macros", +] + +[[package]] +name = "wasm-bindgen-utils-macros" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fed599c9e990172750babd2e8b880c70bb796b170ff3f1ae0b8aed16279303a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "wasmtimer" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.103", +] diff --git a/dependencies/rain-math-float-0.1.1/Cargo.toml b/dependencies/rain-math-float-0.1.1/Cargo.toml new file mode 100644 index 00000000..e0a2f43d --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/Cargo.toml @@ -0,0 +1,21 @@ +[workspace] +members = ["crates/*"] +resolver = "2" + +[workspace.package] +edition = "2024" +version = "0.1.0" +license = "LicenseRef-DCL-1.0" +homepage = "https://github.com/rainlanguage/rain.math.float" +repository = "https://github.com/rainlanguage/rain.math.float" + +[workspace.dependencies] +alloy = { version = "1.0.9", features = ["sol-types", "json-rpc"] } +revm = { version = "25.0.0", default-features = false, features = [ + "portable", + "std", + "tracer", +] } +thiserror = "2.0.12" +proptest = "1.7.0" +serde = "1.0.219" diff --git a/dependencies/rain-math-float-0.1.1/LICENSE b/dependencies/rain-math-float-0.1.1/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-math-float-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-math-float-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-math-float-0.1.1/README.md b/dependencies/rain-math-float-0.1.1/README.md new file mode 100644 index 00000000..f5f063a7 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/README.md @@ -0,0 +1,224 @@ +# rain.math.float + +Decimal floating point math implemented in Solidity/Yul. + +## Context + +IEEE 754 Floating point math such as is used by JavaScript is usually bad in +finance for a few reasons. + +- The decimal representations of amounts and prices of things don't have exact + representations in the underlying binary +- Mathematical nonsense like dividing by 0 gives "special" values like `Infinity` + and `NaN` which then propagate throughout business logic rather than erroring +- There are more "special" values like `-0` that works just like `0` except when + it doesn't. + +This lib provides decimal floats that error upon nonsense and have no concept of +special values. + +Everything you can type into a webform, or Rainlang, etc. that fits into 224 bit +coefficient with 32 bit exponent (huge values for both) will be exactly +represented. + +This doesn't mean the floating point math is perfect, for example 1/3 will still +be some imprecise rounded 0.3333... value as we don't have infinite precision. + +It does mean that `0.2+0.7` is `0.9` rather than `0.8999999999999999` because the +fractional values use decimal exponents rather than binary exponents. +Specifically it means that anything you can read and write as a decimal number +has an exact and distinct value onchain. + +e.g. `0.2` internally is something like `2e-1` and `0.7` is `7e-1` so internally +the result is `2+7` which is `9` with an exponent of `-1`. + +The following situations are handled correctly in rain floats: + +- Parseable and formattable strings always map to an _exact_ value and are never + approximated/rounded/estimated +- Two different strings representing distinct numbers always map to different + values + - e.g. 0e5 and 0e15 have the same numeric value and so do 10e1 and 1e2 but + different numeric value always means different onchain value +- Two numerically different values always format canonically to two different + strings +- Every valid string has an associated numerical onchain value +- Every numerical onchain value has a unique canonical string to represent it + +## Rounding vs. erroring vs. approximating + +Simply having an exact representation for every number we can write does not mean +we have exact representations for all the outputs. E.g. 1/3. + +### Rounding + +#### Rounding direction + +The library would be non functional if we errored every time that a calculation +resulted in an imprecise answer, so instead we round as necessary. + +Internal calculations all necessarily use EVM logic and so inherit all the +EVM behaviour such as rounding directions. + + For example [Solidity division docs](https://docs.soliditylang.org/en/latest/types.html#division) +> Since the type of the result of an operation is always the type of one of the +> operands, division on integers always results in an integer. In Solidity, +> division rounds towards zero. +> This means that `int256(-5) / int256(2) == int256(-2)`. + +#### Approach to preserving precision + +For basic mul/div/add/sub behaviour the library aligns exponents and uses 512 bit +logic for intermediate calculations as much as possible to ensure the final +values are as precise as possible, despite potentially inevitable precision loss. + +For example, 1/3 yields `0.3333333333333333333333333333333333333333333333333333333333333333333333333333` +because internally first `1` is represented as `1e152` in 512 bits and 3 becomes +`3e76` so when we divide back into 256 bits we retain the full 76 digits +representable in signed 256 bit values. + +Note that 10/3 has the same coefficient as 1/3, but a different exponent so the +precision is decoupled from the scale of the result. + +This approach is necessary to get useful results from scenarios such as +`( 1 / 9 ) / ( 1 / 3 ) == 0.33..` and `( 1 / 3 ) / (1 / 9) == 3` where precision +loss quickly compounds to incorrect final values. + +#### Exponent underflow + +When the exponent _underflows_ this means that the float is `Xe-Y` where `Y` is +some very large negative number, which means the float represents a number +extremely close to zero. + +In these cases we chose to _lose precision_ by rounding towards zero rather than +erroring. + +This is because in _absolute_ terms, no matter how much the exponent is +underflowing by, the numerical value is changing by increasingly negligible +amounts. + +This contrasts with the overflow case (error) where the size of the exponent +overflow is losing exponentially more information if it is allowed to decapitate +the coefficient, as the exponent grows (see below). + +#### Packing 2x signed ints into 1x signed int + +For most low level operations where it possibly makes a difference we keep both +the exponent and signed coefficient in 2 separate `int256` values. The external +interface to the lib doesn't expose this or expect downstream dev-users to be +aware of how/when to use the unpacked form of floats. + +The external interface provides a single 32 byte `Float` type that encodes the +exponent and signed coefficient together into a single value. + +Necessarily there will be cases where packing 2 values into a single value of the +same size results in loss of information. + +The information loss follows the rules explained here, truncation is allowed and +rounds towards zero, exponents may underflow and exponent overflows will error. + +There is a "lossless" version of packing provided in the library interface that +doesn't magically resolve the information loss but converts all precision loss +into an error condition. + +The lossy version simply returns a bool alongside the packed `Float` that +signifies whether the packing was lossy or not, to allow the caller to make +additional judgement calls re: when precision loss is acceptable. + +#### Fixed decimal conversions + +There are some convenience methods in the lib for converting to/from fixed +decimal schemes, as these are by far the dominant convention in defi. Most +typical will be converting to/from an 18 decimal fixed point value, and/or +to/from token and oracle amounts that define their own decimal fixed point scale. + +The summary is that these conversions work like packing does, we preserve all +information if possible, and then may truncate/error if that is not possible +due to fundamental constraints on the information we can store. + +### Erroring + +#### Exponent overflow (no infinities) + +When exponents _overflow_ this means the number that we are attempting to +represent cannot fit into the binary represenation that we have (assuming the +coefficient is also maximized and so we cannot shift magnitude from exponent +space to coefficient space). + +In this case we error because decapitating the coefficient is an extreme loss of +information that doesn't converge on any particular value that we could round +towards. + +This is _different to how floats usually work_ where a sufficiently large number +would be converted to the special `Infinity` or `-Infinity` values. We DO NOT do +this, better to error than start talking infinities when money is being handled. + +#### Other overflows + +Other values than the exponent can also overflow in more niche/situational +scenarios, such as the intermediate calculations moving between 512 and 256 bits +for multiplication and division. These will also error rather than truncate/round +because information loss from overflow doesn't converge to a predictable value. + +#### Uncalculable values (no NaN) + +There are many cases where mathematical operations cannot produce a meaningful +finite output. The classic example is division by 0. Standard floats will try to +produce `Infinity`, `-Infinity` for `-0` division, or `NaN` for other impossible +operations. + +Instead we simply error, ideally with a meaningful unique error selector so that +downstream consumers can hope to trace the cause of the error. + +Other examples include: + +- Taking the log of `0` +- Taking the log of a negative number +- Raising `0` to a negative number +- Internal overflows during intermediate calculations + +#### Unimplemented math + +There are some situations where certain operations on some numeric ranges has +not been implemented and here we error. + +Most notable is that we do not currently support powers of negative number bases +as this often results in complex numbers rather than real numbers. + +[rainlanguage/rain.math.float#88](https://github.com/rainlanguage/rain.math.float/issues/88) + +#### Parsing/formatting issues + +All parsing/formatting issues that introduce ambiguity or precision loss are +treated as an error. This is because parsing and formatting is expected to be a +"compile time" operation, and more importantly, all potentially ambiguous aspects +are in full control of the user. + +There should be no situation where there is a disconnect between the value being +parsed/formatted and the provenance of the value, such that an error cannot +inform a valid revaluation by the author. + +#### Lossy conversions in "lossless" mode + +As mentioned above, some conversions like packing and moving to fixed decimals, +are necessarily potentially lossy operations. + +When these operations are run in lossless mode they error on information loss +rather than simply return a bool, with a standard default error message. + +### Approximations + +The log/pow calculations are not simply truncated on precision loss, they are +inherently approximations in many cases. + +For example, `pow` will accurately calculate an integer exponent using the +exponentiation by squaring method, but non-integer exponents use a hybrid lookup +table to approximate the fractional component of the exponent calculation. + +Log and antilog calculations don't even do the exponentiation by squaring, they +simply use lookup tables directly. + +The approximation quality is inherently limited by both the size of the log +tables (deployed deterministically onchain as data contracts) and the +interpolation method between exact lookup hits. Currently we use a linear +interpolation which is the least accurate option, but most gas efficient. diff --git a/dependencies/rain-math-float-0.1.1/script/BuildPointers.sol b/dependencies/rain-math-float-0.1.1/script/BuildPointers.sol new file mode 100644 index 00000000..3e0d9339 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/script/BuildPointers.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Script} from "forge-std-1.16.1/src/Script.sol"; +import {LibCodeGen} from "rain-sol-codegen-0.1.0/src/lib/LibCodeGen.sol"; +import {LibFs} from "rain-sol-codegen-0.1.0/src/lib/LibFs.sol"; +import {LibLogTable} from "../src/lib/table/LibLogTable.sol"; + +contract BuildPointers is Script { + function run() external { + LibFs.buildFileForContract( + vm, + address(0), + "LogTables", + string.concat( + LibCodeGen.bytesConstantString( + vm, "/// @dev Log tables.", "LOG_TABLES", LibLogTable.toBytes(LibLogTable.logTableDec()) + ), + LibCodeGen.bytesConstantString( + vm, + "/// @dev Log tables small.", + "LOG_TABLES_SMALL", + LibLogTable.toBytes(LibLogTable.logTableDecSmall()) + ), + LibCodeGen.bytesConstantString( + vm, + "/// @dev Log tables small alt.", + "LOG_TABLES_SMALL_ALT", + LibLogTable.toBytes(LibLogTable.logTableDecSmallAlt()) + ), + LibCodeGen.bytesConstantString( + vm, + "/// @dev Anti log tables.", + "ANTI_LOG_TABLES", + LibLogTable.toBytes(LibLogTable.antiLogTableDec()) + ), + LibCodeGen.bytesConstantString( + vm, + "/// @dev Anti log tables small.", + "ANTI_LOG_TABLES_SMALL", + LibLogTable.toBytes(LibLogTable.antiLogTableDecSmall()) + ) + ) + ); + } +} diff --git a/dependencies/rain-math-float-0.1.1/script/CopyArtifacts.sol b/dependencies/rain-math-float-0.1.1/script/CopyArtifacts.sol new file mode 100644 index 00000000..b55ead67 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/script/CopyArtifacts.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Script} from "forge-std-1.16.1/src/Script.sol"; +import {LibCopyArtifacts} from "./lib/LibCopyArtifacts.sol"; + +contract CopyArtifacts is Script { + function run() external { + string[] memory names = LibCopyArtifacts.contracts(); + for (uint256 i = 0; i < names.length; i++) { + _copyAbi(names[i]); + } + } + + function _copyAbi(string memory contractName) internal { + bytes memory artifact = LibCopyArtifacts.extractStable(vm, contractName); + string memory dst = LibCopyArtifacts.committedPath(contractName); + if (vm.exists(dst)) { + //forge-lint: disable-next-line(unsafe-cheatcode) + vm.removeFile(dst); + } + //forge-lint: disable-next-line(unsafe-cheatcode) + vm.writeFile(dst, string(artifact)); + } +} diff --git a/dependencies/rain-math-float-0.1.1/script/Deploy.sol b/dependencies/rain-math-float-0.1.1/script/Deploy.sol new file mode 100644 index 00000000..47ad15b5 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/script/Deploy.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Script} from "forge-std-1.16.1/src/Script.sol"; +import {LibDataContract} from "rain-datacontract-0.1.0/src/lib/LibDataContract.sol"; +import {LibDecimalFloatDeploy} from "../src/lib/deploy/LibDecimalFloatDeploy.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; +import {DecimalFloat} from "../src/concrete/DecimalFloat.sol"; +import {LibEtchLogTables} from "./lib/LibEtchLogTables.sol"; + +/// @dev Hash of the "log-tables" deployment suite string. When the +/// `DEPLOYMENT_SUITE` env var is set to "log-tables", the script deploys the +/// log/antilog lookup tables as a data contract. +bytes32 constant DEPLOYMENT_SUITE_TABLES = keccak256("log-tables"); + +/// @dev Hash of the "decimal-float" deployment suite string. When the +/// `DEPLOYMENT_SUITE` env var is set to "decimal-float" (or omitted, as it is +/// the default), the script deploys the DecimalFloat contract. +bytes32 constant DEPLOYMENT_SUITE_CONTRACT = keccak256("decimal-float"); + +contract Deploy is Script { + mapping(string => mapping(address => bytes32)) internal sDepCodeHashes; + + function run() external { + uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); + + bytes32 suite = keccak256(bytes(vm.envOr("DEPLOYMENT_SUITE", string("decimal-float")))); + if (suite == DEPLOYMENT_SUITE_TABLES) { + LibRainDeploy.deployAndBroadcast( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + LibDataContract.contractCreationCode(LibDecimalFloatDeploy.combinedTables()), + "", + LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS, + LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH, + new address[](0), + sDepCodeHashes + ); + } else if (suite == DEPLOYMENT_SUITE_CONTRACT) { + // DecimalFloat's constructor calls + // LibDecimalFloatDeploy.checkLogTablesDeployed(), which reads + // extcodesize/codehash at ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS. + // The simulation pass runs before the broadcast pass, so if + // log-tables hasn't actually been deployed yet on this chain + // the simulation reverts. Plant the runtime bytecode locally + // so simulation matches the post-broadcast on-chain state. + if (LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.code.length == 0) { + LibEtchLogTables.etchLogTables(vm); + } + + address[] memory decimalFloatDependencies = new address[](1); + decimalFloatDependencies[0] = LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS; + LibRainDeploy.deployAndBroadcast( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + type(DecimalFloat).creationCode, + "src/concrete/DecimalFloat.sol:DecimalFloat", + LibDecimalFloatDeploy.ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS, + LibDecimalFloatDeploy.DECIMAL_FLOAT_CONTRACT_HASH, + decimalFloatDependencies, + sDepCodeHashes + ); + } else { + revert( + "Invalid deployment suite specified. Please set the DEPLOYMENT_SUITE environment variable to either 'log-tables' or 'decimal-float'." + ); + } + } +} diff --git a/dependencies/rain-math-float-0.1.1/script/lib/LibCopyArtifacts.sol b/dependencies/rain-math-float-0.1.1/script/lib/LibCopyArtifacts.sol new file mode 100644 index 00000000..9c7b7aed --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/script/lib/LibCopyArtifacts.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Vm} from "forge-std-1.16.1/src/Vm.sol"; + +/// @notice Shared logic between `script/CopyArtifacts.sol` (writes the +/// committed ABI) and `test/script/CopyArtifacts.t.sol` (asserts the +/// committed ABI is fresh). +library LibCopyArtifacts { + /// @notice Contract artifacts that the rust crate consumes via + /// alloy::sol!. Adding a new contract here also requires the rust + /// crate to reference it. + function contracts() internal pure returns (string[] memory) { + string[] memory names = new string[](2); + names[0] = "DecimalFloat"; + names[1] = "TestDecimalFloat"; + return names; + } + + /// @notice Path of the live forge build artifact for a contract. + function livePath(string memory contractName) internal pure returns (string memory) { + return string.concat("out/", contractName, ".sol/", contractName, ".json"); + } + + /// @notice Path of the committed ABI copy that the rust crate reads + /// at compile time. + function committedPath(string memory contractName) internal pure returns (string memory) { + return string.concat("crates/float/abi/", contractName, ".json"); + } + + /// @notice Extracts the deterministic subset of the live forge + /// artifact via `jq` over `vm.ffi`. The full forge JSON is + /// non-deterministic across machines (solc source unit IDs in + /// `metadata.sources`, `sourceMap` and friends shift with filesystem + /// enumeration order). The kept keys — `abi`, `bytecode.object`, + /// `deployedBytecode.object` — are pure functions of the input source + /// and compiler settings. alloy::sol! reads `abi` for type + /// generation and the bytecode fields are consumed by the rust EVM + /// setup in `crates/float/src/evm.rs`. + function extractStable(Vm vm, string memory contractName) internal returns (bytes memory) { + string[] memory cmd = new string[](3); + cmd[0] = "jq"; + cmd[1] = "{abi, bytecode: {object: .bytecode.object}, deployedBytecode: {object: .deployedBytecode.object}}"; + cmd[2] = livePath(contractName); + return vm.ffi(cmd); + } +} diff --git a/dependencies/rain-math-float-0.1.1/script/lib/LibEtchLogTables.sol b/dependencies/rain-math-float-0.1.1/script/lib/LibEtchLogTables.sol new file mode 100644 index 00000000..540b5876 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/script/lib/LibEtchLogTables.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Vm} from "forge-std-1.16.1/src/Vm.sol"; +import {LibDataContract} from "rain-datacontract-0.1.0/src/lib/LibDataContract.sol"; +import {LibDecimalFloatDeploy} from "src/lib/deploy/LibDecimalFloatDeploy.sol"; + +/// @notice Shared logic for planting the log-tables data contract at its +/// Zoltu-deterministic address inside a forge VM. Used by `script/Deploy.sol` +/// (so the decimal-float simulation pass can pass the constructor's codehash +/// check before log-tables exists on-chain) and by tests that need +/// `DecimalFloat` operations to work without a real on-chain deploy. +library LibEtchLogTables { + /// @notice Deploys the log-tables data contract to a temporary address, + /// copies its runtime code, and etches that runtime at + /// `LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS` so the + /// codehash matches `LibDecimalFloatDeploy.LOG_TABLES_DATA_CONTRACT_HASH`. + function etchLogTables(Vm vm) internal { + bytes memory tables = LibDecimalFloatDeploy.combinedTables(); + bytes memory creationCode = LibDataContract.contractCreationCode(tables); + address temp; + assembly ("memory-safe") { + temp := create(0, add(creationCode, 0x20), mload(creationCode)) + } + require(temp != address(0), "log tables etch deploy failed"); + vm.etch(LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS, temp.code); + } +} diff --git a/dependencies/rain-math-float-0.1.1/src/concrete/DecimalFloat.sol b/dependencies/rain-math-float-0.1.1/src/concrete/DecimalFloat.sol new file mode 100644 index 00000000..516762e5 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/concrete/DecimalFloat.sol @@ -0,0 +1,328 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {LibDecimalFloat, Float} from "../lib/LibDecimalFloat.sol"; +import {LibDecimalFloatDeploy} from "../lib/deploy/LibDecimalFloatDeploy.sol"; +import {LibFormatDecimalFloat} from "../lib/format/LibFormatDecimalFloat.sol"; +import {LibParseDecimalFloat} from "../lib/parse/LibParseDecimalFloat.sol"; +import {ScientificMinNotLessThanMax} from "../error/ErrDecimalFloat.sol"; + +contract DecimalFloat { + using LibDecimalFloat for Float; + + /// The default minimum value for scientific formatting. 1e-4 + // slither-disable-next-line too-many-digits + Float public constant FORMAT_DEFAULT_SCIENTIFIC_MIN = + Float.wrap(0xfffffffc00000000000000000000000000000000000000000000000000000001); + + /// The default maximum value for scientific formatting. 1e9 + // slither-disable-next-line too-many-digits + Float public constant FORMAT_DEFAULT_SCIENTIFIC_MAX = + Float.wrap(0x0000000900000000000000000000000000000000000000000000000000000001); + + constructor() { + LibDecimalFloatDeploy.checkLogTablesDeployed(); + } + + /// Exposes `LibDecimalFloat.FLOAT_MAX_POSITIVE_VALUE` for offchain use. + /// @return The maximum positive value of a Float. + function maxPositiveValue() external pure returns (Float) { + return LibDecimalFloat.FLOAT_MAX_POSITIVE_VALUE; + } + + /// Exposes `LibDecimalFloat.FLOAT_MIN_POSITIVE_VALUE` for offchain use. + /// @return The minimum positive value of a Float. + function minPositiveValue() external pure returns (Float) { + return LibDecimalFloat.FLOAT_MIN_POSITIVE_VALUE; + } + + /// Exposes `LibDecimalFloat.FLOAT_MAX_NEGATIVE_VALUE` for offchain use. + /// @return The maximum negative value of a Float. + function maxNegativeValue() external pure returns (Float) { + return LibDecimalFloat.FLOAT_MAX_NEGATIVE_VALUE; + } + + /// Exposes `LibDecimalFloat.FLOAT_MIN_NEGATIVE_VALUE` for offchain use. + /// @return The minimum negative value of a Float. + function minNegativeValue() external pure returns (Float) { + return LibDecimalFloat.FLOAT_MIN_NEGATIVE_VALUE; + } + + /// Exposes `LibDecimalFloat.FLOAT_ZERO` for offchain use. + /// @return The zero value of a Float in its maximized representation. + function zero() external pure returns (Float) { + return LibDecimalFloat.FLOAT_ZERO; + } + /// Exposes `LibDecimalFloat.FLOAT_E` for offchain use. + /// @return The constant value of Euler's number as a Float. + + function e() external pure returns (Float) { + return LibDecimalFloat.FLOAT_E; + } + + /// Exposes `LibParseDecimalFloat.parseDecimalFloat` for offchain use. + /// @param str The string to parse. + /// @return errorSelector The selector of the error if parsing failed. `0` + /// if parsing succeeded. + /// @return parsed The parsed float. Caller MUST check `errorSelector` to + /// determine if parsing succeeded. + function parse(string memory str) external pure returns (bytes4, Float) { + (bytes4 errorSelector, Float parsed) = LibParseDecimalFloat.parseDecimalFloat(str); + return (errorSelector, parsed); + } + + /// Exposes `LibFormatDecimalFloat.toDecimalString` for offchain use. + /// @param a The float to format. The absolute value of `a` is used to + /// determine if scientific notation is used, this allows negative numbers to + /// be formatted consistently with their positive counterparts. + /// @param scientificMin The smallest number that won't be formatted in + /// scientific notation. + /// @param scientificMax The largest number that won't be formatted in + /// scientific notation. + /// @return The string representation of the float. + function format(Float a, Float scientificMin, Float scientificMax) public pure returns (string memory) { + if (!scientificMin.lt(scientificMax)) { + revert ScientificMinNotLessThanMax(scientificMin, scientificMax); + } + Float absA = a.abs(); + return LibFormatDecimalFloat.toDecimalString(a, absA.lt(scientificMin) || absA.gt(scientificMax)); + } + + /// Exposes `LibFormatDecimalFloat.toDecimalString` for offchain use. + /// provides raw bool interface for custom scientific formatting. + /// @param a The float to format. + /// @param scientific Whether to format the float in scientific notation. + /// @return The string representation of the float. + function format(Float a, bool scientific) external pure returns (string memory) { + return LibFormatDecimalFloat.toDecimalString(a, scientific); + } + + /// Exposes `format(Float, Float, Float)` for offchain use. + /// Provides default scientific formatting. + /// @param a The float to format. + /// @return The string representation of the float. + function format(Float a) external pure returns (string memory) { + return format(a, FORMAT_DEFAULT_SCIENTIFIC_MIN, FORMAT_DEFAULT_SCIENTIFIC_MAX); + } + + /// Exposes `LibDecimalFloat.add` for offchain use. + /// @param a The first float to add. + /// @param b The second float to add. + /// @return The sum of the two floats. + function add(Float a, Float b) external pure returns (Float) { + return a.add(b); + } + + /// Exposes `LibDecimalFloat.sub` for offchain use. + /// @param a The float to subtract from. + /// @param b The float to subtract. + /// @return The difference of the two floats. + function sub(Float a, Float b) external pure returns (Float) { + return a.sub(b); + } + + /// Exposes `LibDecimalFloat.minus` for offchain use. + /// @param a The float to negate. + /// @return The negated float. + function minus(Float a) external pure returns (Float) { + return a.minus(); + } + + /// Exposes `LibDecimalFloat.abs` for offchain use. + /// @param a The float to get the absolute value of. + /// @return The absolute value of the float. + function abs(Float a) external pure returns (Float) { + return a.abs(); + } + + /// Exposes `LibDecimalFloat.mul` for offchain use. + /// @param a The first float to multiply. + /// @param b The second float to multiply. + /// @return The product of the two floats. + function mul(Float a, Float b) external pure returns (Float) { + return a.mul(b); + } + + /// Exposes `LibDecimalFloat.div` for offchain use. + /// @param a The dividend (numerator). + /// @param b The divisor (denominator). + /// @return The quotient of the two floats. + function div(Float a, Float b) external pure returns (Float) { + return a.div(b); + } + + /// Exposes `LibDecimalFloat.inv` for offchain use. + /// @param a The float to invert. + /// @return The inverted float. + function inv(Float a) external pure returns (Float) { + return a.inv(); + } + + /// Exposes `LibDecimalFloat.eq` for offchain use. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if the two floats are equal, false otherwise. + function eq(Float a, Float b) external pure returns (bool) { + return a.eq(b); + } + + /// Exposes `LibDecimalFloat.lt` for offchain use. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if the first float is less than the second, false otherwise. + function lt(Float a, Float b) external pure returns (bool) { + return a.lt(b); + } + + /// Exposes `LibDecimalFloat.gt` for offchain use. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if the first float is greater than the second, false + /// otherwise. + function gt(Float a, Float b) external pure returns (bool) { + return a.gt(b); + } + + /// Exposes `LibDecimalFloat.lte` for offchain use. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if the first float is less than or equal to the second, + /// false otherwise. + function lte(Float a, Float b) external pure returns (bool) { + return a.lte(b); + } + + /// Exposes `LibDecimalFloat.gte` for offchain use. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if the first float is greater than or equal to the second, + /// false otherwise. + function gte(Float a, Float b) external pure returns (bool) { + return a.gte(b); + } + + /// Exposes `LibDecimalFloat.integer` for offchain use. + /// @param a The float to get the integer part of. + /// @return The integer part of the float. + function integer(Float a) external pure returns (Float) { + return a.integer(); + } + + /// Exposes `LibDecimalFloat.frac` for offchain use. + /// @param a The float to get the fractional part of. + /// @return The fractional part of the float. + function frac(Float a) external pure returns (Float) { + return a.frac(); + } + + /// Exposes `LibDecimalFloat.floor` for offchain use. + /// @param a The float to get the floor of. + /// @return The floored float. + function floor(Float a) external pure returns (Float) { + return a.floor(); + } + + /// Exposes `LibDecimalFloat.ceil` for offchain use. + /// @param a The float to get the ceiling of. + /// @return The ceiled float. + function ceil(Float a) external pure returns (Float) { + return a.ceil(); + } + + /// Exposes `LibDecimalFloat.pow10` for offchain use. + /// @param a The exponent to raise 10 to. + /// @return The result of 10^a. + function pow10(Float a) external view returns (Float) { + return a.pow10(LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS); + } + + /// Exposes `LibDecimalFloat.log10` for offchain use. + /// @param a The float to take the logarithm of. + /// @return The logarithm of the float. + function log10(Float a) external view returns (Float) { + return a.log10(LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS); + } + + /// Exposes `LibDecimalFloat.pow` for offchain use. + /// @param a The base float. + /// @param b The exponent float. + /// @return The result of raising the base float to the power of the exponent + function pow(Float a, Float b) external view returns (Float) { + return a.pow(b, LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS); + } + + /// Exposes `LibDecimalFloat.sqrt` for offchain use. + /// @param a The float to take the square root of. + /// @return The square root of the float. + function sqrt(Float a) external view returns (Float) { + return a.sqrt(LibDecimalFloatDeploy.ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS); + } + + /// Exposes `LibDecimalFloat.min` for offchain use. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return The smaller of the two floats. + function min(Float a, Float b) external pure returns (Float) { + return a.min(b); + } + + /// Exposes `LibDecimalFloat.max` for offchain use. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return The larger of the two floats. + function max(Float a, Float b) external pure returns (Float) { + return a.max(b); + } + + /// Exposes `LibDecimalFloat.isZero` for offchain use. + /// @param a The float to check. + /// @return True if the float is zero, false otherwise. + function isZero(Float a) external pure returns (bool) { + return a.isZero(); + } + + /// Exposes `LibDecimalFloat.fromFixedDecimalLosslessPacked` for offchain + /// use. + /// @param value The fixed point decimal value to convert. + /// @param decimals The number of decimals in the fixed point + /// representation. e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return float The Float struct containing the signed coefficient and + /// exponent. + function fromFixedDecimalLossless(uint256 value, uint8 decimals) external pure returns (Float) { + return LibDecimalFloat.fromFixedDecimalLosslessPacked(value, decimals); + } + + /// Exposes `LibDecimalFloat.toFixedDecimalLossless` for offchain use. + /// @param float The Float struct to convert. + /// @param decimals The number of decimals in the fixed point + /// representation. e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return The fixed point decimal value as a uint256. + function toFixedDecimalLossless(Float float, uint8 decimals) external pure returns (uint256) { + return LibDecimalFloat.toFixedDecimalLossless(float, decimals); + } + + /// Exposes `LibDecimalFloat.fromFixedDecimalLossyPacked` for offchain + /// use. + /// @param value The fixed point decimal value to convert. + /// @param decimals The number of decimals in the fixed point + /// representation. e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return float The Float struct containing the signed coefficient and + /// exponent. + /// @return lossless True if the conversion was lossless, false otherwise. + function fromFixedDecimalLossy(uint256 value, uint8 decimals) external pure returns (Float, bool) { + //slither-disable-next-line unused-return + return LibDecimalFloat.fromFixedDecimalLossyPacked(value, decimals); + } + + /// Exposes `LibDecimalFloat.toFixedDecimalLossy` for offchain use. + /// @param float The Float struct to convert. + /// @param decimals The number of decimals in the fixed point + /// representation. e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return value The fixed point decimal value as a uint256. + /// @return lossless True if the conversion was lossless, false otherwise. + function toFixedDecimalLossy(Float float, uint8 decimals) external pure returns (uint256, bool) { + //slither-disable-next-line unused-return + return LibDecimalFloat.toFixedDecimalLossy(float, decimals); + } +} diff --git a/dependencies/rain-math-float-0.1.1/src/error/ErrDecimalFloat.sol b/dependencies/rain-math-float-0.1.1/src/error/ErrDecimalFloat.sol new file mode 100644 index 00000000..3d375f27 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/error/ErrDecimalFloat.sol @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {Float} from "../lib/LibDecimalFloat.sol"; + +/// @dev Thrown when a coefficient overflows. +error CoefficientOverflow(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when an exponent overflows. +error ExponentOverflow(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when an exponent underflows. Exponent underflow means the +/// magnitude is smaller than any representable Float. Without this revert, +/// arithmetic ops that compose to underflow (e.g. `mul` with two operands +/// whose exponents sum below `int32.min`) would silently return `FLOAT_ZERO`, +/// breaking downstream code that branches on `result == 0`. +error ExponentUnderflow(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when attempting to convert a negative number to an unsigned +/// fixed-point number. +error NegativeFixedDecimalConversion(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when converting a Float to a fixed-decimal uint256 and the +/// scaled value exceeds `uint256.max`. Returning a silent zero with +/// `lossless=false` would decapitate the high bits of the value; +/// reverting surfaces the overflow with the original inputs so callers can +/// rescale or reject. +error FixedDecimalOverflow(int256 signedCoefficient, int256 exponent, uint8 decimals); + +/// @dev Thrown when attempting to calculate the log of 0. +error Log10Zero(); + +/// @dev Thrown when attempting to calculate the log of a negative number. +error Log10Negative(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when converting some value to a float when the conversion +/// is lossy. +error LossyConversionToFloat(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when converting a float to some value when the conversion +/// is lossy. +error LossyConversionFromFloat(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when attempting to exponentiate 0^b where b is negative. +error ZeroNegativePower(Float b); + +/// @dev Thrown when mulDiv internal to division overflows. +error MulDivOverflow(uint256 x, uint256 y, uint256 denominator); + +/// @dev Thrown when a maximize overflows where it is not appropriate. +error MaximizeOverflow(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when dividing by zero. +/// @param signedCoefficient The signed coefficient of the numerator. +/// @param exponent The exponent of the numerator. +error DivisionByZero(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown when attempting to exponentiate a negative base. +error PowNegativeBase(int256 signedCoefficient, int256 exponent); + +/// @dev Thrown if writing the data by creating the contract fails somehow. +error WriteError(); + +/// @dev Thrown when scientificMin is not less than scientificMax in format. +/// @param scientificMin The minimum threshold for scientific notation. +/// @param scientificMax The maximum threshold for scientific notation. +error ScientificMinNotLessThanMax(Float scientificMin, Float scientificMax); + +/// @dev Thrown when constructing a `DecimalFloat` on a chain where the +/// log tables data contract is not deployed at the expected address with +/// the expected codehash. Without this check, transcendental functions +/// (`pow10`/`log10`/`pow`/`sqrt`) would silently `extcodecopy` zero bytes +/// and return garbage. +/// @param tablesAddress The address `DecimalFloat` was compiled to read +/// log tables from. +/// @param expectedCodehash The codehash the deployed table contract is +/// expected to have. +/// @param actualCodehash The codehash currently at `tablesAddress` (zero +/// if no contract is deployed there). +error LogTablesNotDeployed(address tablesAddress, bytes32 expectedCodehash, bytes32 actualCodehash); diff --git a/dependencies/rain-math-float-0.1.1/src/error/ErrFormat.sol b/dependencies/rain-math-float-0.1.1/src/error/ErrFormat.sol new file mode 100644 index 00000000..6eb173e4 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/error/ErrFormat.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @dev Thrown when the exponent cannot be formatted. +/// @param exponent The exponent that cannot be formatted. +error UnformatableExponent(int256 exponent); diff --git a/dependencies/rain-math-float-0.1.1/src/error/ErrParse.sol b/dependencies/rain-math-float-0.1.1/src/error/ErrParse.sol new file mode 100644 index 00000000..4fb9af96 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/error/ErrParse.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @dev Thrown when the decimal point is malformed in a float string. +/// @param position The position in the string where the error occurred. +error MalformedDecimalPoint(uint256 position); + +/// @dev Thrown when the exponent cannot be parsed from a float string. +/// @param position The position in the string where the error occurred. +error MalformedExponentDigits(uint256 position); + +/// @dev Thrown when parsing a decimal string would result in precision loss in +/// the decimal float representation. +/// @param position The position in the string where the error occurred. +error ParseDecimalPrecisionLoss(uint256 position); + +/// @dev Thrown when the string contains characters after the float. +error ParseDecimalFloatExcessCharacters(); diff --git a/dependencies/rain-math-float-0.1.1/src/generated/LogTables.pointers.sol b/dependencies/rain-math-float-0.1.1/src/generated/LogTables.pointers.sol new file mode 100644 index 00000000..07b17ef8 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/generated/LogTables.pointers.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +// THIS FILE IS AUTOGENERATED BY ./script/BuildPointers.sol + +// This file is committed to the repository because there is a circular +// dependency between the contract and its pointers file. The contract +// needs the pointers file to exist so that it can compile, and the pointers +// file needs the contract to exist so that it can be compiled. + +/// @dev Hash of the known bytecode. +bytes32 constant BYTECODE_HASH = bytes32(0x0000000000000000000000000000000000000000000000000000000000000000); + +/// @dev Log tables. +bytes constant LOG_TABLES = + hex"0000002b0056008000aa80d480fd8126814e8176019e01c501ec02130239825f828582aa82cf82f30318033c0360038303a603c983ec840e843084520473049504b604d704f78517853785578577859605b505d405f306118630864e866c868986a786c406e106fe071a07370753076f878b87a787c387de07f90814082f084a0864887f889988b388cd88e70900091a0933094c0965097e899789b089c889e109f90a110a290a410a588a708a878a9e8ab68acd0ae40afa0b110b280b3e8b548b6b8b818b978bad0bc20bd80bee0c030c180c2e0c430c580c6d0c810c960cab0cbf0cd40ce80cfc0d110d250d390d4c0d600d740d880d9b0dae0dc20dd50de80dfb0e0e0e210e340e470e5a0e6c0e7f0e910ea30eb60ec80eda0eec0efe0f100f220f340f450f570f690f7a0f8b0f9d0fae0fbf0fd00fe10ff2100310141025103610461057106810781088109910a910b910ca10da10ea10fa110a111a1129113911491158116811781187119611a611b511c411d411e311f212011210121f122e123d124b125a126912781286129512a312b212c012ce12dd12eb12f913071316132413321340134e135b136913771385139313a013ae13bb13c913d713e413f113ff140c1419142714341441144e145b146814751482148f149c14a914b614c314d014dc14e914f61502150f151b152815341541154d155915661572157e158a159715a315af15bb15c715d315df15eb15f71603160f161a16261632163e164916551661166c16781683168f169a16a616b116bd16c816d316df16ea16f51700170b17171722172d17381743174e17591764176f177a1785178f179a17a517b017bb17c517d017db17e517f017fa18051810181a1824182f18391844184e18581863186d18771882188c189618a018aa18b518bf18c918d318dd18e718f118fb1905190f19191923192c19361940194a1954195d19671971197a1984198e199719a119ab19b419be19c719d119da19e419ed19f61a001a091a131a1c1a251a2e1a381a411a4a1a531a5d1a661a6f1a781a811a8a1a931a9c1aa51aae1ab71ac01ac91ad21adb1ae41aed1af61aff1b081b101b191b221b2b1b341b3c1b451b4e1b561b5f1b681b701b791b821b8a1b931b9b1ba41bac1bb51bbd1bc61bce1bd61bdf1be71bf01bf81c001c091c111c191c221c2a1c321c3a1c431c4b1c531c5b1c631c6b1c741c7c1c841c8c1c941c9c1ca41cac1cb41cbc1cc41ccc1cd41cdc1ce41cec1cf41cfb1d031d0b1d131d1b1d231d2a1d321d3a1d421d491d511d591d601d681d701d771d7f1d871d8e1d961d9e1da51dad1db41dbc1dc31dcb1dd21dda1de11de91df01df81dff1e061e0e1e151e1d1e241e2b1e331e3a1e411e481e501e571e5e1e661e6d1e741e7b1e821e8a1e911e981e9f1ea61ead1eb41ebc1ec31eca1ed11ed81edf1ee61eed1ef41efb1f021f091f101f171f1e1f251f2c1f331f391f401f471f4e1f551f5c1f631f691f701f771f7e1f851f8b1f921f991fa01fa61fad1fb41fba1fc11fc81fce1fd51fdc1fe21fe91ff01ff61ffd2003200a20112017201e2024202b20312038203e2045204b20522058205f2065206b20722078207f2085208b20922098209f20a520ab20b220b820be20c420cb20d120d720de20e420ea20f020f720fd21032109210f2116211c21222128212e2134213a21412147214d21532159215f2165216b21712177217d21832189218f2195219b21a121a721ad21b321b921bf21c521cb21d121d721dd21e321e921ee21f421fa22002206220c22122217221d22232229222f2234223a22402246224b22512257225d22622268226e22742279227f2285228a22902296229b22a122a722ac22b222b722bd22c322c822ce22d322d922df22e422ea22ef22f522fa23002305230b23102316231b23212326232c23312337233c23412347234c23522357235d23622367236d23722377237d23822388238d23922398239d23a223a823ad23b223b723bd23c223c723cd23d223d723dc23e223e723ec23f123f623fc24012406240b24102416241b24202425242a242f2435243a243f24442449244e24532458245d24632468246d24722477247c24812486248b24902495249a249f24a424a924ae24b324b824bd24c224c724cc24d124d624db24e024e524ea24ef24f424f924fd25022507250c25112516251b252025252529252e25332538253d25422546254b25502555255a255e25632568256d25722576257b258025852589258e25932598259c25a125a625ab25af25b425b925bd25c225c725cb25d025d525d925de25e325e725ec25f125f525fa25ff26032608260d26112616261a261f26232628262d26312636263a263f26432648264d26512656265a265f26632668266c26712675267a267e26832687268c269026952699269e26a226a626ab26af26b426b826bd26c126c626ca26ce26d326d726dc26e026e426e926ed26f126f626fa26ff27032707270c"; + +/// @dev Log tables small. +bytes constant LOG_TABLES_SMALL = + hex"0004090d11151a1e22260004080c0f13171b1f230003070b0e1215191c200003070a0d1014171a1e000306090c0f1215181c000306090b0e1114171a000305080b0e10131618000305080a0d0f12141700020507090c0e10131500020407090b0d10121400020406080b0d0f111300020406080a0c0e101200020406080a0c0e0f110002040607090b0d0f110002040507090b0c0e100002030507090a0c0e0f0002030507080a0b0d0f000203050608090b0d0e000203050608090b0c0e000103040607090a0c0d000103040607090a0b0d000103040607080a0b0c00010304050708090b0c00010304050608090a0c00010304050608090a0b00010204050607090a0b00010204050607080a0b0001020305060708090a0001020305060708090a0001020304050708090a0001020304050608090a0001020304050607080900010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060707080001020304050506070800010203040405060708000102030404050607080001020303040506070800010203030405060708000102020304050607070001020203040506060700010202030405060607000102020304050506070001020203040505060700010202030405050607000101020304040506070001010203040405060700010102030404050606000101020304040506060001010203030405060600010102030304050506000101020303040505060001010203030405050600010102030304050506000101020303040505060001010203030404050600010102020304040506000101020203040405060001010202030404050500010102020304040505000101020203040405050001010202030404050500010102020303040505000101020203030405050001010202030304040500010102020303040405000101020203030404050001010202030304040500010102020303040405000101020203030404050001010202030304040500010102020303040405000101020203030404050001010202030304040500000101020203030404000001010202030304040000010102020303040400000101020203030404000001010202030304040000010102020303040400000101020203030404000001010202030304040000010102020303040400000101020203030404000001010202030304040000010102020303040400000101020203030304"; + +/// @dev Log tables small alt. +bytes constant LOG_TABLES_SMALL_ALT = + hex"0004080c1014181c20250004070b0f13161a1e210003070a0e1114181b1f0003070a0c101316191d000306090c0f1114171a000305080b0e10131619000305080a0d0f121517000205070a0c0f11131600020507090b0e10121500020406080b0d0f1113"; + +/// @dev Anti log tables. +bytes constant ANTI_LOG_TABLES = + hex"03e803ea03ed03ef03f103f403f603f803fb03fd03ff0402040404060409040b040e0410041204150417041a041c041e0421042304260428042b042d04300432043404370439043c043e0441044304460448044b044e0450045304550458045a045d045f046204650467046a046c046f047204740477047a047c047f0481048404870489048c048f049104940497049a049c049f04a204a504a704aa04ad04af04b204b504b804bb04bd04c004c304c604c904cb04ce04d104d404d704da04dd04df04e204e504e804eb04ee04f104f404f704fa04fc04ff050205050508050b050e051105140517051a051d0520052305260529052c052f053205360539053c053f054205450548054b054e055105550558055b055e056105640568056b056e057105740578057b057e058105850588058b058e059205950598059b059f05a205a505a905ac05af05b305b605ba05bd05c005c405c705cb05ce05d105d505d805dc05df05e305e605ea05ed05f105f405f805fb05ff060206060609060d061006140618061b061f06220626062a062d063106350638063c064006430647064b064e06520656065a065d066106650669066c067006740678067c067f06830687068b068f06930697069a069e06a206a606aa06ae06b206b606ba06be06c206c606ca06ce06d206d606da06de06e206e606ea06ee06f206f606fa06ff07030707070b070f07130718071c072007240728072d073107350739073e07420746074a074f07530757075c076007640769076d07710776077a077f07830788078c079007950799079e07a207a707ab07b007b407b907be07c207c707cb07d007d407d907de07e207e707ec07f007f507fa07fe08030808080d08110816081b082008240829082e08330838083d08410846084b08500855085a085f08640869086e08730878087d08820887088c08910896089b08a008a508aa08af08b408ba08bf08c408c908ce08d308d908de08e308e808ee08f308f808fd09030908090d09130918091d09230928092e09330938093e09430949094e09540959095f0964096a096f0975097b09800986098b09910997099c09a209a809ad09b309b909bf09c409ca09d009d609db09e109e709ed09f309f909ff0a040a0a0a100a160a1c0a220a280a2e0a340a3a0a400a460a4c0a520a590a5f0a650a6b0a710a770a7d0a840a8a0a900a960a9c0aa30aa90aaf0ab60abc0ac20ac90acf0ad50adc0ae20ae90aef0af50afc0b020b090b0f0b160b1c0b230b2a0b300b370b3d0b440b4b0b510b580b5f0b650b6c0b730b7a0b800b870b8e0b950b9c0ba30ba90bb00bb70bbe0bc50bcc0bd30bda0be10be80bef0bf60bfd0c040c0b0c120c190c210c280c2f0c360c3d0c450c4c0c530c5a0c620c690c700c780c7f0c860c8e0c950c9c0ca40cab0cb30cba0cc20cc90cd10cd90ce00ce80cef0cf70cff0d060d0e0d160d1d0d250d2d0d350d3c0d440d4c0d540d5c0d640d6c0d730d7b0d830d8b0d930d9b0da30dab0db40dbc0dc40dcc0dd40ddc0de40ded0df50dfd0e050e0d0e160e1e0e260e2f0e370e400e480e500e590e610e6a0e720e7b0e830e8c0e950e9d0ea60eae0eb70ec00ec80ed10eda0ee30eeb0ef40efd0f060f0f0f180f210f2a0f320f3b0f440f4d0f560f600f690f720f7b0f840f8d0f960f9f0fa90fb20fbb0fc40fce0fd70fe00fea0ff30ffd1006100f10191022102c1036103f10491052105c1066106f10791083108c109610a010aa10b410bd10c710d110db10e510ef10f91103110d11171121112b11361140114a1154115e11691173117d11871192119c11a711b111bb11c611d011db11e511f011fb12051210121a12251230123b12451250125b12661271127c12861291129c12a712b212bd12c812d312df12ea12f51300130b13171322132d13381344134f135b13661371137d13881394139f13ab13b713c213ce13da13e513f113fd140914141420142c143814441450145c146814741480148c149814a414b114bd14c914d514e214ee14fa150715131520152c153915451552155e156b157715841591159e15aa15b715c415d115de15ea15f716041611161e162b1639164616531660166d167a1688169516a216b016bd16ca16d816e516f31700170e171c17291737174517521760176e177c178a179717a517b317c117cf17dd17ec17fa18081816182418321841184f185d186c187a1889189718a618b418c318d118e018ef18fd190c191b192a193919471956196519741983199219a119b119c019cf19de19ed19fd1a0c1a1b1a2b1a3a1a4a1a591a691a781a881a981aa71ab71ac71ad71ae71af61b061b161b261b361b461b561b671b771b871b971ba71bb81bc81bd91be91bf91c0a1c1a1c2b1c3c1c4c1c5d1c6e1c7f1c8f1ca01cb11cc21cd31ce41cf51d061d171d281d3a1d4b1d5c1d6e1d7f1d901da21db31dc51dd61de81dfa1e0b1e1d1e2f1e411e521e641e761e881e9a1eac1ebe1ed11ee31ef51f071f1a1f2c1f3e1f511f631f761f881f9b1fae1fc01fd31fe61ff9200c201e203120442057206b207e209120a420b720cb20de20f121052118212c213f21532167217a218e21a221b621ca21de21f22206221a222e22422256226a227f229322a822bc22d122e522fa230e23232338234c23612376238b23a023b523ca23df23f4240a241f2434244a245f2475248a24a024b524cb24e124f6250c25222538254e2564257a259025a625bd25d325e925ff2616262c2643265926702687269e26b426cb26e226f9"; + +/// @dev Anti log tables small. +bytes constant ANTI_LOG_TABLES_SMALL = + hex"0000000101010102020200000001010101020202000000010101010202020000000101010102020200000101010102020202000001010101020202020000010101010202020200000101010102020202000001010101020202030000010101010202020300000101010102020203000001010102020202030000010101020202020300000101010202020303000001010102020203030000010101020202030300000101010202020303000001010102020203030000010101020202030300000101010202030303000001010102020303030000010102020203030300000101020202030303000001010202020303040000010102020203030400000101020202030304000001010202030303040000010102020303030400000101020203030404000001010202030304040000010102020303040400000101020203030404000001010202030304040000010102020303040400010102020303040405000101020203030404050001010202030304040500010102020303040405000101020203030404050001010202030304050500010102020304040505000101020203040405050001010202030404050600010102030304040506000101020303040405060001010203030405050600010102030304050506000101020303040505060001010203040405060600010102030404050606000101020304040506070001020203040505060700010202030405050607000102020304050606070001020203040506060700010202030405060707000102030304050607080001020303040506070800010203040405060708000102030405050607080001020304050606070800010203040506070809000102030405060708090001020304050607080900010203040506070809000102030405060708090001020304050607090a0001020304050708090a0001020304060708090a0001020305060708090a0001020405060708090b00010204050607080a0b00010204050607090a0b00010304050608090a0b00010304050608090a0c00010304050708090a0c00010304050708090b0c000103040507080a0b0c000103040607080a0b0d000103040607090a0b0d000103040607090a0c0d000203050608090b0c0e000203050608090b0c0e000203050608090b0d0e0002030506080a0b0d0f0002030507080a0c0d0f0002030507080a0c0d0f0002030507090a0c0e100002040507090b0c0e100002040507090b0d0e100002040607090b0d0f110002040608090b0d0f1100020406080a0c0e0f1100020406080a0c0e101200020406080a0c0e101200020406080a0c0f111300020406080b0d0f111300020407090b0d0f111400020407090b0d10121400020507090b0e101214"; diff --git a/dependencies/rain-math-float-0.1.1/src/lib/LibDecimalFloat.sol b/dependencies/rain-math-float-0.1.1/src/lib/LibDecimalFloat.sol new file mode 100644 index 00000000..d06a9afb --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/lib/LibDecimalFloat.sol @@ -0,0 +1,870 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import { + ExponentOverflow, + ExponentUnderflow, + CoefficientOverflow, + FixedDecimalOverflow, + NegativeFixedDecimalConversion, + LossyConversionFromFloat, + LossyConversionToFloat, + ZeroNegativePower, + PowNegativeBase +} from "../error/ErrDecimalFloat.sol"; +import {LibDecimalFloatImplementation} from "./implementation/LibDecimalFloatImplementation.sol"; + +/// A decimal floating point number packed into 32 bytes. The high 32 bits are +/// a signed int32 exponent; the low 224 bits are a signed int224 coefficient. +/// The value represented is `coefficient × 10^exponent`. +/// +/// Representations are non-canonical by design. Every non-zero value has an +/// infinite family of `(coefficient, exponent)` pairs that represent it — for +/// example `(5, 0)`, `(50, -1)`, and `(5000, -3)` all equal the number `5` and +/// pack to different `bytes32`. Equality between Floats is therefore numeric +/// (via `eq`, which rescales before comparing), not byte-level. `packLossy` +/// does not strip trailing decimal zeros from the coefficient; it only +/// shrinks the coefficient when it does not fit int224. This is deliberate: +/// canonicalization is not free on the arithmetic hot path, and most +/// operations do not care. Consumers that need a canonical form (raw-byte +/// equality, hashing as a map key, downstream range checks) must canonicalize +/// locally at the point of use. See `LibDecimalFloatImplementation.eq` for +/// the operative numeric-equality contract. +type Float is bytes32; + +/// @title LibDecimalFloat +/// Floating point math library for Rainlang. +/// Broadly implements decimal floating point math with 224 signed bits for the +/// coefficient and 32 signed bits for the exponent. Notably the implementation +/// differs from standard specifications in a few key areas: +/// +/// - There is no concept of NaN or Infinity. +/// - There is no concept of rounding modes. +/// - There is no negative zero. +/// - This is a decimal floating point library, not binary. +/// - Representations are non-canonical. Multiple `(coefficient, exponent)` +/// pairs can encode the same numeric value; equality is numeric, not +/// byte-level. Canonicalization is deferred to consumers that need it +/// rather than enforced in packing, to keep the arithmetic hot path cheap. +/// See the docstring on the `Float` type for detail. +/// +/// This means that operations such as divide by 0 will revert, rather than +/// produce nonsense like NaN or Infinity. This is a deliberate design choice +/// to make the library more predictable and easier to reason about as the basis +/// of a defi native smart contract language. +/// +/// The reason that this is a decimal floating point system is that the inputs +/// to the system as rainlang literals are decimal values. This means that `0.1` +/// has an _exact_ representation in the system, rather than a repeating binary +/// fraction. This technically results in less precision than a binary floating +/// point system, but is much more predictable and easier to reason about in the +/// context of financial inputs and outputs, which are typically all decimal +/// values as understood by humans. However, consider that we have 224 bits of +/// precision in the coefficient, which is far more than the 53 bits of a double +/// precision floating point number regardless of binary/decimal considerations, +/// and should be more than enough for most defi use cases. +library LibDecimalFloat { + using LibDecimalFloat for Float; + + /// A zero valued float. + Float constant FLOAT_ZERO = Float.wrap(0); + + /// A one valued float. + Float constant FLOAT_ONE = Float.wrap(bytes32(uint256(1))); + + /// A half valued float. + // slither-disable-next-line too-many-digits + Float constant FLOAT_HALF = + Float.wrap(bytes32(uint256(0xffffffff00000000000000000000000000000000000000000000000000000005))); + + /// A two valued float. + Float constant FLOAT_TWO = Float.wrap(bytes32(uint256(0x02))); + + /// Largest possible positive value. + /// type(int224).max, type(int32).max + Float constant FLOAT_MAX_POSITIVE_VALUE = + Float.wrap(bytes32(uint256(0x7fffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffff))); + + /// Smallest possible positive value. + /// 1, type(int32).min + // slither-disable-next-line too-many-digits + Float constant FLOAT_MIN_POSITIVE_VALUE = + Float.wrap(bytes32(uint256(0x8000000000000000000000000000000000000000000000000000000000000001))); + + /// Largest possible (closest to zero) negative value. + /// -1, type(int32).min + // slither-disable-next-line too-many-digits + Float constant FLOAT_MAX_NEGATIVE_VALUE = + Float.wrap(bytes32(uint256(0x80000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff))); + + /// Smallest possible (most negative) negative value. + /// type (int224).min, type(int32).max + // slither-disable-next-line too-many-digits + Float constant FLOAT_MIN_NEGATIVE_VALUE = + Float.wrap(bytes32(uint256(0x7fffffff80000000000000000000000000000000000000000000000000000000))); + + /// Euler's number + /// 2.718281828459045235360287471352662497757247093699959574966967627724e66, -66 + Float constant FLOAT_E = + Float.wrap(bytes32(uint256(0xffffffbe19cfc6ef4f44cf88f14500d013df534fcaad48fca1d5ca47bea26fcc))); + + /// Convert a fixed point decimal value to a signed coefficient and exponent. + /// The conversion can be lossy if the unsigned value is too large to fit in + /// the signed coefficient. + /// @param value The fixed point decimal value to convert. + /// @param decimals The number of decimals in the fixed point representation. + /// e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return signedCoefficient The signed coefficient of the floating point + /// representation. + /// @return exponent The exponent of the floating point representation. + /// @return lossless `true` if the conversion is lossless. + function fromFixedDecimalLossy(uint256 value, uint8 decimals) internal pure returns (int256, int256, bool) { + unchecked { + int256 exponent = -int256(uint256(decimals)); + + // Catch an edge case where unsigned value looks like a negative + // value when coerced. + if (value > uint256(type(int256).max)) { + // value is divided by 10 so won't truncate when cast. + // forge-lint: disable-next-line(unsafe-typecast) + return (int256(value / 10), exponent + 1, value % 10 == 0); + } else { + // case that would truncate is handled above. + // forge-lint: disable-next-line(unsafe-typecast) + return (int256(value), exponent, true); + } + } + } + + /// Same as fromFixedDecimalLossy, but returns a Float struct instead of + /// separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param value The fixed point decimal value to convert. + /// @param decimals The number of decimals in the fixed point representation. + /// e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return float The Float struct containing the signed coefficient and + /// exponent. + /// @return lossless `true` if the conversion is lossless. + function fromFixedDecimalLossyPacked(uint256 value, uint8 decimals) internal pure returns (Float, bool) { + (int256 signedCoefficient, int256 exponent, bool lossless) = fromFixedDecimalLossy(value, decimals); + (Float float, bool losslessPack) = packLossy(signedCoefficient, exponent); + return (float, lossless && losslessPack); + } + + /// Lossless version of `fromFixedDecimalLossy`. This will revert if the + /// conversion is lossy. + /// @param value As per `fromFixedDecimalLossy`. + /// @param decimals As per `fromFixedDecimalLossy`. + /// @return signedCoefficient As per `fromFixedDecimalLossy`. + /// @return exponent As per `fromFixedDecimalLossy`. + function fromFixedDecimalLossless(uint256 value, uint8 decimals) internal pure returns (int256, int256) { + (int256 signedCoefficient, int256 exponent, bool lossless) = fromFixedDecimalLossy(value, decimals); + if (!lossless) { + revert LossyConversionToFloat(signedCoefficient, exponent); + } + return (signedCoefficient, exponent); + } + + /// Lossless version of `fromFixedDecimalLossyPacked`. This will revert if the + /// conversion is lossy. + /// @param value As per `fromFixedDecimalLossyPacked`. + /// @param decimals As per `fromFixedDecimalLossyPacked`. + /// @return float The Float struct containing the signed coefficient and + /// exponent. + function fromFixedDecimalLosslessPacked(uint256 value, uint8 decimals) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = fromFixedDecimalLossless(value, decimals); + return packLossless(signedCoefficient, exponent); + } + + /// Convert a signed coefficient and exponent to a fixed point decimal value. + /// The conversion is impossible and will revert if the signed coefficient is + /// negative. If the conversion overflows it will also revert. + /// The conversion can be lossy if the floating point representation is not + /// able to fit in the fixed point representation, and will truncate + /// precision. + /// @param signedCoefficient The signed coefficient of the floating point + /// representation. + /// @param exponent The exponent of the floating point representation. + /// @param decimals The number of decimals in the fixed point representation. + /// e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return value The fixed point decimal value. + /// @return lossless `true` if the conversion is lossless. + function toFixedDecimalLossy(int256 signedCoefficient, int256 exponent, uint8 decimals) + internal + pure + returns (uint256, bool) + { + // The output type is uint256, so we can't represent negative numbers. + if (signedCoefficient < 0) { + revert NegativeFixedDecimalConversion(signedCoefficient, exponent); + } + // Zero is always 0 and neither exponent nor decimals matter. + else if (signedCoefficient == 0) { + return (0, true); + } else { + // Safe to do this conversion because we revert above on negative. + // forge-lint: disable-next-line(unsafe-typecast) + uint256 unsignedCoefficient = uint256(signedCoefficient); + int256 finalExponent; + + // Ye olde "safe math" to give a better error if this edge case + // overflow is ever hit. Normal use should never overflow here. + unchecked { + finalExponent = exponent + int256(uint256(decimals)); + if (finalExponent < exponent) { + revert ExponentOverflow(signedCoefficient, exponent); + } + } + + uint256 scale; + uint256 fixedDecimal; + if (finalExponent < 0) { + unchecked { + // Every possible value rounds to 0 if the exponent is less + // than -77. This is always lossless as we know the value is + // is not zero in real. + if (finalExponent < -77) { + return (0, false); + } + + // At this point, scale cannot revert, so it is safe to do + // this unchecked. + // finalExponent is negative here so making it absolute will + // always fit in uint256. + // forge-lint: disable-next-line(unsafe-typecast) + scale = 10 ** uint256(-finalExponent); + fixedDecimal = unsignedCoefficient / scale; + + // Slither false positive because we're explicitly checking + // for the lossiness that it warns about. + //slither-disable-next-line divide-before-multiply + return (fixedDecimal, fixedDecimal * scale == unsignedCoefficient); + } + } else if (finalExponent > 0) { + unchecked { + // The smallest non-zero coefficient times 10^78 already + // exceeds uint256.max, so any finalExponent > 77 cannot + // be represented as a uint256. + if (finalExponent > 77) { + revert FixedDecimalOverflow(signedCoefficient, exponent, decimals); + } + + // finalExponent in [1, 77] keeps 10 ** finalExponent + // within uint256. + // forge-lint: disable-next-line(unsafe-typecast) + scale = 10 ** uint256(finalExponent); + + // Pre-check the multiplication; the alternative is a + // bare Panic(0x11) from checked-math, which carries no + // structured information about which inputs overflowed. + if (unsignedCoefficient > type(uint256).max / scale) { + revert FixedDecimalOverflow(signedCoefficient, exponent, decimals); + } + fixedDecimal = unsignedCoefficient * scale; + return (fixedDecimal, true); + } + } else { + return (unsignedCoefficient, true); + } + } + } + + /// Same as toFixedDecimalLossy, but accepts a Float struct instead of + /// separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param float The Float struct containing the signed coefficient and + /// exponent. + /// @param decimals The number of decimals in the fixed point representation. + /// e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return value The fixed point decimal value. + /// @return lossless `true` if the conversion is lossless. + function toFixedDecimalLossy(Float float, uint8 decimals) internal pure returns (uint256, bool) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + return toFixedDecimalLossy(signedCoefficient, exponent, decimals); + } + + /// Lossless version of `toFixedDecimalLossy`. This will revert if the + /// conversion is lossy. + /// @param signedCoefficient As per `toFixedDecimalLossy`. + /// @param exponent As per `toFixedDecimalLossy`. + /// @param decimals As per `toFixedDecimalLossy`. + /// @return value As per `toFixedDecimalLossy`. + function toFixedDecimalLossless(int256 signedCoefficient, int256 exponent, uint8 decimals) + internal + pure + returns (uint256) + { + (uint256 value, bool lossless) = toFixedDecimalLossy(signedCoefficient, exponent, decimals); + if (!lossless) { + revert LossyConversionFromFloat(signedCoefficient, exponent); + } + return value; + } + + /// Same as toFixedDecimalLossless, but accepts a Float struct instead of + /// separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param float The Float struct containing the signed coefficient and + /// exponent. + /// @param decimals The number of decimals in the fixed point representation. + /// e.g. If 1e18 represents 1 this would be 18 decimals. + /// @return value The fixed point decimal value. + function toFixedDecimalLossless(Float float, uint8 decimals) internal pure returns (uint256) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + return toFixedDecimalLossless(signedCoefficient, exponent, decimals); + } + + /// Pack a signed coefficient and exponent into a single `Float`. + /// Clearly this involves fitting 64 bytes into 32 bytes, so there will be + /// data loss. + /// @param signedCoefficient The signed coefficient of the floating point + /// representation. + /// @param exponent The exponent of the floating point representation. + /// @return float The packed representation of the signed coefficient and + /// exponent. + /// @return lossless True if the conversion was lossless, false otherwise. + function packLossy(int256 signedCoefficient, int256 exponent) internal pure returns (Float float, bool lossless) { + unchecked { + int256 initialSignedCoefficient = signedCoefficient; + int256 initialExponent = exponent; + // lossless is true if the signed coefficient fits in int224. + // truncation here is intentional if it happens as that is what we + // are testing for. + // forge-lint: disable-next-line(unsafe-typecast) + lossless = int224(signedCoefficient) == signedCoefficient; + + // The reason that we can do unchecked exponent addition here is that + // when it overflows it will wrap to a very large negative number. + // This will get caught below when we check if the exponent fits in + // int32. + if (!lossless) { + if (signedCoefficient / 1e72 != 0) { + signedCoefficient /= 1e5; + exponent += 5; + } + + // truncation here is intentional if it happens as that is what we + // are testing for. + // forge-lint: disable-next-line(unsafe-typecast) + while (int224(signedCoefficient) != signedCoefficient) { + signedCoefficient /= 10; + ++exponent; + } + } else { + if (signedCoefficient == 0) { + return (FLOAT_ZERO, true); + } + } + + // truncation here is intentional if it happens as that is what we + // are testing for. + // forge-lint: disable-next-line(unsafe-typecast) + if (int32(exponent) != exponent) { + // If the exponent is negative then this is a number too small + // to pack. We return zero but it is not a lossless conversion. + if (exponent < 0) { + return (FLOAT_ZERO, false); + } + revert ExponentOverflow(initialSignedCoefficient, initialExponent); + } + + // Need a mask to zero out the bits that could be set to 1 if the + // coefficient is negative. + uint256 mask = type(uint224).max; + assembly ("memory-safe") { + float := or(and(signedCoefficient, mask), shl(0xe0, exponent)) + } + } + } + + /// Lossless version of `packLossy`. This will revert if the conversion is + /// lossy. + /// @param signedCoefficient As per `packLossy`. + /// @param exponent As per `packLossy`. + /// @return float As per `packLossy`. + function packLossless(int256 signedCoefficient, int256 exponent) internal pure returns (Float) { + (Float c, bool lossless) = packLossy(signedCoefficient, exponent); + if (!lossless) { + revert CoefficientOverflow(signedCoefficient, exponent); + } + return c; + } + + /// Variant of `packLossy` used as the finaliser of every arithmetic + /// operation. Tolerates coefficient truncation (which preserves the order + /// of magnitude) but reverts on exponent underflow (which silently + /// replaces the value by `FLOAT_ZERO`, losing the magnitude entirely). + /// Distinguishes the two `lossless = false` modes from `packLossy` by the + /// returned float: `packLossy` only returns `FLOAT_ZERO` for the underflow + /// case when `lossless` is false (the coefficient-truncation path + /// successively divides by ten and never reaches zero from a non-zero + /// input). + function packArithmeticResult(int256 signedCoefficient, int256 exponent) internal pure returns (Float) { + (Float c, bool lossless) = packLossy(signedCoefficient, exponent); + if (!lossless && Float.unwrap(c) == bytes32(0)) { + revert ExponentUnderflow(signedCoefficient, exponent); + } + return c; + } + + /// Unpack a packed bytes32 into a signed coefficient and exponent. This is + /// the inverse of `pack`. + /// @param float The packed representation of the signed coefficient and + /// exponent. + /// @return signedCoefficient The signed coefficient of the floating point + /// representation. + /// @return exponent The exponent of the floating point representation. + function unpack(Float float) internal pure returns (int256 signedCoefficient, int256 exponent) { + uint256 mask = type(uint224).max; + assembly ("memory-safe") { + signedCoefficient := signextend(27, and(float, mask)) + exponent := sar(0xe0, float) + } + } + + /// Same as add, but accepts a Float struct instead of separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param a The Float struct containing the signed coefficient and + /// exponent of the first floating point number. + /// @param b The Float struct containing the signed coefficient and + /// exponent of the second floating point number. + /// @return The sum of the two floats. + function add(Float a, Float b) internal pure returns (Float) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (int256 signedCoefficient, int256 exponent) = + LibDecimalFloatImplementation.add(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + // Addition can be lossy. + + Float c = packArithmeticResult(signedCoefficient, exponent); + return c; + } + + /// Subtract float b from float a. + /// + /// This is effectively shorthand for adding the two floats with the second + /// float negated. Therefore, the same caveats apply as for `add`. + /// @param a The float to subtract from. + /// @param b The float to subtract. + /// @return The difference of the two floats (a - b). + function sub(Float a, Float b) internal pure returns (Float) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (int256 signedCoefficientC, int256 exponentC) = + LibDecimalFloatImplementation.sub(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + // Subtraction can be lossy. + + Float c = packArithmeticResult(signedCoefficientC, exponentC); + return c; + } + + /// Same as minus, but accepts a Float struct instead of separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param float The Float struct containing the signed coefficient and + /// exponent of the floating point number. + /// @return The negated float. + function minus(Float float) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + (signedCoefficient, exponent) = LibDecimalFloatImplementation.minus(signedCoefficient, exponent); + // Minus is a lossy operation due to the asymmetry of signed integers. + + Float result = packArithmeticResult(signedCoefficient, exponent); + return result; + } + + /// Returns the absolute value of a float. + /// Identity if non-negative, negated if negative. Max negative signed value + /// for the coefficient will be shifted one OOM so that it can be negated to + /// a positive value. + /// + /// https://speleotrove.com/decimal/daops.html#refabs + /// > abs takes one operand. If the operand is negative, the result is the + /// > same as using the minus operation on the operand. Otherwise, the result + /// > is the same as using the plus operation on the operand. + /// @param float The float to take the absolute value of. + /// @return The absolute value of the float. + function abs(Float float) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + + if (signedCoefficient < 0) { + (signedCoefficient, exponent) = LibDecimalFloatImplementation.minus(signedCoefficient, exponent); + } + + // At the limit of signed values there is the potential for a lossy + // conversion when negating. + Float result = packArithmeticResult(signedCoefficient, exponent); + return result; + } + + /// https://speleotrove.com/decimal/daops.html#refmult + /// > multiply takes two operands. If either operand is a special value then + /// > the general rules apply. + /// > + /// > Otherwise, the operands are multiplied together + /// > (‘long multiplication’), resulting in a number which may be as long as + /// > the sum of the lengths of the two operands, as follows: + /// > + /// > - The coefficient of the result, before rounding, is computed by + /// > multiplying together the coefficients of the operands. + /// > - The exponent of the result, before rounding, is the sum of the + /// > exponents of the two operands. + /// > - The sign of the result is the exclusive or of the signs of the + /// > operands. + /// > + /// > The result is then rounded to precision digits if necessary, counting + /// > from the most significant digit of the result. + /// @param a The Float struct containing the signed coefficient and + /// exponent of the first floating point number. + /// @param b The Float struct containing the signed coefficient and + /// exponent of the second floating point number. + /// @return The product of the two floats. + function mul(Float a, Float b) internal pure returns (Float) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (int256 signedCoefficient, int256 exponent) = + LibDecimalFloatImplementation.mul(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + // Multiplication is typically lossless, but can be lossy in edge cases. + Float c = packArithmeticResult(signedCoefficient, exponent); + return c; + } + + /// Same as `div`, but accepts a Float struct instead of separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param a The Float struct containing the signed coefficient and + /// exponent of the first floating point number. + /// @param b The Float struct containing the signed coefficient and + /// exponent of the second floating point number. + /// @return The quotient of the two floats (a / b). + function div(Float a, Float b) internal pure returns (Float) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (int256 signedCoefficient, int256 exponent) = + LibDecimalFloatImplementation.div(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + // Division is often lossy because it is very easy to end up with + // infinite decimal representations. + Float c = packArithmeticResult(signedCoefficient, exponent); + return c; + } + + /// Same as inv, but accepts a Float struct instead of separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param float The Float struct containing the signed coefficient and + /// exponent of the floating point number. + /// @return The multiplicative inverse (1 / float). + function inv(Float float) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + (signedCoefficient, exponent) = LibDecimalFloatImplementation.inv(signedCoefficient, exponent); + Float result = packArithmeticResult(signedCoefficient, exponent); + return result; + } + + /// Same as eq, but accepts a Float struct instead of separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if the two floats are numerically equal. + function eq(Float a, Float b) internal pure returns (bool) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + return LibDecimalFloatImplementation.eq(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + } + + /// Numeric less than for floats. + /// A float is less than another if its numeric value is less than the other. + /// For example, 1e2 is less than 1e3, and 1e2 is less than 2e2. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if a is less than b. + function lt(Float a, Float b) internal pure returns (bool) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (signedCoefficientA, signedCoefficientB) = + LibDecimalFloatImplementation.compareRescale(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + + return signedCoefficientA < signedCoefficientB; + } + + /// Numeric greater than for floats. + /// A float is greater than another if its numeric value is greater than the + /// other. For example, 1e3 is greater than 1e2, and 2e2 is greater than 1e2. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if a is greater than b. + function gt(Float a, Float b) internal pure returns (bool) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (signedCoefficientA, signedCoefficientB) = + LibDecimalFloatImplementation.compareRescale(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + return signedCoefficientA > signedCoefficientB; + } + + /// Numeric less than or equal to for floats. + /// A float is less than or equal to another if its numeric value is less + /// than or equal to the other. For example, 1e2 is less than or equal to 1e3 + /// and 1e2 is less than or equal to 1e2. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if a is less than or equal to b. + function lte(Float a, Float b) internal pure returns (bool) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (signedCoefficientA, signedCoefficientB) = + LibDecimalFloatImplementation.compareRescale(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + return signedCoefficientA <= signedCoefficientB; + } + + /// Numeric greater than or equal to for floats. + /// A float is greater than or equal to another if its numeric value is + /// greater than or equal to the other. For example, 1e3 is greater than or + /// equal to 1e2 and 1e2 is greater than or equal to 1e2. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return True if a is greater than or equal to b. + function gte(Float a, Float b) internal pure returns (bool) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (signedCoefficientA, signedCoefficientB) = + LibDecimalFloatImplementation.compareRescale(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + return signedCoefficientA >= signedCoefficientB; + } + + /// Integer component of a float. + /// For positive numbers this is the floor, for negative numbers this is + /// the ceiling. + /// @param float The float to return the integer part of. + /// @return The integer component of the float. + function integer(Float float) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + //slither-disable-next-line unused-return + (int256 i,) = LibDecimalFloatImplementation.intFrac(signedCoefficient, exponent); + Float result = packArithmeticResult(i, exponent); + return result; + } + + /// Fractional component of a float. + /// @param float The float to return the fractional part of. + /// @return The fractional component of the float. + function frac(Float float) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + //slither-disable-next-line unused-return + (, int256 fraction) = LibDecimalFloatImplementation.intFrac(signedCoefficient, exponent); + Float result = packArithmeticResult(fraction, exponent); + return result; + } + + /// Smallest integer value less than or equal to the float. + /// @param float The float to floor. + /// @return The floored float. + function floor(Float float) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + // If the exponent is 0 or greater then the float is already an integer. + if (exponent >= 0) { + return float; + } + (int256 i, int256 fraction) = LibDecimalFloatImplementation.intFrac(signedCoefficient, exponent); + if (signedCoefficient < 0 && fraction != 0) { + // If the float is negative and has a fractional part, we need to + // subtract 1 from the characteristic to floor it. + (i, exponent) = LibDecimalFloatImplementation.sub(i, exponent, 1e76, -76); + } + Float result = packArithmeticResult(i, exponent); + return result; + } + + /// Smallest integer value greater than or equal to the float. + /// @param float The float to ceil. + /// @return The ceiled float. + function ceil(Float float) internal pure returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + // If the exponent is 0 or greater then the float is already an integer. + if (exponent >= 0) { + return float; + } + (int256 i, int256 fraction) = LibDecimalFloatImplementation.intFrac(signedCoefficient, exponent); + + // If the fraction is 0, then the float is already an integer. + if (fraction == 0) { + return float; + } + // Truncate the fractional part when exponent < 0: + // fraction < 0 (input < 0) → truncation towards zero increases the value (correct ceil). + // fraction == 0 → value is already an integer. + // fraction > 0 (input > 0) → truncation decreases the value, so add 1 to round up. + else if (fraction > 0) { + (i, exponent) = LibDecimalFloatImplementation.add(i, exponent, 1e76, -76); + } + + Float result = packArithmeticResult(i, exponent); + return result; + } + + /// Same as `pow10`, but accepts a Float struct instead of separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param float The Float struct containing the signed coefficient and + /// exponent of the floating point number. + /// @param tablesDataContract The address of the contract containing the + /// logarithm tables. + /// @return The result of 10^float. + function pow10(Float float, address tablesDataContract) internal view returns (Float) { + (int256 signedCoefficient, int256 exponent) = float.unpack(); + (signedCoefficient, exponent) = + LibDecimalFloatImplementation.pow10(tablesDataContract, signedCoefficient, exponent); + // We don't care if power10 is lossy because it's an approximation + // anyway. + Float result = packArithmeticResult(signedCoefficient, exponent); + return result; + } + + /// Same as log10, but accepts a Float struct instead of separate values. + /// Costs more gas but helps mitigate stack depth issues, and is more + /// ergonomic for the caller. + /// @param tablesDataContract The address of the contract containing the + /// logarithm tables. + /// @param a The float to log10. + /// @return The base-10 logarithm of a. + function log10(Float a, address tablesDataContract) internal view returns (Float) { + (int256 signedCoefficient, int256 exponent) = a.unpack(); + (signedCoefficient, exponent) = + LibDecimalFloatImplementation.log10(tablesDataContract, signedCoefficient, exponent); + // We don't care if log10 is lossy because it's an approximation anyway. + Float result = packArithmeticResult(signedCoefficient, exponent); + return result; + } + + /// a^b = 10^(b * log10(a)) + /// + /// Due to the inaccuraces of log10 and power10, this is not perfectly + /// accurate, a round trip like x^y^(1/y) will typically be within half a + /// percent or less of the original value, but this can vary depending on + /// the input values. + /// + /// Doesn't lose precision due to the exponent, for a wide range of + /// exponents. + /// @param a The float `a` in `a^b`. + /// @param b The float `b` in `a^b`. + /// @param tablesDataContract The address of the contract containing the + /// logarithm tables. + /// @return The result of a^b. + function pow(Float a, Float b, address tablesDataContract) internal view returns (Float) { + (int256 signedCoefficientA, int256 exponentA) = a.unpack(); + + if (b.isZero()) { + return FLOAT_ONE; + } else if (signedCoefficientA <= 0) { + if (signedCoefficientA == 0) { + if (b.lt(FLOAT_ZERO)) { + // If b is negative, and a is 0, so we revert. + revert ZeroNegativePower(b); + } + + // If a is zero, then a^b is always zero, regardless of b. + // This is a special case because log10(0) is undefined. + return FLOAT_ZERO; + } else { + revert PowNegativeBase(signedCoefficientA, exponentA); + } + } + // Handle identity case for positive values of a, i.e. a^1. + else if (b.eq(FLOAT_ONE) && a.gt(FLOAT_ZERO)) { + return a; + } else if (b.lt(FLOAT_ZERO)) { + return pow(a.inv(), b.minus(), tablesDataContract); + } + + // Uses LibDecimalFloatImplementation directly (rather than the packed + // Float API) to avoid repeated pack/unpack overhead in the squaring + // loop and to preserve unnormalized intermediates. + (int256 signedCoefficientB, int256 exponentB) = b.unpack(); + (int256 integerB, int256 fractionB) = LibDecimalFloatImplementation.intFrac(signedCoefficientB, exponentB); + + uint256 exponentBInteger = uint256(LibDecimalFloatImplementation.withTargetExponent(integerB, exponentB, 0)); + + // Exponentiation by squaring. + (int256 signedCoefficientResult, int256 exponentResult) = (1, 0); + (int256 signedCoefficientBase, int256 exponentBase) = a.unpack(); + while (exponentBInteger >= 1) { + if (exponentBInteger & 0x01 == 0x01) { + (signedCoefficientResult, exponentResult) = LibDecimalFloatImplementation.mul( + signedCoefficientResult, exponentResult, signedCoefficientBase, exponentBase + ); + } + exponentBInteger >>= 1; + (signedCoefficientBase, exponentBase) = LibDecimalFloatImplementation.mul( + signedCoefficientBase, exponentBase, signedCoefficientBase, exponentBase + ); + } + + (int256 signedCoefficientC, int256 exponentC) = + LibDecimalFloatImplementation.log10(tablesDataContract, signedCoefficientA, exponentA); + + (signedCoefficientC, exponentC) = + LibDecimalFloatImplementation.mul(signedCoefficientC, exponentC, fractionB, exponentB); + + (signedCoefficientC, exponentC) = + LibDecimalFloatImplementation.pow10(tablesDataContract, signedCoefficientC, exponentC); + + (signedCoefficientC, exponentC) = + LibDecimalFloatImplementation.mul(signedCoefficientC, exponentC, signedCoefficientResult, exponentResult); + // We don't care if power is lossy because it's an approximation anyway. + Float c = packArithmeticResult(signedCoefficientC, exponentC); + return c; + } + + /// sqrt a = a ^ 0.5 + /// + /// Due to the inaccuracies of log10 and power10, this is not perfectly + /// accurate, a round trip like sqrt(x)^2 will typically be within half a + /// percent or less of the original value, but this can vary depending on + /// the input values. + /// + /// Doesn't lose precision due to the exponent, for a wide range of + /// exponents. + /// @param a The float to take the square root of. + /// @param tablesDataContract The address of the contract containing the + /// logarithm tables. + /// @return The square root of a. + function sqrt(Float a, address tablesDataContract) internal view returns (Float) { + return pow(a, FLOAT_HALF, tablesDataContract); + } + + /// Returns the minimum of two values. + /// Convenience for `a < b ? a : b`. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return The minimum of the two floats. + function min(Float a, Float b) internal pure returns (Float) { + return lt(a, b) ? a : b; + } + + /// Returns the maximum of two values. + /// Convenience for `a > b ? a : b`. + /// @param a The first float to compare. + /// @param b The second float to compare. + /// @return The larger of the two floats. + function max(Float a, Float b) internal pure returns (Float) { + return gt(a, b) ? a : b; + } + + /// Returns true if the float is zero. Handles the case where the signed + /// coefficient is zero and exponent is potentially non zero. + /// @param a The float to check. + /// @return result True if the float is zero. + function isZero(Float a) internal pure returns (bool result) { + uint256 mask = type(uint224).max; + assembly ("memory-safe") { + // Don't need to signextend here because we only care if the value + // is zero or not. + result := iszero(and(a, mask)) + } + } +} diff --git a/dependencies/rain-math-float-0.1.1/src/lib/deploy/LibDecimalFloatDeploy.sol b/dependencies/rain-math-float-0.1.1/src/lib/deploy/LibDecimalFloatDeploy.sol new file mode 100644 index 00000000..dd0f8bd3 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/lib/deploy/LibDecimalFloatDeploy.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import { + LOG_TABLES, + LOG_TABLES_SMALL, + LOG_TABLES_SMALL_ALT, + ANTI_LOG_TABLES, + ANTI_LOG_TABLES_SMALL +} from "../../generated/LogTables.pointers.sol"; +import {LOG_TABLE_DISAMBIGUATOR} from "../table/LibLogTable.sol"; +import {LogTablesNotDeployed} from "../../error/ErrDecimalFloat.sol"; + +library LibDecimalFloatDeploy { + /// @dev Address of the log tables deployed via Zoltu's deterministic + /// deployment proxy. This address is the same across all EVM-compatible + /// networks. + address constant ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS = address(0xc51a14251b0dcF0ae24A96b7153991378938f5F5); + + /// @dev The expected codehash of the log tables deployed via Zoltu's + /// deterministic deployment proxy. + bytes32 constant LOG_TABLES_DATA_CONTRACT_HASH = 0x2573004ac3a9ee7fc8d73654d76386f1b6b99e34cdf86a689c4691e47143420f; + + /// @dev Address of the DecimalFloat contract deployed via Zoltu's + /// deterministic deployment proxy. + /// This address is the same across all EVM-compatible networks. + address constant ZOLTU_DEPLOYED_DECIMAL_FLOAT_ADDRESS = address(0xBee0eEFaffD046c9602109eB30A858Be301CC926); + + /// @dev The expected codehash of the DecimalFloat contract deployed via + /// Zoltu's deterministic deployment proxy. + bytes32 constant DECIMAL_FLOAT_CONTRACT_HASH = 0x7a93d0311f7782b44157ba40e94ec936085ebe001c7893bdd74911c8351d3def; + + /// Combines all log and anti-log tables into a single bytes array for + /// deployment. These are using packed encoding to minimize size and remove + /// the complexity of full ABI encoding. + /// @return The combined tables. + function combinedTables() internal pure returns (bytes memory) { + return abi.encodePacked( + LOG_TABLES, + LOG_TABLES_SMALL, + LOG_TABLES_SMALL_ALT, + ANTI_LOG_TABLES, + ANTI_LOG_TABLES_SMALL, + LOG_TABLE_DISAMBIGUATOR + ); + } + + /// Revert if the log tables data contract is not deployed at the + /// Zoltu-deterministic address with the expected codehash. Call this + /// from the constructor of any contract that integrates with the + /// production `DecimalFloat` (or otherwise reads from + /// `ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS`) so deployment fails loudly on + /// chains where Zoltu has not dropped the tables, instead of silent + /// `extcodecopy`-from-empty corruption at the first transcendental call. + function checkLogTablesDeployed() internal view { + bytes32 actualCodehash = ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS.codehash; + if (actualCodehash != LOG_TABLES_DATA_CONTRACT_HASH) { + revert LogTablesNotDeployed( + ZOLTU_DEPLOYED_LOG_TABLES_ADDRESS, LOG_TABLES_DATA_CONTRACT_HASH, actualCodehash + ); + } + } +} diff --git a/dependencies/rain-math-float-0.1.1/src/lib/format/LibFormatDecimalFloat.sol b/dependencies/rain-math-float-0.1.1/src/lib/format/LibFormatDecimalFloat.sol new file mode 100644 index 00000000..f29f8fc4 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/lib/format/LibFormatDecimalFloat.sol @@ -0,0 +1,196 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {LibDecimalFloat, Float} from "../LibDecimalFloat.sol"; +import {LibDecimalFloatImplementation} from "../implementation/LibDecimalFloatImplementation.sol"; +import {Strings} from "@openzeppelin-contracts-5.6.1/utils/Strings.sol"; +import {UnformatableExponent} from "../../error/ErrFormat.sol"; + +/// @dev Library for formatting DecimalFloat values as strings. +/// Not particularly efficient as it is intended for offchain use that doesn't +/// cost gas. +library LibFormatDecimalFloat { + /// Maximum `|exponent|` supported by non-scientific formatting. Exponents + /// outside `[-MAX_NON_SCIENTIFIC_EXPONENT, MAX_NON_SCIENTIFIC_EXPONENT]` + /// revert with `UnformatableExponent`. The cap exists to prevent unbounded + /// memory use when building the output string; callers that need to render + /// such values should use scientific mode. + int256 internal constant MAX_NON_SCIENTIFIC_EXPONENT = 1000; + + /// Format a decimal float as a string. + /// Not particularly efficient as it is intended for offchain use that + /// doesn't cost gas. + /// @param float The decimal float to format. + /// @param scientific Whether to format in scientific notation (e.g. 1e10). + /// @return The string representation of the decimal float. + function toDecimalString(Float float, bool scientific) internal pure returns (string memory) { + (int256 signedCoefficient, int256 exponent) = LibDecimalFloat.unpack(float); + if (signedCoefficient == 0) { + return "0"; + } + if (scientific) { + return _toScientific(signedCoefficient, exponent); + } + return _toNonScientific(signedCoefficient, exponent); + } + + /// Scientific notation: render as `d.dddeN` where the leading digit is the + /// most significant digit of the maximized coefficient. Uses big-integer + /// division to place the decimal point; the divisor is always `1e75` or + /// `1e76` which both fit in int256. + function _toScientific(int256 signedCoefficient, int256 exponent) private pure returns (string memory) { + (signedCoefficient, exponent) = LibDecimalFloatImplementation.maximizeFull(signedCoefficient, exponent); + + uint256 scale; + uint256 scaleExponent; + if (signedCoefficient / 1e76 != 0) { + scaleExponent = 76; + scale = 1e76; + } else { + scaleExponent = 75; + scale = 1e75; + } + + // scale is one of two hardcoded values (1e76, 1e75), both fit int256. + // forge-lint: disable-next-line(unsafe-typecast) + int256 integral = signedCoefficient / int256(scale); + // scale is one of two hardcoded values (1e76, 1e75), both fit int256. + // forge-lint: disable-next-line(unsafe-typecast) + int256 fractional = signedCoefficient % int256(scale); + + bool isNeg = false; + if (integral < 0) { + isNeg = true; + integral = -integral; + } + if (fractional < 0) { + isNeg = true; + fractional = -fractional; + } + + string memory fractionalString = ""; + if (fractional != 0) { + uint256 fracLeadingZeros = 0; + uint256 fracScale = scale / 10; + // fracScale is scale/10 of a hardcoded power of 10, fits int256. + // forge-lint: disable-next-line(unsafe-typecast) + while (fractional / int256(fracScale) == 0) { + fracScale /= 10; + fracLeadingZeros++; + } + + string memory fracLeadingZerosString = ""; + for (uint256 i = 0; i < fracLeadingZeros; i++) { + fracLeadingZerosString = string.concat(fracLeadingZerosString, "0"); + } + + while (fractional % 10 == 0) { + fractional /= 10; + } + + fractionalString = string.concat(".", fracLeadingZerosString, Strings.toStringSigned(fractional)); + } + + string memory integralString = Strings.toStringSigned(integral); + // scaleExponent is a hardcoded small value (75 or 76); the cast back + // to int256 cannot truncate. + // forge-lint: disable-next-line(unsafe-typecast) + int256 displayExponent = exponent + int256(scaleExponent); + string memory exponentString = + displayExponent == 0 ? "" : string.concat("e", Strings.toStringSigned(displayExponent)); + string memory prefix = isNeg ? "-" : ""; + return string.concat(prefix, integralString, fractionalString, exponentString); + } + + /// Non-scientific notation: render by placing a decimal point inside the + /// coefficient's digit string according to the exponent. Does not compute + /// `10^exponent` as an integer, so the output is valid for any + /// `|exponent| <= MAX_NON_SCIENTIFIC_EXPONENT` — including exponents below + /// `-76` that arise from near-cancellation add/sub. + function _toNonScientific(int256 signedCoefficient, int256 exponent) private pure returns (string memory) { + if (exponent > MAX_NON_SCIENTIFIC_EXPONENT || exponent < -MAX_NON_SCIENTIFIC_EXPONENT) { + revert UnformatableExponent(exponent); + } + + bool isNeg = signedCoefficient < 0; + uint256 absCoef; + if (isNeg) { + // signedCoefficient came from `unpack` so |signedCoefficient| fits + // int224; negation always fits uint256. + // forge-lint: disable-next-line(unsafe-typecast) + absCoef = uint256(-signedCoefficient); + } else { + // signedCoefficient is non-negative and fits int224, so fits + // uint256. + // forge-lint: disable-next-line(unsafe-typecast) + absCoef = uint256(signedCoefficient); + } + + bytes memory digits = bytes(Strings.toString(absCoef)); + uint256 k = digits.length; + + // Strip trailing decimal zeros of the coefficient, raising the + // exponent by the same count. Value-preserving, and simplifies + // downstream cases by eliminating redundant zeros. + uint256 trailingZeros = 0; + while (trailingZeros < k && digits[k - 1 - trailingZeros] == "0") { + trailingZeros++; + } + uint256 sigK = k - trailingZeros; + // k <= 78 (int224 max has ~68 decimal digits), so int256(trailingZeros) + // cannot overflow. + // forge-lint: disable-next-line(unsafe-typecast) + int256 effExp = exponent + int256(trailingZeros); + + string memory prefix = isNeg ? "-" : ""; + + if (effExp >= 0) { + // Significant digits followed by `effExp` trailing zeros. + // effExp is bounded by MAX_NON_SCIENTIFIC_EXPONENT + ~78. + // forge-lint: disable-next-line(unsafe-typecast) + uint256 uEffExp = uint256(effExp); + bytes memory out = new bytes(sigK + uEffExp); + for (uint256 i = 0; i < sigK; i++) { + out[i] = digits[i]; + } + for (uint256 i = 0; i < uEffExp; i++) { + out[sigK + i] = "0"; + } + return string.concat(prefix, string(out)); + } + + // effExp < 0 + // effExp >= -MAX_NON_SCIENTIFIC_EXPONENT (by the guard above) so + // -effExp is positive and fits uint256. + // forge-lint: disable-next-line(unsafe-typecast) + uint256 absEffExp = uint256(-effExp); + + if (sigK > absEffExp) { + // Decimal point sits inside the significant digits. + uint256 splitAt = sigK - absEffExp; + bytes memory out = new bytes(sigK + 1); + for (uint256 i = 0; i < splitAt; i++) { + out[i] = digits[i]; + } + out[splitAt] = "."; + for (uint256 i = 0; i < absEffExp; i++) { + out[splitAt + 1 + i] = digits[splitAt + i]; + } + return string.concat(prefix, string(out)); + } else { + // "0." + (absEffExp - sigK) leading zeros + significant digits. + uint256 leadingZerosCount = absEffExp - sigK; + bytes memory out = new bytes(2 + leadingZerosCount + sigK); + out[0] = "0"; + out[1] = "."; + for (uint256 i = 0; i < leadingZerosCount; i++) { + out[2 + i] = "0"; + } + for (uint256 i = 0; i < sigK; i++) { + out[2 + leadingZerosCount + i] = digits[i]; + } + return string.concat(prefix, string(out)); + } + } +} diff --git a/dependencies/rain-math-float-0.1.1/src/lib/implementation/LibDecimalFloatImplementation.sol b/dependencies/rain-math-float-0.1.1/src/lib/implementation/LibDecimalFloatImplementation.sol new file mode 100644 index 00000000..af61ed77 --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/lib/implementation/LibDecimalFloatImplementation.sol @@ -0,0 +1,1324 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import { + ExponentOverflow, + Log10Negative, + Log10Zero, + MulDivOverflow, + DivisionByZero, + MaximizeOverflow +} from "../../error/ErrDecimalFloat.sol"; +import { + LOG_TABLE_SIZE_BYTES, + LOG_TABLE_SIZE_BASE, + ALT_SMALL_LOG_TABLE_SIZE_BYTES, + ANTILOG_TABLE_SIZE_BYTES, + LOG_MANTISSA_LAST_INDEX, + ANTILOG_IDX_LAST_INDEX +} from "../table/LibLogTable.sol"; + +/// @dev Thrown when attempting to rescale a coefficient to a target exponent +error WithTargetExponentOverflow(int256 signedCoefficient, int256 exponent, int256 targetExponent); + +/// @dev The maximum difference in exponents when adding to rescale. +uint256 constant ADD_MAX_EXPONENT_DIFF = 76; + +/// @dev The maximum exponent that can be maximized. +/// This is crazy large, so should never be a problem for any real use case. +/// We need it to guard against overflow when maximizing. +int256 constant EXPONENT_MAX = type(int256).max / 2; + +/// @dev The minimum exponent that can be maximized. +/// This is crazy small, so should never be a problem for any real use case. +/// We need it to guard against overflow when maximized. +int256 constant EXPONENT_MIN = -EXPONENT_MAX; + +/// @dev The signed coefficient of maximized zero. +int256 constant MAXIMIZED_ZERO_SIGNED_COEFFICIENT = 0; + +/// @dev The exponent of maximized zero. +int256 constant MAXIMIZED_ZERO_EXPONENT = 0; + +/// @dev The exponent used in log10 calculations to get the correct result +/// when using the log tables. +int256 constant LOG10_Y_EXPONENT = -76; + +/// @dev Library implementing core DecimalFloat operations using only stack +/// variables. +/// NOT intended for external use, typical use is to treat the `Float` type +/// as the interface to the float functionality. The tradeoff is better +/// abstractions for some more gas and less range of the operations due to +/// packing and unpacking having fundamental bit size limitations. +library LibDecimalFloatImplementation { + /// Negates a float. + /// Equivalent to `0 - x`. + /// + /// https://speleotrove.com/decimal/daops.html#refplusmin + /// > minus and plus both take one operand, and correspond to the prefix + /// > minus and plus operators in programming languages. + /// > + /// > The operations are evaluated using the same rules as add and subtract; + /// > the operations plus(a) and minus(a) + /// > (where a and b refer to any numbers) are calculated as the operations + /// > add(’0’, a) and subtract(’0’, b) respectively, where the ’0’ has the + /// > same exponent as the operand. + /// + /// @param signedCoefficient The signed coefficient of the floating point + /// number. + /// @param exponent The exponent of the floating point number. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function minus(int256 signedCoefficient, int256 exponent) internal pure returns (int256, int256) { + unchecked { + // This is the only edge case that can't be simply negated. + if (signedCoefficient == type(int256).min) { + if (exponent == type(int256).max) { + revert ExponentOverflow(signedCoefficient, exponent); + } + signedCoefficient /= 10; + ++exponent; + } + return (-signedCoefficient, exponent); + } + } + + /// Returns the absolute value of a signed coefficient as an unsigned + /// integer. + /// @param signedCoefficient The signed coefficient. + /// @return The absolute value as an unsigned integer. + function absUnsignedSignedCoefficient(int256 signedCoefficient) internal pure returns (uint256) { + unchecked { + if (signedCoefficient < 0) { + if (signedCoefficient == type(int256).min) { + return uint256(type(int256).max) + 1; + } else { + // signedCoefficient < 0 + // forge-lint: disable-next-line(unsafe-typecast) + return uint256(-signedCoefficient); + } + } else { + // signedCoefficient >= 0 + // forge-lint: disable-next-line(unsafe-typecast) + return uint256(signedCoefficient); + } + } + } + + /// Given the absolute value of the result coefficient, and the signs of + /// the input coefficients, returns the signed coefficient and exponent of + /// the result of a multiplication or division operation. + /// @param a The signed coefficient of the first operand. + /// @param b The signed coefficient of the second operand. + /// @param signedCoefficientAbs The absolute value of the result coefficient. + /// @param exponent The exponent of the result. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function unabsUnsignedMulOrDivLossy(int256 a, int256 b, uint256 signedCoefficientAbs, int256 exponent) + internal + pure + returns (int256, int256) + { + // Need to minus the coefficient because a and b had different signs. + if ((a ^ b) < 0) { + if (signedCoefficientAbs > uint256(type(int256).max)) { + if (signedCoefficientAbs == uint256(type(int256).max) + 1) { + // Edge case where the absolute value is exactly + // type(int256).min. + return (type(int256).min, exponent); + } else { + // signedCoefficientAbs divided by 10 so won't truncate when + // cast. + // forge-lint: disable-next-line(unsafe-typecast) + return (-int256(signedCoefficientAbs / 10), exponent + 1); + } + } else { + // signedCoefficientAbs [0, type(int256).max] + // forge-lint: disable-next-line(unsafe-typecast) + return (-int256(signedCoefficientAbs), exponent); + } + } else { + if (signedCoefficientAbs > uint256(type(int256).max)) { + // signedCoefficientAbs divided by 10 so won't truncate when + // cast. + // forge-lint: disable-next-line(unsafe-typecast) + return (int256(signedCoefficientAbs / 10), exponent + 1); + } else { + // signedCoefficientAbs is bound to the int256 range. + // forge-lint: disable-next-line(unsafe-typecast) + return (int256(signedCoefficientAbs), exponent); + } + } + } + + /// Stack only implementation of `mul`. + /// @param signedCoefficientA The signed coefficient of the first operand. + /// @param exponentA The exponent of the first operand. + /// @param signedCoefficientB The signed coefficient of the second operand. + /// @param exponentB The exponent of the second operand. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function mul(int256 signedCoefficientA, int256 exponentA, int256 signedCoefficientB, int256 exponentB) + internal + pure + returns (int256 signedCoefficient, int256 exponent) + { + bool isZero; + assembly ("memory-safe") { + isZero := or(iszero(signedCoefficientA), iszero(signedCoefficientB)) + } + if (isZero) { + // These sets are redundant as both are zero but this makes it + // clearer and more explicit. + signedCoefficient = MAXIMIZED_ZERO_SIGNED_COEFFICIENT; + exponent = MAXIMIZED_ZERO_EXPONENT; + } else { + exponent = exponentA + exponentB; + + // mulDiv only works with unsigned integers, so get the absolute + // values of the coefficients. + uint256 signedCoefficientAAbs = absUnsignedSignedCoefficient(signedCoefficientA); + uint256 signedCoefficientBAbs = absUnsignedSignedCoefficient(signedCoefficientB); + + (uint256 prod1,) = mul512(signedCoefficientAAbs, signedCoefficientBAbs); + + uint256 adjustExponent = 0; + unchecked { + if (prod1 > 1e37) { + prod1 /= 1e37; + adjustExponent += 37; + } + if (prod1 > 1e18) { + prod1 /= 1e18; + adjustExponent += 18; + } + if (prod1 > 1e9) { + prod1 /= 1e9; + adjustExponent += 9; + } + if (prod1 > 1e4) { + prod1 /= 1e4; + adjustExponent += 4; + } + while (prod1 > 0) { + prod1 /= 10; + adjustExponent++; + } + } + + // adjustExponent [0, 76] + // forge-lint: disable-next-line(unsafe-typecast) + exponent += int256(adjustExponent); + + (signedCoefficient, exponent) = unabsUnsignedMulOrDivLossy( + signedCoefficientA, + signedCoefficientB, + mulDiv(signedCoefficientAAbs, signedCoefficientBAbs, uint256(10) ** adjustExponent), + exponent + ); + } + } + + /// https://speleotrove.com/decimal/daops.html#refdivide + /// > divide takes two operands. If either operand is a special value then + /// > the general rules apply. + /// > Otherwise, if the divisor is zero then either the Division undefined + /// > condition is raised (if the dividend is zero) and the result is NaN, + /// > or the Division by zero condition is raised and the result is an + /// > Infinity with a sign which is the exclusive or of the signs of the + /// > operands. + /// > + /// > Otherwise, a ‘long division’ is effected, as follows: + /// > + /// > - An integer variable, adjust, is initialized to 0. + /// > - If the dividend is non-zero, the coefficient of the result is + /// > computed as follows (using working copies of the operand + /// > coefficients, as necessary): + /// > - The operand coefficients are adjusted so that the coefficient of + /// > the dividend is greater than or equal to the coefficient of the + /// > divisor and is also less than ten times the coefficient of the + /// > divisor, thus: + /// > - While the coefficient of the dividend is less than the + /// > coefficient of the divisor it is multiplied by 10 and adjust is + /// > incremented by 1. + /// > - While the coefficient of the dividend is greater than or equal to + /// > ten times the coefficient of the divisor the coefficient of the + /// > divisor is multiplied by 10 and adjust is decremented by 1. + /// > - The result coefficient is initialized to 0. + /// > - The following steps are then repeated until the division is + /// > complete: + /// > - While the coefficient of the divisor is smaller than or equal to + /// > the coefficient of the dividend the former is subtracted from the + /// > latter and the coefficient of the result is incremented by 1. + /// > - If the coefficient of the dividend is now 0 and adjust is greater + /// > than or equal to 0, or if the coefficient of the result has + /// > precision digits, the division is complete. Otherwise, the + /// > coefficients of the result and the dividend are multiplied by 10 + /// > and adjust is incremented by 1. + /// > - Any remainder (the final coefficient of the dividend) is recorded + /// > and taken into account for rounding.[3] + /// > Otherwise (the dividend is zero), the coefficient of the result is + /// > zero and adjust is unchanged (is 0). + /// > - The exponent of the result is computed by subtracting the sum of the + /// > original exponent of the divisor and the value of adjust at the end + /// > of the coefficient calculation from the original exponent of the + /// > dividend. + /// > - The sign of the result is the exclusive or of the signs of the + /// > operands. + /// > + /// > The result is then rounded to precision digits, if necessary, according + /// > to the rounding algorithm and taking into account the remainder from + /// > the division. + /// @param signedCoefficientA The signed coefficient of the dividend. + /// @param exponentA The exponent of the dividend. + /// @param signedCoefficientB The signed coefficient of the divisor. + /// @param exponentB The exponent of the divisor. + /// @return signedCoefficient The signed coefficient of the quotient. + /// @return exponent The exponent of the quotient. + //slither-disable-next-line cyclomatic-complexity + function div(int256 signedCoefficientA, int256 exponentA, int256 signedCoefficientB, int256 exponentB) + internal + pure + returns (int256, int256) + { + if (signedCoefficientB == 0) { + revert DivisionByZero(signedCoefficientA, exponentA); + } else if (signedCoefficientA == 0) { + return (MAXIMIZED_ZERO_SIGNED_COEFFICIENT, MAXIMIZED_ZERO_EXPONENT); + } else { + int256 signedCoefficient; + int256 exponent; + bool fullA; + bool fullB; + // Move both coefficients into the e75/e76 range, so that the result + // of division will not cause a mulDiv overflow. + (signedCoefficientA, exponentA, fullA) = maximize(signedCoefficientA, exponentA); + (signedCoefficientB, exponentB, fullB) = maximize(signedCoefficientB, exponentB); + + // mulDiv only works with unsigned integers, so get the absolute + // values of the coefficients. + uint256 signedCoefficientAAbs = absUnsignedSignedCoefficient(signedCoefficientA); + uint256 signedCoefficientBAbs = absUnsignedSignedCoefficient(signedCoefficientB); + + uint256 scale = 1e76; + int256 adjustExponent = 76; + + // We are going to scale the numerator up by the largest power of ten + // that is smaller than the denominator. This will always overflow + // internally to the mulDiv during the initial multiplication, in + // 512 bits, but will subsequently always be reduced back down to + // fit in 256 bits by the division of a denominator that is larger + // than the scale up. + if (signedCoefficientBAbs < scale) { + if (fullB) { + scale = 1e75; + adjustExponent = 75; + } else { + if (signedCoefficientBAbs < 1e38) { + if (signedCoefficientBAbs < 1e19) { + if (signedCoefficientBAbs < 1e10) { + if (signedCoefficientBAbs < 1e5) { + scale = 1e5; + adjustExponent = 5; + } else { + scale = 1e10; + adjustExponent = 10; + } + } else { + if (signedCoefficientBAbs < 1e14) { + scale = 1e14; + adjustExponent = 14; + } else { + scale = 1e19; + adjustExponent = 19; + } + } + } else { + if (signedCoefficientBAbs < 1e28) { + if (signedCoefficientBAbs < 1e23) { + scale = 1e23; + adjustExponent = 23; + } else { + scale = 1e28; + adjustExponent = 28; + } + } else { + if (signedCoefficientBAbs < 1e33) { + scale = 1e33; + adjustExponent = 33; + } else { + scale = 1e38; + adjustExponent = 38; + } + } + } + } else { + if (signedCoefficientBAbs < 1e58) { + if (signedCoefficientBAbs < 1e48) { + if (signedCoefficientBAbs < 1e43) { + scale = 1e43; + adjustExponent = 43; + } else { + scale = 1e48; + adjustExponent = 48; + } + } else { + if (signedCoefficientBAbs < 1e53) { + scale = 1e53; + adjustExponent = 53; + } else { + scale = 1e58; + adjustExponent = 58; + } + } + } else { + if (signedCoefficientBAbs < 1e68) { + if (signedCoefficientBAbs < 1e63) { + scale = 1e63; + adjustExponent = 63; + } else { + scale = 1e68; + adjustExponent = 68; + } + } else { + if (signedCoefficientBAbs < 1e73) { + scale = 1e73; + adjustExponent = 73; + } else { + // Noop as we already have a starting scale. + } + } + } + } + + // Finalize the scale after the binary search. + while (signedCoefficientBAbs <= scale) { + unchecked { + scale /= 10; + adjustExponent -= 1; + } + } + if (scale == 0) { + revert MaximizeOverflow(signedCoefficientB, exponentB); + } + } + if (!fullA) { + revert MaximizeOverflow(signedCoefficientA, exponentA); + } + } + + // Attempt to apply the exponent adjustment. + // First we try to apply it to exponentA. + // If we cannot fully apply it we try to apply the rest to exponentB. + // If we still have some left over then we just return zero as + // the difference in exponents is too large to represent in + // a single result negative exponent. + unchecked { + if (exponentA >= type(int256).min + adjustExponent) { + exponentA -= adjustExponent; + } else { + adjustExponent -= exponentA - type(int256).min; + exponentA = type(int256).min; + + if (adjustExponent > 0) { + if (exponentB <= type(int256).max - adjustExponent) { + exponentB += adjustExponent; + } else { + return (MAXIMIZED_ZERO_SIGNED_COEFFICIENT, MAXIMIZED_ZERO_EXPONENT); + } + } + } + } + + int256 underflowExponentBy = 0; + + unchecked { + // This is the only case that can underflow. + if (exponentA < 0 && exponentB > 0) { + int256 headroom = exponentA - type(int256).min; + underflowExponentBy = exponentB > headroom ? exponentB - headroom : int256(0); + } + + exponent = exponentA + underflowExponentBy - exponentB; + + (signedCoefficient, exponent) = unabsUnsignedMulOrDivLossy( + signedCoefficientA, + signedCoefficientB, + mulDiv(signedCoefficientAAbs, scale, signedCoefficientBAbs), + exponent + ); + + if (underflowExponentBy > 0) { + if (underflowExponentBy > 76) { + // This means the exponent is too small to represent even if + // we truncate and downscale the signed coefficient. + return (MAXIMIZED_ZERO_SIGNED_COEFFICIENT, MAXIMIZED_ZERO_EXPONENT); + } + + // underflowExponentBy [1, 76] + // forge-lint: disable-next-line(unsafe-typecast) + signedCoefficient /= int256(10 ** uint256(underflowExponentBy)); + if (signedCoefficient == 0) { + exponent = MAXIMIZED_ZERO_EXPONENT; + } + } + return (signedCoefficient, exponent); + } + } + } + + /// mul512 from Open Zeppelin. + /// Simply part of the original mulDiv function abstracted out for reuse + /// elsewhere. + function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) { + // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use + // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 + // variables such that product = high * 2²⁵⁶ + low. + assembly ("memory-safe") { + let mm := mulmod(a, b, not(0)) + low := mul(a, b) + high := sub(sub(mm, low), lt(mm, low)) + } + } + + /// mulDiv as seen in Open Zeppelin, PRB Math, Solady, and other libraries. + /// Credit to Remco Bloemen under MIT license: https://2π.com/21/muldiv + function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { + (uint256 prod1, uint256 prod0) = mul512(x, y); + + // Handle non-overflow cases, 256 by 256 division. + if (prod1 == 0) { + unchecked { + return prod0 / denominator; + } + } + + // Make sure the result is less than 2^256. Also prevents denominator == 0. + if (prod1 >= denominator) { + revert MulDivOverflow(x, y, denominator); + } + + //////////////////////////////////////////////////////////////////////////// + // 512 by 256 division + //////////////////////////////////////////////////////////////////////////// + + // Make division exact by subtracting the remainder from [prod1 prod0]. + uint256 remainder; + assembly ("memory-safe") { + // Compute remainder using the mulmod Yul instruction. + remainder := mulmod(x, y, denominator) + + // Subtract 256 bit number from 512-bit number. + prod1 := sub(prod1, gt(remainder, prod0)) + prod0 := sub(prod0, remainder) + } + + unchecked { + // Calculate the largest power of two divisor of the denominator using the unary operator ~. This operation cannot overflow + // because the denominator cannot be zero at this point in the function execution. The result is always >= 1. + // For more detail, see https://cs.stackexchange.com/q/138556/92363. + uint256 lpotdod = denominator & (~denominator + 1); + uint256 flippedLpotdod; + + assembly ("memory-safe") { + // Factor powers of two out of denominator. + // slither-disable-next-line divide-before-multiply + denominator := div(denominator, lpotdod) + + // Divide [prod1 prod0] by lpotdod. + // slither-disable-next-line divide-before-multiply + prod0 := div(prod0, lpotdod) + + // Get the flipped value `2^256 / lpotdod`. If the `lpotdod` is zero, the flipped value is one. + // `sub(0, lpotdod)` produces the two's complement version of `lpotdod`, which is equivalent to flipping all the bits. + // However, `div` interprets this value as an unsigned value: https://ethereum.stackexchange.com/q/147168/24693 + flippedLpotdod := add(div(sub(0, lpotdod), lpotdod), 1) + } + + // Shift in bits from prod1 into prod0. + prod0 |= prod1 * flippedLpotdod; + + // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such + // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for + // four bits. That is, denominator * inv = 1 mod 2^4. + // slither-disable-next-line incorrect-exp + uint256 inverse = (3 * denominator) ^ 2; + + // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works + // in modular arithmetic, doubling the correct bits in each step. + inverse *= 2 - denominator * inverse; // inverse mod 2^8 + inverse *= 2 - denominator * inverse; // inverse mod 2^16 + inverse *= 2 - denominator * inverse; // inverse mod 2^32 + inverse *= 2 - denominator * inverse; // inverse mod 2^64 + inverse *= 2 - denominator * inverse; // inverse mod 2^128 + inverse *= 2 - denominator * inverse; // inverse mod 2^256 + + // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. + // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is + // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 + // is no longer required. + result = prod0 * inverse; + } + } + + /// Add two floats together. + /// + /// Note that because the input values can have arbitrary exponents that may + /// be very far apart, the addition process is necessarily lossy. + /// Consider adding 1e100 to 1e-100, for example. The result is 1e100. + /// This is because we can't fit 200 OOMs of precision into the result. + /// However, we can easily fit ~26-33 decimals of precision into values, + /// which covers most or all token supplies and amounts we care about in + /// practice. This means that addition is typically lossless for all values + /// we will receive onchain. However, precision loss is still to be expected + /// when combined with other operations such as division that can result in + /// infinite recursion such a 1/3. + /// + /// https://speleotrove.com/decimal/daops.html#refaddsub + /// > add and subtract both take two operands. If either operand is a special + /// > value then the general rules apply. + /// > + /// > Otherwise, the operands are added (after inverting the sign used for + /// > the second operand if the operation is a subtraction), as follows: + /// > + /// > The coefficient of the result is computed by adding or subtracting the + /// > aligned coefficients of the two operands. The aligned coefficients are + /// > computed by comparing the exponents of the operands: + /// > + /// > - If they have the same exponent, the aligned coefficients are the same + /// > as the original coefficients. + /// > - Otherwise the aligned coefficient of the number with the larger + /// > exponent is its original coefficient multiplied by 10^n, where n is the + /// > absolute difference between the exponents, and the aligned coefficient + /// > of the other operand is the same as its original coefficient. + /// > + /// > If the signs of the operands differ then the smaller aligned + /// > coefficient is subtracted from the larger; otherwise they are added. + /// > + /// > The exponent of the result is the minimum of the exponents of the two + /// > operands. + /// > + /// > The sign of the result is determined as follows: + /// > + /// > - If the result is non-zero then the sign of the result is the sign of + /// > the operand having the larger absolute value. + /// > - Otherwise, the sign of a zero result is 0 unless either both operands + /// > were negative or the signs of the operands were different and the + /// > rounding is round-floor. + /// + /// @param signedCoefficientA The signed coefficient of the first floating + /// point number. + /// @param exponentA The exponent of the first floating point number. + /// @param signedCoefficientB The signed coefficient of the second floating + /// point number. + /// @param exponentB The exponent of the second floating point number. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function add(int256 signedCoefficientA, int256 exponentA, int256 signedCoefficientB, int256 exponentB) + internal + pure + returns (int256, int256) + { + // Zero for either is the edge case but we have to guard against it. + // Doing it eagerly with assembly is less gas than lazily with jumps. + bool eitherZero; + assembly ("memory-safe") { + eitherZero := or(iszero(signedCoefficientA), iszero(signedCoefficientB)) + } + if (eitherZero) { + if (signedCoefficientA == 0) { + return (signedCoefficientB, exponentB); + } else { + return (signedCoefficientA, exponentA); + } + } + + // Maximizing A and B gives us similar coefficients, which simplifies + // detecting when their exponents are too far apart to add without + // simply ignoring one of them. + (signedCoefficientA, exponentA) = maximizeFull(signedCoefficientA, exponentA); + (signedCoefficientB, exponentB) = maximizeFull(signedCoefficientB, exponentB); + + // We want A to represent the larger exponent. If this is not the case + // then swap them. + if (exponentB > exponentA) { + int256 tmp = signedCoefficientA; + signedCoefficientA = signedCoefficientB; + signedCoefficientB = tmp; + + tmp = exponentA; + exponentA = exponentB; + exponentB = tmp; + } + + // After maximization the signed coefficients are the same OOM in + // magnitude. However, what we need is for the exponents to be the same. + // If the exponents are close enough we can divide coefficient B by + // some power of 10 to align their exponents without precision loss. + // If the exponents are too far apart, then all the information in B + // would be lost, so we can just ignore B and return A. + unchecked { + // exponentA >= exponentB so exponentA - exponentB will fit in + // uint256. + // forge-lint: disable-next-line(unsafe-typecast) + uint256 alignmentExponentDiff = uint256(exponentA - exponentB); + // The early return here allows us to do unchecked pow on the + // scaler and means we never revert due to overflow here. + if (alignmentExponentDiff > ADD_MAX_EXPONENT_DIFF) { + return (signedCoefficientA, exponentA); + } + // alignmentExponentDiff can't be greater than 76 so will pow + // without truncation. + // forge-lint: disable-next-line(unsafe-typecast) + signedCoefficientB /= int256(10 ** alignmentExponentDiff); + } + + // The actual addition step. + unchecked { + int256 c = signedCoefficientA + signedCoefficientB; + bool didOverflow; + assembly ("memory-safe") { + let sameSignAB := iszero(shr(0xff, xor(signedCoefficientA, signedCoefficientB))) + let sameSignAC := iszero(shr(0xff, xor(signedCoefficientA, c))) + didOverflow := and(sameSignAB, iszero(sameSignAC)) + } + // Be careful to handle overflow. + if (didOverflow) { + if (type(int256).max == exponentA) { + revert ExponentOverflow(signedCoefficientA, exponentA); + } + + signedCoefficientA /= 10; + signedCoefficientB /= 10; + exponentA++; + signedCoefficientA += signedCoefficientB; + } else { + signedCoefficientA = c; + } + } + return (signedCoefficientA, exponentA); + } + + /// @param signedCoefficientA The signed coefficient of the first floating + /// point number. + /// @param exponentA The exponent of the first floating point number. + /// @param signedCoefficientB The signed coefficient of the second floating + /// point number. + /// @param exponentB The exponent of the second floating point number. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function sub(int256 signedCoefficientA, int256 exponentA, int256 signedCoefficientB, int256 exponentB) + internal + pure + returns (int256, int256) + { + (signedCoefficientB, exponentB) = minus(signedCoefficientB, exponentB); + return add(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + } + + /// Numeric equality for floats. + /// Two floats are equal if their numeric value is equal. + /// For example, 1e2, 10e1, and 100e0 are all equal. Also implies that 0eX + /// and 0eY are equal for all X and Y. + /// Any representable value can be equality checked without precision loss, + /// @param signedCoefficientA The signed coefficient of the first floating + /// point number. + /// @param exponentA The exponent of the first floating point number. + /// @param signedCoefficientB The signed coefficient of the second floating + /// point number. + /// @param exponentB The exponent of the second floating point number. + /// @return `true` if the two floats are equal, `false` otherwise. + function eq(int256 signedCoefficientA, int256 exponentA, int256 signedCoefficientB, int256 exponentB) + internal + pure + returns (bool) + { + (signedCoefficientA, signedCoefficientB) = + compareRescale(signedCoefficientA, exponentA, signedCoefficientB, exponentB); + + return signedCoefficientA == signedCoefficientB; + } + + /// Inverts a float. Equivalent to `1 / x`. + /// @param signedCoefficient The signed coefficient of the float. + /// @param exponent The exponent of the float. + /// @return signedCoefficient The signed coefficient of the inverted float. + /// @return exponent The exponent of the inverted float. + function inv(int256 signedCoefficient, int256 exponent) internal pure returns (int256, int256) { + return div(1e76, -76, signedCoefficient, exponent); + } + + /// Looks up the log10 table value for a given index. + /// @param tables The address of the log tables data contract. + /// @param index The index into the log table. + /// @return result The log10 table value. + function lookupLogTableVal(address tables, uint256 index) internal view returns (uint256 result) { + // Skip first byte of data contract. + uint256 smallTableOffset = LOG_TABLE_SIZE_BYTES + 1; + uint256 logTableSizeBase = LOG_TABLE_SIZE_BASE; + assembly ("memory-safe") { + // First byte of the data contract must be skipped. + // truncation from the div by 10 is intentional here to keep the + // main offset and small offset distinct. + // slither-disable-next-line divide-before-multiply + let mainOffset := add(1, mul(div(index, 10), 2)) + mstore(0, 0) + extcodecopy(tables, 30, mainOffset, 2) + let mainTableVal := mload(0) + + result := and(mainTableVal, 0x7FFF) + if iszero(iszero(and(mainTableVal, 0x8000))) { + smallTableOffset := add(smallTableOffset, logTableSizeBase) + } + + mstore(0, 0) + // truncation from the div by 100 is intentional here to keep the + // small table offset and small offset distinct. + // slither-disable-next-line divide-before-multiply + extcodecopy(tables, 31, add(smallTableOffset, add(mul(div(index, 100), 10), mod(index, 10))), 1) + result := add(result, mload(0)) + } + } + + /// log10(x) for a float x. + /// + /// Internally uses log tables so is not perfectly accurate, but also doesn't + /// require any loops or iterations, and works across a wide range of + /// exponents without precision loss. + /// + /// @param signedCoefficient The signed coefficient of the floating point + /// number. + /// @param exponent The exponent of the floating point number. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function log10(address tablesDataContract, int256 signedCoefficient, int256 exponent) + internal + view + returns (int256, int256) + { + { + int256 unmaximizedCoefficient = signedCoefficient; + int256 unmaximizedExponent = exponent; + (signedCoefficient, exponent) = maximizeFull(signedCoefficient, exponent); + + if (signedCoefficient <= 0) { + if (signedCoefficient == 0) { + revert Log10Zero(); + } else { + revert Log10Negative(unmaximizedCoefficient, unmaximizedExponent); + } + } + } + + // all powers of 10 look like 1 with a different exponent + if (signedCoefficient == 1e76) { + return (exponent + 76, 0); + } + bool isAtLeastE76 = signedCoefficient >= 1e76; + + // This is a positive log. i.e. log(x) where x >= 1. + if (exponent >= (isAtLeastE76 ? -76 : -75)) { + int256 y1Coefficient; + int256 y2Coefficient; + int256 x1Coefficient; + int256 x2Coefficient; + // exact powers of 10 are already caught above. + // but e.g. 20 would be 2e76, -75 and true for isAtLeastE76 + // => adding exp 76 yields 1, which is the correct result. + // 200 would be 2e76, -74 and true for isAtLeastE76 + // => adding exp 76 yields 2, which is the correct result. + // however 90 would be 9e75, -74 and false for isAtLeastE76 + // => adding exp 75 yields 1, which is the correct result. + // 900 would be 9e75, -73 and false for isAtLeastE76 + // => adding exp 75 yields 2, which is the correct result. + int256 powerOfTen = exponent + int256(isAtLeastE76 ? int256(76) : int256(75)); + + // Table lookup. + { + uint256 idx = 0; + unchecked { + { + uint256 scale = isAtLeastE76 ? 1e73 : 1e72; + // Truncate the signed coefficient to what we can look + // up in the table. + // Slither false positive because the truncation is + // deliberate here. + //slither-disable-start divide-before-multiply + // scale is one of two possible values so won't truncate + // when cast. + // forge-lint: disable-next-line(unsafe-typecast) + x1Coefficient = signedCoefficient / int256(scale); + // slither-disable-end divide-before-multiply + // x1Coefficient is positive here so won't truncate when + // cast. + // forge-lint: disable-next-line(unsafe-typecast) + idx = uint256(x1Coefficient - 1000); + // scale is one of two possible values so won't truncate + // when cast. + // forge-lint: disable-next-line(unsafe-typecast) + x1Coefficient = x1Coefficient * int256(scale); + // Technically we only need to do this if we need to + // interpolate but it's cheaper to just do an `add` + // unconditionally than pay for an `if` and often also + // do the `add`. + // scale is one of two possible values so won't truncate + // when cast. + // forge-lint: disable-next-line(unsafe-typecast) + x2Coefficient = x1Coefficient + int256(scale); + } + + y1Coefficient = int256(1e72 * lookupLogTableVal(tablesDataContract, idx)); + y2Coefficient = y1Coefficient; + // Only do the second lookup if we expect interpolation + // to need it. + if (x1Coefficient != signedCoefficient) { + y2Coefficient = idx == LOG_MANTISSA_LAST_INDEX + ? int256(1e76) + : int256(1e72 * lookupLogTableVal(tablesDataContract, idx + 1)); + } + } + } + + (signedCoefficient, exponent) = unitLinearInterpolation( + x1Coefficient, + signedCoefficient, + x2Coefficient, + exponent, + y1Coefficient, + y2Coefficient, + LOG10_Y_EXPONENT + ); + return add(signedCoefficient, exponent, powerOfTen, 0); + } + // This is a negative log. i.e. log(x) where 0 < x < 1. + // log(x) = -log(1/x) + else { + (signedCoefficient, exponent) = inv(signedCoefficient, exponent); + (signedCoefficient, exponent) = log10(tablesDataContract, signedCoefficient, exponent); + return minus(signedCoefficient, exponent); + } + } + + /// 10^x for a float x. + /// + /// Internally uses log tables so is not perfectly accurate, but also doesn't + /// require any loops or iterations, and works across a wide range of + /// exponents without precision loss. + /// + /// @param signedCoefficient The signed coefficient of the floating point + /// number. + /// @param exponent The exponent of the floating point number. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function pow10(address tablesDataContract, int256 signedCoefficient, int256 exponent) + internal + view + returns (int256, int256) + { + if (signedCoefficient < 0) { + (signedCoefficient, exponent) = minus(signedCoefficient, exponent); + (signedCoefficient, exponent) = pow10(tablesDataContract, signedCoefficient, exponent); + return inv(signedCoefficient, exponent); + } + + // Table lookup. + (int256 intCoefficient, int256 fracCoefficient) = intFrac(signedCoefficient, exponent); + int256 characteristicExponent = exponent; + { + (int256 idx, bool interpolate, int256 scale) = mantissa4(fracCoefficient, exponent); + // idx is positive here because the signedCoefficient is positive due + // to the opening `if` above. + int256 y1Coefficient = 9997; + int256 y2Coefficient = 10000; + if (idx != ANTILOG_IDX_LAST_INDEX) { + (y1Coefficient, y2Coefficient) = + // forge-lint: disable-next-line(unsafe-typecast) + lookupAntilogTableY1Y2(tablesDataContract, uint256(idx), interpolate); + } + if (interpolate) { + // This avoids a potential overflow below. + int256 idxPlus1 = (idx + 1); + unchecked { + while ((idxPlus1 * scale) / scale != idxPlus1) { + scale /= 10; + fracCoefficient /= 10; + } + } + + (signedCoefficient, exponent) = unitLinearInterpolation( + idx * scale, fracCoefficient, idxPlus1 * scale, exponent, y1Coefficient, y2Coefficient, -4 + ); + } else { + signedCoefficient = y1Coefficient; + exponent = -4; + } + } + + return (signedCoefficient, 1 + exponent + withTargetExponent(intCoefficient, characteristicExponent, 0)); + } + + /// Maximizes a float's signed coefficient by increasing its magnitude + /// and decreasing its exponent accordingly. Greatly simplified a lot of + /// internal logic that involves comparing signed coefficients as integers, + /// or wanting them to have comparable magnitudes. + /// @return signedCoefficient The maximized signed coefficient. + /// @return exponent The maximized exponent. + /// @return full `true` if the result is fully maximized, `false` if it was + /// not possible to maximize without overflow. + function maximize(int256 signedCoefficient, int256 exponent) internal pure returns (int256, int256, bool) { + unchecked { + if (signedCoefficient == 0) { + return (MAXIMIZED_ZERO_SIGNED_COEFFICIENT, MAXIMIZED_ZERO_EXPONENT, true); + } + + // Check if already maximized before dropping into a block full of + // jumps. + if (signedCoefficient / 1e75 == 0) { + if (signedCoefficient / 1e38 == 0 && exponent >= type(int256).min + 38) { + signedCoefficient *= 1e38; + exponent -= 38; + } + + if (signedCoefficient / 1e57 == 0 && exponent >= type(int256).min + 19) { + signedCoefficient *= 1e19; + exponent -= 19; + } + + if (signedCoefficient / 1e66 == 0 && exponent >= type(int256).min + 10) { + signedCoefficient *= 1e10; + exponent -= 10; + } + + while (signedCoefficient / 1e74 == 0 && exponent >= type(int256).min + 2) { + signedCoefficient *= 1e2; + exponent -= 2; + } + + if (signedCoefficient / 1e75 == 0 && exponent >= type(int256).min + 1) { + signedCoefficient *= 10; + exponent -= 1; + } + } + + // Maybe we can fit in one more OOM without overflow, but we won't + // know until we try. This pushes us into [1e76,type(int256).max] and + // [-type(int256).max,-1e76] ranges, if that's possible. + int256 trySignedCoefficient = signedCoefficient * 10; + if (signedCoefficient == trySignedCoefficient / 10 && exponent >= type(int256).min + 1) { + signedCoefficient = trySignedCoefficient; + exponent -= 1; + } + + return (signedCoefficient, exponent, signedCoefficient / 1e75 != 0); + } + } + + /// Maximizes a float as per `maximize` but errors if not fully maximized. + /// This is analogous to other functions in the lib that are "lossless". + /// @param signedCoefficient The signed coefficient. + /// @param exponent The exponent. + /// @return signedCoefficient The maximized signed coefficient. + /// @return exponent The maximized exponent. + function maximizeFull(int256 signedCoefficient, int256 exponent) internal pure returns (int256, int256) { + (int256 trySignedCoefficient, int256 tryExponent, bool full) = maximize(signedCoefficient, exponent); + if (!full) { + revert MaximizeOverflow(signedCoefficient, exponent); + } + return (trySignedCoefficient, tryExponent); + } + + /// Rescale two floats so that they are possible to directly compare using + /// standard operators on the signed coefficient. + /// + /// There is no guarantee that the returned values somehow represent the + /// input values. The only guarantee is that comparing them directly will + /// give the same result as comparing the inputs as floats. + /// + /// https://speleotrove.com/decimal/daops.html#refnumco + /// > compare takes two operands and compares their values numerically. If + /// > either operand is a special value then the general rules apply. No + /// > flags are set unless an operand is a signaling NaN. + /// > + /// > Otherwise, the operands are compared as follows. + /// > + /// > If the signs of the operands differ, a value representing each operand + /// > (’-1’ if the operand is less than zero, ’0’ if the operand is zero or + /// > negative zero, or ’1’ if the operand is greater than zero) is used in + /// > place of that operand for the comparison instead of the actual operand. + /// > + /// > The comparison is then effected by subtracting the second operand from + /// > the first and then returning a value according to the result of the + /// > subtraction: ’-1’ if the result is less than zero, ’0’ if the result is + /// > zero or negative zero, or ’1’ if the result is greater than zero. + /// > + /// > An implementation may use this operation ‘under the covers’ to + /// > implement a closed set of comparison operations + /// > (greater than, equal,etc.) if desired. It need not, in this case, + /// > expose the compare operation itself. + /// @param signedCoefficientA The signed coefficient of the first float. + /// @param exponentA The exponent of the first float. + /// @param signedCoefficientB The signed coefficient of the second float. + /// @param exponentB The exponent of the second float. + /// @return rescaledA The rescaled coefficient of the first float. + /// @return rescaledB The rescaled coefficient of the second float. + function compareRescale(int256 signedCoefficientA, int256 exponentA, int256 signedCoefficientB, int256 exponentB) + internal + pure + returns (int256, int256) + { + unchecked { + // There are special cases where the signed coefficients can be + // compared directly, ignoring their exponents, without rescaling: + // - Either is zero + // - They have different signs + // - Their exponents are equal + { + bool noopRescale; + assembly ("memory-safe") { + noopRescale := or( + or( + // Either is zero + or(iszero(signedCoefficientA), iszero(signedCoefficientB)), + // They have different signs + xor(slt(signedCoefficientA, 0), slt(signedCoefficientB, 0)) + ), + // Their exponents are equal + eq(exponentA, exponentB) + ) + } + if (noopRescale) { + return (signedCoefficientA, signedCoefficientB); + } + } + + bool didSwap = false; + if (exponentB > exponentA) { + int256 tmp = signedCoefficientA; + signedCoefficientA = signedCoefficientB; + signedCoefficientB = tmp; + + tmp = exponentA; + exponentA = exponentB; + exponentB = tmp; + + didSwap = true; + } + + int256 exponentDiff = exponentA - exponentB; + bool didOverflow; + assembly ("memory-safe") { + didOverflow := or(slt(exponentDiff, 0), sgt(exponentDiff, 76)) + } + if (didOverflow) { + if (didSwap) { + return (0, signedCoefficientA); + } else { + return (signedCoefficientA, 0); + } + } + // exponentDiff [0, 76] + // forge-lint: disable-next-line(unsafe-typecast) + int256 scale = int256(10 ** uint256(exponentDiff)); + int256 rescaled = signedCoefficientA * scale; + + if (rescaled / scale != signedCoefficientA) { + if (didSwap) { + return (0, signedCoefficientA); + } else { + return (signedCoefficientA, 0); + } + } else if (didSwap) { + return (signedCoefficientB, rescaled); + } else { + return (rescaled, signedCoefficientB); + } + } + } + + /// Sets the coefficient so that exponent is the target exponent. Truncates + /// the coefficient if shrinking, will error on overflow when growing. + /// @param signedCoefficient The signed coefficient. + /// @param exponent The exponent. + /// @param targetExponent The target exponent. + /// @return The new signed coefficient. + function withTargetExponent(int256 signedCoefficient, int256 exponent, int256 targetExponent) + internal + pure + returns (int256) + { + unchecked { + if (exponent == targetExponent) { + return signedCoefficient; + } else if (targetExponent > exponent) { + int256 exponentDiff = targetExponent - exponent; + if (exponentDiff > 76 || exponentDiff <= 0) { + return (MAXIMIZED_ZERO_SIGNED_COEFFICIENT); + } + // exponentDiff [1, 76] + // forge-lint: disable-next-line(unsafe-typecast) + return signedCoefficient / int256(10 ** uint256(exponentDiff)); + } else { + int256 exponentDiff = exponent - targetExponent; + if (exponentDiff > 76 || exponentDiff <= 0) { + revert WithTargetExponentOverflow(signedCoefficient, exponent, targetExponent); + } + // exponentDiff [1, 76] + // forge-lint: disable-next-line(unsafe-typecast) + int256 scale = int256(10 ** uint256(exponentDiff)); + int256 rescaled = signedCoefficient * scale; + if (rescaled / scale != signedCoefficient) { + revert WithTargetExponentOverflow(signedCoefficient, exponent, targetExponent); + } + return rescaled; + } + } + } + + /// Returns the integer and fractional parts of a float. Both parts retain + /// the sign and exponent of the input float such that integer + frac = + /// original float. For all non negative exponents, frac is 0 and the integer + /// part is the original float. For exponents less than -76, the corollary is + /// true: integer is always 0 and frac is the original float. + /// @param signedCoefficient The signed coefficient. + /// @param exponent The exponent. + /// @return integer The integer part of the float. + /// @return frac The fractional part of the float. + function intFrac(int256 signedCoefficient, int256 exponent) internal pure returns (int256 integer, int256 frac) { + unchecked { + // if exponent is not negative the integer part is the number + // itself and the fractional part is 0. + if (exponent >= 0) { + return (signedCoefficient, 0); + } + + // If the exponent is less than -76, the integer part is 0. + // and the fractional part is the whole coefficient. + if (exponent < -76) { + return (0, signedCoefficient); + } + + // exponent [-76, -1] + // forge-lint: disable-next-line(unsafe-typecast) + int256 unit = int256(10 ** uint256(-exponent)); + frac = signedCoefficient % unit; + integer = signedCoefficient - frac; + } + } + + /// First 4 digits of the mantissa and whether we need to interpolate. + /// @param signedCoefficient The signed coefficient. + /// @param exponent The exponent. + /// @return mantissa The first 4 digits of the mantissa. + /// @return interpolate `true` if we need to interpolate, `false` otherwise. + /// @return scale The scale used if we need to interpolate. + function mantissa4(int256 signedCoefficient, int256 exponent) internal pure returns (int256, bool, int256) { + unchecked { + if (exponent == -4) { + return (signedCoefficient, false, 1); + } else if (exponent < -4) { + if (exponent < -80) { + return (0, signedCoefficient != 0, 1); + } + int256 scale = int256(10 ** uint256(-(exponent + 4))); + //slither-disable-next-line divide-before-multiply + int256 rescaled = signedCoefficient / scale; + return (rescaled, rescaled * scale != signedCoefficient, scale); + } else if (exponent >= 0) { + return (0, false, 1); + } else { + // exponent is [-3, -1] + // forge-lint: disable-next-line(unsafe-typecast) + return (signedCoefficient * int256(10 ** uint256(4 + exponent)), false, 1); + } + } + } + + /// Looks up the antilog table values y1 and y2 for a given index. + /// @param tablesDataContract The address of the log tables data contract. + /// @param idx The index into the antilog table. + /// @param lossyIdx `true` if the index may be lossy and we need y2, `false` + /// otherwise. + /// @return y1Coefficient The y1 antilog table coefficient. + /// @return y2Coefficient The y2 antilog table coefficient. + // forge-lint: disable-next-line(mixed-case-function) + function lookupAntilogTableY1Y2(address tablesDataContract, uint256 idx, bool lossyIdx) + internal + view + returns (int256 y1Coefficient, int256 y2Coefficient) + { + // 1 byte for start of data contract + // + 1800 for log tables + // + 900 for small log tables + // + 100 for alt small log tables + uint256 offsetSize = 1 + LOG_TABLE_SIZE_BYTES + LOG_TABLE_SIZE_BASE + ALT_SMALL_LOG_TABLE_SIZE_BYTES; + assembly ("memory-safe") { + //slither-disable-next-line divide-before-multiply + function lookupTableVal(tables, offset, index) -> result { + mstore(0, 0) + extcodecopy(tables, 30, add(offset, mul(div(index, 10), 2)), 2) + let mainTableVal := mload(0) + + offset := add(offset, ANTILOG_TABLE_SIZE_BYTES) + mstore(0, 0) + extcodecopy(tables, 31, add(offset, add(mul(div(index, 100), 10), mod(index, 10))), 1) + result := add(mainTableVal, mload(0)) + } + + y1Coefficient := lookupTableVal(tablesDataContract, offsetSize, idx) + if lossyIdx { y2Coefficient := lookupTableVal(tablesDataContract, offsetSize, add(idx, 1)) } + } + } + + /// Linear interpolation. + /// y = y1 + ((x - x1) * (y2 - y1)) / (x2 - x1) + /// @param x1Coefficient The x1 coefficient. + /// @param xCoefficient The x coefficient. + /// @param x2Coefficient The x2 coefficient. + /// @param xExponent The x exponent. + /// @param y1Coefficient The y1 coefficient. + /// @param y2Coefficient The y2 coefficient. + /// @param yExponent The y exponent. + /// @return signedCoefficient The signed coefficient of the result. + /// @return exponent The exponent of the result. + function unitLinearInterpolation( + int256 x1Coefficient, + int256 xCoefficient, + int256 x2Coefficient, + int256 xExponent, + int256 y1Coefficient, + int256 y2Coefficient, + int256 yExponent + ) internal pure returns (int256, int256) { + // Short circuit if the amount of interpolation is 0. + if (xCoefficient == x1Coefficient) { + return (y1Coefficient, yExponent); + } + int256 numeratorSignedCoefficient; + int256 numeratorExponent; + + { + // x - x1 + (int256 xDiffCoefficient0, int256 xDiffExponent0) = sub(xCoefficient, xExponent, x1Coefficient, xExponent); + + // y2 - y1 + (int256 yDiffCoefficient, int256 yDiffExponent) = sub(y2Coefficient, yExponent, y1Coefficient, yExponent); + + // (x - x1) * (y2 - y1) + (numeratorSignedCoefficient, numeratorExponent) = + mul(xDiffCoefficient0, xDiffExponent0, yDiffCoefficient, yDiffExponent); + } + + // x2 - x1 + (int256 xDiffCoefficient1, int256 xDiffExponent1) = sub(x2Coefficient, xExponent, x1Coefficient, xExponent); + + // ((x - x1) * (y2 - y1)) / (x2 - x1) + (int256 yMarginalSignedCoefficient, int256 yMarginalExponent) = + div(numeratorSignedCoefficient, numeratorExponent, xDiffCoefficient1, xDiffExponent1); + + // y1 + ((x - x1) * (y2 - y1)) / (x2 - x1) + (int256 signedCoefficient, int256 exponent) = + add(yMarginalSignedCoefficient, yMarginalExponent, y1Coefficient, yExponent); + return (signedCoefficient, exponent); + } +} diff --git a/dependencies/rain-math-float-0.1.1/src/lib/parse/LibParseDecimalFloat.sol b/dependencies/rain-math-float-0.1.1/src/lib/parse/LibParseDecimalFloat.sol new file mode 100644 index 00000000..b62fd77f --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/lib/parse/LibParseDecimalFloat.sol @@ -0,0 +1,221 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +import {LibParseChar} from "rain-string-0.2.0/src/lib/parse/LibParseChar.sol"; +import { + CMASK_NUMERIC_0_9, + CMASK_NEGATIVE_SIGN, + CMASK_E_NOTATION, + CMASK_ZERO, + CMASK_DECIMAL_POINT +} from "rain-string-0.2.0/src/lib/parse/LibParseCMask.sol"; +import {LibParseDecimal} from "rain-string-0.2.0/src/lib/parse/LibParseDecimal.sol"; +import { + MalformedExponentDigits, + ParseDecimalPrecisionLoss, + MalformedDecimalPoint, + ParseDecimalFloatExcessCharacters +} from "../../error/ErrParse.sol"; +import {ExponentOverflow} from "../../error/ErrDecimalFloat.sol"; +import {ParseEmptyDecimalString} from "rain-string-0.2.0/src/error/ErrParse.sol"; +import {LibDecimalFloat, Float} from "../LibDecimalFloat.sol"; + +/// @title LibParseDecimalFloat +/// @notice Library for parsing decimal floating point numbers from strings. +/// Not particularly gas efficient as it is intended for off-chain use cases. +/// Main use case is ensuring consistent behaviour across all offchain +/// implementations by standardizing in Solidity. +library LibParseDecimalFloat { + /// @notice Parses a decimal float from a substring defined by [start, end). + /// @param start The starting index of the substring (inclusive). + /// @param end The ending index of the substring (exclusive). + /// @return errorSelector The error selector if an error occurred, otherwise + /// 0. + /// @return cursor The position in the string after parsing. + /// @return signedCoefficient The signed coefficient of the parsed decimal + /// float. + /// @return exponent The exponent of the parsed decimal float. + function parseDecimalFloatInline(uint256 start, uint256 end) + internal + pure + returns (bytes4 errorSelector, uint256 cursor, int256 signedCoefficient, int256 exponent) + { + unchecked { + cursor = start; + cursor = LibParseChar.skipMask(cursor, end, CMASK_NEGATIVE_SIGN); + bool isNegative = cursor != start; + { + uint256 intStart = cursor; + cursor = LibParseChar.skipMask(cursor, end, CMASK_NUMERIC_0_9); + if (cursor == intStart) { + return (ParseEmptyDecimalString.selector, cursor, 0, 0); + } + + (bytes4 signedCoefficientErrorSelector, int256 signedCoefficientTmp) = + LibParseDecimal.unsafeDecimalStringToSignedInt(start, cursor); + if (signedCoefficientErrorSelector != 0) { + return (signedCoefficientErrorSelector, cursor, 0, 0); + } + signedCoefficient = signedCoefficientTmp; + } + + int256 fracValue = int256(LibParseChar.isMask(cursor, end, CMASK_DECIMAL_POINT)); + if (fracValue != 0) { + fracValue = 0; + cursor++; + uint256 fracStart = cursor; + cursor = LibParseChar.skipMask(cursor, end, CMASK_NUMERIC_0_9); + if (cursor == fracStart) { + return (MalformedDecimalPoint.selector, cursor, 0, 0); + } + // Trailing zeros are allowed in fractional literals but should + // not be counted in the precision. + uint256 nonZeroCursor = cursor; + while (LibParseChar.isMask(nonZeroCursor - 1, end, CMASK_ZERO) == 1) { + nonZeroCursor--; + } + + if (nonZeroCursor != fracStart) { + (bytes4 fracErrorSelector, int256 fracValueTmp) = + LibParseDecimal.unsafeDecimalStringToSignedInt(fracStart, nonZeroCursor); + if (fracErrorSelector != 0) { + return (fracErrorSelector, cursor, 0, 0); + } + fracValue = fracValueTmp; + } + // Frac value inherits its sign from the coefficient. + if (fracValue < 0) { + return (MalformedDecimalPoint.selector, cursor, 0, 0); + } + if (isNegative) { + fracValue = -fracValue; + } + + // We want to _decrease_ the exponent by the number of digits in the + // fractional part. + // _technically_ these numbers could be out of range but in + // the intended use case that would imply a memory region that + // is physically impossible to exist. + // forge-lint: disable-next-line(unsafe-typecast) + exponent = int256(fracStart) - int256(nonZeroCursor); + // Should not be possible but guard against it in case. + if (exponent > 0) { + return (MalformedExponentDigits.selector, cursor, 0, 0); + } + + if (signedCoefficient == 0) { + signedCoefficient = fracValue; + } else { + // exponent is non positive here. + // forge-lint: disable-next-line(unsafe-typecast) + uint256 scale = uint256(-exponent); + // 67 is the maximum number of fractional digits we can + // rescale by without overflowing. The coefficient is at + // most int224 (~6.7e66), and the rescaled product + // (coefficient * 10^scale) must fit in int256 (~5.8e76). + // Beyond 67 digits the multiplication would overflow + // int256 for any non-trivial coefficient. + if (scale > 67) { + return (ParseDecimalPrecisionLoss.selector, cursor, 0, 0); + } + scale = 10 ** scale; + // scale [1, 1e67] + // forge-lint: disable-next-line(unsafe-typecast) + int256 rescaledIntValue = signedCoefficient * int256(scale); + // Check 1: the multiplication overflowed int256. + // forge-lint: disable-next-line(unsafe-typecast) + bool mulDidOverflow = rescaledIntValue / int256(scale) != signedCoefficient; + // Check 2: the rescaled value exceeds int224 precision, + // so it cannot be packed losslessly into a Float. + // forge-lint: disable-next-line(unsafe-typecast) + bool mulDidTruncate = int224(rescaledIntValue) != rescaledIntValue; + if (mulDidOverflow || mulDidTruncate) { + return (ParseDecimalPrecisionLoss.selector, cursor, 0, 0); + } + signedCoefficient = rescaledIntValue + fracValue; + } + } + + int256 eValue = int256(LibParseChar.isMask(cursor, end, CMASK_E_NOTATION)); + if (eValue != 0) { + cursor++; + uint256 eStart = cursor; + cursor = LibParseChar.skipMask(cursor, end, CMASK_NEGATIVE_SIGN); + { + uint256 digitsStart = cursor; + cursor = LibParseChar.skipMask(cursor, end, CMASK_NUMERIC_0_9); + if (cursor == digitsStart) { + return (MalformedExponentDigits.selector, cursor, 0, 0); + } + } + + { + (bytes4 eErrorSelector, int256 eValueTmp) = + LibParseDecimal.unsafeDecimalStringToSignedInt(eStart, cursor); + if (eErrorSelector != 0) { + return (eErrorSelector, cursor, 0, 0); + } + eValue = eValueTmp; + } + + { + int256 newExponent = exponent + eValue; + if ((eValue > 0 && newExponent < exponent) || (eValue < 0 && newExponent > exponent)) { + return (ExponentOverflow.selector, cursor, 0, 0); + } + exponent = newExponent; + } + } + + if (signedCoefficient == 0) { + // Normalize zero to have exponent zero. This ensures that parsed + // floats follow the behaviour of packed floats. + exponent = 0; + } + } + } + + /// @notice Parses a decimal float from a string. This a high-level wrapper + /// around `parseDecimalFloatInline` that handles string memory layout and + /// returns a packed `Float` amenable to subsequent operations with + /// `LibDecimalFloat`. + /// @param str The string to parse. + /// @return errorSelector The error selector if an error occurred, otherwise + /// 0. + /// @return result The parsed `Float` if no error occurred, otherwise zero. + function parseDecimalFloat(string memory str) internal pure returns (bytes4, Float) { + uint256 start; + uint256 end; + assembly { + start := add(str, 0x20) + end := add(start, mload(str)) + } + (bytes4 errorSelector, uint256 cursor, int256 signedCoefficient, int256 exponent) = + parseDecimalFloatInline(start, end); + if (errorSelector == 0) { + if (cursor == end) { + // If we consumed the whole string, we can return the parsed value. + // packLossy handles the two exponent-overflow directions differently: + // - Positive exponent overflow (e.g. 1e2147483648) has no meaningful + // approximation, so packLossy reverts with ExponentOverflow. + // - Negative exponent overflow (e.g. 1e-2147483649) is a very small + // number that genuinely rounds to zero, so packLossy returns + // (FLOAT_ZERO, false) and we report ParseDecimalPrecisionLoss. + (Float result, bool lossless) = LibDecimalFloat.packLossy(signedCoefficient, exponent); + if (!lossless) { + return (ParseDecimalPrecisionLoss.selector, Float.wrap(0)); + } else { + return (0, result); + } + } else { + // If we didn't consume the whole string, it is malformed. + return (ParseDecimalFloatExcessCharacters.selector, Float.wrap(0)); + } + } else { + // If we encountered an error, we return the error selector and a + // zero float. + return (errorSelector, Float.wrap(0)); + } + } +} diff --git a/dependencies/rain-math-float-0.1.1/src/lib/table/LibLogTable.sol b/dependencies/rain-math-float-0.1.1/src/lib/table/LibLogTable.sol new file mode 100644 index 00000000..8af9379c --- /dev/null +++ b/dependencies/rain-math-float-0.1.1/src/lib/table/LibLogTable.sol @@ -0,0 +1,754 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @dev Flag indicating that an entry in the log table points to the alternate +/// table. +uint16 constant ALT_TABLE_FLAG = 0x8000; + +/// @dev The cardinality of the log mantissa for log table lookup. +uint256 constant LOG_MANTISSA_IDX_CARDINALITY = 9000; + +/// @dev The last index of the log mantissa for log table lookup. +uint256 constant LOG_MANTISSA_LAST_INDEX = LOG_MANTISSA_IDX_CARDINALITY - 1; + +/// @dev The cardinality of the antilog index for antilog table lookup. +int256 constant ANTILOG_IDX_CARDINALITY = 10000; + +/// @dev The last index of the antilog index for antilog table lookup. +int256 constant ANTILOG_IDX_LAST_INDEX = ANTILOG_IDX_CARDINALITY - 1; + +// The base size of the log tables is 1/10th the cardinality because the smallest +// OOM is handled by the small table. Every value in the large table has a +// corresponding value in the small table, it is just that the large table has +// 2 byte values while the small table has 1 byte values. +uint256 constant LOG_TABLE_SIZE_BASE = LOG_MANTISSA_IDX_CARDINALITY / 10; + +/// @dev The size in bytes of the full log table (both large and small). +uint256 constant LOG_TABLE_SIZE_BYTES = LOG_TABLE_SIZE_BASE * 2; + +/// @dev The size in bytes of the alt small log table (uint8[10][10] = 100). +uint256 constant ALT_SMALL_LOG_TABLE_SIZE_BYTES = 100; + +/// @dev The size in bytes of the antilog main table (uint16[10][100] = 2000). +uint256 constant ANTILOG_TABLE_SIZE_BYTES = 2000; + +/// @dev The size in bytes of the antilog small table (uint8[10][100] = 1000). +uint256 constant ANTILOG_TABLE_SMALL_SIZE_BYTES = 1000; + +/// @dev As we deterministically deploy the log tables, we can run into +/// collisions when we actually want distinct addresses. +bytes32 constant LOG_TABLE_DISAMBIGUATOR = keccak256("LOG_TABLE_DISAMBIGUATOR_1"); + +/// @dev https://icap.org.pk/files/per/students/exam/notices/log-table.pdf +library LibLogTable { + /// Encodes a log table into bytes for deployment. Used for AOT compilation + /// of the constants that are actually deployed on-chain. Compilation from + /// source and constants can be compared in CI. + /// @param table The log table to encode. + /// @return encoded The encoded log table. + function toBytes(uint16[10][90] memory table) internal pure returns (bytes memory) { + bytes memory encoded; + uint256 tableSize = LOG_TABLE_SIZE_BYTES; + assembly ("memory-safe") { + encoded := mload(0x40) + mstore(0x40, add(encoded, add(tableSize, 0x20))) + + let cursor := sub(mload(0x40), 0x20) + + for { + let i := add(table, mul(0x20, 89)) + let j := mul(0x20, 9) + } gt(cursor, encoded) { + cursor := sub(cursor, 2) + j := sub(j, 0x20) + } { + mstore(cursor, mload(add(mload(i), j))) + + if iszero(j) { + i := sub(i, 0x20) + j := mul(0x20, 10) + } + } + + mstore(cursor, tableSize) + } + return encoded; + } + + /// Encodes a log table into bytes for deployment. Used for AOT compilation + /// of the constants that are actually deployed on-chain. Compilation from + /// source and constants can be compared in CI. + /// @param table The log table to encode. + /// @return encoded The encoded log table. + function toBytes(uint8[10][90] memory table) internal pure returns (bytes memory) { + bytes memory encoded; + uint256 tableSize = LOG_TABLE_SIZE_BASE; + assembly ("memory-safe") { + encoded := mload(0x40) + mstore(0x40, add(encoded, add(tableSize, 0x20))) + + let cursor := sub(mload(0x40), 0x20) + + for { + let i := add(table, mul(0x20, 89)) + let j := mul(0x20, 9) + } gt(cursor, encoded) { + cursor := sub(cursor, 1) + j := sub(j, 0x20) + } { + mstore(cursor, mload(add(mload(i), j))) + + if iszero(j) { + i := sub(i, 0x20) + j := mul(0x20, 10) + } + } + + mstore(cursor, tableSize) + } + return encoded; + } + + /// Encodes a log table into bytes for deployment. Used for AOT compilation + /// of the constants that are actually deployed on-chain. Compilation from + /// source and constants can be compared in CI. + /// @param table The log table to encode. + /// @return encoded The encoded log table. + function toBytes(uint8[10][100] memory table) internal pure returns (bytes memory) { + bytes memory encoded; + uint256 tableSize = ANTILOG_TABLE_SMALL_SIZE_BYTES; + assembly ("memory-safe") { + encoded := mload(0x40) + mstore(0x40, add(encoded, add(tableSize, 0x20))) + + let cursor := sub(mload(0x40), 0x20) + + for { + let i := add(table, mul(0x20, 99)) + let j := mul(0x20, 9) + } gt(cursor, encoded) { + cursor := sub(cursor, 1) + j := sub(j, 0x20) + } { + mstore(cursor, mload(add(mload(i), j))) + + if iszero(j) { + i := sub(i, 0x20) + j := mul(0x20, 10) + } + } + + mstore(cursor, tableSize) + } + return encoded; + } + + /// Encodes a log table into bytes for deployment. Used for AOT compilation + /// of the constants that are actually deployed on-chain. Compilation from + /// source and constants can be compared in CI. + /// @param table The log table to encode. + /// @return encoded The encoded log table. + function toBytes(uint8[10][10] memory table) internal pure returns (bytes memory) { + bytes memory encoded; + uint256 tableSize = ALT_SMALL_LOG_TABLE_SIZE_BYTES; + assembly ("memory-safe") { + encoded := mload(0x40) + mstore(0x40, add(encoded, add(tableSize, 0x20))) + + let cursor := sub(mload(0x40), 0x20) + + for { + let i := add(table, mul(0x20, 9)) + let j := mul(0x20, 9) + } gt(cursor, encoded) { + cursor := sub(cursor, 1) + j := sub(j, 0x20) + } { + mstore(cursor, mload(add(mload(i), j))) + + if iszero(j) { + i := sub(i, 0x20) + j := mul(0x20, 10) + } + } + + mstore(cursor, tableSize) + } + return encoded; + } + + /// Encodes a log table into bytes for deployment. Used for AOT compilation + /// of the constants that are actually deployed on-chain. Compilation from + /// source and constants can be compared in CI. + /// @param table The log table to encode. + /// @return encoded The encoded log table. + function toBytes(uint16[10][100] memory table) internal pure returns (bytes memory) { + bytes memory encoded; + uint256 tableSize = ANTILOG_TABLE_SIZE_BYTES; + assembly ("memory-safe") { + encoded := mload(0x40) + mstore(0x40, add(encoded, add(tableSize, 0x20))) + + let cursor := sub(mload(0x40), 0x20) + + for { + let i := add(table, mul(0x20, 99)) + let j := mul(0x20, 9) + } gt(cursor, encoded) { + cursor := sub(cursor, 2) + j := sub(j, 0x20) + } { + mstore(cursor, mload(add(mload(i), j))) + + if iszero(j) { + i := sub(i, 0x20) + j := mul(0x20, 10) + } + } + + mstore(cursor, tableSize) + } + return encoded; + } + + /// The decimal log table used for logarithm calculations. AOT copmiled into + /// bytes that are deployed on-chain as data contracts. + /// @return The decimal log table. + function logTableDec() internal pure returns (uint16[10][90] memory) { + return [ + [ + 0, + 43, + 86, + 128, + 170, + 212 | ALT_TABLE_FLAG, + 253 | ALT_TABLE_FLAG, + 294 | ALT_TABLE_FLAG, + 334 | ALT_TABLE_FLAG, + 374 | ALT_TABLE_FLAG + ], + [ + 414, + 453, + 492, + 531, + 569, + 607 | ALT_TABLE_FLAG, + 645 | ALT_TABLE_FLAG, + 682 | ALT_TABLE_FLAG, + 719 | ALT_TABLE_FLAG, + 755 | ALT_TABLE_FLAG + ], + [ + 792, + 828, + 864, + 899, + 934, + 969, + 1004 | ALT_TABLE_FLAG, + 1038 | ALT_TABLE_FLAG, + 1072 | ALT_TABLE_FLAG, + 1106 | ALT_TABLE_FLAG + ], + [ + 1139, + 1173, + 1206, + 1239, + 1271, + 1303 | ALT_TABLE_FLAG, + 1335 | ALT_TABLE_FLAG, + 1367 | ALT_TABLE_FLAG, + 1399 | ALT_TABLE_FLAG, + 1430 | ALT_TABLE_FLAG + ], + [ + 1461, + 1492, + 1523, + 1553, + 1584 | ALT_TABLE_FLAG, + 1614 | ALT_TABLE_FLAG, + 1644 | ALT_TABLE_FLAG, + 1673 | ALT_TABLE_FLAG, + 1703 | ALT_TABLE_FLAG, + 1732 | ALT_TABLE_FLAG + ], + [ + 1761, + 1790, + 1818, + 1847, + 1875, + 1903, + 1931 | ALT_TABLE_FLAG, + 1959 | ALT_TABLE_FLAG, + 1987 | ALT_TABLE_FLAG, + 2014 | ALT_TABLE_FLAG + ], + [ + 2041, + 2068, + 2095, + 2122, + 2148, + 2175 | ALT_TABLE_FLAG, + 2201 | ALT_TABLE_FLAG, + 2227 | ALT_TABLE_FLAG, + 2253 | ALT_TABLE_FLAG, + 2279 | ALT_TABLE_FLAG + ], + [ + 2304, + 2330, + 2355, + 2380, + 2405, + 2430, + 2455 | ALT_TABLE_FLAG, + 2480 | ALT_TABLE_FLAG, + 2504 | ALT_TABLE_FLAG, + 2529 | ALT_TABLE_FLAG + ], + [ + 2553, + 2577, + 2601, + 2625, + 2648, + 2672 | ALT_TABLE_FLAG, + 2695 | ALT_TABLE_FLAG, + 2718 | ALT_TABLE_FLAG, + 2742 | ALT_TABLE_FLAG, + 2765 | ALT_TABLE_FLAG + ], + [ + 2788, + 2810, + 2833, + 2856, + 2878, + 2900 | ALT_TABLE_FLAG, + 2923 | ALT_TABLE_FLAG, + 2945 | ALT_TABLE_FLAG, + 2967 | ALT_TABLE_FLAG, + 2989 | ALT_TABLE_FLAG + ], + [3010, 3032, 3054, 3075, 3096, 3118, 3139, 3160, 3181, 3201], + [3222, 3243, 3263, 3284, 3304, 3324, 3345, 3365, 3385, 3404], + [3424, 3444, 3464, 3483, 3502, 3522, 3541, 3560, 3579, 3598], + [3617, 3636, 3655, 3674, 3692, 3711, 3729, 3747, 3766, 3784], + [3802, 3820, 3838, 3856, 3874, 3892, 3909, 3927, 3945, 3962], + [3979, 3997, 4014, 4031, 4048, 4065, 4082, 4099, 4116, 4133], + [4150, 4166, 4183, 4200, 4216, 4232, 4249, 4265, 4281, 4298], + [4314, 4330, 4346, 4362, 4378, 4393, 4409, 4425, 4440, 4456], + [4472, 4487, 4502, 4518, 4533, 4548, 4564, 4579, 4594, 4609], + [4624, 4639, 4654, 4669, 4683, 4698, 4713, 4728, 4742, 4757], + [4771, 4786, 4800, 4814, 4829, 4843, 4857, 4871, 4886, 4900], + [4914, 4928, 4942, 4955, 4969, 4983, 4997, 5011, 5024, 5038], + [5051, 5065, 5079, 5092, 5105, 5119, 5132, 5145, 5159, 5172], + [5185, 5198, 5211, 5224, 5237, 5250, 5263, 5276, 5289, 5302], + [5315, 5328, 5340, 5353, 5366, 5378, 5391, 5403, 5416, 5428], + [5441, 5453, 5465, 5478, 5490, 5502, 5514, 5527, 5539, 5551], + [5563, 5575, 5587, 5599, 5611, 5623, 5635, 5647, 5658, 5670], + [5682, 5694, 5705, 5717, 5729, 5740, 5752, 5763, 5775, 5786], + [5798, 5809, 5821, 5832, 5843, 5855, 5866, 5877, 5888, 5899], + [5911, 5922, 5933, 5944, 5955, 5966, 5977, 5988, 5999, 6010], + [6021, 6031, 6042, 6053, 6064, 6075, 6085, 6096, 6107, 6117], + [6128, 6138, 6149, 6160, 6170, 6180, 6191, 6201, 6212, 6222], + [6232, 6243, 6253, 6263, 6274, 6284, 6294, 6304, 6314, 6325], + [6335, 6345, 6355, 6365, 6375, 6385, 6395, 6405, 6415, 6425], + [6435, 6444, 6454, 6464, 6474, 6484, 6493, 6503, 6513, 6522], + [6532, 6542, 6551, 6561, 6571, 6580, 6590, 6599, 6609, 6618], + [6628, 6637, 6646, 6656, 6665, 6675, 6684, 6693, 6702, 6712], + [6721, 6730, 6739, 6749, 6758, 6767, 6776, 6785, 6794, 6803], + [6812, 6821, 6830, 6839, 6848, 6857, 6866, 6875, 6884, 6893], + [6902, 6911, 6920, 6928, 6937, 6946, 6955, 6964, 6972, 6981], + [6990, 6998, 7007, 7016, 7024, 7033, 7042, 7050, 7059, 7067], + [7076, 7084, 7093, 7101, 7110, 7118, 7126, 7135, 7143, 7152], + [7160, 7168, 7177, 7185, 7193, 7202, 7210, 7218, 7226, 7235], + [7243, 7251, 7259, 7267, 7275, 7284, 7292, 7300, 7308, 7316], + [7324, 7332, 7340, 7348, 7356, 7364, 7372, 7380, 7388, 7396], + [7404, 7412, 7419, 7427, 7435, 7443, 7451, 7459, 7466, 7474], + [7482, 7490, 7497, 7505, 7513, 7520, 7528, 7536, 7543, 7551], + [7559, 7566, 7574, 7582, 7589, 7597, 7604, 7612, 7619, 7627], + [7634, 7642, 7649, 7657, 7664, 7672, 7679, 7686, 7694, 7701], + [7709, 7716, 7723, 7731, 7738, 7745, 7752, 7760, 7767, 7774], + [7782, 7789, 7796, 7803, 7810, 7818, 7825, 7832, 7839, 7846], + [7853, 7860, 7868, 7875, 7882, 7889, 7896, 7903, 7910, 7917], + [7924, 7931, 7938, 7945, 7952, 7959, 7966, 7973, 7980, 7987], + [7993, 8000, 8007, 8014, 8021, 8028, 8035, 8041, 8048, 8055], + [8062, 8069, 8075, 8082, 8089, 8096, 8102, 8109, 8116, 8122], + [8129, 8136, 8142, 8149, 8156, 8162, 8169, 8176, 8182, 8189], + [8195, 8202, 8209, 8215, 8222, 8228, 8235, 8241, 8248, 8254], + [8261, 8267, 8274, 8280, 8287, 8293, 8299, 8306, 8312, 8319], + [8325, 8331, 8338, 8344, 8351, 8357, 8363, 8370, 8376, 8382], + [8388, 8395, 8401, 8407, 8414, 8420, 8426, 8432, 8439, 8445], + [8451, 8457, 8463, 8470, 8476, 8482, 8488, 8494, 8500, 8506], + [8513, 8519, 8525, 8531, 8537, 8543, 8549, 8555, 8561, 8567], + [8573, 8579, 8585, 8591, 8597, 8603, 8609, 8615, 8621, 8627], + [8633, 8639, 8645, 8651, 8657, 8663, 8669, 8675, 8681, 8686], + [8692, 8698, 8704, 8710, 8716, 8722, 8727, 8733, 8739, 8745], + [8751, 8756, 8762, 8768, 8774, 8779, 8785, 8791, 8797, 8802], + [8808, 8814, 8820, 8825, 8831, 8837, 8842, 8848, 8854, 8859], + [8865, 8871, 8876, 8882, 8887, 8893, 8899, 8904, 8910, 8915], + [8921, 8927, 8932, 8938, 8943, 8949, 8954, 8960, 8965, 8971], + [8976, 8982, 8987, 8993, 8998, 9004, 9009, 9015, 9020, 9025], + [9031, 9036, 9042, 9047, 9053, 9058, 9063, 9069, 9074, 9079], + [9085, 9090, 9096, 9101, 9106, 9112, 9117, 9122, 9128, 9133], + [9138, 9143, 9149, 9154, 9159, 9165, 9170, 9175, 9180, 9186], + [9191, 9196, 9201, 9206, 9212, 9217, 9222, 9227, 9232, 9238], + [9243, 9248, 9253, 9258, 9263, 9269, 9274, 9279, 9284, 9289], + [9294, 9299, 9304, 9309, 9315, 9320, 9325, 9330, 9335, 9340], + [9345, 9350, 9355, 9360, 9365, 9370, 9375, 9380, 9385, 9390], + [9395, 9400, 9405, 9410, 9415, 9420, 9425, 9430, 9435, 9440], + [9445, 9450, 9455, 9460, 9465, 9469, 9474, 9479, 9484, 9489], + [9494, 9499, 9504, 9509, 9513, 9518, 9523, 9528, 9533, 9538], + [9542, 9547, 9552, 9557, 9562, 9566, 9571, 9576, 9581, 9586], + [9590, 9595, 9600, 9605, 9609, 9614, 9619, 9624, 9628, 9633], + [9638, 9643, 9647, 9652, 9657, 9661, 9666, 9671, 9675, 9680], + [9685, 9689, 9694, 9699, 9703, 9708, 9713, 9717, 9722, 9727], + [9731, 9736, 9741, 9745, 9750, 9754, 9759, 9763, 9768, 9773], + [9777, 9782, 9786, 9791, 9795, 9800, 9805, 9809, 9814, 9818], + [9823, 9827, 9832, 9836, 9841, 9845, 9850, 9854, 9859, 9863], + [9868, 9872, 9877, 9881, 9886, 9890, 9894, 9899, 9903, 9908], + [9912, 9917, 9921, 9926, 9930, 9934, 9939, 9943, 9948, 9952], + [9956, 9961, 9965, 9969, 9974, 9978, 9983, 9987, 9991, 9996] + ]; + } + + /// The small decimal log table used for logarithm calculations. AOT compiled + /// into bytes that are deployed on-chain as data contracts. + /// @return The small decimal log table. + function logTableDecSmall() internal pure returns (uint8[10][90] memory) { + return [ + [0, 4, 9, 13, 17, 21, 26, 30, 34, 38], + [0, 4, 8, 12, 15, 19, 23, 27, 31, 35], + [0, 3, 7, 11, 14, 18, 21, 25, 28, 32], + [0, 3, 7, 10, 13, 16, 20, 23, 26, 30], + [0, 3, 6, 9, 12, 15, 18, 21, 24, 28], + [0, 3, 6, 9, 11, 14, 17, 20, 23, 26], + [0, 3, 5, 8, 11, 14, 16, 19, 22, 24], + [0, 3, 5, 8, 10, 13, 15, 18, 20, 23], + [0, 2, 5, 7, 9, 12, 14, 16, 19, 21], + [0, 2, 4, 7, 9, 11, 13, 16, 18, 20], + [0, 2, 4, 6, 8, 11, 13, 15, 17, 19], + [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], + [0, 2, 4, 6, 8, 10, 12, 14, 15, 17], + [0, 2, 4, 6, 7, 9, 11, 13, 15, 17], + [0, 2, 4, 5, 7, 9, 11, 12, 14, 16], + [0, 2, 3, 5, 7, 9, 10, 12, 14, 15], + [0, 2, 3, 5, 7, 8, 10, 11, 13, 15], + [0, 2, 3, 5, 6, 8, 9, 11, 13, 14], + [0, 2, 3, 5, 6, 8, 9, 11, 12, 14], + [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], + [0, 1, 3, 4, 6, 7, 9, 10, 11, 13], + [0, 1, 3, 4, 6, 7, 8, 10, 11, 12], + [0, 1, 3, 4, 5, 7, 8, 9, 11, 12], + [0, 1, 3, 4, 5, 6, 8, 9, 10, 12], + [0, 1, 3, 4, 5, 6, 8, 9, 10, 11], + [0, 1, 2, 4, 5, 6, 7, 9, 10, 11], + [0, 1, 2, 4, 5, 6, 7, 8, 10, 11], + [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], + [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], + [0, 1, 2, 3, 4, 5, 7, 8, 9, 10], + [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 7, 8], + [0, 1, 2, 3, 4, 5, 5, 6, 7, 8], + [0, 1, 2, 3, 4, 4, 5, 6, 7, 8], + [0, 1, 2, 3, 4, 4, 5, 6, 7, 8], + [0, 1, 2, 3, 3, 4, 5, 6, 7, 8], + [0, 1, 2, 3, 3, 4, 5, 6, 7, 8], + [0, 1, 2, 2, 3, 4, 5, 6, 7, 7], + [0, 1, 2, 2, 3, 4, 5, 6, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 6, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 5, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 5, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 5, 6, 7], + [0, 1, 1, 2, 3, 4, 4, 5, 6, 7], + [0, 1, 1, 2, 3, 4, 4, 5, 6, 7], + [0, 1, 1, 2, 3, 4, 4, 5, 6, 6], + [0, 1, 1, 2, 3, 4, 4, 5, 6, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 6, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 4, 5, 6], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 6], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 6], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 3, 4] + ]; + } + + /// The small decimal log table alternative used for logarithm calculations. + /// AOT compiled into bytes that are deployed on-chain as data contracts. + /// @return The small decimal log table alternative. + function logTableDecSmallAlt() internal pure returns (uint8[10][10] memory) { + return [ + [0, 4, 8, 12, 16, 20, 24, 28, 32, 37], + [0, 4, 7, 11, 15, 19, 22, 26, 30, 33], + [0, 3, 7, 10, 14, 17, 20, 24, 27, 31], + [0, 3, 7, 10, 12, 16, 19, 22, 25, 29], + [0, 3, 6, 9, 12, 15, 17, 20, 23, 26], + [0, 3, 5, 8, 11, 14, 16, 19, 22, 25], + [0, 3, 5, 8, 10, 13, 15, 18, 21, 23], + [0, 2, 5, 7, 10, 12, 15, 17, 19, 22], + [0, 2, 5, 7, 9, 11, 14, 16, 18, 21], + [0, 2, 4, 6, 8, 11, 13, 15, 17, 19] + ]; + } + + /// The decimal anti log table used for logarithm calculations. AOT compiled + /// into bytes that are deployed on-chain as data contracts. + /// @return The decimal anti log table. + function antiLogTableDec() internal pure returns (uint16[10][100] memory) { + return [ + [1000, 1002, 1005, 1007, 1009, 1012, 1014, 1016, 1019, 1021], + [1023, 1026, 1028, 1030, 1033, 1035, 1038, 1040, 1042, 1045], + [1047, 1050, 1052, 1054, 1057, 1059, 1062, 1064, 1067, 1069], + [1072, 1074, 1076, 1079, 1081, 1084, 1086, 1089, 1091, 1094], + [1096, 1099, 1102, 1104, 1107, 1109, 1112, 1114, 1117, 1119], + [1122, 1125, 1127, 1130, 1132, 1135, 1138, 1140, 1143, 1146], + [1148, 1151, 1153, 1156, 1159, 1161, 1164, 1167, 1169, 1172], + [1175, 1178, 1180, 1183, 1186, 1189, 1191, 1194, 1197, 1199], + [1202, 1205, 1208, 1211, 1213, 1216, 1219, 1222, 1225, 1227], + [1230, 1233, 1236, 1239, 1242, 1245, 1247, 1250, 1253, 1256], + [1259, 1262, 1265, 1268, 1271, 1274, 1276, 1279, 1282, 1285], + [1288, 1291, 1294, 1297, 1300, 1303, 1306, 1309, 1312, 1315], + [1318, 1321, 1324, 1327, 1330, 1334, 1337, 1340, 1343, 1346], + [1349, 1352, 1355, 1358, 1361, 1365, 1368, 1371, 1374, 1377], + [1380, 1384, 1387, 1390, 1393, 1396, 1400, 1403, 1406, 1409], + [1413, 1416, 1419, 1422, 1426, 1429, 1432, 1435, 1439, 1442], + [1445, 1449, 1452, 1455, 1459, 1462, 1466, 1469, 1472, 1476], + [1479, 1483, 1486, 1489, 1493, 1496, 1500, 1503, 1507, 1510], + [1514, 1517, 1521, 1524, 1528, 1531, 1535, 1538, 1542, 1545], + [1549, 1552, 1556, 1560, 1563, 1567, 1570, 1574, 1578, 1581], + [1585, 1589, 1592, 1596, 1600, 1603, 1607, 1611, 1614, 1618], + [1622, 1626, 1629, 1633, 1637, 1641, 1644, 1648, 1652, 1656], + [1660, 1663, 1667, 1671, 1675, 1679, 1683, 1687, 1690, 1694], + [1698, 1702, 1706, 1710, 1714, 1718, 1722, 1726, 1730, 1734], + [1738, 1742, 1746, 1750, 1754, 1758, 1762, 1766, 1770, 1774], + [1778, 1782, 1786, 1791, 1795, 1799, 1803, 1807, 1811, 1816], + [1820, 1824, 1828, 1832, 1837, 1841, 1845, 1849, 1854, 1858], + [1862, 1866, 1871, 1875, 1879, 1884, 1888, 1892, 1897, 1901], + [1905, 1910, 1914, 1919, 1923, 1928, 1932, 1936, 1941, 1945], + [1950, 1954, 1959, 1963, 1968, 1972, 1977, 1982, 1986, 1991], + [1995, 2000, 2004, 2009, 2014, 2018, 2023, 2028, 2032, 2037], + [2042, 2046, 2051, 2056, 2061, 2065, 2070, 2075, 2080, 2084], + [2089, 2094, 2099, 2104, 2109, 2113, 2118, 2123, 2128, 2133], + [2138, 2143, 2148, 2153, 2158, 2163, 2168, 2173, 2178, 2183], + [2188, 2193, 2198, 2203, 2208, 2213, 2218, 2223, 2228, 2234], + [2239, 2244, 2249, 2254, 2259, 2265, 2270, 2275, 2280, 2286], + [2291, 2296, 2301, 2307, 2312, 2317, 2323, 2328, 2333, 2339], + [2344, 2350, 2355, 2360, 2366, 2371, 2377, 2382, 2388, 2393], + [2399, 2404, 2410, 2415, 2421, 2427, 2432, 2438, 2443, 2449], + [2455, 2460, 2466, 2472, 2477, 2483, 2489, 2495, 2500, 2506], + [2512, 2518, 2523, 2529, 2535, 2541, 2547, 2553, 2559, 2564], + [2570, 2576, 2582, 2588, 2594, 2600, 2606, 2612, 2618, 2624], + [2630, 2636, 2642, 2649, 2655, 2661, 2667, 2673, 2679, 2685], + [2692, 2698, 2704, 2710, 2716, 2723, 2729, 2735, 2742, 2748], + [2754, 2761, 2767, 2773, 2780, 2786, 2793, 2799, 2805, 2812], + [2818, 2825, 2831, 2838, 2844, 2851, 2858, 2864, 2871, 2877], + [2884, 2891, 2897, 2904, 2911, 2917, 2924, 2931, 2938, 2944], + [2951, 2958, 2965, 2972, 2979, 2985, 2992, 2999, 3006, 3013], + [3020, 3027, 3034, 3041, 3048, 3055, 3062, 3069, 3076, 3083], + [3090, 3097, 3105, 3112, 3119, 3126, 3133, 3141, 3148, 3155], + [3162, 3170, 3177, 3184, 3192, 3199, 3206, 3214, 3221, 3228], + [3236, 3243, 3251, 3258, 3266, 3273, 3281, 3289, 3296, 3304], + [3311, 3319, 3327, 3334, 3342, 3350, 3357, 3365, 3373, 3381], + [3388, 3396, 3404, 3412, 3420, 3428, 3436, 3443, 3451, 3459], + [3467, 3475, 3483, 3491, 3499, 3508, 3516, 3524, 3532, 3540], + [3548, 3556, 3565, 3573, 3581, 3589, 3597, 3606, 3614, 3622], + [3631, 3639, 3648, 3656, 3664, 3673, 3681, 3690, 3698, 3707], + [3715, 3724, 3733, 3741, 3750, 3758, 3767, 3776, 3784, 3793], + [3802, 3811, 3819, 3828, 3837, 3846, 3855, 3864, 3873, 3882], + [3890, 3899, 3908, 3917, 3926, 3936, 3945, 3954, 3963, 3972], + [3981, 3990, 3999, 4009, 4018, 4027, 4036, 4046, 4055, 4064], + [4074, 4083, 4093, 4102, 4111, 4121, 4130, 4140, 4150, 4159], + [4169, 4178, 4188, 4198, 4207, 4217, 4227, 4236, 4246, 4256], + [4266, 4276, 4285, 4295, 4305, 4315, 4325, 4335, 4345, 4355], + [4365, 4375, 4385, 4395, 4406, 4416, 4426, 4436, 4446, 4457], + [4467, 4477, 4487, 4498, 4508, 4519, 4529, 4539, 4550, 4560], + [4571, 4581, 4592, 4603, 4613, 4624, 4634, 4645, 4656, 4667], + [4677, 4688, 4699, 4710, 4721, 4732, 4742, 4753, 4764, 4775], + [4786, 4797, 4808, 4819, 4831, 4842, 4853, 4864, 4875, 4887], + [4898, 4909, 4920, 4932, 4943, 4955, 4966, 4977, 4989, 5000], + [5012, 5023, 5035, 5047, 5058, 5070, 5082, 5093, 5105, 5117], + [5129, 5140, 5152, 5164, 5176, 5188, 5200, 5212, 5224, 5236], + [5248, 5260, 5272, 5284, 5297, 5309, 5321, 5333, 5346, 5358], + [5370, 5383, 5395, 5408, 5420, 5433, 5445, 5458, 5470, 5483], + [5495, 5508, 5521, 5534, 5546, 5559, 5572, 5585, 5598, 5610], + [5623, 5636, 5649, 5662, 5675, 5689, 5702, 5715, 5728, 5741], + [5754, 5768, 5781, 5794, 5808, 5821, 5834, 5848, 5861, 5875], + [5888, 5902, 5916, 5929, 5943, 5957, 5970, 5984, 5998, 6012], + [6026, 6039, 6053, 6067, 6081, 6095, 6109, 6124, 6138, 6152], + [6166, 6180, 6194, 6209, 6223, 6237, 6252, 6266, 6281, 6295], + [6310, 6324, 6339, 6353, 6368, 6383, 6397, 6412, 6427, 6442], + [6457, 6471, 6486, 6501, 6516, 6531, 6546, 6561, 6577, 6592], + [6607, 6622, 6637, 6653, 6668, 6683, 6699, 6714, 6730, 6745], + [6761, 6776, 6792, 6808, 6823, 6839, 6855, 6871, 6887, 6902], + [6918, 6934, 6950, 6966, 6982, 6998, 7015, 7031, 7047, 7063], + [7079, 7096, 7112, 7129, 7145, 7161, 7178, 7194, 7211, 7228], + [7244, 7261, 7278, 7295, 7311, 7328, 7345, 7362, 7379, 7396], + [7413, 7430, 7447, 7464, 7482, 7499, 7516, 7534, 7551, 7568], + [7586, 7603, 7621, 7638, 7656, 7674, 7691, 7709, 7727, 7745], + [7762, 7780, 7798, 7816, 7834, 7852, 7870, 7889, 7907, 7925], + [7943, 7962, 7980, 7998, 8017, 8035, 8054, 8072, 8091, 8110], + [8128, 8147, 8166, 8185, 8204, 8222, 8241, 8260, 8279, 8299], + [8318, 8337, 8356, 8375, 8395, 8414, 8433, 8453, 8472, 8492], + [8511, 8531, 8551, 8570, 8590, 8610, 8630, 8650, 8670, 8690], + [8710, 8730, 8750, 8770, 8790, 8810, 8831, 8851, 8872, 8892], + [8913, 8933, 8954, 8974, 8995, 9016, 9036, 9057, 9078, 9099], + [9120, 9141, 9162, 9183, 9204, 9226, 9247, 9268, 9290, 9311], + [9333, 9354, 9376, 9397, 9419, 9441, 9462, 9484, 9506, 9528], + [9550, 9572, 9594, 9616, 9638, 9661, 9683, 9705, 9727, 9750], + [9772, 9795, 9817, 9840, 9863, 9886, 9908, 9931, 9954, 9977] + ]; + } + + /// The small decimal anti log table used for logarithm calculations. AOT + /// compiled into bytes that are deployed on-chain as data contracts. + /// @return The small decimal anti log table. + function antiLogTableDecSmall() internal pure returns (uint8[10][100] memory) { + return [ + [0, 0, 0, 1, 1, 1, 1, 2, 2, 2], + [0, 0, 0, 1, 1, 1, 1, 2, 2, 2], + [0, 0, 0, 1, 1, 1, 1, 2, 2, 2], + [0, 0, 0, 1, 1, 1, 1, 2, 2, 2], + [0, 0, 1, 1, 1, 1, 2, 2, 2, 2], + [0, 0, 1, 1, 1, 1, 2, 2, 2, 2], + [0, 0, 1, 1, 1, 1, 2, 2, 2, 2], + [0, 0, 1, 1, 1, 1, 2, 2, 2, 2], + [0, 0, 1, 1, 1, 1, 2, 2, 2, 3], + [0, 0, 1, 1, 1, 1, 2, 2, 2, 3], + [0, 0, 1, 1, 1, 1, 2, 2, 2, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 2, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 2, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], + [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], + [0, 0, 1, 1, 1, 2, 2, 3, 3, 3], + [0, 0, 1, 1, 1, 2, 2, 3, 3, 3], + [0, 0, 1, 1, 2, 2, 2, 3, 3, 3], + [0, 0, 1, 1, 2, 2, 2, 3, 3, 3], + [0, 0, 1, 1, 2, 2, 2, 3, 3, 4], + [0, 0, 1, 1, 2, 2, 2, 3, 3, 4], + [0, 0, 1, 1, 2, 2, 2, 3, 3, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 3, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 3, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], + [0, 1, 1, 2, 2, 3, 3, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 5], + [0, 1, 1, 2, 2, 3, 4, 4, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 4, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 4, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 3, 4, 5, 5, 6], + [0, 1, 1, 2, 3, 4, 4, 5, 6, 6], + [0, 1, 1, 2, 3, 4, 4, 5, 6, 6], + [0, 1, 1, 2, 3, 4, 4, 5, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 5, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 5, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 6, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 6, 6, 7], + [0, 1, 2, 2, 3, 4, 5, 6, 7, 7], + [0, 1, 2, 3, 3, 4, 5, 6, 7, 8], + [0, 1, 2, 3, 3, 4, 5, 6, 7, 8], + [0, 1, 2, 3, 4, 4, 5, 6, 7, 8], + [0, 1, 2, 3, 4, 5, 5, 6, 7, 8], + [0, 1, 2, 3, 4, 5, 6, 6, 7, 8], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [0, 1, 2, 3, 4, 5, 6, 7, 9, 10], + [0, 1, 2, 3, 4, 5, 7, 8, 9, 10], + [0, 1, 2, 3, 4, 6, 7, 8, 9, 10], + [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], + [0, 1, 2, 4, 5, 6, 7, 8, 9, 11], + [0, 1, 2, 4, 5, 6, 7, 8, 10, 11], + [0, 1, 2, 4, 5, 6, 7, 9, 10, 11], + [0, 1, 3, 4, 5, 6, 8, 9, 10, 11], + [0, 1, 3, 4, 5, 6, 8, 9, 10, 12], + [0, 1, 3, 4, 5, 7, 8, 9, 10, 12], + [0, 1, 3, 4, 5, 7, 8, 9, 11, 12], + [0, 1, 3, 4, 5, 7, 8, 10, 11, 12], + [0, 1, 3, 4, 6, 7, 8, 10, 11, 13], + [0, 1, 3, 4, 6, 7, 9, 10, 11, 13], + [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], + [0, 2, 3, 5, 6, 8, 9, 11, 12, 14], + [0, 2, 3, 5, 6, 8, 9, 11, 12, 14], + [0, 2, 3, 5, 6, 8, 9, 11, 13, 14], + [0, 2, 3, 5, 6, 8, 10, 11, 13, 15], + [0, 2, 3, 5, 7, 8, 10, 12, 13, 15], + [0, 2, 3, 5, 7, 8, 10, 12, 13, 15], + [0, 2, 3, 5, 7, 9, 10, 12, 14, 16], + [0, 2, 4, 5, 7, 9, 11, 12, 14, 16], + [0, 2, 4, 5, 7, 9, 11, 13, 14, 16], + [0, 2, 4, 6, 7, 9, 11, 13, 15, 17], + [0, 2, 4, 6, 8, 9, 11, 13, 15, 17], + [0, 2, 4, 6, 8, 10, 12, 14, 15, 17], + [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], + [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], + [0, 2, 4, 6, 8, 10, 12, 15, 17, 19], + [0, 2, 4, 6, 8, 11, 13, 15, 17, 19], + [0, 2, 4, 7, 9, 11, 13, 15, 17, 20], + [0, 2, 4, 7, 9, 11, 13, 16, 18, 20], + [0, 2, 5, 7, 9, 11, 14, 16, 18, 20] + ]; + } +} diff --git a/dependencies/rain-metadata-0.1.0/Cargo.lock b/dependencies/rain-metadata-0.1.0/Cargo.lock new file mode 100644 index 00000000..9b19e7f7 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/Cargo.lock @@ -0,0 +1,5722 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "adler32" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alloy" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0093d23bf026b580c1f66ed3a053d8209c104a446c5264d3ad99587f6edef24e" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-json-rpc", + "alloy-network", + "alloy-provider", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", +] + +[[package]] +name = "alloy-chains" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6967ca1ed656766e471bc323da42fb0db320ca5e1418b408650e98e4757b3d2" +dependencies = [ + "alloy-primitives", + "num_enum", + "strum 0.27.1", +] + +[[package]] +name = "alloy-consensus" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad451f9a70c341d951bca4e811d74dbe1e193897acd17e9dbac1353698cc430b" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-trie", + "auto_impl", + "c-kzg", + "derive_more", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "secp256k1", + "serde", + "serde_with", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-consensus-any" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142daffb15d5be1a2b20d2cd540edbcef03037b55d4ff69dc06beb4d06286dba" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf25443920ecb9728cb087fe4dc04a0b290bd6ac85638c58fe94aba70f1a44e" +dependencies = [ + "alloy-consensus", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-core" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5968f48d7a62587cd874bd84034831da4f7f577ce5de984828e376766efc0f32" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9135eb501feccf7f4cb8a183afd406a65483fdad7bbd7332d0470e5d725c92f" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-eip2124" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eip2930" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b82752a889170df67bbb36d42ca63c531eb16274f0d7299ae2a680facba17bd" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d4769c6ffddca380b0070d71c8b7f30bed375543fe76bb2f74ec0acf4b7cd16" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eips" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3056872f6da48046913e76edb5ddced272861f6032f09461aea1a2497be5ae5d" +dependencies = [ + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "auto_impl", + "c-kzg", + "derive_more", + "either", + "serde", + "sha2", +] + +[[package]] +name = "alloy-ethers-typecast" +version = "0.2.0" +source = "git+https://github.com/rainlanguage/alloy-ethers-typecast?rev=f7b5bfd0687f16c77dbfdd4905b2434793fa7885#f7b5bfd0687f16c77dbfdd4905b2434793fa7885" +dependencies = [ + "alloy", + "async-trait", + "derive_builder", + "getrandom 0.3.3", + "once_cell", + "rain-error-decoding", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", + "tracing-subscriber", + "url", +] + +[[package]] +name = "alloy-genesis" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c98fb40f07997529235cc474de814cd7bd9de561e101716289095696c0e4639d" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "alloy-trie", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b26fdd571915bafe857fccba4ee1a4f352965800e46a53e4a5f50187b7776fa" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc08b31ebf9273839bd9a01f9333cbb7a3abb4e820c312ade349dd18bdc79581" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed117b08f0cc190312bf0c38c34cf4f0dabfb4ea8f330071c587cd7160a88cb2" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "derive_more", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-network-primitives" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7162ff7be8649c0c391f4e248d1273e85c62076703a1f3ec7daf76b283d886d" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a326d47106039f38b811057215a92139f46eef7983a4b77b10930a0ea5685b1e" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "foldhash", + "getrandom 0.3.3", + "hashbrown 0.15.3", + "indexmap 2.9.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.9.1", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84eba1fd8b6fe8b02f2acd5dd7033d0f179e304bd722d11e817db570d1fa6c4" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-signer", + "alloy-sol-types", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "either", + "futures", + "futures-utils-wasm", + "lru", + "parking_lot", + "pin-project", + "reqwest 0.12.19", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "alloy-rpc-client" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518a699422a3eab800f3dac2130d8f2edba8e4fff267b27a9c7dc6a2b0d313ee" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "futures", + "pin-project", + "reqwest 0.12.19", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "tracing-futures", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c000cab4ec26a4b3e29d144e999e1c539c2fa0abed871bf90311eb3466187ca8" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "508b2fbe66d952089aa694e53802327798806498cd29ff88c75135770ecaabfc" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf7dff0fdd756a714d58014f4f8354a1706ebf9fa2cf73431e0aeec3c9431e" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.14.0", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-serde" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "730e8f2edf2fc224cabd1c25d090e1655fa6137b2e409f92e5eec735903f1507" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0d2428445ec13edc711909e023d7779618504c4800be055a5b940025dbafe3" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "either", + "elliptic-curve", + "k256", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-signer-local" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14fe6fedb7fe6e0dfae47fe020684f1d8e063274ef14bca387ddb7a6efa8ec1" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4be1ce1274ddd7fdfac86e5ece1b225e9bba1f2327e20fbb30ee6b9cc1423fe" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e92f3708ea4e0d9139001c86c051c538af0146944a2a9c7181753bd944bf57" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.5.0", + "indexmap 2.9.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.101", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afe1bd348a41f8c9b4b54dfb314886786d6201235b0b3f47198b9d910c86bb2" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "macro-string", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.101", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6195df2acd42df92a380a8db6205a5c7b41282d0ce3f4c665ecf7911ac292f1" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6185e98a79cf19010722f48a74b5a65d153631d2f038cabd250f4b9e9813b8ad" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a712bdfeff42401a7dd9518f72f617574c36226a9b5414537fedc34350b73bf9" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "base64 0.22.1", + "derive_more", + "futures", + "futures-utils-wasm", + "parking_lot", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ea5a76d7f2572174a382aedf36875bedf60bcc41116c9f031cf08040703a2dc" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.19", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-trie" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec", + "derive_more", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.1", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + +[[package]] +name = "assert-json-diff" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "async-attributes" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" +dependencies = [ + "async-channel 2.3.1", + "async-executor", + "async-io", + "async-lock", + "blocking", + "futures-lite", + "once_cell", +] + +[[package]] +name = "async-io" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener 5.4.0", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-object-pool" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "333c456b97c3f2d50604e8b2624253b7f787208cb72eb75e64b0ad11b221652c" +dependencies = [ + "async-std", +] + +[[package]] +name = "async-process" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde3f4e40e6021d7acffc90095cbd6dc54cb593903d1de5832f435eb274b85dc" +dependencies = [ + "async-channel 2.3.1", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener 5.4.0", + "futures-lite", + "rustix", + "tracing", +] + +[[package]] +name = "async-signal" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7605a4e50d4b06df3898d5a70bf5fde51ed9059b0434b73105193bc27acce0d" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.59.0", +] + +[[package]] +name = "async-std" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24" +dependencies = [ + "async-attributes", + "async-channel 1.9.0", + "async-global-executor", + "async-io", + "async-lock", + "async-process", + "crossbeam-utils", + "futures-channel", + "futures-core", + "futures-io", + "futures-lite", + "gloo-timers", + "kv-log-macro", + "log", + "memchr", + "once_cell", + "pin-project-lite", + "pin-utils", + "slab", + "wasm-bindgen-futures", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "auto_impl" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "basic-cookies" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67bd8fd42c16bdb08688243dc5f0cc117a3ca9efeeaba3a345a18a6159ad96f7" +dependencies = [ + "lalrpop", + "lalrpop-util 0.20.2", + "regex", +] + +[[package]] +name = "beef" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec 0.6.3", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel 2.3.1", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "blst" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fd49896f12ac9b6dcd7a5998466b9b58263a695a3dd1ecc1aaca2e12a90b080" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "bumpalo" +version = "3.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "c-kzg" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7318cfa722931cb5fe0838b98d3ce5621e75f6a6408abc21721d80de9223f2e4" +dependencies = [ + "blst", + "cc", + "glob", + "hex", + "libc", + "once_cell", + "serde", +] + +[[package]] +name = "cc" +version = "1.2.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + +[[package]] +name = "clap" +version = "4.5.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_derive" +version = "4.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "clap_lex" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "windows-sys 0.59.0", +] + +[[package]] +name = "const-hex" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cynic" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8931dbf88c6bc3a09e4721b8342a34d73abb0586ef9e4cb10712c994617b3347" +dependencies = [ + "cynic-proc-macros", + "ref-cast", + "serde", + "static_assertions", + "thiserror 1.0.69", +] + +[[package]] +name = "cynic-codegen" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728467a89a305811848807cbf2bf23d421c1e99052bf7700d08b17dd7b846a28" +dependencies = [ + "cynic-parser", + "darling 0.20.11", + "once_cell", + "ouroboros", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 2.0.101", + "thiserror 1.0.69", +] + +[[package]] +name = "cynic-parser" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbb0f21f2f8d3134c2e887a16564c165694231f48b6ae2769193299081ecf662" +dependencies = [ + "indexmap 2.9.0", + "lalrpop-util 0.22.2", + "logos", +] + +[[package]] +name = "cynic-proc-macros" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8069a1fd8d13d09c56d22ec4096329ee5735d0296ac78b7a7c30a9c76537f4ba" +dependencies = [ + "cynic-codegen", + "darling 0.20.11", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.101", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core 0.20.11", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "deflate" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f" +dependencies = [ + "adler32", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "serdect", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener 5.4.0", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand 0.8.5", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "futures-utils-wasm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "graphql-introspection-query" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2a4732cf5140bd6c082434494f785a19cfb566ab07d1382c3671f5812fed6d" +dependencies = [ + "serde", +] + +[[package]] +name = "graphql-parser" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a818c0d883d7c0801df27be910917750932be279c7bc82dc541b8769425f409" +dependencies = [ + "combine", + "thiserror 1.0.69", +] + +[[package]] +name = "graphql_client" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cdf7b487d864c2939b23902291a5041bc4a84418268f25fda1c8d4e15ad8fa" +dependencies = [ + "graphql_query_derive", + "serde", + "serde_json", +] + +[[package]] +name = "graphql_client_codegen" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a40f793251171991c4eb75bd84bc640afa8b68ff6907bc89d3b712a22f700506" +dependencies = [ + "graphql-introspection-query", + "graphql-parser", + "heck 0.4.1", + "lazy_static", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 1.0.109", +] + +[[package]] +name = "graphql_query_derive" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00bda454f3d313f909298f626115092d348bc231025699f557b27e248475f48c" +dependencies = [ + "graphql_client_codegen", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.9.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", + "serde", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.3.1", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "httpmock" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08ec9586ee0910472dec1a1f0f8acf52f0fdde93aea74d70d4a3107b4be0fd5b" +dependencies = [ + "assert-json-diff", + "async-object-pool", + "async-std", + "async-trait", + "base64 0.21.7", + "basic-cookies", + "crossbeam-utils", + "form_urlencoded", + "futures-util", + "hyper 0.14.32", + "lazy_static", + "levenshtein", + "log", + "regex", + "serde", + "serde_json", + "serde_regex", + "similar", + "tokio", + "url", +] + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.32", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc2fdfdbff08affe55bb779f33b053aa1fe5dd5b54c257343c17edfa55711bdb" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "hyper 1.6.0", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "if_chain" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +dependencies = [ + "equivalent", + "hashbrown 0.15.3", + "serde", +] + +[[package]] +name = "inflate" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" +dependencies = [ + "adler32", +] + +[[package]] +name = "insta" +version = "1.43.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "154934ea70c58054b556dd430b99a98c2a7ff5309ac9891597e339b5c28f4371" +dependencies = [ + "console", + "once_cell", + "similar", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "serdect", + "sha2", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "keccak-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" +dependencies = [ + "digest 0.10.7", + "sha3-asm", +] + +[[package]] +name = "kv-log-macro" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" +dependencies = [ + "log", +] + +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set 0.5.3", + "ena", + "itertools 0.11.0", + "lalrpop-util 0.20.2", + "petgraph", + "pico-args", + "regex", + "regex-syntax", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "lalrpop-util" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5baa5e9ff84f1aefd264e6869907646538a52147a755d494517a8007fb48733" +dependencies = [ + "rustversion", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "levenshtein" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" + +[[package]] +name = "libc" +version = "0.2.172" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.9.1", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +dependencies = [ + "value-bag", +] + +[[package]] +name = "logos" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7251356ef8cb7aec833ddf598c6cb24d17b689d20b993f9d11a3d764e34e6458" +dependencies = [ + "logos-derive", +] + +[[package]] +name = "logos-codegen" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59f80069600c0d66734f5ff52cc42f2dabd6b29d205f333d61fd7832e9e9963f" +dependencies = [ + "beef", + "fnv", + "lazy_static", + "proc-macro2", + "quote", + "regex-syntax", + "syn 2.0.101", +] + +[[package]] +name = "logos-derive" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24fb722b06a9dc12adb0963ed585f19fc61dc5413e6a9be9422ef92c091e731d" +dependencies = [ + "logos-codegen", +] + +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.3", +] + +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "nybbles" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" +dependencies = [ + "alloy-rlp", + "const-hex", + "proptest", + "serde", + "smallvec", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags 2.9.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ouroboros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59" +dependencies = [ + "aliasable", + "ouroboros_macro", + "static_assertions", +] + +[[package]] +name = "ouroboros_macro" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +dependencies = [ + "memchr", + "thiserror 2.0.12", + "ucd-trie", +] + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.9.0", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "polling" +version = "3.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", + "version_check", + "yansi", +] + +[[package]] +name = "proptest" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" +dependencies = [ + "bit-set 0.8.0", + "bit-vec 0.8.0", + "bitflags 2.9.1", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rain-erc" +version = "0.0.0" +source = "git+https://github.com/rainlanguage/rain.erc?rev=7b0f382f5e0788b0173c2391e09f4411f1c38300#7b0f382f5e0788b0173c2391e09f4411f1c38300" +dependencies = [ + "alloy", + "alloy-ethers-typecast", + "thiserror 1.0.69", +] + +[[package]] +name = "rain-error-decoding" +version = "0.1.0" +source = "git+https://github.com/rainlanguage/rain.error?rev=bf08b5ab305287fc49408a441d6375f35dc280db#bf08b5ab305287fc49408a441d6375f35dc280db" +dependencies = [ + "alloy", + "getrandom 0.2.16", + "once_cell", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "rain-metaboard-subgraph" +version = "0.1.0" +dependencies = [ + "alloy", + "async-trait", + "cynic", + "cynic-codegen", + "httpmock", + "insta", + "reqwest 0.11.27", + "serde_json", + "thiserror 1.0.69", + "tokio", +] + +[[package]] +name = "rain-metadata" +version = "0.0.2-alpha.6" +dependencies = [ + "alloy", + "alloy-ethers-typecast", + "anyhow", + "clap", + "deflate", + "futures", + "graphql-parser", + "graphql_client", + "httpmock", + "inflate", + "itertools 0.10.5", + "once_cell", + "rain-erc", + "rain-metaboard-subgraph", + "rain-metadata-bindings", + "regex", + "reqwest 0.11.27", + "schemars", + "serde", + "serde_bytes", + "serde_cbor", + "serde_json", + "strum 0.24.1", + "tempfile", + "thiserror 1.0.69", + "tokio", + "tracing", + "tracing-subscriber", + "url", + "validator", + "wasm-bindgen", + "wasm-bindgen-utils", +] + +[[package]] +name = "rain-metadata-bindings" +version = "0.1.0" +dependencies = [ + "alloy", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", + "serde", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "redox_syscall" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2f8e5513d63f2e5b386eb5106dc67eaf3f84e95258e210489136b8b92ad6119" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.6.0", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "ruint" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" +dependencies = [ + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand 0.8.5", + "rand 0.9.1", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", +] + +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +dependencies = [ + "rand 0.8.5", +] + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver 1.0.26", +] + +[[package]] +name = "rustix" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" +dependencies = [ + "bitflags 2.9.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustversion" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals 0.29.1", + "syn 2.0.101", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.9.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[package]] +name = "semver-parser" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_bytes" +version = "0.11.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "serde_derive_internals" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e578a843d40b4189a4d66bba51d7684f57da5bd7c304c64e14bd63efbef49509" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_regex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" +dependencies = [ + "regex", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.9.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling 0.20.11", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sha3-asm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "similar" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros 0.24.3", +] + +[[package]] +name = "strum" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" +dependencies = [ + "strum_macros 0.27.1", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "strum_macros" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.101", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn-solidity" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c8c8f496c33dc6343dac05b4be8d9e0bca180a4caa81d7b8416b10cc2273cd" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.9.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags 2.9.1", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1ffbcf9c6f6b99d386e7444eb608ba646ae452a36b39737deb9663b610f662" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "nu-ansi-term", + "sharded-slab", + "smallvec", + "thread_local", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tsify" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b26cf145f2f3b9ff84e182c448eaf05468e247f148cf3d2a7d67d78ff023a0" +dependencies = [ + "serde", + "serde-wasm-bindgen 0.5.0", + "tsify-macros", + "wasm-bindgen", +] + +[[package]] +name = "tsify-macros" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a94b0f0954b3e59bfc2c246b4c8574390d94a4ad4ad246aaf2fb07d7dfd3b47" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals 0.28.0", + "syn 2.0.101", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna 1.0.3", + "percent-encoding", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "validator" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" +dependencies = [ + "idna 0.4.0", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", + "validator_derive", +] + +[[package]] +name = "validator_derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" +dependencies = [ + "if_chain", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "validator_types", +] + +[[package]] +name = "validator_types" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "value-bag" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.101", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-bindgen-utils" +version = "0.0.10" +source = "git+https://github.com/rainlanguage/rain.wasm?rev=06990d85a0b7c55378a1c8cca4dd9e2bc34a596a#06990d85a0b7c55378a1c8cca4dd9e2bc34a596a" +dependencies = [ + "js-sys", + "paste", + "serde", + "serde-wasm-bindgen 0.6.5", + "tsify", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-utils-macros", +] + +[[package]] +name = "wasm-bindgen-utils-macros" +version = "0.0.5" +source = "git+https://github.com/rainlanguage/rain.wasm?rev=06990d85a0b7c55378a1c8cca4dd9e2bc34a596a#06990d85a0b7c55378a1c8cca4dd9e2bc34a596a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "wasmtimer" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.1", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] diff --git a/dependencies/rain-metadata-0.1.0/Cargo.toml b/dependencies/rain-metadata-0.1.0/Cargo.toml new file mode 100644 index 00000000..d860094d --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/Cargo.toml @@ -0,0 +1,26 @@ +[workspace] +resolver = "2" +members = ["crates/bindings", "crates/cli", "crates/metaboard"] + +[workspace.package] +license = "LicenseRef-DCL-1.0" + +[workspace.dependencies] +reqwest = { version = "0.11.17", features = ["json"] } +tokio = { version = "1.28.0", features = ["full"] } +cynic-codegen = { version = "3.4.0", features = ["rkyv"] } +cynic = "3.4.0" +thiserror = "1.0.56" +insta = { version = "1.34.0" } +alloy = { version = "1.0.9", features = ["rand", "json", "json-abi"] } +alloy-ethers-typecast = { git = "https://github.com/rainlanguage/alloy-ethers-typecast", rev = "f7b5bfd0687f16c77dbfdd4905b2434793fa7885" } +url = "2.5.0" +serde_json = "1.0.108" +async-trait = "0.1.77" +rain-erc = { git = "https://github.com/rainlanguage/rain.erc", rev = "7b0f382f5e0788b0173c2391e09f4411f1c38300" } + +[workspace.dependencies.rain-metadata-bindings] +path = "crates/bindings" + +[workspace.dependencies.rain-metaboard-subgraph] +path = "crates/metaboard" diff --git a/dependencies/rain-metadata-0.1.0/LICENSE b/dependencies/rain-metadata-0.1.0/LICENSE new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/LICENSE @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-metadata-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt b/dependencies/rain-metadata-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt new file mode 100644 index 00000000..dc4e1716 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/LICENSES/LicenseRef-DCL-1.0.txt @@ -0,0 +1,189 @@ +# DecentraLicense + +*This DecentraLicense (the “License”) applies to any Work whose owner has marked it with any of the following notices:* + +*“Licensed under the DecentraLicense version 1.0,” or* + +*“Licensed under the DecentraLicense version 1.0, with Combined Work Exception”* + +------ + +## 1. Purpose + +This License gives You unlimited permission to use and modify the software to which it applies (the “Work”), either as-is or in modified form, for Your private purposes, while protecting the owners and contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third parties who receive the Work from you. If any non-affiliated third party receives any part, aspect, or element of the Work from You, this License requires that You provide that third party all the permissions and materials needed to independently use and modify the Work without that third party having a loss of data or capability due to your actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The rules of this License are both obligations of Your agreement with the Licensor and conditions to your License. You must not do anything with the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from Licensor, as well as to any modifications, elaborations, or implementations created by You that contain any licenseable portion of the Work (a “Modified Work”). Unless specified, any reference to the Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and organization. You show that you accept this License and agree to its conditions by taking any action with the Work that, absent this License, would infringe any intellectual property right held by Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this License places Your use of the Work outside the scope of the License and infringes the rights of the Licensor. In the event of breach, the terms and conditions of this License may be enforced by Licensor under the laws of any jurisdiction to which You are subject. You also agree that either the Licensor or a Recipient (as an intended third-party beneficiary) may enforce the terms and conditions of this License against You via specific performance. + +To the fullest extent available under the law of any jurisdiction to which You are subject, You also agree that a Recipient (as an intended third-party beneficiary) receives a benefit in the form of the ability to maintain exclusive control of private keys under the terms and conditions of this License. + +## 3. Permissions and Conditions + +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the limitations of section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive permission to: + +> a) Take any action with the Work that would infringe the non-patent intellectual property laws of any jurisdiction to which You are subject; and +> +> b) Take any action with the Work that would infringe any patent claims that Licensor can license or becomes able to license, to the extent that those claims are embodied in the Work as distributed by Licensor. + +### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section 3.1: + +> a) Licensor does not grant any patent license for claims that are only infringed due to modification of the Work as provided by Licensor, or the combination of the Work as provided by Licensor, directly or indirectly, with any other component, including other software or hardware. +> +> b) Licensor does not grant any license to the trademarks, service marks, or logos of Licensor, except to the extent necessary to comply with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the Work, or any part, aspect, or element of the Work, is distributed, communicated, made available, or made perceptible to a non-Affiliate third party (a “Recipient”), either via physical delivery or via a network connection to the Recipient, You must comply with the following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each Recipient a copy of, or no-charge unrestricted network access to, the Source Code corresponding to the Work. + +The “Source Code” of the Work means the form of the Work preferred for making modifications, including any comments, configuration information, documentation, help materials, installation instructions, cryptographic seeds or keys, and any information reasonably necessary for the Recipient to independently compile and use the Source Code and to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network access to the Notices and Source Code may be provided by You or by a third party, such as a public software repository, and must persist during the same period in which You exercise any of the permissions granted to You under this License and for at least one year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each Recipient of a Modified Work Access to Source Code corresponding to those portions of the Work remaining in the Modified Work as well as the modifications used by You to create the Modified Work. The Source Code corresponding to the modifications in the Modified Work must be provided to the Recipient either a) under this License, or b) under a Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source Initiative that allows object code created using both Source Code provided under this License and Source Code provided under the other open source license to be distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular modification of the Work for up to ninety (90) days (the “Embargo Period”) if: a) the modification is intended to address a newly-identified vulnerability or a security flaw in the Work, b) disclosure of the vulnerability or security flaw before the end of the Embargo Period would put the data, identity, or autonomy of one or more Recipients of the Work at significant risk, c) You are participating in a coordinated disclosure of the vulnerability or security flaw with one or more additional Licensees, and d) Access to the Source Code pertaining to the modification is provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access to the Source Code, You cannot use the permissions given under this License to interfere with a Recipient’s ability to fully use an independent copy of the Work generated from the Source Code You provide with the Recipient’s own User Data. + +“User Data” means any data that is an input to or an output from the Work, where the presence of the data is necessary for substantially identical use of the Work in an equivalent context chosen by the Recipient, and where the Recipient has an existing ownership interest, an existing right to possess, or where the data has been generated by, for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions granted to You under this License, You must also provide to any Recipient to whom you provide services via the Work, a no-charge copy, provided in a commonly used electronic form, of the Recipient’s User Data in your possession, to the extent that such User Data is available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by the use of cryptographic methods applied to anything provided to the Recipient, by possession or control of cryptographic keys, seeds, or hashes, by other technological protection measures, or by any other method, limit a Recipient's ability to access any functionality present in the Recipient's independent copy of the Work, or deny a Recipient full control of the Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to independently exercise the permissions granted under this License. You waive any legal power to forbid circumvention of technical protection measures that include use of the Work, and You waive any claim that the capabilities of the Work were limited or modified as a means of enforcing the legal rights of third parties against Recipients. + +### 4.3. Decentralized Code and Decentralized Systems + +You must only run Decentralized Code if: + +> a) it is run by a Decentralized System; and +> +> b) all the data referenced by Decentralized Code is stored on a Decentralized System. + +“Decentralized Code” is a Source Code file marked by the Licensor as “Decentralized Code”. + +“Decentralized System” is a system operating solely in accordance with publicly available Rules where any person or organisation: + +> a) only participates in the system by freely opting in; +> +> b) can interpret system data by reference to the Rules; and +> +> c) can obtain a copy of the system data, provided in a commonly used electronic form, accessible in accordance with the Rules. + +“Rule” is any unambiguous and human comprehensible: + +> a) rule that results in a deterministic outcome when implemented, in a commonly used electronic form; or +> +> b) configuration information, documentation, help materials, and any information reasonably necessary for a Recipient skilled in the art to independently comprehend the rule. + +### 4.4. Maintain Private Key Exclusive Control + +You cannot use the permissions given under this License to provide a Recipient with functionality using the Work that: + +> a) would cause the loss of exclusive control of a private key by a private key holder with exclusive control of a private key; or +> +> b) deals with private keys except by using a Decentralized System. + +### 4.5. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices contained in the Source Code (the “Notices”), and provide all such Notices to each Recipient, together with a statement acknowledging the use of the Work. Notices may be provided directly to a Recipient or via an easy-to-find hyperlink to an Internet location also providing Access to Source Code. + +### 4.6. Scope of Conditions in this License + +You are required to uphold the conditions of this License only relative to those who are Recipients of the Work from You. Other than providing Recipients with the applicable Notices, Access to Source Code, and a copy of and full control of their User Data, nothing in this License requires You to provide processing services to or engage in network interactions with anyone. + +### 4.7. Combined Work Exception + +As an exception to condition that You provide Recipients Access to Source Code, any Source Code files not marked by the Licensor as “Decentralized Code” and as having the “Combined Work Exception,” or any object code exclusively resulting from Source Code files so marked, may be combined with other Software into a “Larger Work.” So long as you: a) comply with the requirements to provide Recipients the applicable Notices and Access to the Source Code provided to You by Licensor, b) you provide Recipients access to their User Data and do not limit Recipient’s ability to independently work with their User Data, c) you comply with the requirements in relation to Decentralized Code and Decentralized Systems, and d) Recipients are able to maintain exclusive control of private cryptographic keys, any other Software in the Larger Work as well as the Larger Work as a whole may be licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and continues until terminated for any of the reasons described herein, or until all Licensor’s intellectual property rights in the Software expire, whichever comes first (“Term”). This License cannot be revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted to You under Section 3 by any Licensor automatically terminate. You will immediately cease exercising any permissions granted in this License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any of the conditions in section 4. As a special exception to termination for non-compliance, Your permissions for the Work under this License will automatically be reinstated if You come into compliance with all the conditions in section 2 within sixty (60) days of being notified by Licensor or an intended third party beneficiary of Your noncompliance. You are eligible for reinstatement of permissions for the Work one time only, and only for the sixty days immediately after becoming aware of noncompliance. Loss of permissions granted for the Work under this License due to either a) sustained noncompliance lasting more than sixty days or b) subsequent termination for noncompliance after reinstatement, is permanent, unless rights are specifically restored by Licensor in writing. + +### 5.3 Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the Work, either direct or indirect, asserting that the Work directly or indirectly infringes any patent, then all permissions granted to You by this License shall terminate. In the event of termination due to litigation, all permissions validly granted by You under this License, directly or indirectly, shall survive termination. Administrative review procedures, declaratory judgment actions, counterclaims in response to patent litigation, and enforcement actions against former Licensees terminated under this section do not cause termination due to litigation. + +## 6. Disclaimer of Warranty and Limit on Liability + +As far as the law allows, the Work comes AS-IS, without any warranty of any kind, and no Licensor or contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim, or for any type of damages, including indirect, special, incidental, or consequential damages of any type arising as a result of this License or the use of the Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of profits, revenue, or any and all other commercial damages or losses. + +## 7. Other Provisions + +### 7.1. Affiliates + +An “Affiliate” means any other entity that, directly or indirectly through one or more intermediaries, controls, is controlled by, or is under common control with, the Licensee. Employees of a Licensee and natural persons acting as contractors exclusively providing services to Licensee are also Affiliates. + +### 7.2. Choice of Jurisdiction and Governing Law + +A Licensor may require that any action or suit by a Licensee relating to a Work provided by Licensor under this License may be brought only in the courts of a particular jurisdiction and under the laws of a particular jurisdiction (excluding its conflict-of-law provisions), if Licensor provides conspicuous notice of the particular jurisdiction to all Licensees. + +### 7.3. No Sublicensing + +This License is not sublicensable. Each time You provide the Work or a Modified Work to a Recipient, the Recipient automatically receives a license under the terms described in this License. You may not impose any further reservations, conditions, or other provisions on any Recipients’ exercise of the permissions granted herein. + +### 7.4. Attorneys' Fees + +In any action to enforce the terms of this License, or seeking damages relating thereto, including by an intended third party beneficiary, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. A “prevailing party” is the party that achieves, or avoids, compliance with this License, including through settlement. This section shall survive the termination of this License. + +### 7.5. No Waiver + +Any failure by Licensor to enforce any provision of this License will not constitute a present or future waiver of such provision nor limit Licensor’s ability to enforce such provision at a later time. + +### 7.6. Severability + +If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any invalid or unenforceable portion will be interpreted to the effect and intent of the original portion. If such a construction is not possible, the invalid or unenforceable portion will be severed from this License but the rest of this License will remain in full force and effect. + +### 7.7. License for the Text of this License + +The text of this license is released under the Creative Commons Attribution-ShareAlike 4.0 International License, with the caveat that any modifications of this license may not use the name “DecentraLicense” or any name confusingly similar thereto to describe any derived work of this License. diff --git a/dependencies/rain-metadata-0.1.0/README.md b/dependencies/rain-metadata-0.1.0/README.md new file mode 100644 index 00000000..461b58dc --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/README.md @@ -0,0 +1,49 @@ +# rain.metadata + +## Specs + +MetadataV1 spec - https://github.com/rainprotocol/specs/blob/main/metadata-v1.md + +## Dev stuff + +### Local environment & CI + +Uses nixos. + +Install `nix develop` - https://nixos.org/download.html. + +Run `nix develop` in this repo to drop into the shell. Please ONLY use the nix +version of `foundry` for development, to ensure versions are all compatible. + +Read the `flake.nix` file to find some additional commands included for dev and +CI usage. + +## Legal stuff + +Everything is under DecentraLicense 1.0 (DCL-1.0) which can be found in `LICENSES/`. + +This is basically `CAL-1.0` which is an open source license +https://opensource.org/license/cal-1-0 + +The non-legal summary of DCL-1.0 is that the source is open, as expected, but +also user data in the systems that this code runs on must also be made available +to those users as relevant, and that private keys remain private. + +Roughly it's "not your keys, not your coins" aware, as close as we could get in +legalese. + +This is the default situation on permissionless blockchains, so shouldn't require +any additional effort by dev-users to adhere to the license terms. + +This repo is REUSE 3.2 compliant https://reuse.software/spec-3.2/ and compatible +with `reuse` tooling (also available in the nix shell here). + +``` +nix develop -c rainix-sol-legal +``` + +## Contributions + +Contributions are welcome **under the same license** as above. + +Contributors agree and warrant that their contributions are compliant. \ No newline at end of file diff --git a/dependencies/rain-metadata-0.1.0/script/Deploy.sol b/dependencies/rain-metadata-0.1.0/script/Deploy.sol new file mode 100644 index 00000000..e5172d37 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/script/Deploy.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Script} from "forge-std-1.16.1/src/Script.sol"; +import {MetaBoard} from "src/concrete/MetaBoard.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; +import {LibMetaBoardDeploy} from "src/lib/deploy/LibMetaBoardDeploy.sol"; + +/// @title Deploy +/// @notice A script that deploys all contracts. This is intended to be run on +/// every commit by CI to a testnet such as mumbai. +contract Deploy is Script { + mapping(string => mapping(address => bytes32)) internal sDepCodeHashes; + + function run() external { + uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); + + LibRainDeploy.deployAndBroadcast( + vm, + LibRainDeploy.supportedNetworks(), + deployerPrivateKey, + type(MetaBoard).creationCode, + "", + LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS, + LibMetaBoardDeploy.METABOARD_DEPLOYED_CODEHASH, + new address[](0), + sDepCodeHashes + ); + } +} diff --git a/dependencies/rain-metadata-0.1.0/src/concrete/MetaBoard.sol b/dependencies/rain-metadata-0.1.0/src/concrete/MetaBoard.sol new file mode 100644 index 00000000..e88f2733 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/concrete/MetaBoard.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {IMetaBoardV1_2} from "../interface/unstable/IMetaBoardV1_2.sol"; +import {LibMeta} from "../lib/LibMeta.sol"; + +contract MetaBoard is IMetaBoardV1_2 { + /// @inheritdoc IMetaBoardV1_2 + function emitMeta(bytes32 subject, bytes calldata meta) external { + LibMeta.checkMetaUnhashedV1(meta); + emit MetaV1_2(msg.sender, subject, meta); + } + + /// Exposes native hashing algorithm (keccak256) to facilitate indexing data + /// under its hash. This avoids the need to roll a new interface to include + /// hashes in the event logs. + function hash(bytes calldata data) external pure returns (bytes32) { + bytes32 dataHash; + assembly ("memory-safe") { + let free := mload(0x40) + calldatacopy(free, data.offset, data.length) + dataHash := keccak256(free, data.length) + } + return dataHash; + } +} diff --git a/dependencies/rain-metadata-0.1.0/src/interface/IDescribedByMetaV1.sol b/dependencies/rain-metadata-0.1.0/src/interface/IDescribedByMetaV1.sol new file mode 100644 index 00000000..8377d8e3 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/interface/IDescribedByMetaV1.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +/// @title IDescribedByMetaV1 +/// An interface for contracts that describe themselves with Rain metadata V1. +/// Only the hash of the metadata is stored onchain, most likely compiled into +/// the contract directly for gas efficiency. The metadata itself is expected to +/// be available offchain, e.g. by emitting it via the metaboard contract. +/// +/// The implementing contract DOES NOT need to emit the metadata itself, nor be +/// the subject of the metadata. The emitter of the metadata is NOT expected to +/// even be aware of the contract that implements this interface. +/// +/// Importantly, this interface implies the existence of an indexer that can +/// retrieve the metadata for a given hash. +/// +/// The implementing contract MUST NOT change the metadata hash after deployment. +/// It is expected that the metadata associated with the contract is an immutable +/// and intrinsic part of the contract's identity. +/// +/// The main benefit of this interface is to allow contracts to be +/// self-describing, without suffering the bloat of the metadata itself. +interface IDescribedByMetaV1 { + /// @return The hash of the metadata that describes this contract. + function describedByMetaV1() external view returns (bytes32); +} diff --git a/dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaBoardV1.sol b/dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaBoardV1.sol new file mode 100644 index 00000000..69c1c2ed --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaBoardV1.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +import {IMetaV1} from "./IMetaV1.sol"; + +/// Defines a general purpose contract that anon may call to emit ANY metadata. +/// Anons MAY send garbage and malicious metadata so it is up to tooling to +/// discard any suspect data before use, and generally treat it all as untrusted. +interface IMetaBoardV1 is IMetaV1 { + /// Emit a single MetaV1 event. Typically this is sufficient for most use + /// cases as a single MetaV1 event can contain many metas as a single + /// cbor-seq. Metadata MUST match the metadata V1 specification for Rain + /// metadata or tooling MAY drop it. `IMetaBoardV1` contracts MUST revert any + /// metadata that does not start with the Rain metadata magic number. + /// @param subject As per `IMetaV1` event. + /// @param meta As per `IMetaV1` event. + function emitMeta(uint256 subject, bytes calldata meta) external; +} diff --git a/dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaV1.sol b/dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaV1.sol new file mode 100644 index 00000000..95c45ee6 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/interface/deprecated/IMetaV1.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +/// Thrown when hashed metadata does NOT match the expected hash. +/// @param expectedHash The hash expected by the `IMetaV1` contract. +/// @param actualHash The hash of the metadata seen by the `IMetaV1` contract. +error UnexpectedMetaHash(bytes32 expectedHash, bytes32 actualHash); + +/// Thrown when some bytes are expected to be rain meta and are not. +/// @param unmeta the bytes that are not meta. +error NotRainMetaV1(bytes unmeta); + +/// @dev Randomly generated magic number with first bytes oned out. +/// https://github.com/rainprotocol/specs/blob/main/metadata-v1.md +uint64 constant META_MAGIC_NUMBER_V1 = 0xff0a89c674ee7874; + +/// @title IMetaV1 +interface IMetaV1 { + /// An onchain wrapper to carry arbitrary Rain metadata. Assigns the sender + /// to the metadata so that tooling can easily drop/ignore data from unknown + /// sources. As metadata is about something, the subject MUST be provided. + /// @param sender The msg.sender. + /// @param subject The entity that the metadata is about. MAY be the address + /// of the emitting contract (as `uint256`) OR anything else. The + /// interpretation of the subject is context specific, so will often be a + /// hash of some data/thing that this metadata is about. + /// @param meta Rain metadata V1 compliant metadata bytes. + /// https://github.com/rainprotocol/specs/blob/main/metadata-v1.md + //slither-disable-next-line unindexed-event-address + event MetaV1(address sender, uint256 subject, bytes meta); +} diff --git a/dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaBoardV1_2.sol b/dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaBoardV1_2.sol new file mode 100644 index 00000000..2fc3ec70 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaBoardV1_2.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +import {IMetaV1_2} from "./IMetaV1_2.sol"; + +/// @title IMetaBoardV1_2 +/// Defines a general purpose contract that anon may call to emit ANY metadata. +/// Anons MAY send garbage and malicious metadata so it is up to tooling to +/// discard any suspect data before use, and generally treat it all as untrusted. +//slither-disable-next-line naming-convention +interface IMetaBoardV1_2 is IMetaV1_2 { + /// Emit a single `MetaV1_2` event. Typically this is sufficient for most use + /// cases as a single `MetaV1_2` event can contain many metas as a single + /// cbor-seq. Metadata MUST match the metadata V1 specification for Rain + /// metadata or tooling MAY drop it. `IMetaBoardV1_2` contracts MUST revert + /// any metadata that does not start with the Rain metadata magic number. + /// @param subject As per `IMetaV1_2` event. + /// @param meta As per `IMetaV1_2` event. + function emitMeta(bytes32 subject, bytes calldata meta) external; +} diff --git a/dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaV1_2.sol b/dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaV1_2.sol new file mode 100644 index 00000000..c739ea65 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/interface/unstable/IMetaV1_2.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +//forge-lint: disable-next-line(unused-import) +import {UnexpectedMetaHash, NotRainMetaV1, META_MAGIC_NUMBER_V1} from "../deprecated/IMetaV1.sol"; + +/// @title IMetaV1_2 +/// Identical to `IMetaV1` but with the subject as a `bytes32` instead of a +/// `uint256`. +//slither-disable-next-line naming-convention +interface IMetaV1_2 { + /// An onchain wrapper to carry arbitrary Rain metadata. Assigns the sender + /// to the metadata so that tooling can easily drop/ignore data from unknown + /// sources. As metadata is about something, the subject MUST be provided. + /// @param sender The msg.sender. + /// @param subject The entity that the metadata is about. MAY be the address + /// of the emitting contract (as `bytes32`) OR anything else. The + /// interpretation of the subject is context specific, so will often be a + /// hash of some data/thing that this metadata is about. + /// @param meta Rain metadata V1 compliant metadata bytes. + /// https://github.com/rainprotocol/specs/blob/main/metadata-v1.md + //slither-disable-next-line naming-convention,unindexed-event-address + event MetaV1_2(address sender, bytes32 subject, bytes meta); +} diff --git a/dependencies/rain-metadata-0.1.0/src/lib/LibDescribedByMeta.sol b/dependencies/rain-metadata-0.1.0/src/lib/LibDescribedByMeta.sol new file mode 100644 index 00000000..61b1c3e6 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/lib/LibDescribedByMeta.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +import {IDescribedByMetaV1} from "../interface/IDescribedByMetaV1.sol"; +import {IMetaBoardV1_2} from "../interface/unstable/IMetaBoardV1_2.sol"; + +/// @dev Thrown when metadata hash does not match expected value when attempting +/// to be emitted by the metaboard. +/// @param described The contract that describes itself with metadata. +/// @param expected The expected metadata hash. +/// @param actual The actual metadata hash. +error MetadataMismatch(IDescribedByMetaV1 described, bytes32 expected, bytes32 actual); + +/// @title LibDescribedByMeta +/// Tools for working with IDescribedByMetaV1 contracts and metadata. +library LibDescribedByMeta { + /// Emits metadata for a contract that implements IDescribedByMetaV1, + /// verifying that the hash of the metadata matches the expected hash. + /// The caller can be any or many contracts, as long as the metadata is + /// emitted at least once it can be indexed offchain under the hash of the + /// data and retrieved later. + /// @param metaboard The metaboard to emit the metadata on. + /// @param described The contract that describes itself with metadata. + /// @param meta The metadata to emit. + function emitForDescribedAddress(IMetaBoardV1_2 metaboard, IDescribedByMetaV1 described, bytes memory meta) + internal + { + bytes32 expected = described.describedByMetaV1(); + bytes32 actual; + assembly ("memory-safe") { + actual := keccak256(add(meta, 0x20), mload(meta)) + } + if (actual != expected) { + revert MetadataMismatch(described, expected, actual); + } + metaboard.emitMeta(bytes32(uint256(uint160(address(described)))), meta); + } +} diff --git a/dependencies/rain-metadata-0.1.0/src/lib/LibMeta.sol b/dependencies/rain-metadata-0.1.0/src/lib/LibMeta.sol new file mode 100644 index 00000000..aa1d4feb --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/lib/LibMeta.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.19; + +//forge-lint: disable-next-line(unused-import) +import {IMetaV1_2, UnexpectedMetaHash, NotRainMetaV1, META_MAGIC_NUMBER_V1} from "../interface/unstable/IMetaV1_2.sol"; + +/// @title LibMeta +/// @notice Need a place to put data that can be handled offchain like ABIs that +/// IS NOT etherscan. +library LibMeta { + /// Returns true if the metadata bytes are prefixed by the Rain meta magic + /// number. DOES NOT attempt to validate the body of the metadata as offchain + /// tooling will be required for this. + /// @param meta The data that may be rain metadata. + /// @return True if `meta` is metadata, false otherwise. + function isRainMetaV1(bytes memory meta) internal pure returns (bool) { + if (meta.length < 8) return false; + uint256 mask = type(uint64).max; + uint256 magicNumber = META_MAGIC_NUMBER_V1; + assembly ("memory-safe") { + magicNumber := and(mload(add(meta, 8)), mask) + } + return magicNumber == META_MAGIC_NUMBER_V1; + } + + /// Reverts if the provided `meta` is NOT metadata according to + /// `isRainMetaV1`. + /// @param meta The metadata bytes to check. + function checkMetaUnhashedV1(bytes memory meta) internal pure { + if (!isRainMetaV1(meta)) { + revert NotRainMetaV1(meta); + } + } + + /// Reverts if the provided `meta` is NOT metadata according to + /// `isRainMetaV1` OR it does not match the expected hash of its data. + /// @param meta The metadata to check. + function checkMetaHashedV1(bytes32 expectedHash, bytes memory meta) internal pure { + bytes32 actualHash; + assembly ("memory-safe") { + actualHash := keccak256(add(meta, 0x20), mload(meta)) + } + if (expectedHash != actualHash) { + revert UnexpectedMetaHash(expectedHash, actualHash); + } + checkMetaUnhashedV1(meta); + } +} diff --git a/dependencies/rain-metadata-0.1.0/src/lib/deploy/LibMetaBoardDeploy.sol b/dependencies/rain-metadata-0.1.0/src/lib/deploy/LibMetaBoardDeploy.sol new file mode 100644 index 00000000..29058ffa --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/src/lib/deploy/LibMetaBoardDeploy.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity ^0.8.25; + +/// @title LibMetaBoardDeploy +/// A library containing the deployed address and code hash of the MetaBoard +/// contract when deployed with the rain standard zoltu deployer. This allows +/// idempotent deployments against precommitted addresses and hashes that can be +/// easily verified automatically in tests and scripts rather than relying on +/// registries or manual verification. +library LibMetaBoardDeploy { + /// The address of the `MetaBoard` contract when deployed with the rain + /// standard zoltu deployer. + address constant METABOARD_DEPLOYED_ADDRESS = address(0xfb8437AeFBB8031064E274527C5fc08e30Ac6928); + + /// The code hash of the `MetaBoard` contract when deployed with the rain + /// standard zoltu deployer. This can be used to verify that the deployed + /// contract has the expected bytecode, which provides stronger guarantees + /// than just checking the address. + bytes32 constant METABOARD_DEPLOYED_CODEHASH = + bytes32(0x60e0735a3406074fd8f85adb2813d0d7c346337ea4bcc6f2ef4eb25077a4933c); + + uint256 constant METABOARD_START_BLOCK_ARBITRUM = 431042729; + uint256 constant METABOARD_START_BLOCK_BASE = 42021282; + uint256 constant METABOARD_START_BLOCK_BASE_SEPOLIA = 38683088; + uint256 constant METABOARD_START_BLOCK_FLARE = 55347067; + uint256 constant METABOARD_START_BLOCK_POLYGON = 82855948; +} diff --git a/dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.hash.t.sol b/dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.hash.t.sol new file mode 100644 index 00000000..f74ac5ba --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.hash.t.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {MetaBoard} from "src/concrete/MetaBoard.sol"; + +contract MetaBoardHashTest is Test { + function testMetaboardHash(bytes memory data) public { + MetaBoard metaBoard = new MetaBoard(); + bytes32 h = metaBoard.hash(data); + assertEq(h, keccak256(data)); + } +} diff --git a/dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.t.sol b/dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.t.sol new file mode 100644 index 00000000..06c44fcb --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/test/concrete/MetaBoard.t.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {IMetaV1_2, NotRainMetaV1, META_MAGIC_NUMBER_V1} from "src/interface/unstable/IMetaV1_2.sol"; +import {LibMeta} from "src/lib/LibMeta.sol"; +import {MetaBoard} from "src/concrete/MetaBoard.sol"; + +contract MetaBoardTest is Test, IMetaV1_2 { + function testEmitMeta(bytes32 subject, bytes memory data) public { + vm.assume(!LibMeta.isRainMetaV1(data)); + + MetaBoard metaBoard = new MetaBoard(); + + bytes memory meta = abi.encodePacked(META_MAGIC_NUMBER_V1, data); + vm.expectEmit(false, false, false, true); + //slither-disable-next-line reentrancy-events + emit MetaV1_2(address(this), subject, meta); + metaBoard.emitMeta(subject, meta); + + vm.expectRevert(abi.encodeWithSelector(NotRainMetaV1.selector, data)); + metaBoard.emitMeta(subject, data); + } +} diff --git a/dependencies/rain-metadata-0.1.0/test/lib/LibDescribedByMeta.emitForDescribedAddress.t.sol b/dependencies/rain-metadata-0.1.0/test/lib/LibDescribedByMeta.emitForDescribedAddress.t.sol new file mode 100644 index 00000000..df9b7e54 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/test/lib/LibDescribedByMeta.emitForDescribedAddress.t.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibDescribedByMeta, MetadataMismatch} from "src/lib/LibDescribedByMeta.sol"; +import {IDescribedByMetaV1} from "src/interface/IDescribedByMetaV1.sol"; +import {IMetaBoardV1_2} from "src/interface/unstable/IMetaBoardV1_2.sol"; +import {MetaBoard} from "src/concrete/MetaBoard.sol"; +import {META_MAGIC_NUMBER_V1} from "src/interface/unstable/IMetaV1_2.sol"; + +contract TestDescribedByMetaV1 is IDescribedByMetaV1 { + bytes32 public immutable EXPECTED; + + constructor(bytes memory meta) { + EXPECTED = keccak256(meta); + } + + function describedByMetaV1() external view override returns (bytes32) { + return EXPECTED; + } +} + +contract LibDescribedByMetaEmitForDescribedAddressTest is Test { + function externalEmitForDescribedAddress(IMetaBoardV1_2 metaboard, IDescribedByMetaV1 described, bytes memory meta) + external + { + LibDescribedByMeta.emitForDescribedAddress(metaboard, described, meta); + } + + function testEmitForDescribedAddressHappy(bytes memory metaData) external { + IMetaBoardV1_2 metaboard = new MetaBoard(); + + bytes memory meta = abi.encodePacked(META_MAGIC_NUMBER_V1, metaData); + + IDescribedByMetaV1 described = new TestDescribedByMetaV1(meta); + + LibDescribedByMeta.emitForDescribedAddress(metaboard, described, meta); + } + + function testEmitForDescribedAddressMismatch(bytes memory metaData, bytes memory expectedMetaData) external { + IMetaBoardV1_2 metaboard = new MetaBoard(); + + bytes memory meta = abi.encodePacked(META_MAGIC_NUMBER_V1, metaData); + bytes memory expectedMeta = abi.encodePacked(META_MAGIC_NUMBER_V1, expectedMetaData); + + IDescribedByMetaV1 described = new TestDescribedByMetaV1(expectedMeta); + + vm.assume(keccak256(meta) != keccak256(expectedMeta)); + vm.expectRevert( + abi.encodeWithSelector(MetadataMismatch.selector, described, keccak256(expectedMeta), keccak256(meta)) + ); + + this.externalEmitForDescribedAddress(metaboard, described, meta); + } +} diff --git a/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaHashedV1_2.t.sol b/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaHashedV1_2.t.sol new file mode 100644 index 00000000..ffb649dc --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaHashedV1_2.t.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibMeta} from "src/lib/LibMeta.sol"; +import {UnexpectedMetaHash, NotRainMetaV1, META_MAGIC_NUMBER_V1} from "src/interface/unstable/IMetaV1_2.sol"; + +contract LibMetaCheckMetaHashedV1_2Test is Test { + function checkMetaHashedV1External(bytes32 expectedHash, bytes memory meta) external pure { + LibMeta.checkMetaHashedV1(expectedHash, meta); + } + + /// When the data has a magic number, and the hash of the data matches the + /// expected hash passed to the check, it should not revert. + function testCheckMetaHashedV1_2Happy(bytes memory data) external pure { + bytes memory meta = abi.encodePacked(META_MAGIC_NUMBER_V1, data); + bytes32 metaHash = keccak256(meta); + LibMeta.checkMetaHashedV1(metaHash, meta); + } + + /// When the data has a magic number but the hash of the data does not + /// match the expected hash passed to the check, it should revert. + function testCheckMetaHashedV1_2GoodMagicBadHash(bytes memory data, bytes32 expectedHash) public { + bytes memory meta = abi.encodePacked(META_MAGIC_NUMBER_V1, data); + bytes32 metaHash = keccak256(meta); + vm.assume(metaHash != expectedHash); + vm.expectRevert(abi.encodeWithSelector(UnexpectedMetaHash.selector, expectedHash, metaHash)); + this.checkMetaHashedV1External(expectedHash, meta); + } + + /// When the data does not have a magic number, it should revert even if + /// the hash of the data matches the expected hash passed to the check. + function testCheckMetaHashedV1_2BadMagicGoodHash(bytes memory meta) public { + bytes32 metaHash = keccak256(meta); + vm.expectRevert(abi.encodeWithSelector(NotRainMetaV1.selector, meta)); + this.checkMetaHashedV1External(metaHash, meta); + } + + /// When the data does not have a magic number, and the hash of the data + /// does not match the expected hash passed to the check, it should revert. + function testCheckMetaHashedV1_2BadMagicBadHash(bytes memory meta, bytes32 expectedHash) public { + bytes32 metaHash = keccak256(meta); + vm.assume(metaHash != expectedHash); + + vm.expectRevert(abi.encodeWithSelector(UnexpectedMetaHash.selector, expectedHash, metaHash)); + this.checkMetaHashedV1External(expectedHash, meta); + } +} diff --git a/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaUnhashedV1_2.t.sol b/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaUnhashedV1_2.t.sol new file mode 100644 index 00000000..ca4072c3 --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.checkMetaUnhashedV1_2.t.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibMeta} from "src/lib/LibMeta.sol"; +import {NotRainMetaV1, META_MAGIC_NUMBER_V1} from "src/interface/unstable/IMetaV1_2.sol"; + +contract LibMetaCheckMetaUnhashedV1_2Test is Test { + function checkMetaUnhashedV1External(bytes memory meta) external pure { + LibMeta.checkMetaUnhashedV1(meta); + } + + /// All data with the magic number prefix will be considered to be rain meta + /// and all without will not. This test is the same as the above but with + /// the revert due to the check. + function testCheckMetaUnhashedV1_2Fuzz(bytes memory data) public { + bytes memory meta = abi.encodePacked(META_MAGIC_NUMBER_V1, data); + LibMeta.checkMetaUnhashedV1(meta); + + vm.expectRevert(abi.encodeWithSelector(NotRainMetaV1.selector, data)); + this.checkMetaUnhashedV1External(data); + } +} diff --git a/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.isRainMetaV1_2.t.sol b/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.isRainMetaV1_2.t.sol new file mode 100644 index 00000000..4a3c7eff --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/test/lib/LibMeta.isRainMetaV1_2.t.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibMeta} from "src/lib/LibMeta.sol"; +import {META_MAGIC_NUMBER_V1} from "src/interface/unstable/IMetaV1_2.sol"; + +contract LibMetaIsRainMetaV1_2Test is Test { + /// All data with the magic number prefix will be considered to be rain meta + /// and all without will not. + function testIsRainMetaV1_2Fuzz(bytes memory data) public pure { + bytes memory meta = abi.encodePacked(META_MAGIC_NUMBER_V1, data); + // True with prefix. + assertTrue(LibMeta.isRainMetaV1(meta)); + // False without prefix. + assertTrue(!LibMeta.isRainMetaV1(data)); + } +} diff --git a/dependencies/rain-metadata-0.1.0/test/lib/deploy/LibMetaBoardDeploy.t.sol b/dependencies/rain-metadata-0.1.0/test/lib/deploy/LibMetaBoardDeploy.t.sol new file mode 100644 index 00000000..8b89f63d --- /dev/null +++ b/dependencies/rain-metadata-0.1.0/test/lib/deploy/LibMetaBoardDeploy.t.sol @@ -0,0 +1,198 @@ +// SPDX-License-Identifier: LicenseRef-DCL-1.0 +// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd +pragma solidity =0.8.25; + +import {Test} from "forge-std-1.16.1/src/Test.sol"; +import {LibRainDeploy} from "rain-deploy-0.1.2/src/lib/LibRainDeploy.sol"; +import {LibMetaBoardDeploy} from "src/lib/deploy/LibMetaBoardDeploy.sol"; +import {MetaBoard} from "src/concrete/MetaBoard.sol"; + +contract LibMetaBoardDeployTest is Test { + /// Arbitrum Nitro genesis block. Archive RPCs can't serve blocks before this. + uint256 constant ARBITRUM_NITRO_GENESIS_BLOCK = 22207817; + + function testDeployAddress() external { + vm.createSelectFork(vm.envString("ETH_RPC_URL")); + + address deployedAddress = LibRainDeploy.deployZoltu(type(MetaBoard).creationCode); + + assertEq(deployedAddress, LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS); + assertTrue(address(deployedAddress).code.length > 0, "Deployed address has no code"); + + assertEq(address(deployedAddress).codehash, LibMetaBoardDeploy.METABOARD_DEPLOYED_CODEHASH); + } + + function testExpectedCodeHash() external { + MetaBoard metaBoard = new MetaBoard(); + + assertEq(address(metaBoard).codehash, LibMetaBoardDeploy.METABOARD_DEPLOYED_CODEHASH); + } + + function checkProdDeployment(string memory envVar) internal { + vm.createSelectFork(vm.envString(envVar)); + address deployed = LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS; + assertTrue(deployed.code.length > 0, string.concat("MetaBoard not deployed: ", envVar)); + assertEq( + deployed.codehash, + LibMetaBoardDeploy.METABOARD_DEPLOYED_CODEHASH, + string.concat("MetaBoard codehash mismatch: ", envVar) + ); + } + + function testProdDeployArbitrum() external { + checkProdDeployment("ARBITRUM_RPC_URL"); + } + + function testProdDeployBase() external { + checkProdDeployment("BASE_RPC_URL"); + } + + function testProdDeployBaseSepolia() external { + checkProdDeployment("BASE_SEPOLIA_RPC_URL"); + } + + function testProdDeployFlare() external { + checkProdDeployment("FLARE_RPC_URL"); + } + + function testProdDeployPolygon() external { + checkProdDeployment("POLYGON_RPC_URL"); + } + + function findStartBlock(string memory rpcEnvVar, uint256 searchFrom) internal returns (uint256) { + vm.createSelectFork(vm.envString(rpcEnvVar)); + return LibRainDeploy.findDeployBlock( + vm, + LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS, + LibMetaBoardDeploy.METABOARD_DEPLOYED_CODEHASH, + searchFrom + ); + } + + /// findDeployBlock binary searches via rollFork which hits RPC rate limits + /// in CI. Skipped there; the isStartBlock tests verify correctness cheaply. + /// Arbitrum is always skipped because Foundry's rollFork maps to L1 block + /// numbers, not L2. The Arbitrum start block was found via manual binary + /// search using eth_getCode RPC calls against L2 block numbers. + // function testStartBlockArbitrum() external { + // assertEq( + // findStartBlock("ARBITRUM_RPC_URL", ARBITRUM_NITRO_GENESIS_BLOCK), + // LibMetaBoardDeploy.METABOARD_START_BLOCK_ARBITRUM + // ); + // } + + function testStartBlockBase() external { + vm.skip(vm.envOr("CI", false)); + assertEq(findStartBlock("BASE_RPC_URL", 0), LibMetaBoardDeploy.METABOARD_START_BLOCK_BASE); + } + + function testStartBlockBaseSepolia() external { + vm.skip(vm.envOr("CI", false)); + assertEq(findStartBlock("BASE_SEPOLIA_RPC_URL", 0), LibMetaBoardDeploy.METABOARD_START_BLOCK_BASE_SEPOLIA); + } + + function testStartBlockFlare() external { + vm.skip(vm.envOr("CI", false)); + assertEq(findStartBlock("FLARE_RPC_URL", 0), LibMetaBoardDeploy.METABOARD_START_BLOCK_FLARE); + } + + function testStartBlockPolygon() external { + vm.skip(vm.envOr("CI", false)); + assertEq(findStartBlock("POLYGON_RPC_URL", 0), LibMetaBoardDeploy.METABOARD_START_BLOCK_POLYGON); + } + + function checkIsStartBlock(string memory rpcEnvVar, uint256 startBlock) internal { + vm.createSelectFork(vm.envString(rpcEnvVar)); + assertTrue( + LibRainDeploy.isStartBlock( + vm, + LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS, + LibMetaBoardDeploy.METABOARD_DEPLOYED_CODEHASH, + startBlock + ), + string.concat("not start block: ", rpcEnvVar) + ); + } + + function testIsStartBlockArbitrum() external { + checkIsStartBlock("ARBITRUM_RPC_URL", LibMetaBoardDeploy.METABOARD_START_BLOCK_ARBITRUM); + } + + function testIsStartBlockBase() external { + checkIsStartBlock("BASE_RPC_URL", LibMetaBoardDeploy.METABOARD_START_BLOCK_BASE); + } + + function testIsStartBlockBaseSepolia() external { + checkIsStartBlock("BASE_SEPOLIA_RPC_URL", LibMetaBoardDeploy.METABOARD_START_BLOCK_BASE_SEPOLIA); + } + + function testIsStartBlockFlare() external { + checkIsStartBlock("FLARE_RPC_URL", LibMetaBoardDeploy.METABOARD_START_BLOCK_FLARE); + } + + function testIsStartBlockPolygon() external { + checkIsStartBlock("POLYGON_RPC_URL", LibMetaBoardDeploy.METABOARD_START_BLOCK_POLYGON); + } + + function testSubgraphYamlAddress() external { + string[] memory inputs = new string[](3); + inputs[0] = "yq"; + inputs[1] = ".dataSources[0].source.address"; + inputs[2] = "subgraph/subgraph.yaml"; + bytes memory result = vm.ffi(inputs); + address addr = address(bytes20(result)); + assertEq(addr, LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS, "subgraph.yaml address mismatch"); + } + + function testSubgraphTestAddressTs() external { + string[] memory inputs = new string[](4); + inputs[0] = "grep"; + inputs[1] = "-oP"; + inputs[2] = "0x[0-9a-fA-F]{40}"; + inputs[3] = "subgraph/tests/address.ts"; + bytes memory result = vm.ffi(inputs); + address addr = address(bytes20(result)); + assertEq(addr, LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS, "subgraph/tests/address.ts address mismatch"); + } + + function testNetworksJsonAddresses() external view { + string memory json = vm.readFile("subgraph/networks.json"); + string[] memory networks = vm.parseJsonKeys(json, "$"); + for (uint256 i = 0; i < networks.length; i++) { + string memory path = string.concat(".", networks[i], ".metaboard0.address"); + address addr = vm.parseJsonAddress(json, path); + assertEq( + addr, + LibMetaBoardDeploy.METABOARD_DEPLOYED_ADDRESS, + string.concat("networks.json address mismatch: ", networks[i]) + ); + } + } + + function checkNetworksJsonStartBlock(string memory networkKey, uint256 expectedStartBlock) internal view { + string memory json = vm.readFile("subgraph/networks.json"); + string memory path = string.concat(".", networkKey, ".metaboard0.startBlock"); + uint256 startBlock = vm.parseJsonUint(json, path); + assertEq(startBlock, expectedStartBlock, string.concat("networks.json startBlock mismatch: ", networkKey)); + } + + function testNetworksJsonStartBlockArbitrum() external view { + checkNetworksJsonStartBlock("arbitrum-one", LibMetaBoardDeploy.METABOARD_START_BLOCK_ARBITRUM); + } + + function testNetworksJsonStartBlockBase() external view { + checkNetworksJsonStartBlock("base", LibMetaBoardDeploy.METABOARD_START_BLOCK_BASE); + } + + function testNetworksJsonStartBlockBaseSepolia() external view { + checkNetworksJsonStartBlock("base-sepolia", LibMetaBoardDeploy.METABOARD_START_BLOCK_BASE_SEPOLIA); + } + + function testNetworksJsonStartBlockFlare() external view { + checkNetworksJsonStartBlock("flare", LibMetaBoardDeploy.METABOARD_START_BLOCK_FLARE); + } + + function testNetworksJsonStartBlockPolygon() external view { + checkNetworksJsonStartBlock("matic", LibMetaBoardDeploy.METABOARD_START_BLOCK_POLYGON); + } +} diff --git a/foundry.toml b/foundry.toml index 60fee52d..749f82e2 100644 --- a/foundry.toml +++ b/foundry.toml @@ -26,6 +26,8 @@ remappings = [ "openzeppelin-contracts-upgradeable/contracts/=dependencies/@openzeppelin-contracts-upgradeable-5.6.1/", "openzeppelin-contracts/contracts/=dependencies/@openzeppelin-contracts-5.6.1/", "openzeppelin/=dependencies/@openzeppelin-contracts-upgradeable-5.6.1/", + "@openzeppelin/contracts-upgradeable/=dependencies/@openzeppelin-contracts-upgradeable-5.6.1/", + "@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.6.1/", ] [fuzz] diff --git a/remappings.txt b/remappings.txt index 0ce5121c..e5252b22 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,7 +1,11 @@ -@openzeppelin-contracts-4.9.6/=dependencies/@openzeppelin-contracts-4.9.6/ -@openzeppelin-contracts-upgradeable-4.9.6/=dependencies/@openzeppelin-contracts-upgradeable-4.9.6/ +@openzeppelin-contracts-5.6.1/=dependencies/@openzeppelin-contracts-5.6.1/ +@openzeppelin-contracts-upgradeable-5.6.1/=dependencies/@openzeppelin-contracts-upgradeable-5.6.1/ forge-std-1.16.1/=dependencies/forge-std-1.16.1/ rain-factory-0.1.1/=dependencies/rain-factory-0.1.1/ rain-interpreter-interface-0.1.0/=dependencies/rain-interpreter-interface-0.1.0/ +rain-lib-hash-0.1.0/=dependencies/rain-lib-hash-0.1.0/ +rain-lib-typecast-0.1.0/=dependencies/rain-lib-typecast-0.1.0/ rain-math-fixedpoint-0.2.0/=dependencies/rain-math-fixedpoint-0.2.0/ +rain-math-float-0.1.1/=dependencies/rain-math-float-0.1.1/ +rain-metadata-0.1.0/=dependencies/rain-metadata-0.1.0/ rain-solmem-0.1.3/=dependencies/rain-solmem-0.1.3/ diff --git a/soldeer.lock b/soldeer.lock index 5abce8c3..b930f31d 100644 --- a/soldeer.lock +++ b/soldeer.lock @@ -1,16 +1,16 @@ [[dependencies]] name = "@openzeppelin-contracts" -version = "4.9.6" -url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/4_9_6_14-03-2024_06:11:55_contracts.zip" -checksum = "57f2cae4b45b91b0847e58c36ea70aee0fb3212cc09b47279627f0764f87e5ee" -integrity = "861134d6a3739362ce5ef6541538e23ca1df10ec47151f105057bea0bb710330" +version = "5.6.1" +url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/5_6_1_15-03-2026_09:19:50_contracts.zip" +checksum = "a3b6bc661be858c7c27f60a1708cbebe8c71034b4cc1e9fe270d0a05b069352f" +integrity = "bce03af7ada1eee21a7fff393f238bcd7cd75a022a4db55ffb6b0dbb32433d35" [[dependencies]] name = "@openzeppelin-contracts-upgradeable" -version = "4.9.6" -url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts-upgradeable/4_9_6_14-03-2024_06:12:03_contracts-upgradeable.zip" -checksum = "dddc8efa3da3dcd0dbda63efdc34d6006ece3ae5a8f46b0cf914870df45b9c71" -integrity = "e67f536c763f35149aac483acfa21637c6b6b6c3f8a71860f8e717cf110138cd" +version = "5.6.1" +url = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts-upgradeable/5_6_1_15-03-2026_09:19:56_contracts-upgradeable.zip" +checksum = "f6257dbc993c2499fe08fdc93f66e12459fe3458ee62ce716b92e1d95ee0b504" +integrity = "2f539b6241258fc3c127c97225b3cb1b5e9225e422d2c1cb233c52a6f5c29002" [[dependencies]] name = "forge-std" @@ -33,6 +33,20 @@ url = "https://soldeer-revisions.s3.amazonaws.com/rain-interpreter-interface/0_1 checksum = "887c4d5f1a87713c49f015b3fcdb295defbb495b126d15f9850c0ce72ef79639" integrity = "c1b89f8a7ad02507ceb051b6c0f2750f6abe1ba99ffdfe1c9ac93905db90e75d" +[[dependencies]] +name = "rain-lib-hash" +version = "0.1.0" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-lib-hash/0_1_0_12-05-2026_16:24:56_rain.lib.zip" +checksum = "648f3e38b297dbd3ecb32b82c8b24c322f484e1734eb50fd393bc547c72b59b0" +integrity = "91f5f679a0a27f096fdbc1e41195dd9f42cacfab15735efeb1101cc1b9215b47" + +[[dependencies]] +name = "rain-lib-typecast" +version = "0.1.0" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-lib-typecast/0_1_0_12-05-2026_16:31:39_rain.lib.zip" +checksum = "5c0419501e4c763ef161a3489934af192219f994cb2c9187699bc4dee0b4e2bb" +integrity = "092781f87fd9227c4c95aafde59300c503d6a9a355beaeb5c5732fe6e36676d6" + [[dependencies]] name = "rain-math-fixedpoint" version = "0.2.0" @@ -40,6 +54,20 @@ url = "https://soldeer-revisions.s3.amazonaws.com/rain-math-fixedpoint/0_2_0_09- checksum = "dd24665a7c3bc82878fdbcfe5ea8efe8471ec9c8546615dc94debc38529117d9" integrity = "81a144050f76b662c91f1611ec18f41dce0994208617123cde80aad2fc9b441c" +[[dependencies]] +name = "rain-math-float" +version = "0.1.1" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-math-float/0_1_1_13-05-2026_13:48:34_rain.math.zip" +checksum = "322956f272ae3073ee02b0e7301b8834f08f2de62bcd6c309c44e946d7cd7056" +integrity = "dccdd4406a37db6af690872b805084a7dbe5211c57961a61ef083a7912ddbdc9" + +[[dependencies]] +name = "rain-metadata" +version = "0.1.0" +url = "https://soldeer-revisions.s3.amazonaws.com/rain-metadata/0_1_0_12-05-2026_20:20:51_rain.zip" +checksum = "801d2b97b393d346c19a2f4f454d0279ba8f7d0f81fa3eb4fe8609da7291203d" +integrity = "f17f10aa50e9e2b254c689c83f41b3cabab81c95bad06424b9b3e9c92d02e577" + [[dependencies]] name = "rain-solmem" version = "0.1.3" diff --git a/src/concrete/Flow.sol b/src/concrete/Flow.sol index 3ee6abc5..68075e3f 100644 --- a/src/concrete/Flow.sol +++ b/src/concrete/Flow.sol @@ -23,15 +23,9 @@ import {IInterpreterStoreV3} from "rain.interpreter.interface/interface/IInterpr import { MulticallUpgradeable as Multicall } from "openzeppelin-contracts-upgradeable/contracts/utils/MulticallUpgradeable.sol"; -import { - ERC721HolderUpgradeable as ERC721Holder -} from "openzeppelin-contracts-upgradeable/contracts/token/ERC721/utils/ERC721HolderUpgradeable.sol"; -import { - ERC1155HolderUpgradeable as ERC1155Holder -} from "openzeppelin-contracts-upgradeable/contracts/token/ERC1155/utils/ERC1155HolderUpgradeable.sol"; -import { - ReentrancyGuardUpgradeable as ReentrancyGuard -} from "openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol"; +import {ERC721Holder} from "openzeppelin-contracts/contracts/token/ERC721/utils/ERC721Holder.sol"; +import {ERC1155Holder} from "openzeppelin-contracts/contracts/token/ERC1155/utils/ERC1155Holder.sol"; +import {ReentrancyGuard} from "openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol"; import {LibBytes32Matrix} from "rain.solmem/lib/LibBytes32Matrix.sol"; import {LibNamespace, StateNamespace} from "rain.interpreter.interface/lib/ns/LibNamespace.sol"; import {EmptyFlowConfig} from "../error/ErrFlow.sol"; @@ -169,10 +163,7 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter function flowInit(EvaluableV4[] memory evaluables, uint256 flowMinOutputs) internal onlyInitializing { unchecked { // First dispatch all the Open Zeppelin initializers. - __ERC721Holder_init(); - __ERC1155Holder_init(); __Multicall_init(); - __ReentrancyGuard_init(); // Reject empty configs at init time — an empty config would // produce a permanently inert clone where every `flow()` call diff --git a/src/interface/IFlowV5.sol b/src/interface/IFlowV5.sol index 8921d6a1..874e8c9f 100644 --- a/src/interface/IFlowV5.sol +++ b/src/interface/IFlowV5.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.25; import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; //forge-lint: disable-next-line(unused-import) diff --git a/src/interface/deprecated/v4/IFlowERC1155V4.sol b/src/interface/deprecated/v4/IFlowERC1155V4.sol index 1bdb2807..0909f2b5 100644 --- a/src/interface/deprecated/v4/IFlowERC1155V4.sol +++ b/src/interface/deprecated/v4/IFlowERC1155V4.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.25; import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; //forge-lint: disable-next-line(unused-import) diff --git a/src/interface/deprecated/v4/IFlowV4.sol b/src/interface/deprecated/v4/IFlowV4.sol index e6ec6644..542962ec 100644 --- a/src/interface/deprecated/v4/IFlowV4.sol +++ b/src/interface/deprecated/v4/IFlowV4.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.25; import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; //forge-lint: disable-next-line(unused-import) diff --git a/src/interface/deprecated/v5/IFlowERC1155V5.sol b/src/interface/deprecated/v5/IFlowERC1155V5.sol index 1df0d81d..6f59b6cc 100644 --- a/src/interface/deprecated/v5/IFlowERC1155V5.sol +++ b/src/interface/deprecated/v5/IFlowERC1155V5.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; //forge-lint: disable-next-line(unused-import) diff --git a/src/interface/deprecated/v5/IFlowERC20V5.sol b/src/interface/deprecated/v5/IFlowERC20V5.sol index 53673112..5560dd08 100644 --- a/src/interface/deprecated/v5/IFlowERC20V5.sol +++ b/src/interface/deprecated/v5/IFlowERC20V5.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import { diff --git a/src/interface/deprecated/v5/IFlowERC721V5.sol b/src/interface/deprecated/v5/IFlowERC721V5.sol index 6f4293ab..a8063c34 100644 --- a/src/interface/deprecated/v5/IFlowERC721V5.sol +++ b/src/interface/deprecated/v5/IFlowERC721V5.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.25; import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; import { FlowERC721IOV1, diff --git a/test/abstract/FlowTest.sol b/test/abstract/FlowTest.sol index 392b308c..f1f4f08c 100644 --- a/test/abstract/FlowTest.sol +++ b/test/abstract/FlowTest.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std/Test.sol"; import {FlowTransferOperation} from "test/abstract/FlowTransferOperation.sol"; import {InterpreterMockTest} from "test/abstract/InterpreterMockTest.sol"; -import {EvaluableConfigV3} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {CloneFactory} from "rain.factory/src/concrete/CloneFactory.sol"; import {LibLogHelper} from "test/lib/LibLogHelper.sol"; diff --git a/test/abstract/InterpreterMockTest.sol b/test/abstract/InterpreterMockTest.sol index cbf1c946..3cc05738 100644 --- a/test/abstract/InterpreterMockTest.sol +++ b/test/abstract/InterpreterMockTest.sol @@ -4,13 +4,13 @@ pragma solidity =0.8.25; import {Test} from "forge-std/Test.sol"; import {REVERTING_MOCK_BYTECODE} from "./TestConstants.sol"; -import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/IInterpreterStoreV2.sol"; +import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/deprecated/v2/IInterpreterStoreV2.sol"; import { IInterpreterV2, EncodedDispatch, DEFAULT_STATE_NAMESPACE -} from "rain.interpreter.interface/interface/IInterpreterV2.sol"; -import {IExpressionDeployerV3} from "rain.interpreter.interface/interface/IExpressionDeployerV3.sol"; +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; +import {IExpressionDeployerV3} from "rain.interpreter.interface/interface/deprecated/v1/IExpressionDeployerV3.sol"; import {LibNamespace, StateNamespace} from "rain.interpreter.interface/lib/ns/LibNamespace.sol"; abstract contract InterpreterMockTest is Test { diff --git a/test/lib/LibContextWrapper.sol b/test/lib/LibContextWrapper.sol index e1d01854..78884bc5 100644 --- a/test/lib/LibContextWrapper.sol +++ b/test/lib/LibContextWrapper.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.25; import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibContext} from "rain.interpreter.interface/lib/caller/LibContext.sol"; /** diff --git a/test/lib/SignContextLib.sol b/test/lib/SignContextLib.sol index 4ba77078..d4d2d172 100644 --- a/test/lib/SignContextLib.sol +++ b/test/lib/SignContextLib.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std/Test.sol"; -import {ECDSAUpgradeable as ECDSA} from "openzeppelin/utils/cryptography/ECDSAUpgradeable.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {ECDSA} from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; library SignContextLib { function signContext(Vm vm, uint256 signerPrivateKey, uint256 signaturePrivateKey, uint256[] memory context) diff --git a/test/src/concrete/Flow.construction.t.sol b/test/src/concrete/Flow.construction.t.sol index e210f957..b051074b 100644 --- a/test/src/concrete/Flow.construction.t.sol +++ b/test/src/concrete/Flow.construction.t.sol @@ -4,7 +4,7 @@ pragma solidity =0.8.25; import {Vm} from "forge-std/Test.sol"; -import {EvaluableConfigV3} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {FlowTest} from "test/abstract/FlowTest.sol"; import {EmptyFlowConfig, InsufficientFlowOutputs, UnsupportedFlowInputs} from "../../../src/error/ErrFlow.sol"; import {MIN_FLOW_SENTINELS} from "../../../src/interface/IFlowV5.sol"; diff --git a/test/src/concrete/Flow.context.t.sol b/test/src/concrete/Flow.context.t.sol index 5f164223..b6d9c89a 100644 --- a/test/src/concrete/Flow.context.t.sol +++ b/test/src/concrete/Flow.context.t.sol @@ -8,7 +8,7 @@ import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {FLOW_MAX_OUTPUTS, FLOW_ENTRYPOINT} from "../../../src/concrete/Flow.sol"; import {LibEncodedDispatch} from "rain.interpreter.interface/lib/caller/LibEncodedDispatch.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibContextWrapper} from "test/lib/LibContextWrapper.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; diff --git a/test/src/concrete/Flow.expression.t.sol b/test/src/concrete/Flow.expression.t.sol index 904ab4e5..047e6e23 100644 --- a/test/src/concrete/Flow.expression.t.sol +++ b/test/src/concrete/Flow.expression.t.sol @@ -7,10 +7,10 @@ import {Vm} from "forge-std/Test.sol"; import {FlowTest} from "test/abstract/FlowTest.sol"; import {IFlowV5} from "../../../src/interface/IFlowV5.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol"; import {LibContextWrapper} from "test/lib/LibContextWrapper.sol"; -import {IInterpreterCallerV2} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {IInterpreterCallerV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {SignContextLib} from "test/lib/SignContextLib.sol"; import {LibLogHelper} from "test/lib/LibLogHelper.sol"; diff --git a/test/src/concrete/Flow.multicall.t.sol b/test/src/concrete/Flow.multicall.t.sol index 18079402..5250afdf 100644 --- a/test/src/concrete/Flow.multicall.t.sol +++ b/test/src/concrete/Flow.multicall.t.sol @@ -6,7 +6,7 @@ import {FlowTest} from "test/abstract/FlowTest.sol"; import {IFlowV5} from "../../../src/interface/IFlowV5.sol"; import {FLOW_MAX_OUTPUTS, FLOW_ENTRYPOINT} from "../../../src/concrete/Flow.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibEncodedDispatch} from "rain.interpreter.interface/lib/caller/LibEncodedDispatch.sol"; import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol"; import {Multicall} from "openzeppelin-contracts/contracts/utils/Multicall.sol"; diff --git a/test/src/concrete/Flow.signedContext.t.sol b/test/src/concrete/Flow.signedContext.t.sol index a632c3b1..39ca7b96 100644 --- a/test/src/concrete/Flow.signedContext.t.sol +++ b/test/src/concrete/Flow.signedContext.t.sol @@ -7,7 +7,7 @@ import {FlowTest} from "test/abstract/FlowTest.sol"; import {SignContextLib} from "test/lib/SignContextLib.sol"; import {IFlowV5, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV5.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; -import {EvaluableV2, SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {EvaluableV2, SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {InvalidSignature} from "rain.interpreter.interface/lib/caller/LibContext.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; diff --git a/test/src/concrete/Flow.time.t.sol b/test/src/concrete/Flow.time.t.sol index c2cfe097..33f45d26 100644 --- a/test/src/concrete/Flow.time.t.sol +++ b/test/src/concrete/Flow.time.t.sol @@ -5,9 +5,9 @@ pragma solidity =0.8.25; import {FlowTest} from "test/abstract/FlowTest.sol"; import {IFlowV5, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV5.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; -import {EvaluableV2, SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; -import {DEFAULT_STATE_NAMESPACE} from "rain.interpreter.interface/interface/IInterpreterV2.sol"; -import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/IInterpreterStoreV2.sol"; +import {EvaluableV2, SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import {DEFAULT_STATE_NAMESPACE} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; +import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/deprecated/v2/IInterpreterStoreV2.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; contract FlowTimeTest is FlowTest { diff --git a/test/src/concrete/Flow.transfer.t.sol b/test/src/concrete/Flow.transfer.t.sol index f3686fcc..c2dd9a1c 100644 --- a/test/src/concrete/Flow.transfer.t.sol +++ b/test/src/concrete/Flow.transfer.t.sol @@ -14,7 +14,7 @@ import { } from "../../../src/interface/IFlowV5.sol"; import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; -import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV2.sol"; +import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibEvaluable} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import { UnsupportedERC20Flow, From e194ae5c3bb390d3fa48acc40813862397f2bb57 Mon Sep 17 00:00:00 2001 From: David Meister Date: Sun, 7 Jun 2026 10:35:32 +0000 Subject: [PATCH 5/5] =?UTF-8?q?wip(flow#474):=20test=20suite=20migrated=20?= =?UTF-8?q?to=20V4=20+=20OZ5=20=E2=80=94=20full=20build=20+=20tests=20gree?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrote the test harness to V4: InterpreterMockTest mocks eval4 (no deployer/ EncodedDispatch); FlowTest builds EvaluableV4{interpreter,store,bytecode} directly with the evaluable bytecode derived from the expression so distinct flows hash distinctly. Migrated all concrete tests: drop LibEncodedDispatch dispatch args, uint256[]->StackItem[]/bytes32[] casts at flow()/stackToFlow() call sites, store mocks IInterpreterStoreV2->V3, Context->ContextV2 event, OZ5 MessageHashUtils + code.length (no Address.isContract). Multicall uses a sequential eval4 mock. Dropped the obsolete deploy-time integrity-check construction tests (V4 validates at eval time per RaindexV6). forge fmt applied. All suites pass locally. Refs #474 --- src/concrete/Flow.sol | 29 ++--- src/interface/IFlowV5.sol | 5 +- src/interface/IFlowV6.sol | 10 ++ .../deprecated/v4/IFlowERC1155V4.sol | 5 +- src/interface/deprecated/v4/IFlowERC20V4.sol | 5 +- src/interface/deprecated/v4/IFlowERC721V4.sol | 5 +- src/interface/deprecated/v4/IFlowV4.sol | 5 +- .../deprecated/v5/IFlowERC1155V5.sol | 5 +- src/interface/deprecated/v5/IFlowERC20V5.sol | 5 +- src/interface/deprecated/v5/IFlowERC721V5.sol | 5 +- test/abstract/FlowTest.sol | 82 +++++++------- test/abstract/FlowTransferOperation.sol | 2 +- test/abstract/FlowUtilsAbstractTest.sol | 2 +- test/abstract/InterpreterMockTest.sol | 103 ++++-------------- test/interface/IFlowV5.t.sol | 2 +- test/lib/LibContextWrapper.sol | 16 ++- test/lib/LibStackGeneration.sol | 2 +- test/lib/SignContextLib.sol | 10 +- test/src/concrete/Flow.construction.t.sol | 89 +++------------ test/src/concrete/Flow.context.t.sol | 15 +-- test/src/concrete/Flow.expression.t.sol | 16 +-- test/src/concrete/Flow.multicall.t.sol | 63 +++++------ test/src/concrete/Flow.preview.t.sol | 58 +++++----- test/src/concrete/Flow.signedContext.t.sol | 16 +-- test/src/concrete/Flow.time.t.sol | 28 ++--- test/src/concrete/Flow.transfer.t.sol | 97 ++++++++--------- 26 files changed, 300 insertions(+), 380 deletions(-) diff --git a/src/concrete/Flow.sol b/src/concrete/Flow.sol index 68075e3f..c1180a55 100644 --- a/src/concrete/Flow.sol +++ b/src/concrete/Flow.sol @@ -130,7 +130,7 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter return ICLONEABLE_V2_SUCCESS; } - /// @inheritdoc IFlowV5 + /// @inheritdoc IFlowV6 function stackToFlow(StackItem[] memory stack) external pure virtual override returns (FlowTransferV1 memory) { uint256[] memory stackU; assembly ("memory-safe") { @@ -139,7 +139,7 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter return LibFlow.stackToFlow(stackU.dataPointer(), stackU.endPointer()); } - /// @inheritdoc IFlowV5 + /// @inheritdoc IFlowV6 function flow(EvaluableV4 memory evaluable, bytes32[] memory callerContext, SignedContextV1[] memory signedContexts) external virtual @@ -155,7 +155,7 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter /// Common initialization logic for inheriting contracts. This MUST be /// called by inheriting contracts in their initialization logic (and only). - /// @param evaluableConfigs The evaluable configs to register at + /// @param evaluables The evaluable configs to register at /// initialization. Each of these represents a flow that defines valid token /// movements at runtime for the inheriting contract. /// @param flowMinOutputs The minimum number of outputs for each flow. All @@ -233,17 +233,18 @@ contract Flow is ERC721Holder, ERC1155Holder, Multicall, ReentrancyGuard, IInter } } - (StackItem[] memory stack, bytes32[] memory kvs) = evaluable.interpreter.eval4( - EvalV4({ - store: evaluable.store, - namespace: DEFAULT_STATE_NAMESPACE.qualifyNamespace(address(this)), - bytecode: evaluable.bytecode, - sourceIndex: FLOW_ENTRYPOINT, - context: context, - inputs: new StackItem[](0), - stateOverlay: new bytes32[](0) - }) - ); + (StackItem[] memory stack, bytes32[] memory kvs) = evaluable.interpreter + .eval4( + EvalV4({ + store: evaluable.store, + namespace: DEFAULT_STATE_NAMESPACE.qualifyNamespace(address(this)), + bytecode: evaluable.bytecode, + sourceIndex: FLOW_ENTRYPOINT, + context: context, + inputs: new StackItem[](0), + stateOverlay: new bytes32[](0) + }) + ); uint256[] memory stackU; assembly ("memory-safe") { stackU := stack diff --git a/src/interface/IFlowV5.sol b/src/interface/IFlowV5.sol index 874e8c9f..3ac21ec3 100644 --- a/src/interface/IFlowV5.sol +++ b/src/interface/IFlowV5.sol @@ -2,7 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import { + SignedContextV1, + EvaluableConfigV3 +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; diff --git a/src/interface/IFlowV6.sol b/src/interface/IFlowV6.sol index 1f8ae68d..e066f239 100644 --- a/src/interface/IFlowV6.sol +++ b/src/interface/IFlowV6.sol @@ -10,14 +10,19 @@ import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import {Pointer} from "rain.solmem/lib/LibPointer.sol"; import { FlowTransferV1, + //forge-lint: disable-next-line(unused-import) ERC20Transfer, + //forge-lint: disable-next-line(unused-import) ERC721Transfer, + //forge-lint: disable-next-line(unused-import) ERC1155Transfer, + //forge-lint: disable-next-line(unused-import) RAIN_FLOW_SENTINEL, + //forge-lint: disable-next-line(unused-import) MIN_FLOW_SENTINELS } from "./deprecated/v4/IFlowV4.sol"; @@ -28,6 +33,11 @@ import {UnregisteredFlow} from "../error/ErrFlow.sol"; /// @notice V4-interpreter flow: evaluables carry bytecode directly (no expression /// deployment), context + stack are bytes32-based. interface IFlowV6 { + /// Emitted when a flow contract is initialized with its evaluables. + /// @param sender The `msg.sender` that initialized the flow. + /// @param config The evaluables registered at initialization. + event Initialize(address sender, EvaluableV4[] config); + function stackToFlow(StackItem[] memory stack) external pure returns (FlowTransferV1 memory flowTransfer); function flow( EvaluableV4 calldata evaluable, diff --git a/src/interface/deprecated/v4/IFlowERC1155V4.sol b/src/interface/deprecated/v4/IFlowERC1155V4.sol index 0909f2b5..02281ef0 100644 --- a/src/interface/deprecated/v4/IFlowERC1155V4.sol +++ b/src/interface/deprecated/v4/IFlowERC1155V4.sol @@ -2,7 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import { + EvaluableConfigV2, + Evaluable +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; diff --git a/src/interface/deprecated/v4/IFlowERC20V4.sol b/src/interface/deprecated/v4/IFlowERC20V4.sol index ceae44df..c18b6bac 100644 --- a/src/interface/deprecated/v4/IFlowERC20V4.sol +++ b/src/interface/deprecated/v4/IFlowERC20V4.sol @@ -2,7 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {Evaluable, EvaluableConfigV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import { + Evaluable, + EvaluableConfigV2 +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; diff --git a/src/interface/deprecated/v4/IFlowERC721V4.sol b/src/interface/deprecated/v4/IFlowERC721V4.sol index 4a2b18ac..dabc4170 100644 --- a/src/interface/deprecated/v4/IFlowERC721V4.sol +++ b/src/interface/deprecated/v4/IFlowERC721V4.sol @@ -2,7 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {Evaluable, EvaluableConfigV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import { + Evaluable, + EvaluableConfigV2 +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import { diff --git a/src/interface/deprecated/v4/IFlowV4.sol b/src/interface/deprecated/v4/IFlowV4.sol index 542962ec..18b02008 100644 --- a/src/interface/deprecated/v4/IFlowV4.sol +++ b/src/interface/deprecated/v4/IFlowV4.sol @@ -2,7 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {EvaluableConfigV2, Evaluable} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; +import { + EvaluableConfigV2, + Evaluable +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV1.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; diff --git a/src/interface/deprecated/v5/IFlowERC1155V5.sol b/src/interface/deprecated/v5/IFlowERC1155V5.sol index 6f59b6cc..20935dc8 100644 --- a/src/interface/deprecated/v5/IFlowERC1155V5.sol +++ b/src/interface/deprecated/v5/IFlowERC1155V5.sol @@ -3,7 +3,10 @@ pragma solidity ^0.8.25; import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import { + SignedContextV1, + EvaluableConfigV3 +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; diff --git a/src/interface/deprecated/v5/IFlowERC20V5.sol b/src/interface/deprecated/v5/IFlowERC20V5.sol index 5560dd08..721c86c7 100644 --- a/src/interface/deprecated/v5/IFlowERC20V5.sol +++ b/src/interface/deprecated/v5/IFlowERC20V5.sol @@ -3,7 +3,10 @@ pragma solidity ^0.8.25; import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import { + SignedContextV1, + EvaluableConfigV3 +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; //forge-lint: disable-next-line(unused-import) import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; diff --git a/src/interface/deprecated/v5/IFlowERC721V5.sol b/src/interface/deprecated/v5/IFlowERC721V5.sol index a8063c34..c2ec0622 100644 --- a/src/interface/deprecated/v5/IFlowERC721V5.sol +++ b/src/interface/deprecated/v5/IFlowERC721V5.sol @@ -2,7 +2,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {SignedContextV1, EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import { + SignedContextV1, + EvaluableConfigV3 +} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {EvaluableV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {SourceIndexV2} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; import { diff --git a/test/abstract/FlowTest.sol b/test/abstract/FlowTest.sol index f1f4f08c..b83955d6 100644 --- a/test/abstract/FlowTest.sol +++ b/test/abstract/FlowTest.sol @@ -5,21 +5,19 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std/Test.sol"; import {FlowTransferOperation} from "test/abstract/FlowTransferOperation.sol"; import {InterpreterMockTest} from "test/abstract/InterpreterMockTest.sol"; -import {EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV4} from "rain.interpreter.interface/interface/IInterpreterCallerV4.sol"; import {CloneFactory} from "rain.factory/src/concrete/CloneFactory.sol"; import {LibLogHelper} from "test/lib/LibLogHelper.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; -import {Address} from "openzeppelin-contracts/contracts/utils/Address.sol"; -import {FlowTransferV1, IFlowV5, RAIN_FLOW_SENTINEL, Sentinel} from "../../src/interface/IFlowV5.sol"; +import {FlowTransferV1, IFlowV6, RAIN_FLOW_SENTINEL, Sentinel} from "../../src/interface/IFlowV6.sol"; import {Flow} from "../../src/concrete/Flow.sol"; +import {StackItem} from "rain.interpreter.interface/interface/IInterpreterV4.sol"; import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol"; import {LibUint256Array} from "rain.solmem/lib/LibUint256Array.sol"; abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { using LibLogHelper for Vm.Log[]; using LibStackGeneration for uint256; - using Address for address; using LibUint256Matrix for uint256[]; using LibUint256Array for uint256[]; @@ -31,19 +29,40 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { vm.resumeGasMetering(); } - function expressionDeployer(address expression, uint256[] memory constants, bytes memory bytecode) + /// Reinterpret a `uint256[]` as `bytes32[]` (identical 32-byte layout) for + /// passing as V4 caller context. + function asBytes32(uint256[] memory a) internal pure returns (bytes32[] memory b) { + assembly ("memory-safe") { + b := a + } + } + + /// Reinterpret a `uint256[]` stack as `StackItem[]` for V4 `stackToFlow`. + function asStackItems(uint256[] memory a) internal pure returns (StackItem[] memory b) { + assembly ("memory-safe") { + b := a + } + } + + /// Build a mock V4 evaluable. There is no expression deployment in V4 — the + /// evaluable carries bytecode directly. The `expression`/`constants` params + /// are retained for call-site compatibility but unused (constants are + /// embedded in bytecode); `bytecode` is unique per flow so registered hashes + /// differ. + function expressionDeployer(address, uint256[] memory, bytes memory bytecode) internal - returns (EvaluableConfigV3 memory) + view + returns (EvaluableV4 memory) { - expressionDeployerDeployExpression2MockCall(bytecode, constants, expression, bytes(hex"00060001")); - return EvaluableConfigV3(DEPLOYER, bytecode, constants); + return EvaluableV4(INTERPRETER, STORE, bytecode); } function expressionDeployer(uint256 key, address expression, uint256[] memory constants) internal - returns (EvaluableConfigV3 memory) + view + returns (EvaluableV4 memory) { - return expressionDeployer(expression, constants, abi.encodePacked(vm.addr(key))); + return expressionDeployer(expression, constants, abi.encodePacked(expression)); } function deployFlow( @@ -53,11 +72,11 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { address[] memory expressions, address configExpression, uint256[][] memory constants - ) internal returns (address flow, EvaluableV2[] memory evaluables) { + ) internal returns (address flow, EvaluableV4[] memory evaluables) { require(expressions.length == constants.length, "Expressions and constants array lengths must match"); { - EvaluableConfigV3[] memory flowConfig = new EvaluableConfigV3[](expressions.length); + EvaluableV4[] memory flowConfig = new EvaluableV4[](expressions.length); for (uint256 i = 0; i < expressions.length; i++) { flowConfig[i] = expressionDeployer(i + 1, expressions[i], constants[i]); @@ -71,32 +90,16 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { { Vm.Log[] memory logs = vm.getRecordedLogs(); - logs = logs.findEvents(keccak256("FlowInitialized(address,(address,address,address))")); - evaluables = new EvaluableV2[](logs.length); + logs = logs.findEvents(keccak256("FlowInitialized(address,(address,address,bytes))")); + evaluables = new EvaluableV4[](logs.length); for (uint256 i = 0; i < logs.length; i++) { - (, EvaluableV2 memory evaluable) = abi.decode(logs[i].data, (address, EvaluableV2)); + (, EvaluableV4 memory evaluable) = abi.decode(logs[i].data, (address, EvaluableV4)); evaluables[i] = evaluable; } } } function createMockBytecode() internal pure virtual returns (bytes memory) { - /* - Bytecode structure: - - First byte: 0x03 (sourceCount = 3) - - Next 2 bytes: 0x0002 (offset for sourceIndex = 0) - - Next 2 bytes: 0x0005 (offset for sourceIndex = 1) - - Next 2 bytes: 0x0008 (offset for sourceIndex = 2) - - Data for sourceIndex = 0: - - opsCount: 0x0A - - opcode: 0xAA - - Data for sourceIndex = 1: - - opsCount: 0x0B - - opcode: 0xBB - - Data for sourceIndex = 2: - - opsCount: 0x0C - - opcode: 0xCC - */ return hex"030002000500080AAA0BBB0CCC"; } @@ -106,7 +109,6 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { function assumeEtchable(address account, address expression) internal view { assumeNotPrecompile(account); - vm.assume(account != address(DEPLOYER)); vm.assume(account != address(INTERPRETER)); vm.assume(account != address(STORE)); vm.assume(account != address(I_CLONE_FACTORY)); @@ -114,7 +116,7 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { vm.assume(account != address(vm)); vm.assume(Sentinel.unwrap(RAIN_FLOW_SENTINEL) != uint256(uint160(account))); vm.assume(account != address(expression)); - vm.assume(!account.isContract()); + vm.assume(account.code.length == 0); // The console. vm.assume(account != address(0x000000000000000000636F6e736F6c652e6c6f67)); } @@ -139,7 +141,7 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { return (stack, transferHash); } - function buildConfig(string memory, string memory, string memory, address, EvaluableConfigV3[] memory flowConfig) + function buildConfig(string memory, string memory, string memory, address, EvaluableV4[] memory flowConfig) internal pure returns (bytes memory) @@ -151,19 +153,19 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { return address(new Flow()); } - function deployFlow() internal returns (IFlowV5, EvaluableV2 memory) { + function deployFlow() internal returns (IFlowV6, EvaluableV4 memory) { address[] memory expressions = new address[](1); expressions[0] = address(uint160(uint256(keccak256("expression")))); - (IFlowV5 flow, EvaluableV2[] memory evaluables) = + (IFlowV6 flow, EvaluableV4[] memory evaluables) = deployFlow({expressions: expressions, constants: new uint256[](0).matrixFrom()}); return (flow, evaluables[0]); } function deployFlow(address[] memory expressions, uint256[][] memory constants) internal - returns (IFlowV5, EvaluableV2[] memory) + returns (IFlowV6, EvaluableV4[] memory) { - (address flow, EvaluableV2[] memory evaluables) = deployFlow({ + (address flow, EvaluableV4[] memory evaluables) = deployFlow({ name: "", symbol: "", baseURI: "", @@ -171,7 +173,7 @@ abstract contract FlowTest is FlowTransferOperation, InterpreterMockTest { configExpression: address(uint160(uint256(keccak256("configExpression")))), constants: constants }); - return (IFlowV5(flow), evaluables); + return (IFlowV6(flow), evaluables); } function mintAndBurnFlowStack(address, uint256, uint256, uint256, FlowTransferV1 memory transfer) diff --git a/test/abstract/FlowTransferOperation.sol b/test/abstract/FlowTransferOperation.sol index cd8edad5..3b43268f 100644 --- a/test/abstract/FlowTransferOperation.sol +++ b/test/abstract/FlowTransferOperation.sol @@ -9,7 +9,7 @@ import { ERC721Transfer, ERC1155Transfer, RAIN_FLOW_SENTINEL -} from "../../src/interface/IFlowV5.sol"; +} from "../../src/interface/IFlowV6.sol"; import {REVERTING_MOCK_BYTECODE} from "./TestConstants.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/test/abstract/FlowUtilsAbstractTest.sol b/test/abstract/FlowUtilsAbstractTest.sol index 3cb8b7a3..1abd1fc1 100644 --- a/test/abstract/FlowUtilsAbstractTest.sol +++ b/test/abstract/FlowUtilsAbstractTest.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std/Test.sol"; -import {FlowTransferV1, RAIN_FLOW_SENTINEL} from "../../src/interface/IFlowV5.sol"; +import {FlowTransferV1, RAIN_FLOW_SENTINEL} from "../../src/interface/IFlowV6.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; import {LibLogHelper} from "test/lib/LibLogHelper.sol"; diff --git a/test/abstract/InterpreterMockTest.sol b/test/abstract/InterpreterMockTest.sol index 3cc05738..80a03c55 100644 --- a/test/abstract/InterpreterMockTest.sol +++ b/test/abstract/InterpreterMockTest.sol @@ -4,106 +4,51 @@ pragma solidity =0.8.25; import {Test} from "forge-std/Test.sol"; import {REVERTING_MOCK_BYTECODE} from "./TestConstants.sol"; -import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/deprecated/v2/IInterpreterStoreV2.sol"; +import {IInterpreterStoreV3} from "rain.interpreter.interface/interface/IInterpreterStoreV3.sol"; import { - IInterpreterV2, - EncodedDispatch, + IInterpreterV4, + StackItem, DEFAULT_STATE_NAMESPACE -} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; -import {IExpressionDeployerV3} from "rain.interpreter.interface/interface/deprecated/v1/IExpressionDeployerV3.sol"; +} from "rain.interpreter.interface/interface/IInterpreterV4.sol"; import {LibNamespace, StateNamespace} from "rain.interpreter.interface/lib/ns/LibNamespace.sol"; abstract contract InterpreterMockTest is Test { using LibNamespace for StateNamespace; - IInterpreterV2 constant INTERPRETER = IInterpreterV2(address(uint160(uint256(keccak256("interpreter.rain.test"))))); - IInterpreterStoreV2 constant STORE = IInterpreterStoreV2(address(uint160(uint256(keccak256("store.rain.test"))))); - IExpressionDeployerV3 constant DEPLOYER = - IExpressionDeployerV3(address(uint160(uint256(keccak256("deployer.rain.test"))))); + IInterpreterV4 constant INTERPRETER = IInterpreterV4(address(uint160(uint256(keccak256("interpreter.rain.test"))))); + IInterpreterStoreV3 constant STORE = IInterpreterStoreV3(address(uint160(uint256(keccak256("store.rain.test"))))); constructor() { vm.pauseGasMetering(); vm.etch(address(INTERPRETER), REVERTING_MOCK_BYTECODE); vm.etch(address(STORE), REVERTING_MOCK_BYTECODE); - vm.etch(address(DEPLOYER), REVERTING_MOCK_BYTECODE); vm.resumeGasMetering(); } + /// Mock `eval4` to return the given stack/writes. Provided as `uint256[]` + /// for convenience and reinterpreted as `StackItem[]` / `bytes32[]` + /// (identical 32-byte memory layout). function interpreterEval2MockCall(uint256[] memory stack, uint256[] memory writes) internal { - vm.mockCall( - address(INTERPRETER), abi.encodeWithSelector(IInterpreterV2.eval2.selector), abi.encode(stack, writes) - ); - } - - function interpreterEval2MockCall( - address nameSpaceSender, - EncodedDispatch dispatch, - uint256[] memory stack, - uint256[] memory writes - ) internal { - vm.mockCall( - address(INTERPRETER), - abi.encodeWithSelector( - IInterpreterV2.eval2.selector, - STORE, - DEFAULT_STATE_NAMESPACE.qualifyNamespace(nameSpaceSender), - dispatch - ), - abi.encode(stack, writes) - ); + StackItem[] memory s; + bytes32[] memory w; + assembly ("memory-safe") { + s := stack + w := writes + } + vm.mockCall(address(INTERPRETER), abi.encodeWithSelector(IInterpreterV4.eval4.selector), abi.encode(s, w)); } - function interpreterEval2ExpectCall(address nameSpaceSender, EncodedDispatch dispatch, uint256[][] memory context) - internal - { - vm.expectCall( - address(INTERPRETER), - abi.encodeWithSelector( - IInterpreterV2.eval2.selector, - STORE, - DEFAULT_STATE_NAMESPACE.qualifyNamespace(nameSpaceSender), - dispatch, - context, - new uint256[](0) - ) - ); + /// Expect that `eval4` is called on the interpreter. V4 has no encoded + /// dispatch; the bytecode + source index live inside the `EvalV4` calldata, + /// so callers match on the selector. + function interpreterEval2ExpectCall(address, uint256[][] memory) internal { + vm.expectCall(address(INTERPRETER), abi.encodeWithSelector(IInterpreterV4.eval4.selector)); } - function interpreterEval2RevertCall(address nameSpaceSender, EncodedDispatch dispatch, uint256[][] memory context) - internal - { + /// Mock `eval4` to revert. + function interpreterEval2RevertCall(address, uint256[][] memory) internal { vm.mockCallRevert( - address(INTERPRETER), - abi.encodeWithSelector( - IInterpreterV2.eval2.selector, - STORE, - DEFAULT_STATE_NAMESPACE.qualifyNamespace(nameSpaceSender), - dispatch, - context, - new uint256[](0) - ), - "REVERT_EVAL2_CALL" - ); - } - - function expressionDeployerDeployExpression2MockCall(address expression, bytes memory io) internal { - vm.mockCall( - address(DEPLOYER), - abi.encodeWithSelector(IExpressionDeployerV3.deployExpression2.selector), - abi.encode(INTERPRETER, STORE, expression, io) - ); - } - - function expressionDeployerDeployExpression2MockCall( - bytes memory bytecode, - uint256[] memory constants, - address expression, - bytes memory io - ) internal { - vm.mockCall( - address(DEPLOYER), - abi.encodeWithSelector(IExpressionDeployerV3.deployExpression2.selector, bytecode, constants), - abi.encode(INTERPRETER, STORE, expression, io) + address(INTERPRETER), abi.encodeWithSelector(IInterpreterV4.eval4.selector), "REVERT_EVAL4_CALL" ); } } diff --git a/test/interface/IFlowV5.t.sol b/test/interface/IFlowV5.t.sol index cce81911..c84da380 100644 --- a/test/interface/IFlowV5.t.sol +++ b/test/interface/IFlowV5.t.sol @@ -7,7 +7,7 @@ import {Test} from "forge-std/Test.sol"; import {RAIN_FLOW_SENTINEL} from "../../src/interface/deprecated/v4/IFlowV4.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; -contract IFlowV5Test is Test { +contract IFlowV6Test is Test { function testSentinelValue() external { assertEq( 0xfea74d0c9bf4a3c28f0dd0674db22a3d7f8bf259c56af19f4ac1e735b156974f, Sentinel.unwrap(RAIN_FLOW_SENTINEL) diff --git a/test/lib/LibContextWrapper.sol b/test/lib/LibContextWrapper.sol index 78884bc5..653ab179 100644 --- a/test/lib/LibContextWrapper.sol +++ b/test/lib/LibContextWrapper.sol @@ -21,10 +21,18 @@ library LibContextWrapper { address caller, address flowAddress ) internal view returns (uint256[][] memory) { - uint256[][] memory buildContextInput = LibContext.build(context, signedContext); - buildContextInput[0][0] = uint256(uint160(caller)); - buildContextInput[0][1] = uint256(uint160(flowAddress)); - return buildContextInput; + bytes32[][] memory ctx; + assembly ("memory-safe") { + ctx := context + } + bytes32[][] memory built = LibContext.build(ctx, signedContext); + built[0][0] = bytes32(uint256(uint160(caller))); + built[0][1] = bytes32(uint256(uint160(flowAddress))); + uint256[][] memory out; + assembly ("memory-safe") { + out := built + } + return out; } function buildAndSetContext( diff --git a/test/lib/LibStackGeneration.sol b/test/lib/LibStackGeneration.sol index 3ae45343..26bac723 100644 --- a/test/lib/LibStackGeneration.sol +++ b/test/lib/LibStackGeneration.sol @@ -2,7 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd pragma solidity ^0.8.25; -import {FlowTransferV1} from "../../src/interface/IFlowV5.sol"; +import {FlowTransferV1} from "../../src/interface/IFlowV6.sol"; library LibStackGeneration { function generateFlowStack(uint256 sentinel, FlowTransferV1 memory flowTransfer) diff --git a/test/lib/SignContextLib.sol b/test/lib/SignContextLib.sol index d4d2d172..b4a0ddc6 100644 --- a/test/lib/SignContextLib.sol +++ b/test/lib/SignContextLib.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.25; import {Vm} from "forge-std/Test.sol"; -import {ECDSA} from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import {MessageHashUtils} from "openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; library SignContextLib { @@ -17,11 +17,15 @@ library SignContextLib { // Store the signer's address in the struct signedContext.signer = vm.addr(signerPrivateKey); - signedContext.context = context; // copy the context data into the struct + bytes32[] memory ctx; + assembly ("memory-safe") { + ctx := context + } + signedContext.context = ctx; // copy the context data into the struct // Create a digest of the context data bytes32 contextHash = keccak256(abi.encodePacked(context)); - bytes32 digest = ECDSA.toEthSignedMessageHash(contextHash); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(contextHash); // Create the signature using the cheatCode 'sign' (uint8 v, bytes32 r, bytes32 s) = vm.sign(signaturePrivateKey, digest); diff --git a/test/src/concrete/Flow.construction.t.sol b/test/src/concrete/Flow.construction.t.sol index b051074b..460aba78 100644 --- a/test/src/concrete/Flow.construction.t.sol +++ b/test/src/concrete/Flow.construction.t.sol @@ -4,100 +4,37 @@ pragma solidity =0.8.25; import {Vm} from "forge-std/Test.sol"; -import {EvaluableConfigV3} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import {EvaluableV4} from "rain.interpreter.interface/interface/IInterpreterCallerV4.sol"; import {FlowTest} from "test/abstract/FlowTest.sol"; -import {EmptyFlowConfig, InsufficientFlowOutputs, UnsupportedFlowInputs} from "../../../src/error/ErrFlow.sol"; -import {MIN_FLOW_SENTINELS} from "../../../src/interface/IFlowV5.sol"; +import {EmptyFlowConfig} from "../../../src/error/ErrFlow.sol"; import {LibLogHelper} from "test/lib/LibLogHelper.sol"; contract FlowConstructionTest is FlowTest { function testFlowConstructionEmptyConfigReverts() external { - EvaluableConfigV3[] memory emptyConfig = new EvaluableConfigV3[](0); + EvaluableV4[] memory emptyConfig = new EvaluableV4[](0); address impl = deployFlowImplementation(); vm.expectRevert(EmptyFlowConfig.selector); I_CLONE_FACTORY.clone(impl, abi.encode(emptyConfig)); } - /// Reverts with `InsufficientFlowOutputs` when the deployer reports a - /// `flowOutputs` byte below `MIN_FLOW_SENTINELS` (= 3). Pinning this - /// protects the lower-bound guard at `Flow.flowInit` against regression. - /// forge-config: default.fuzz.runs = 100 - function testFlowConstructionRevertsOnInsufficientFlowOutputs( - address expression, - bytes memory bytecode, - uint256[] memory constants, - uint8 flowOutputs - ) external { - vm.assume(flowOutputs < uint8(MIN_FLOW_SENTINELS)); - bytes memory io = abi.encodePacked(uint8(0), flowOutputs); - expressionDeployerDeployExpression2MockCall(expression, io); + // Note: under the V4 interpreter there is no deploy-time integrity check — + // evaluables carry bytecode directly with no `deployExpression2`/`io`, so the + // former `InsufficientFlowOutputs`/`UnsupportedFlowInputs` construction-time + // guards (and their tests) no longer apply. Flow validity is enforced at eval + // time via sentinel consumption against `MIN_FLOW_SENTINELS`. - EvaluableConfigV3[] memory flowConfig = new EvaluableConfigV3[](1); - flowConfig[0] = EvaluableConfigV3(DEPLOYER, bytecode, constants); - - address impl = deployFlowImplementation(); - vm.expectRevert(InsufficientFlowOutputs.selector); - I_CLONE_FACTORY.clone(impl, abi.encode(flowConfig)); - } - - /// `flowOutputs == MIN_FLOW_SENTINELS` is the lowest accepted value. - /// Pinning this boundary against regression complements the negative - /// test above. - function testFlowConstructionAcceptsFlowOutputsAtMin( - address expression, - bytes memory bytecode, - uint256[] memory constants - ) external { - bytes memory io = abi.encodePacked(uint8(0), uint8(MIN_FLOW_SENTINELS)); - expressionDeployerDeployExpression2MockCall(expression, io); - - EvaluableConfigV3[] memory flowConfig = new EvaluableConfigV3[](1); - flowConfig[0] = EvaluableConfigV3(DEPLOYER, bytecode, constants); - - I_CLONE_FACTORY.clone(deployFlowImplementation(), abi.encode(flowConfig)); - } - - /// Reverts with `UnsupportedFlowInputs` when the deployer reports any - /// non-zero `flowInputs` byte in the IO string. Pinning this protects - /// against a future deployer behaviour change leaking non-zero inputs - /// through the guard at `Flow.flowInit`. - /// forge-config: default.fuzz.runs = 100 - function testFlowConstructionRevertsOnNonZeroFlowInputs( - address expression, - bytes memory bytecode, - uint256[] memory constants, - uint8 flowInputs - ) external { - vm.assume(flowInputs != 0); - // io: byte0 = flowInputs (non-zero), byte1 = 7 (>= MIN_FLOW_SENTINELS). - bytes memory io = abi.encodePacked(flowInputs, uint8(7)); - expressionDeployerDeployExpression2MockCall(expression, io); - - EvaluableConfigV3[] memory flowConfig = new EvaluableConfigV3[](1); - flowConfig[0] = EvaluableConfigV3(DEPLOYER, bytecode, constants); - - address impl = deployFlowImplementation(); - vm.expectRevert(UnsupportedFlowInputs.selector); - I_CLONE_FACTORY.clone(impl, abi.encode(flowConfig)); - } - - function testFlowConstructionInitialize(address expression, bytes memory bytecode, uint256[] memory constants) - external - { - expressionDeployerDeployExpression2MockCall(expression, bytes(hex"0007")); - - EvaluableConfigV3[] memory flowConfig = new EvaluableConfigV3[](1); - flowConfig[0] = EvaluableConfigV3(DEPLOYER, bytecode, constants); + function testFlowConstructionInitialize(bytes memory bytecode) external { + EvaluableV4[] memory flowConfig = new EvaluableV4[](1); + flowConfig[0] = EvaluableV4(INTERPRETER, STORE, bytecode); vm.recordLogs(); I_CLONE_FACTORY.clone(deployFlowImplementation(), abi.encode(flowConfig)); Vm.Log[] memory logs = vm.getRecordedLogs(); - bytes32 eventSignature = keccak256("Initialize(address,(address,bytes,uint256[])[])"); + bytes32 eventSignature = keccak256("Initialize(address,(address,address,bytes)[])"); Vm.Log memory concreteEvent = LibLogHelper.findEvent(logs, eventSignature); - (address sender, EvaluableConfigV3[] memory config) = - abi.decode(concreteEvent.data, (address, EvaluableConfigV3[])); + (address sender, EvaluableV4[] memory config) = abi.decode(concreteEvent.data, (address, EvaluableV4[])); assertEq(sender, address(I_CLONE_FACTORY), "wrong sender in Initialize event"); assertEq(keccak256(abi.encode(flowConfig)), keccak256(abi.encode(config)), "wrong compare Structs"); diff --git a/test/src/concrete/Flow.context.t.sol b/test/src/concrete/Flow.context.t.sol index b6d9c89a..b6ff1473 100644 --- a/test/src/concrete/Flow.context.t.sol +++ b/test/src/concrete/Flow.context.t.sol @@ -3,11 +3,10 @@ pragma solidity =0.8.25; import {FlowTest} from "test/abstract/FlowTest.sol"; -import {IFlowV5, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV5.sol"; +import {IFlowV6, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV6.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {EvaluableV4} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {FLOW_MAX_OUTPUTS, FLOW_ENTRYPOINT} from "../../../src/concrete/Flow.sol"; -import {LibEncodedDispatch} from "rain.interpreter.interface/lib/caller/LibEncodedDispatch.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibContextWrapper} from "test/lib/LibContextWrapper.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; @@ -22,7 +21,7 @@ contract FlowContextTest is FlowTest { SignedContextV1[] memory signedContext = new SignedContextV1[](0); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); uint256[][] memory context = LibContextWrapper.buildAndSetContext(callerContext, signedContext, address(alice), address(flow)); @@ -33,14 +32,10 @@ contract FlowContextTest is FlowTest { interpreterEval2MockCall(stack, new uint256[](0)); - interpreterEval2ExpectCall( - address(flow), - LibEncodedDispatch.encode2(evaluable.expression, FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS), - context - ); + interpreterEval2ExpectCall(address(flow), context); } vm.startPrank(alice); - flow.flow(evaluable, callerContext, signedContext); + flow.flow(evaluable, asBytes32(callerContext), signedContext); vm.stopPrank(); } } diff --git a/test/src/concrete/Flow.expression.t.sol b/test/src/concrete/Flow.expression.t.sol index 047e6e23..7c5899de 100644 --- a/test/src/concrete/Flow.expression.t.sol +++ b/test/src/concrete/Flow.expression.t.sol @@ -5,8 +5,8 @@ pragma solidity =0.8.25; import {Vm} from "forge-std/Test.sol"; import {FlowTest} from "test/abstract/FlowTest.sol"; -import {IFlowV5} from "../../../src/interface/IFlowV5.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {IFlowV6} from "../../../src/interface/IFlowV6.sol"; +import {EvaluableV4} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol"; import {LibContextWrapper} from "test/lib/LibContextWrapper.sol"; @@ -32,10 +32,10 @@ contract FlowExpressionTest is FlowTest, IInterpreterCallerV2 { uint256[][] memory constants = new uint256[][](expressions.length); - (, EvaluableV2[] memory evaluables) = deployFlow(expressions, constants); + (, EvaluableV4[] memory evaluables) = deployFlow(expressions, constants); for (uint256 i = 0; i < evaluables.length; i++) { - assertEq(evaluables[i].expression, expressions[i]); + assertEq(evaluables[i].bytecode, abi.encodePacked(expressions[i])); } } @@ -52,7 +52,7 @@ contract FlowExpressionTest is FlowTest, IInterpreterCallerV2 { fuzzedcallerContext1, fuzzedcallerContext0 ); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); SignedContextV1[] memory signedContext = new SignedContextV1[](matrixCallerContext.length); { @@ -66,7 +66,7 @@ contract FlowExpressionTest is FlowTest, IInterpreterCallerV2 { interpreterEval2MockCall(stack, new uint256[](0)); vm.recordLogs(); - flow.flow(evaluable, fuzzedcallerContext0, signedContext); + flow.flow(evaluable, asBytes32(fuzzedcallerContext0), signedContext); } { @@ -75,8 +75,8 @@ contract FlowExpressionTest is FlowTest, IInterpreterCallerV2 { ); Vm.Log[] memory logs = vm.getRecordedLogs(); - Vm.Log memory log = LibLogHelper.findEvent(logs, keccak256("Context(address,uint256[][])")); - (address sender, uint256[][] memory buildContextOutput) = abi.decode(log.data, (address, uint256[][])); + Vm.Log memory log = LibLogHelper.findEvent(logs, keccak256("ContextV2(address,bytes32[][])")); + (address sender, bytes32[][] memory buildContextOutput) = abi.decode(log.data, (address, bytes32[][])); assertEq(sender, address(this), "wrong sender"); assertEq( diff --git a/test/src/concrete/Flow.multicall.t.sol b/test/src/concrete/Flow.multicall.t.sol index 5250afdf..dbb4a07c 100644 --- a/test/src/concrete/Flow.multicall.t.sol +++ b/test/src/concrete/Flow.multicall.t.sol @@ -3,11 +3,10 @@ pragma solidity =0.8.25; import {FlowTest} from "test/abstract/FlowTest.sol"; -import {IFlowV5} from "../../../src/interface/IFlowV5.sol"; -import {FLOW_MAX_OUTPUTS, FLOW_ENTRYPOINT} from "../../../src/concrete/Flow.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +import {IFlowV6} from "../../../src/interface/IFlowV6.sol"; +import {EvaluableV4} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; -import {LibEncodedDispatch} from "rain.interpreter.interface/lib/caller/LibEncodedDispatch.sol"; +import {IInterpreterV4, StackItem} from "rain.interpreter.interface/interface/IInterpreterV4.sol"; import {LibUint256Matrix} from "rain.solmem/lib/LibUint256Matrix.sol"; import {Multicall} from "openzeppelin-contracts/contracts/utils/Multicall.sol"; @@ -15,8 +14,12 @@ contract FlowMulticallTest is FlowTest { using LibUint256Matrix for uint256[]; /** - * @dev Should call multiple flows from same flow contract at once using multicall + * @dev Should call multiple flows from same flow contract at once using multicall. * + * In V4 there is no encoded dispatch, so a per-flow `eval4` mock keyed on the + * expression no longer differentiates the two flows. The multicall calls + * `eval4` once per flow in order, so a sequential mock returns flow A's stack + * to the first call and flow B's stack to the second. */ function testFlowBasicMulticallFlows( address bob, @@ -34,45 +37,35 @@ contract FlowMulticallTest is FlowTest { expressions[0] = expressionA; expressions[1] = expressionB; - (IFlowV5 flow, EvaluableV2[] memory evaluables) = + (IFlowV6 flow, EvaluableV4[] memory evaluables) = deployFlow(expressions, new uint256[](0).matrixFrom(new uint256[](0))); assumeEtchable(bob, address(flow)); - executeFlowA(bob, address(flow), evaluables[0], amount); - executeFlowB(bob, address(flow), evaluables[1], tokenId, amount); + + (uint256[] memory stackA,) = + mintAndBurnFlowStack(bob, 20 ether, 10 ether, 5, transfersERC20toERC20(bob, address(flow), amount, amount)); + (uint256[] memory stackB,) = mintAndBurnFlowStack( + bob, 20 ether, 10 ether, 5, transferERC721ToERC1155(address(flow), bob, tokenId, amount, tokenId) + ); + + StackItem[] memory sA; + StackItem[] memory sB; + assembly ("memory-safe") { + sA := stackA + sB := stackB + } + bytes[] memory returns_ = new bytes[](2); + returns_[0] = abi.encode(sA, new bytes32[](0)); + returns_[1] = abi.encode(sB, new bytes32[](0)); + vm.mockCalls(address(INTERPRETER), abi.encodeWithSelector(IInterpreterV4.eval4.selector), returns_); { bytes[] memory calldatas = new bytes[](2); - calldatas[0] = abi.encodeCall(flow.flow, (evaluables[0], new uint256[](0), new SignedContextV1[](0))); - calldatas[1] = abi.encodeCall(flow.flow, (evaluables[1], new uint256[](0), new SignedContextV1[](0))); + calldatas[0] = abi.encodeCall(flow.flow, (evaluables[0], new bytes32[](0), new SignedContextV1[](0))); + calldatas[1] = abi.encodeCall(flow.flow, (evaluables[1], new bytes32[](0), new SignedContextV1[](0))); vm.startPrank(bob); Multicall(address(flow)).multicall(calldatas); } } - - function executeFlowA(address bob, address flow, EvaluableV2 memory evaluable, uint256 amount) internal { - (uint256[] memory stack,) = - mintAndBurnFlowStack(bob, 20 ether, 10 ether, 5, transfersERC20toERC20(bob, flow, amount, amount)); - interpreterEval2MockCall( - address(flow), - LibEncodedDispatch.encode2(evaluable.expression, FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS), - stack, - new uint256[](0) - ); - } - - function executeFlowB(address bob, address flow, EvaluableV2 memory evaluable, uint256 tokenId, uint256 amount) - internal - { - (uint256[] memory stack,) = mintAndBurnFlowStack( - bob, 20 ether, 10 ether, 5, transferERC721ToERC1155(flow, bob, tokenId, amount, tokenId) - ); - interpreterEval2MockCall( - flow, - LibEncodedDispatch.encode2(evaluable.expression, FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS), - stack, - new uint256[](0) - ); - } } diff --git a/test/src/concrete/Flow.preview.t.sol b/test/src/concrete/Flow.preview.t.sol index 856e749b..bf6ba1b4 100644 --- a/test/src/concrete/Flow.preview.t.sol +++ b/test/src/concrete/Flow.preview.t.sol @@ -5,20 +5,20 @@ pragma solidity =0.8.25; import {FlowTest} from "test/abstract/FlowTest.sol"; import {MissingSentinel, Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; import { - IFlowV5, + IFlowV6, FlowTransferV1, ERC20Transfer, ERC721Transfer, ERC1155Transfer, RAIN_FLOW_SENTINEL, Sentinel -} from "../../../src/interface/IFlowV5.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +} from "../../../src/interface/IFlowV6.sol"; +import {EvaluableV4} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {LibEvaluable} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; contract FlowPreviewTest is FlowTest { - using LibEvaluable for EvaluableV2; + using LibEvaluable for EvaluableV4; /** * @dev Tests the preview of defined Flow IO for ERC1155 @@ -32,7 +32,7 @@ contract FlowPreviewTest is FlowTest { ) external { vm.label(alice, "alice"); - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); assumeEtchable(alice, address(flow)); { (uint256[] memory stack, bytes32 transferHash) = mintAndBurnFlowStack( @@ -43,7 +43,9 @@ contract FlowPreviewTest is FlowTest { multiTransferERC1155(alice, address(flow), erc1155TokenId, erc1155Amount, erc1155TokenId, erc1155Amount) ); - assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(stack))), "wrong compare Structs"); + assertEq( + transferHash, keccak256(abi.encode(flow.stackToFlow(asStackItems(stack)))), "wrong compare Structs" + ); } } @@ -59,14 +61,14 @@ contract FlowPreviewTest is FlowTest { ) external { vm.label(alice, "alice"); - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); assumeEtchable(alice, address(flow)); (uint256[] memory stack, bytes32 transferHash) = mintAndBurnFlowStack( alice, 20 ether, 10 ether, 5, multiTransferERC721(alice, address(flow), erc721TokenIdA, erc721TokenIdB) ); - assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(stack))), "wrong compare Structs"); + assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(asStackItems(stack)))), "wrong compare Structs"); } /** @@ -81,14 +83,14 @@ contract FlowPreviewTest is FlowTest { ) external { vm.label(alice, "alice"); - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); assumeEtchable(alice, address(flow)); (uint256[] memory stack, bytes32 transferHash) = mintAndBurnFlowStack( alice, 20 ether, 10 ether, 5, multiTransfersERC20(alice, address(flow), erc20AmountA, erc20AmountB) ); - assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(stack))), "wrong compare Structs"); + assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(asStackItems(stack)))), "wrong compare Structs"); } /** @@ -103,7 +105,7 @@ contract FlowPreviewTest is FlowTest { ) external { vm.label(alice, "alice"); - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); assumeEtchable(alice, address(flow)); (uint256[] memory stack, bytes32 transferHash) = mintAndBurnFlowStack( @@ -116,7 +118,7 @@ contract FlowPreviewTest is FlowTest { ) ); - assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(stack))), "wrong compare Structs"); + assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(asStackItems(stack)))), "wrong compare Structs"); } /** @@ -131,7 +133,7 @@ contract FlowPreviewTest is FlowTest { ) external { vm.label(alice, "alice"); - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); assumeEtchable(alice, address(flow)); (uint256[] memory stack, bytes32 transferHash) = mintAndBurnFlowStack( @@ -142,7 +144,7 @@ contract FlowPreviewTest is FlowTest { createTransferERC721ToERC721(alice, address(flow), erc721TokenInId, erc721TokenOutId) ); - assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(stack))), "wrong compare Structs"); + assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(asStackItems(stack)))), "wrong compare Structs"); } /** @@ -157,7 +159,7 @@ contract FlowPreviewTest is FlowTest { ) external { vm.label(alice, "alice"); - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); assumeEtchable(alice, address(flow)); (uint256[] memory stack, bytes32 transferHash) = mintAndBurnFlowStack( @@ -168,7 +170,7 @@ contract FlowPreviewTest is FlowTest { createTransfersERC20toERC20(alice, address(flow), erc20AmountIn, erc20AmountOut) ); - assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(stack))), "wrong compare Structs"); + assertEq(transferHash, keccak256(abi.encode(flow.stackToFlow(asStackItems(stack)))), "wrong compare Structs"); } /** @@ -176,13 +178,15 @@ contract FlowPreviewTest is FlowTest { */ /// forge-config: default.fuzz.runs = 100 function testFlowBasePreviewEmptyFlowIO() public { - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); FlowTransferV1 memory flowTransfer = FlowTransferV1(new ERC20Transfer[](0), new ERC721Transfer[](0), new ERC1155Transfer[](0)); uint256[] memory stack = LibStackGeneration.generateFlowStack(Sentinel.unwrap(RAIN_FLOW_SENTINEL), flowTransfer); assertEq( - keccak256(abi.encode(flowTransfer)), keccak256(abi.encode(flow.stackToFlow(stack))), "wrong compare Structs" + keccak256(abi.encode(flowTransfer)), + keccak256(abi.encode(flow.stackToFlow(asStackItems(stack)))), + "wrong compare Structs" ); } @@ -192,7 +196,7 @@ contract FlowPreviewTest is FlowTest { /// rainlang author writes — so that any future reorder of the struct /// fields produces field-named assertions that fail. function testFlowStackToFlowFieldOrderPinned() external { - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); // Stack layout (low index = bottom of stack, high index = top; top is // consumed first by stackToFlow): @@ -217,7 +221,7 @@ contract FlowPreviewTest is FlowTest { stack[14] = uint256(uint160(0xA2)); // erc20 to stack[15] = 0xA3A3; // erc20 amount - FlowTransferV1 memory result = flow.stackToFlow(stack); + FlowTransferV1 memory result = flow.stackToFlow(asStackItems(stack)); assertEq(result.erc20.length, 1, "erc20 length"); assertEq(result.erc20[0].token, address(uint160(0xA0)), "erc20 token"); @@ -239,31 +243,31 @@ contract FlowPreviewTest is FlowTest { assertEq(result.erc1155[0].amount, 0xC4C4, "erc1155 amount"); } - /// `IFlowV5.stackToFlow` MAY revert if the stack is malformed. The + /// `IFlowV6.stackToFlow` MAY revert if the stack is malformed. The /// observable revert is `MissingSentinel(RAIN_FLOW_SENTINEL)` from /// `LibStackSentinel.consumeSentinelTuples` when any of the three /// required sentinels is absent. function testStackToFlowRevertsOnEmptyStack() external { - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); uint256[] memory stack = new uint256[](0); vm.expectRevert(abi.encodeWithSelector(MissingSentinel.selector, RAIN_FLOW_SENTINEL)); - flow.stackToFlow(stack); + flow.stackToFlow(asStackItems(stack)); } function testStackToFlowRevertsOnOneSentinelOnly() external { - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); uint256[] memory stack = new uint256[](1); stack[0] = Sentinel.unwrap(RAIN_FLOW_SENTINEL); vm.expectRevert(abi.encodeWithSelector(MissingSentinel.selector, RAIN_FLOW_SENTINEL)); - flow.stackToFlow(stack); + flow.stackToFlow(asStackItems(stack)); } function testStackToFlowRevertsOnTwoSentinelsOnly() external { - (IFlowV5 flow,) = deployFlow(); + (IFlowV6 flow,) = deployFlow(); uint256[] memory stack = new uint256[](2); stack[0] = Sentinel.unwrap(RAIN_FLOW_SENTINEL); stack[1] = Sentinel.unwrap(RAIN_FLOW_SENTINEL); vm.expectRevert(abi.encodeWithSelector(MissingSentinel.selector, RAIN_FLOW_SENTINEL)); - flow.stackToFlow(stack); + flow.stackToFlow(asStackItems(stack)); } } diff --git a/test/src/concrete/Flow.signedContext.t.sol b/test/src/concrete/Flow.signedContext.t.sol index 39ca7b96..161e510d 100644 --- a/test/src/concrete/Flow.signedContext.t.sol +++ b/test/src/concrete/Flow.signedContext.t.sol @@ -5,9 +5,9 @@ pragma solidity =0.8.25; import {Vm} from "forge-std/Test.sol"; import {FlowTest} from "test/abstract/FlowTest.sol"; import {SignContextLib} from "test/lib/SignContextLib.sol"; -import {IFlowV5, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV5.sol"; +import {IFlowV6, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV6.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; -import {EvaluableV2, SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import {EvaluableV4, SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV4.sol"; import {InvalidSignature} from "rain.interpreter.interface/lib/caller/LibContext.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; @@ -23,7 +23,7 @@ contract FlowSignedContextTest is FlowTest { uint256 fuzzedKeyBob ) public { vm.assume(fuzzedKeyBob != fuzzedKeyAlice); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); // Ensure the fuzzed key is within the valid range for secp256k1 uint256 aliceKey = (fuzzedKeyAlice % (SECP256K1_ORDER - 1)) + 1; @@ -38,7 +38,7 @@ contract FlowSignedContextTest is FlowTest { LibStackGeneration.generateFlowStack(Sentinel.unwrap(RAIN_FLOW_SENTINEL), transferEmpty()); interpreterEval2MockCall(stack, new uint256[](0)); - flow.flow(evaluable, new uint256[](0), signedContexts); + flow.flow(evaluable, new bytes32[](0), signedContexts); // With bad signature in second signed context SignedContextV1[] memory signedContexts1 = new SignedContextV1[](2); @@ -46,7 +46,7 @@ contract FlowSignedContextTest is FlowTest { signedContexts1[1] = vm.signContext(aliceKey, bobKey, context1); vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, 1)); - flow.flow(evaluable, new uint256[](0), signedContexts1); + flow.flow(evaluable, new bytes32[](0), signedContexts1); } /// Should validate a signed context @@ -57,7 +57,7 @@ contract FlowSignedContextTest is FlowTest { uint256 fuzzedKeyBob ) public { vm.assume(fuzzedKeyBob != fuzzedKeyAlice); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); // Ensure the fuzzed key is within the valid range for secp256k1 uint256 aliceKey = (fuzzedKeyAlice % (SECP256K1_ORDER - 1)) + 1; @@ -69,13 +69,13 @@ contract FlowSignedContextTest is FlowTest { uint256[] memory stack = LibStackGeneration.generateFlowStack(Sentinel.unwrap(RAIN_FLOW_SENTINEL), transferEmpty()); interpreterEval2MockCall(stack, new uint256[](0)); - flow.flow(evaluable, new uint256[](0), signedContext); + flow.flow(evaluable, new bytes32[](0), signedContext); // With bad signature in second signed context SignedContextV1[] memory signedContext1 = new SignedContextV1[](1); signedContext1[0] = vm.signContext(aliceKey, bobKey, context0); vm.expectRevert(abi.encodeWithSelector(InvalidSignature.selector, 0)); - flow.flow(evaluable, new uint256[](0), signedContext1); + flow.flow(evaluable, new bytes32[](0), signedContext1); } } diff --git a/test/src/concrete/Flow.time.t.sol b/test/src/concrete/Flow.time.t.sol index 33f45d26..64bde52a 100644 --- a/test/src/concrete/Flow.time.t.sol +++ b/test/src/concrete/Flow.time.t.sol @@ -3,39 +3,39 @@ pragma solidity =0.8.25; import {FlowTest} from "test/abstract/FlowTest.sol"; -import {IFlowV5, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV5.sol"; +import {IFlowV6, RAIN_FLOW_SENTINEL} from "../../../src/interface/IFlowV6.sol"; import {Sentinel} from "rain.solmem/lib/LibStackSentinel.sol"; -import {EvaluableV2, SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; +import {EvaluableV4, SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV4.sol"; import {DEFAULT_STATE_NAMESPACE} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterV2.sol"; -import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/deprecated/v2/IInterpreterStoreV2.sol"; +import {IInterpreterStoreV3} from "rain.interpreter.interface/interface/IInterpreterStoreV3.sol"; import {LibStackGeneration} from "test/lib/LibStackGeneration.sol"; contract FlowTimeTest is FlowTest { function testFlowBasicFlowTime(uint256[] memory writeToStore) public { vm.assume(writeToStore.length != 0); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); uint256[] memory stack = LibStackGeneration.generateFlowStack(Sentinel.unwrap(RAIN_FLOW_SENTINEL), transferEmpty()); interpreterEval2MockCall(stack, writeToStore); - vm.mockCall(address(STORE), abi.encodeWithSelector(IInterpreterStoreV2.set.selector), abi.encode()); + vm.mockCall(address(STORE), abi.encodeWithSelector(IInterpreterStoreV3.set.selector), abi.encode()); vm.expectCall( address(STORE), - abi.encodeWithSelector(IInterpreterStoreV2.set.selector, DEFAULT_STATE_NAMESPACE, writeToStore) + abi.encodeWithSelector(IInterpreterStoreV3.set.selector, DEFAULT_STATE_NAMESPACE, asBytes32(writeToStore)) ); - flow.flow(evaluable, writeToStore, new SignedContextV1[](0)); + flow.flow(evaluable, asBytes32(writeToStore), new SignedContextV1[](0)); } /// `LibFlow.flow` short-circuits the `interpreterStore.set` call when /// `kvs.length == 0`. Pin this with an explicit count=0 expectCall so /// a future refactor that drops the short-circuit is caught. function testFlowBasicFlowTimeNoStoreSetWhenKvsEmpty() public { - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); uint256[] memory stack = LibStackGeneration.generateFlowStack(Sentinel.unwrap(RAIN_FLOW_SENTINEL), transferEmpty()); @@ -43,10 +43,10 @@ contract FlowTimeTest is FlowTest { // Mock set to a no-op so the existing REVERTING_MOCK_BYTECODE on // STORE doesn't accidentally pass the test for the wrong reason. - vm.mockCall(address(STORE), abi.encodeWithSelector(IInterpreterStoreV2.set.selector), abi.encode()); - vm.expectCall(address(STORE), abi.encodeWithSelector(IInterpreterStoreV2.set.selector), 0); + vm.mockCall(address(STORE), abi.encodeWithSelector(IInterpreterStoreV3.set.selector), abi.encode()); + vm.expectCall(address(STORE), abi.encodeWithSelector(IInterpreterStoreV3.set.selector), 0); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); } /// A revert from `interpreterStore.set` MUST propagate out of `flow` @@ -55,15 +55,15 @@ contract FlowTimeTest is FlowTest { function testFlowBasicFlowTimeStoreSetRevertBubbles(uint256[] memory writeToStore) public { vm.assume(writeToStore.length != 0); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); uint256[] memory stack = LibStackGeneration.generateFlowStack(Sentinel.unwrap(RAIN_FLOW_SENTINEL), transferEmpty()); interpreterEval2MockCall(stack, writeToStore); - vm.mockCallRevert(address(STORE), abi.encodeWithSelector(IInterpreterStoreV2.set.selector), "STORE_SET_FAILED"); + vm.mockCallRevert(address(STORE), abi.encodeWithSelector(IInterpreterStoreV3.set.selector), "STORE_SET_FAILED"); vm.expectRevert("STORE_SET_FAILED"); - flow.flow(evaluable, writeToStore, new SignedContextV1[](0)); + flow.flow(evaluable, asBytes32(writeToStore), new SignedContextV1[](0)); } } diff --git a/test/src/concrete/Flow.transfer.t.sol b/test/src/concrete/Flow.transfer.t.sol index c2dd9a1c..249503ed 100644 --- a/test/src/concrete/Flow.transfer.t.sol +++ b/test/src/concrete/Flow.transfer.t.sol @@ -4,15 +4,15 @@ pragma solidity =0.8.25; import {FlowTest} from "test/abstract/FlowTest.sol"; import { - IFlowV5, + IFlowV6, FlowTransferV1, ERC20Transfer, ERC721Transfer, ERC1155Transfer, RAIN_FLOW_SENTINEL, Sentinel -} from "../../../src/interface/IFlowV5.sol"; -import {EvaluableV2} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; +} from "../../../src/interface/IFlowV6.sol"; +import {EvaluableV4} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import {SignedContextV1} from "rain.interpreter.interface/interface/deprecated/v1/IInterpreterCallerV2.sol"; import {LibEvaluable} from "rain.interpreter.interface/lib/caller/LibEvaluable.sol"; @@ -24,7 +24,6 @@ import { } from "../../../src/error/ErrFlow.sol"; import {FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS} from "../../../src/concrete/Flow.sol"; -import {LibEncodedDispatch} from "rain.interpreter.interface/lib/caller/LibEncodedDispatch.sol"; import {LibContextWrapper} from "test/lib/LibContextWrapper.sol"; import {IERC721} from "openzeppelin-contracts/contracts/token/ERC721/IERC721.sol"; import {IERC1155} from "openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol"; @@ -42,7 +41,7 @@ interface IERC721SafeTransferFromV3 { bytes4 constant ERC721_SAFE_TRANSFER_FROM_3 = IERC721SafeTransferFromV3.safeTransferFrom.selector; contract FlowTransferTest is FlowTest { - using LibEvaluable for EvaluableV2; + using LibEvaluable for EvaluableV4; /// forge-config: default.fuzz.runs = 100 function testFlowERC721ToERC1155( @@ -54,7 +53,7 @@ contract FlowTransferTest is FlowTest { vm.assume(address(0) != alice); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); { @@ -70,7 +69,7 @@ contract FlowTransferTest is FlowTest { { vm.startPrank(alice); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } } @@ -79,7 +78,7 @@ contract FlowTransferTest is FlowTest { function testFlowERC20ToERC721(address alice, uint256 erc20InAmount, uint256 erc721OutTokenId) external { vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); { @@ -94,7 +93,7 @@ contract FlowTransferTest is FlowTest { } vm.startPrank(alice); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -102,7 +101,7 @@ contract FlowTransferTest is FlowTest { function testFlowERC1155ToERC1155(address alice, uint256 erc1155TokenId, uint256 erc1155Amount) external { vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); { @@ -119,7 +118,7 @@ contract FlowTransferTest is FlowTest { } vm.startPrank(alice); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -129,7 +128,7 @@ contract FlowTransferTest is FlowTest { vm.assume(Sentinel.unwrap(RAIN_FLOW_SENTINEL) != erc721InTokenId); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); { @@ -144,7 +143,7 @@ contract FlowTransferTest is FlowTest { } vm.startPrank(alice); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -152,7 +151,7 @@ contract FlowTransferTest is FlowTest { function testFlowERC20ToERC20(address alice, uint256 erc20OutAmount, uint256 erc20InAmount) external { vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); { @@ -163,7 +162,7 @@ contract FlowTransferTest is FlowTest { } vm.startPrank(alice); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -178,7 +177,7 @@ contract FlowTransferTest is FlowTest { vm.label(alice, "Alice"); vm.label(bob, "Bob"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); assumeEtchable(bob, address(flow)); @@ -197,7 +196,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(abi.encodeWithSelector(UnsupportedERC20Flow.selector)); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); { @@ -216,7 +215,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(abi.encodeWithSelector(UnsupportedERC20Flow.selector)); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -232,7 +231,7 @@ contract FlowTransferTest is FlowTest { vm.label(alice, "Alice"); vm.label(bob, "Bob"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); assumeEtchable(bob, address(flow)); @@ -251,7 +250,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(abi.encodeWithSelector(UnsupportedERC721Flow.selector)); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -272,7 +271,7 @@ contract FlowTransferTest is FlowTest { vm.label(alice, "Alice"); vm.label(bob, "Bob"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); assumeEtchable(bob, address(flow)); @@ -297,7 +296,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(abi.encodeWithSelector(UnsupportedERC1155Flow.selector)); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -314,15 +313,15 @@ contract FlowTransferTest is FlowTest { address[] memory expressionsA = new address[](1); expressionsA[0] = expressionA; - (, EvaluableV2[] memory evaluables) = deployFlow(expressionsA, new uint256[][](1)); + (, EvaluableV4[] memory evaluables) = deployFlow(expressionsA, new uint256[][](1)); address[] memory expressionsB = new address[](1); expressionsB[0] = expressionB; - (IFlowV5 flowB,) = deployFlow(expressionsB, new uint256[][](1)); + (IFlowV6 flowB,) = deployFlow(expressionsB, new uint256[][](1)); vm.startPrank(alice); vm.expectRevert(abi.encodeWithSelector(UnregisteredFlow.selector, evaluables[0].hash())); - flowB.flow(evaluables[0], new uint256[](0), new SignedContextV1[](0)); + flowB.flow(evaluables[0], new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -331,7 +330,7 @@ contract FlowTransferTest is FlowTest { */ /// forge-config: default.fuzz.runs = 100 function testFlowHaltIfEnsureRequirementNotMet() external { - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(address(0), address(flow)); (uint256[] memory stack,) = mintAndBurnFlowStack(address(this), 20 ether, 10 ether, 5, transferEmpty()); @@ -341,16 +340,14 @@ contract FlowTransferTest is FlowTest { new uint256[](0), new SignedContextV1[](0), address(this), address(flow) ); - interpreterEval2RevertCall( - address(flow), LibEncodedDispatch.encode2(evaluable.expression, FLOW_ENTRYPOINT, FLOW_MAX_OUTPUTS), context - ); + interpreterEval2RevertCall(address(flow), context); - vm.expectRevert("REVERT_EVAL2_CALL"); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + vm.expectRevert("REVERT_EVAL4_CALL"); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); } /// Pins the execution order ERC20 → ERC721 → ERC1155 against the upstream - /// invariant in `IFlowV5` and `LibFlow.flow`. If ERC20 reverts, neither + /// invariant in `IFlowV6` and `LibFlow.flow`. If ERC20 reverts, neither /// ERC721 nor ERC1155 must be called — this proves ERC20 is processed /// before the other two types. /// forge-config: default.fuzz.runs = 100 @@ -368,7 +365,7 @@ contract FlowTransferTest is FlowTest { vm.assume(Sentinel.unwrap(RAIN_FLOW_SENTINEL) != erc1155Amount); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); ERC20Transfer[] memory erc20Transfers = new ERC20Transfer[](1); @@ -391,7 +388,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -412,7 +409,7 @@ contract FlowTransferTest is FlowTest { vm.assume(Sentinel.unwrap(RAIN_FLOW_SENTINEL) != erc1155Amount); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); ERC20Transfer[] memory erc20Transfers = new ERC20Transfer[](1); @@ -434,7 +431,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -447,7 +444,7 @@ contract FlowTransferTest is FlowTest { vm.assume(Sentinel.unwrap(RAIN_FLOW_SENTINEL) != amount); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); ERC20Transfer[] memory erc20Transfers = new ERC20Transfer[](1); @@ -463,7 +460,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(bytes("TOKEN_REVERT")); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -474,7 +471,7 @@ contract FlowTransferTest is FlowTest { vm.assume(Sentinel.unwrap(RAIN_FLOW_SENTINEL) != tokenId); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); ERC721Transfer[] memory erc721Transfers = new ERC721Transfer[](1); @@ -490,7 +487,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(bytes("ERC721_REVERT")); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -502,7 +499,7 @@ contract FlowTransferTest is FlowTest { vm.assume(Sentinel.unwrap(RAIN_FLOW_SENTINEL) != amount); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); ERC1155Transfer[] memory erc1155Transfers = new ERC1155Transfer[](1); @@ -519,11 +516,11 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(bytes("ERC1155_REVERT")); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } - /// `IFlowV5.flow()` MUST process the flow atomically. When a later + /// `IFlowV6.flow()` MUST process the flow atomically. When a later /// transfer fails, the entire flow MUST revert and earlier transfers /// must NOT have observable side effects. With mocks, we observe this /// by asserting the outer revert (transaction revert rolls back any @@ -545,7 +542,7 @@ contract FlowTransferTest is FlowTest { vm.label(alice, "Alice"); vm.label(bob, "Bob"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); assumeEtchable(bob, address(flow)); @@ -568,11 +565,11 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(UnsupportedERC1155Flow.selector); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } - /// `IFlowV5.flow()` MUST revert if the evaluable returns a malformed + /// `IFlowV6.flow()` MUST revert if the evaluable returns a malformed /// stack. The observable revert is `MissingSentinel(RAIN_FLOW_SENTINEL)` /// from `LibStackSentinel.consumeSentinelTuples`. /// forge-config: default.fuzz.runs = 100 @@ -580,7 +577,7 @@ contract FlowTransferTest is FlowTest { vm.assume(alice != address(0)); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); uint256[] memory stack = new uint256[](0); @@ -588,7 +585,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(abi.encodeWithSelector(MissingSentinel.selector, RAIN_FLOW_SENTINEL)); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } @@ -597,7 +594,7 @@ contract FlowTransferTest is FlowTest { vm.assume(alice != address(0)); vm.label(alice, "Alice"); - (IFlowV5 flow, EvaluableV2 memory evaluable) = deployFlow(); + (IFlowV6 flow, EvaluableV4 memory evaluable) = deployFlow(); assumeEtchable(alice, address(flow)); uint256[] memory stack = new uint256[](1); @@ -606,7 +603,7 @@ contract FlowTransferTest is FlowTest { vm.startPrank(alice); vm.expectRevert(abi.encodeWithSelector(MissingSentinel.selector, RAIN_FLOW_SENTINEL)); - flow.flow(evaluable, new uint256[](0), new SignedContextV1[](0)); + flow.flow(evaluable, new bytes32[](0), new SignedContextV1[](0)); vm.stopPrank(); } }